@knowledge-stack/ksapi 1.31.0 → 1.32.0
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 +4 -0
- package/README.md +5 -2
- package/dist/apis/FoldersApi.d.ts +45 -1
- package/dist/apis/FoldersApi.js +47 -0
- package/dist/esm/apis/FoldersApi.d.ts +45 -1
- package/dist/esm/apis/FoldersApi.js +48 -1
- package/dist/esm/models/FolderAction.d.ts +24 -0
- package/dist/esm/models/FolderAction.js +42 -0
- package/dist/esm/models/FolderActionResponse.d.ts +60 -0
- package/dist/esm/models/FolderActionResponse.js +53 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/FolderAction.d.ts +24 -0
- package/dist/models/FolderAction.js +50 -0
- package/dist/models/FolderActionResponse.d.ts +60 -0
- package/dist/models/FolderActionResponse.js +61 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/FolderAction.md +33 -0
- package/docs/FolderActionResponse.md +39 -0
- package/docs/FoldersApi.md +75 -0
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +98 -0
- package/src/models/FolderAction.ts +52 -0
- package/src/models/FolderActionResponse.ts +111 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -38,6 +38,8 @@ docs/DocumentVersionsApi.md
|
|
|
38
38
|
docs/DocumentsApi.md
|
|
39
39
|
docs/EmailSentResponse.md
|
|
40
40
|
docs/EmailVerificationRequest.md
|
|
41
|
+
docs/FolderAction.md
|
|
42
|
+
docs/FolderActionResponse.md
|
|
41
43
|
docs/FolderResponse.md
|
|
42
44
|
docs/FolderResponseOrDocumentResponse.md
|
|
43
45
|
docs/FoldersApi.md
|
|
@@ -176,6 +178,8 @@ src/models/DocumentVersionMetadataUpdate.ts
|
|
|
176
178
|
src/models/DocumentVersionResponse.ts
|
|
177
179
|
src/models/EmailSentResponse.ts
|
|
178
180
|
src/models/EmailVerificationRequest.ts
|
|
181
|
+
src/models/FolderAction.ts
|
|
182
|
+
src/models/FolderActionResponse.ts
|
|
179
183
|
src/models/FolderResponse.ts
|
|
180
184
|
src/models/FolderResponseOrDocumentResponse.ts
|
|
181
185
|
src/models/HTTPValidationError.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.32.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -88,6 +88,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
88
88
|
*DocumentsApi* | [**updateDocument**](docs/DocumentsApi.md#updatedocumentoperation) | **PATCH** /v1/documents/{document_id} | Update Document Handler
|
|
89
89
|
*FoldersApi* | [**createFolder**](docs/FoldersApi.md#createfolderoperation) | **POST** /v1/folders | Create Folder Handler
|
|
90
90
|
*FoldersApi* | [**deleteFolder**](docs/FoldersApi.md#deletefolder) | **DELETE** /v1/folders/{folder_id} | Delete Folder Handler
|
|
91
|
+
*FoldersApi* | [**folderAction**](docs/FoldersApi.md#folderaction) | **POST** /v1/folders/{folder_id} | Folder Action Handler
|
|
91
92
|
*FoldersApi* | [**getFolder**](docs/FoldersApi.md#getfolder) | **GET** /v1/folders/{folder_id} | Get Folder Handler
|
|
92
93
|
*FoldersApi* | [**listFolderContents**](docs/FoldersApi.md#listfoldercontents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler
|
|
93
94
|
*FoldersApi* | [**listFolders**](docs/FoldersApi.md#listfolders) | **GET** /v1/folders | List Folders Handler
|
|
@@ -172,6 +173,8 @@ All URIs are relative to *http://localhost:8000*
|
|
|
172
173
|
- [DocumentVersionResponse](docs/DocumentVersionResponse.md)
|
|
173
174
|
- [EmailSentResponse](docs/EmailSentResponse.md)
|
|
174
175
|
- [EmailVerificationRequest](docs/EmailVerificationRequest.md)
|
|
176
|
+
- [FolderAction](docs/FolderAction.md)
|
|
177
|
+
- [FolderActionResponse](docs/FolderActionResponse.md)
|
|
175
178
|
- [FolderResponse](docs/FolderResponse.md)
|
|
176
179
|
- [FolderResponseOrDocumentResponse](docs/FolderResponseOrDocumentResponse.md)
|
|
177
180
|
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
@@ -262,7 +265,7 @@ and is automatically generated by the
|
|
|
262
265
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
263
266
|
|
|
264
267
|
- API version: `0.1.0`
|
|
265
|
-
- Package version: `1.
|
|
268
|
+
- Package version: `1.32.0`
|
|
266
269
|
- Generator version: `7.20.0`
|
|
267
270
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
268
271
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateFolderRequest, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
ksUat?: string | null;
|
|
@@ -19,6 +19,11 @@ export interface DeleteFolderRequest {
|
|
|
19
19
|
folderId: string;
|
|
20
20
|
ksUat?: string | null;
|
|
21
21
|
}
|
|
22
|
+
export interface FolderActionRequest {
|
|
23
|
+
folderId: string;
|
|
24
|
+
action: FolderAction;
|
|
25
|
+
ksUat?: string | null;
|
|
26
|
+
}
|
|
22
27
|
export interface GetFolderRequest {
|
|
23
28
|
folderId: string;
|
|
24
29
|
withTags?: boolean;
|
|
@@ -100,6 +105,31 @@ export interface FoldersApiInterface {
|
|
|
100
105
|
* Delete Folder Handler
|
|
101
106
|
*/
|
|
102
107
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for folderAction without sending the request
|
|
110
|
+
* @param {string} folderId
|
|
111
|
+
* @param {FolderAction} action Action to perform
|
|
112
|
+
* @param {string} [ksUat]
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof FoldersApiInterface
|
|
115
|
+
*/
|
|
116
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
119
|
+
* @summary Folder Action Handler
|
|
120
|
+
* @param {string} folderId
|
|
121
|
+
* @param {FolderAction} action Action to perform
|
|
122
|
+
* @param {string} [ksUat]
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
* @memberof FoldersApiInterface
|
|
126
|
+
*/
|
|
127
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
130
|
+
* Folder Action Handler
|
|
131
|
+
*/
|
|
132
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
103
133
|
/**
|
|
104
134
|
* Creates request options for getFolder without sending the request
|
|
105
135
|
* @param {string} folderId
|
|
@@ -249,6 +279,20 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
249
279
|
* Delete Folder Handler
|
|
250
280
|
*/
|
|
251
281
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for folderAction without sending the request
|
|
284
|
+
*/
|
|
285
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
286
|
+
/**
|
|
287
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
288
|
+
* Folder Action Handler
|
|
289
|
+
*/
|
|
290
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
291
|
+
/**
|
|
292
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
293
|
+
* Folder Action Handler
|
|
294
|
+
*/
|
|
295
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
252
296
|
/**
|
|
253
297
|
* Creates request options for getFolder without sending the request
|
|
254
298
|
*/
|
package/dist/apis/FoldersApi.js
CHANGED
|
@@ -111,6 +111,53 @@ class FoldersApi extends runtime.BaseAPI {
|
|
|
111
111
|
yield this.deleteFolderRaw(requestParameters, initOverrides);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates request options for folderAction without sending the request
|
|
116
|
+
*/
|
|
117
|
+
folderActionRequestOpts(requestParameters) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
if (requestParameters['folderId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling folderAction().');
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['action'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling folderAction().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
if (requestParameters['action'] != null) {
|
|
127
|
+
queryParameters['action'] = requestParameters['action'];
|
|
128
|
+
}
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
132
|
+
return {
|
|
133
|
+
path: urlPath,
|
|
134
|
+
method: 'POST',
|
|
135
|
+
headers: headerParameters,
|
|
136
|
+
query: queryParameters,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
142
|
+
* Folder Action Handler
|
|
143
|
+
*/
|
|
144
|
+
folderActionRaw(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const requestOptions = yield this.folderActionRequestOpts(requestParameters);
|
|
147
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FolderActionResponseFromJSON)(jsonValue));
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
153
|
+
* Folder Action Handler
|
|
154
|
+
*/
|
|
155
|
+
folderAction(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const response = yield this.folderActionRaw(requestParameters, initOverrides);
|
|
158
|
+
return yield response.value();
|
|
159
|
+
});
|
|
160
|
+
}
|
|
114
161
|
/**
|
|
115
162
|
* Creates request options for getFolder without sending the request
|
|
116
163
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateFolderRequest, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator, PaginatedResponseFolderResponse, PathOrder, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
ksUat?: string | null;
|
|
@@ -19,6 +19,11 @@ export interface DeleteFolderRequest {
|
|
|
19
19
|
folderId: string;
|
|
20
20
|
ksUat?: string | null;
|
|
21
21
|
}
|
|
22
|
+
export interface FolderActionRequest {
|
|
23
|
+
folderId: string;
|
|
24
|
+
action: FolderAction;
|
|
25
|
+
ksUat?: string | null;
|
|
26
|
+
}
|
|
22
27
|
export interface GetFolderRequest {
|
|
23
28
|
folderId: string;
|
|
24
29
|
withTags?: boolean;
|
|
@@ -100,6 +105,31 @@ export interface FoldersApiInterface {
|
|
|
100
105
|
* Delete Folder Handler
|
|
101
106
|
*/
|
|
102
107
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for folderAction without sending the request
|
|
110
|
+
* @param {string} folderId
|
|
111
|
+
* @param {FolderAction} action Action to perform
|
|
112
|
+
* @param {string} [ksUat]
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof FoldersApiInterface
|
|
115
|
+
*/
|
|
116
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
119
|
+
* @summary Folder Action Handler
|
|
120
|
+
* @param {string} folderId
|
|
121
|
+
* @param {FolderAction} action Action to perform
|
|
122
|
+
* @param {string} [ksUat]
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
* @memberof FoldersApiInterface
|
|
126
|
+
*/
|
|
127
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
130
|
+
* Folder Action Handler
|
|
131
|
+
*/
|
|
132
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
103
133
|
/**
|
|
104
134
|
* Creates request options for getFolder without sending the request
|
|
105
135
|
* @param {string} folderId
|
|
@@ -249,6 +279,20 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
249
279
|
* Delete Folder Handler
|
|
250
280
|
*/
|
|
251
281
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for folderAction without sending the request
|
|
284
|
+
*/
|
|
285
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
286
|
+
/**
|
|
287
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
288
|
+
* Folder Action Handler
|
|
289
|
+
*/
|
|
290
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
291
|
+
/**
|
|
292
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
293
|
+
* Folder Action Handler
|
|
294
|
+
*/
|
|
295
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
252
296
|
/**
|
|
253
297
|
* Creates request options for getFolder without sending the request
|
|
254
298
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateFolderRequestToJSON, FolderResponseFromJSON, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
24
|
+
import { CreateFolderRequestToJSON, FolderActionResponseFromJSON, FolderResponseFromJSON, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -108,6 +108,53 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
108
108
|
yield this.deleteFolderRaw(requestParameters, initOverrides);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Creates request options for folderAction without sending the request
|
|
113
|
+
*/
|
|
114
|
+
folderActionRequestOpts(requestParameters) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
if (requestParameters['folderId'] == null) {
|
|
117
|
+
throw new runtime.RequiredError('folderId', 'Required parameter "folderId" was null or undefined when calling folderAction().');
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['action'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling folderAction().');
|
|
121
|
+
}
|
|
122
|
+
const queryParameters = {};
|
|
123
|
+
if (requestParameters['action'] != null) {
|
|
124
|
+
queryParameters['action'] = requestParameters['action'];
|
|
125
|
+
}
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
128
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
129
|
+
return {
|
|
130
|
+
path: urlPath,
|
|
131
|
+
method: 'POST',
|
|
132
|
+
headers: headerParameters,
|
|
133
|
+
query: queryParameters,
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
139
|
+
* Folder Action Handler
|
|
140
|
+
*/
|
|
141
|
+
folderActionRaw(requestParameters, initOverrides) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const requestOptions = yield this.folderActionRequestOpts(requestParameters);
|
|
144
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FolderActionResponseFromJSON(jsonValue));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
150
|
+
* Folder Action Handler
|
|
151
|
+
*/
|
|
152
|
+
folderAction(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const response = yield this.folderActionRaw(requestParameters, initOverrides);
|
|
155
|
+
return yield response.value();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
111
158
|
/**
|
|
112
159
|
* Creates request options for getFolder without sending the request
|
|
113
160
|
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.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
|
+
* Supported folder actions.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const FolderAction: {
|
|
17
|
+
readonly Reembed: "reembed";
|
|
18
|
+
};
|
|
19
|
+
export type FolderAction = typeof FolderAction[keyof typeof FolderAction];
|
|
20
|
+
export declare function instanceOfFolderAction(value: any): boolean;
|
|
21
|
+
export declare function FolderActionFromJSON(json: any): FolderAction;
|
|
22
|
+
export declare function FolderActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderAction;
|
|
23
|
+
export declare function FolderActionToJSON(value?: FolderAction | null): any;
|
|
24
|
+
export declare function FolderActionToJSONTyped(value: any, ignoreDiscriminator: boolean): FolderAction;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.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
|
+
* Supported folder actions.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const FolderAction = {
|
|
19
|
+
Reembed: 'reembed'
|
|
20
|
+
};
|
|
21
|
+
export function instanceOfFolderAction(value) {
|
|
22
|
+
for (const key in FolderAction) {
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(FolderAction, key)) {
|
|
24
|
+
if (FolderAction[key] === value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
export function FolderActionFromJSON(json) {
|
|
32
|
+
return FolderActionFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function FolderActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
export function FolderActionToJSON(value) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
export function FolderActionToJSONTyped(value, ignoreDiscriminator) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.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 { FolderAction } from './FolderAction';
|
|
13
|
+
/**
|
|
14
|
+
* Response for folder action endpoints.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface FolderActionResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface FolderActionResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof FolderActionResponse
|
|
23
|
+
*/
|
|
24
|
+
folderId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {FolderAction}
|
|
28
|
+
* @memberof FolderActionResponse
|
|
29
|
+
*/
|
|
30
|
+
action: FolderAction;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof FolderActionResponse
|
|
35
|
+
*/
|
|
36
|
+
workflowId: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfFolderActionResponse(value: object): value is FolderActionResponse;
|
|
42
|
+
export declare function FolderActionResponseFromJSON(json: any): FolderActionResponse;
|
|
43
|
+
export declare function FolderActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderActionResponse;
|
|
44
|
+
export declare function FolderActionResponseToJSON(json: any): FolderActionResponse;
|
|
45
|
+
export declare function FolderActionResponseToJSONTyped(value?: FolderActionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
46
|
+
export declare const FolderActionResponsePropertyValidationAttributesMap: {
|
|
47
|
+
[property: string]: {
|
|
48
|
+
maxLength?: number;
|
|
49
|
+
minLength?: number;
|
|
50
|
+
pattern?: string;
|
|
51
|
+
maximum?: number;
|
|
52
|
+
exclusiveMaximum?: boolean;
|
|
53
|
+
minimum?: number;
|
|
54
|
+
exclusiveMinimum?: boolean;
|
|
55
|
+
multipleOf?: number;
|
|
56
|
+
maxItems?: number;
|
|
57
|
+
minItems?: number;
|
|
58
|
+
uniqueItems?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.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
|
+
import { FolderActionFromJSON, FolderActionToJSON, } from './FolderAction';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfFolderActionResponse(value) {
|
|
19
|
+
if (!('folderId' in value) || value['folderId'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function FolderActionResponseFromJSON(json) {
|
|
28
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function FolderActionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'folderId': json['folder_id'],
|
|
36
|
+
'action': FolderActionFromJSON(json['action']),
|
|
37
|
+
'workflowId': json['workflow_id'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function FolderActionResponseToJSON(json) {
|
|
41
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function FolderActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'folder_id': value['folderId'],
|
|
49
|
+
'action': FolderActionToJSON(value['action']),
|
|
50
|
+
'workflow_id': value['workflowId'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export const FolderActionResponsePropertyValidationAttributesMap = {};
|
|
@@ -28,6 +28,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
+
export * from './FolderAction';
|
|
32
|
+
export * from './FolderActionResponse';
|
|
31
33
|
export * from './FolderResponse';
|
|
32
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
33
35
|
export * from './HTTPValidationError';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -30,6 +30,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
30
30
|
export * from './DocumentVersionResponse';
|
|
31
31
|
export * from './EmailSentResponse';
|
|
32
32
|
export * from './EmailVerificationRequest';
|
|
33
|
+
export * from './FolderAction';
|
|
34
|
+
export * from './FolderActionResponse';
|
|
33
35
|
export * from './FolderResponse';
|
|
34
36
|
export * from './FolderResponseOrDocumentResponse';
|
|
35
37
|
export * from './HTTPValidationError';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.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
|
+
* Supported folder actions.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const FolderAction: {
|
|
17
|
+
readonly Reembed: "reembed";
|
|
18
|
+
};
|
|
19
|
+
export type FolderAction = typeof FolderAction[keyof typeof FolderAction];
|
|
20
|
+
export declare function instanceOfFolderAction(value: any): boolean;
|
|
21
|
+
export declare function FolderActionFromJSON(json: any): FolderAction;
|
|
22
|
+
export declare function FolderActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderAction;
|
|
23
|
+
export declare function FolderActionToJSON(value?: FolderAction | null): any;
|
|
24
|
+
export declare function FolderActionToJSONTyped(value: any, ignoreDiscriminator: boolean): FolderAction;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.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 });
|
|
16
|
+
exports.FolderAction = void 0;
|
|
17
|
+
exports.instanceOfFolderAction = instanceOfFolderAction;
|
|
18
|
+
exports.FolderActionFromJSON = FolderActionFromJSON;
|
|
19
|
+
exports.FolderActionFromJSONTyped = FolderActionFromJSONTyped;
|
|
20
|
+
exports.FolderActionToJSON = FolderActionToJSON;
|
|
21
|
+
exports.FolderActionToJSONTyped = FolderActionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Supported folder actions.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.FolderAction = {
|
|
27
|
+
Reembed: 'reembed'
|
|
28
|
+
};
|
|
29
|
+
function instanceOfFolderAction(value) {
|
|
30
|
+
for (const key in exports.FolderAction) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(exports.FolderAction, key)) {
|
|
32
|
+
if (exports.FolderAction[key] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
function FolderActionFromJSON(json) {
|
|
40
|
+
return FolderActionFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function FolderActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
function FolderActionToJSON(value) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
function FolderActionToJSONTyped(value, ignoreDiscriminator) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.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 { FolderAction } from './FolderAction';
|
|
13
|
+
/**
|
|
14
|
+
* Response for folder action endpoints.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface FolderActionResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface FolderActionResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof FolderActionResponse
|
|
23
|
+
*/
|
|
24
|
+
folderId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {FolderAction}
|
|
28
|
+
* @memberof FolderActionResponse
|
|
29
|
+
*/
|
|
30
|
+
action: FolderAction;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof FolderActionResponse
|
|
35
|
+
*/
|
|
36
|
+
workflowId: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfFolderActionResponse(value: object): value is FolderActionResponse;
|
|
42
|
+
export declare function FolderActionResponseFromJSON(json: any): FolderActionResponse;
|
|
43
|
+
export declare function FolderActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderActionResponse;
|
|
44
|
+
export declare function FolderActionResponseToJSON(json: any): FolderActionResponse;
|
|
45
|
+
export declare function FolderActionResponseToJSONTyped(value?: FolderActionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
46
|
+
export declare const FolderActionResponsePropertyValidationAttributesMap: {
|
|
47
|
+
[property: string]: {
|
|
48
|
+
maxLength?: number;
|
|
49
|
+
minLength?: number;
|
|
50
|
+
pattern?: string;
|
|
51
|
+
maximum?: number;
|
|
52
|
+
exclusiveMaximum?: boolean;
|
|
53
|
+
minimum?: number;
|
|
54
|
+
exclusiveMinimum?: boolean;
|
|
55
|
+
multipleOf?: number;
|
|
56
|
+
maxItems?: number;
|
|
57
|
+
minItems?: number;
|
|
58
|
+
uniqueItems?: boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.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 });
|
|
16
|
+
exports.FolderActionResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfFolderActionResponse = instanceOfFolderActionResponse;
|
|
18
|
+
exports.FolderActionResponseFromJSON = FolderActionResponseFromJSON;
|
|
19
|
+
exports.FolderActionResponseFromJSONTyped = FolderActionResponseFromJSONTyped;
|
|
20
|
+
exports.FolderActionResponseToJSON = FolderActionResponseToJSON;
|
|
21
|
+
exports.FolderActionResponseToJSONTyped = FolderActionResponseToJSONTyped;
|
|
22
|
+
const FolderAction_1 = require("./FolderAction");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfFolderActionResponse(value) {
|
|
27
|
+
if (!('folderId' in value) || value['folderId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function FolderActionResponseFromJSON(json) {
|
|
36
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function FolderActionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'folderId': json['folder_id'],
|
|
44
|
+
'action': (0, FolderAction_1.FolderActionFromJSON)(json['action']),
|
|
45
|
+
'workflowId': json['workflow_id'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function FolderActionResponseToJSON(json) {
|
|
49
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function FolderActionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'folder_id': value['folderId'],
|
|
57
|
+
'action': (0, FolderAction_1.FolderActionToJSON)(value['action']),
|
|
58
|
+
'workflow_id': value['workflowId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.FolderActionResponsePropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
28
28
|
export * from './DocumentVersionResponse';
|
|
29
29
|
export * from './EmailSentResponse';
|
|
30
30
|
export * from './EmailVerificationRequest';
|
|
31
|
+
export * from './FolderAction';
|
|
32
|
+
export * from './FolderActionResponse';
|
|
31
33
|
export * from './FolderResponse';
|
|
32
34
|
export * from './FolderResponseOrDocumentResponse';
|
|
33
35
|
export * from './HTTPValidationError';
|
package/dist/models/index.js
CHANGED
|
@@ -46,6 +46,8 @@ __exportStar(require("./DocumentVersionMetadataUpdate"), exports);
|
|
|
46
46
|
__exportStar(require("./DocumentVersionResponse"), exports);
|
|
47
47
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
48
48
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
49
|
+
__exportStar(require("./FolderAction"), exports);
|
|
50
|
+
__exportStar(require("./FolderActionResponse"), exports);
|
|
49
51
|
__exportStar(require("./FolderResponse"), exports);
|
|
50
52
|
__exportStar(require("./FolderResponseOrDocumentResponse"), exports);
|
|
51
53
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# FolderAction
|
|
3
|
+
|
|
4
|
+
Supported folder actions.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { FolderAction } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies FolderAction
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as FolderAction
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# FolderActionResponse
|
|
3
|
+
|
|
4
|
+
Response for folder action endpoints.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`folderId` | string
|
|
11
|
+
`action` | [FolderAction](FolderAction.md)
|
|
12
|
+
`workflowId` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { FolderActionResponse } from '@knowledge-stack/ksapi'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"folderId": null,
|
|
22
|
+
"action": null,
|
|
23
|
+
"workflowId": null,
|
|
24
|
+
} satisfies FolderActionResponse
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as FolderActionResponse
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/docs/FoldersApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**createFolder**](FoldersApi.md#createfolderoperation) | **POST** /v1/folders | Create Folder Handler |
|
|
8
8
|
| [**deleteFolder**](FoldersApi.md#deletefolder) | **DELETE** /v1/folders/{folder_id} | Delete Folder Handler |
|
|
9
|
+
| [**folderAction**](FoldersApi.md#folderaction) | **POST** /v1/folders/{folder_id} | Folder Action Handler |
|
|
9
10
|
| [**getFolder**](FoldersApi.md#getfolder) | **GET** /v1/folders/{folder_id} | Get Folder Handler |
|
|
10
11
|
| [**listFolderContents**](FoldersApi.md#listfoldercontents) | **GET** /v1/folders/{folder_id}/contents | List Folder Contents Handler |
|
|
11
12
|
| [**listFolders**](FoldersApi.md#listfolders) | **GET** /v1/folders | List Folders Handler |
|
|
@@ -155,6 +156,80 @@ No authorization required
|
|
|
155
156
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
156
157
|
|
|
157
158
|
|
|
159
|
+
## folderAction
|
|
160
|
+
|
|
161
|
+
> FolderActionResponse folderAction(folderId, action, ksUat)
|
|
162
|
+
|
|
163
|
+
Folder Action Handler
|
|
164
|
+
|
|
165
|
+
Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
166
|
+
|
|
167
|
+
### Example
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import {
|
|
171
|
+
Configuration,
|
|
172
|
+
FoldersApi,
|
|
173
|
+
} from '@knowledge-stack/ksapi';
|
|
174
|
+
import type { FolderActionRequest } from '@knowledge-stack/ksapi';
|
|
175
|
+
|
|
176
|
+
async function example() {
|
|
177
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
178
|
+
const api = new FoldersApi();
|
|
179
|
+
|
|
180
|
+
const body = {
|
|
181
|
+
// string
|
|
182
|
+
folderId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
183
|
+
// FolderAction | Action to perform
|
|
184
|
+
action: ...,
|
|
185
|
+
// string (optional)
|
|
186
|
+
ksUat: ksUat_example,
|
|
187
|
+
} satisfies FolderActionRequest;
|
|
188
|
+
|
|
189
|
+
try {
|
|
190
|
+
const data = await api.folderAction(body);
|
|
191
|
+
console.log(data);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Run the test
|
|
198
|
+
example().catch(console.error);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
206
|
+
| **folderId** | `string` | | [Defaults to `undefined`] |
|
|
207
|
+
| **action** | `FolderAction` | Action to perform | [Defaults to `undefined`] [Enum: reembed] |
|
|
208
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
[**FolderActionResponse**](FolderActionResponse.md)
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
No authorization required
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: Not defined
|
|
221
|
+
- **Accept**: `application/json`
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
| **200** | Successful Response | - |
|
|
228
|
+
| **422** | Validation Error | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
|
|
158
233
|
## getFolder
|
|
159
234
|
|
|
160
235
|
> FolderResponse getFolder(folderId, withTags, ksUat)
|
package/package.json
CHANGED
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
CreateFolderRequest,
|
|
19
|
+
FolderAction,
|
|
20
|
+
FolderActionResponse,
|
|
19
21
|
FolderResponse,
|
|
20
22
|
HTTPValidationError,
|
|
21
23
|
PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator,
|
|
@@ -26,6 +28,10 @@ import type {
|
|
|
26
28
|
import {
|
|
27
29
|
CreateFolderRequestFromJSON,
|
|
28
30
|
CreateFolderRequestToJSON,
|
|
31
|
+
FolderActionFromJSON,
|
|
32
|
+
FolderActionToJSON,
|
|
33
|
+
FolderActionResponseFromJSON,
|
|
34
|
+
FolderActionResponseToJSON,
|
|
29
35
|
FolderResponseFromJSON,
|
|
30
36
|
FolderResponseToJSON,
|
|
31
37
|
HTTPValidationErrorFromJSON,
|
|
@@ -50,6 +56,12 @@ export interface DeleteFolderRequest {
|
|
|
50
56
|
ksUat?: string | null;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
export interface FolderActionRequest {
|
|
60
|
+
folderId: string;
|
|
61
|
+
action: FolderAction;
|
|
62
|
+
ksUat?: string | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
53
65
|
export interface GetFolderRequest {
|
|
54
66
|
folderId: string;
|
|
55
67
|
withTags?: boolean;
|
|
@@ -141,6 +153,34 @@ export interface FoldersApiInterface {
|
|
|
141
153
|
*/
|
|
142
154
|
deleteFolder(requestParameters: DeleteFolderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
143
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for folderAction without sending the request
|
|
158
|
+
* @param {string} folderId
|
|
159
|
+
* @param {FolderAction} action Action to perform
|
|
160
|
+
* @param {string} [ksUat]
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
* @memberof FoldersApiInterface
|
|
163
|
+
*/
|
|
164
|
+
folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
168
|
+
* @summary Folder Action Handler
|
|
169
|
+
* @param {string} folderId
|
|
170
|
+
* @param {FolderAction} action Action to perform
|
|
171
|
+
* @param {string} [ksUat]
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
* @memberof FoldersApiInterface
|
|
175
|
+
*/
|
|
176
|
+
folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>>;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
180
|
+
* Folder Action Handler
|
|
181
|
+
*/
|
|
182
|
+
folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse>;
|
|
183
|
+
|
|
144
184
|
/**
|
|
145
185
|
* Creates request options for getFolder without sending the request
|
|
146
186
|
* @param {string} folderId
|
|
@@ -371,6 +411,64 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
371
411
|
await this.deleteFolderRaw(requestParameters, initOverrides);
|
|
372
412
|
}
|
|
373
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Creates request options for folderAction without sending the request
|
|
416
|
+
*/
|
|
417
|
+
async folderActionRequestOpts(requestParameters: FolderActionRequest): Promise<runtime.RequestOpts> {
|
|
418
|
+
if (requestParameters['folderId'] == null) {
|
|
419
|
+
throw new runtime.RequiredError(
|
|
420
|
+
'folderId',
|
|
421
|
+
'Required parameter "folderId" was null or undefined when calling folderAction().'
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if (requestParameters['action'] == null) {
|
|
426
|
+
throw new runtime.RequiredError(
|
|
427
|
+
'action',
|
|
428
|
+
'Required parameter "action" was null or undefined when calling folderAction().'
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const queryParameters: any = {};
|
|
433
|
+
|
|
434
|
+
if (requestParameters['action'] != null) {
|
|
435
|
+
queryParameters['action'] = requestParameters['action'];
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
let urlPath = `/v1/folders/{folder_id}`;
|
|
442
|
+
urlPath = urlPath.replace(`{${"folder_id"}}`, encodeURIComponent(String(requestParameters['folderId'])));
|
|
443
|
+
|
|
444
|
+
return {
|
|
445
|
+
path: urlPath,
|
|
446
|
+
method: 'POST',
|
|
447
|
+
headers: headerParameters,
|
|
448
|
+
query: queryParameters,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
454
|
+
* Folder Action Handler
|
|
455
|
+
*/
|
|
456
|
+
async folderActionRaw(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderActionResponse>> {
|
|
457
|
+
const requestOptions = await this.folderActionRequestOpts(requestParameters);
|
|
458
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
459
|
+
|
|
460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FolderActionResponseFromJSON(jsonValue));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Perform an action on a folder. Currently supports: - `reembed`: Re-embed all documents in the folder and its subfolders.
|
|
465
|
+
* Folder Action Handler
|
|
466
|
+
*/
|
|
467
|
+
async folderAction(requestParameters: FolderActionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderActionResponse> {
|
|
468
|
+
const response = await this.folderActionRaw(requestParameters, initOverrides);
|
|
469
|
+
return await response.value();
|
|
470
|
+
}
|
|
471
|
+
|
|
374
472
|
/**
|
|
375
473
|
* Creates request options for getFolder without sending the request
|
|
376
474
|
*/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.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
|
+
* Supported folder actions.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const FolderAction = {
|
|
21
|
+
Reembed: 'reembed'
|
|
22
|
+
} as const;
|
|
23
|
+
export type FolderAction = typeof FolderAction[keyof typeof FolderAction];
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export function instanceOfFolderAction(value: any): boolean {
|
|
27
|
+
for (const key in FolderAction) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(FolderAction, key)) {
|
|
29
|
+
if (FolderAction[key as keyof typeof FolderAction] === value) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function FolderActionFromJSON(json: any): FolderAction {
|
|
38
|
+
return FolderActionFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function FolderActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderAction {
|
|
42
|
+
return json as FolderAction;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function FolderActionToJSON(value?: FolderAction | null): any {
|
|
46
|
+
return value as any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function FolderActionToJSONTyped(value: any, ignoreDiscriminator: boolean): FolderAction {
|
|
50
|
+
return value as FolderAction;
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { FolderAction } from './FolderAction';
|
|
17
|
+
import {
|
|
18
|
+
FolderActionFromJSON,
|
|
19
|
+
FolderActionFromJSONTyped,
|
|
20
|
+
FolderActionToJSON,
|
|
21
|
+
FolderActionToJSONTyped,
|
|
22
|
+
} from './FolderAction';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Response for folder action endpoints.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface FolderActionResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface FolderActionResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof FolderActionResponse
|
|
34
|
+
*/
|
|
35
|
+
folderId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {FolderAction}
|
|
39
|
+
* @memberof FolderActionResponse
|
|
40
|
+
*/
|
|
41
|
+
action: FolderAction;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof FolderActionResponse
|
|
46
|
+
*/
|
|
47
|
+
workflowId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the FolderActionResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfFolderActionResponse(value: object): value is FolderActionResponse {
|
|
56
|
+
if (!('folderId' in value) || value['folderId'] === undefined) return false;
|
|
57
|
+
if (!('action' in value) || value['action'] === undefined) return false;
|
|
58
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function FolderActionResponseFromJSON(json: any): FolderActionResponse {
|
|
63
|
+
return FolderActionResponseFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function FolderActionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderActionResponse {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'folderId': json['folder_id'],
|
|
73
|
+
'action': FolderActionFromJSON(json['action']),
|
|
74
|
+
'workflowId': json['workflow_id'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function FolderActionResponseToJSON(json: any): FolderActionResponse {
|
|
79
|
+
return FolderActionResponseToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function FolderActionResponseToJSONTyped(value?: FolderActionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'folder_id': value['folderId'],
|
|
90
|
+
'action': FolderActionToJSON(value['action']),
|
|
91
|
+
'workflow_id': value['workflowId'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const FolderActionResponsePropertyValidationAttributesMap: {
|
|
96
|
+
[property: string]: {
|
|
97
|
+
maxLength?: number,
|
|
98
|
+
minLength?: number,
|
|
99
|
+
pattern?: string,
|
|
100
|
+
maximum?: number,
|
|
101
|
+
exclusiveMaximum?: boolean,
|
|
102
|
+
minimum?: number,
|
|
103
|
+
exclusiveMinimum?: boolean,
|
|
104
|
+
multipleOf?: number,
|
|
105
|
+
maxItems?: number,
|
|
106
|
+
minItems?: number,
|
|
107
|
+
uniqueItems?: boolean
|
|
108
|
+
}
|
|
109
|
+
} = {
|
|
110
|
+
}
|
|
111
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -30,6 +30,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
30
30
|
export * from './DocumentVersionResponse';
|
|
31
31
|
export * from './EmailSentResponse';
|
|
32
32
|
export * from './EmailVerificationRequest';
|
|
33
|
+
export * from './FolderAction';
|
|
34
|
+
export * from './FolderActionResponse';
|
|
33
35
|
export * from './FolderResponse';
|
|
34
36
|
export * from './FolderResponseOrDocumentResponse';
|
|
35
37
|
export * from './HTTPValidationError';
|