mavenagi 0.0.0-alpha.3 → 0.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +9 -6
- package/Client.js +13 -8
- package/README.md +57 -33
- package/api/resources/actions/client/Client.d.ts +123 -0
- package/api/resources/actions/client/Client.js +564 -0
- package/api/resources/{action → actions}/types/Action.d.ts +2 -2
- package/{dist/api/resources/actionSet → api/resources/actions}/types/ActionSetResponse.d.ts +0 -2
- package/api/resources/{actionSet → actions}/types/index.d.ts +2 -0
- package/{dist/serialization/resources/actionSet → api/resources/actions}/types/index.js +2 -0
- package/api/resources/commons/types/AppUser.d.ts +10 -0
- package/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/api/resources/commons/types/Feedback.d.ts +1 -1
- package/api/resources/commons/types/index.d.ts +4 -0
- package/api/resources/commons/types/index.js +4 -0
- package/api/resources/conversation/client/Client.d.ts +8 -2
- package/api/resources/conversation/client/Client.js +16 -10
- package/api/resources/conversation/types/AskRequest.d.ts +2 -0
- package/api/resources/conversation/types/Capability.d.ts +8 -0
- package/api/resources/conversation/types/Capability.js +7 -0
- package/api/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/api/resources/conversation/types/ResponseLength.js +8 -0
- package/api/resources/conversation/types/index.d.ts +3 -0
- package/api/resources/conversation/types/index.js +3 -0
- package/api/resources/index.d.ts +5 -4
- package/api/resources/index.js +5 -4
- package/api/resources/knowledge/client/Client.d.ts +22 -6
- package/api/resources/knowledge/client/Client.js +103 -14
- package/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
- package/api/resources/knowledge/types/index.d.ts +4 -1
- package/api/resources/knowledge/types/index.js +4 -1
- package/api/resources/{action → triggers}/client/Client.d.ts +23 -29
- package/api/resources/{actionSet → triggers}/client/Client.js +32 -31
- package/api/resources/triggers/types/EventTrigger.d.ts +12 -0
- package/api/resources/triggers/types/EventTrigger.js +4 -0
- package/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/api/resources/triggers/types/index.d.ts +2 -0
- package/api/resources/triggers/types/index.js +2 -0
- package/api/resources/user/client/Client.d.ts +62 -0
- package/api/resources/{action → user}/client/Client.js +29 -113
- package/api/resources/user/index.d.ts +1 -0
- package/api/resources/user/index.js +1 -0
- package/dist/Client.d.ts +9 -6
- package/dist/Client.js +13 -8
- package/dist/api/resources/actions/client/Client.d.ts +123 -0
- package/dist/api/resources/actions/client/Client.js +564 -0
- package/dist/api/resources/{action → actions}/types/Action.d.ts +2 -2
- package/dist/api/resources/actions/types/Action.js +4 -0
- package/dist/api/resources/actions/types/ActionParameter.js +4 -0
- package/dist/api/resources/actions/types/ActionSetBase.js +4 -0
- package/dist/api/resources/actions/types/ActionSetRequest.js +4 -0
- package/{api/resources/actionSet → dist/api/resources/actions}/types/ActionSetResponse.d.ts +0 -2
- package/dist/api/resources/actions/types/ActionSetResponse.js +4 -0
- package/dist/{serialization/resources/actionSet → api/resources/actions}/types/index.d.ts +2 -0
- package/{api/resources/actionSet → dist/api/resources/actions}/types/index.js +2 -0
- package/dist/api/resources/commons/types/AppUser.d.ts +10 -0
- package/dist/api/resources/commons/types/AppUser.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentification.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingProperty.d.ts +9 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingProperty.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/dist/api/resources/commons/types/Feedback.d.ts +1 -1
- package/dist/api/resources/commons/types/index.d.ts +4 -0
- package/dist/api/resources/commons/types/index.js +4 -0
- package/dist/api/resources/conversation/client/Client.d.ts +8 -2
- package/dist/api/resources/conversation/client/Client.js +16 -10
- package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/Capability.d.ts +8 -0
- package/dist/api/resources/conversation/types/Capability.js +7 -0
- package/dist/api/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/dist/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/dist/api/resources/conversation/types/ResponseConfig.js +4 -0
- package/dist/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/dist/api/resources/conversation/types/ResponseLength.js +8 -0
- package/dist/api/resources/conversation/types/index.d.ts +3 -0
- package/dist/api/resources/conversation/types/index.js +3 -0
- package/dist/api/resources/index.d.ts +5 -4
- package/dist/api/resources/index.js +5 -4
- package/dist/api/resources/knowledge/client/Client.d.ts +22 -6
- package/dist/api/resources/knowledge/client/Client.js +103 -14
- package/dist/api/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +1 -3
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/dist/api/resources/knowledge/types/index.d.ts +4 -1
- package/dist/api/resources/knowledge/types/index.js +4 -1
- package/dist/api/resources/{action → triggers}/client/Client.d.ts +23 -29
- package/dist/api/resources/{actionSet → triggers}/client/Client.js +32 -31
- package/dist/api/resources/triggers/client/index.d.ts +1 -0
- package/dist/api/resources/triggers/client/index.js +1 -0
- package/dist/api/resources/triggers/types/EventTrigger.d.ts +12 -0
- package/dist/api/resources/triggers/types/EventTrigger.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/dist/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/dist/api/resources/triggers/types/index.d.ts +2 -0
- package/dist/api/resources/triggers/types/index.js +2 -0
- package/dist/api/resources/user/client/Client.d.ts +62 -0
- package/dist/api/resources/{action → user}/client/Client.js +29 -113
- package/dist/api/resources/user/client/index.d.ts +1 -0
- package/dist/api/resources/user/client/index.js +1 -0
- package/dist/api/resources/user/index.d.ts +1 -0
- package/dist/api/resources/user/index.js +1 -0
- package/dist/serialization/resources/{actionSet → actions}/types/ActionSetResponse.d.ts +0 -2
- package/dist/serialization/resources/actions/types/ActionSetResponse.js +6 -0
- package/dist/{api/resources/actionSet → serialization/resources/actions}/types/index.d.ts +2 -0
- package/{serialization/resources/actionSet → dist/serialization/resources/actions}/types/index.js +2 -0
- package/dist/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/dist/serialization/resources/commons/types/AppUser.js +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js +9 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/dist/serialization/resources/commons/types/Feedback.d.ts +1 -1
- package/dist/serialization/resources/commons/types/Feedback.js +1 -1
- package/dist/serialization/resources/commons/types/index.d.ts +4 -0
- package/dist/serialization/resources/commons/types/index.js +4 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Capability.js +5 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.js +2 -0
- package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +3 -0
- package/dist/serialization/resources/conversation/types/index.js +3 -0
- package/dist/serialization/resources/index.d.ts +4 -4
- package/dist/serialization/resources/index.js +4 -4
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/dist/serialization/resources/knowledge/types/{KnowledgeDocument.js → BaseKnowledgeDocument.js} +3 -4
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +4 -1
- package/dist/serialization/resources/knowledge/types/index.js +4 -1
- package/dist/serialization/resources/triggers/types/EventTrigger.d.ts +15 -0
- package/dist/serialization/resources/triggers/types/EventTrigger.js +10 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/dist/serialization/resources/triggers/types/index.d.ts +2 -0
- package/dist/serialization/resources/triggers/types/index.js +2 -0
- package/package.json +1 -1
- package/serialization/resources/{actionSet → actions}/types/ActionSetResponse.d.ts +0 -2
- package/serialization/resources/actions/types/ActionSetResponse.js +6 -0
- package/serialization/resources/{actionSet → actions}/types/index.d.ts +2 -0
- package/{dist/api/resources/actionSet → serialization/resources/actions}/types/index.js +2 -0
- package/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/serialization/resources/commons/types/AppUser.js +10 -0
- package/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
- package/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/serialization/resources/commons/types/AppUserIdentifyingProperty.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserIdentifyingProperty.js +9 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/serialization/resources/commons/types/Feedback.d.ts +1 -1
- package/serialization/resources/commons/types/Feedback.js +1 -1
- package/serialization/resources/commons/types/index.d.ts +4 -0
- package/serialization/resources/commons/types/index.js +4 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/serialization/resources/conversation/types/Capability.js +5 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +2 -0
- package/serialization/resources/conversation/types/ConversationBase.js +2 -0
- package/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/serialization/resources/conversation/types/index.d.ts +3 -0
- package/serialization/resources/conversation/types/index.js +3 -0
- package/serialization/resources/index.d.ts +4 -4
- package/serialization/resources/index.js +4 -4
- package/serialization/resources/knowledge/types/{KnowledgeDocument.d.ts → BaseKnowledgeDocument.d.ts} +4 -5
- package/serialization/resources/knowledge/types/{KnowledgeDocument.js → BaseKnowledgeDocument.js} +3 -4
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +12 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +13 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +10 -0
- package/serialization/resources/knowledge/types/index.d.ts +4 -1
- package/serialization/resources/knowledge/types/index.js +4 -1
- package/serialization/resources/triggers/types/EventTrigger.d.ts +15 -0
- package/serialization/resources/triggers/types/EventTrigger.js +10 -0
- package/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/serialization/resources/triggers/types/index.d.ts +2 -0
- package/serialization/resources/triggers/types/index.js +2 -0
- package/api/resources/action/types/index.d.ts +0 -2
- package/api/resources/action/types/index.js +0 -2
- package/api/resources/actionSet/client/Client.d.ts +0 -71
- package/dist/api/resources/action/types/index.d.ts +0 -2
- package/dist/api/resources/action/types/index.js +0 -2
- package/dist/api/resources/actionSet/client/Client.d.ts +0 -71
- package/dist/serialization/resources/action/types/index.d.ts +0 -2
- package/dist/serialization/resources/action/types/index.js +0 -2
- package/dist/serialization/resources/actionSet/types/ActionSetResponse.js +0 -11
- package/serialization/resources/action/types/index.d.ts +0 -2
- package/serialization/resources/action/types/index.js +0 -2
- package/serialization/resources/actionSet/types/ActionSetResponse.js +0 -11
- /package/api/resources/{action → actions}/client/index.d.ts +0 -0
- /package/api/resources/{action → actions}/client/index.js +0 -0
- /package/api/resources/{action → actions}/index.d.ts +0 -0
- /package/api/resources/{action → actions}/index.js +0 -0
- /package/api/resources/{action → actions}/types/Action.js +0 -0
- /package/api/resources/{action → actions}/types/ActionParameter.d.ts +0 -0
- /package/api/resources/{action → actions}/types/ActionParameter.js +0 -0
- /package/api/resources/{actionSet → actions}/types/ActionSetBase.d.ts +0 -0
- /package/api/resources/{actionSet → actions}/types/ActionSetBase.js +0 -0
- /package/api/resources/{actionSet → actions}/types/ActionSetRequest.d.ts +0 -0
- /package/api/resources/{actionSet → actions}/types/ActionSetRequest.js +0 -0
- /package/api/resources/{actionSet → actions}/types/ActionSetResponse.js +0 -0
- /package/api/resources/{knowledge/types/KnowledgeDocument.js → commons/types/AppUser.js} +0 -0
- /package/{dist/api/resources/action/types/Action.js → api/resources/commons/types/AppUserIdentification.js} +0 -0
- /package/{dist/api/resources/action/types/ActionParameter.js → api/resources/commons/types/AppUserIdentifyingProperty.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetBase.js → api/resources/conversation/types/ResponseConfig.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetRequest.js → api/resources/knowledge/types/BaseKnowledgeDocument.js} +0 -0
- /package/{dist/api/resources/actionSet/types/ActionSetResponse.js → api/resources/knowledge/types/KnowledgeDocumentRequest.js} +0 -0
- /package/{dist/api/resources/knowledge/types/KnowledgeDocument.js → api/resources/knowledge/types/KnowledgeDocumentResponse.js} +0 -0
- /package/api/resources/{actionSet → triggers}/client/index.d.ts +0 -0
- /package/api/resources/{actionSet → triggers}/client/index.js +0 -0
- /package/api/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/api/resources/{actionSet → triggers}/index.js +0 -0
- /package/{dist/api/resources/action → api/resources/user}/client/index.d.ts +0 -0
- /package/{dist/api/resources/action → api/resources/user}/client/index.js +0 -0
- /package/dist/api/resources/{actionSet → actions}/client/index.d.ts +0 -0
- /package/dist/api/resources/{actionSet → actions}/client/index.js +0 -0
- /package/dist/api/resources/{action → actions}/index.d.ts +0 -0
- /package/dist/api/resources/{action → actions}/index.js +0 -0
- /package/dist/api/resources/{action → actions}/types/ActionParameter.d.ts +0 -0
- /package/dist/api/resources/{actionSet → actions}/types/ActionSetBase.d.ts +0 -0
- /package/dist/api/resources/{actionSet → actions}/types/ActionSetRequest.d.ts +0 -0
- /package/dist/api/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/dist/api/resources/{actionSet → triggers}/index.js +0 -0
- /package/dist/serialization/resources/{action → actions}/index.d.ts +0 -0
- /package/dist/serialization/resources/{action → actions}/index.js +0 -0
- /package/dist/serialization/resources/{action → actions}/types/Action.d.ts +0 -0
- /package/dist/serialization/resources/{action → actions}/types/Action.js +0 -0
- /package/dist/serialization/resources/{action → actions}/types/ActionParameter.d.ts +0 -0
- /package/dist/serialization/resources/{action → actions}/types/ActionParameter.js +0 -0
- /package/dist/serialization/resources/{actionSet → actions}/types/ActionSetBase.d.ts +0 -0
- /package/dist/serialization/resources/{actionSet → actions}/types/ActionSetBase.js +0 -0
- /package/dist/serialization/resources/{actionSet → actions}/types/ActionSetRequest.d.ts +0 -0
- /package/dist/serialization/resources/{actionSet → actions}/types/ActionSetRequest.js +0 -0
- /package/dist/serialization/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/dist/serialization/resources/{actionSet → triggers}/index.js +0 -0
- /package/serialization/resources/{action → actions}/index.d.ts +0 -0
- /package/serialization/resources/{action → actions}/index.js +0 -0
- /package/serialization/resources/{action → actions}/types/Action.d.ts +0 -0
- /package/serialization/resources/{action → actions}/types/Action.js +0 -0
- /package/serialization/resources/{action → actions}/types/ActionParameter.d.ts +0 -0
- /package/serialization/resources/{action → actions}/types/ActionParameter.js +0 -0
- /package/serialization/resources/{actionSet → actions}/types/ActionSetBase.d.ts +0 -0
- /package/serialization/resources/{actionSet → actions}/types/ActionSetBase.js +0 -0
- /package/serialization/resources/{actionSet → actions}/types/ActionSetRequest.d.ts +0 -0
- /package/serialization/resources/{actionSet → actions}/types/ActionSetRequest.js +0 -0
- /package/serialization/resources/{actionSet → triggers}/index.d.ts +0 -0
- /package/serialization/resources/{actionSet → triggers}/index.js +0 -0
|
@@ -2,3 +2,7 @@ export * from "./ErrorMessage";
|
|
|
2
2
|
export * from "./User";
|
|
3
3
|
export * from "./FeedbackType";
|
|
4
4
|
export * from "./Feedback";
|
|
5
|
+
export * from "./AppUserIdentification";
|
|
6
|
+
export * from "./AppUserIdentifyingProperty";
|
|
7
|
+
export * from "./AppUserIdentifyingPropertyType";
|
|
8
|
+
export * from "./AppUser";
|
|
@@ -36,7 +36,12 @@ export declare class Conversation {
|
|
|
36
36
|
* await client.conversation.initialize({
|
|
37
37
|
* messages: [{}],
|
|
38
38
|
* id: "string",
|
|
39
|
-
* context: {}
|
|
39
|
+
* context: {},
|
|
40
|
+
* responseConfig: {
|
|
41
|
+
* capabilities: [MavenAGI.Capability.Markdown],
|
|
42
|
+
* isCopilot: true,
|
|
43
|
+
* responseLength: MavenAGI.ResponseLength.Short
|
|
44
|
+
* }
|
|
40
45
|
* })
|
|
41
46
|
*/
|
|
42
47
|
initialize(request: MavenAGI.ConversationRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
@@ -89,7 +94,8 @@ export declare class Conversation {
|
|
|
89
94
|
* await client.conversation.ask("string", {
|
|
90
95
|
* id: "string",
|
|
91
96
|
* text: "string",
|
|
92
|
-
* context: {}
|
|
97
|
+
* context: {},
|
|
98
|
+
* responseConfig: {}
|
|
93
99
|
* })
|
|
94
100
|
*/
|
|
95
101
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
@@ -34,7 +34,12 @@ export class Conversation {
|
|
|
34
34
|
* await client.conversation.initialize({
|
|
35
35
|
* messages: [{}],
|
|
36
36
|
* id: "string",
|
|
37
|
-
* context: {}
|
|
37
|
+
* context: {},
|
|
38
|
+
* responseConfig: {
|
|
39
|
+
* capabilities: [MavenAGI.Capability.Markdown],
|
|
40
|
+
* isCopilot: true,
|
|
41
|
+
* responseLength: MavenAGI.ResponseLength.Short
|
|
42
|
+
* }
|
|
38
43
|
* })
|
|
39
44
|
*/
|
|
40
45
|
initialize(request, requestOptions) {
|
|
@@ -49,7 +54,7 @@ export class Conversation {
|
|
|
49
54
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
50
55
|
"X-Fern-Language": "JavaScript",
|
|
51
56
|
"X-Fern-SDK-Name": "mavenagi",
|
|
52
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
57
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
53
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
60
|
},
|
|
@@ -137,7 +142,7 @@ export class Conversation {
|
|
|
137
142
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
138
143
|
"X-Fern-Language": "JavaScript",
|
|
139
144
|
"X-Fern-SDK-Name": "mavenagi",
|
|
140
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
141
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
142
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
143
148
|
},
|
|
@@ -230,7 +235,7 @@ export class Conversation {
|
|
|
230
235
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
231
236
|
"X-Fern-Language": "JavaScript",
|
|
232
237
|
"X-Fern-SDK-Name": "mavenagi",
|
|
233
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
238
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
234
239
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
235
240
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
236
241
|
},
|
|
@@ -310,7 +315,8 @@ export class Conversation {
|
|
|
310
315
|
* await client.conversation.ask("string", {
|
|
311
316
|
* id: "string",
|
|
312
317
|
* text: "string",
|
|
313
|
-
* context: {}
|
|
318
|
+
* context: {},
|
|
319
|
+
* responseConfig: {}
|
|
314
320
|
* })
|
|
315
321
|
*/
|
|
316
322
|
ask(conversationId, request, requestOptions) {
|
|
@@ -325,7 +331,7 @@ export class Conversation {
|
|
|
325
331
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
326
332
|
"X-Fern-Language": "JavaScript",
|
|
327
333
|
"X-Fern-SDK-Name": "mavenagi",
|
|
328
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
334
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
329
335
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
330
336
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
331
337
|
},
|
|
@@ -403,7 +409,7 @@ export class Conversation {
|
|
|
403
409
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
404
410
|
"X-Fern-Language": "JavaScript",
|
|
405
411
|
"X-Fern-SDK-Name": "mavenagi",
|
|
406
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
412
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
407
413
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
408
414
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
409
415
|
},
|
|
@@ -505,7 +511,7 @@ export class Conversation {
|
|
|
505
511
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
506
512
|
"X-Fern-Language": "JavaScript",
|
|
507
513
|
"X-Fern-SDK-Name": "mavenagi",
|
|
508
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
514
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
509
515
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
510
516
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
511
517
|
},
|
|
@@ -601,7 +607,7 @@ export class Conversation {
|
|
|
601
607
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
602
608
|
"X-Fern-Language": "JavaScript",
|
|
603
609
|
"X-Fern-SDK-Name": "mavenagi",
|
|
604
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
610
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
605
611
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
606
612
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
607
613
|
},
|
|
@@ -702,7 +708,7 @@ export class Conversation {
|
|
|
702
708
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
703
709
|
"X-Fern-Language": "JavaScript",
|
|
704
710
|
"X-Fern-SDK-Name": "mavenagi",
|
|
705
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
711
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
706
712
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
707
713
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
708
714
|
},
|
|
@@ -9,4 +9,6 @@ export interface AskRequest {
|
|
|
9
9
|
text: string;
|
|
10
10
|
/** The context of the message */
|
|
11
11
|
context?: MavenAGI.ConversationMessageContext;
|
|
12
|
+
/** Optional configuration for responses to this conversation. Only applies to new conversations. */
|
|
13
|
+
responseConfig?: MavenAGI.ResponseConfig;
|
|
12
14
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ResponseConfig {
|
|
6
|
+
/** List of capabilities supported by the caller. Defaults to all */
|
|
7
|
+
capabilities?: MavenAGI.Capability[];
|
|
8
|
+
/** Whether the response is for an human agent (true) or an end user (false). Defaults to false. */
|
|
9
|
+
isCopilot?: boolean;
|
|
10
|
+
/** The desired response length. Defaults to ResponseLength.MEDIUM. */
|
|
11
|
+
responseLength?: MavenAGI.ResponseLength;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type ResponseLength = "SHORT" | "MEDIUM" | "LONG";
|
|
5
|
+
export declare const ResponseLength: {
|
|
6
|
+
readonly Short: "SHORT";
|
|
7
|
+
readonly Medium: "MEDIUM";
|
|
8
|
+
readonly Long: "LONG";
|
|
9
|
+
};
|
package/api/resources/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * from "./
|
|
3
|
-
export * as action from "./action";
|
|
4
|
-
export * from "./action/types";
|
|
1
|
+
export * as actions from "./actions";
|
|
2
|
+
export * from "./actions/types";
|
|
5
3
|
export * as commons from "./commons";
|
|
6
4
|
export * from "./commons/types";
|
|
7
5
|
export * as conversation from "./conversation";
|
|
8
6
|
export * from "./conversation/types";
|
|
9
7
|
export * as knowledge from "./knowledge";
|
|
10
8
|
export * from "./knowledge/types";
|
|
9
|
+
export * as triggers from "./triggers";
|
|
10
|
+
export * from "./triggers/types";
|
|
11
11
|
export * from "./commons/errors";
|
|
12
|
+
export * as user from "./user";
|
package/api/resources/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * from "./
|
|
3
|
-
export * as action from "./action";
|
|
4
|
-
export * from "./action/types";
|
|
1
|
+
export * as actions from "./actions";
|
|
2
|
+
export * from "./actions/types";
|
|
5
3
|
export * as commons from "./commons";
|
|
6
4
|
export * from "./commons/types";
|
|
7
5
|
export * as conversation from "./conversation";
|
|
8
6
|
export * from "./conversation/types";
|
|
9
7
|
export * as knowledge from "./knowledge";
|
|
10
8
|
export * from "./knowledge/types";
|
|
9
|
+
export * as triggers from "./triggers";
|
|
10
|
+
export * from "./triggers/types";
|
|
11
11
|
export * from "./commons/errors";
|
|
12
|
+
export * as user from "./user";
|
|
@@ -41,6 +41,20 @@ export declare class Knowledge {
|
|
|
41
41
|
* })
|
|
42
42
|
*/
|
|
43
43
|
createKnowledgeBase(request: MavenAGI.KnowledgeBase, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBase>;
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing knowledge base.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} knowledgeBaseId - The ID of the knowledge base to get
|
|
48
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
51
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
52
|
+
* @throws {@link MavenAGI.ServerError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.knowledge.getKnowledgeBase("string")
|
|
56
|
+
*/
|
|
57
|
+
getKnowledgeBase(knowledgeBaseId: string, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBase>;
|
|
44
58
|
/**
|
|
45
59
|
* Create a new knowledge base version. Only supported on API knowledge bases. Will throw an exception if there is an existing version in progress.
|
|
46
60
|
*
|
|
@@ -77,7 +91,7 @@ export declare class Knowledge {
|
|
|
77
91
|
/**
|
|
78
92
|
* Create knowledge document. Requires an existing knowledge base with an in progress version. Will throw an exception if the latest version is not in progress.
|
|
79
93
|
*
|
|
80
|
-
* @param {MavenAGI.
|
|
94
|
+
* @param {MavenAGI.KnowledgeDocumentRequest} request
|
|
81
95
|
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
96
|
*
|
|
83
97
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -86,8 +100,9 @@ export declare class Knowledge {
|
|
|
86
100
|
*
|
|
87
101
|
* @example
|
|
88
102
|
* await client.knowledge.createKnowledgeDocument({
|
|
89
|
-
*
|
|
103
|
+
* contentType: MavenAGI.KnowledgeDocumentContentType.Html,
|
|
90
104
|
* content: "string",
|
|
105
|
+
* title: "string",
|
|
91
106
|
* url: "string",
|
|
92
107
|
* language: "string",
|
|
93
108
|
* createdAt: new Date("2024-01-15T09:30:00.000Z"),
|
|
@@ -97,11 +112,11 @@ export declare class Knowledge {
|
|
|
97
112
|
* documentId: "string"
|
|
98
113
|
* })
|
|
99
114
|
*/
|
|
100
|
-
createKnowledgeDocument(request: MavenAGI.
|
|
115
|
+
createKnowledgeDocument(request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
|
|
101
116
|
/**
|
|
102
117
|
* Update knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
|
|
103
118
|
*
|
|
104
|
-
* @param {MavenAGI.
|
|
119
|
+
* @param {MavenAGI.KnowledgeDocumentRequest} request
|
|
105
120
|
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
121
|
*
|
|
107
122
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -110,8 +125,9 @@ export declare class Knowledge {
|
|
|
110
125
|
*
|
|
111
126
|
* @example
|
|
112
127
|
* await client.knowledge.updateKnowledgeDocument({
|
|
113
|
-
*
|
|
128
|
+
* contentType: MavenAGI.KnowledgeDocumentContentType.Html,
|
|
114
129
|
* content: "string",
|
|
130
|
+
* title: "string",
|
|
115
131
|
* url: "string",
|
|
116
132
|
* language: "string",
|
|
117
133
|
* createdAt: new Date("2024-01-15T09:30:00.000Z"),
|
|
@@ -121,7 +137,7 @@ export declare class Knowledge {
|
|
|
121
137
|
* documentId: "string"
|
|
122
138
|
* })
|
|
123
139
|
*/
|
|
124
|
-
updateKnowledgeDocument(request: MavenAGI.
|
|
140
|
+
updateKnowledgeDocument(request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
|
|
125
141
|
/**
|
|
126
142
|
* Delete knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
|
|
127
143
|
*
|
|
@@ -50,7 +50,7 @@ export class Knowledge {
|
|
|
50
50
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "mavenagi",
|
|
53
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
53
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
54
54
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
55
55
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
56
56
|
},
|
|
@@ -113,6 +113,93 @@ export class Knowledge {
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Get an existing knowledge base.
|
|
118
|
+
*
|
|
119
|
+
* @param {string} knowledgeBaseId - The ID of the knowledge base to get
|
|
120
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
123
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
124
|
+
* @throws {@link MavenAGI.ServerError}
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* await client.knowledge.getKnowledgeBase("string")
|
|
128
|
+
*/
|
|
129
|
+
getKnowledgeBase(knowledgeBaseId, requestOptions) {
|
|
130
|
+
var _a, _b;
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
133
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseId)}`),
|
|
134
|
+
method: "GET",
|
|
135
|
+
headers: {
|
|
136
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
137
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
138
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
139
|
+
"X-Fern-Language": "JavaScript",
|
|
140
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
141
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
142
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
143
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
144
|
+
},
|
|
145
|
+
contentType: "application/json",
|
|
146
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
147
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
148
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
149
|
+
});
|
|
150
|
+
if (_response.ok) {
|
|
151
|
+
return yield serializers.KnowledgeBase.parseOrThrow(_response.body, {
|
|
152
|
+
unrecognizedObjectKeys: "passthrough",
|
|
153
|
+
allowUnrecognizedUnionMembers: true,
|
|
154
|
+
allowUnrecognizedEnumValues: true,
|
|
155
|
+
breadcrumbsPrefix: ["response"],
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (_response.error.reason === "status-code") {
|
|
159
|
+
switch (_response.error.statusCode) {
|
|
160
|
+
case 404:
|
|
161
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
162
|
+
unrecognizedObjectKeys: "passthrough",
|
|
163
|
+
allowUnrecognizedUnionMembers: true,
|
|
164
|
+
allowUnrecognizedEnumValues: true,
|
|
165
|
+
breadcrumbsPrefix: ["response"],
|
|
166
|
+
}));
|
|
167
|
+
case 400:
|
|
168
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
169
|
+
unrecognizedObjectKeys: "passthrough",
|
|
170
|
+
allowUnrecognizedUnionMembers: true,
|
|
171
|
+
allowUnrecognizedEnumValues: true,
|
|
172
|
+
breadcrumbsPrefix: ["response"],
|
|
173
|
+
}));
|
|
174
|
+
case 500:
|
|
175
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
176
|
+
unrecognizedObjectKeys: "passthrough",
|
|
177
|
+
allowUnrecognizedUnionMembers: true,
|
|
178
|
+
allowUnrecognizedEnumValues: true,
|
|
179
|
+
breadcrumbsPrefix: ["response"],
|
|
180
|
+
}));
|
|
181
|
+
default:
|
|
182
|
+
throw new errors.MavenAGIError({
|
|
183
|
+
statusCode: _response.error.statusCode,
|
|
184
|
+
body: _response.error.body,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
switch (_response.error.reason) {
|
|
189
|
+
case "non-json":
|
|
190
|
+
throw new errors.MavenAGIError({
|
|
191
|
+
statusCode: _response.error.statusCode,
|
|
192
|
+
body: _response.error.rawBody,
|
|
193
|
+
});
|
|
194
|
+
case "timeout":
|
|
195
|
+
throw new errors.MavenAGITimeoutError();
|
|
196
|
+
case "unknown":
|
|
197
|
+
throw new errors.MavenAGIError({
|
|
198
|
+
message: _response.error.errorMessage,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
116
203
|
/**
|
|
117
204
|
* Create a new knowledge base version. Only supported on API knowledge bases. Will throw an exception if there is an existing version in progress.
|
|
118
205
|
*
|
|
@@ -141,7 +228,7 @@ export class Knowledge {
|
|
|
141
228
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
229
|
"X-Fern-Language": "JavaScript",
|
|
143
230
|
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
231
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
145
232
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
146
233
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
147
234
|
},
|
|
@@ -231,7 +318,7 @@ export class Knowledge {
|
|
|
231
318
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
232
319
|
"X-Fern-Language": "JavaScript",
|
|
233
320
|
"X-Fern-SDK-Name": "mavenagi",
|
|
234
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
321
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
235
322
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
323
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
324
|
},
|
|
@@ -292,7 +379,7 @@ export class Knowledge {
|
|
|
292
379
|
/**
|
|
293
380
|
* Create knowledge document. Requires an existing knowledge base with an in progress version. Will throw an exception if the latest version is not in progress.
|
|
294
381
|
*
|
|
295
|
-
* @param {MavenAGI.
|
|
382
|
+
* @param {MavenAGI.KnowledgeDocumentRequest} request
|
|
296
383
|
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
384
|
*
|
|
298
385
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -301,8 +388,9 @@ export class Knowledge {
|
|
|
301
388
|
*
|
|
302
389
|
* @example
|
|
303
390
|
* await client.knowledge.createKnowledgeDocument({
|
|
304
|
-
*
|
|
391
|
+
* contentType: MavenAGI.KnowledgeDocumentContentType.Html,
|
|
305
392
|
* content: "string",
|
|
393
|
+
* title: "string",
|
|
306
394
|
* url: "string",
|
|
307
395
|
* language: "string",
|
|
308
396
|
* createdAt: new Date("2024-01-15T09:30:00.000Z"),
|
|
@@ -324,18 +412,18 @@ export class Knowledge {
|
|
|
324
412
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
325
413
|
"X-Fern-Language": "JavaScript",
|
|
326
414
|
"X-Fern-SDK-Name": "mavenagi",
|
|
327
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
415
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
328
416
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
417
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
330
418
|
},
|
|
331
419
|
contentType: "application/json",
|
|
332
|
-
body: yield serializers.
|
|
420
|
+
body: yield serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
333
421
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
334
422
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
335
423
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
336
424
|
});
|
|
337
425
|
if (_response.ok) {
|
|
338
|
-
return yield serializers.
|
|
426
|
+
return yield serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
339
427
|
unrecognizedObjectKeys: "passthrough",
|
|
340
428
|
allowUnrecognizedUnionMembers: true,
|
|
341
429
|
allowUnrecognizedEnumValues: true,
|
|
@@ -390,7 +478,7 @@ export class Knowledge {
|
|
|
390
478
|
/**
|
|
391
479
|
* Update knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
|
|
392
480
|
*
|
|
393
|
-
* @param {MavenAGI.
|
|
481
|
+
* @param {MavenAGI.KnowledgeDocumentRequest} request
|
|
394
482
|
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
395
483
|
*
|
|
396
484
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -399,8 +487,9 @@ export class Knowledge {
|
|
|
399
487
|
*
|
|
400
488
|
* @example
|
|
401
489
|
* await client.knowledge.updateKnowledgeDocument({
|
|
402
|
-
*
|
|
490
|
+
* contentType: MavenAGI.KnowledgeDocumentContentType.Html,
|
|
403
491
|
* content: "string",
|
|
492
|
+
* title: "string",
|
|
404
493
|
* url: "string",
|
|
405
494
|
* language: "string",
|
|
406
495
|
* createdAt: new Date("2024-01-15T09:30:00.000Z"),
|
|
@@ -422,18 +511,18 @@ export class Knowledge {
|
|
|
422
511
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
423
512
|
"X-Fern-Language": "JavaScript",
|
|
424
513
|
"X-Fern-SDK-Name": "mavenagi",
|
|
425
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
514
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
426
515
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
427
516
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
428
517
|
},
|
|
429
518
|
contentType: "application/json",
|
|
430
|
-
body: yield serializers.
|
|
519
|
+
body: yield serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
431
520
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
432
521
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
433
522
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
434
523
|
});
|
|
435
524
|
if (_response.ok) {
|
|
436
|
-
return yield serializers.
|
|
525
|
+
return yield serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
437
526
|
unrecognizedObjectKeys: "passthrough",
|
|
438
527
|
allowUnrecognizedUnionMembers: true,
|
|
439
528
|
allowUnrecognizedEnumValues: true,
|
|
@@ -513,7 +602,7 @@ export class Knowledge {
|
|
|
513
602
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
514
603
|
"X-Fern-Language": "JavaScript",
|
|
515
604
|
"X-Fern-SDK-Name": "mavenagi",
|
|
516
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
605
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.4",
|
|
517
606
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
518
607
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
519
608
|
},
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export interface
|
|
5
|
+
export interface BaseKnowledgeDocument extends MavenAGI.KnowledgeDocumentId {
|
|
6
6
|
/** The title of the document. Will be shown as part of answers. */
|
|
7
7
|
title: string;
|
|
8
|
-
/** The content of the document. Not shown directly to users. */
|
|
9
|
-
content: string;
|
|
10
8
|
/** The URL of the document. Should be visible to end users. Will be shown as part of answers. */
|
|
11
9
|
url?: string;
|
|
12
10
|
/** The document language. Must be a valid ISO 639-1 language code. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* API knowledge bases are managed by a Maven App. URL knowledge bases will start a web crawl of the provided URL. RSS knowledge bases will parse documents from the RSS returned from the provided URL.
|
|
6
6
|
*/
|
|
7
7
|
export declare type KnowledgeBaseType = "API" | "URL" | "RSS";
|
|
8
8
|
export declare const KnowledgeBaseType: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The type of the knowledge document content. Markdown preferred.
|
|
6
|
+
*/
|
|
7
|
+
export declare type KnowledgeDocumentContentType = "HTML" | "MARKDOWN";
|
|
8
|
+
export declare const KnowledgeDocumentContentType: {
|
|
9
|
+
readonly Html: "HTML";
|
|
10
|
+
readonly Markdown: "MARKDOWN";
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument {
|
|
6
|
+
contentType: MavenAGI.KnowledgeDocumentContentType;
|
|
7
|
+
/** The content of the document. Not shown directly to users. May be provided in HTML or markdown. HTML will be converted to markdown automatically. Images are not currently supported and will be ignored. */
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface KnowledgeDocumentResponse extends MavenAGI.BaseKnowledgeDocument {
|
|
6
|
+
/** The content of the document in markdown format. Not shown directly to users. */
|
|
7
|
+
content: string;
|
|
8
|
+
}
|
|
@@ -4,4 +4,7 @@ export * from "./KnowledgeBaseType";
|
|
|
4
4
|
export * from "./KnowledgeBaseVersion";
|
|
5
5
|
export * from "./KnowledgeBaseVersionType";
|
|
6
6
|
export * from "./KnowledgeDocumentId";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./BaseKnowledgeDocument";
|
|
8
|
+
export * from "./KnowledgeDocumentRequest";
|
|
9
|
+
export * from "./KnowledgeDocumentContentType";
|
|
10
|
+
export * from "./KnowledgeDocumentResponse";
|
|
@@ -4,4 +4,7 @@ export * from "./KnowledgeBaseType";
|
|
|
4
4
|
export * from "./KnowledgeBaseVersion";
|
|
5
5
|
export * from "./KnowledgeBaseVersionType";
|
|
6
6
|
export * from "./KnowledgeDocumentId";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./BaseKnowledgeDocument";
|
|
8
|
+
export * from "./KnowledgeDocumentRequest";
|
|
9
|
+
export * from "./KnowledgeDocumentContentType";
|
|
10
|
+
export * from "./KnowledgeDocumentResponse";
|