UNPKG

@nestjs-mod/webhook

Version:

Webhook module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction

847 lines 39.7 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookApi = exports.WebhookApiFactory = exports.WebhookApiFp = exports.WebhookApiAxiosParamCreator = exports.WebhookUserScalarFieldEnum = exports.WebhookStatus = exports.WebhookScalarFieldEnum = exports.WebhookRole = exports.WebhookLogScalarFieldEnum = exports.WebhookErrorEnum = void 0; const tslib_1 = require("tslib"); const axios_1 = tslib_1.__importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("./common"); // @ts-ignore const base_1 = require("./base"); /** * * @export * @enum {string} */ exports.WebhookErrorEnum = { Webhook000: 'WEBHOOK-000', Webhook001: 'WEBHOOK-001', Webhook002: 'WEBHOOK-002', Webhook003: 'WEBHOOK-003', Webhook004: 'WEBHOOK-004', Webhook005: 'WEBHOOK-005' }; /** * * @export * @enum {string} */ exports.WebhookLogScalarFieldEnum = { Id: 'id', Request: 'request', ResponseStatus: 'responseStatus', Response: 'response', WebhookStatus: 'webhookStatus', WebhookId: 'webhookId', ExternalTenantId: 'externalTenantId', CreatedAt: 'createdAt', UpdatedAt: 'updatedAt' }; /** * * @export * @enum {string} */ exports.WebhookRole = { Admin: 'Admin', User: 'User' }; /** * * @export * @enum {string} */ exports.WebhookScalarFieldEnum = { Id: 'id', EventName: 'eventName', Endpoint: 'endpoint', Enabled: 'enabled', Headers: 'headers', RequestTimeout: 'requestTimeout', ExternalTenantId: 'externalTenantId', CreatedBy: 'createdBy', UpdatedBy: 'updatedBy', CreatedAt: 'createdAt', UpdatedAt: 'updatedAt', WorkUntilDate: 'workUntilDate' }; /** * * @export * @enum {string} */ exports.WebhookStatus = { Pending: 'Pending', Process: 'Process', Success: 'Success', Error: 'Error', Timeout: 'Timeout' }; /** * * @export * @enum {string} */ exports.WebhookUserScalarFieldEnum = { Id: 'id', ExternalTenantId: 'externalTenantId', ExternalUserId: 'externalUserId', UserRole: 'userRole', CreatedAt: 'createdAt', UpdatedAt: 'updatedAt' }; /** * WebhookApi - axios parameter creator * @export */ const WebhookApiAxiosParamCreator = function (configuration) { return { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerCreateOne: async (createWebhookDto, options = {}) => { // verify required parameter 'createWebhookDto' is not null or undefined (0, common_1.assertParamExists)('webhookControllerCreateOne', 'createWebhookDto', createWebhookDto); const localVarPath = `/api/webhook`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWebhookDto, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerDeleteOne: async (id, options = {}) => { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('webhookControllerDeleteOne', 'id', id); const localVarPath = `/api/webhook/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerEvents: async (options = {}) => { const localVarPath = `/api/webhook/events`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {string} [tenantId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindMany: async (curPage, perPage, searchText, sort, tenantId, options = {}) => { const localVarPath = `/api/webhook`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (curPage !== undefined) { localVarQueryParameter['curPage'] = curPage; } if (perPage !== undefined) { localVarQueryParameter['perPage'] = perPage; } if (searchText !== undefined) { localVarQueryParameter['searchText'] = searchText; } if (sort !== undefined) { localVarQueryParameter['sort'] = sort; } if (tenantId !== undefined) { localVarQueryParameter['tenantId'] = tenantId; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindOne: async (id, options = {}) => { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('webhookControllerFindOne', 'id', id); const localVarPath = `/api/webhook/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerProfile: async (options = {}) => { const localVarPath = `/api/webhook/profile`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerTestRequest: async (createWebhookDto, options = {}) => { // verify required parameter 'createWebhookDto' is not null or undefined (0, common_1.assertParamExists)('webhookControllerTestRequest', 'createWebhookDto', createWebhookDto); const localVarPath = `/api/webhook/test-request`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWebhookDto, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerUpdateOne: async (id, updateWebhookDto, options = {}) => { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('webhookControllerUpdateOne', 'id', id); // verify required parameter 'updateWebhookDto' is not null or undefined (0, common_1.assertParamExists)('webhookControllerUpdateOne', 'updateWebhookDto', updateWebhookDto); const localVarPath = `/api/webhook/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateWebhookDto, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerDeleteOne: async (id, options = {}) => { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('webhookLogsControllerDeleteOne', 'id', id); const localVarPath = `/api/webhook/logs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindManyLogs: async (webhookId, curPage, perPage, searchText, sort, options = {}) => { // verify required parameter 'webhookId' is not null or undefined (0, common_1.assertParamExists)('webhookLogsControllerFindManyLogs', 'webhookId', webhookId); const localVarPath = `/api/webhook/logs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (curPage !== undefined) { localVarQueryParameter['curPage'] = curPage; } if (perPage !== undefined) { localVarQueryParameter['perPage'] = perPage; } if (searchText !== undefined) { localVarQueryParameter['searchText'] = searchText; } if (sort !== undefined) { localVarQueryParameter['sort'] = sort; } if (webhookId !== undefined) { localVarQueryParameter['webhookId'] = webhookId; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindOne: async (id, options = {}) => { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('webhookLogsControllerFindOne', 'id', id); const localVarPath = `/api/webhook/logs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.WebhookApiAxiosParamCreator = WebhookApiAxiosParamCreator; /** * WebhookApi - functional programming interface * @export */ const WebhookApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.WebhookApiAxiosParamCreator)(configuration); return { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerCreateOne(createWebhookDto, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerCreateOne(createWebhookDto, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerCreateOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerDeleteOne(id, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerDeleteOne(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerDeleteOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerEvents(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerEvents(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerEvents']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {string} [tenantId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerFindMany']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerFindOne(id, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerFindOne(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerFindOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerProfile(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerProfile(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerProfile']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerTestRequest(createWebhookDto, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerTestRequest(createWebhookDto, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerTestRequest']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookControllerUpdateOne(id, updateWebhookDto, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookControllerUpdateOne(id, updateWebhookDto, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookControllerUpdateOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookLogsControllerDeleteOne(id, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookLogsControllerDeleteOne(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookLogsControllerDeleteOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookLogsControllerFindManyLogs']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookLogsControllerFindOne(id, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookLogsControllerFindOne(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhookApi.webhookLogsControllerFindOne']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, }; }; exports.WebhookApiFp = WebhookApiFp; /** * WebhookApi - factory interface * @export */ const WebhookApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.WebhookApiFp)(configuration); return { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerCreateOne(createWebhookDto, options) { return localVarFp.webhookControllerCreateOne(createWebhookDto, options).then((request) => request(axios, basePath)); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerDeleteOne(id, options) { return localVarFp.webhookControllerDeleteOne(id, options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerEvents(options) { return localVarFp.webhookControllerEvents(options).then((request) => request(axios, basePath)); }, /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {string} [tenantId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options) { return localVarFp.webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options).then((request) => request(axios, basePath)); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindOne(id, options) { return localVarFp.webhookControllerFindOne(id, options).then((request) => request(axios, basePath)); }, /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerProfile(options) { return localVarFp.webhookControllerProfile(options).then((request) => request(axios, basePath)); }, /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerTestRequest(createWebhookDto, options) { return localVarFp.webhookControllerTestRequest(createWebhookDto, options).then((request) => request(axios, basePath)); }, /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerUpdateOne(id, updateWebhookDto, options) { return localVarFp.webhookControllerUpdateOne(id, updateWebhookDto, options).then((request) => request(axios, basePath)); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerDeleteOne(id, options) { return localVarFp.webhookLogsControllerDeleteOne(id, options).then((request) => request(axios, basePath)); }, /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options) { return localVarFp.webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options).then((request) => request(axios, basePath)); }, /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindOne(id, options) { return localVarFp.webhookLogsControllerFindOne(id, options).then((request) => request(axios, basePath)); }, }; }; exports.WebhookApiFactory = WebhookApiFactory; /** * WebhookApi - object-oriented interface * @export * @class WebhookApi * @extends {BaseAPI} */ class WebhookApi extends base_1.BaseAPI { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerCreateOne(createWebhookDto, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerCreateOne(createWebhookDto, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerDeleteOne(id, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerDeleteOne(id, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerEvents(options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerEvents(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {string} [tenantId] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerFindMany(curPage, perPage, searchText, sort, tenantId, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerFindOne(id, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerFindOne(id, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerProfile(options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerProfile(options).then((request) => request(this.axios, this.basePath)); } /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerTestRequest(createWebhookDto, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerTestRequest(createWebhookDto, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerUpdateOne(id, updateWebhookDto, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookControllerUpdateOne(id, updateWebhookDto, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerDeleteOne(id, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookLogsControllerDeleteOne(id, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookLogsControllerFindManyLogs(webhookId, curPage, perPage, searchText, sort, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerFindOne(id, options) { return (0, exports.WebhookApiFp)(this.configuration).webhookLogsControllerFindOne(id, options).then((request) => request(this.axios, this.basePath)); } } exports.WebhookApi = WebhookApi; //# sourceMappingURL=api.js.map