@openfilz-sdk/typescript 1.2.3 → 1.2.4
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 +8 -0
- package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
- package/README.md +8 -2
- package/api/document-version-controller-api.ts +288 -0
- package/api.ts +1 -0
- package/dist/api/document-version-controller-api.d.ts +140 -0
- package/dist/api/document-version-controller-api.js +284 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/esm/api/document-version-controller-api.d.ts +140 -0
- package/dist/esm/api/document-version-controller-api.js +277 -0
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/audit-log-details-one-of.d.ts +3 -0
- package/dist/esm/models/audit-log.d.ts +1 -0
- package/dist/esm/models/audit-log.js +1 -0
- package/dist/esm/models/document-version-info.d.ts +32 -0
- package/dist/esm/models/document-version-info.js +14 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/esm/models/restore-version-audit.d.ts +17 -0
- package/dist/esm/models/restore-version-audit.js +14 -0
- package/dist/esm/models/restore-version-response.d.ts +32 -0
- package/dist/esm/models/restore-version-response.js +14 -0
- package/dist/esm/models/search-by-audit-log-request.d.ts +1 -0
- package/dist/esm/models/search-by-audit-log-request.js +1 -0
- package/dist/models/audit-log-details-one-of.d.ts +3 -0
- package/dist/models/audit-log.d.ts +1 -0
- package/dist/models/audit-log.js +1 -0
- package/dist/models/document-version-info.d.ts +32 -0
- package/dist/models/document-version-info.js +15 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/restore-version-audit.d.ts +17 -0
- package/dist/models/restore-version-audit.js +15 -0
- package/dist/models/restore-version-response.d.ts +32 -0
- package/dist/models/restore-version-response.js +15 -0
- package/dist/models/search-by-audit-log-request.d.ts +1 -0
- package/dist/models/search-by-audit-log-request.js +1 -0
- package/docs/AuditLogDetailsOneOf.md +6 -0
- package/docs/CopyAudit.md +2 -0
- package/docs/DocumentVersionControllerApi.md +169 -0
- package/docs/DocumentVersionInfo.md +27 -0
- package/docs/ReplaceAudit.md +2 -0
- package/docs/RestoreVersionAudit.md +27 -0
- package/docs/RestoreVersionResponse.md +27 -0
- package/docs/UploadAudit.md +2 -0
- package/models/audit-log-details-one-of.ts +4 -1
- package/models/audit-log.ts +1 -0
- package/models/document-version-info.ts +38 -0
- package/models/index.ts +3 -0
- package/models/restore-version-audit.ts +26 -0
- package/models/restore-version-response.ts +38 -0
- package/models/search-by-audit-log-request.ts +1 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -7,6 +7,7 @@ api/audit-controller-api.ts
|
|
|
7
7
|
api/dashboard-api.ts
|
|
8
8
|
api/document-controller-api.ts
|
|
9
9
|
api/document-suggestion-controller-api.ts
|
|
10
|
+
api/document-version-controller-api.ts
|
|
10
11
|
api/favorites-api.ts
|
|
11
12
|
api/file-controller-api.ts
|
|
12
13
|
api/folder-controller-api.ts
|
|
@@ -38,6 +39,8 @@ docs/DocumentControllerApi.md
|
|
|
38
39
|
docs/DocumentInfo.md
|
|
39
40
|
docs/DocumentPosition.md
|
|
40
41
|
docs/DocumentSuggestionControllerApi.md
|
|
42
|
+
docs/DocumentVersionControllerApi.md
|
|
43
|
+
docs/DocumentVersionInfo.md
|
|
41
44
|
docs/ElementInfo.md
|
|
42
45
|
docs/FavoritesApi.md
|
|
43
46
|
docs/FileControllerApi.md
|
|
@@ -51,6 +54,8 @@ docs/MoveRequest.md
|
|
|
51
54
|
docs/RenameAudit.md
|
|
52
55
|
docs/RenameRequest.md
|
|
53
56
|
docs/ReplaceAudit.md
|
|
57
|
+
docs/RestoreVersionAudit.md
|
|
58
|
+
docs/RestoreVersionResponse.md
|
|
54
59
|
docs/SearchByAuditLogRequest.md
|
|
55
60
|
docs/SearchByMetadataRequest.md
|
|
56
61
|
docs/SearchMetadataRequest.md
|
|
@@ -88,6 +93,7 @@ models/delete-metadata-request.ts
|
|
|
88
93
|
models/delete-request.ts
|
|
89
94
|
models/document-info.ts
|
|
90
95
|
models/document-position.ts
|
|
96
|
+
models/document-version-info.ts
|
|
91
97
|
models/element-info.ts
|
|
92
98
|
models/file-type-stats.ts
|
|
93
99
|
models/filter-input.ts
|
|
@@ -99,6 +105,8 @@ models/move-request.ts
|
|
|
99
105
|
models/rename-audit.ts
|
|
100
106
|
models/rename-request.ts
|
|
101
107
|
models/replace-audit.ts
|
|
108
|
+
models/restore-version-audit.ts
|
|
109
|
+
models/restore-version-response.ts
|
|
102
110
|
models/search-by-audit-log-request.ts
|
|
103
111
|
models/search-by-metadata-request.ts
|
|
104
112
|
models/search-metadata-request.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3f92c0b5decd809e5c3256741a27a41ebfcdb811e66b7d4aa5fc185f44df2f2b
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @openfilz-sdk/typescript@1.2.
|
|
1
|
+
## @openfilz-sdk/typescript@1.2.4
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @openfilz-sdk/typescript@1.2.
|
|
39
|
+
npm install @openfilz-sdk/typescript@1.2.4 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -71,6 +71,9 @@ Class | Method | HTTP request | Description
|
|
|
71
71
|
*DocumentControllerApi* | [**uploadDocument**](docs/DocumentControllerApi.md#uploaddocument) | **POST** /api/v1/documents/upload-multiple | Upload multiple documents
|
|
72
72
|
*DocumentControllerApi* | [**uploadDocument1**](docs/DocumentControllerApi.md#uploaddocument1) | **POST** /api/v1/documents/upload | Upload a single document
|
|
73
73
|
*DocumentSuggestionControllerApi* | [**getSuggestions**](docs/DocumentSuggestionControllerApi.md#getsuggestions) | **GET** /api/v1/suggestions |
|
|
74
|
+
*DocumentVersionControllerApi* | [**downloadVersion**](docs/DocumentVersionControllerApi.md#downloadversion) | **GET** /api/v1/documents/{documentId}/versions/{versionId}/download | Download a specific document version
|
|
75
|
+
*DocumentVersionControllerApi* | [**listVersions**](docs/DocumentVersionControllerApi.md#listversions) | **GET** /api/v1/documents/{documentId}/versions | List document versions
|
|
76
|
+
*DocumentVersionControllerApi* | [**restoreVersion**](docs/DocumentVersionControllerApi.md#restoreversion) | **POST** /api/v1/documents/{documentId}/versions/{versionId}/restore | Restore a previous document version
|
|
74
77
|
*FavoritesApi* | [**addFavorite**](docs/FavoritesApi.md#addfavorite) | **POST** /api/v1/favorites/{documentId} | Add document to favorites
|
|
75
78
|
*FavoritesApi* | [**isFavorite**](docs/FavoritesApi.md#isfavorite) | **GET** /api/v1/favorites/{documentId}/is-favorite | Check favorite status
|
|
76
79
|
*FavoritesApi* | [**removeFavorite**](docs/FavoritesApi.md#removefavorite) | **DELETE** /api/v1/favorites/{documentId} | Remove document from favorites
|
|
@@ -119,6 +122,7 @@ Class | Method | HTTP request | Description
|
|
|
119
122
|
- [DeleteRequest](docs/DeleteRequest.md)
|
|
120
123
|
- [DocumentInfo](docs/DocumentInfo.md)
|
|
121
124
|
- [DocumentPosition](docs/DocumentPosition.md)
|
|
125
|
+
- [DocumentVersionInfo](docs/DocumentVersionInfo.md)
|
|
122
126
|
- [ElementInfo](docs/ElementInfo.md)
|
|
123
127
|
- [FileTypeStats](docs/FileTypeStats.md)
|
|
124
128
|
- [FilterInput](docs/FilterInput.md)
|
|
@@ -129,6 +133,8 @@ Class | Method | HTTP request | Description
|
|
|
129
133
|
- [RenameAudit](docs/RenameAudit.md)
|
|
130
134
|
- [RenameRequest](docs/RenameRequest.md)
|
|
131
135
|
- [ReplaceAudit](docs/ReplaceAudit.md)
|
|
136
|
+
- [RestoreVersionAudit](docs/RestoreVersionAudit.md)
|
|
137
|
+
- [RestoreVersionResponse](docs/RestoreVersionResponse.md)
|
|
132
138
|
- [SearchByAuditLogRequest](docs/SearchByAuditLogRequest.md)
|
|
133
139
|
- [SearchByMetadataRequest](docs/SearchByMetadataRequest.md)
|
|
134
140
|
- [SearchMetadataRequest](docs/SearchMetadataRequest.md)
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* openfilz-api
|
|
5
|
+
* API for Document Management System
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { DocumentVersionInfo } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { RestoreVersionResponse } from '../models';
|
|
28
|
+
/**
|
|
29
|
+
* DocumentVersionControllerApi - axios parameter creator
|
|
30
|
+
*/
|
|
31
|
+
export const DocumentVersionControllerApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
|
+
return {
|
|
33
|
+
/**
|
|
34
|
+
* Downloads the content of a specific stored version of a file document.
|
|
35
|
+
* @summary Download a specific document version
|
|
36
|
+
* @param {string} documentId
|
|
37
|
+
* @param {string} versionId
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
downloadVersion: async (documentId: string, versionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
43
|
+
assertParamExists('downloadVersion', 'documentId', documentId)
|
|
44
|
+
// verify required parameter 'versionId' is not null or undefined
|
|
45
|
+
assertParamExists('downloadVersion', 'versionId', versionId)
|
|
46
|
+
const localVarPath = `/api/v1/documents/{documentId}/versions/{versionId}/download`
|
|
47
|
+
.replace('{documentId}', encodeURIComponent(String(documentId)))
|
|
48
|
+
.replace('{versionId}', encodeURIComponent(String(versionId)));
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
57
|
+
const localVarHeaderParameter = {} as any;
|
|
58
|
+
const localVarQueryParameter = {} as any;
|
|
59
|
+
|
|
60
|
+
// authentication keycloak_auth required
|
|
61
|
+
// http bearer authentication required
|
|
62
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
63
|
+
|
|
64
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
65
|
+
|
|
66
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
67
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
68
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
url: toPathString(localVarUrlObj),
|
|
72
|
+
options: localVarRequestOptions,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
77
|
+
* @summary List document versions
|
|
78
|
+
* @param {string} documentId
|
|
79
|
+
* @param {*} [options] Override http request option.
|
|
80
|
+
* @throws {RequiredError}
|
|
81
|
+
*/
|
|
82
|
+
listVersions: async (documentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
83
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
84
|
+
assertParamExists('listVersions', 'documentId', documentId)
|
|
85
|
+
const localVarPath = `/api/v1/documents/{documentId}/versions`
|
|
86
|
+
.replace('{documentId}', encodeURIComponent(String(documentId)));
|
|
87
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
88
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
89
|
+
let baseOptions;
|
|
90
|
+
if (configuration) {
|
|
91
|
+
baseOptions = configuration.baseOptions;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
95
|
+
const localVarHeaderParameter = {} as any;
|
|
96
|
+
const localVarQueryParameter = {} as any;
|
|
97
|
+
|
|
98
|
+
// authentication keycloak_auth required
|
|
99
|
+
// http bearer authentication required
|
|
100
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
101
|
+
|
|
102
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
103
|
+
|
|
104
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
105
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
106
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
url: toPathString(localVarUrlObj),
|
|
110
|
+
options: localVarRequestOptions,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
115
|
+
* @summary Restore a previous document version
|
|
116
|
+
* @param {string} documentId
|
|
117
|
+
* @param {string} versionId
|
|
118
|
+
* @param {*} [options] Override http request option.
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
*/
|
|
121
|
+
restoreVersion: async (documentId: string, versionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
122
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
123
|
+
assertParamExists('restoreVersion', 'documentId', documentId)
|
|
124
|
+
// verify required parameter 'versionId' is not null or undefined
|
|
125
|
+
assertParamExists('restoreVersion', 'versionId', versionId)
|
|
126
|
+
const localVarPath = `/api/v1/documents/{documentId}/versions/{versionId}/restore`
|
|
127
|
+
.replace('{documentId}', encodeURIComponent(String(documentId)))
|
|
128
|
+
.replace('{versionId}', encodeURIComponent(String(versionId)));
|
|
129
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
130
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
131
|
+
let baseOptions;
|
|
132
|
+
if (configuration) {
|
|
133
|
+
baseOptions = configuration.baseOptions;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
137
|
+
const localVarHeaderParameter = {} as any;
|
|
138
|
+
const localVarQueryParameter = {} as any;
|
|
139
|
+
|
|
140
|
+
// authentication keycloak_auth required
|
|
141
|
+
// http bearer authentication required
|
|
142
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
143
|
+
|
|
144
|
+
localVarHeaderParameter['Accept'] = '*/*';
|
|
145
|
+
|
|
146
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
147
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
148
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
url: toPathString(localVarUrlObj),
|
|
152
|
+
options: localVarRequestOptions,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* DocumentVersionControllerApi - functional programming interface
|
|
160
|
+
*/
|
|
161
|
+
export const DocumentVersionControllerApiFp = function(configuration?: Configuration) {
|
|
162
|
+
const localVarAxiosParamCreator = DocumentVersionControllerApiAxiosParamCreator(configuration)
|
|
163
|
+
return {
|
|
164
|
+
/**
|
|
165
|
+
* Downloads the content of a specific stored version of a file document.
|
|
166
|
+
* @summary Download a specific document version
|
|
167
|
+
* @param {string} documentId
|
|
168
|
+
* @param {string} versionId
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
*/
|
|
172
|
+
async downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
173
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadVersion(documentId, versionId, options);
|
|
174
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
175
|
+
const localVarOperationServerBasePath = operationServerMap['DocumentVersionControllerApi.downloadVersion']?.[localVarOperationServerIndex]?.url;
|
|
176
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
180
|
+
* @summary List document versions
|
|
181
|
+
* @param {string} documentId
|
|
182
|
+
* @param {*} [options] Override http request option.
|
|
183
|
+
* @throws {RequiredError}
|
|
184
|
+
*/
|
|
185
|
+
async listVersions(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DocumentVersionInfo>>> {
|
|
186
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listVersions(documentId, options);
|
|
187
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
188
|
+
const localVarOperationServerBasePath = operationServerMap['DocumentVersionControllerApi.listVersions']?.[localVarOperationServerIndex]?.url;
|
|
189
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
190
|
+
},
|
|
191
|
+
/**
|
|
192
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
193
|
+
* @summary Restore a previous document version
|
|
194
|
+
* @param {string} documentId
|
|
195
|
+
* @param {string} versionId
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
async restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestoreVersionResponse>> {
|
|
200
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.restoreVersion(documentId, versionId, options);
|
|
201
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
202
|
+
const localVarOperationServerBasePath = operationServerMap['DocumentVersionControllerApi.restoreVersion']?.[localVarOperationServerIndex]?.url;
|
|
203
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
204
|
+
},
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* DocumentVersionControllerApi - factory interface
|
|
210
|
+
*/
|
|
211
|
+
export const DocumentVersionControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
212
|
+
const localVarFp = DocumentVersionControllerApiFp(configuration)
|
|
213
|
+
return {
|
|
214
|
+
/**
|
|
215
|
+
* Downloads the content of a specific stored version of a file document.
|
|
216
|
+
* @summary Download a specific document version
|
|
217
|
+
* @param {string} documentId
|
|
218
|
+
* @param {string} versionId
|
|
219
|
+
* @param {*} [options] Override http request option.
|
|
220
|
+
* @throws {RequiredError}
|
|
221
|
+
*/
|
|
222
|
+
downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
223
|
+
return localVarFp.downloadVersion(documentId, versionId, options).then((request) => request(axios, basePath));
|
|
224
|
+
},
|
|
225
|
+
/**
|
|
226
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
227
|
+
* @summary List document versions
|
|
228
|
+
* @param {string} documentId
|
|
229
|
+
* @param {*} [options] Override http request option.
|
|
230
|
+
* @throws {RequiredError}
|
|
231
|
+
*/
|
|
232
|
+
listVersions(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DocumentVersionInfo>> {
|
|
233
|
+
return localVarFp.listVersions(documentId, options).then((request) => request(axios, basePath));
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
237
|
+
* @summary Restore a previous document version
|
|
238
|
+
* @param {string} documentId
|
|
239
|
+
* @param {string} versionId
|
|
240
|
+
* @param {*} [options] Override http request option.
|
|
241
|
+
* @throws {RequiredError}
|
|
242
|
+
*/
|
|
243
|
+
restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): AxiosPromise<RestoreVersionResponse> {
|
|
244
|
+
return localVarFp.restoreVersion(documentId, versionId, options).then((request) => request(axios, basePath));
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* DocumentVersionControllerApi - object-oriented interface
|
|
251
|
+
*/
|
|
252
|
+
export class DocumentVersionControllerApi extends BaseAPI {
|
|
253
|
+
/**
|
|
254
|
+
* Downloads the content of a specific stored version of a file document.
|
|
255
|
+
* @summary Download a specific document version
|
|
256
|
+
* @param {string} documentId
|
|
257
|
+
* @param {string} versionId
|
|
258
|
+
* @param {*} [options] Override http request option.
|
|
259
|
+
* @throws {RequiredError}
|
|
260
|
+
*/
|
|
261
|
+
public downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig) {
|
|
262
|
+
return DocumentVersionControllerApiFp(this.configuration).downloadVersion(documentId, versionId, options).then((request) => request(this.axios, this.basePath));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
267
|
+
* @summary List document versions
|
|
268
|
+
* @param {string} documentId
|
|
269
|
+
* @param {*} [options] Override http request option.
|
|
270
|
+
* @throws {RequiredError}
|
|
271
|
+
*/
|
|
272
|
+
public listVersions(documentId: string, options?: RawAxiosRequestConfig) {
|
|
273
|
+
return DocumentVersionControllerApiFp(this.configuration).listVersions(documentId, options).then((request) => request(this.axios, this.basePath));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
278
|
+
* @summary Restore a previous document version
|
|
279
|
+
* @param {string} documentId
|
|
280
|
+
* @param {string} versionId
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
public restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig) {
|
|
285
|
+
return DocumentVersionControllerApiFp(this.configuration).restoreVersion(documentId, versionId, options).then((request) => request(this.axios, this.basePath));
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
package/api.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './api/audit-controller-api';
|
|
|
18
18
|
export * from './api/dashboard-api';
|
|
19
19
|
export * from './api/document-controller-api';
|
|
20
20
|
export * from './api/document-suggestion-controller-api';
|
|
21
|
+
export * from './api/document-version-controller-api';
|
|
21
22
|
export * from './api/favorites-api';
|
|
22
23
|
export * from './api/file-controller-api';
|
|
23
24
|
export * from './api/folder-controller-api';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openfilz-api
|
|
3
|
+
* API for Document Management System
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { DocumentVersionInfo } from '../models';
|
|
16
|
+
import type { RestoreVersionResponse } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* DocumentVersionControllerApi - axios parameter creator
|
|
19
|
+
*/
|
|
20
|
+
export declare const DocumentVersionControllerApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
* Downloads the content of a specific stored version of a file document.
|
|
23
|
+
* @summary Download a specific document version
|
|
24
|
+
* @param {string} documentId
|
|
25
|
+
* @param {string} versionId
|
|
26
|
+
* @param {*} [options] Override http request option.
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
*/
|
|
29
|
+
downloadVersion: (documentId: string, versionId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
|
+
/**
|
|
31
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
32
|
+
* @summary List document versions
|
|
33
|
+
* @param {string} documentId
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
listVersions: (documentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
38
|
+
/**
|
|
39
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
40
|
+
* @summary Restore a previous document version
|
|
41
|
+
* @param {string} documentId
|
|
42
|
+
* @param {string} versionId
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
restoreVersion: (documentId: string, versionId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* DocumentVersionControllerApi - functional programming interface
|
|
50
|
+
*/
|
|
51
|
+
export declare const DocumentVersionControllerApiFp: (configuration?: Configuration) => {
|
|
52
|
+
/**
|
|
53
|
+
* Downloads the content of a specific stored version of a file document.
|
|
54
|
+
* @summary Download a specific document version
|
|
55
|
+
* @param {string} documentId
|
|
56
|
+
* @param {string} versionId
|
|
57
|
+
* @param {*} [options] Override http request option.
|
|
58
|
+
* @throws {RequiredError}
|
|
59
|
+
*/
|
|
60
|
+
downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
|
|
61
|
+
/**
|
|
62
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
63
|
+
* @summary List document versions
|
|
64
|
+
* @param {string} documentId
|
|
65
|
+
* @param {*} [options] Override http request option.
|
|
66
|
+
* @throws {RequiredError}
|
|
67
|
+
*/
|
|
68
|
+
listVersions(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<DocumentVersionInfo>>>;
|
|
69
|
+
/**
|
|
70
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
71
|
+
* @summary Restore a previous document version
|
|
72
|
+
* @param {string} documentId
|
|
73
|
+
* @param {string} versionId
|
|
74
|
+
* @param {*} [options] Override http request option.
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
*/
|
|
77
|
+
restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestoreVersionResponse>>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* DocumentVersionControllerApi - factory interface
|
|
81
|
+
*/
|
|
82
|
+
export declare const DocumentVersionControllerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
83
|
+
/**
|
|
84
|
+
* Downloads the content of a specific stored version of a file document.
|
|
85
|
+
* @summary Download a specific document version
|
|
86
|
+
* @param {string} documentId
|
|
87
|
+
* @param {string} versionId
|
|
88
|
+
* @param {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): AxiosPromise<File>;
|
|
92
|
+
/**
|
|
93
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
94
|
+
* @summary List document versions
|
|
95
|
+
* @param {string} documentId
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
*/
|
|
99
|
+
listVersions(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<DocumentVersionInfo>>;
|
|
100
|
+
/**
|
|
101
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
102
|
+
* @summary Restore a previous document version
|
|
103
|
+
* @param {string} documentId
|
|
104
|
+
* @param {string} versionId
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): AxiosPromise<RestoreVersionResponse>;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* DocumentVersionControllerApi - object-oriented interface
|
|
112
|
+
*/
|
|
113
|
+
export declare class DocumentVersionControllerApi extends BaseAPI {
|
|
114
|
+
/**
|
|
115
|
+
* Downloads the content of a specific stored version of a file document.
|
|
116
|
+
* @summary Download a specific document version
|
|
117
|
+
* @param {string} documentId
|
|
118
|
+
* @param {string} versionId
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
*/
|
|
122
|
+
downloadVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any, {}>>;
|
|
123
|
+
/**
|
|
124
|
+
* Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
125
|
+
* @summary List document versions
|
|
126
|
+
* @param {string} documentId
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
*/
|
|
130
|
+
listVersions(documentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DocumentVersionInfo[], any, {}>>;
|
|
131
|
+
/**
|
|
132
|
+
* Restores the selected version as the new latest version. History-preserving: a new version is created on top, no version is deleted, and a RESTORE_DOCUMENT_VERSION audit entry is logged. Restoring the current latest version is rejected (HTTP 400).
|
|
133
|
+
* @summary Restore a previous document version
|
|
134
|
+
* @param {string} documentId
|
|
135
|
+
* @param {string} versionId
|
|
136
|
+
* @param {*} [options] Override http request option.
|
|
137
|
+
* @throws {RequiredError}
|
|
138
|
+
*/
|
|
139
|
+
restoreVersion(documentId: string, versionId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RestoreVersionResponse, any, {}>>;
|
|
140
|
+
}
|