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
package/Client.d.ts
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
|
-
import {
|
|
7
|
-
import { Action } from "./api/resources/action/client/Client";
|
|
6
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
8
7
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
9
8
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
9
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
10
|
+
import { User } from "./api/resources/user/client/Client";
|
|
10
11
|
export declare namespace MavenAGIClient {
|
|
11
12
|
interface Options {
|
|
12
13
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
@@ -25,12 +26,14 @@ export declare namespace MavenAGIClient {
|
|
|
25
26
|
export declare class MavenAGIClient {
|
|
26
27
|
protected readonly _options: MavenAGIClient.Options;
|
|
27
28
|
constructor(_options: MavenAGIClient.Options);
|
|
28
|
-
protected
|
|
29
|
-
get
|
|
30
|
-
protected _action: Action | undefined;
|
|
31
|
-
get action(): Action;
|
|
29
|
+
protected _actions: Actions | undefined;
|
|
30
|
+
get actions(): Actions;
|
|
32
31
|
protected _conversation: Conversation | undefined;
|
|
33
32
|
get conversation(): Conversation;
|
|
34
33
|
protected _knowledge: Knowledge | undefined;
|
|
35
34
|
get knowledge(): Knowledge;
|
|
35
|
+
protected _triggers: Triggers | undefined;
|
|
36
|
+
get triggers(): Triggers;
|
|
37
|
+
protected _user: User | undefined;
|
|
38
|
+
get user(): User;
|
|
36
39
|
}
|
package/Client.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { Action } from "./api/resources/action/client/Client";
|
|
4
|
+
import { Actions } from "./api/resources/actions/client/Client";
|
|
6
5
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
7
6
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
7
|
+
import { Triggers } from "./api/resources/triggers/client/Client";
|
|
8
|
+
import { User } from "./api/resources/user/client/Client";
|
|
8
9
|
export class MavenAGIClient {
|
|
9
10
|
constructor(_options) {
|
|
10
11
|
this._options = _options;
|
|
11
12
|
}
|
|
12
|
-
get
|
|
13
|
+
get actions() {
|
|
13
14
|
var _a;
|
|
14
|
-
return ((_a = this.
|
|
15
|
-
}
|
|
16
|
-
get action() {
|
|
17
|
-
var _a;
|
|
18
|
-
return ((_a = this._action) !== null && _a !== void 0 ? _a : (this._action = new Action(this._options)));
|
|
15
|
+
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Actions(this._options)));
|
|
19
16
|
}
|
|
20
17
|
get conversation() {
|
|
21
18
|
var _a;
|
|
@@ -25,4 +22,12 @@ export class MavenAGIClient {
|
|
|
25
22
|
var _a;
|
|
26
23
|
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Knowledge(this._options)));
|
|
27
24
|
}
|
|
25
|
+
get triggers() {
|
|
26
|
+
var _a;
|
|
27
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
|
|
28
|
+
}
|
|
29
|
+
get user() {
|
|
30
|
+
var _a;
|
|
31
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new User(this._options)));
|
|
32
|
+
}
|
|
28
33
|
}
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ const client = new MavenAGIClient({
|
|
|
25
25
|
organizationId: "YOUR_ORGANIZATION_ID",
|
|
26
26
|
agentId: "YOUR_AGENT_ID",
|
|
27
27
|
});
|
|
28
|
-
await client.
|
|
28
|
+
await client.actions.createActionSet({
|
|
29
29
|
id: "string",
|
|
30
30
|
name: "string",
|
|
31
31
|
});
|
|
@@ -40,7 +40,7 @@ will be thrown.
|
|
|
40
40
|
import { MavenAGIError } from "mavenagi";
|
|
41
41
|
|
|
42
42
|
try {
|
|
43
|
-
await client.
|
|
43
|
+
await client.createActionSet(...);
|
|
44
44
|
} catch (err) {
|
|
45
45
|
if (err instanceof MavenAGIError) {
|
|
46
46
|
console.log(err.statusCode);
|
|
@@ -50,43 +50,13 @@ try {
|
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
## Retries
|
|
54
|
-
|
|
55
|
-
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
56
|
-
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
57
|
-
retry limit (default: 2).
|
|
58
|
-
|
|
59
|
-
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
60
|
-
|
|
61
|
-
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
62
|
-
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
63
|
-
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
64
|
-
|
|
65
|
-
Use the `maxRetries` request option to configure this behavior.
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
const response = await client.create(..., {
|
|
69
|
-
maxRetries: 0 // override maxRetries at the request level
|
|
70
|
-
});
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Timeouts
|
|
74
|
-
|
|
75
|
-
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
const response = await client.create(..., {
|
|
79
|
-
timeoutInSeconds: 30 // override timeout to 30s
|
|
80
|
-
});
|
|
81
|
-
```
|
|
82
|
-
|
|
83
53
|
## Aborting Requests
|
|
84
54
|
|
|
85
55
|
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
86
56
|
|
|
87
57
|
```typescript
|
|
88
58
|
const controller = new AbortController();
|
|
89
|
-
const response = await client.
|
|
59
|
+
const response = await client.createActionSet(..., {
|
|
90
60
|
abortSignal: controller.signal
|
|
91
61
|
});
|
|
92
62
|
controller.abort(); // aborts the request
|
|
@@ -118,6 +88,60 @@ const client = new MavenAGIClient({
|
|
|
118
88
|
});
|
|
119
89
|
```
|
|
120
90
|
|
|
91
|
+
## Advanced
|
|
92
|
+
|
|
93
|
+
### Retries
|
|
94
|
+
|
|
95
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
96
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
97
|
+
retry limit (default: 2).
|
|
98
|
+
|
|
99
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
100
|
+
|
|
101
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
102
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
103
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
104
|
+
|
|
105
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
const response = await client.createActionSet(..., {
|
|
109
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Advanced
|
|
114
|
+
|
|
115
|
+
### Retries
|
|
116
|
+
|
|
117
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
118
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
|
119
|
+
retry limit (default: 2).
|
|
120
|
+
|
|
121
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
|
122
|
+
|
|
123
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
124
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
125
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
126
|
+
|
|
127
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
const response = await client.createActionSet(..., {
|
|
131
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Timeouts
|
|
136
|
+
|
|
137
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
const response = await client.createActionSet(..., {
|
|
141
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
121
145
|
## Contributing
|
|
122
146
|
|
|
123
147
|
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as MavenAGI from "../../../index";
|
|
7
|
+
export declare namespace Actions {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
organizationId: core.Supplier<string>;
|
|
13
|
+
agentId: core.Supplier<string>;
|
|
14
|
+
fetcher?: core.FetchFunction;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare class Actions {
|
|
23
|
+
protected readonly _options: Actions.Options;
|
|
24
|
+
constructor(_options: Actions.Options);
|
|
25
|
+
/**
|
|
26
|
+
* Update an action set or create it if it doesn't exist
|
|
27
|
+
*
|
|
28
|
+
* @param {MavenAGI.ActionSetRequest} request
|
|
29
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
32
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
33
|
+
* @throws {@link MavenAGI.ServerError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.actions.createActionSet({
|
|
37
|
+
* id: "string",
|
|
38
|
+
* name: "string"
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
createActionSet(request: MavenAGI.ActionSetRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Get an action set by its supplied ID
|
|
44
|
+
*
|
|
45
|
+
* @param {string} actionSetId - The ID of the action set to get
|
|
46
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
49
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
50
|
+
* @throws {@link MavenAGI.ServerError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.actions.getActionSet("string")
|
|
54
|
+
*/
|
|
55
|
+
getActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionSetResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete an action set
|
|
58
|
+
*
|
|
59
|
+
* @param {string} actionSetId - The ID of the action set to delete
|
|
60
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
63
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
64
|
+
* @throws {@link MavenAGI.ServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.actions.deleteActionSet("string")
|
|
68
|
+
*/
|
|
69
|
+
deleteActionSet(actionSetId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Update an action or create it if it doesn't exist
|
|
72
|
+
*
|
|
73
|
+
* @param {MavenAGI.Action} request
|
|
74
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
77
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
78
|
+
* @throws {@link MavenAGI.ServerError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.actions.registerAction({
|
|
82
|
+
* id: "string",
|
|
83
|
+
* actionSetId: "string",
|
|
84
|
+
* appId: "string",
|
|
85
|
+
* name: "string",
|
|
86
|
+
* description: "string",
|
|
87
|
+
* userInteractionRequired: true,
|
|
88
|
+
* buttonName: "string",
|
|
89
|
+
* requiredUserContextFieldNames: new Set(["string"]),
|
|
90
|
+
* userFormParameters: [{}]
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
registerAction(request: MavenAGI.Action, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
|
|
94
|
+
/**
|
|
95
|
+
* Get an action by its supplied ID
|
|
96
|
+
*
|
|
97
|
+
* @param {string} actionId - The ID of the action to get
|
|
98
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
101
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
102
|
+
* @throws {@link MavenAGI.ServerError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.actions.getAction("string")
|
|
106
|
+
*/
|
|
107
|
+
getAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.Action>;
|
|
108
|
+
/**
|
|
109
|
+
* Delete an action
|
|
110
|
+
*
|
|
111
|
+
* @param {string} actionId - The ID of the action to delete
|
|
112
|
+
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
115
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
116
|
+
* @throws {@link MavenAGI.ServerError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.actions.deleteAction("string")
|
|
120
|
+
*/
|
|
121
|
+
deleteAction(actionId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
122
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
123
|
+
}
|