@openfilz-sdk/typescript-ee 1.5.3 → 1.6.1

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.
Files changed (152) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  4. package/README.md +8 -2
  5. package/api/collaboration-audit-controller-api.ts +2 -2
  6. package/api/collaboration-controller-api.ts +9 -9
  7. package/api/comments-api.ts +2 -2
  8. package/api/delegated-browse-grants-admin-api.ts +3 -3
  9. package/api/delegated-browse-grants-end-user-api.ts +5 -5
  10. package/api/digital-signature-api.ts +3 -3
  11. package/api/document-controller-api.ts +10 -10
  12. package/api/document-version-controller-api.ts +288 -0
  13. package/api/favorites-api.ts +4 -4
  14. package/api/file-controller-api.ts +1 -1
  15. package/api/folder-controller-api.ts +1 -1
  16. package/api/notifications-api.ts +1 -1
  17. package/api/scan-agent-api.ts +1 -1
  18. package/api/scanner-proxy-api.ts +4 -4
  19. package/api/tus-controller-api.ts +6 -6
  20. package/api.ts +1 -0
  21. package/configuration.ts +2 -2
  22. package/dist/api/collaboration-audit-controller-api.js +2 -2
  23. package/dist/api/collaboration-controller-api.js +9 -9
  24. package/dist/api/comments-api.js +2 -2
  25. package/dist/api/delegated-browse-grants-admin-api.js +3 -3
  26. package/dist/api/delegated-browse-grants-end-user-api.js +5 -5
  27. package/dist/api/digital-signature-api.js +3 -3
  28. package/dist/api/document-controller-api.js +10 -10
  29. package/dist/api/document-version-controller-api.d.ts +140 -0
  30. package/dist/api/document-version-controller-api.js +284 -0
  31. package/dist/api/favorites-api.js +4 -4
  32. package/dist/api/file-controller-api.js +1 -1
  33. package/dist/api/folder-controller-api.js +1 -1
  34. package/dist/api/notifications-api.js +1 -1
  35. package/dist/api/scan-agent-api.js +1 -1
  36. package/dist/api/scanner-proxy-api.js +4 -4
  37. package/dist/api/tus-controller-api.js +6 -6
  38. package/dist/api.d.ts +1 -0
  39. package/dist/api.js +1 -0
  40. package/dist/configuration.js +2 -2
  41. package/dist/esm/api/collaboration-audit-controller-api.js +2 -2
  42. package/dist/esm/api/collaboration-controller-api.js +9 -9
  43. package/dist/esm/api/comments-api.js +2 -2
  44. package/dist/esm/api/delegated-browse-grants-admin-api.js +3 -3
  45. package/dist/esm/api/delegated-browse-grants-end-user-api.js +5 -5
  46. package/dist/esm/api/digital-signature-api.js +3 -3
  47. package/dist/esm/api/document-controller-api.js +10 -10
  48. package/dist/esm/api/document-version-controller-api.d.ts +140 -0
  49. package/dist/esm/api/document-version-controller-api.js +277 -0
  50. package/dist/esm/api/favorites-api.js +4 -4
  51. package/dist/esm/api/file-controller-api.js +1 -1
  52. package/dist/esm/api/folder-controller-api.js +1 -1
  53. package/dist/esm/api/notifications-api.js +1 -1
  54. package/dist/esm/api/scan-agent-api.js +1 -1
  55. package/dist/esm/api/scanner-proxy-api.js +4 -4
  56. package/dist/esm/api/tus-controller-api.js +6 -6
  57. package/dist/esm/api.d.ts +1 -0
  58. package/dist/esm/api.js +1 -0
  59. package/dist/esm/configuration.js +2 -2
  60. package/dist/esm/models/audit-verification-result.js +1 -1
  61. package/dist/esm/models/create-blank-document-request.js +1 -1
  62. package/dist/esm/models/create-delegated-grant-request.js +1 -1
  63. package/dist/esm/models/delegated-grant-dto.js +2 -2
  64. package/dist/esm/models/document-info.js +1 -1
  65. package/dist/esm/models/document-version-info.d.ts +32 -0
  66. package/dist/esm/models/document-version-info.js +14 -0
  67. package/dist/esm/models/enriched-audit-log-details.d.ts +3 -0
  68. package/dist/esm/models/enriched-audit-log.d.ts +1 -0
  69. package/dist/esm/models/enriched-audit-log.js +3 -2
  70. package/dist/esm/models/folder-element-info.js +1 -1
  71. package/dist/esm/models/index.d.ts +3 -0
  72. package/dist/esm/models/index.js +3 -0
  73. package/dist/esm/models/notification-dto.js +1 -1
  74. package/dist/esm/models/public-signature-view.js +2 -2
  75. package/dist/esm/models/restore-version-audit.d.ts +17 -0
  76. package/dist/esm/models/restore-version-audit.js +14 -0
  77. package/dist/esm/models/restore-version-response.d.ts +32 -0
  78. package/dist/esm/models/restore-version-response.js +14 -0
  79. package/dist/esm/models/search-by-audit-log-request.d.ts +1 -0
  80. package/dist/esm/models/search-by-audit-log-request.js +3 -2
  81. package/dist/esm/models/search-by-metadata-request.js +1 -1
  82. package/dist/esm/models/share-request.js +1 -1
  83. package/dist/esm/models/share-result-error.js +1 -1
  84. package/dist/esm/models/signature-envelope-dto.js +1 -1
  85. package/dist/esm/models/signature-recipient-dto.js +1 -1
  86. package/dist/esm/models/sort-input.js +1 -1
  87. package/dist/esm/models/team-member-info.js +1 -1
  88. package/dist/esm/models/update-user-request.js +1 -1
  89. package/dist/esm/models/user-registration-request.js +1 -1
  90. package/dist/models/audit-verification-result.js +1 -1
  91. package/dist/models/create-blank-document-request.js +1 -1
  92. package/dist/models/create-delegated-grant-request.js +1 -1
  93. package/dist/models/delegated-grant-dto.js +2 -2
  94. package/dist/models/document-info.js +1 -1
  95. package/dist/models/document-version-info.d.ts +32 -0
  96. package/dist/models/document-version-info.js +15 -0
  97. package/dist/models/enriched-audit-log-details.d.ts +3 -0
  98. package/dist/models/enriched-audit-log.d.ts +1 -0
  99. package/dist/models/enriched-audit-log.js +3 -2
  100. package/dist/models/folder-element-info.js +1 -1
  101. package/dist/models/index.d.ts +3 -0
  102. package/dist/models/index.js +3 -0
  103. package/dist/models/notification-dto.js +1 -1
  104. package/dist/models/public-signature-view.js +2 -2
  105. package/dist/models/restore-version-audit.d.ts +17 -0
  106. package/dist/models/restore-version-audit.js +15 -0
  107. package/dist/models/restore-version-response.d.ts +32 -0
  108. package/dist/models/restore-version-response.js +15 -0
  109. package/dist/models/search-by-audit-log-request.d.ts +1 -0
  110. package/dist/models/search-by-audit-log-request.js +3 -2
  111. package/dist/models/search-by-metadata-request.js +1 -1
  112. package/dist/models/share-request.js +1 -1
  113. package/dist/models/share-result-error.js +1 -1
  114. package/dist/models/signature-envelope-dto.js +1 -1
  115. package/dist/models/signature-recipient-dto.js +1 -1
  116. package/dist/models/sort-input.js +1 -1
  117. package/dist/models/team-member-info.js +1 -1
  118. package/dist/models/update-user-request.js +1 -1
  119. package/dist/models/user-registration-request.js +1 -1
  120. package/docs/CopyAudit.md +2 -0
  121. package/docs/DocumentVersionControllerApi.md +169 -0
  122. package/docs/DocumentVersionInfo.md +27 -0
  123. package/docs/EnrichedAuditLogDetails.md +6 -0
  124. package/docs/ReplaceAudit.md +2 -0
  125. package/docs/RestoreVersionAudit.md +27 -0
  126. package/docs/RestoreVersionResponse.md +27 -0
  127. package/docs/UploadAudit.md +2 -0
  128. package/models/audit-verification-result.ts +1 -1
  129. package/models/create-blank-document-request.ts +1 -1
  130. package/models/create-delegated-grant-request.ts +1 -1
  131. package/models/delegated-grant-dto.ts +2 -2
  132. package/models/document-info.ts +1 -1
  133. package/models/document-version-info.ts +38 -0
  134. package/models/enriched-audit-log-details.ts +4 -1
  135. package/models/enriched-audit-log.ts +3 -2
  136. package/models/folder-element-info.ts +1 -1
  137. package/models/index.ts +3 -0
  138. package/models/notification-dto.ts +1 -1
  139. package/models/public-signature-view.ts +2 -2
  140. package/models/restore-version-audit.ts +26 -0
  141. package/models/restore-version-response.ts +38 -0
  142. package/models/search-by-audit-log-request.ts +3 -2
  143. package/models/search-by-metadata-request.ts +1 -1
  144. package/models/share-request.ts +1 -1
  145. package/models/share-result-error.ts +1 -1
  146. package/models/signature-envelope-dto.ts +1 -1
  147. package/models/signature-recipient-dto.ts +1 -1
  148. package/models/sort-input.ts +1 -1
  149. package/models/team-member-info.ts +1 -1
  150. package/models/update-user-request.ts +1 -1
  151. package/models/user-registration-request.ts +1 -1
  152. package/package.json +2 -2
@@ -0,0 +1,277 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * DocumentVersionControllerApi - axios parameter creator
31
+ */
32
+ export const DocumentVersionControllerApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Downloads the content of a specific stored version of a file document.
36
+ * @summary Download a specific document version
37
+ * @param {string} documentId
38
+ * @param {string} versionId
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ downloadVersion: (documentId_1, versionId_1, ...args_1) => __awaiter(this, [documentId_1, versionId_1, ...args_1], void 0, function* (documentId, versionId, options = {}) {
43
+ // verify required parameter 'documentId' is not null or undefined
44
+ assertParamExists('downloadVersion', 'documentId', documentId);
45
+ // verify required parameter 'versionId' is not null or undefined
46
+ assertParamExists('downloadVersion', 'versionId', versionId);
47
+ const localVarPath = `/api/v1/documents/{documentId}/versions/{versionId}/download`
48
+ .replace('{documentId}', encodeURIComponent(String(documentId)))
49
+ .replace('{versionId}', encodeURIComponent(String(versionId)));
50
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
51
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
52
+ let baseOptions;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ }
56
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
57
+ const localVarHeaderParameter = {};
58
+ const localVarQueryParameter = {};
59
+ // authentication keycloak_auth required
60
+ // http bearer authentication required
61
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
62
+ localVarHeaderParameter['Accept'] = '*/*';
63
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
64
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
65
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
66
+ return {
67
+ url: toPathString(localVarUrlObj),
68
+ options: localVarRequestOptions,
69
+ };
70
+ }),
71
+ /**
72
+ * Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
73
+ * @summary List document versions
74
+ * @param {string} documentId
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ listVersions: (documentId_1, ...args_1) => __awaiter(this, [documentId_1, ...args_1], void 0, function* (documentId, options = {}) {
79
+ // verify required parameter 'documentId' is not null or undefined
80
+ assertParamExists('listVersions', 'documentId', documentId);
81
+ const localVarPath = `/api/v1/documents/{documentId}/versions`
82
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
83
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
84
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
85
+ let baseOptions;
86
+ if (configuration) {
87
+ baseOptions = configuration.baseOptions;
88
+ }
89
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
90
+ const localVarHeaderParameter = {};
91
+ const localVarQueryParameter = {};
92
+ // authentication keycloak_auth required
93
+ // http bearer authentication required
94
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
95
+ localVarHeaderParameter['Accept'] = '*/*';
96
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
97
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
99
+ return {
100
+ url: toPathString(localVarUrlObj),
101
+ options: localVarRequestOptions,
102
+ };
103
+ }),
104
+ /**
105
+ * 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).
106
+ * @summary Restore a previous document version
107
+ * @param {string} documentId
108
+ * @param {string} versionId
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ restoreVersion: (documentId_1, versionId_1, ...args_1) => __awaiter(this, [documentId_1, versionId_1, ...args_1], void 0, function* (documentId, versionId, options = {}) {
113
+ // verify required parameter 'documentId' is not null or undefined
114
+ assertParamExists('restoreVersion', 'documentId', documentId);
115
+ // verify required parameter 'versionId' is not null or undefined
116
+ assertParamExists('restoreVersion', 'versionId', versionId);
117
+ const localVarPath = `/api/v1/documents/{documentId}/versions/{versionId}/restore`
118
+ .replace('{documentId}', encodeURIComponent(String(documentId)))
119
+ .replace('{versionId}', encodeURIComponent(String(versionId)));
120
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
121
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
122
+ let baseOptions;
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ }
126
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
127
+ const localVarHeaderParameter = {};
128
+ const localVarQueryParameter = {};
129
+ // authentication keycloak_auth required
130
+ // http bearer authentication required
131
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
132
+ localVarHeaderParameter['Accept'] = '*/*';
133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
135
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
136
+ return {
137
+ url: toPathString(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ };
140
+ }),
141
+ };
142
+ };
143
+ /**
144
+ * DocumentVersionControllerApi - functional programming interface
145
+ */
146
+ export const DocumentVersionControllerApiFp = function (configuration) {
147
+ const localVarAxiosParamCreator = DocumentVersionControllerApiAxiosParamCreator(configuration);
148
+ return {
149
+ /**
150
+ * Downloads the content of a specific stored version of a file document.
151
+ * @summary Download a specific document version
152
+ * @param {string} documentId
153
+ * @param {string} versionId
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ downloadVersion(documentId, versionId, options) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ var _a, _b, _c;
160
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadVersion(documentId, versionId, options);
161
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
162
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentVersionControllerApi.downloadVersion']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
163
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
164
+ });
165
+ },
166
+ /**
167
+ * Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
168
+ * @summary List document versions
169
+ * @param {string} documentId
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
173
+ listVersions(documentId, options) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ var _a, _b, _c;
176
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listVersions(documentId, options);
177
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
178
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentVersionControllerApi.listVersions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
179
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
180
+ });
181
+ },
182
+ /**
183
+ * 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).
184
+ * @summary Restore a previous document version
185
+ * @param {string} documentId
186
+ * @param {string} versionId
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ restoreVersion(documentId, versionId, options) {
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ var _a, _b, _c;
193
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restoreVersion(documentId, versionId, options);
194
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
195
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentVersionControllerApi.restoreVersion']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
196
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
197
+ });
198
+ },
199
+ };
200
+ };
201
+ /**
202
+ * DocumentVersionControllerApi - factory interface
203
+ */
204
+ export const DocumentVersionControllerApiFactory = function (configuration, basePath, axios) {
205
+ const localVarFp = DocumentVersionControllerApiFp(configuration);
206
+ return {
207
+ /**
208
+ * Downloads the content of a specific stored version of a file document.
209
+ * @summary Download a specific document version
210
+ * @param {string} documentId
211
+ * @param {string} versionId
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ downloadVersion(documentId, versionId, options) {
216
+ return localVarFp.downloadVersion(documentId, versionId, options).then((request) => request(axios, basePath));
217
+ },
218
+ /**
219
+ * Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
220
+ * @summary List document versions
221
+ * @param {string} documentId
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ listVersions(documentId, options) {
226
+ return localVarFp.listVersions(documentId, options).then((request) => request(axios, basePath));
227
+ },
228
+ /**
229
+ * 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).
230
+ * @summary Restore a previous document version
231
+ * @param {string} documentId
232
+ * @param {string} versionId
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ restoreVersion(documentId, versionId, options) {
237
+ return localVarFp.restoreVersion(documentId, versionId, options).then((request) => request(axios, basePath));
238
+ },
239
+ };
240
+ };
241
+ /**
242
+ * DocumentVersionControllerApi - object-oriented interface
243
+ */
244
+ export class DocumentVersionControllerApi extends BaseAPI {
245
+ /**
246
+ * Downloads the content of a specific stored version of a file document.
247
+ * @summary Download a specific document version
248
+ * @param {string} documentId
249
+ * @param {string} versionId
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ downloadVersion(documentId, versionId, options) {
254
+ return DocumentVersionControllerApiFp(this.configuration).downloadVersion(documentId, versionId, options).then((request) => request(this.axios, this.basePath));
255
+ }
256
+ /**
257
+ * Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
258
+ * @summary List document versions
259
+ * @param {string} documentId
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ listVersions(documentId, options) {
264
+ return DocumentVersionControllerApiFp(this.configuration).listVersions(documentId, options).then((request) => request(this.axios, this.basePath));
265
+ }
266
+ /**
267
+ * 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).
268
+ * @summary Restore a previous document version
269
+ * @param {string} documentId
270
+ * @param {string} versionId
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ */
274
+ restoreVersion(documentId, versionId, options) {
275
+ return DocumentVersionControllerApiFp(this.configuration).restoreVersion(documentId, versionId, options).then((request) => request(this.axios, this.basePath));
276
+ }
277
+ }
@@ -42,7 +42,7 @@ export const FavoritesApiAxiosParamCreator = function (configuration) {
42
42
  // verify required parameter 'documentId' is not null or undefined
43
43
  assertParamExists('addFavorite', 'documentId', documentId);
44
44
  const localVarPath = `/api/v1/favorites/{documentId}`
45
- .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
45
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
46
46
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
47
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
48
  let baseOptions;
@@ -74,7 +74,7 @@ export const FavoritesApiAxiosParamCreator = function (configuration) {
74
74
  // verify required parameter 'documentId' is not null or undefined
75
75
  assertParamExists('isFavorite', 'documentId', documentId);
76
76
  const localVarPath = `/api/v1/favorites/{documentId}/is-favorite`
77
- .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
77
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
78
78
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
79
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
80
  let baseOptions;
@@ -107,7 +107,7 @@ export const FavoritesApiAxiosParamCreator = function (configuration) {
107
107
  // verify required parameter 'documentId' is not null or undefined
108
108
  assertParamExists('removeFavorite', 'documentId', documentId);
109
109
  const localVarPath = `/api/v1/favorites/{documentId}`
110
- .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
110
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
111
111
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
112
112
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
113
113
  let baseOptions;
@@ -139,7 +139,7 @@ export const FavoritesApiAxiosParamCreator = function (configuration) {
139
139
  // verify required parameter 'documentId' is not null or undefined
140
140
  assertParamExists('toggleFavorite', 'documentId', documentId);
141
141
  const localVarPath = `/api/v1/favorites/{documentId}/toggle`
142
- .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
142
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
143
143
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
144
144
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
145
145
  let baseOptions;
@@ -145,7 +145,7 @@ export const FileControllerApiAxiosParamCreator = function (configuration) {
145
145
  // verify required parameter 'renameRequest' is not null or undefined
146
146
  assertParamExists('renameFile', 'renameRequest', renameRequest);
147
147
  const localVarPath = `/api/v1/files/{fileId}/rename`
148
- .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
148
+ .replace('{fileId}', encodeURIComponent(String(fileId)));
149
149
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
150
150
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
151
151
  let baseOptions;
@@ -253,7 +253,7 @@ export const FolderControllerApiAxiosParamCreator = function (configuration) {
253
253
  // verify required parameter 'renameRequest' is not null or undefined
254
254
  assertParamExists('renameFolder', 'renameRequest', renameRequest);
255
255
  const localVarPath = `/api/v1/folders/{folderId}/rename`
256
- .replace(`{${"folderId"}}`, encodeURIComponent(String(folderId)));
256
+ .replace('{folderId}', encodeURIComponent(String(folderId)));
257
257
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
258
258
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
259
259
  let baseOptions;
@@ -128,7 +128,7 @@ export const NotificationsApiAxiosParamCreator = function (configuration) {
128
128
  // verify required parameter 'id' is not null or undefined
129
129
  assertParamExists('markAsRead', 'id', id);
130
130
  const localVarPath = `/api/v1/notifications/{id}/read`
131
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
131
+ .replace('{id}', encodeURIComponent(String(id)));
132
132
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
133
133
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
134
134
  let baseOptions;
@@ -44,7 +44,7 @@ export const ScanAgentApiAxiosParamCreator = function (configuration) {
44
44
  // verify required parameter 'platform' is not null or undefined
45
45
  assertParamExists('download', 'platform', platform);
46
46
  const localVarPath = `/api/v1/agent/download/{platform}`
47
- .replace(`{${"platform"}}`, encodeURIComponent(String(platform)));
47
+ .replace('{platform}', encodeURIComponent(String(platform)));
48
48
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
49
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
50
50
  let baseOptions;
@@ -74,8 +74,8 @@ export const ScannerProxyApiAxiosParamCreator = function (configuration) {
74
74
  // verify required parameter 'jobId' is not null or undefined
75
75
  assertParamExists('getScanJobStatus', 'jobId', jobId);
76
76
  const localVarPath = `/api/v1/scan/scanners/{id}/scan/{jobId}/status`
77
- .replace(`{${"id"}}`, encodeURIComponent(String(id)))
78
- .replace(`{${"jobId"}}`, encodeURIComponent(String(jobId)));
77
+ .replace('{id}', encodeURIComponent(String(id)))
78
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
79
79
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
80
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
81
  let baseOptions;
@@ -108,7 +108,7 @@ export const ScannerProxyApiAxiosParamCreator = function (configuration) {
108
108
  // verify required parameter 'id' is not null or undefined
109
109
  assertParamExists('getScannerCapabilities', 'id', id);
110
110
  const localVarPath = `/api/v1/scan/scanners/{id}/capabilities`
111
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
111
+ .replace('{id}', encodeURIComponent(String(id)));
112
112
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
113
113
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
114
114
  let baseOptions;
@@ -172,7 +172,7 @@ export const ScannerProxyApiAxiosParamCreator = function (configuration) {
172
172
  // verify required parameter 'id' is not null or undefined
173
173
  assertParamExists('triggerScan', 'id', id);
174
174
  const localVarPath = `/api/v1/scan/scanners/{id}/scan`
175
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
175
+ .replace('{id}', encodeURIComponent(String(id)));
176
176
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
177
177
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
178
178
  let baseOptions;
@@ -70,7 +70,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
70
70
  // verify required parameter 'uploadId' is not null or undefined
71
71
  assertParamExists('cancelUpload', 'uploadId', uploadId);
72
72
  const localVarPath = `/api/v1/tus/{uploadId}`
73
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
73
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
74
74
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
75
75
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
76
76
  let baseOptions;
@@ -145,7 +145,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
145
145
  // verify required parameter 'tusFinalizeRequest' is not null or undefined
146
146
  assertParamExists('finalizeUpload', 'tusFinalizeRequest', tusFinalizeRequest);
147
147
  const localVarPath = `/api/v1/tus/{uploadId}/finalize`
148
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
148
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
149
149
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
150
150
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
151
151
  let baseOptions;
@@ -209,7 +209,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
209
209
  // verify required parameter 'uploadId' is not null or undefined
210
210
  assertParamExists('getUploadInfo', 'uploadId', uploadId);
211
211
  const localVarPath = `/api/v1/tus/{uploadId}/info`
212
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
212
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
213
213
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
214
214
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
215
215
  let baseOptions;
@@ -242,7 +242,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
242
242
  // verify required parameter 'uploadId' is not null or undefined
243
243
  assertParamExists('getUploadOffset', 'uploadId', uploadId);
244
244
  const localVarPath = `/api/v1/tus/{uploadId}`
245
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
245
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
246
246
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
247
247
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
248
248
  let baseOptions;
@@ -274,7 +274,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
274
274
  // verify required parameter 'uploadId' is not null or undefined
275
275
  assertParamExists('isUploadComplete', 'uploadId', uploadId);
276
276
  const localVarPath = `/api/v1/tus/{uploadId}/complete`
277
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
277
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
278
278
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
279
279
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
280
280
  let baseOptions;
@@ -314,7 +314,7 @@ export const TusControllerApiAxiosParamCreator = function (configuration) {
314
314
  // verify required parameter 'requestBody' is not null or undefined
315
315
  assertParamExists('uploadChunk', 'requestBody', requestBody);
316
316
  const localVarPath = `/api/v1/tus/{uploadId}`
317
- .replace(`{${"uploadId"}}`, encodeURIComponent(String(uploadId)));
317
+ .replace('{uploadId}', encodeURIComponent(String(uploadId)));
318
318
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
319
319
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
320
320
  let baseOptions;
package/dist/esm/api.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './api/digital-signature-api';
19
19
  export * from './api/digital-signature-public-api';
20
20
  export * from './api/document-controller-api';
21
21
  export * from './api/document-suggestion-controller-api';
22
+ export * from './api/document-version-controller-api';
22
23
  export * from './api/favorites-api';
23
24
  export * from './api/file-controller-api';
24
25
  export * from './api/folder-controller-api';
package/dist/esm/api.js CHANGED
@@ -21,6 +21,7 @@ export * from './api/digital-signature-api';
21
21
  export * from './api/digital-signature-public-api';
22
22
  export * from './api/document-controller-api';
23
23
  export * from './api/document-suggestion-controller-api';
24
+ export * from './api/document-version-controller-api';
24
25
  export * from './api/favorites-api';
25
26
  export * from './api/file-controller-api';
26
27
  export * from './api/folder-controller-api';
@@ -34,7 +34,7 @@ export class Configuration {
34
34
  * @return True if the given MIME is JSON, false otherwise.
35
35
  */
36
36
  isJsonMime(mime) {
37
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
38
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
37
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
38
+ return mime !== null && jsonMime.test(mime);
39
39
  }
40
40
  }
@@ -14,5 +14,5 @@
14
14
  export const AuditVerificationResultStatusEnum = {
15
15
  Valid: 'VALID',
16
16
  Broken: 'BROKEN',
17
- Empty: 'EMPTY'
17
+ Empty: 'EMPTY',
18
18
  };
@@ -15,5 +15,5 @@ export const CreateBlankDocumentRequestDocumentTypeEnum = {
15
15
  Word: 'WORD',
16
16
  Excel: 'EXCEL',
17
17
  Powerpoint: 'POWERPOINT',
18
- Text: 'TEXT'
18
+ Text: 'TEXT',
19
19
  };
@@ -12,5 +12,5 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export const CreateDelegatedGrantRequestPurposeEnum = {
15
- WebhookSubscription: 'WEBHOOK_SUBSCRIPTION'
15
+ WebhookSubscription: 'WEBHOOK_SUBSCRIPTION',
16
16
  };
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export const DelegatedGrantDTOPurposeEnum = {
15
- WebhookSubscription: 'WEBHOOK_SUBSCRIPTION'
15
+ WebhookSubscription: 'WEBHOOK_SUBSCRIPTION',
16
16
  };
17
17
  export const DelegatedGrantDTOStatusEnum = {
18
18
  Pending: 'PENDING',
@@ -20,5 +20,5 @@ export const DelegatedGrantDTOStatusEnum = {
20
20
  Declined: 'DECLINED',
21
21
  Revoked: 'REVOKED',
22
22
  Expired: 'EXPIRED',
23
- Consumed: 'CONSUMED'
23
+ Consumed: 'CONSUMED',
24
24
  };
@@ -13,5 +13,5 @@
13
13
  */
14
14
  export const DocumentInfoTypeEnum = {
15
15
  File: 'FILE',
16
- Folder: 'FOLDER'
16
+ Folder: 'FOLDER',
17
17
  };
@@ -0,0 +1,32 @@
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
+ /**
13
+ * Information about a single stored version of a file document
14
+ */
15
+ export interface DocumentVersionInfo {
16
+ /**
17
+ * Storage version identifier (MinIO/S3 versionId)
18
+ */
19
+ 'versionId'?: string;
20
+ /**
21
+ * Date the version was created
22
+ */
23
+ 'lastModified'?: string;
24
+ /**
25
+ * Size of the version in bytes
26
+ */
27
+ 'size'?: number;
28
+ /**
29
+ * True if this version is the current (latest) one
30
+ */
31
+ 'latest'?: boolean;
32
+ }
@@ -0,0 +1,14 @@
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
+ export {};
@@ -16,6 +16,7 @@ import type { DeleteMetadataAudit } from './delete-metadata-audit';
16
16
  import type { MoveAudit } from './move-audit';
17
17
  import type { RenameAudit } from './rename-audit';
18
18
  import type { ReplaceAudit } from './replace-audit';
19
+ import type { RestoreVersionAudit } from './restore-version-audit';
19
20
  import type { UpdateMetadataAudit } from './update-metadata-audit';
20
21
  import type { UploadAudit } from './upload-audit';
21
22
  /**
@@ -36,6 +37,8 @@ export type EnrichedAuditLogDetails = {
36
37
  } & RenameAudit | {
37
38
  type: 'replace';
38
39
  } & ReplaceAudit | {
40
+ type: 'restoreVersion';
41
+ } & RestoreVersionAudit | {
39
42
  type: 'updateMetadata';
40
43
  } & UpdateMetadataAudit | {
41
44
  type: 'upload';
@@ -39,6 +39,7 @@ export declare const EnrichedAuditLogActionEnum: {
39
39
  readonly MoveFolder: "MOVE_FOLDER";
40
40
  readonly UploadDocument: "UPLOAD_DOCUMENT";
41
41
  readonly ReplaceDocumentContent: "REPLACE_DOCUMENT_CONTENT";
42
+ readonly RestoreDocumentVersion: "RESTORE_DOCUMENT_VERSION";
42
43
  readonly ReplaceDocumentMetadata: "REPLACE_DOCUMENT_METADATA";
43
44
  readonly UpdateDocumentMetadata: "UPDATE_DOCUMENT_METADATA";
44
45
  readonly DownloadDocument: "DOWNLOAD_DOCUMENT";
@@ -25,6 +25,7 @@ export const EnrichedAuditLogActionEnum = {
25
25
  MoveFolder: 'MOVE_FOLDER',
26
26
  UploadDocument: 'UPLOAD_DOCUMENT',
27
27
  ReplaceDocumentContent: 'REPLACE_DOCUMENT_CONTENT',
28
+ RestoreDocumentVersion: 'RESTORE_DOCUMENT_VERSION',
28
29
  ReplaceDocumentMetadata: 'REPLACE_DOCUMENT_METADATA',
29
30
  UpdateDocumentMetadata: 'UPDATE_DOCUMENT_METADATA',
30
31
  DownloadDocument: 'DOWNLOAD_DOCUMENT',
@@ -57,9 +58,9 @@ export const EnrichedAuditLogActionEnum = {
57
58
  SignatureEnvelopeCompleted: 'SIGNATURE_ENVELOPE_COMPLETED',
58
59
  SignatureEnvelopeDeclined: 'SIGNATURE_ENVELOPE_DECLINED',
59
60
  SignatureEnvelopeCancelled: 'SIGNATURE_ENVELOPE_CANCELLED',
60
- SignatureEnvelopeExpired: 'SIGNATURE_ENVELOPE_EXPIRED'
61
+ SignatureEnvelopeExpired: 'SIGNATURE_ENVELOPE_EXPIRED',
61
62
  };
62
63
  export const EnrichedAuditLogResourceTypeEnum = {
63
64
  File: 'FILE',
64
- Folder: 'FOLDER'
65
+ Folder: 'FOLDER',
65
66
  };
@@ -13,5 +13,5 @@
13
13
  */
14
14
  export const FolderElementInfoTypeEnum = {
15
15
  File: 'FILE',
16
- Folder: 'FOLDER'
16
+ Folder: 'FOLDER',
17
17
  };
@@ -26,6 +26,7 @@ export * from './delete-request';
26
26
  export * from './delete-share-request';
27
27
  export * from './document-info';
28
28
  export * from './document-position';
29
+ export * from './document-version-info';
29
30
  export * from './element-info';
30
31
  export * from './enriched-audit-log';
31
32
  export * from './enriched-audit-log-details';
@@ -42,6 +43,8 @@ export * from './public-signature-view';
42
43
  export * from './rename-audit';
43
44
  export * from './rename-request';
44
45
  export * from './replace-audit';
46
+ export * from './restore-version-audit';
47
+ export * from './restore-version-response';
45
48
  export * from './scan-job-status-dto';
46
49
  export * from './scan-request-dto';
47
50
  export * from './scanner-info-dto';