@nikhil-patil/ngx-firefly-iii-api-client
Version:
OpenAPI client for ngx-firefly-iii-api-client
336 lines (335 loc) • 21.1 kB
TypeScript
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { WebhookArray } from '../model/webhookArray';
import { WebhookAttemptArray } from '../model/webhookAttemptArray';
import { WebhookAttemptSingle } from '../model/webhookAttemptSingle';
import { WebhookMessageArray } from '../model/webhookMessageArray';
import { WebhookMessageSingle } from '../model/webhookMessageSingle';
import { WebhookSingle } from '../model/webhookSingle';
import { WebhookStore } from '../model/webhookStore';
import { WebhookUpdate } from '../model/webhookUpdate';
import { HttpConfiguration } from '../configuration';
import * as i0 from "@angular/core";
export declare class WebhooksService {
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 webhook.
* Delete a webhook.
* @param id The webhook ID.
* @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.
*/
deleteWebhook(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteWebhook(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteWebhook(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Delete a webhook message.
* Delete a webhook message. Any time a webhook is triggered the message is stored before it\'s sent. You can delete them before or after sending.
* @param id The webhook ID.
* @param messageId The webhook message ID.
* @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.
*/
deleteWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Delete a webhook attempt.
* Delete a webhook message attempt. If you delete all attempts for a webhook message, Firefly III will (once again) assume all is well with the webhook message and will try to send it again.
* @param id The webhook ID.
* @param messageId The webhook message ID.
* @param attemptId The webhook message attempt ID.
* @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.
*/
deleteWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
deleteWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
deleteWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Get a single message from a webhook.
* When a webhook is triggered it will store the actual content of the webhook in a webhook message. You can view and analyse a single one using this endpoint.
* @param id The webhook ID.
* @param messageId The webhook message ID.
* @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.
*/
getSingleWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookMessageSingle>;
getSingleWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookMessageSingle>>;
getSingleWebhookMessage(id: string, messageId: number, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookMessageSingle>>;
/**
* Get a single failed attempt from a single webhook message.
* When a webhook message fails to send it will store the failure in an \"attempt\". You can view and analyse these. Webhooks messages that receive too many attempts (failures) will not be fired. You must first clear out old attempts and try again. This endpoint shows you the details of a single attempt. The ID of the attempt must match the corresponding webhook and webhook message.
* @param id The webhook ID.
* @param messageId The webhook message ID.
* @param attemptId The webhook attempt ID.
* @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.
*/
getSingleWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookAttemptSingle>;
getSingleWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookAttemptSingle>>;
getSingleWebhookMessageAttempt(id: string, messageId: number, attemptId: number, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookAttemptSingle>>;
/**
* Get a single webhook.
* Gets all info of a single webhook.
* @param id The webhook ID.
* @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.
*/
getWebhook(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookSingle>;
getWebhook(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookSingle>>;
getWebhook(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookSingle>>;
/**
* Get all the failed attempts of a single webhook message.
* When a webhook message fails to send it will store the failure in an \"attempt\". You can view and analyse these. Webhook messages that receive too many attempts (failures) will not be sent again. You must first clear out old attempts before the message can go out again.
* @param id The webhook ID.
* @param messageId The webhook message ID.
* @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.
*/
getWebhookMessageAttempts(id: string, messageId: number, xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookAttemptArray>;
getWebhookMessageAttempts(id: string, messageId: number, xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookAttemptArray>>;
getWebhookMessageAttempts(id: string, messageId: number, xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookAttemptArray>>;
/**
* Get all the messages of a single webhook.
* When a webhook is triggered the actual message that will be send is stored in a \"message\". You can view and analyse these messages.
* @param id The webhook ID.
* @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.
*/
getWebhookMessages(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookMessageArray>;
getWebhookMessages(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookMessageArray>>;
getWebhookMessages(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookMessageArray>>;
/**
* List all webhooks.
* List all the user\'s webhooks.
* @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.
*/
listWebhook(xTraceId?: string, limit?: number, page?: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookArray>;
listWebhook(xTraceId?: string, limit?: number, page?: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookArray>>;
listWebhook(xTraceId?: string, limit?: number, page?: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookArray>>;
/**
* Store a new webhook
* Creates a new webhook. The data required can be submitted as a JSON body or as a list of parameters. The webhook will be given a random secret.
* @param webhookStore JSON array or key=value pairs with the necessary webhook 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.
*/
storeWebhook(webhookStore: WebhookStore, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookSingle>;
storeWebhook(webhookStore: WebhookStore, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookSingle>>;
storeWebhook(webhookStore: WebhookStore, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookSingle>>;
/**
* Submit messages for a webhook.
* This endpoint will submit any open messages for this webhook. This is an asynchronous operation, so you can\'t see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
* @param id The webhook ID.
* @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.
*/
submitWebook(id: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
submitWebook(id: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
submitWebook(id: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Trigger webhook for a given transaction.
* This endpoint will execute this webhook for a given transaction ID. This is an asynchronous operation, so you can\'t see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
* @param id The webhook ID.
* @param transactionId The transaction ID.
* @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.
*/
triggerTransactionWebhook(id: string, transactionId: string, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
triggerTransactionWebhook(id: string, transactionId: string, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
triggerTransactionWebhook(id: string, transactionId: string, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined;
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* Update existing webhook.
* Update an existing webhook\'s information. If you wish to reset the secret, submit any value as the \"secret\". Firefly III will take this as a hint and reset the secret of the webhook.
* @param id The webhook ID.
* @param webhookUpdate JSON array with updated webhook 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.
*/
updateWebhook(id: string, webhookUpdate: WebhookUpdate, xTraceId?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<WebhookSingle>;
updateWebhook(id: string, webhookUpdate: WebhookUpdate, xTraceId?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<WebhookSingle>>;
updateWebhook(id: string, webhookUpdate: WebhookUpdate, xTraceId?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/vnd.api+json' | 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<WebhookSingle>>;
static ɵfac: i0.ɵɵFactoryDeclaration<WebhooksService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<WebhooksService>;
}