@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/.openapi-generator/FILES +5 -0
- package/README.md +11 -2
- package/api.ts +431 -0
- package/dist/api.d.ts +228 -0
- package/dist/api.js +379 -1
- package/dist/esm/api.d.ts +228 -0
- package/dist/esm/api.js +375 -1
- package/docs/CreateWebhookInputDto.md +20 -0
- package/docs/PaginatedWebhooksDto.md +22 -0
- package/docs/UpdateWebhookBodyInputDto.md +20 -0
- package/docs/WebhookDto.md +26 -0
- package/docs/WebhooksApi.md +280 -0
- package/package.json +1 -1
package/dist/esm/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/esm/api.js
CHANGED
|
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
import globalAxios from 'axios';
|
|
24
24
|
// Some imports not used depending on template conditions
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from './common';
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
29
|
export const BatchQueryDtoStatusEnum = {
|
|
@@ -1865,3 +1865,377 @@ export class SourcesApi extends BaseAPI {
|
|
|
1865
1865
|
return SourcesApiFp(this.configuration).sourcesControllerGetDocumentSources(documentId, jobId, sourceId, options).then((request) => request(this.axios, this.basePath));
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
|
+
/**
|
|
1869
|
+
* WebhooksApi - axios parameter creator
|
|
1870
|
+
*/
|
|
1871
|
+
export const WebhooksApiAxiosParamCreator = function (configuration) {
|
|
1872
|
+
return {
|
|
1873
|
+
/**
|
|
1874
|
+
*
|
|
1875
|
+
* @summary Create webhook
|
|
1876
|
+
* @param {CreateWebhookInputDto} createWebhookInputDto
|
|
1877
|
+
* @param {*} [options] Override http request option.
|
|
1878
|
+
* @throws {RequiredError}
|
|
1879
|
+
*/
|
|
1880
|
+
webhooksControllerCreateWebhook: (createWebhookInputDto_1, ...args_1) => __awaiter(this, [createWebhookInputDto_1, ...args_1], void 0, function* (createWebhookInputDto, options = {}) {
|
|
1881
|
+
// verify required parameter 'createWebhookInputDto' is not null or undefined
|
|
1882
|
+
assertParamExists('webhooksControllerCreateWebhook', 'createWebhookInputDto', createWebhookInputDto);
|
|
1883
|
+
const localVarPath = `/webhooks`;
|
|
1884
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1885
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1886
|
+
let baseOptions;
|
|
1887
|
+
if (configuration) {
|
|
1888
|
+
baseOptions = configuration.baseOptions;
|
|
1889
|
+
}
|
|
1890
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1891
|
+
const localVarHeaderParameter = {};
|
|
1892
|
+
const localVarQueryParameter = {};
|
|
1893
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1894
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1895
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1896
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1897
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1898
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createWebhookInputDto, localVarRequestOptions, configuration);
|
|
1899
|
+
return {
|
|
1900
|
+
url: toPathString(localVarUrlObj),
|
|
1901
|
+
options: localVarRequestOptions,
|
|
1902
|
+
};
|
|
1903
|
+
}),
|
|
1904
|
+
/**
|
|
1905
|
+
*
|
|
1906
|
+
* @summary Delete webhook
|
|
1907
|
+
* @param {string} webhookId Webhook ID.
|
|
1908
|
+
* @param {*} [options] Override http request option.
|
|
1909
|
+
* @throws {RequiredError}
|
|
1910
|
+
*/
|
|
1911
|
+
webhooksControllerDeleteWebhook: (webhookId_1, ...args_1) => __awaiter(this, [webhookId_1, ...args_1], void 0, function* (webhookId, options = {}) {
|
|
1912
|
+
// verify required parameter 'webhookId' is not null or undefined
|
|
1913
|
+
assertParamExists('webhooksControllerDeleteWebhook', 'webhookId', webhookId);
|
|
1914
|
+
const localVarPath = `/webhooks/{webhookId}`
|
|
1915
|
+
.replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
|
|
1916
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1917
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1918
|
+
let baseOptions;
|
|
1919
|
+
if (configuration) {
|
|
1920
|
+
baseOptions = configuration.baseOptions;
|
|
1921
|
+
}
|
|
1922
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1923
|
+
const localVarHeaderParameter = {};
|
|
1924
|
+
const localVarQueryParameter = {};
|
|
1925
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1926
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1927
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1928
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1929
|
+
return {
|
|
1930
|
+
url: toPathString(localVarUrlObj),
|
|
1931
|
+
options: localVarRequestOptions,
|
|
1932
|
+
};
|
|
1933
|
+
}),
|
|
1934
|
+
/**
|
|
1935
|
+
*
|
|
1936
|
+
* @summary Read webhook
|
|
1937
|
+
* @param {string} webhookId Webhook ID.
|
|
1938
|
+
* @param {*} [options] Override http request option.
|
|
1939
|
+
* @throws {RequiredError}
|
|
1940
|
+
*/
|
|
1941
|
+
webhooksControllerGetWebhook: (webhookId_1, ...args_1) => __awaiter(this, [webhookId_1, ...args_1], void 0, function* (webhookId, options = {}) {
|
|
1942
|
+
// verify required parameter 'webhookId' is not null or undefined
|
|
1943
|
+
assertParamExists('webhooksControllerGetWebhook', 'webhookId', webhookId);
|
|
1944
|
+
const localVarPath = `/webhooks/{webhookId}`
|
|
1945
|
+
.replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
|
|
1946
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1947
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1948
|
+
let baseOptions;
|
|
1949
|
+
if (configuration) {
|
|
1950
|
+
baseOptions = configuration.baseOptions;
|
|
1951
|
+
}
|
|
1952
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1953
|
+
const localVarHeaderParameter = {};
|
|
1954
|
+
const localVarQueryParameter = {};
|
|
1955
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1956
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1957
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1958
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1959
|
+
return {
|
|
1960
|
+
url: toPathString(localVarUrlObj),
|
|
1961
|
+
options: localVarRequestOptions,
|
|
1962
|
+
};
|
|
1963
|
+
}),
|
|
1964
|
+
/**
|
|
1965
|
+
*
|
|
1966
|
+
* @summary List webhooks
|
|
1967
|
+
* @param {number} [page] 1-based page number.
|
|
1968
|
+
* @param {number} [limit] Page size.
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
*/
|
|
1972
|
+
webhooksControllerListWebhooks: (page_1, limit_1, ...args_1) => __awaiter(this, [page_1, limit_1, ...args_1], void 0, function* (page, limit, options = {}) {
|
|
1973
|
+
const localVarPath = `/webhooks`;
|
|
1974
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1975
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1976
|
+
let baseOptions;
|
|
1977
|
+
if (configuration) {
|
|
1978
|
+
baseOptions = configuration.baseOptions;
|
|
1979
|
+
}
|
|
1980
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1981
|
+
const localVarHeaderParameter = {};
|
|
1982
|
+
const localVarQueryParameter = {};
|
|
1983
|
+
if (page !== undefined) {
|
|
1984
|
+
localVarQueryParameter['page'] = page;
|
|
1985
|
+
}
|
|
1986
|
+
if (limit !== undefined) {
|
|
1987
|
+
localVarQueryParameter['limit'] = limit;
|
|
1988
|
+
}
|
|
1989
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1990
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1991
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1992
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1993
|
+
return {
|
|
1994
|
+
url: toPathString(localVarUrlObj),
|
|
1995
|
+
options: localVarRequestOptions,
|
|
1996
|
+
};
|
|
1997
|
+
}),
|
|
1998
|
+
/**
|
|
1999
|
+
*
|
|
2000
|
+
* @summary Update webhook
|
|
2001
|
+
* @param {string} webhookId Webhook ID.
|
|
2002
|
+
* @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
|
|
2003
|
+
* @param {*} [options] Override http request option.
|
|
2004
|
+
* @throws {RequiredError}
|
|
2005
|
+
*/
|
|
2006
|
+
webhooksControllerUpdateWebhook: (webhookId_1, updateWebhookBodyInputDto_1, ...args_1) => __awaiter(this, [webhookId_1, updateWebhookBodyInputDto_1, ...args_1], void 0, function* (webhookId, updateWebhookBodyInputDto, options = {}) {
|
|
2007
|
+
// verify required parameter 'webhookId' is not null or undefined
|
|
2008
|
+
assertParamExists('webhooksControllerUpdateWebhook', 'webhookId', webhookId);
|
|
2009
|
+
// verify required parameter 'updateWebhookBodyInputDto' is not null or undefined
|
|
2010
|
+
assertParamExists('webhooksControllerUpdateWebhook', 'updateWebhookBodyInputDto', updateWebhookBodyInputDto);
|
|
2011
|
+
const localVarPath = `/webhooks/{webhookId}`
|
|
2012
|
+
.replace(`{${"webhookId"}}`, encodeURIComponent(String(webhookId)));
|
|
2013
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2014
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2015
|
+
let baseOptions;
|
|
2016
|
+
if (configuration) {
|
|
2017
|
+
baseOptions = configuration.baseOptions;
|
|
2018
|
+
}
|
|
2019
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
2020
|
+
const localVarHeaderParameter = {};
|
|
2021
|
+
const localVarQueryParameter = {};
|
|
2022
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2023
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2024
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2025
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2026
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2027
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateWebhookBodyInputDto, localVarRequestOptions, configuration);
|
|
2028
|
+
return {
|
|
2029
|
+
url: toPathString(localVarUrlObj),
|
|
2030
|
+
options: localVarRequestOptions,
|
|
2031
|
+
};
|
|
2032
|
+
}),
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
/**
|
|
2036
|
+
* WebhooksApi - functional programming interface
|
|
2037
|
+
*/
|
|
2038
|
+
export const WebhooksApiFp = function (configuration) {
|
|
2039
|
+
const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration);
|
|
2040
|
+
return {
|
|
2041
|
+
/**
|
|
2042
|
+
*
|
|
2043
|
+
* @summary Create webhook
|
|
2044
|
+
* @param {CreateWebhookInputDto} createWebhookInputDto
|
|
2045
|
+
* @param {*} [options] Override http request option.
|
|
2046
|
+
* @throws {RequiredError}
|
|
2047
|
+
*/
|
|
2048
|
+
webhooksControllerCreateWebhook(createWebhookInputDto, options) {
|
|
2049
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2050
|
+
var _a, _b, _c;
|
|
2051
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerCreateWebhook(createWebhookInputDto, options);
|
|
2052
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2053
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WebhooksApi.webhooksControllerCreateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2054
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2055
|
+
});
|
|
2056
|
+
},
|
|
2057
|
+
/**
|
|
2058
|
+
*
|
|
2059
|
+
* @summary Delete webhook
|
|
2060
|
+
* @param {string} webhookId Webhook ID.
|
|
2061
|
+
* @param {*} [options] Override http request option.
|
|
2062
|
+
* @throws {RequiredError}
|
|
2063
|
+
*/
|
|
2064
|
+
webhooksControllerDeleteWebhook(webhookId, options) {
|
|
2065
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2066
|
+
var _a, _b, _c;
|
|
2067
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerDeleteWebhook(webhookId, options);
|
|
2068
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2069
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WebhooksApi.webhooksControllerDeleteWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2070
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2071
|
+
});
|
|
2072
|
+
},
|
|
2073
|
+
/**
|
|
2074
|
+
*
|
|
2075
|
+
* @summary Read webhook
|
|
2076
|
+
* @param {string} webhookId Webhook ID.
|
|
2077
|
+
* @param {*} [options] Override http request option.
|
|
2078
|
+
* @throws {RequiredError}
|
|
2079
|
+
*/
|
|
2080
|
+
webhooksControllerGetWebhook(webhookId, options) {
|
|
2081
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2082
|
+
var _a, _b, _c;
|
|
2083
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerGetWebhook(webhookId, options);
|
|
2084
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2085
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WebhooksApi.webhooksControllerGetWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2086
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2087
|
+
});
|
|
2088
|
+
},
|
|
2089
|
+
/**
|
|
2090
|
+
*
|
|
2091
|
+
* @summary List webhooks
|
|
2092
|
+
* @param {number} [page] 1-based page number.
|
|
2093
|
+
* @param {number} [limit] Page size.
|
|
2094
|
+
* @param {*} [options] Override http request option.
|
|
2095
|
+
* @throws {RequiredError}
|
|
2096
|
+
*/
|
|
2097
|
+
webhooksControllerListWebhooks(page, limit, options) {
|
|
2098
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2099
|
+
var _a, _b, _c;
|
|
2100
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerListWebhooks(page, limit, options);
|
|
2101
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2102
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WebhooksApi.webhooksControllerListWebhooks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2103
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2104
|
+
});
|
|
2105
|
+
},
|
|
2106
|
+
/**
|
|
2107
|
+
*
|
|
2108
|
+
* @summary Update webhook
|
|
2109
|
+
* @param {string} webhookId Webhook ID.
|
|
2110
|
+
* @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
|
|
2111
|
+
* @param {*} [options] Override http request option.
|
|
2112
|
+
* @throws {RequiredError}
|
|
2113
|
+
*/
|
|
2114
|
+
webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
|
|
2115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2116
|
+
var _a, _b, _c;
|
|
2117
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options);
|
|
2118
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2119
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['WebhooksApi.webhooksControllerUpdateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2120
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2121
|
+
});
|
|
2122
|
+
},
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
/**
|
|
2126
|
+
* WebhooksApi - factory interface
|
|
2127
|
+
*/
|
|
2128
|
+
export const WebhooksApiFactory = function (configuration, basePath, axios) {
|
|
2129
|
+
const localVarFp = WebhooksApiFp(configuration);
|
|
2130
|
+
return {
|
|
2131
|
+
/**
|
|
2132
|
+
*
|
|
2133
|
+
* @summary Create webhook
|
|
2134
|
+
* @param {CreateWebhookInputDto} createWebhookInputDto
|
|
2135
|
+
* @param {*} [options] Override http request option.
|
|
2136
|
+
* @throws {RequiredError}
|
|
2137
|
+
*/
|
|
2138
|
+
webhooksControllerCreateWebhook(createWebhookInputDto, options) {
|
|
2139
|
+
return localVarFp.webhooksControllerCreateWebhook(createWebhookInputDto, options).then((request) => request(axios, basePath));
|
|
2140
|
+
},
|
|
2141
|
+
/**
|
|
2142
|
+
*
|
|
2143
|
+
* @summary Delete webhook
|
|
2144
|
+
* @param {string} webhookId Webhook ID.
|
|
2145
|
+
* @param {*} [options] Override http request option.
|
|
2146
|
+
* @throws {RequiredError}
|
|
2147
|
+
*/
|
|
2148
|
+
webhooksControllerDeleteWebhook(webhookId, options) {
|
|
2149
|
+
return localVarFp.webhooksControllerDeleteWebhook(webhookId, options).then((request) => request(axios, basePath));
|
|
2150
|
+
},
|
|
2151
|
+
/**
|
|
2152
|
+
*
|
|
2153
|
+
* @summary Read webhook
|
|
2154
|
+
* @param {string} webhookId Webhook ID.
|
|
2155
|
+
* @param {*} [options] Override http request option.
|
|
2156
|
+
* @throws {RequiredError}
|
|
2157
|
+
*/
|
|
2158
|
+
webhooksControllerGetWebhook(webhookId, options) {
|
|
2159
|
+
return localVarFp.webhooksControllerGetWebhook(webhookId, options).then((request) => request(axios, basePath));
|
|
2160
|
+
},
|
|
2161
|
+
/**
|
|
2162
|
+
*
|
|
2163
|
+
* @summary List webhooks
|
|
2164
|
+
* @param {number} [page] 1-based page number.
|
|
2165
|
+
* @param {number} [limit] Page size.
|
|
2166
|
+
* @param {*} [options] Override http request option.
|
|
2167
|
+
* @throws {RequiredError}
|
|
2168
|
+
*/
|
|
2169
|
+
webhooksControllerListWebhooks(page, limit, options) {
|
|
2170
|
+
return localVarFp.webhooksControllerListWebhooks(page, limit, options).then((request) => request(axios, basePath));
|
|
2171
|
+
},
|
|
2172
|
+
/**
|
|
2173
|
+
*
|
|
2174
|
+
* @summary Update webhook
|
|
2175
|
+
* @param {string} webhookId Webhook ID.
|
|
2176
|
+
* @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
|
|
2177
|
+
* @param {*} [options] Override http request option.
|
|
2178
|
+
* @throws {RequiredError}
|
|
2179
|
+
*/
|
|
2180
|
+
webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
|
|
2181
|
+
return localVarFp.webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options).then((request) => request(axios, basePath));
|
|
2182
|
+
},
|
|
2183
|
+
};
|
|
2184
|
+
};
|
|
2185
|
+
/**
|
|
2186
|
+
* WebhooksApi - object-oriented interface
|
|
2187
|
+
*/
|
|
2188
|
+
export class WebhooksApi extends BaseAPI {
|
|
2189
|
+
/**
|
|
2190
|
+
*
|
|
2191
|
+
* @summary Create webhook
|
|
2192
|
+
* @param {CreateWebhookInputDto} createWebhookInputDto
|
|
2193
|
+
* @param {*} [options] Override http request option.
|
|
2194
|
+
* @throws {RequiredError}
|
|
2195
|
+
*/
|
|
2196
|
+
webhooksControllerCreateWebhook(createWebhookInputDto, options) {
|
|
2197
|
+
return WebhooksApiFp(this.configuration).webhooksControllerCreateWebhook(createWebhookInputDto, options).then((request) => request(this.axios, this.basePath));
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
*
|
|
2201
|
+
* @summary Delete webhook
|
|
2202
|
+
* @param {string} webhookId Webhook ID.
|
|
2203
|
+
* @param {*} [options] Override http request option.
|
|
2204
|
+
* @throws {RequiredError}
|
|
2205
|
+
*/
|
|
2206
|
+
webhooksControllerDeleteWebhook(webhookId, options) {
|
|
2207
|
+
return WebhooksApiFp(this.configuration).webhooksControllerDeleteWebhook(webhookId, options).then((request) => request(this.axios, this.basePath));
|
|
2208
|
+
}
|
|
2209
|
+
/**
|
|
2210
|
+
*
|
|
2211
|
+
* @summary Read webhook
|
|
2212
|
+
* @param {string} webhookId Webhook ID.
|
|
2213
|
+
* @param {*} [options] Override http request option.
|
|
2214
|
+
* @throws {RequiredError}
|
|
2215
|
+
*/
|
|
2216
|
+
webhooksControllerGetWebhook(webhookId, options) {
|
|
2217
|
+
return WebhooksApiFp(this.configuration).webhooksControllerGetWebhook(webhookId, options).then((request) => request(this.axios, this.basePath));
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
*
|
|
2221
|
+
* @summary List webhooks
|
|
2222
|
+
* @param {number} [page] 1-based page number.
|
|
2223
|
+
* @param {number} [limit] Page size.
|
|
2224
|
+
* @param {*} [options] Override http request option.
|
|
2225
|
+
* @throws {RequiredError}
|
|
2226
|
+
*/
|
|
2227
|
+
webhooksControllerListWebhooks(page, limit, options) {
|
|
2228
|
+
return WebhooksApiFp(this.configuration).webhooksControllerListWebhooks(page, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
*
|
|
2232
|
+
* @summary Update webhook
|
|
2233
|
+
* @param {string} webhookId Webhook ID.
|
|
2234
|
+
* @param {UpdateWebhookBodyInputDto} updateWebhookBodyInputDto
|
|
2235
|
+
* @param {*} [options] Override http request option.
|
|
2236
|
+
* @throws {RequiredError}
|
|
2237
|
+
*/
|
|
2238
|
+
webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options) {
|
|
2239
|
+
return WebhooksApiFp(this.configuration).webhooksControllerUpdateWebhook(webhookId, updateWebhookBodyInputDto, options).then((request) => request(this.axios, this.basePath));
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# CreateWebhookInputDto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**url** | **string** | Webhook target URL | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { CreateWebhookInputDto } from '@nestbox-ai/doc-processing-api';
|
|
14
|
+
|
|
15
|
+
const instance: CreateWebhookInputDto = {
|
|
16
|
+
url,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|