@nikhil-patil/ngx-firefly-iii-api-client
Version:
OpenAPI client for ngx-firefly-iii-api-client
289 lines (288 loc) • 18.2 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { LinkType } from '../model/linkType';
import { LinkTypeArray } from '../model/linkTypeArray';
import { LinkTypeSingle } from '../model/linkTypeSingle';
import { LinkTypeUpdate } from '../model/linkTypeUpdate';
import { TransactionArray } from '../model/transactionArray';
import { TransactionLinkArray } from '../model/transactionLinkArray';
import { TransactionLinkSingle } from '../model/transactionLinkSingle';
import { TransactionLinkStore } from '../model/transactionLinkStore';
import { TransactionLinkUpdate } from '../model/transactionLinkUpdate';
import { TransactionTypeFilter } from '../model/transactionTypeFilter';
import { HttpConfiguration } from '../configuration';
import * as i0 from "@angular/core";
export declare class LinksService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: HttpConfiguration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: HttpConfiguration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Permanently delete link type.
* Will permanently delete a link type. The links between transactions will be removed. The transactions themselves remain. You cannot delete some of the system provided link types, indicated by the editable=false flag when you list it.
* @param id The ID of the link type.
* @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.
*/
deleteLinkType(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteLinkType(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteLinkType(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Permanently delete link between transactions.
* Will permanently delete link. Transactions remain.
* @param id The ID of the transaction link.
* @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.
*/
deleteTransactionLink(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteTransactionLink(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteTransactionLink(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Get single a link type.
* Returns a single link type by its ID.
* @param id The ID of the link type.
* @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.
*/
getLinkType(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<LinkTypeSingle>;
getLinkType(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<LinkTypeSingle>>;
getLinkType(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<LinkTypeSingle>>;
/**
* Get a single link.
* Returns a single link by its ID.
* @param id The ID of the transaction link.
* @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.
*/
getTransactionLink(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionLinkSingle>;
getTransactionLink(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionLinkSingle>>;
getTransactionLink(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionLinkSingle>>;
/**
* List all types of links.
* List all the link types the system has. These include the default ones as well as any new ones.
* @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.
*/
listLinkType(xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<LinkTypeArray>;
listLinkType(xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<LinkTypeArray>>;
listLinkType(xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<LinkTypeArray>>;
/**
* List all transactions under this link type.
* List all transactions under this link type, both the inward and outward transactions.
* @param id The ID of the link type.
* @param xTraceId Unique identifier associated with this request.
* @param limit Number of items per page. The default pagination is per 50 items.
* @param page Page number. The default pagination is per 50 items.
* @param start A date formatted YYYY-MM-DD, to limit the results.
* @param end A date formatted YYYY-MM-DD, to limit the results.
* @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.
*/
listTransactionByLinkType(id: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionArray>;
listTransactionByLinkType(id: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionArray>>;
listTransactionByLinkType(id: string, xTraceId?: string, limit?: number, page?: number, start?: string, end?: string, type?: TransactionTypeFilter, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionArray>>;
/**
* List all transaction links.
* List all the transaction links.
* @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.
*/
listTransactionLink(xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionLinkArray>;
listTransactionLink(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>>;
listTransactionLink(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>>;
/**
* Create a new link type
* Creates a new link type. The data required can be submitted as a JSON body or as a list of parameters (in key=value pairs, like a webform).
* @param linkType JSON array with the necessary link type information or key=value pairs. 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.
*/
storeLinkType(linkType: LinkType, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<LinkTypeSingle>;
storeLinkType(linkType: LinkType, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<LinkTypeSingle>>;
storeLinkType(linkType: LinkType, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<LinkTypeSingle>>;
/**
* Create a new link between transactions
* Store a new link between two transactions. For this end point you need the journal_id from a transaction.
* @param transactionLinkStore JSON array with the necessary link type information or key=value pairs. 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.
*/
storeTransactionLink(transactionLinkStore: TransactionLinkStore, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionLinkSingle>;
storeTransactionLink(transactionLinkStore: TransactionLinkStore, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionLinkSingle>>;
storeTransactionLink(transactionLinkStore: TransactionLinkStore, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionLinkSingle>>;
/**
* Update existing link type.
* Used to update a single link type. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory. You cannot update some of the system provided link types, indicated by the editable=false flag when you list it.
* @param id The ID of the link type.
* @param linkTypeUpdate JSON array or formdata with updated link type 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.
*/
updateLinkType(id: string, linkTypeUpdate: LinkTypeUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<LinkTypeSingle>;
updateLinkType(id: string, linkTypeUpdate: LinkTypeUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<LinkTypeSingle>>;
updateLinkType(id: string, linkTypeUpdate: LinkTypeUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<LinkTypeSingle>>;
/**
* Update an existing link between transactions.
* Used to update a single existing link.
* @param id The ID of the transaction link.
* @param transactionLinkUpdate JSON array or formdata with updated link type 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.
*/
updateTransactionLink(id: string, transactionLinkUpdate: TransactionLinkUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<TransactionLinkSingle>;
updateTransactionLink(id: string, transactionLinkUpdate: TransactionLinkUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<TransactionLinkSingle>>;
updateTransactionLink(id: string, transactionLinkUpdate: TransactionLinkUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<TransactionLinkSingle>>;
static ɵfac: i0.ɵɵFactoryDeclaration<LinksService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<LinksService>;
}