@openfilz-sdk/typescript 1.2.2 → 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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* openfilz-api
|
|
6
|
+
* API for Document Management System
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -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
|
+
* Result of restoring a previous version of a file document
|
|
14
|
+
*/
|
|
15
|
+
export interface RestoreVersionResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Document identifier
|
|
18
|
+
*/
|
|
19
|
+
'documentId'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Version identifier that was restored
|
|
22
|
+
*/
|
|
23
|
+
'restoredFromVersionId'?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Creation date of the restored version
|
|
26
|
+
*/
|
|
27
|
+
'restoredFromDate'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Identifier of the new latest version created by the restore
|
|
30
|
+
*/
|
|
31
|
+
'newVersionId'?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* openfilz-api
|
|
6
|
+
* API for Document Management System
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -55,6 +55,7 @@ export declare const SearchByAuditLogRequestActionEnum: {
|
|
|
55
55
|
readonly MoveFolder: "MOVE_FOLDER";
|
|
56
56
|
readonly UploadDocument: "UPLOAD_DOCUMENT";
|
|
57
57
|
readonly ReplaceDocumentContent: "REPLACE_DOCUMENT_CONTENT";
|
|
58
|
+
readonly RestoreDocumentVersion: "RESTORE_DOCUMENT_VERSION";
|
|
58
59
|
readonly ReplaceDocumentMetadata: "REPLACE_DOCUMENT_METADATA";
|
|
59
60
|
readonly UpdateDocumentMetadata: "UPDATE_DOCUMENT_METADATA";
|
|
60
61
|
readonly DownloadDocument: "DOWNLOAD_DOCUMENT";
|
|
@@ -32,6 +32,7 @@ exports.SearchByAuditLogRequestActionEnum = {
|
|
|
32
32
|
MoveFolder: 'MOVE_FOLDER',
|
|
33
33
|
UploadDocument: 'UPLOAD_DOCUMENT',
|
|
34
34
|
ReplaceDocumentContent: 'REPLACE_DOCUMENT_CONTENT',
|
|
35
|
+
RestoreDocumentVersion: 'RESTORE_DOCUMENT_VERSION',
|
|
35
36
|
ReplaceDocumentMetadata: 'REPLACE_DOCUMENT_METADATA',
|
|
36
37
|
UpdateDocumentMetadata: 'UPDATE_DOCUMENT_METADATA',
|
|
37
38
|
DownloadDocument: 'DOWNLOAD_DOCUMENT',
|
|
@@ -9,12 +9,15 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**sourceFileId** | **string** | | [optional] [default to undefined]
|
|
10
10
|
**targetFolderId** | **string** | | [optional] [default to undefined]
|
|
11
11
|
**sourceFolderId** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**versionId** | **string** | Storage version identifier created by this upload (only when versioning is enabled) | [optional] [default to undefined]
|
|
12
13
|
**request** | [**CreateFolderRequest**](CreateFolderRequest.md) | | [optional] [default to undefined]
|
|
13
14
|
**deletedParentFolderId** | **string** | | [optional] [default to undefined]
|
|
14
15
|
**deletedMetadataKeys** | **Array<string>** | List of deleted metadata keys | [optional] [default to undefined]
|
|
15
16
|
**name** | **string** | New name of the document | [optional] [default to undefined]
|
|
16
17
|
**filename** | **string** | | [optional] [default to undefined]
|
|
17
18
|
**metadata** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
19
|
+
**restoredFromVersionId** | **string** | Version identifier that was restored | [optional] [default to undefined]
|
|
20
|
+
**restoredFromDate** | **string** | Creation date of the restored version | [optional] [default to undefined]
|
|
18
21
|
**updatedMetadata** | **{ [key: string]: any; }** | Updated Metadata | [optional] [default to undefined]
|
|
19
22
|
**parentFolderId** | **string** | | [optional] [default to undefined]
|
|
20
23
|
|
|
@@ -28,12 +31,15 @@ const instance: AuditLogDetailsOneOf = {
|
|
|
28
31
|
sourceFileId,
|
|
29
32
|
targetFolderId,
|
|
30
33
|
sourceFolderId,
|
|
34
|
+
versionId,
|
|
31
35
|
request,
|
|
32
36
|
deletedParentFolderId,
|
|
33
37
|
deletedMetadataKeys,
|
|
34
38
|
name,
|
|
35
39
|
filename,
|
|
36
40
|
metadata,
|
|
41
|
+
restoredFromVersionId,
|
|
42
|
+
restoredFromDate,
|
|
37
43
|
updatedMetadata,
|
|
38
44
|
parentFolderId,
|
|
39
45
|
};
|
package/docs/CopyAudit.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**sourceFileId** | **string** | | [optional] [default to undefined]
|
|
10
10
|
**targetFolderId** | **string** | | [optional] [default to undefined]
|
|
11
11
|
**sourceFolderId** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**versionId** | **string** | Storage version identifier of the copied file\'s initial version (only when versioning is enabled) | [optional] [default to undefined]
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ const instance: CopyAudit = {
|
|
|
19
20
|
sourceFileId,
|
|
20
21
|
targetFolderId,
|
|
21
22
|
sourceFolderId,
|
|
23
|
+
versionId,
|
|
22
24
|
};
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# DocumentVersionControllerApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8081*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**downloadVersion**](#downloadversion) | **GET** /api/v1/documents/{documentId}/versions/{versionId}/download | Download a specific document version|
|
|
8
|
+
|[**listVersions**](#listversions) | **GET** /api/v1/documents/{documentId}/versions | List document versions|
|
|
9
|
+
|[**restoreVersion**](#restoreversion) | **POST** /api/v1/documents/{documentId}/versions/{versionId}/restore | Restore a previous document version|
|
|
10
|
+
|
|
11
|
+
# **downloadVersion**
|
|
12
|
+
> File downloadVersion()
|
|
13
|
+
|
|
14
|
+
Downloads the content of a specific stored version of a file document.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
DocumentVersionControllerApi,
|
|
21
|
+
Configuration
|
|
22
|
+
} from '@openfilz-sdk/typescript';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new DocumentVersionControllerApi(configuration);
|
|
26
|
+
|
|
27
|
+
let documentId: string; // (default to undefined)
|
|
28
|
+
let versionId: string; // (default to undefined)
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.downloadVersion(
|
|
31
|
+
documentId,
|
|
32
|
+
versionId
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **documentId** | [**string**] | | defaults to undefined|
|
|
41
|
+
| **versionId** | [**string**] | | defaults to undefined|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**File**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[keycloak_auth](../README.md#keycloak_auth)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: Not defined
|
|
55
|
+
- **Accept**: */*
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**200** | OK | - |
|
|
62
|
+
|
|
63
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
64
|
+
|
|
65
|
+
# **listVersions**
|
|
66
|
+
> Array<DocumentVersionInfo> listVersions()
|
|
67
|
+
|
|
68
|
+
Lists all stored versions of a file document, newest first. Requires storage versioning to be enabled (otherwise HTTP 409).
|
|
69
|
+
|
|
70
|
+
### Example
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import {
|
|
74
|
+
DocumentVersionControllerApi,
|
|
75
|
+
Configuration
|
|
76
|
+
} from '@openfilz-sdk/typescript';
|
|
77
|
+
|
|
78
|
+
const configuration = new Configuration();
|
|
79
|
+
const apiInstance = new DocumentVersionControllerApi(configuration);
|
|
80
|
+
|
|
81
|
+
let documentId: string; // (default to undefined)
|
|
82
|
+
|
|
83
|
+
const { status, data } = await apiInstance.listVersions(
|
|
84
|
+
documentId
|
|
85
|
+
);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Parameters
|
|
89
|
+
|
|
90
|
+
|Name | Type | Description | Notes|
|
|
91
|
+
|------------- | ------------- | ------------- | -------------|
|
|
92
|
+
| **documentId** | [**string**] | | defaults to undefined|
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Return type
|
|
96
|
+
|
|
97
|
+
**Array<DocumentVersionInfo>**
|
|
98
|
+
|
|
99
|
+
### Authorization
|
|
100
|
+
|
|
101
|
+
[keycloak_auth](../README.md#keycloak_auth)
|
|
102
|
+
|
|
103
|
+
### HTTP request headers
|
|
104
|
+
|
|
105
|
+
- **Content-Type**: Not defined
|
|
106
|
+
- **Accept**: */*
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### HTTP response details
|
|
110
|
+
| Status code | Description | Response headers |
|
|
111
|
+
|-------------|-------------|------------------|
|
|
112
|
+
|**200** | OK | - |
|
|
113
|
+
|
|
114
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
115
|
+
|
|
116
|
+
# **restoreVersion**
|
|
117
|
+
> RestoreVersionResponse restoreVersion()
|
|
118
|
+
|
|
119
|
+
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).
|
|
120
|
+
|
|
121
|
+
### Example
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import {
|
|
125
|
+
DocumentVersionControllerApi,
|
|
126
|
+
Configuration
|
|
127
|
+
} from '@openfilz-sdk/typescript';
|
|
128
|
+
|
|
129
|
+
const configuration = new Configuration();
|
|
130
|
+
const apiInstance = new DocumentVersionControllerApi(configuration);
|
|
131
|
+
|
|
132
|
+
let documentId: string; // (default to undefined)
|
|
133
|
+
let versionId: string; // (default to undefined)
|
|
134
|
+
|
|
135
|
+
const { status, data } = await apiInstance.restoreVersion(
|
|
136
|
+
documentId,
|
|
137
|
+
versionId
|
|
138
|
+
);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Parameters
|
|
142
|
+
|
|
143
|
+
|Name | Type | Description | Notes|
|
|
144
|
+
|------------- | ------------- | ------------- | -------------|
|
|
145
|
+
| **documentId** | [**string**] | | defaults to undefined|
|
|
146
|
+
| **versionId** | [**string**] | | defaults to undefined|
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Return type
|
|
150
|
+
|
|
151
|
+
**RestoreVersionResponse**
|
|
152
|
+
|
|
153
|
+
### Authorization
|
|
154
|
+
|
|
155
|
+
[keycloak_auth](../README.md#keycloak_auth)
|
|
156
|
+
|
|
157
|
+
### HTTP request headers
|
|
158
|
+
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: */*
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### HTTP response details
|
|
164
|
+
| Status code | Description | Response headers |
|
|
165
|
+
|-------------|-------------|------------------|
|
|
166
|
+
|**200** | OK | - |
|
|
167
|
+
|
|
168
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
169
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DocumentVersionInfo
|
|
2
|
+
|
|
3
|
+
Information about a single stored version of a file document
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**versionId** | **string** | Storage version identifier (MinIO/S3 versionId) | [optional] [default to undefined]
|
|
10
|
+
**lastModified** | **string** | Date the version was created | [optional] [default to undefined]
|
|
11
|
+
**size** | **number** | Size of the version in bytes | [optional] [default to undefined]
|
|
12
|
+
**latest** | **boolean** | True if this version is the current (latest) one | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { DocumentVersionInfo } from '@openfilz-sdk/typescript';
|
|
18
|
+
|
|
19
|
+
const instance: DocumentVersionInfo = {
|
|
20
|
+
versionId,
|
|
21
|
+
lastModified,
|
|
22
|
+
size,
|
|
23
|
+
latest,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/ReplaceAudit.md
CHANGED
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**filename** | **string** | New file replacing the existing one | [optional] [default to undefined]
|
|
10
10
|
**metadata** | **{ [key: string]: any; }** | New metadata replacing the existing ones | [optional] [default to undefined]
|
|
11
|
+
**versionId** | **string** | Storage version identifier created by this replace (only when versioning is enabled) | [optional] [default to undefined]
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@ import { ReplaceAudit } from '@openfilz-sdk/typescript';
|
|
|
17
18
|
const instance: ReplaceAudit = {
|
|
18
19
|
filename,
|
|
19
20
|
metadata,
|
|
21
|
+
versionId,
|
|
20
22
|
};
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# RestoreVersionAudit
|
|
2
|
+
|
|
3
|
+
type=restoreVersion
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**filename** | **string** | Name of the file whose version was restored | [optional] [default to undefined]
|
|
10
|
+
**restoredFromVersionId** | **string** | Version identifier that was restored | [optional] [default to undefined]
|
|
11
|
+
**restoredFromDate** | **string** | Creation date of the restored version | [optional] [default to undefined]
|
|
12
|
+
**versionId** | **string** | Identifier of the new latest version created by the restore | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { RestoreVersionAudit } from '@openfilz-sdk/typescript';
|
|
18
|
+
|
|
19
|
+
const instance: RestoreVersionAudit = {
|
|
20
|
+
filename,
|
|
21
|
+
restoredFromVersionId,
|
|
22
|
+
restoredFromDate,
|
|
23
|
+
versionId,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# RestoreVersionResponse
|
|
2
|
+
|
|
3
|
+
Result of restoring a previous version of a file document
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**documentId** | **string** | Document identifier | [optional] [default to undefined]
|
|
10
|
+
**restoredFromVersionId** | **string** | Version identifier that was restored | [optional] [default to undefined]
|
|
11
|
+
**restoredFromDate** | **string** | Creation date of the restored version | [optional] [default to undefined]
|
|
12
|
+
**newVersionId** | **string** | Identifier of the new latest version created by the restore | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { RestoreVersionResponse } from '@openfilz-sdk/typescript';
|
|
18
|
+
|
|
19
|
+
const instance: RestoreVersionResponse = {
|
|
20
|
+
documentId,
|
|
21
|
+
restoredFromVersionId,
|
|
22
|
+
restoredFromDate,
|
|
23
|
+
newVersionId,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/UploadAudit.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**filename** | **string** | | [optional] [default to undefined]
|
|
10
10
|
**parentFolderId** | **string** | | [optional] [default to undefined]
|
|
11
11
|
**metadata** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
12
|
+
**versionId** | **string** | Storage version identifier created by this upload (only when versioning is enabled) | [optional] [default to undefined]
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ const instance: UploadAudit = {
|
|
|
19
20
|
filename,
|
|
20
21
|
parentFolderId,
|
|
21
22
|
metadata,
|
|
23
|
+
versionId,
|
|
22
24
|
};
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -57,6 +57,9 @@ import type { RenameAudit } from './rename-audit';
|
|
|
57
57
|
import type { ReplaceAudit } from './replace-audit';
|
|
58
58
|
// May contain unused imports in some cases
|
|
59
59
|
// @ts-ignore
|
|
60
|
+
import type { RestoreVersionAudit } from './restore-version-audit';
|
|
61
|
+
// May contain unused imports in some cases
|
|
62
|
+
// @ts-ignore
|
|
60
63
|
import type { UpdateMetadataAudit } from './update-metadata-audit';
|
|
61
64
|
// May contain unused imports in some cases
|
|
62
65
|
// @ts-ignore
|
|
@@ -65,6 +68,6 @@ import type { UploadAudit } from './upload-audit';
|
|
|
65
68
|
/**
|
|
66
69
|
* @type AuditLogDetailsOneOf
|
|
67
70
|
*/
|
|
68
|
-
export type AuditLogDetailsOneOf = { type: 'copy' } & CopyAudit | { type: 'createFolder' } & CreateFolderAudit | { type: 'delete' } & DeleteAudit | { type: 'deleteMetadata' } & DeleteMetadataAudit | { type: 'move' } & MoveAudit | { type: 'rename' } & RenameAudit | { type: 'replace' } & ReplaceAudit | { type: 'updateMetadata' } & UpdateMetadataAudit | { type: 'upload' } & UploadAudit;
|
|
71
|
+
export type AuditLogDetailsOneOf = { type: 'copy' } & CopyAudit | { type: 'createFolder' } & CreateFolderAudit | { type: 'delete' } & DeleteAudit | { type: 'deleteMetadata' } & DeleteMetadataAudit | { type: 'move' } & MoveAudit | { type: 'rename' } & RenameAudit | { type: 'replace' } & ReplaceAudit | { type: 'restoreVersion' } & RestoreVersionAudit | { type: 'updateMetadata' } & UpdateMetadataAudit | { type: 'upload' } & UploadAudit;
|
|
69
72
|
|
|
70
73
|
|
package/models/audit-log.ts
CHANGED
|
@@ -45,6 +45,7 @@ export const AuditLogActionEnum = {
|
|
|
45
45
|
MoveFolder: 'MOVE_FOLDER',
|
|
46
46
|
UploadDocument: 'UPLOAD_DOCUMENT',
|
|
47
47
|
ReplaceDocumentContent: 'REPLACE_DOCUMENT_CONTENT',
|
|
48
|
+
RestoreDocumentVersion: 'RESTORE_DOCUMENT_VERSION',
|
|
48
49
|
ReplaceDocumentMetadata: 'REPLACE_DOCUMENT_METADATA',
|
|
49
50
|
UpdateDocumentMetadata: 'UPDATE_DOCUMENT_METADATA',
|
|
50
51
|
DownloadDocument: 'DOWNLOAD_DOCUMENT',
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Information about a single stored version of a file document
|
|
19
|
+
*/
|
|
20
|
+
export interface DocumentVersionInfo {
|
|
21
|
+
/**
|
|
22
|
+
* Storage version identifier (MinIO/S3 versionId)
|
|
23
|
+
*/
|
|
24
|
+
'versionId'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Date the version was created
|
|
27
|
+
*/
|
|
28
|
+
'lastModified'?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the version in bytes
|
|
31
|
+
*/
|
|
32
|
+
'size'?: number;
|
|
33
|
+
/**
|
|
34
|
+
* True if this version is the current (latest) one
|
|
35
|
+
*/
|
|
36
|
+
'latest'?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
package/models/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './delete-metadata-request';
|
|
|
17
17
|
export * from './delete-request';
|
|
18
18
|
export * from './document-info';
|
|
19
19
|
export * from './document-position';
|
|
20
|
+
export * from './document-version-info';
|
|
20
21
|
export * from './element-info';
|
|
21
22
|
export * from './file-type-stats';
|
|
22
23
|
export * from './filter-input';
|
|
@@ -27,6 +28,8 @@ export * from './move-request';
|
|
|
27
28
|
export * from './rename-audit';
|
|
28
29
|
export * from './rename-request';
|
|
29
30
|
export * from './replace-audit';
|
|
31
|
+
export * from './restore-version-audit';
|
|
32
|
+
export * from './restore-version-response';
|
|
30
33
|
export * from './search-by-audit-log-request';
|
|
31
34
|
export * from './search-by-metadata-request';
|
|
32
35
|
export * from './search-metadata-request';
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { AuditLogDetails } from './audit-log-details';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @type RestoreVersionAudit
|
|
22
|
+
* type=restoreVersion
|
|
23
|
+
*/
|
|
24
|
+
export type RestoreVersionAudit = AuditLogDetails;
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Result of restoring a previous version of a file document
|
|
19
|
+
*/
|
|
20
|
+
export interface RestoreVersionResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Document identifier
|
|
23
|
+
*/
|
|
24
|
+
'documentId'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Version identifier that was restored
|
|
27
|
+
*/
|
|
28
|
+
'restoredFromVersionId'?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Creation date of the restored version
|
|
31
|
+
*/
|
|
32
|
+
'restoredFromDate'?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Identifier of the new latest version created by the restore
|
|
35
|
+
*/
|
|
36
|
+
'newVersionId'?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -60,6 +60,7 @@ export const SearchByAuditLogRequestActionEnum = {
|
|
|
60
60
|
MoveFolder: 'MOVE_FOLDER',
|
|
61
61
|
UploadDocument: 'UPLOAD_DOCUMENT',
|
|
62
62
|
ReplaceDocumentContent: 'REPLACE_DOCUMENT_CONTENT',
|
|
63
|
+
RestoreDocumentVersion: 'RESTORE_DOCUMENT_VERSION',
|
|
63
64
|
ReplaceDocumentMetadata: 'REPLACE_DOCUMENT_METADATA',
|
|
64
65
|
UpdateDocumentMetadata: 'UPDATE_DOCUMENT_METADATA',
|
|
65
66
|
DownloadDocument: 'DOWNLOAD_DOCUMENT',
|