@knowledge-stack/ksapi 1.26.0 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +6 -2
- package/dist/apis/InvitesApi.d.ts +5 -5
- package/dist/apis/InvitesApi.js +1 -6
- package/dist/apis/ThreadsApi.d.ts +45 -1
- package/dist/apis/ThreadsApi.js +46 -0
- package/dist/esm/apis/InvitesApi.d.ts +5 -5
- package/dist/esm/apis/InvitesApi.js +2 -7
- package/dist/esm/apis/ThreadsApi.d.ts +45 -1
- package/dist/esm/apis/ThreadsApi.js +47 -1
- package/dist/esm/models/AcceptInviteResponse.d.ts +54 -0
- package/dist/esm/models/AcceptInviteResponse.js +49 -0
- package/dist/esm/models/UserMessageRequest.d.ts +47 -0
- package/dist/esm/models/UserMessageRequest.js +42 -0
- package/dist/esm/models/UserMessageResponse.d.ts +47 -0
- package/dist/esm/models/UserMessageResponse.js +44 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/AcceptInviteResponse.d.ts +54 -0
- package/dist/models/AcceptInviteResponse.js +57 -0
- package/dist/models/UserMessageRequest.d.ts +47 -0
- package/dist/models/UserMessageRequest.js +50 -0
- package/dist/models/UserMessageResponse.d.ts +47 -0
- package/dist/models/UserMessageResponse.js +52 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/AcceptInviteResponse.md +37 -0
- package/docs/InvitesApi.md +2 -2
- package/docs/ThreadsApi.md +75 -0
- package/docs/UserMessageRequest.md +35 -0
- package/docs/UserMessageResponse.md +35 -0
- package/package.json +1 -1
- package/src/apis/InvitesApi.ts +8 -9
- package/src/apis/ThreadsApi.ts +97 -0
- package/src/models/AcceptInviteResponse.ts +102 -0
- package/src/models/UserMessageRequest.ts +82 -0
- package/src/models/UserMessageResponse.ts +83 -0
- package/src/models/index.ts +3 -0
|
@@ -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
|
+
* 202 response from POST /{thread_id}/user_message.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UserMessageResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface UserMessageResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UserMessageResponse
|
|
22
|
+
*/
|
|
23
|
+
workflowId: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UserMessageResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUserMessageResponse(value: object): value is UserMessageResponse;
|
|
29
|
+
export declare function UserMessageResponseFromJSON(json: any): UserMessageResponse;
|
|
30
|
+
export declare function UserMessageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserMessageResponse;
|
|
31
|
+
export declare function UserMessageResponseToJSON(json: any): UserMessageResponse;
|
|
32
|
+
export declare function UserMessageResponseToJSONTyped(value?: UserMessageResponse | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
export declare const UserMessageResponsePropertyValidationAttributesMap: {
|
|
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,44 @@
|
|
|
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 UserMessageResponse interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfUserMessageResponse(value) {
|
|
18
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function UserMessageResponseFromJSON(json) {
|
|
23
|
+
return UserMessageResponseFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function UserMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'workflowId': json['workflow_id'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function UserMessageResponseToJSON(json) {
|
|
34
|
+
return UserMessageResponseToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function UserMessageResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'workflow_id': value['workflowId'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export const UserMessageResponsePropertyValidationAttributesMap = {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './AcceptInviteResponse';
|
|
1
2
|
export * from './BulkTagRequest';
|
|
2
3
|
export * from './ChunkBulkResponse';
|
|
3
4
|
export * from './ChunkContentItem';
|
|
@@ -94,6 +95,8 @@ export * from './UpdateTagRequest';
|
|
|
94
95
|
export * from './UpdateTenantRequest';
|
|
95
96
|
export * from './UpdateThreadRequest';
|
|
96
97
|
export * from './UpdateUserRequest';
|
|
98
|
+
export * from './UserMessageRequest';
|
|
99
|
+
export * from './UserMessageResponse';
|
|
97
100
|
export * from './UserResponse';
|
|
98
101
|
export * from './ValidationError';
|
|
99
102
|
export * from './VersionChunkIdsResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AcceptInviteResponse';
|
|
3
4
|
export * from './BulkTagRequest';
|
|
4
5
|
export * from './ChunkBulkResponse';
|
|
5
6
|
export * from './ChunkContentItem';
|
|
@@ -96,6 +97,8 @@ export * from './UpdateTagRequest';
|
|
|
96
97
|
export * from './UpdateTenantRequest';
|
|
97
98
|
export * from './UpdateThreadRequest';
|
|
98
99
|
export * from './UpdateUserRequest';
|
|
100
|
+
export * from './UserMessageRequest';
|
|
101
|
+
export * from './UserMessageResponse';
|
|
99
102
|
export * from './UserResponse';
|
|
100
103
|
export * from './ValidationError';
|
|
101
104
|
export * from './VersionChunkIdsResponse';
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { TenantUserRole } from './TenantUserRole';
|
|
13
|
+
/**
|
|
14
|
+
* Response returned after accepting an invite.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AcceptInviteResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface AcceptInviteResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AcceptInviteResponse
|
|
23
|
+
*/
|
|
24
|
+
tenantId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {TenantUserRole}
|
|
28
|
+
* @memberof AcceptInviteResponse
|
|
29
|
+
*/
|
|
30
|
+
role: TenantUserRole;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the AcceptInviteResponse interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfAcceptInviteResponse(value: object): value is AcceptInviteResponse;
|
|
36
|
+
export declare function AcceptInviteResponseFromJSON(json: any): AcceptInviteResponse;
|
|
37
|
+
export declare function AcceptInviteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptInviteResponse;
|
|
38
|
+
export declare function AcceptInviteResponseToJSON(json: any): AcceptInviteResponse;
|
|
39
|
+
export declare function AcceptInviteResponseToJSONTyped(value?: AcceptInviteResponse | null, ignoreDiscriminator?: boolean): any;
|
|
40
|
+
export declare const AcceptInviteResponsePropertyValidationAttributesMap: {
|
|
41
|
+
[property: string]: {
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
minLength?: number;
|
|
44
|
+
pattern?: string;
|
|
45
|
+
maximum?: number;
|
|
46
|
+
exclusiveMaximum?: boolean;
|
|
47
|
+
minimum?: number;
|
|
48
|
+
exclusiveMinimum?: boolean;
|
|
49
|
+
multipleOf?: number;
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
minItems?: number;
|
|
52
|
+
uniqueItems?: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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.AcceptInviteResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfAcceptInviteResponse = instanceOfAcceptInviteResponse;
|
|
18
|
+
exports.AcceptInviteResponseFromJSON = AcceptInviteResponseFromJSON;
|
|
19
|
+
exports.AcceptInviteResponseFromJSONTyped = AcceptInviteResponseFromJSONTyped;
|
|
20
|
+
exports.AcceptInviteResponseToJSON = AcceptInviteResponseToJSON;
|
|
21
|
+
exports.AcceptInviteResponseToJSONTyped = AcceptInviteResponseToJSONTyped;
|
|
22
|
+
const TenantUserRole_1 = require("./TenantUserRole");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the AcceptInviteResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfAcceptInviteResponse(value) {
|
|
27
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('role' in value) || value['role'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function AcceptInviteResponseFromJSON(json) {
|
|
34
|
+
return AcceptInviteResponseFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function AcceptInviteResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'tenantId': json['tenant_id'],
|
|
42
|
+
'role': (0, TenantUserRole_1.TenantUserRoleFromJSON)(json['role']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function AcceptInviteResponseToJSON(json) {
|
|
46
|
+
return AcceptInviteResponseToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function AcceptInviteResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'tenant_id': value['tenantId'],
|
|
54
|
+
'role': (0, TenantUserRole_1.TenantUserRoleToJSON)(value['role']),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.AcceptInviteResponsePropertyValidationAttributesMap = {};
|
|
@@ -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 send a user message and trigger agent generation.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UserMessageRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UserMessageRequest {
|
|
18
|
+
/**
|
|
19
|
+
* User input text. Mock agent dev controls may be embedded here (e.g. /mock duration=5 wps=3 scenario=tool_call_once).
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UserMessageRequest
|
|
22
|
+
*/
|
|
23
|
+
inputText?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UserMessageRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUserMessageRequest(value: object): value is UserMessageRequest;
|
|
29
|
+
export declare function UserMessageRequestFromJSON(json: any): UserMessageRequest;
|
|
30
|
+
export declare function UserMessageRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserMessageRequest;
|
|
31
|
+
export declare function UserMessageRequestToJSON(json: any): UserMessageRequest;
|
|
32
|
+
export declare function UserMessageRequestToJSONTyped(value?: UserMessageRequest | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
export declare const UserMessageRequestPropertyValidationAttributesMap: {
|
|
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,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.UserMessageRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUserMessageRequest = instanceOfUserMessageRequest;
|
|
18
|
+
exports.UserMessageRequestFromJSON = UserMessageRequestFromJSON;
|
|
19
|
+
exports.UserMessageRequestFromJSONTyped = UserMessageRequestFromJSONTyped;
|
|
20
|
+
exports.UserMessageRequestToJSON = UserMessageRequestToJSON;
|
|
21
|
+
exports.UserMessageRequestToJSONTyped = UserMessageRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the UserMessageRequest interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfUserMessageRequest(value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function UserMessageRequestFromJSON(json) {
|
|
29
|
+
return UserMessageRequestFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function UserMessageRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'inputText': json['input_text'] == null ? undefined : json['input_text'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function UserMessageRequestToJSON(json) {
|
|
40
|
+
return UserMessageRequestToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function UserMessageRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'input_text': value['inputText'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.UserMessageRequestPropertyValidationAttributesMap = {};
|
|
@@ -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
|
+
* 202 response from POST /{thread_id}/user_message.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UserMessageResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface UserMessageResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UserMessageResponse
|
|
22
|
+
*/
|
|
23
|
+
workflowId: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UserMessageResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUserMessageResponse(value: object): value is UserMessageResponse;
|
|
29
|
+
export declare function UserMessageResponseFromJSON(json: any): UserMessageResponse;
|
|
30
|
+
export declare function UserMessageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserMessageResponse;
|
|
31
|
+
export declare function UserMessageResponseToJSON(json: any): UserMessageResponse;
|
|
32
|
+
export declare function UserMessageResponseToJSONTyped(value?: UserMessageResponse | null, ignoreDiscriminator?: boolean): any;
|
|
33
|
+
export declare const UserMessageResponsePropertyValidationAttributesMap: {
|
|
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,52 @@
|
|
|
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.UserMessageResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUserMessageResponse = instanceOfUserMessageResponse;
|
|
18
|
+
exports.UserMessageResponseFromJSON = UserMessageResponseFromJSON;
|
|
19
|
+
exports.UserMessageResponseFromJSONTyped = UserMessageResponseFromJSONTyped;
|
|
20
|
+
exports.UserMessageResponseToJSON = UserMessageResponseToJSON;
|
|
21
|
+
exports.UserMessageResponseToJSONTyped = UserMessageResponseToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the UserMessageResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfUserMessageResponse(value) {
|
|
26
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function UserMessageResponseFromJSON(json) {
|
|
31
|
+
return UserMessageResponseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function UserMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'workflowId': json['workflow_id'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function UserMessageResponseToJSON(json) {
|
|
42
|
+
return UserMessageResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function UserMessageResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'workflow_id': value['workflowId'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.UserMessageResponsePropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './AcceptInviteResponse';
|
|
1
2
|
export * from './BulkTagRequest';
|
|
2
3
|
export * from './ChunkBulkResponse';
|
|
3
4
|
export * from './ChunkContentItem';
|
|
@@ -94,6 +95,8 @@ export * from './UpdateTagRequest';
|
|
|
94
95
|
export * from './UpdateTenantRequest';
|
|
95
96
|
export * from './UpdateThreadRequest';
|
|
96
97
|
export * from './UpdateUserRequest';
|
|
98
|
+
export * from './UserMessageRequest';
|
|
99
|
+
export * from './UserMessageResponse';
|
|
97
100
|
export * from './UserResponse';
|
|
98
101
|
export * from './ValidationError';
|
|
99
102
|
export * from './VersionChunkIdsResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AcceptInviteResponse"), exports);
|
|
19
20
|
__exportStar(require("./BulkTagRequest"), exports);
|
|
20
21
|
__exportStar(require("./ChunkBulkResponse"), exports);
|
|
21
22
|
__exportStar(require("./ChunkContentItem"), exports);
|
|
@@ -112,6 +113,8 @@ __exportStar(require("./UpdateTagRequest"), exports);
|
|
|
112
113
|
__exportStar(require("./UpdateTenantRequest"), exports);
|
|
113
114
|
__exportStar(require("./UpdateThreadRequest"), exports);
|
|
114
115
|
__exportStar(require("./UpdateUserRequest"), exports);
|
|
116
|
+
__exportStar(require("./UserMessageRequest"), exports);
|
|
117
|
+
__exportStar(require("./UserMessageResponse"), exports);
|
|
115
118
|
__exportStar(require("./UserResponse"), exports);
|
|
116
119
|
__exportStar(require("./ValidationError"), exports);
|
|
117
120
|
__exportStar(require("./VersionChunkIdsResponse"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# AcceptInviteResponse
|
|
3
|
+
|
|
4
|
+
Response returned after accepting an invite.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`tenantId` | string
|
|
11
|
+
`role` | [TenantUserRole](TenantUserRole.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { AcceptInviteResponse } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"tenantId": null,
|
|
21
|
+
"role": null,
|
|
22
|
+
} satisfies AcceptInviteResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as AcceptInviteResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/InvitesApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
13
13
|
|
|
14
14
|
## acceptInvite
|
|
15
15
|
|
|
16
|
-
>
|
|
16
|
+
> AcceptInviteResponse acceptInvite(inviteId, ksUat)
|
|
17
17
|
|
|
18
18
|
Accept Invite
|
|
19
19
|
|
|
@@ -61,7 +61,7 @@ example().catch(console.error);
|
|
|
61
61
|
|
|
62
62
|
### Return type
|
|
63
63
|
|
|
64
|
-
**
|
|
64
|
+
[**AcceptInviteResponse**](AcceptInviteResponse.md)
|
|
65
65
|
|
|
66
66
|
### Authorization
|
|
67
67
|
|
package/docs/ThreadsApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
8
8
|
| [**deleteThread**](ThreadsApi.md#deletethread) | **DELETE** /v1/threads/{thread_id} | Delete Thread Handler |
|
|
9
9
|
| [**getThread**](ThreadsApi.md#getthread) | **GET** /v1/threads/{thread_id} | Get Thread Handler |
|
|
10
10
|
| [**listThreads**](ThreadsApi.md#listthreads) | **GET** /v1/threads | List Threads Handler |
|
|
11
|
+
| [**sendUserMessage**](ThreadsApi.md#sendusermessage) | **POST** /v1/threads/{thread_id}/user_message | Send User Message Handler |
|
|
11
12
|
| [**streamThread**](ThreadsApi.md#streamthread) | **GET** /v1/threads/{thread_id}/stream | Stream Thread Handler |
|
|
12
13
|
| [**updateThread**](ThreadsApi.md#updatethreadoperation) | **PATCH** /v1/threads/{thread_id} | Update Thread Handler |
|
|
13
14
|
|
|
@@ -303,6 +304,80 @@ No authorization required
|
|
|
303
304
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
304
305
|
|
|
305
306
|
|
|
307
|
+
## sendUserMessage
|
|
308
|
+
|
|
309
|
+
> UserMessageResponse sendUserMessage(threadId, userMessageRequest, ksUat)
|
|
310
|
+
|
|
311
|
+
Send User Message Handler
|
|
312
|
+
|
|
313
|
+
Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
|
|
314
|
+
|
|
315
|
+
### Example
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
import {
|
|
319
|
+
Configuration,
|
|
320
|
+
ThreadsApi,
|
|
321
|
+
} from '@knowledge-stack/ksapi';
|
|
322
|
+
import type { SendUserMessageRequest } from '@knowledge-stack/ksapi';
|
|
323
|
+
|
|
324
|
+
async function example() {
|
|
325
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
326
|
+
const api = new ThreadsApi();
|
|
327
|
+
|
|
328
|
+
const body = {
|
|
329
|
+
// string
|
|
330
|
+
threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
331
|
+
// UserMessageRequest
|
|
332
|
+
userMessageRequest: ...,
|
|
333
|
+
// string (optional)
|
|
334
|
+
ksUat: ksUat_example,
|
|
335
|
+
} satisfies SendUserMessageRequest;
|
|
336
|
+
|
|
337
|
+
try {
|
|
338
|
+
const data = await api.sendUserMessage(body);
|
|
339
|
+
console.log(data);
|
|
340
|
+
} catch (error) {
|
|
341
|
+
console.error(error);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// Run the test
|
|
346
|
+
example().catch(console.error);
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Parameters
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
| Name | Type | Description | Notes |
|
|
353
|
+
|------------- | ------------- | ------------- | -------------|
|
|
354
|
+
| **threadId** | `string` | | [Defaults to `undefined`] |
|
|
355
|
+
| **userMessageRequest** | [UserMessageRequest](UserMessageRequest.md) | | |
|
|
356
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
357
|
+
|
|
358
|
+
### Return type
|
|
359
|
+
|
|
360
|
+
[**UserMessageResponse**](UserMessageResponse.md)
|
|
361
|
+
|
|
362
|
+
### Authorization
|
|
363
|
+
|
|
364
|
+
No authorization required
|
|
365
|
+
|
|
366
|
+
### HTTP request headers
|
|
367
|
+
|
|
368
|
+
- **Content-Type**: `application/json`
|
|
369
|
+
- **Accept**: `application/json`
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### HTTP response details
|
|
373
|
+
| Status code | Description | Response headers |
|
|
374
|
+
|-------------|-------------|------------------|
|
|
375
|
+
| **202** | Successful Response | - |
|
|
376
|
+
| **422** | Validation Error | - |
|
|
377
|
+
|
|
378
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
379
|
+
|
|
380
|
+
|
|
306
381
|
## streamThread
|
|
307
382
|
|
|
308
383
|
> streamThread(threadId, lastMessageId, lastEntryId, ksUat)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# UserMessageRequest
|
|
3
|
+
|
|
4
|
+
Request to send a user message and trigger agent generation.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`inputText` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UserMessageRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"inputText": null,
|
|
20
|
+
} satisfies UserMessageRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as UserMessageRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# UserMessageResponse
|
|
3
|
+
|
|
4
|
+
202 response from POST /{thread_id}/user_message.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`workflowId` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UserMessageResponse } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"workflowId": null,
|
|
20
|
+
} satisfies UserMessageResponse
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as UserMessageResponse
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|