@nikhil-patil/ngx-firefly-iii-api-client
Version:
OpenAPI client for ngx-firefly-iii-api-client
266 lines (265 loc) • 16.6 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { AttachmentArray } from '../model/attachmentArray';
import { PiggyBankEventArray } from '../model/piggyBankEventArray';
import { TransactionArray } from '../model/transactionArray';
import { TransactionLinkArray } from '../model/transactionLinkArray';
import { TransactionSingle } from '../model/transactionSingle';
import { TransactionStore } from '../model/transactionStore';
import { TransactionTypeFilter } from '../model/transactionTypeFilter';
import { TransactionUpdate } from '../model/transactionUpdate';
import { HttpConfiguration } from '../configuration';
import * as i0 from "@angular/core";
export declare class TransactionsService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: HttpConfiguration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: HttpConfiguration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Delete a transaction.
* Delete a transaction.
* @param id The ID of the transaction.
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
deleteTransaction(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteTransaction(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteTransaction(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Delete split from transaction
* Delete an individual journal (split) from a transaction.
* @param id The ID of the transaction journal (the split) you wish to delete.
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
deleteTransactionJournal(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteTransactionJournal(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteTransactionJournal(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Get a single transaction.
* Get a single transaction.
* @param id The ID of the transaction.
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
getTransaction(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionSingle>;
getTransaction(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionSingle>>;
getTransaction(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionSingle>>;
/**
* Get a single transaction, based on one of the underlying transaction journals (transaction splits).
* Get a single transaction by underlying journal (split).
* @param id The ID of the transaction journal (split).
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
getTransactionByJournal(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionSingle>;
getTransactionByJournal(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionSingle>>;
getTransactionByJournal(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionSingle>>;
/**
* Lists all attachments.
* Lists all attachments.
* @param id The ID of the transaction.
* @param xTraceId Unique identifier associated with this request.
* @param limit Number of items per page. The default pagination is per 50 items.
* @param page Page number. The default pagination is per 50 items.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listAttachmentByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<AttachmentArray>;
listAttachmentByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<AttachmentArray>>;
listAttachmentByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<AttachmentArray>>;
/**
* Lists all piggy bank events.
* Lists all piggy bank events.
* @param id The ID of the transaction.
* @param xTraceId Unique identifier associated with this request.
* @param limit Number of items per page. The default pagination is per 50 items.
* @param page Page number. The default pagination is per 50 items.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listEventByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<PiggyBankEventArray>;
listEventByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<PiggyBankEventArray>>;
listEventByTransaction(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<PiggyBankEventArray>>;
/**
* Lists all the transaction links for an individual journal (individual split).
* Lists all the transaction links for an individual journal (a split). Don\'t use the group ID, you need the actual underlying journal (the split).
* @param id The ID of the transaction journal / the split.
* @param xTraceId Unique identifier associated with this request.
* @param limit Number of items per page. The default pagination is per 50 items.
* @param page Page number. The default pagination is per 50 items.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listLinksByJournal(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionLinkArray>;
listLinksByJournal(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionLinkArray>>;
listLinksByJournal(id: string, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionLinkArray>>;
/**
* List all the user\'s transactions.
* List all the user\'s transactions.
* @param xTraceId Unique identifier associated with this request.
* @param limit Number of items per page. The default pagination is per 50 items.
* @param page Page number. The default pagination is per 50 items.
* @param start A date formatted YYYY-MM-DD. This is the start date of the selected range (inclusive).
* @param end A date formatted YYYY-MM-DD. This is the end date of the selected range (inclusive).
* @param type Optional filter on the transaction type(s) returned.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
listTransaction(xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionArray>;
listTransaction(xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionArray>>;
listTransaction(xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionArray>>;
/**
* Store a new transaction
* Creates a new transaction. The data required can be submitted as a JSON body or as a list of parameters.
* @param transactionStore JSON array or key=value pairs with the necessary transaction information. See the model for the exact specifications.
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
storeTransaction(transactionStore: TransactionStore, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionSingle>;
storeTransaction(transactionStore: TransactionStore, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionSingle>>;
storeTransaction(transactionStore: TransactionStore, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionSingle>>;
/**
* Update existing transaction. For more information, see https://docs.firefly-iii.org/references/firefly-iii/api/specials/
* Update an existing transaction.
* @param id The ID of the transaction.
* @param transactionUpdate JSON array with updated transaction information. See the model for the exact specifications.
* @param xTraceId Unique identifier associated with this request.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
updateTransaction(id: string, transactionUpdate: TransactionUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionSingle>;
updateTransaction(id: string, transactionUpdate: TransactionUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionSingle>>;
updateTransaction(id: string, transactionUpdate: TransactionUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionSingle>>;
static ɵfac: i0.ɵɵFactoryDeclaration<TransactionsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<TransactionsService>;
}