@nestbox-ai/doc-processing-api 1.0.61 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -56,6 +56,12 @@ export declare const BatchQueryDtoStatusEnum: {
56
56
  readonly Failed: "failed";
57
57
  };
58
58
  export type BatchQueryDtoStatusEnum = typeof BatchQueryDtoStatusEnum[keyof typeof BatchQueryDtoStatusEnum];
59
+ export interface CreateWebhookInputDto {
60
+ /**
61
+ * Webhook target URL
62
+ */
63
+ 'url': string;
64
+ }
59
65
  export interface DocumentCreateResponseDto {
60
66
  /**
61
67
  * Created document
@@ -486,6 +492,16 @@ export interface PaginatedQueriesDto {
486
492
  */
487
493
  'pagination': PaginationDto;
488
494
  }
495
+ export interface PaginatedWebhooksDto {
496
+ /**
497
+ * Webhook data
498
+ */
499
+ 'data': Array<WebhookDto>;
500
+ /**
501
+ * Pagination information
502
+ */
503
+ 'pagination': PaginationDto;
504
+ }
489
505
  export interface PaginationDto {
490
506
  /**
491
507
  * Current page number
@@ -572,6 +588,12 @@ export interface SourceItemDto {
572
588
  [key: string]: any;
573
589
  };
574
590
  }
591
+ export interface UpdateWebhookBodyInputDto {
592
+ /**
593
+ * Updated webhook target URL
594
+ */
595
+ 'url': string;
596
+ }
575
597
  export interface ValidationErrorDto {
576
598
  /**
577
599
  * Error type
@@ -625,6 +647,24 @@ export interface ValidationResultDto {
625
647
  [key: string]: any;
626
648
  };
627
649
  }
650
+ export interface WebhookDto {
651
+ /**
652
+ * Webhook ID
653
+ */
654
+ 'id': string;
655
+ /**
656
+ * Webhook target URL
657
+ */
658
+ 'url': string;
659
+ /**
660
+ * Webhook creation timestamp
661
+ */
662
+ 'createdAt': string;
663
+ /**
664
+ * Webhook last update timestamp
665
+ */
666
+ 'updatedAt': string;
667
+ }
628
668
  /**
629
669
  * ArtifactsApi - axios parameter creator
630
670
  */
@@ -1541,3 +1581,191 @@ export declare class SourcesApi extends BaseAPI {
1541
1581
  */
1542
1582
  sourcesControllerGetDocumentSources(documentId: string, jobId?: any, sourceId?: any, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DocumentSourcesResponseDto, any, {}>>;
1543
1583
  }
1584
+ /**
1585
+ * WebhooksApi - axios parameter creator
1586
+ */
1587
+ export declare const WebhooksApiAxiosParamCreator: (configuration?: Configuration) => {
1588
+ /**
1589
+ *
1590
+ * @summary Create webhook
1591
+ * @param {CreateWebhookInputDto} createWebhookInputDto
1592
+ * @param {*} [options] Override http request option.
1593
+ * @throws {RequiredError}
1594
+ */
1595
+ webhooksControllerCreateWebhook: (createWebhookInputDto: CreateWebhookInputDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1596
+ /**
1597
+ *
1598
+ * @summary Delete webhook
1599
+ * @param {string} webhookId Webhook ID.
1600
+ * @param {*} [options] Override http request option.
1601
+ * @throws {RequiredError}
1602
+ */
1603
+ webhooksControllerDeleteWebhook: (webhookId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1604
+ /**
1605
+ *
1606
+ * @summary Read webhook
1607
+ * @param {string} webhookId Webhook ID.
1608
+ * @param {*} [options] Override http request option.
1609
+ * @throws {RequiredError}
1610
+ */
1611
+ webhooksControllerGetWebhook: (webhookId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1612
+ /**
1613
+ *
1614
+ * @summary List webhooks
1615
+ * @param {number} [page] 1-based page number.
1616
+ * @param {number} [limit] Page size.
1617
+ * @param {*} [options] Override http request option.
1618
+ * @throws {RequiredError}
1619
+ */
1620
+ webhooksControllerListWebhooks: (page?: number, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1621
+ /**
1622
+ *
1623
+ * @summary Update webhook
1624
+ * @param {string} webhookId Webhook ID.
1625
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
1626
+ * @param {*} [options] Override http request option.
1627
+ * @throws {RequiredError}
1628
+ */
1629
+ webhooksControllerUpdateWebhook: (webhookId: string, updateWebhookBodyInputDto: UpdateWebhookBodyInputDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1630
+ };
1631
+ /**
1632
+ * WebhooksApi - functional programming interface
1633
+ */
1634
+ export declare const WebhooksApiFp: (configuration?: Configuration) => {
1635
+ /**
1636
+ *
1637
+ * @summary Create webhook
1638
+ * @param {CreateWebhookInputDto} createWebhookInputDto
1639
+ * @param {*} [options] Override http request option.
1640
+ * @throws {RequiredError}
1641
+ */
1642
+ webhooksControllerCreateWebhook(createWebhookInputDto: CreateWebhookInputDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookDto>>;
1643
+ /**
1644
+ *
1645
+ * @summary Delete webhook
1646
+ * @param {string} webhookId Webhook ID.
1647
+ * @param {*} [options] Override http request option.
1648
+ * @throws {RequiredError}
1649
+ */
1650
+ webhooksControllerDeleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookDto>>;
1651
+ /**
1652
+ *
1653
+ * @summary Read webhook
1654
+ * @param {string} webhookId Webhook ID.
1655
+ * @param {*} [options] Override http request option.
1656
+ * @throws {RequiredError}
1657
+ */
1658
+ webhooksControllerGetWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookDto>>;
1659
+ /**
1660
+ *
1661
+ * @summary List webhooks
1662
+ * @param {number} [page] 1-based page number.
1663
+ * @param {number} [limit] Page size.
1664
+ * @param {*} [options] Override http request option.
1665
+ * @throws {RequiredError}
1666
+ */
1667
+ webhooksControllerListWebhooks(page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedWebhooksDto>>;
1668
+ /**
1669
+ *
1670
+ * @summary Update webhook
1671
+ * @param {string} webhookId Webhook ID.
1672
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
1673
+ * @param {*} [options] Override http request option.
1674
+ * @throws {RequiredError}
1675
+ */
1676
+ webhooksControllerUpdateWebhook(webhookId: string, updateWebhookBodyInputDto: UpdateWebhookBodyInputDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookDto>>;
1677
+ };
1678
+ /**
1679
+ * WebhooksApi - factory interface
1680
+ */
1681
+ export declare const WebhooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
1682
+ /**
1683
+ *
1684
+ * @summary Create webhook
1685
+ * @param {CreateWebhookInputDto} createWebhookInputDto
1686
+ * @param {*} [options] Override http request option.
1687
+ * @throws {RequiredError}
1688
+ */
1689
+ webhooksControllerCreateWebhook(createWebhookInputDto: CreateWebhookInputDto, options?: RawAxiosRequestConfig): AxiosPromise<WebhookDto>;
1690
+ /**
1691
+ *
1692
+ * @summary Delete webhook
1693
+ * @param {string} webhookId Webhook ID.
1694
+ * @param {*} [options] Override http request option.
1695
+ * @throws {RequiredError}
1696
+ */
1697
+ webhooksControllerDeleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookDto>;
1698
+ /**
1699
+ *
1700
+ * @summary Read webhook
1701
+ * @param {string} webhookId Webhook ID.
1702
+ * @param {*} [options] Override http request option.
1703
+ * @throws {RequiredError}
1704
+ */
1705
+ webhooksControllerGetWebhook(webhookId: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookDto>;
1706
+ /**
1707
+ *
1708
+ * @summary List webhooks
1709
+ * @param {number} [page] 1-based page number.
1710
+ * @param {number} [limit] Page size.
1711
+ * @param {*} [options] Override http request option.
1712
+ * @throws {RequiredError}
1713
+ */
1714
+ webhooksControllerListWebhooks(page?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedWebhooksDto>;
1715
+ /**
1716
+ *
1717
+ * @summary Update webhook
1718
+ * @param {string} webhookId Webhook ID.
1719
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
1720
+ * @param {*} [options] Override http request option.
1721
+ * @throws {RequiredError}
1722
+ */
1723
+ webhooksControllerUpdateWebhook(webhookId: string, updateWebhookBodyInputDto: UpdateWebhookBodyInputDto, options?: RawAxiosRequestConfig): AxiosPromise<WebhookDto>;
1724
+ };
1725
+ /**
1726
+ * WebhooksApi - object-oriented interface
1727
+ */
1728
+ export declare class WebhooksApi extends BaseAPI {
1729
+ /**
1730
+ *
1731
+ * @summary Create webhook
1732
+ * @param {CreateWebhookInputDto} createWebhookInputDto
1733
+ * @param {*} [options] Override http request option.
1734
+ * @throws {RequiredError}
1735
+ */
1736
+ webhooksControllerCreateWebhook(createWebhookInputDto: CreateWebhookInputDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookDto, any, {}>>;
1737
+ /**
1738
+ *
1739
+ * @summary Delete webhook
1740
+ * @param {string} webhookId Webhook ID.
1741
+ * @param {*} [options] Override http request option.
1742
+ * @throws {RequiredError}
1743
+ */
1744
+ webhooksControllerDeleteWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookDto, any, {}>>;
1745
+ /**
1746
+ *
1747
+ * @summary Read webhook
1748
+ * @param {string} webhookId Webhook ID.
1749
+ * @param {*} [options] Override http request option.
1750
+ * @throws {RequiredError}
1751
+ */
1752
+ webhooksControllerGetWebhook(webhookId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookDto, any, {}>>;
1753
+ /**
1754
+ *
1755
+ * @summary List webhooks
1756
+ * @param {number} [page] 1-based page number.
1757
+ * @param {number} [limit] Page size.
1758
+ * @param {*} [options] Override http request option.
1759
+ * @throws {RequiredError}
1760
+ */
1761
+ webhooksControllerListWebhooks(page?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PaginatedWebhooksDto, any, {}>>;
1762
+ /**
1763
+ *
1764
+ * @summary Update webhook
1765
+ * @param {string} webhookId Webhook ID.
1766
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
1767
+ * @param {*} [options] Override http request option.
1768
+ * @throws {RequiredError}
1769
+ */
1770
+ webhooksControllerUpdateWebhook(webhookId: string, updateWebhookBodyInputDto: UpdateWebhookBodyInputDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookDto, any, {}>>;
1771
+ }
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.SourcesApi = exports.SourcesApiFactory = exports.SourcesApiFp = exports.SourcesApiAxiosParamCreator = exports.QueriesApi = exports.QueriesApiFactory = exports.QueriesApiFp = exports.QueriesApiAxiosParamCreator = exports.ProfilesApi = exports.ProfilesApiFactory = exports.ProfilesApiFp = exports.ProfilesApiAxiosParamCreator = exports.JobsApi = exports.JobsApiFactory = exports.JobsApiFp = exports.JobsApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.EvalsApi = exports.EvalsApiFactory = exports.EvalsApiFp = exports.EvalsApiAxiosParamCreator = exports.DocumentsControllerCreateDocumentPriorityEnum = exports.DocumentsApi = exports.DocumentsApiFactory = exports.DocumentsApiFp = exports.DocumentsApiAxiosParamCreator = exports.ArtifactsApi = exports.ArtifactsApiFactory = exports.ArtifactsApiFp = exports.ArtifactsApiAxiosParamCreator = exports.ValidationIssueDtoSeverityEnum = exports.JobStatusDtoStateEnum = exports.JobDtoStateEnum = exports.JobDtoTypeEnum = exports.HealthResponseDtoStatusEnum = exports.HealthCheckItemDtoStatusEnum = exports.GpuHealthCheckDtoStatusEnum = exports.EvalDtoStatusEnum = exports.DocumentDtoStatusEnum = exports.BatchQueryDtoStatusEnum = void 0;
25
+ exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.SourcesApi = exports.SourcesApiFactory = exports.SourcesApiFp = exports.SourcesApiAxiosParamCreator = exports.QueriesApi = exports.QueriesApiFactory = exports.QueriesApiFp = exports.QueriesApiAxiosParamCreator = exports.ProfilesApi = exports.ProfilesApiFactory = exports.ProfilesApiFp = exports.ProfilesApiAxiosParamCreator = exports.JobsApi = exports.JobsApiFactory = exports.JobsApiFp = exports.JobsApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.EvalsApi = exports.EvalsApiFactory = exports.EvalsApiFp = exports.EvalsApiAxiosParamCreator = exports.DocumentsControllerCreateDocumentPriorityEnum = exports.DocumentsApi = exports.DocumentsApiFactory = exports.DocumentsApiFp = exports.DocumentsApiAxiosParamCreator = exports.ArtifactsApi = exports.ArtifactsApiFactory = exports.ArtifactsApiFp = exports.ArtifactsApiAxiosParamCreator = exports.ValidationIssueDtoSeverityEnum = exports.JobStatusDtoStateEnum = exports.JobDtoStateEnum = exports.JobDtoTypeEnum = exports.HealthResponseDtoStatusEnum = exports.HealthCheckItemDtoStatusEnum = exports.GpuHealthCheckDtoStatusEnum = exports.EvalDtoStatusEnum = exports.DocumentDtoStatusEnum = exports.BatchQueryDtoStatusEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -1900,3 +1900,381 @@ class SourcesApi extends base_1.BaseAPI {
1900
1900
  }
1901
1901
  }
1902
1902
  exports.SourcesApi = SourcesApi;
1903
+ /**
1904
+ * WebhooksApi - axios parameter creator
1905
+ */
1906
+ const WebhooksApiAxiosParamCreator = function (configuration) {
1907
+ return {
1908
+ /**
1909
+ *
1910
+ * @summary Create webhook
1911
+ * @param {CreateWebhookInputDto} createWebhookInputDto
1912
+ * @param {*} [options] Override http request option.
1913
+ * @throws {RequiredError}
1914
+ */
1915
+ webhooksControllerCreateWebhook: (createWebhookInputDto_1, ...args_1) => __awaiter(this, [createWebhookInputDto_1, ...args_1], void 0, function* (createWebhookInputDto, options = {}) {
1916
+ // verify required parameter 'createWebhookInputDto' is not null or undefined
1917
+ (0, common_1.assertParamExists)('webhooksControllerCreateWebhook', 'createWebhookInputDto', createWebhookInputDto);
1918
+ const localVarPath = `/webhooks`;
1919
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1920
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1921
+ let baseOptions;
1922
+ if (configuration) {
1923
+ baseOptions = configuration.baseOptions;
1924
+ }
1925
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1926
+ const localVarHeaderParameter = {};
1927
+ const localVarQueryParameter = {};
1928
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1929
+ localVarHeaderParameter['Accept'] = 'application/json';
1930
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1931
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1932
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1933
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWebhookInputDto, localVarRequestOptions, configuration);
1934
+ return {
1935
+ url: (0, common_1.toPathString)(localVarUrlObj),
1936
+ options: localVarRequestOptions,
1937
+ };
1938
+ }),
1939
+ /**
1940
+ *
1941
+ * @summary Delete webhook
1942
+ * @param {string} webhookId Webhook ID.
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ webhooksControllerDeleteWebhook: (webhookId_1, ...args_1) => __awaiter(this, [webhookId_1, ...args_1], void 0, function* (webhookId, options = {}) {
1947
+ // verify required parameter 'webhookId' is not null or undefined
1948
+ (0, common_1.assertParamExists)('webhooksControllerDeleteWebhook', 'webhookId', webhookId);
1949
+ const localVarPath = `/webhooks/{webhookId}`
1950
+ .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
1951
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1952
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1953
+ let baseOptions;
1954
+ if (configuration) {
1955
+ baseOptions = configuration.baseOptions;
1956
+ }
1957
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1958
+ const localVarHeaderParameter = {};
1959
+ const localVarQueryParameter = {};
1960
+ localVarHeaderParameter['Accept'] = 'application/json';
1961
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1962
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1963
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1964
+ return {
1965
+ url: (0, common_1.toPathString)(localVarUrlObj),
1966
+ options: localVarRequestOptions,
1967
+ };
1968
+ }),
1969
+ /**
1970
+ *
1971
+ * @summary Read webhook
1972
+ * @param {string} webhookId Webhook ID.
1973
+ * @param {*} [options] Override http request option.
1974
+ * @throws {RequiredError}
1975
+ */
1976
+ webhooksControllerGetWebhook: (webhookId_1, ...args_1) => __awaiter(this, [webhookId_1, ...args_1], void 0, function* (webhookId, options = {}) {
1977
+ // verify required parameter 'webhookId' is not null or undefined
1978
+ (0, common_1.assertParamExists)('webhooksControllerGetWebhook', 'webhookId', webhookId);
1979
+ const localVarPath = `/webhooks/{webhookId}`
1980
+ .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
1981
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1982
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1983
+ let baseOptions;
1984
+ if (configuration) {
1985
+ baseOptions = configuration.baseOptions;
1986
+ }
1987
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1988
+ const localVarHeaderParameter = {};
1989
+ const localVarQueryParameter = {};
1990
+ localVarHeaderParameter['Accept'] = 'application/json';
1991
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1992
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1993
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1994
+ return {
1995
+ url: (0, common_1.toPathString)(localVarUrlObj),
1996
+ options: localVarRequestOptions,
1997
+ };
1998
+ }),
1999
+ /**
2000
+ *
2001
+ * @summary List webhooks
2002
+ * @param {number} [page] 1-based page number.
2003
+ * @param {number} [limit] Page size.
2004
+ * @param {*} [options] Override http request option.
2005
+ * @throws {RequiredError}
2006
+ */
2007
+ webhooksControllerListWebhooks: (page_1, limit_1, ...args_1) => __awaiter(this, [page_1, limit_1, ...args_1], void 0, function* (page, limit, options = {}) {
2008
+ const localVarPath = `/webhooks`;
2009
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2010
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2011
+ let baseOptions;
2012
+ if (configuration) {
2013
+ baseOptions = configuration.baseOptions;
2014
+ }
2015
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2016
+ const localVarHeaderParameter = {};
2017
+ const localVarQueryParameter = {};
2018
+ if (page !== undefined) {
2019
+ localVarQueryParameter['page'] = page;
2020
+ }
2021
+ if (limit !== undefined) {
2022
+ localVarQueryParameter['limit'] = limit;
2023
+ }
2024
+ localVarHeaderParameter['Accept'] = 'application/json';
2025
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2026
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2027
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2028
+ return {
2029
+ url: (0, common_1.toPathString)(localVarUrlObj),
2030
+ options: localVarRequestOptions,
2031
+ };
2032
+ }),
2033
+ /**
2034
+ *
2035
+ * @summary Update webhook
2036
+ * @param {string} webhookId Webhook ID.
2037
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
2038
+ * @param {*} [options] Override http request option.
2039
+ * @throws {RequiredError}
2040
+ */
2041
+ webhooksControllerUpdateWebhook: (webhookId_1, updateWebhookBodyInputDto_1, ...args_1) => __awaiter(this, [webhookId_1, updateWebhookBodyInputDto_1, ...args_1], void 0, function* (webhookId, updateWebhookBodyInputDto, options = {}) {
2042
+ // verify required parameter 'webhookId' is not null or undefined
2043
+ (0, common_1.assertParamExists)('webhooksControllerUpdateWebhook', 'webhookId', webhookId);
2044
+ // verify required parameter 'updateWebhookBodyInputDto' is not null or undefined
2045
+ (0, common_1.assertParamExists)('webhooksControllerUpdateWebhook', 'updateWebhookBodyInputDto', updateWebhookBodyInputDto);
2046
+ const localVarPath = `/webhooks/{webhookId}`
2047
+ .replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
2048
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2049
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2050
+ let baseOptions;
2051
+ if (configuration) {
2052
+ baseOptions = configuration.baseOptions;
2053
+ }
2054
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
2055
+ const localVarHeaderParameter = {};
2056
+ const localVarQueryParameter = {};
2057
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2058
+ localVarHeaderParameter['Accept'] = 'application/json';
2059
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2060
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2061
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2062
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateWebhookBodyInputDto, localVarRequestOptions, configuration);
2063
+ return {
2064
+ url: (0, common_1.toPathString)(localVarUrlObj),
2065
+ options: localVarRequestOptions,
2066
+ };
2067
+ }),
2068
+ };
2069
+ };
2070
+ exports.WebhooksApiAxiosParamCreator = WebhooksApiAxiosParamCreator;
2071
+ /**
2072
+ * WebhooksApi - functional programming interface
2073
+ */
2074
+ const WebhooksApiFp = function (configuration) {
2075
+ const localVarAxiosParamCreator = (0, exports.WebhooksApiAxiosParamCreator)(configuration);
2076
+ return {
2077
+ /**
2078
+ *
2079
+ * @summary Create webhook
2080
+ * @param {CreateWebhookInputDto} createWebhookInputDto
2081
+ * @param {*} [options] Override http request option.
2082
+ * @throws {RequiredError}
2083
+ */
2084
+ webhooksControllerCreateWebhook(createWebhookInputDto, options) {
2085
+ return __awaiter(this, void 0, void 0, function* () {
2086
+ var _a, _b, _c;
2087
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerCreateWebhook(createWebhookInputDto, options);
2088
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2089
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.webhooksControllerCreateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2090
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2091
+ });
2092
+ },
2093
+ /**
2094
+ *
2095
+ * @summary Delete webhook
2096
+ * @param {string} webhookId Webhook ID.
2097
+ * @param {*} [options] Override http request option.
2098
+ * @throws {RequiredError}
2099
+ */
2100
+ webhooksControllerDeleteWebhook(webhookId, options) {
2101
+ return __awaiter(this, void 0, void 0, function* () {
2102
+ var _a, _b, _c;
2103
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerDeleteWebhook(webhookId, options);
2104
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2105
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.webhooksControllerDeleteWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2106
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2107
+ });
2108
+ },
2109
+ /**
2110
+ *
2111
+ * @summary Read webhook
2112
+ * @param {string} webhookId Webhook ID.
2113
+ * @param {*} [options] Override http request option.
2114
+ * @throws {RequiredError}
2115
+ */
2116
+ webhooksControllerGetWebhook(webhookId, options) {
2117
+ return __awaiter(this, void 0, void 0, function* () {
2118
+ var _a, _b, _c;
2119
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerGetWebhook(webhookId, options);
2120
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2121
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.webhooksControllerGetWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2122
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2123
+ });
2124
+ },
2125
+ /**
2126
+ *
2127
+ * @summary List webhooks
2128
+ * @param {number} [page] 1-based page number.
2129
+ * @param {number} [limit] Page size.
2130
+ * @param {*} [options] Override http request option.
2131
+ * @throws {RequiredError}
2132
+ */
2133
+ webhooksControllerListWebhooks(page, limit, options) {
2134
+ return __awaiter(this, void 0, void 0, function* () {
2135
+ var _a, _b, _c;
2136
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerListWebhooks(page, limit, options);
2137
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2138
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.webhooksControllerListWebhooks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2139
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2140
+ });
2141
+ },
2142
+ /**
2143
+ *
2144
+ * @summary Update webhook
2145
+ * @param {string} webhookId Webhook ID.
2146
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
2147
+ * @param {*} [options] Override http request option.
2148
+ * @throws {RequiredError}
2149
+ */
2150
+ webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
2151
+ return __awaiter(this, void 0, void 0, function* () {
2152
+ var _a, _b, _c;
2153
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options);
2154
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2155
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.webhooksControllerUpdateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2156
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2157
+ });
2158
+ },
2159
+ };
2160
+ };
2161
+ exports.WebhooksApiFp = WebhooksApiFp;
2162
+ /**
2163
+ * WebhooksApi - factory interface
2164
+ */
2165
+ const WebhooksApiFactory = function (configuration, basePath, axios) {
2166
+ const localVarFp = (0, exports.WebhooksApiFp)(configuration);
2167
+ return {
2168
+ /**
2169
+ *
2170
+ * @summary Create webhook
2171
+ * @param {CreateWebhookInputDto} createWebhookInputDto
2172
+ * @param {*} [options] Override http request option.
2173
+ * @throws {RequiredError}
2174
+ */
2175
+ webhooksControllerCreateWebhook(createWebhookInputDto, options) {
2176
+ return localVarFp.webhooksControllerCreateWebhook(createWebhookInputDto, options).then((request) => request(axios, basePath));
2177
+ },
2178
+ /**
2179
+ *
2180
+ * @summary Delete webhook
2181
+ * @param {string} webhookId Webhook ID.
2182
+ * @param {*} [options] Override http request option.
2183
+ * @throws {RequiredError}
2184
+ */
2185
+ webhooksControllerDeleteWebhook(webhookId, options) {
2186
+ return localVarFp.webhooksControllerDeleteWebhook(webhookId, options).then((request) => request(axios, basePath));
2187
+ },
2188
+ /**
2189
+ *
2190
+ * @summary Read webhook
2191
+ * @param {string} webhookId Webhook ID.
2192
+ * @param {*} [options] Override http request option.
2193
+ * @throws {RequiredError}
2194
+ */
2195
+ webhooksControllerGetWebhook(webhookId, options) {
2196
+ return localVarFp.webhooksControllerGetWebhook(webhookId, options).then((request) => request(axios, basePath));
2197
+ },
2198
+ /**
2199
+ *
2200
+ * @summary List webhooks
2201
+ * @param {number} [page] 1-based page number.
2202
+ * @param {number} [limit] Page size.
2203
+ * @param {*} [options] Override http request option.
2204
+ * @throws {RequiredError}
2205
+ */
2206
+ webhooksControllerListWebhooks(page, limit, options) {
2207
+ return localVarFp.webhooksControllerListWebhooks(page, limit, options).then((request) => request(axios, basePath));
2208
+ },
2209
+ /**
2210
+ *
2211
+ * @summary Update webhook
2212
+ * @param {string} webhookId Webhook ID.
2213
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
2214
+ * @param {*} [options] Override http request option.
2215
+ * @throws {RequiredError}
2216
+ */
2217
+ webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
2218
+ return localVarFp.webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options).then((request) => request(axios, basePath));
2219
+ },
2220
+ };
2221
+ };
2222
+ exports.WebhooksApiFactory = WebhooksApiFactory;
2223
+ /**
2224
+ * WebhooksApi - object-oriented interface
2225
+ */
2226
+ class WebhooksApi extends base_1.BaseAPI {
2227
+ /**
2228
+ *
2229
+ * @summary Create webhook
2230
+ * @param {CreateWebhookInputDto} createWebhookInputDto
2231
+ * @param {*} [options] Override http request option.
2232
+ * @throws {RequiredError}
2233
+ */
2234
+ webhooksControllerCreateWebhook(createWebhookInputDto, options) {
2235
+ return (0, exports.WebhooksApiFp)(this.configuration).webhooksControllerCreateWebhook(createWebhookInputDto, options).then((request) => request(this.axios, this.basePath));
2236
+ }
2237
+ /**
2238
+ *
2239
+ * @summary Delete webhook
2240
+ * @param {string} webhookId Webhook ID.
2241
+ * @param {*} [options] Override http request option.
2242
+ * @throws {RequiredError}
2243
+ */
2244
+ webhooksControllerDeleteWebhook(webhookId, options) {
2245
+ return (0, exports.WebhooksApiFp)(this.configuration).webhooksControllerDeleteWebhook(webhookId, options).then((request) => request(this.axios, this.basePath));
2246
+ }
2247
+ /**
2248
+ *
2249
+ * @summary Read webhook
2250
+ * @param {string} webhookId Webhook ID.
2251
+ * @param {*} [options] Override http request option.
2252
+ * @throws {RequiredError}
2253
+ */
2254
+ webhooksControllerGetWebhook(webhookId, options) {
2255
+ return (0, exports.WebhooksApiFp)(this.configuration).webhooksControllerGetWebhook(webhookId, options).then((request) => request(this.axios, this.basePath));
2256
+ }
2257
+ /**
2258
+ *
2259
+ * @summary List webhooks
2260
+ * @param {number} [page] 1-based page number.
2261
+ * @param {number} [limit] Page size.
2262
+ * @param {*} [options] Override http request option.
2263
+ * @throws {RequiredError}
2264
+ */
2265
+ webhooksControllerListWebhooks(page, limit, options) {
2266
+ return (0, exports.WebhooksApiFp)(this.configuration).webhooksControllerListWebhooks(page, limit, options).then((request) => request(this.axios, this.basePath));
2267
+ }
2268
+ /**
2269
+ *
2270
+ * @summary Update webhook
2271
+ * @param {string} webhookId Webhook ID.
2272
+ * @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
2273
+ * @param {*} [options] Override http request option.
2274
+ * @throws {RequiredError}
2275
+ */
2276
+ webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
2277
+ return (0, exports.WebhooksApiFp)(this.configuration).webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options).then((request) => request(this.axios, this.basePath));
2278
+ }
2279
+ }
2280
+ exports.WebhooksApi = WebhooksApi;