@nikhil-patil/ngx-firefly-iii-api-client
Version:
OpenAPI client for ngx-firefly-iii-api-client
18,250 lines • 909 kB
JavaScript
import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Optional, Inject, NgModule, SkipSelf } from '@angular/core';
import * as i1 from '@angular/common/http';
import { HttpHeaders, HttpContext, HttpParams } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
class CustomHttpParameterCodec {
encodeKey(k) {
return encodeURIComponent(k);
}
encodeValue(v) {
return encodeURIComponent(v);
}
decodeKey(k) {
return decodeURIComponent(k);
}
decodeValue(v) {
return decodeURIComponent(v);
}
}
const BASE_PATH = new InjectionToken('basePath');
const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
};
class HttpConfiguration {
constructor(configurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;
this.username = configurationParameters.username;
this.password = configurationParameters.password;
this.accessToken = configurationParameters.accessToken;
this.basePath = configurationParameters.basePath;
this.withCredentials = configurationParameters.withCredentials;
this.encoder = configurationParameters.encoder;
if (configurationParameters.encodeParam) {
this.encodeParam = configurationParameters.encodeParam;
}
else {
this.encodeParam = param => this.defaultEncodeParam(param);
}
if (configurationParameters.credentials) {
this.credentials = configurationParameters.credentials;
}
else {
this.credentials = {};
}
// init default firefly_iii_auth credential
if (!this.credentials['firefly_iii_auth']) {
this.credentials['firefly_iii_auth'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
};
}
// init default local_bearer_auth credential
if (!this.credentials['local_bearer_auth']) {
this.credentials['local_bearer_auth'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
};
}
}
/**
* Select the correct content-type to use for a request.
* Uses {@link HttpConfiguration#isJsonMime} to determine the correct content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
selectHeaderContentType(contentTypes) {
if (contentTypes.length === 0) {
return undefined;
}
const type = contentTypes.find((x) => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
return type;
}
/**
* Select the correct accept content-type to use for a request.
* Uses {@link HttpConfiguration#isJsonMime} to determine the correct accept content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param accepts - the array of content types that are available for selection.
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
selectHeaderAccept(accepts) {
if (accepts.length === 0) {
return undefined;
}
const type = accepts.find((x) => this.isJsonMime(x));
if (type === undefined) {
return accepts[0];
}
return type;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime) {
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
lookupCredential(key) {
const value = this.credentials[key];
return typeof value === 'function'
? value()
: value;
}
defaultEncodeParam(param) {
// This implementation exists as fallback for missing configuration
// and for backwards compatibility to older typescript-angular generator versions.
// It only works for the 'simple' parameter style.
// Date-handling only works for the 'date-time' format.
// All other styles and Date-formats are probably handled incorrectly.
//
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
const value = param.dataFormat === 'date-time' && param.value instanceof Date
? param.value.toISOString()
: param.value;
return encodeURIComponent(String(value));
}
}
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AboutService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getAbout(xTraceId, observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/about`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCron(cliToken, xTraceId, date, force, observe = 'body', reportProgress = false, options) {
if (cliToken === null || cliToken === undefined) {
throw new Error('Required parameter cliToken was null or undefined when calling getCron.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (date !== undefined && date !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date');
}
if (force !== undefined && force !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, force, 'force');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/cron/${this.configuration.encodeParam({ name: "cliToken", value: cliToken, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCurrentUser(xTraceId, observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/about/user`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AboutService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AboutService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AboutService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AccountsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteAccount(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteAccount.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getAccount(id, xTraceId, date, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getAccount.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (date !== undefined && date !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAccount(xTraceId, limit, page, date, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (date !== undefined && date !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByAccount(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByAccount.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listPiggyBankByAccount(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listPiggyBankByAccount.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/piggy-banks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByAccount(id, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByAccount.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeAccount(accountStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (accountStore === null || accountStore === undefined) {
throw new Error('Required parameter accountStore was null or undefined when calling storeAccount.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: accountStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateAccount(id, accountUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateAccount.');
}
if (accountUpdate === null || accountUpdate === undefined) {
throw new Error('Required parameter accountUpdate was null or undefined when calling updateAccount.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/accounts/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: accountUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AccountsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AccountsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AccountsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AttachmentsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteAttachment(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
downloadAttachment(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling downloadAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/octet-stream',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/attachments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/download`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getAttachment(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachment(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeAttachment(attachmentStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (attachmentStore === null || attachmentStore === undefined) {
throw new Error('Required parameter attachmentStore was null or undefined when calling storeAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: attachmentStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateAttachment(id, attachmentUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateAttachment.');
}
if (attachmentUpdate === null || attachmentUpdate === undefined) {
throw new Error('Required parameter attachmentUpdate was null or undefined when calling updateAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: attachmentUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
uploadAttachment(id, xTraceId, body, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling uploadAttachment.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/octet-stream'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/attachments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/upload`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: body,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AttachmentsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AttachmentsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AttachmentsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AutocompleteService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getAccountsAC(xTraceId, query, limit, date, types, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (date !== undefined && date !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date');
}
if (types) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, [...types].join(COLLECTION_FORMATS['csv']), 'types');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/accounts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getBillsAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/bills`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getBudgetsAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/budgets`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCategoriesAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/categories`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCurrenciesAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/currencies`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCurrenciesCodeAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/currencies-with-code`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getObjectGroupsAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/object-groups`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getPiggiesAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/piggy-banks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getPiggiesBalanceAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/piggy-banks-with-balance`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRecurringAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/recurring`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRuleGroupsAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/rule-groups`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRulesAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTagAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/tags`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransactionTypesAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/transaction-types`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransactionsAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransactionsIDAC(xTraceId, query, limit, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/autocomplete/transactions-with-id`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AutocompleteService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AutocompleteService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AutocompleteService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AvailableBudgetsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getAvailableBudget(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getAvailableBudget.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/available-budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAvailableBudget(xTraceId, limit, page, start, end, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/available-budgets`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AvailableBudgetsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AvailableBudgetsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: AvailableBudgetsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class BillsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteBill(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteBill.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getBill(id, xTraceId, start, end, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getBill.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByBill(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByBill.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBill(xTraceId, limit, page, start, end, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRuleByBill(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listRuleByBill.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByBill(id, xTraceId, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByBill.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeBill(billStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (billStore === null || billStore === undefined) {
throw new Error('Required parameter billStore was null or undefined when calling storeBill.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: billStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateBill(id, billUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateBill.');
}
if (billUpdate === null || billUpdate === undefined) {
throw new Error('Required parameter billUpdate was null or undefined when calling updateBill.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/bills/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: billUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BillsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BillsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BillsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class BudgetsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteBudget(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteBudget.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteBudgetLimit(id, limitId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteBudgetLimit.');
}
if (limitId === null || limitId === undefined) {
throw new Error('Required parameter limitId was null or undefined when calling deleteBudgetLimit.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits/${this.configuration.encodeParam({ name: "limitId", value: limitId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getBudget(id, xTraceId, start, end, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getBudgetLimit(id, limitId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getBudgetLimit.');
}
if (limitId === null || limitId === undefined) {
throw new Error('Required parameter limitId was null or undefined when calling getBudgetLimit.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits/${this.configuration.encodeParam({ name: "limitId", value: limitId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByBudget(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBudget(xTraceId, limit, page, start, end, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBudgetLimit(start, end, xTraceId, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling listBudgetLimit.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling listBudgetLimit.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budget-limits`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBudgetLimitByBudget(id, xTraceId, start, end, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listBudgetLimitByBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByBudget(id, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByBudgetLimit(id, limitId, xTraceId, limit, page, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByBudgetLimit.');
}
if (limitId === null || limitId === undefined) {
throw new Error('Required parameter limitId was null or undefined when calling listTransactionByBudgetLimit.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits/${this.configuration.encodeParam({ name: "limitId", value: limitId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeBudget(budgetStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (budgetStore === null || budgetStore === undefined) {
throw new Error('Required parameter budgetStore was null or undefined when calling storeBudget.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: budgetStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeBudgetLimit(id, budgetLimitStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling storeBudgetLimit.');
}
if (budgetLimitStore === null || budgetLimitStore === undefined) {
throw new Error('Required parameter budgetLimitStore was null or undefined when calling storeBudgetLimit.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: budgetLimitStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateBudget(id, budgetUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateBudget.');
}
if (budgetUpdate === null || budgetUpdate === undefined) {
throw new Error('Required parameter budgetUpdate was null or undefined when calling updateBudget.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: budgetUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateBudgetLimit(id, limitId, budgetLimit, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateBudgetLimit.');
}
if (limitId === null || limitId === undefined) {
throw new Error('Required parameter limitId was null or undefined when calling updateBudgetLimit.');
}
if (budgetLimit === null || budgetLimit === undefined) {
throw new Error('Required parameter budgetLimit was null or undefined when calling updateBudgetLimit.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/budgets/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/limits/${this.configuration.encodeParam({ name: "limitId", value: limitId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: budgetLimit,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BudgetsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BudgetsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: BudgetsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class CategoriesService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteCategory(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteCategory.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCategory(id, xTraceId, start, end, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByCategory(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listCategory(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByCategory(id, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeCategory(category, xTraceId, observe = 'body', reportProgress = false, options) {
if (category === null || category === undefined) {
throw new Error('Required parameter category was null or undefined when calling storeCategory.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: category,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateCategory(id, categoryUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateCategory.');
}
if (categoryUpdate === null || categoryUpdate === undefined) {
throw new Error('Required parameter categoryUpdate was null or undefined when calling updateCategory.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/categories/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: categoryUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CategoriesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CategoriesService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CategoriesService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class ChartsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getChartAccountOverview(start, end, xTraceId, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling getChartAccountOverview.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling getChartAccountOverview.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/chart/account/overview`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ChartsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ChartsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ChartsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class ConfigurationService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
canConsumeForm(consumes) {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getConfiguration(xTraceId, observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/x-www-form-urlencoded'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/configuration`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getSingleConfiguration(name, xTraceId, observe = 'body', reportProgress = false, options) {
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getSingleConfiguration.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/configuration/${this.configuration.encodeParam({ name: "name", value: name, in: "path", style: "simple", explode: false, dataType: "ConfigValueFilter", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
setConfiguration(name, value, xTraceId, observe = 'body', reportProgress = false, options) {
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling setConfiguration.');
}
if (value === null || value === undefined) {
throw new Error('Required parameter value was null or undefined when calling setConfiguration.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/x-www-form-urlencoded',
'application/json'
];
const canConsumeForm = this.canConsumeForm(consumes);
let localVarFormParams;
let localVarUseForm = false;
let localVarConvertFormParamsToString = false;
if (localVarUseForm) {
localVarFormParams = new FormData();
}
else {
localVarFormParams = new HttpParams({ encoder: this.encoder });
}
if (value !== undefined) {
localVarFormParams = localVarFormParams.append('value', localVarUseForm ? new Blob([JSON.stringify(value)], { type: 'application/json' }) : value) || localVarFormParams;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/configuration/${this.configuration.encodeParam({ name: "name", value: name, in: "path", style: "simple", explode: false, dataType: "ConfigValueUpdateFilter", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ConfigurationService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class CurrenciesService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
defaultCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling defaultCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/default`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling deleteCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
disableCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling disableCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/disable`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
enableCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling enableCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/enable`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling getCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getDefaultCurrency(xTraceId, observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/default`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAccountByCurrency(code, xTraceId, limit, page, date, type, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listAccountByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (date !== undefined && date !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/accounts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAvailableBudgetByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listAvailableBudgetByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/available-budgets`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBillByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listBillByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/bills`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBudgetLimitByCurrency(code, xTraceId, limit, page, start, end, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listBudgetLimitByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/budget_limits`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listCurrency(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRecurrenceByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listRecurrenceByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/recurrences`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRuleByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listRuleByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByCurrency(code, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling listTransactionByCurrency.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeCurrency(currencyStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (currencyStore === null || currencyStore === undefined) {
throw new Error('Required parameter currencyStore was null or undefined when calling storeCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: currencyStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateCurrency(code, currencyUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (code === null || code === undefined) {
throw new Error('Required parameter code was null or undefined when calling updateCurrency.');
}
if (currencyUpdate === null || currencyUpdate === undefined) {
throw new Error('Required parameter currencyUpdate was null or undefined when calling updateCurrency.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/vnd.api+json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: currencyUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CurrenciesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CurrenciesService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: CurrenciesService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class DataService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
bulkUpdateTransactions(query, observe = 'body', reportProgress = false, options) {
if (query === null || query === undefined) {
throw new Error('Required parameter query was null or undefined when calling bulkUpdateTransactions.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/data/bulk/transactions`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
destroyData(objects, xTraceId, observe = 'body', reportProgress = false, options) {
if (objects === null || objects === undefined) {
throw new Error('Required parameter objects was null or undefined when calling destroyData.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (objects !== undefined && objects !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, objects, 'objects');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/data/destroy`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportAccounts(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/accounts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportBills(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/bills`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportBudgets(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/budgets`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportCategories(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/categories`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportPiggies(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/piggy-banks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportRecurring(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/recurring`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportRules(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportTags(xTraceId, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/tags`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
exportTransactions(start, end, xTraceId, accounts, type, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling exportTransactions.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling exportTransactions.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts !== undefined && accounts !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, accounts, 'accounts');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/octet-stream'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/v1/data/export/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: "blob",
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
purgeData(xTraceId, observe = 'body', reportProgress = false, options) {
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/data/purge`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DataService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DataService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: DataService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class InsightService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
insightExpenseAsset(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseAsset.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseAsset.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/asset`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseBill(start, end, xTraceId, bills, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseBill.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseBill.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (bills) {
bills.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'bills[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/bill`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseBudget(start, end, xTraceId, budgets, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseBudget.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (budgets) {
budgets.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'budgets[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/budget`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseCategory(start, end, xTraceId, categories, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (categories) {
categories.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'categories[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseExpense(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseExpense.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseExpense.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/expense`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseNoBill(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseNoBill.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseNoBill.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/no-bill`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseNoBudget(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseNoBudget.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseNoBudget.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/no-budget`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseNoCategory(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseNoCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseNoCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/no-category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseNoTag(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseNoTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseNoTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/no-tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseTag(start, end, xTraceId, tags, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (tags) {
tags.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'tags[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightExpenseTotal(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightExpenseTotal.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightExpenseTotal.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/expense/total`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeAsset(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeAsset.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeAsset.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/asset`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeCategory(start, end, xTraceId, categories, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (categories) {
categories.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'categories[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeNoCategory(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeNoCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeNoCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/no-category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeNoTag(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeNoTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeNoTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/no-tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeRevenue(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeRevenue.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeRevenue.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/revenue`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeTag(start, end, xTraceId, tags, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (tags) {
tags.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'tags[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightIncomeTotal(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightIncomeTotal.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightIncomeTotal.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/income/total`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransferCategory(start, end, xTraceId, categories, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransferCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransferCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (categories) {
categories.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'categories[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransferNoCategory(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransferNoCategory.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransferNoCategory.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/no-category`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransferNoTag(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransferNoTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransferNoTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/no-tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransferTag(start, end, xTraceId, tags, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransferTag.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransferTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (tags) {
tags.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'tags[]');
});
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/tag`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransferTotal(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransferTotal.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransferTotal.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/total`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
insightTransfers(start, end, xTraceId, accounts, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling insightTransfers.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling insightTransfers.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/insight/transfer/asset`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: InsightService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: InsightService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: InsightService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class LinksService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteLinkType(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteLinkType.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteTransactionLink(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteTransactionLink.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-links/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getLinkType(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getLinkType.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransactionLink(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getTransactionLink.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-links/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listLinkType(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByLinkType(id, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByLinkType.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionLink(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-links`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeLinkType(linkType, xTraceId, observe = 'body', reportProgress = false, options) {
if (linkType === null || linkType === undefined) {
throw new Error('Required parameter linkType was null or undefined when calling storeLinkType.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: linkType,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeTransactionLink(transactionLinkStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (transactionLinkStore === null || transactionLinkStore === undefined) {
throw new Error('Required parameter transactionLinkStore was null or undefined when calling storeTransactionLink.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-links`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: transactionLinkStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateLinkType(id, linkTypeUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateLinkType.');
}
if (linkTypeUpdate === null || linkTypeUpdate === undefined) {
throw new Error('Required parameter linkTypeUpdate was null or undefined when calling updateLinkType.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/link-types/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: linkTypeUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateTransactionLink(id, transactionLinkUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateTransactionLink.');
}
if (transactionLinkUpdate === null || transactionLinkUpdate === undefined) {
throw new Error('Required parameter transactionLinkUpdate was null or undefined when calling updateTransactionLink.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-links/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: transactionLinkUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: LinksService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: LinksService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: LinksService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class ObjectGroupsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteObjectGroup(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteObjectGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getObjectGroup(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getObjectGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listBillByObjectGroup(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listBillByObjectGroup.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/bills`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listObjectGroups(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listPiggyBankByObjectGroup(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listPiggyBankByObjectGroup.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/piggy-banks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateObjectGroup(id, objectGroupUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateObjectGroup.');
}
if (objectGroupUpdate === null || objectGroupUpdate === undefined) {
throw new Error('Required parameter objectGroupUpdate was null or undefined when calling updateObjectGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/object-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: objectGroupUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ObjectGroupsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ObjectGroupsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ObjectGroupsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class PiggyBanksService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deletePiggyBank(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deletePiggyBank.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getPiggyBank(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPiggyBank.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByPiggyBank(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByPiggyBank.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listEventByPiggyBank(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listEventByPiggyBank.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/events`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listPiggyBank(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storePiggyBank(piggyBankStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (piggyBankStore === null || piggyBankStore === undefined) {
throw new Error('Required parameter piggyBankStore was null or undefined when calling storePiggyBank.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: piggyBankStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updatePiggyBank(id, piggyBankUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updatePiggyBank.');
}
if (piggyBankUpdate === null || piggyBankUpdate === undefined) {
throw new Error('Required parameter piggyBankUpdate was null or undefined when calling updatePiggyBank.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/piggy-banks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: piggyBankUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PiggyBanksService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PiggyBanksService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PiggyBanksService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class PreferencesService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getPreference(name, xTraceId, observe = 'body', reportProgress = false, options) {
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling getPreference.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/preferences/${this.configuration.encodeParam({ name: "name", value: name, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listPreference(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/preferences`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storePreference(preference, xTraceId, observe = 'body', reportProgress = false, options) {
if (preference === null || preference === undefined) {
throw new Error('Required parameter preference was null or undefined when calling storePreference.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/preferences`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: preference,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updatePreference(name, preferenceUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling updatePreference.');
}
if (preferenceUpdate === null || preferenceUpdate === undefined) {
throw new Error('Required parameter preferenceUpdate was null or undefined when calling updatePreference.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/preferences/${this.configuration.encodeParam({ name: "name", value: name, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: preferenceUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PreferencesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PreferencesService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: PreferencesService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class RecurrencesService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteRecurrence(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteRecurrence.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRecurrence(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getRecurrence.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRecurrence(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByRecurrence(id, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listTransactionByRecurrence.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeRecurrence(recurrenceStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (recurrenceStore === null || recurrenceStore === undefined) {
throw new Error('Required parameter recurrenceStore was null or undefined when calling storeRecurrence.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: recurrenceStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateRecurrence(id, recurrenceUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateRecurrence.');
}
if (recurrenceUpdate === null || recurrenceUpdate === undefined) {
throw new Error('Required parameter recurrenceUpdate was null or undefined when calling updateRecurrence.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/recurrences/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: recurrenceUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RecurrencesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RecurrencesService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RecurrencesService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class RuleGroupsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteRuleGroup(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteRuleGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
fireRuleGroup(id, xTraceId, start, end, accounts, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling fireRuleGroup.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/trigger`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRuleGroup(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getRuleGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRuleByGroup(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listRuleByGroup.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRuleGroup(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeRuleGroup(ruleGroupStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (ruleGroupStore === null || ruleGroupStore === undefined) {
throw new Error('Required parameter ruleGroupStore was null or undefined when calling storeRuleGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: ruleGroupStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
testRuleGroup(id, xTraceId, limit, page, start, end, searchLimit, triggeredLimit, accounts, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling testRuleGroup.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (searchLimit !== undefined && searchLimit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchLimit, 'search_limit');
}
if (triggeredLimit !== undefined && triggeredLimit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, triggeredLimit, 'triggered_limit');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/test`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateRuleGroup(id, ruleGroupUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateRuleGroup.');
}
if (ruleGroupUpdate === null || ruleGroupUpdate === undefined) {
throw new Error('Required parameter ruleGroupUpdate was null or undefined when calling updateRuleGroup.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rule-groups/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: ruleGroupUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RuleGroupsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RuleGroupsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RuleGroupsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class RulesService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteRule(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteRule.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
fireRule(id, xTraceId, start, end, accounts, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling fireRule.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/trigger`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getRule(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getRule.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listRule(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeRule(ruleStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (ruleStore === null || ruleStore === undefined) {
throw new Error('Required parameter ruleStore was null or undefined when calling storeRule.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: ruleStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
testRule(id, xTraceId, start, end, accounts, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling testRule.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (accounts) {
accounts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'accounts[]');
});
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/test`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateRule(id, ruleUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateRule.');
}
if (ruleUpdate === null || ruleUpdate === undefined) {
throw new Error('Required parameter ruleUpdate was null or undefined when calling updateRule.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/rules/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: ruleUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RulesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RulesService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: RulesService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class SearchService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
searchAccounts(query, field, xTraceId, limit, page, type, observe = 'body', reportProgress = false, options) {
if (query === null || query === undefined) {
throw new Error('Required parameter query was null or undefined when calling searchAccounts.');
}
if (field === null || field === undefined) {
throw new Error('Required parameter field was null or undefined when calling searchAccounts.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
if (field !== undefined && field !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, field, 'field');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/search/accounts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
searchTransactions(query, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (query === null || query === undefined) {
throw new Error('Required parameter query was null or undefined when calling searchTransactions.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (query !== undefined && query !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, query, 'query');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/search/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SearchService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SearchService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SearchService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class SummaryService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
getBasicSummary(start, end, xTraceId, currencyCode, observe = 'body', reportProgress = false, options) {
if (start === null || start === undefined) {
throw new Error('Required parameter start was null or undefined when calling getBasicSummary.');
}
if (end === null || end === undefined) {
throw new Error('Required parameter end was null or undefined when calling getBasicSummary.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (currencyCode !== undefined && currencyCode !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, currencyCode, 'currency_code');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/summary/basic`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SummaryService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SummaryService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: SummaryService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class TagsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteTag(tag, xTraceId, observe = 'body', reportProgress = false, options) {
if (tag === null || tag === undefined) {
throw new Error('Required parameter tag was null or undefined when calling deleteTag.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags/${this.configuration.encodeParam({ name: "tag", value: tag, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTag(tag, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (tag === null || tag === undefined) {
throw new Error('Required parameter tag was null or undefined when calling getTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags/${this.configuration.encodeParam({ name: "tag", value: tag, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByTag(tag, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (tag === null || tag === undefined) {
throw new Error('Required parameter tag was null or undefined when calling listAttachmentByTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags/${this.configuration.encodeParam({ name: "tag", value: tag, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTag(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransactionByTag(tag, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
if (tag === null || tag === undefined) {
throw new Error('Required parameter tag was null or undefined when calling listTransactionByTag.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags/${this.configuration.encodeParam({ name: "tag", value: tag, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeTag(tagModelStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (tagModelStore === null || tagModelStore === undefined) {
throw new Error('Required parameter tagModelStore was null or undefined when calling storeTag.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: tagModelStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateTag(tag, tagModelUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (tag === null || tag === undefined) {
throw new Error('Required parameter tag was null or undefined when calling updateTag.');
}
if (tagModelUpdate === null || tagModelUpdate === undefined) {
throw new Error('Required parameter tagModelUpdate was null or undefined when calling updateTag.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/tags/${this.configuration.encodeParam({ name: "tag", value: tag, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: tagModelUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TagsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TagsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TagsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class TransactionsService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteTransaction(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteTransaction.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteTransactionJournal(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteTransactionJournal.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-journals/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransaction(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getTransaction.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getTransactionByJournal(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getTransactionByJournal.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-journals/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listAttachmentByTransaction(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listAttachmentByTransaction.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/attachments`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listEventByTransaction(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listEventByTransaction.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/piggy-bank-events`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listLinksByJournal(id, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling listLinksByJournal.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transaction-journals/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/links`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listTransaction(xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
if (start !== undefined && start !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start');
}
if (end !== undefined && end !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeTransaction(transactionStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (transactionStore === null || transactionStore === undefined) {
throw new Error('Required parameter transactionStore was null or undefined when calling storeTransaction.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: transactionStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateTransaction(id, transactionUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateTransaction.');
}
if (transactionUpdate === null || transactionUpdate === undefined) {
throw new Error('Required parameter transactionUpdate was null or undefined when calling updateTransaction.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/transactions/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: transactionUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TransactionsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TransactionsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: TransactionsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class UsersService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteUser(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteUser.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/users/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getUser(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getUser.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/users/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listUser(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/users`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeUser(user, xTraceId, observe = 'body', reportProgress = false, options) {
if (user === null || user === undefined) {
throw new Error('Required parameter user was null or undefined when calling storeUser.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json',
'application/vnd.api+json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/users`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: user,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateUser(id, user, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateUser.');
}
if (user === null || user === undefined) {
throw new Error('Required parameter user was null or undefined when calling updateUser.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/users/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: user,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: UsersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: UsersService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: UsersService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class WebhooksService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://demo.firefly-iii.org/api';
this.defaultHeaders = new HttpHeaders();
this.configuration = new HttpConfiguration();
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
addToHttpParams(httpParams, value, key) {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
}
else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
addToHttpParamsRecursive(httpParams, value, key) {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
}
else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
}
else {
throw Error("key may not be null if value is Date");
}
}
else {
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
}
}
else if (key != null) {
httpParams = httpParams.append(key, value);
}
else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
}
deleteWebhook(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteWebhook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteWebhookMessage(id, messageId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteWebhookMessage.');
}
if (messageId === null || messageId === undefined) {
throw new Error('Required parameter messageId was null or undefined when calling deleteWebhookMessage.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages/${this.configuration.encodeParam({ name: "messageId", value: messageId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
deleteWebhookMessageAttempt(id, messageId, attemptId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteWebhookMessageAttempt.');
}
if (messageId === null || messageId === undefined) {
throw new Error('Required parameter messageId was null or undefined when calling deleteWebhookMessageAttempt.');
}
if (attemptId === null || attemptId === undefined) {
throw new Error('Required parameter attemptId was null or undefined when calling deleteWebhookMessageAttempt.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages/${this.configuration.encodeParam({ name: "messageId", value: messageId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}/attempts/${this.configuration.encodeParam({ name: "attemptId", value: attemptId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`;
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getSingleWebhookMessage(id, messageId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSingleWebhookMessage.');
}
if (messageId === null || messageId === undefined) {
throw new Error('Required parameter messageId was null or undefined when calling getSingleWebhookMessage.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages/${this.configuration.encodeParam({ name: "messageId", value: messageId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getSingleWebhookMessageAttempt(id, messageId, attemptId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSingleWebhookMessageAttempt.');
}
if (messageId === null || messageId === undefined) {
throw new Error('Required parameter messageId was null or undefined when calling getSingleWebhookMessageAttempt.');
}
if (attemptId === null || attemptId === undefined) {
throw new Error('Required parameter attemptId was null or undefined when calling getSingleWebhookMessageAttempt.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages/${this.configuration.encodeParam({ name: "messageId", value: messageId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}/attempts/${this.configuration.encodeParam({ name: "attemptId", value: attemptId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getWebhook(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getWebhook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getWebhookMessageAttempts(id, messageId, xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getWebhookMessageAttempts.');
}
if (messageId === null || messageId === undefined) {
throw new Error('Required parameter messageId was null or undefined when calling getWebhookMessageAttempts.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages/${this.configuration.encodeParam({ name: "messageId", value: messageId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}/attempts`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
getWebhookMessages(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getWebhookMessages.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/messages`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
listWebhook(xTraceId, limit, page, observe = 'body', reportProgress = false, options) {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit');
}
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
storeWebhook(webhookStore, xTraceId, observe = 'body', reportProgress = false, options) {
if (webhookStore === null || webhookStore === undefined) {
throw new Error('Required parameter webhookStore was null or undefined when calling storeWebhook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: webhookStore,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
submitWebook(id, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling submitWebook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/submit`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
triggerTransactionWebhook(id, transactionId, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling triggerTransactionWebhook.');
}
if (transactionId === null || transactionId === undefined) {
throw new Error('Required parameter transactionId was null or undefined when calling triggerTransactionWebhook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/trigger-transaction/${this.configuration.encodeParam({ name: "transactionId", value: transactionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
updateWebhook(id, webhookUpdate, xTraceId, observe = 'body', reportProgress = false, options) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateWebhook.');
}
if (webhookUpdate === null || webhookUpdate === undefined) {
throw new Error('Required parameter webhookUpdate was null or undefined when calling updateWebhook.');
}
let localVarHeaders = this.defaultHeaders;
if (xTraceId !== undefined && xTraceId !== null) {
localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId));
}
let localVarCredential;
// authentication (firefly_iii_auth) required
localVarCredential = this.configuration.lookupCredential('firefly_iii_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
// authentication (local_bearer_auth) required
localVarCredential = this.configuration.lookupCredential('local_bearer_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts = [
'application/vnd.api+json',
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes = [
'application/json',
'application/x-www-form-urlencoded'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_ = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
}
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
}
else {
responseType_ = 'blob';
}
}
let localVarPath = `/v1/webhooks/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: webhookUpdate,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: WebhooksService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: HttpConfiguration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: WebhooksService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: WebhooksService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: HttpConfiguration, decorators: [{
type: Optional
}] }] });
const APIS = [AboutService, AccountsService, AttachmentsService, AutocompleteService, AvailableBudgetsService, BillsService, BudgetsService, CategoriesService, ChartsService, ConfigurationService, CurrenciesService, DataService, InsightService, LinksService, ObjectGroupsService, PiggyBanksService, PreferencesService, RecurrencesService, RuleGroupsService, RulesService, SearchService, SummaryService, TagsService, TransactionsService, UsersService, WebhooksService];
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AccountRoleProperty = {
DefaultAsset: 'defaultAsset',
SharedAsset: 'sharedAsset',
SavingAsset: 'savingAsset',
CcAsset: 'ccAsset',
CashWalletAsset: 'cashWalletAsset',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AccountSearchFieldFilter = {
All: 'all',
Iban: 'iban',
Name: 'name',
Number: 'number',
Id: 'id'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AccountTypeFilter = {
All: 'all',
Asset: 'asset',
Cash: 'cash',
Expense: 'expense',
Revenue: 'revenue',
Special: 'special',
Hidden: 'hidden',
Liability: 'liability',
Liabilities: 'liabilities',
DefaultAccount: 'Default account',
CashAccount: 'Cash account',
AssetAccount: 'Asset account',
ExpenseAccount: 'Expense account',
RevenueAccount: 'Revenue account',
InitialBalanceAccount: 'Initial balance account',
BeneficiaryAccount: 'Beneficiary account',
ImportAccount: 'Import account',
ReconciliationAccount: 'Reconciliation account',
Loan: 'Loan',
Debt: 'Debt',
Mortgage: 'Mortgage'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AccountTypeProperty = {
DefaultAccount: 'Default account',
CashAccount: 'Cash account',
AssetAccount: 'Asset account',
ExpenseAccount: 'Expense account',
RevenueAccount: 'Revenue account',
InitialBalanceAccount: 'Initial balance account',
BeneficiaryAccount: 'Beneficiary account',
ImportAccount: 'Import account',
ReconciliationAccount: 'Reconciliation account',
Loan: 'Loan',
Debt: 'Debt',
Mortgage: 'Mortgage'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AttachableType = {
Account: 'Account',
Budget: 'Budget',
Bill: 'Bill',
TransactionJournal: 'TransactionJournal',
PiggyBank: 'PiggyBank',
Tag: 'Tag'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AutoBudgetPeriod = {
Daily: 'daily',
Weekly: 'weekly',
Monthly: 'monthly',
Quarterly: 'quarterly',
HalfYear: 'half-year',
Yearly: 'yearly',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const AutoBudgetType = {
Reset: 'reset',
Rollover: 'rollover',
None: 'none',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const BillRepeatFrequency = {
Weekly: 'weekly',
Monthly: 'monthly',
Quarterly: 'quarterly',
HalfYear: 'half-year',
Yearly: 'yearly'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const ConfigValueFilter = {
ConfigurationIsDemoSite: 'configuration.is_demo_site',
ConfigurationPermissionUpdateCheck: 'configuration.permission_update_check',
ConfigurationLastUpdateCheck: 'configuration.last_update_check',
ConfigurationSingleUserMode: 'configuration.single_user_mode',
FireflyVersion: 'firefly.version',
FireflyApiVersion: 'firefly.api_version',
FireflyDefaultLocation: 'firefly.default_location',
FireflyAccountToTransaction: 'firefly.account_to_transaction',
FireflyAllowedOpposingTypes: 'firefly.allowed_opposing_types',
FireflyAccountRoles: 'firefly.accountRoles',
FireflyValidLiabilities: 'firefly.valid_liabilities',
FireflyInterestPeriods: 'firefly.interest_periods',
FireflyEnableExternalMap: 'firefly.enable_external_map',
FireflyExpectedSourceTypes: 'firefly.expected_source_types',
AppTimezone: 'app.timezone',
FireflyBillPeriods: 'firefly.bill_periods',
FireflyCreditCardTypes: 'firefly.credit_card_types',
FireflyLanguages: 'firefly.languages',
FireflyValidViewRanges: 'firefly.valid_view_ranges'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const ConfigValueUpdateFilter = {
IsDemoSite: 'configuration.is_demo_site',
PermissionUpdateCheck: 'configuration.permission_update_check',
LastUpdateCheck: 'configuration.last_update_check',
SingleUserMode: 'configuration.single_user_mode'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const CreditCardTypeProperty = {
MonthlyFull: 'monthlyFull',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const DataDestroyObject = {
NotAssetsLiabilities: 'not_assets_liabilities',
Budgets: 'budgets',
Bills: 'bills',
PiggyBanks: 'piggy_banks',
Rules: 'rules',
Recurring: 'recurring',
Categories: 'categories',
Tags: 'tags',
ObjectGroups: 'object_groups',
Accounts: 'accounts',
AssetAccounts: 'asset_accounts',
ExpenseAccounts: 'expense_accounts',
RevenueAccounts: 'revenue_accounts',
Liabilities: 'liabilities',
Transactions: 'transactions',
Withdrawals: 'withdrawals',
Deposits: 'deposits',
Transfers: 'transfers'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const ExportFileFilter = {
Csv: 'csv'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const InterestPeriodProperty = {
Weekly: 'weekly',
Monthly: 'monthly',
Quarterly: 'quarterly',
HalfYear: 'half-year',
Yearly: 'yearly',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const LiabilityDirectionProperty = {
Credit: 'credit',
Debit: 'debit',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const LiabilityTypeProperty = {
Loan: 'loan',
Debt: 'debt',
Mortgage: 'mortgage',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const RecurrenceRepetitionType = {
Daily: 'daily',
Weekly: 'weekly',
Ndom: 'ndom',
Monthly: 'monthly',
Yearly: 'yearly'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const RecurrenceTransactionType = {
Withdrawal: 'withdrawal',
Transfer: 'transfer',
Deposit: 'deposit'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const RuleActionKeyword = {
UserAction: 'user_action',
SetCategory: 'set_category',
ClearCategory: 'clear_category',
SetBudget: 'set_budget',
ClearBudget: 'clear_budget',
AddTag: 'add_tag',
RemoveTag: 'remove_tag',
RemoveAllTags: 'remove_all_tags',
SetDescription: 'set_description',
AppendDescription: 'append_description',
PrependDescription: 'prepend_description',
SetSourceAccount: 'set_source_account',
SetDestinationAccount: 'set_destination_account',
SetNotes: 'set_notes',
AppendNotes: 'append_notes',
PrependNotes: 'prepend_notes',
ClearNotes: 'clear_notes',
LinkToBill: 'link_to_bill',
ConvertWithdrawal: 'convert_withdrawal',
ConvertDeposit: 'convert_deposit',
ConvertTransfer: 'convert_transfer',
DeleteTransaction: 'delete_transaction'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const RuleTriggerKeyword = {
FromAccountStarts: 'from_account_starts',
FromAccountEnds: 'from_account_ends',
FromAccountIs: 'from_account_is',
FromAccountContains: 'from_account_contains',
ToAccountStarts: 'to_account_starts',
ToAccountEnds: 'to_account_ends',
ToAccountIs: 'to_account_is',
ToAccountContains: 'to_account_contains',
AmountLess: 'amount_less',
AmountExactly: 'amount_exactly',
AmountMore: 'amount_more',
DescriptionStarts: 'description_starts',
DescriptionEnds: 'description_ends',
DescriptionContains: 'description_contains',
DescriptionIs: 'description_is',
TransactionType: 'transaction_type',
CategoryIs: 'category_is',
BudgetIs: 'budget_is',
TagIs: 'tag_is',
CurrencyIs: 'currency_is',
HasAttachments: 'has_attachments',
HasNoCategory: 'has_no_category',
HasAnyCategory: 'has_any_category',
HasNoBudget: 'has_no_budget',
HasAnyBudget: 'has_any_budget',
HasNoTag: 'has_no_tag',
HasAnyTag: 'has_any_tag',
NotesContains: 'notes_contains',
NotesStart: 'notes_start',
NotesEnd: 'notes_end',
NotesAre: 'notes_are',
NoNotes: 'no_notes',
AnyNotes: 'any_notes',
SourceAccountIs: 'source_account_is',
DestinationAccountIs: 'destination_account_is',
SourceAccountStarts: 'source_account_starts'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const RuleTriggerType = {
StoreJournal: 'store-journal',
UpdateJournal: 'update-journal'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const ShortAccountTypeProperty = {
Asset: 'asset',
Expense: 'expense',
Import: 'import',
Revenue: 'revenue',
Cash: 'cash',
Liability: 'liability',
Liabilities: 'liabilities',
InitialBalance: 'initial-balance',
Reconciliation: 'reconciliation'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const TransactionTypeFilter = {
All: 'all',
Withdrawal: 'withdrawal',
Withdrawals: 'withdrawals',
Expense: 'expense',
Deposit: 'deposit',
Deposits: 'deposits',
Income: 'income',
Transfer: 'transfer',
Transfers: 'transfers',
OpeningBalance: 'opening_balance',
Reconciliation: 'reconciliation',
Special: 'special',
Specials: 'specials',
Default: 'default'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const TransactionTypeProperty = {
Withdrawal: 'withdrawal',
Deposit: 'deposit',
Transfer: 'transfer',
Reconciliation: 'reconciliation',
OpeningBalance: 'opening balance'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const UserBlockedCodeProperty = {
EmailChanged: 'email_changed',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const UserRoleProperty = {
Owner: 'owner',
Demo: 'demo',
Null: 'null'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const WebhookDelivery = {
Json: 'JSON'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const WebhookResponse = {
Transactions: 'TRANSACTIONS',
Accounts: 'ACCOUNTS',
None: 'NONE'
};
/**
* Firefly III API v2.1.0
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
*
* The version of the OpenAPI document: 2.1.0
* Contact: james@firefly-iii.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
const WebhookTrigger = {
StoreTransaction: 'STORE_TRANSACTION',
UpdateTransaction: 'UPDATE_TRANSACTION',
DestroyTransaction: 'DESTROY_TRANSACTION'
};
class ApiModule {
static forRoot(configurationFactory) {
return {
ngModule: ApiModule,
providers: [{ provide: HttpConfiguration, useFactory: configurationFactory }]
};
}
constructor(parentModule, http) {
if (parentModule) {
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
}
if (!http) {
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
'See also https://github.com/angular/angular/issues/20575');
}
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: ApiModule }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ApiModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ApiModule, decorators: [{
type: NgModule,
args: [{
imports: [],
declarations: [],
exports: [],
providers: []
}]
}], ctorParameters: () => [{ type: ApiModule, decorators: [{
type: Optional
}, {
type: SkipSelf
}] }, { type: i1.HttpClient, decorators: [{
type: Optional
}] }] });
/**
* Generated bundle index. Do not edit.
*/
export { APIS, AboutService, AccountRoleProperty, AccountSearchFieldFilter, AccountTypeFilter, AccountTypeProperty, AccountsService, ApiModule, AttachableType, AttachmentsService, AutoBudgetPeriod, AutoBudgetType, AutocompleteService, AvailableBudgetsService, BASE_PATH, BillRepeatFrequency, BillsService, BudgetsService, COLLECTION_FORMATS, CategoriesService, ChartsService, ConfigValueFilter, ConfigValueUpdateFilter, ConfigurationService, CreditCardTypeProperty, CurrenciesService, DataDestroyObject, DataService, ExportFileFilter, HttpConfiguration, InsightService, InterestPeriodProperty, LiabilityDirectionProperty, LiabilityTypeProperty, LinksService, ObjectGroupsService, PiggyBanksService, PreferencesService, RecurrenceRepetitionType, RecurrenceTransactionType, RecurrencesService, RuleActionKeyword, RuleGroupsService, RuleTriggerKeyword, RuleTriggerType, RulesService, SearchService, ShortAccountTypeProperty, SummaryService, TagsService, TransactionTypeFilter, TransactionTypeProperty, TransactionsService, UserBlockedCodeProperty, UserRoleProperty, UsersService, WebhookDelivery, WebhookResponse, WebhookTrigger, WebhooksService };
//# sourceMappingURL=nikhil-patil-ngx-firefly-iii-api-client.mjs.map