@knowledge-stack/ksapi 1.20.1 → 1.22.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 +2 -1
- package/README.md +2 -2
- package/dist/apis/DocumentsApi.d.ts +4 -0
- package/dist/apis/DocumentsApi.js +6 -0
- package/dist/apis/FoldersApi.d.ts +10 -4
- package/dist/apis/FoldersApi.js +11 -2
- package/dist/apis/PathPartsApi.d.ts +67 -5
- package/dist/apis/PathPartsApi.js +76 -2
- package/dist/apis/TagsApi.d.ts +1 -63
- package/dist/apis/TagsApi.js +0 -72
- package/dist/apis/ThreadsApi.d.ts +33 -0
- package/dist/apis/ThreadsApi.js +37 -0
- package/dist/esm/apis/DocumentsApi.d.ts +4 -0
- package/dist/esm/apis/DocumentsApi.js +6 -0
- package/dist/esm/apis/FoldersApi.d.ts +10 -4
- package/dist/esm/apis/FoldersApi.js +11 -2
- package/dist/esm/apis/PathPartsApi.d.ts +67 -5
- package/dist/esm/apis/PathPartsApi.js +77 -3
- package/dist/esm/apis/TagsApi.d.ts +1 -63
- package/dist/esm/apis/TagsApi.js +1 -73
- package/dist/esm/apis/ThreadsApi.d.ts +33 -0
- package/dist/esm/apis/ThreadsApi.js +37 -0
- package/dist/esm/models/BulkTagRequest.d.ts +47 -0
- package/dist/esm/models/BulkTagRequest.js +49 -0
- package/dist/esm/models/DocumentResponse.d.ts +7 -0
- package/dist/esm/models/DocumentResponse.js +3 -0
- package/dist/esm/models/FolderDocumentResponse.d.ts +7 -0
- package/dist/esm/models/FolderDocumentResponse.js +3 -0
- package/dist/esm/models/FolderResponse.d.ts +7 -0
- package/dist/esm/models/FolderResponse.js +3 -0
- package/dist/esm/models/PathPartResponse.d.ts +7 -0
- package/dist/esm/models/PathPartResponse.js +3 -0
- package/dist/esm/models/PathPartTagsResponse.d.ts +48 -0
- package/dist/esm/models/PathPartTagsResponse.js +45 -0
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +2 -1
- package/dist/models/BulkTagRequest.d.ts +47 -0
- package/dist/models/BulkTagRequest.js +57 -0
- package/dist/models/DocumentResponse.d.ts +7 -0
- package/dist/models/DocumentResponse.js +3 -0
- package/dist/models/FolderDocumentResponse.d.ts +7 -0
- package/dist/models/FolderDocumentResponse.js +3 -0
- package/dist/models/FolderResponse.d.ts +7 -0
- package/dist/models/FolderResponse.js +3 -0
- package/dist/models/PathPartResponse.d.ts +7 -0
- package/dist/models/PathPartResponse.js +3 -0
- package/dist/models/PathPartTagsResponse.d.ts +48 -0
- package/dist/models/PathPartTagsResponse.js +53 -0
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.js +2 -1
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +12 -0
- package/src/apis/FoldersApi.ts +22 -4
- package/src/apis/PathPartsApi.ts +156 -4
- package/src/apis/TagsApi.ts +0 -146
- package/src/apis/ThreadsApi.ts +72 -0
- package/src/models/BulkTagRequest.ts +87 -0
- package/src/models/DocumentResponse.ts +15 -0
- package/src/models/FolderDocumentResponse.ts +15 -0
- package/src/models/FolderResponse.ts +16 -0
- package/src/models/PathPartResponse.ts +15 -0
- package/src/models/PathPartTagsResponse.ts +91 -0
- package/src/models/index.ts +2 -1
- package/dist/esm/models/TagPathPartRequest.d.ts +0 -47
- package/dist/esm/models/TagPathPartRequest.js +0 -44
- package/dist/models/TagPathPartRequest.d.ts +0 -47
- package/dist/models/TagPathPartRequest.js +0 -52
- package/src/models/TagPathPartRequest.ts +0 -83
package/dist/esm/apis/TagsApi.js
CHANGED
|
@@ -21,48 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON,
|
|
24
|
+
import { CreateTagRequestToJSON, PaginatedResponseTagResponseFromJSON, TagResponseFromJSON, UpdateTagRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class TagsApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
31
|
-
* Attach Tag Handler
|
|
32
|
-
*/
|
|
33
|
-
attachTagToPathPartRaw(requestParameters, initOverrides) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
if (requestParameters['tagId'] == null) {
|
|
36
|
-
throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling attachTagToPathPart().');
|
|
37
|
-
}
|
|
38
|
-
if (requestParameters['tagPathPartRequest'] == null) {
|
|
39
|
-
throw new runtime.RequiredError('tagPathPartRequest', 'Required parameter "tagPathPartRequest" was null or undefined when calling attachTagToPathPart().');
|
|
40
|
-
}
|
|
41
|
-
const queryParameters = {};
|
|
42
|
-
const headerParameters = {};
|
|
43
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
-
let urlPath = `/v1/tags/{tag_id}/path-parts`;
|
|
45
|
-
urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
|
|
46
|
-
const response = yield this.request({
|
|
47
|
-
path: urlPath,
|
|
48
|
-
method: 'POST',
|
|
49
|
-
headers: headerParameters,
|
|
50
|
-
query: queryParameters,
|
|
51
|
-
body: TagPathPartRequestToJSON(requestParameters['tagPathPartRequest']),
|
|
52
|
-
}, initOverrides);
|
|
53
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => TagResponseFromJSON(jsonValue));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
58
|
-
* Attach Tag Handler
|
|
59
|
-
*/
|
|
60
|
-
attachTagToPathPart(requestParameters, initOverrides) {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const response = yield this.attachTagToPathPartRaw(requestParameters, initOverrides);
|
|
63
|
-
return yield response.value();
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
29
|
/**
|
|
67
30
|
* Create a new tag for the current tenant. Requires ADMIN or OWNER role.
|
|
68
31
|
* Create Tag Handler
|
|
@@ -127,41 +90,6 @@ export class TagsApi extends runtime.BaseAPI {
|
|
|
127
90
|
yield this.deleteTagRaw(requestParameters, initOverrides);
|
|
128
91
|
});
|
|
129
92
|
}
|
|
130
|
-
/**
|
|
131
|
-
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
132
|
-
* Detach Tag Handler
|
|
133
|
-
*/
|
|
134
|
-
detachTagFromPathPartRaw(requestParameters, initOverrides) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
if (requestParameters['tagId'] == null) {
|
|
137
|
-
throw new runtime.RequiredError('tagId', 'Required parameter "tagId" was null or undefined when calling detachTagFromPathPart().');
|
|
138
|
-
}
|
|
139
|
-
if (requestParameters['pathPartId'] == null) {
|
|
140
|
-
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling detachTagFromPathPart().');
|
|
141
|
-
}
|
|
142
|
-
const queryParameters = {};
|
|
143
|
-
const headerParameters = {};
|
|
144
|
-
let urlPath = `/v1/tags/{tag_id}/path-parts/{path_part_id}`;
|
|
145
|
-
urlPath = urlPath.replace(`{${"tag_id"}}`, encodeURIComponent(String(requestParameters['tagId'])));
|
|
146
|
-
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
147
|
-
const response = yield this.request({
|
|
148
|
-
path: urlPath,
|
|
149
|
-
method: 'DELETE',
|
|
150
|
-
headers: headerParameters,
|
|
151
|
-
query: queryParameters,
|
|
152
|
-
}, initOverrides);
|
|
153
|
-
return new runtime.VoidApiResponse(response);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
158
|
-
* Detach Tag Handler
|
|
159
|
-
*/
|
|
160
|
-
detachTagFromPathPart(requestParameters, initOverrides) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
yield this.detachTagFromPathPartRaw(requestParameters, initOverrides);
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
93
|
/**
|
|
166
94
|
* Get a tag by its ID.
|
|
167
95
|
* Get Tag Handler
|
|
@@ -29,6 +29,12 @@ export interface ListThreadsRequest {
|
|
|
29
29
|
offset?: number;
|
|
30
30
|
ksUat?: string | null;
|
|
31
31
|
}
|
|
32
|
+
export interface StreamThreadRequest {
|
|
33
|
+
threadId: string;
|
|
34
|
+
lastMessageId?: string | null;
|
|
35
|
+
lastEntryId?: string | null;
|
|
36
|
+
ksUat?: string | null;
|
|
37
|
+
}
|
|
32
38
|
export interface UpdateThreadOperationRequest {
|
|
33
39
|
threadId: string;
|
|
34
40
|
updateThreadRequest: UpdateThreadRequest;
|
|
@@ -103,6 +109,23 @@ export interface ThreadsApiInterface {
|
|
|
103
109
|
* List Threads Handler
|
|
104
110
|
*/
|
|
105
111
|
listThreads(requestParameters: ListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
114
|
+
* @summary Stream Thread Handler
|
|
115
|
+
* @param {string} threadId
|
|
116
|
+
* @param {string} [lastMessageId]
|
|
117
|
+
* @param {string} [lastEntryId]
|
|
118
|
+
* @param {string} [ksUat]
|
|
119
|
+
* @param {*} [options] Override http request option.
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof ThreadsApiInterface
|
|
122
|
+
*/
|
|
123
|
+
streamThreadRaw(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
124
|
+
/**
|
|
125
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
126
|
+
* Stream Thread Handler
|
|
127
|
+
*/
|
|
128
|
+
streamThread(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
106
129
|
/**
|
|
107
130
|
* Update a thread\'s title and/or parent_thread_id.
|
|
108
131
|
* @summary Update Thread Handler
|
|
@@ -164,6 +187,16 @@ export declare class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInt
|
|
|
164
187
|
* List Threads Handler
|
|
165
188
|
*/
|
|
166
189
|
listThreads(requestParameters?: ListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadResponse>;
|
|
190
|
+
/**
|
|
191
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
192
|
+
* Stream Thread Handler
|
|
193
|
+
*/
|
|
194
|
+
streamThreadRaw(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
195
|
+
/**
|
|
196
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
197
|
+
* Stream Thread Handler
|
|
198
|
+
*/
|
|
199
|
+
streamThread(requestParameters: StreamThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
167
200
|
/**
|
|
168
201
|
* Update a thread\'s title and/or parent_thread_id.
|
|
169
202
|
* Update Thread Handler
|
|
@@ -159,6 +159,43 @@ export class ThreadsApi extends runtime.BaseAPI {
|
|
|
159
159
|
return yield response.value();
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
164
|
+
* Stream Thread Handler
|
|
165
|
+
*/
|
|
166
|
+
streamThreadRaw(requestParameters, initOverrides) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
if (requestParameters['threadId'] == null) {
|
|
169
|
+
throw new runtime.RequiredError('threadId', 'Required parameter "threadId" was null or undefined when calling streamThread().');
|
|
170
|
+
}
|
|
171
|
+
const queryParameters = {};
|
|
172
|
+
if (requestParameters['lastMessageId'] != null) {
|
|
173
|
+
queryParameters['last_message_id'] = requestParameters['lastMessageId'];
|
|
174
|
+
}
|
|
175
|
+
if (requestParameters['lastEntryId'] != null) {
|
|
176
|
+
queryParameters['last_entry_id'] = requestParameters['lastEntryId'];
|
|
177
|
+
}
|
|
178
|
+
const headerParameters = {};
|
|
179
|
+
let urlPath = `/v1/threads/{thread_id}/stream`;
|
|
180
|
+
urlPath = urlPath.replace(`{${"thread_id"}}`, encodeURIComponent(String(requestParameters['threadId'])));
|
|
181
|
+
const response = yield this.request({
|
|
182
|
+
path: urlPath,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
headers: headerParameters,
|
|
185
|
+
query: queryParameters,
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
return new runtime.VoidApiResponse(response);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
192
|
+
* Stream Thread Handler
|
|
193
|
+
*/
|
|
194
|
+
streamThread(requestParameters, initOverrides) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
yield this.streamThreadRaw(requestParameters, initOverrides);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
162
199
|
/**
|
|
163
200
|
* Update a thread\'s title and/or parent_thread_id.
|
|
164
201
|
* Update Thread Handler
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* Request to bulk add or remove tags from a path part.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BulkTagRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface BulkTagRequest {
|
|
18
|
+
/**
|
|
19
|
+
* List of tag IDs to add/remove
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof BulkTagRequest
|
|
22
|
+
*/
|
|
23
|
+
tagIds: Array<string>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the BulkTagRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfBulkTagRequest(value: object): value is BulkTagRequest;
|
|
29
|
+
export declare function BulkTagRequestFromJSON(json: any): BulkTagRequest;
|
|
30
|
+
export declare function BulkTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTagRequest;
|
|
31
|
+
export declare function BulkTagRequestToJSON(json: any): BulkTagRequest;
|
|
32
|
+
export declare function BulkTagRequestToJSONTyped(value?: BulkTagRequest | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
export declare const BulkTagRequestPropertyValidationAttributesMap: {
|
|
34
|
+
[property: string]: {
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
minLength?: number;
|
|
37
|
+
pattern?: string;
|
|
38
|
+
maximum?: number;
|
|
39
|
+
exclusiveMaximum?: boolean;
|
|
40
|
+
minimum?: number;
|
|
41
|
+
exclusiveMinimum?: boolean;
|
|
42
|
+
multipleOf?: number;
|
|
43
|
+
maxItems?: number;
|
|
44
|
+
minItems?: number;
|
|
45
|
+
uniqueItems?: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
* Check if a given object implements the BulkTagRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfBulkTagRequest(value) {
|
|
18
|
+
if (!('tagIds' in value) || value['tagIds'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function BulkTagRequestFromJSON(json) {
|
|
23
|
+
return BulkTagRequestFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function BulkTagRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'tagIds': json['tag_ids'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function BulkTagRequestToJSON(json) {
|
|
34
|
+
return BulkTagRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function BulkTagRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'tag_ids': value['tagIds'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export const BulkTagRequestPropertyValidationAttributesMap = {
|
|
45
|
+
tagIds: {
|
|
46
|
+
maxItems: 10,
|
|
47
|
+
uniqueItems: false,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { DocumentOrigin } from './DocumentOrigin';
|
|
13
|
+
import type { TagResponse } from './TagResponse';
|
|
13
14
|
import type { DocumentType } from './DocumentType';
|
|
14
15
|
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
15
16
|
/**
|
|
@@ -96,6 +97,12 @@ export interface DocumentResponse {
|
|
|
96
97
|
* @memberof DocumentResponse
|
|
97
98
|
*/
|
|
98
99
|
updatedAt: Date;
|
|
100
|
+
/**
|
|
101
|
+
* Tags attached to this document
|
|
102
|
+
* @type {Array<TagResponse>}
|
|
103
|
+
* @memberof DocumentResponse
|
|
104
|
+
*/
|
|
105
|
+
tags?: Array<TagResponse> | null;
|
|
99
106
|
}
|
|
100
107
|
/**
|
|
101
108
|
* Check if a given object implements the DocumentResponse interface.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
|
|
15
|
+
import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
|
|
15
16
|
import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
|
|
16
17
|
import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
|
|
17
18
|
/**
|
|
@@ -67,6 +68,7 @@ export function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
68
|
'tenantId': json['tenant_id'],
|
|
68
69
|
'createdAt': (new Date(json['created_at'])),
|
|
69
70
|
'updatedAt': (new Date(json['updated_at'])),
|
|
71
|
+
'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
74
|
export function DocumentResponseToJSON(json) {
|
|
@@ -90,6 +92,7 @@ export function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
90
92
|
'tenant_id': value['tenantId'],
|
|
91
93
|
'created_at': value['createdAt'].toISOString(),
|
|
92
94
|
'updated_at': value['updatedAt'].toISOString(),
|
|
95
|
+
'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
|
|
93
96
|
};
|
|
94
97
|
}
|
|
95
98
|
export const DocumentResponsePropertyValidationAttributesMap = {};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { DocumentOrigin } from './DocumentOrigin';
|
|
13
13
|
import type { PartType } from './PartType';
|
|
14
|
+
import type { TagResponse } from './TagResponse';
|
|
14
15
|
import type { DocumentType } from './DocumentType';
|
|
15
16
|
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
16
17
|
/**
|
|
@@ -70,6 +71,12 @@ export interface FolderDocumentResponse {
|
|
|
70
71
|
* @memberof FolderDocumentResponse
|
|
71
72
|
*/
|
|
72
73
|
systemManaged: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Tags attached to this path part
|
|
76
|
+
* @type {Array<TagResponse>}
|
|
77
|
+
* @memberof FolderDocumentResponse
|
|
78
|
+
*/
|
|
79
|
+
tags?: Array<TagResponse> | null;
|
|
73
80
|
/**
|
|
74
81
|
* Creation timestamp
|
|
75
82
|
* @type {Date}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
|
|
15
15
|
import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
|
|
16
|
+
import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
|
|
16
17
|
import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
|
|
17
18
|
import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
|
|
18
19
|
/**
|
|
@@ -56,6 +57,7 @@ export function FolderDocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
56
57
|
'metadataObjId': json['metadata_obj_id'],
|
|
57
58
|
'materializedPath': json['materialized_path'],
|
|
58
59
|
'systemManaged': json['system_managed'],
|
|
60
|
+
'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
|
|
59
61
|
'createdAt': (new Date(json['created_at'])),
|
|
60
62
|
'updatedAt': (new Date(json['updated_at'])),
|
|
61
63
|
'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
|
|
@@ -82,6 +84,7 @@ export function FolderDocumentResponseToJSONTyped(value, ignoreDiscriminator = f
|
|
|
82
84
|
'metadata_obj_id': value['metadataObjId'],
|
|
83
85
|
'materialized_path': value['materializedPath'],
|
|
84
86
|
'system_managed': value['systemManaged'],
|
|
87
|
+
'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
|
|
85
88
|
'created_at': value['createdAt'].toISOString(),
|
|
86
89
|
'updated_at': value['updatedAt'].toISOString(),
|
|
87
90
|
'folder_id': value['folderId'],
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { TagResponse } from './TagResponse';
|
|
12
13
|
/**
|
|
13
14
|
* Folder response model.
|
|
14
15
|
* @export
|
|
@@ -69,6 +70,12 @@ export interface FolderResponse {
|
|
|
69
70
|
* @memberof FolderResponse
|
|
70
71
|
*/
|
|
71
72
|
updatedAt: Date;
|
|
73
|
+
/**
|
|
74
|
+
* Tags attached to this folder
|
|
75
|
+
* @type {Array<TagResponse>}
|
|
76
|
+
* @memberof FolderResponse
|
|
77
|
+
*/
|
|
78
|
+
tags?: Array<TagResponse> | null;
|
|
72
79
|
}
|
|
73
80
|
/**
|
|
74
81
|
* Check if a given object implements the FolderResponse interface.
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
|
|
14
15
|
/**
|
|
15
16
|
* Check if a given object implements the FolderResponse interface.
|
|
16
17
|
*/
|
|
@@ -52,6 +53,7 @@ export function FolderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
53
|
'tenantId': json['tenant_id'],
|
|
53
54
|
'createdAt': (new Date(json['created_at'])),
|
|
54
55
|
'updatedAt': (new Date(json['updated_at'])),
|
|
56
|
+
'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
export function FolderResponseToJSON(json) {
|
|
@@ -71,6 +73,7 @@ export function FolderResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
71
73
|
'tenant_id': value['tenantId'],
|
|
72
74
|
'created_at': value['createdAt'].toISOString(),
|
|
73
75
|
'updated_at': value['updatedAt'].toISOString(),
|
|
76
|
+
'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
export const FolderResponsePropertyValidationAttributesMap = {};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PartType } from './PartType';
|
|
13
|
+
import type { TagResponse } from './TagResponse';
|
|
13
14
|
/**
|
|
14
15
|
* Generic path part response model.
|
|
15
16
|
* @export
|
|
@@ -58,6 +59,12 @@ export interface PathPartResponse {
|
|
|
58
59
|
* @memberof PathPartResponse
|
|
59
60
|
*/
|
|
60
61
|
systemManaged: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Tags attached to this path part
|
|
64
|
+
* @type {Array<TagResponse>}
|
|
65
|
+
* @memberof PathPartResponse
|
|
66
|
+
*/
|
|
67
|
+
tags?: Array<TagResponse> | null;
|
|
61
68
|
/**
|
|
62
69
|
* Creation timestamp
|
|
63
70
|
* @type {Date}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
|
|
15
|
+
import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the PathPartResponse interface.
|
|
17
18
|
*/
|
|
@@ -51,6 +52,7 @@ export function PathPartResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
52
|
'metadataObjId': json['metadata_obj_id'],
|
|
52
53
|
'materializedPath': json['materialized_path'],
|
|
53
54
|
'systemManaged': json['system_managed'],
|
|
55
|
+
'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
|
|
54
56
|
'createdAt': (new Date(json['created_at'])),
|
|
55
57
|
'updatedAt': (new Date(json['updated_at'])),
|
|
56
58
|
};
|
|
@@ -70,6 +72,7 @@ export function PathPartResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
70
72
|
'metadata_obj_id': value['metadataObjId'],
|
|
71
73
|
'materialized_path': value['materializedPath'],
|
|
72
74
|
'system_managed': value['systemManaged'],
|
|
75
|
+
'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
|
|
73
76
|
'created_at': value['createdAt'].toISOString(),
|
|
74
77
|
'updated_at': value['updatedAt'].toISOString(),
|
|
75
78
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { TagResponse } from './TagResponse';
|
|
13
|
+
/**
|
|
14
|
+
* Response containing the current tags for a path part.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PathPartTagsResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface PathPartTagsResponse {
|
|
19
|
+
/**
|
|
20
|
+
* Tags attached to the path part
|
|
21
|
+
* @type {Array<TagResponse>}
|
|
22
|
+
* @memberof PathPartTagsResponse
|
|
23
|
+
*/
|
|
24
|
+
tags: Array<TagResponse>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the PathPartTagsResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfPathPartTagsResponse(value: object): value is PathPartTagsResponse;
|
|
30
|
+
export declare function PathPartTagsResponseFromJSON(json: any): PathPartTagsResponse;
|
|
31
|
+
export declare function PathPartTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PathPartTagsResponse;
|
|
32
|
+
export declare function PathPartTagsResponseToJSON(json: any): PathPartTagsResponse;
|
|
33
|
+
export declare function PathPartTagsResponseToJSONTyped(value?: PathPartTagsResponse | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const PathPartTagsResponsePropertyValidationAttributesMap: {
|
|
35
|
+
[property: string]: {
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
pattern?: string;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMaximum?: boolean;
|
|
41
|
+
minimum?: number;
|
|
42
|
+
exclusiveMinimum?: boolean;
|
|
43
|
+
multipleOf?: number;
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
minItems?: number;
|
|
46
|
+
uniqueItems?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PathPartTagsResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPathPartTagsResponse(value) {
|
|
19
|
+
if (!('tags' in value) || value['tags'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function PathPartTagsResponseFromJSON(json) {
|
|
24
|
+
return PathPartTagsResponseFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function PathPartTagsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'tags': (json['tags'].map(TagResponseFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function PathPartTagsResponseToJSON(json) {
|
|
35
|
+
return PathPartTagsResponseToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function PathPartTagsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'tags': (value['tags'].map(TagResponseToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export const PathPartTagsResponsePropertyValidationAttributesMap = {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './BulkTagRequest';
|
|
1
2
|
export * from './ChunkLineageResponse';
|
|
2
3
|
export * from './ChunkMetadataInput';
|
|
3
4
|
export * from './ChunkMetadataOutput';
|
|
@@ -60,6 +61,7 @@ export * from './PasswordResetRequest';
|
|
|
60
61
|
export * from './PasswordResetWithTokenRequest';
|
|
61
62
|
export * from './PathOrder';
|
|
62
63
|
export * from './PathPartResponse';
|
|
64
|
+
export * from './PathPartTagsResponse';
|
|
63
65
|
export * from './PermissionCapability';
|
|
64
66
|
export * from './PermissionResponse';
|
|
65
67
|
export * from './PipelineState';
|
|
@@ -70,7 +72,6 @@ export * from './RootResponse';
|
|
|
70
72
|
export * from './ScoredChunkResponse';
|
|
71
73
|
export * from './SectionResponse';
|
|
72
74
|
export * from './SignInRequest';
|
|
73
|
-
export * from './TagPathPartRequest';
|
|
74
75
|
export * from './TagResponse';
|
|
75
76
|
export * from './TenantResponse';
|
|
76
77
|
export * from './TenantUserInTenantResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './BulkTagRequest';
|
|
3
4
|
export * from './ChunkLineageResponse';
|
|
4
5
|
export * from './ChunkMetadataInput';
|
|
5
6
|
export * from './ChunkMetadataOutput';
|
|
@@ -62,6 +63,7 @@ export * from './PasswordResetRequest';
|
|
|
62
63
|
export * from './PasswordResetWithTokenRequest';
|
|
63
64
|
export * from './PathOrder';
|
|
64
65
|
export * from './PathPartResponse';
|
|
66
|
+
export * from './PathPartTagsResponse';
|
|
65
67
|
export * from './PermissionCapability';
|
|
66
68
|
export * from './PermissionResponse';
|
|
67
69
|
export * from './PipelineState';
|
|
@@ -72,7 +74,6 @@ export * from './RootResponse';
|
|
|
72
74
|
export * from './ScoredChunkResponse';
|
|
73
75
|
export * from './SectionResponse';
|
|
74
76
|
export * from './SignInRequest';
|
|
75
|
-
export * from './TagPathPartRequest';
|
|
76
77
|
export * from './TagResponse';
|
|
77
78
|
export * from './TenantResponse';
|
|
78
79
|
export * from './TenantUserInTenantResponse';
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* Request to bulk add or remove tags from a path part.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BulkTagRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface BulkTagRequest {
|
|
18
|
+
/**
|
|
19
|
+
* List of tag IDs to add/remove
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof BulkTagRequest
|
|
22
|
+
*/
|
|
23
|
+
tagIds: Array<string>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the BulkTagRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfBulkTagRequest(value: object): value is BulkTagRequest;
|
|
29
|
+
export declare function BulkTagRequestFromJSON(json: any): BulkTagRequest;
|
|
30
|
+
export declare function BulkTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTagRequest;
|
|
31
|
+
export declare function BulkTagRequestToJSON(json: any): BulkTagRequest;
|
|
32
|
+
export declare function BulkTagRequestToJSONTyped(value?: BulkTagRequest | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
export declare const BulkTagRequestPropertyValidationAttributesMap: {
|
|
34
|
+
[property: string]: {
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
minLength?: number;
|
|
37
|
+
pattern?: string;
|
|
38
|
+
maximum?: number;
|
|
39
|
+
exclusiveMaximum?: boolean;
|
|
40
|
+
minimum?: number;
|
|
41
|
+
exclusiveMinimum?: boolean;
|
|
42
|
+
multipleOf?: number;
|
|
43
|
+
maxItems?: number;
|
|
44
|
+
minItems?: number;
|
|
45
|
+
uniqueItems?: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|