@nestjs-mod/webhook-afat
Version:
Webhook UI components and tools for AFAT (Angular, Formly, Antd, Transloco) and rest-sdk for work with backend of this module from Angular appliaction
1 lines • 189 kB
Source Map (JSON)
{"version":3,"file":"nestjs-mod-webhook-afat.mjs","sources":["../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/variables.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/configuration.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/encoder.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/api.base.service.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/api/webhook-rest.service.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/api/api.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/create-webhook-dto.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/find-many-response-meta.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/status-response.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/update-webhook-dto.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-error-enum.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-event.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-log-scalar-field-enum.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-role.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-scalar-field-enum.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-status.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/model/webhook-user-scalar-field-enum.interface.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/rest-sdk/api.module.ts","../../../../../libs/feature/webhook-afat/src/lib/generated/webhook-rest_sdk-angular.module.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-events.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-form.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-mapper.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-log-mapper.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook.service.ts","../../../../../libs/feature/webhook-afat/src/lib/forms/webhook-form/webhook-form.component.ts","../../../../../libs/feature/webhook-afat/src/lib/forms/webhook-form/webhook-form.component.html","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-log-form.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-log.service.ts","../../../../../libs/feature/webhook-afat/src/lib/forms/webhook-log-form/webhook-log-form.component.ts","../../../../../libs/feature/webhook-afat/src/lib/forms/webhook-log-form/webhook-log-form.component.html","../../../../../libs/feature/webhook-afat/src/lib/grids/webhook-grid/webhook-grid.component.ts","../../../../../libs/feature/webhook-afat/src/lib/grids/webhook-grid/webhook-grid.component.html","../../../../../libs/feature/webhook-afat/src/lib/grids/webhook-log-grid/webhook-log-grid.component.ts","../../../../../libs/feature/webhook-afat/src/lib/grids/webhook-log-grid/webhook-log-grid.component.html","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-auth.service.ts","../../../../../libs/feature/webhook-afat/src/lib/services/webhook-guard.service.ts","../../../../../libs/feature/webhook-afat/src/nestjs-mod-webhook-afat.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';\nimport { Param } from './param';\n\nexport interface WebhookRestClientConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n /**\n * Takes care of encoding query- and form-parameters.\n */\n encoder?: HttpParameterCodec;\n /**\n * Override the default method for encoding path parameters in various\n * <a href=\"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\">styles</a>.\n * <p>\n * See {@link README.md} for more details\n * </p>\n */\n encodeParam?: (param: Param) => string;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class WebhookRestClientConfiguration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n /**\n * Takes care of encoding query- and form-parameters.\n */\n encoder?: HttpParameterCodec;\n /**\n * Encoding of various path parameter\n * <a href=\"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\">styles</a>.\n * <p>\n * See {@link README.md} for more details\n * </p>\n */\n encodeParam: (param: Param) => string;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\nconstructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: WebhookRestClientConfigurationParameters = {}) {\n if (apiKeys) {\n this.apiKeys = apiKeys;\n }\n if (username !== undefined) {\n this.username = username;\n }\n if (password !== undefined) {\n this.password = password;\n }\n if (accessToken !== undefined) {\n this.accessToken = accessToken;\n }\n if (basePath !== undefined) {\n this.basePath = basePath;\n }\n if (withCredentials !== undefined) {\n this.withCredentials = withCredentials;\n }\n if (encoder) {\n this.encoder = encoder;\n }\n this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));\n this.credentials = credentials ?? {};\n\n // init default bearer credential\n if (!this.credentials['bearer']) {\n this.credentials['bearer'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link WebhookRestClientConfiguration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link WebhookRestClientConfiguration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n\n public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders {\n const value = this.lookupCredential(credentialKey);\n return value\n ? headers.set(headerName, (prefix ?? '') + value)\n : headers;\n }\n\n public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams {\n const value = this.lookupCredential(credentialKey);\n return value\n ? query.set(paramName, value)\n : query;\n }\n\n private defaultEncodeParam(param: Param): string {\n // This implementation exists as fallback for missing configuration\n // and for backwards compatibility to older typescript-angular generator versions.\n // It only works for the 'simple' parameter style.\n // Date-handling only works for the 'date-time' format.\n // All other styles and Date-formats are probably handled incorrectly.\n //\n // But: if that's all you need (i.e.: the most common use-case): no need for customization!\n\n const value = param.dataFormat === 'date-time' && param.value instanceof Date\n ? (param.value as Date).toISOString()\n : param.value;\n\n return encodeURIComponent(String(value));\n }\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","/**\n * \n *\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from './encoder';\nimport { WebhookRestClientConfiguration } from './configuration';\n\nexport class BaseService {\n protected basePath = 'http://localhost';\n public defaultHeaders = new HttpHeaders();\n public configuration: WebhookRestClientConfiguration;\n public encoder: HttpParameterCodec;\n\n constructor(basePath?: string|string[], configuration?: WebhookRestClientConfiguration) {\n this.configuration = configuration || new WebhookRestClientConfiguration();\n if (typeof this.configuration.basePath !== 'string') {\n const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;\n if (firstBasePath != undefined) {\n basePath = firstBasePath;\n }\n\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n protected canConsumeForm(consumes: string[]): boolean {\n return consumes.indexOf('multipart/form-data') !== -1;\n }\n\n protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n // If the value is an object (but not a Date), recursively add its keys.\n if (typeof value === 'object' && !(value instanceof Date)) {\n return this.addToHttpParamsRecursive(httpParams, value);\n }\n return this.addToHttpParamsRecursive(httpParams, value, key);\n }\n\n protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value === null || value === undefined) {\n return httpParams;\n }\n if (typeof value === 'object') {\n // If JSON format is preferred, key must be provided.\n if (key != null) {\n return httpParams.append(key, JSON.stringify(value));\n }\n // Otherwise, if it's an array, add each element.\n if (Array.isArray(value)) {\n value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, value.toISOString());\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach(k => {\n const paramKey = key ? `${key}.${k}` : k;\n httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);\n });\n }\n return httpParams;\n } else if (key != null) {\n return httpParams.append(key, value);\n }\n throw Error(\"key may not be null if value is not object or array\");\n }\n}\n","/**\n * \n *\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { CreateWebhookDtoInterface } from '../model/create-webhook-dto.interface';\n// @ts-ignore\nimport { FindManyWebhookLogResponseInterface } from '../model/find-many-webhook-log-response.interface';\n// @ts-ignore\nimport { FindManyWebhookResponseInterface } from '../model/find-many-webhook-response.interface';\n// @ts-ignore\nimport { StatusResponseInterface } from '../model/status-response.interface';\n// @ts-ignore\nimport { UpdateWebhookDtoInterface } from '../model/update-webhook-dto.interface';\n// @ts-ignore\nimport { WebhookEventInterface } from '../model/webhook-event.interface';\n// @ts-ignore\nimport { WebhookInterface } from '../model/webhook.interface';\n// @ts-ignore\nimport { WebhookLogInterface } from '../model/webhook-log.interface';\n// @ts-ignore\nimport { WebhookLogsControllerFindManyLogs400ResponseInterface } from '../model/webhook-logs-controller-find-many-logs400-response.interface';\n// @ts-ignore\nimport { WebhookTestRequestResponseInterface } from '../model/webhook-test-request-response.interface';\n// @ts-ignore\nimport { WebhookUserInterface } from '../model/webhook-user.interface';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { WebhookRestClientConfiguration } from '../configuration';\nimport { BaseService } from '../api.base.service';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WebhookRestService extends BaseService {\n\n constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: WebhookRestClientConfiguration) {\n super(basePath, configuration);\n }\n\n /**\n * @param createWebhookDtoInterface \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerCreateOne(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WebhookInterface>;\n public webhookControllerCreateOne(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WebhookInterface>>;\n public webhookControllerCreateOne(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WebhookInterface>>;\n public webhookControllerCreateOne(createWebhookDtoInterface: CreateWebhookDtoInterface, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (createWebhookDtoInterface === null || createWebhookDtoInterface === undefined) {\n throw new Error('Required parameter createWebhookDtoInterface was null or undefined when calling webhookControllerCreateOne.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<WebhookInterface>('post', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: createWebhookDtoInterface,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param id \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerDeleteOne(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<StatusResponseInterface>;\n public webhookControllerDeleteOne(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<StatusResponseInterface>>;\n public webhookControllerDeleteOne(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<StatusResponseInterface>>;\n public webhookControllerDeleteOne(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (id === null || id === undefined) {\n throw new Error('Required parameter id was null or undefined when calling webhookControllerDeleteOne.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/${this.configuration.encodeParam({name: \"id\", value: id, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: undefined})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<StatusResponseInterface>('delete', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerEvents(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<WebhookEventInterface>>;\n public webhookControllerEvents(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<WebhookEventInterface>>>;\n public webhookControllerEvents(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<WebhookEventInterface>>>;\n public webhookControllerEvents(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/events`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<Array<WebhookEventInterface>>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param curPage \n * @param perPage \n * @param searchText \n * @param sort \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<FindManyWebhookResponseInterface>;\n public webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<FindManyWebhookResponseInterface>>;\n public webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<FindManyWebhookResponseInterface>>;\n public webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>curPage, 'curPage');\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'perPage');\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>searchText, 'searchText');\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>sort, 'sort');\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<FindManyWebhookResponseInterface>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param id \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerFindOne(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WebhookInterface>;\n public webhookControllerFindOne(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WebhookInterface>>;\n public webhookControllerFindOne(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WebhookInterface>>;\n public webhookControllerFindOne(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (id === null || id === undefined) {\n throw new Error('Required parameter id was null or undefined when calling webhookControllerFindOne.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/${this.configuration.encodeParam({name: \"id\", value: id, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: undefined})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<WebhookInterface>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerProfile(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WebhookUserInterface>;\n public webhookControllerProfile(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WebhookUserInterface>>;\n public webhookControllerProfile(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WebhookUserInterface>>;\n public webhookControllerProfile(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/profile`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<WebhookUserInterface>('get', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param createWebhookDtoInterface \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerTestRequest(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WebhookTestRequestResponseInterface>;\n public webhookControllerTestRequest(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WebhookTestRequestResponseInterface>>;\n public webhookControllerTestRequest(createWebhookDtoInterface: CreateWebhookDtoInterface, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WebhookTestRequestResponseInterface>>;\n public webhookControllerTestRequest(createWebhookDtoInterface: CreateWebhookDtoInterface, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (createWebhookDtoInterface === null || createWebhookDtoInterface === undefined) {\n throw new Error('Required parameter createWebhookDtoInterface was null or undefined when calling webhookControllerTestRequest.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/test-request`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<WebhookTestRequestResponseInterface>('post', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: createWebhookDtoInterface,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param id \n * @param updateWebhookDtoInterface \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookControllerUpdateOne(id: string, updateWebhookDtoInterface: UpdateWebhookDtoInterface, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WebhookInterface>;\n public webhookControllerUpdateOne(id: string, updateWebhookDtoInterface: UpdateWebhookDtoInterface, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WebhookInterface>>;\n public webhookControllerUpdateOne(id: string, updateWebhookDtoInterface: UpdateWebhookDtoInterface, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WebhookInterface>>;\n public webhookControllerUpdateOne(id: string, updateWebhookDtoInterface: UpdateWebhookDtoInterface, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (id === null || id === undefined) {\n throw new Error('Required parameter id was null or undefined when calling webhookControllerUpdateOne.');\n }\n if (updateWebhookDtoInterface === null || updateWebhookDtoInterface === undefined) {\n throw new Error('Required parameter updateWebhookDtoInterface was null or undefined when calling webhookControllerUpdateOne.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/${this.configuration.encodeParam({name: \"id\", value: id, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: undefined})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<WebhookInterface>('put', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n body: updateWebhookDtoInterface,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param id \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookLogsControllerDeleteOne(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<StatusResponseInterface>;\n public webhookLogsControllerDeleteOne(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<StatusResponseInterface>>;\n public webhookLogsControllerDeleteOne(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<StatusResponseInterface>>;\n public webhookLogsControllerDeleteOne(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (id === null || id === undefined) {\n throw new Error('Required parameter id was null or undefined when calling webhookLogsControllerDeleteOne.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([\n 'application/json'\n ]);\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();\n\n const localVarTransferCache: boolean = options?.transferCache ?? true;\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n let localVarPath = `/api/webhook/logs/${this.configuration.encodeParam({name: \"id\", value: id, in: \"path\", style: \"simple\", explode: false, dataType: \"string\", dataFormat: undefined})}`;\n const { basePath, withCredentials } = this.configuration;\n return this.httpClient.request<StatusResponseInterface>('delete', `${basePath}${localVarPath}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n ...(withCredentials ? { withCredentials } : {}),\n headers: localVarHeaders,\n observe: observe,\n transferCache: localVarTransferCache,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * @param webhookId \n * @param curPage \n * @param perPage \n * @param searchText \n * @param sort \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<FindManyWebhookLogResponseInterface>;\n public webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<FindManyWebhookLogResponseInterface>>;\n public webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<FindManyWebhookLogResponseInterface>>;\n public webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {\n if (webhookId === null || webhookId === undefined) {\n throw new Error('Required parameter webhookId was null or undefined when calling webhookLogsControllerFindManyLogs.');\n }\n\n le