UNPKG

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

Version:
954 lines 195 kB
/** * 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 */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; // @ts-ignore import { BASE_PATH } from '../variables'; import { HttpConfiguration } from '../configuration'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common/http"; import * as i2 from "../configuration"; export 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: i2.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: i2.HttpConfiguration, decorators: [{ type: Optional }] }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViaG9va3Muc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvbmd4LWZpcmVmbHktaWlpLWFwaS1jbGllbnQvc3JjL2FwaS93ZWJob29rcy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7O0dBVUc7QUFDSCx1REFBdUQ7QUFFdkQsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQTJCLGVBQWUsQ0FBQztBQUNsRixPQUFPLEVBQUUsVUFBVSxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQ1UsV0FBVyxFQUN4RCxNQUFZLHNCQUFzQixDQUFDO0FBQzVDLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUErQixZQUFZLENBQUM7QUE4Qi9FLGFBQWE7QUFDYixPQUFPLEVBQUUsU0FBUyxFQUFzQixNQUEwQixjQUFjLENBQUM7QUFDakYsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQTBDLGtCQUFrQixDQUFDOzs7O0FBT3pGLE1BQU0sT0FBTyxlQUFlO0lBT3hCLFlBQXNCLFVBQXNCLEVBQWdDLFFBQXlCLEVBQWMsYUFBZ0M7UUFBN0gsZUFBVSxHQUFWLFVBQVUsQ0FBWTtRQUxsQyxhQUFRLEdBQUcsa0NBQWtDLENBQUM7UUFDakQsbUJBQWMsR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDO1FBQ25DLGtCQUFhLEdBQUcsSUFBSSxpQkFBaUIsRUFBRSxDQUFDO1FBSTNDLElBQUksYUFBYSxFQUFFLENBQUM7WUFDaEIsSUFBSSxDQUFDLGFBQWEsR0FBRyxhQUFhLENBQUM7UUFDdkMsQ0FBQztRQUNELElBQUksT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDLFFBQVEsS0FBSyxRQUF