mavenagi 0.0.0-alpha.6 → 0.0.0-alpha.8
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 +2 -2
- package/README.md +2 -2
- package/api/resources/actions/client/Client.d.ts +14 -12
- package/api/resources/actions/client/Client.js +23 -21
- package/api/resources/actions/types/ActionBase.d.ts +7 -6
- package/api/resources/actions/types/ActionRequest.d.ts +5 -3
- package/api/resources/actions/types/ActionResponse.d.ts +5 -3
- package/api/resources/actions/types/Preconditions.d.ts +7 -0
- package/api/resources/actions/types/index.d.ts +1 -0
- package/api/resources/actions/types/index.js +1 -0
- package/api/resources/commons/types/AppUserIdentification.d.ts +2 -2
- package/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +1 -1
- package/api/resources/commons/types/AppUserRequest.d.ts +5 -0
- package/api/resources/commons/types/AppUserResponse.d.ts +5 -0
- package/api/resources/commons/types/index.d.ts +3 -1
- package/api/resources/commons/types/index.js +3 -1
- package/api/resources/conversation/client/Client.d.ts +4 -4
- package/api/resources/conversation/client/Client.js +30 -30
- package/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
- package/api/resources/conversation/types/index.d.ts +1 -2
- package/api/resources/conversation/types/index.js +1 -2
- package/api/resources/knowledge/client/Client.d.ts +45 -54
- package/api/resources/knowledge/client/Client.js +74 -85
- package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
- package/{dist/api/resources/knowledge/types/KnowledgeBase.d.ts → api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
- package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
- package/api/resources/knowledge/types/index.d.ts +4 -4
- package/api/resources/knowledge/types/index.js +4 -4
- package/api/resources/triggers/client/Client.d.ts +12 -12
- package/api/resources/triggers/client/Client.js +21 -21
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
- package/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
- package/api/resources/users/client/Client.d.ts +6 -6
- package/api/resources/users/client/Client.js +11 -11
- package/dist/Client.d.ts +2 -2
- package/dist/api/resources/actions/client/Client.d.ts +14 -12
- package/dist/api/resources/actions/client/Client.js +23 -21
- package/dist/api/resources/actions/types/ActionBase.d.ts +7 -6
- package/dist/api/resources/actions/types/ActionRequest.d.ts +5 -3
- package/dist/api/resources/actions/types/ActionResponse.d.ts +5 -3
- package/dist/api/resources/actions/types/Preconditions.d.ts +7 -0
- package/dist/api/resources/actions/types/index.d.ts +1 -0
- package/dist/api/resources/actions/types/index.js +1 -0
- package/dist/api/resources/commons/types/AppUserIdentification.d.ts +2 -2
- package/dist/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +1 -1
- package/dist/api/resources/commons/types/AppUserRequest.d.ts +5 -0
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +5 -0
- package/dist/api/resources/commons/types/index.d.ts +3 -1
- package/dist/api/resources/commons/types/index.js +3 -1
- package/dist/api/resources/conversation/client/Client.d.ts +4 -4
- package/dist/api/resources/conversation/client/Client.js +30 -30
- package/dist/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
- package/dist/api/resources/conversation/types/index.d.ts +1 -2
- package/dist/api/resources/conversation/types/index.js +1 -2
- package/dist/api/resources/knowledge/client/Client.d.ts +45 -54
- package/dist/api/resources/knowledge/client/Client.js +74 -85
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
- package/{api/resources/knowledge/types/KnowledgeBase.d.ts → dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
- package/dist/api/resources/knowledge/types/index.d.ts +4 -4
- package/dist/api/resources/knowledge/types/index.js +4 -4
- package/dist/api/resources/triggers/client/Client.d.ts +12 -12
- package/dist/api/resources/triggers/client/Client.js +21 -21
- package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
- package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
- package/dist/api/resources/users/client/Client.d.ts +6 -6
- package/dist/api/resources/users/client/Client.js +11 -11
- package/dist/serialization/resources/actions/types/ActionBase.d.ts +2 -1
- package/dist/serialization/resources/actions/types/ActionBase.js +2 -1
- package/dist/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
- package/dist/serialization/resources/actions/types/ActionRequest.js +1 -1
- package/dist/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
- package/dist/serialization/resources/actions/types/ActionResponse.js +1 -1
- package/{serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → dist/serialization/resources/actions/types/Preconditions.d.ts} +3 -3
- package/dist/serialization/resources/actions/types/Preconditions.js +7 -0
- package/dist/serialization/resources/actions/types/index.d.ts +1 -0
- package/dist/serialization/resources/actions/types/index.js +1 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
- package/dist/serialization/resources/commons/types/AppUserIdentification.js +2 -2
- package/dist/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
- package/{serialization/resources/commons/types/AppUserIdentifyingProperty.js → dist/serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
- package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
- package/dist/serialization/resources/commons/types/AppUserRequest.js +5 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.js +5 -0
- package/dist/serialization/resources/commons/types/index.d.ts +3 -1
- package/dist/serialization/resources/commons/types/index.js +3 -1
- package/{serialization/resources/conversation/types/ActionExecutionRequest.d.ts → dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
- package/{serialization/resources/conversation/types/ActionExecutionRequest.js → dist/serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
- package/dist/serialization/resources/conversation/types/index.d.ts +1 -2
- package/dist/serialization/resources/conversation/types/index.js +1 -2
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
- package/{serialization/resources/knowledge/types/KnowledgeBase.d.ts → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
- package/{serialization/resources/knowledge/types/KnowledgeBase.js → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +4 -4
- package/dist/serialization/resources/knowledge/types/index.js +4 -4
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
- package/package.json +1 -1
- package/serialization/resources/actions/types/ActionBase.d.ts +2 -1
- package/serialization/resources/actions/types/ActionBase.js +2 -1
- package/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
- package/serialization/resources/actions/types/ActionRequest.js +1 -1
- package/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
- package/serialization/resources/actions/types/ActionResponse.js +1 -1
- package/{dist/serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → serialization/resources/actions/types/Preconditions.d.ts} +3 -3
- package/serialization/resources/actions/types/Preconditions.js +7 -0
- package/serialization/resources/actions/types/index.d.ts +1 -0
- package/serialization/resources/actions/types/index.js +1 -0
- package/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
- package/serialization/resources/commons/types/AppUserIdentification.js +2 -2
- package/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
- package/{dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js → serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
- package/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
- package/serialization/resources/commons/types/AppUserRequest.js +5 -0
- package/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
- package/serialization/resources/commons/types/AppUserResponse.js +5 -0
- package/serialization/resources/commons/types/index.d.ts +3 -1
- package/serialization/resources/commons/types/index.js +3 -1
- package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.d.ts → serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
- package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.js → serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
- package/serialization/resources/conversation/types/index.d.ts +1 -2
- package/serialization/resources/conversation/types/index.js +1 -2
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
- package/{dist/serialization/resources/knowledge/types/KnowledgeBase.d.ts → serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
- package/{dist/serialization/resources/knowledge/types/KnowledgeBase.js → serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
- package/serialization/resources/knowledge/types/index.d.ts +4 -4
- package/serialization/resources/knowledge/types/index.js +4 -4
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
- package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
- package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
- package/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
- package/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
- package/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
- package/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
- package/dist/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
- package/dist/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
- package/dist/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
- package/dist/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
- package/dist/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
- package/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
- package/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
- package/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
- package/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
- package/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
- /package/api/resources/{commons/types/AppUserIdentifyingProperty.js → actions/types/Preconditions.js} +0 -0
- /package/api/resources/{conversation/types/ActionExecutionRequest.js → commons/types/AppUserIdentifier.js} +0 -0
- /package/api/resources/{conversation/types/ActionExecutionResponse.js → commons/types/AppUserRequest.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserResponse.js} +0 -0
- /package/api/resources/{knowledge/types/KnowledgeBaseId.js → conversation/types/SubmitActionFormRequest.js} +0 -0
- /package/api/resources/knowledge/types/{KnowledgeDocumentId.js → KnowledgeBaseProperties.js} +0 -0
- /package/{dist/api/resources/commons/types/AppUserIdentifyingProperty.js → api/resources/knowledge/types/KnowledgeBaseRequest.js} +0 -0
- /package/{dist/api/resources/conversation/types/ActionExecutionRequest.js → api/resources/knowledge/types/KnowledgeBaseResponse.js} +0 -0
- /package/dist/api/resources/{conversation/types/ActionExecutionResponse.js → actions/types/Preconditions.js} +0 -0
- /package/dist/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserIdentifier.js} +0 -0
- /package/dist/api/resources/{knowledge/types/KnowledgeBaseId.js → commons/types/AppUserRequest.js} +0 -0
- /package/dist/api/resources/{knowledge/types/KnowledgeDocumentId.js → commons/types/AppUserResponse.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare namespace MavenAGIClient {
|
|
|
13
13
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
14
14
|
appId?: core.Supplier<string | undefined>;
|
|
15
15
|
appSecret?: core.Supplier<string | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
organizationId: core.Supplier<string>;
|
|
17
|
+
agentId: core.Supplier<string>;
|
|
18
18
|
fetcher?: core.FetchFunction;
|
|
19
19
|
}
|
|
20
20
|
interface RequestOptions {
|
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ import { MavenAGIClient, MavenAGI } from "mavenagi";
|
|
|
22
22
|
const client = new MavenAGIClient({
|
|
23
23
|
appId: "YOUR_APP_ID",
|
|
24
24
|
appSecret: "YOUR_APP_SECRET",
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
organizationId: "YOUR_ORGANIZATION_ID",
|
|
26
|
+
agentId: "YOUR_AGENT_ID",
|
|
27
27
|
});
|
|
28
28
|
await client.conversation.initialize({
|
|
29
29
|
messages: [{}],
|
|
@@ -9,8 +9,8 @@ export declare namespace Actions {
|
|
|
9
9
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
10
|
appId?: core.Supplier<string | undefined>;
|
|
11
11
|
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
organizationId: core.Supplier<string>;
|
|
13
|
+
agentId: core.Supplier<string>;
|
|
14
14
|
fetcher?: core.FetchFunction;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
@@ -33,22 +33,24 @@ export declare class Actions {
|
|
|
33
33
|
* @throws {@link MavenAGI.ServerError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.actions.
|
|
37
|
-
*
|
|
36
|
+
* await client.actions.createOrUpdate({
|
|
37
|
+
* actionId: {
|
|
38
38
|
* referenceId: "get-balance"
|
|
39
39
|
* },
|
|
40
40
|
* name: "Get the user's balance",
|
|
41
41
|
* description: "This action calls an API to get the user's current balance.",
|
|
42
42
|
* userInteractionRequired: false,
|
|
43
|
-
*
|
|
43
|
+
* preconditions: {
|
|
44
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
|
|
45
|
+
* },
|
|
44
46
|
* userFormParameters: []
|
|
45
47
|
* })
|
|
46
48
|
*/
|
|
47
|
-
|
|
49
|
+
createOrUpdate(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
|
|
48
50
|
/**
|
|
49
51
|
* Get an action by its supplied ID
|
|
50
52
|
*
|
|
51
|
-
* @param {string}
|
|
53
|
+
* @param {string} actionReferenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
|
|
52
54
|
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
55
|
*
|
|
54
56
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -56,13 +58,13 @@ export declare class Actions {
|
|
|
56
58
|
* @throws {@link MavenAGI.ServerError}
|
|
57
59
|
*
|
|
58
60
|
* @example
|
|
59
|
-
* await client.actions.
|
|
61
|
+
* await client.actions.get("get-balance")
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
get(actionReferenceId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
|
|
62
64
|
/**
|
|
63
65
|
* Delete an action
|
|
64
66
|
*
|
|
65
|
-
* @param {string}
|
|
67
|
+
* @param {string} actionReferenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
|
|
66
68
|
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
69
|
*
|
|
68
70
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -70,8 +72,8 @@ export declare class Actions {
|
|
|
70
72
|
* @throws {@link MavenAGI.ServerError}
|
|
71
73
|
*
|
|
72
74
|
* @example
|
|
73
|
-
* await client.actions.
|
|
75
|
+
* await client.actions.delete("get-balance")
|
|
74
76
|
*/
|
|
75
|
-
|
|
77
|
+
delete(actionReferenceId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
|
|
76
78
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
77
79
|
}
|
|
@@ -31,18 +31,20 @@ export class Actions {
|
|
|
31
31
|
* @throws {@link MavenAGI.ServerError}
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
|
-
* await client.actions.
|
|
35
|
-
*
|
|
34
|
+
* await client.actions.createOrUpdate({
|
|
35
|
+
* actionId: {
|
|
36
36
|
* referenceId: "get-balance"
|
|
37
37
|
* },
|
|
38
38
|
* name: "Get the user's balance",
|
|
39
39
|
* description: "This action calls an API to get the user's current balance.",
|
|
40
40
|
* userInteractionRequired: false,
|
|
41
|
-
*
|
|
41
|
+
* preconditions: {
|
|
42
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
|
|
43
|
+
* },
|
|
42
44
|
* userFormParameters: []
|
|
43
45
|
* })
|
|
44
46
|
*/
|
|
45
|
-
|
|
47
|
+
createOrUpdate(request, requestOptions) {
|
|
46
48
|
var _a, _b;
|
|
47
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
50
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -50,11 +52,11 @@ export class Actions {
|
|
|
50
52
|
method: "PUT",
|
|
51
53
|
headers: {
|
|
52
54
|
Authorization: yield this._getAuthorizationHeader(),
|
|
53
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
54
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
55
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
56
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
55
57
|
"X-Fern-Language": "JavaScript",
|
|
56
58
|
"X-Fern-SDK-Name": "mavenagi",
|
|
57
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
58
60
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
61
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
62
|
},
|
|
@@ -120,7 +122,7 @@ export class Actions {
|
|
|
120
122
|
/**
|
|
121
123
|
* Get an action by its supplied ID
|
|
122
124
|
*
|
|
123
|
-
* @param {string}
|
|
125
|
+
* @param {string} actionReferenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
|
|
124
126
|
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
127
|
*
|
|
126
128
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -128,21 +130,21 @@ export class Actions {
|
|
|
128
130
|
* @throws {@link MavenAGI.ServerError}
|
|
129
131
|
*
|
|
130
132
|
* @example
|
|
131
|
-
* await client.actions.
|
|
133
|
+
* await client.actions.get("get-balance")
|
|
132
134
|
*/
|
|
133
|
-
|
|
135
|
+
get(actionReferenceId, requestOptions) {
|
|
134
136
|
var _a, _b;
|
|
135
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
138
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
137
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(
|
|
139
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
138
140
|
method: "GET",
|
|
139
141
|
headers: {
|
|
140
142
|
Authorization: yield this._getAuthorizationHeader(),
|
|
141
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
142
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
143
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
144
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
143
145
|
"X-Fern-Language": "JavaScript",
|
|
144
146
|
"X-Fern-SDK-Name": "mavenagi",
|
|
145
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
147
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
146
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
150
|
},
|
|
@@ -207,7 +209,7 @@ export class Actions {
|
|
|
207
209
|
/**
|
|
208
210
|
* Delete an action
|
|
209
211
|
*
|
|
210
|
-
* @param {string}
|
|
212
|
+
* @param {string} actionReferenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
|
|
211
213
|
* @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
|
|
212
214
|
*
|
|
213
215
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -215,21 +217,21 @@ export class Actions {
|
|
|
215
217
|
* @throws {@link MavenAGI.ServerError}
|
|
216
218
|
*
|
|
217
219
|
* @example
|
|
218
|
-
* await client.actions.
|
|
220
|
+
* await client.actions.delete("get-balance")
|
|
219
221
|
*/
|
|
220
|
-
|
|
222
|
+
delete(actionReferenceId, requestOptions) {
|
|
221
223
|
var _a, _b;
|
|
222
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
225
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
224
|
-
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(
|
|
226
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
225
227
|
method: "DELETE",
|
|
226
228
|
headers: {
|
|
227
229
|
Authorization: yield this._getAuthorizationHeader(),
|
|
228
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
229
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
230
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
231
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
230
232
|
"X-Fern-Language": "JavaScript",
|
|
231
233
|
"X-Fern-SDK-Name": "mavenagi",
|
|
232
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
234
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
233
235
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
234
236
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
235
237
|
},
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
5
|
export interface ActionBase {
|
|
6
|
-
/** The name of the action */
|
|
6
|
+
/** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
|
|
7
7
|
name: string;
|
|
8
|
-
/** The description of the action. This helps Maven decide
|
|
8
|
+
/** The description of the action. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. */
|
|
9
9
|
description: string;
|
|
10
|
-
/** Whether the action requires user interaction to execute */
|
|
10
|
+
/** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
|
|
11
11
|
userInteractionRequired: boolean;
|
|
12
|
-
/** When user interaction is required, the name of the button that is shown to the end user to
|
|
12
|
+
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action */
|
|
13
13
|
buttonName?: string;
|
|
14
|
-
/** The
|
|
15
|
-
|
|
14
|
+
/** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
|
|
15
|
+
preconditions: MavenAGI.Preconditions;
|
|
16
|
+
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
16
17
|
userFormParameters: MavenAGI.ActionParameter[];
|
|
17
18
|
}
|
|
@@ -5,17 +5,19 @@ import * as MavenAGI from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
8
|
+
* actionId: {
|
|
9
9
|
* referenceId: "get-balance"
|
|
10
10
|
* },
|
|
11
11
|
* name: "Get the user's balance",
|
|
12
12
|
* description: "This action calls an API to get the user's current balance.",
|
|
13
13
|
* userInteractionRequired: false,
|
|
14
|
-
*
|
|
14
|
+
* preconditions: {
|
|
15
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
|
|
16
|
+
* },
|
|
15
17
|
* userFormParameters: []
|
|
16
18
|
* }
|
|
17
19
|
*/
|
|
18
20
|
export interface ActionRequest extends MavenAGI.ActionBase {
|
|
19
21
|
/** ID that uniquely identifies this action */
|
|
20
|
-
|
|
22
|
+
actionId: MavenAGI.EntityIdBase;
|
|
21
23
|
}
|
|
@@ -5,7 +5,7 @@ import * as MavenAGI from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
8
|
+
* actionId: {
|
|
9
9
|
* referenceId: "get-balance",
|
|
10
10
|
* appId: "my-billing-system",
|
|
11
11
|
* organizationId: "acme",
|
|
@@ -15,11 +15,13 @@ import * as MavenAGI from "../../../index";
|
|
|
15
15
|
* name: "Get the user's balance",
|
|
16
16
|
* description: "This action calls an API to get the user's current balance.",
|
|
17
17
|
* userInteractionRequired: false,
|
|
18
|
-
*
|
|
18
|
+
* preconditions: {
|
|
19
|
+
* requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
|
|
20
|
+
* },
|
|
19
21
|
* userFormParameters: []
|
|
20
22
|
* }
|
|
21
23
|
*/
|
|
22
24
|
export interface ActionResponse extends MavenAGI.ActionBase {
|
|
23
25
|
/** ID that uniquely identifies this action */
|
|
24
|
-
|
|
26
|
+
actionId: MavenAGI.EntityId;
|
|
25
27
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface Preconditions {
|
|
5
|
+
/** The names of the user context fields that must be present in order for this object to be considered relevant to a conversation. */
|
|
6
|
+
requiredUserContextFieldNames: Set<string>;
|
|
7
|
+
}
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
5
|
export interface AppUserIdentification {
|
|
6
|
-
/** At least one identifying property must be provided
|
|
7
|
-
identifiers: MavenAGI.
|
|
6
|
+
/** At least one identifying property must be provided */
|
|
7
|
+
identifiers: MavenAGI.AppUserIdentifier[];
|
|
8
8
|
}
|
package/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
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 AppUserIdentifier {
|
|
6
6
|
/** The identifying property text */
|
|
7
7
|
value: string;
|
|
8
8
|
userIdentifyingPropertyType: MavenAGI.AppUserIdentifyingPropertyType;
|
|
@@ -6,6 +6,8 @@ export * from "./User";
|
|
|
6
6
|
export * from "./FeedbackType";
|
|
7
7
|
export * from "./Feedback";
|
|
8
8
|
export * from "./AppUserIdentification";
|
|
9
|
-
export * from "./
|
|
9
|
+
export * from "./AppUserIdentifier";
|
|
10
10
|
export * from "./AppUserIdentifyingPropertyType";
|
|
11
11
|
export * from "./AppUser";
|
|
12
|
+
export * from "./AppUserRequest";
|
|
13
|
+
export * from "./AppUserResponse";
|
|
@@ -6,6 +6,8 @@ export * from "./User";
|
|
|
6
6
|
export * from "./FeedbackType";
|
|
7
7
|
export * from "./Feedback";
|
|
8
8
|
export * from "./AppUserIdentification";
|
|
9
|
-
export * from "./
|
|
9
|
+
export * from "./AppUserIdentifier";
|
|
10
10
|
export * from "./AppUserIdentifyingPropertyType";
|
|
11
11
|
export * from "./AppUser";
|
|
12
|
+
export * from "./AppUserRequest";
|
|
13
|
+
export * from "./AppUserResponse";
|
|
@@ -9,8 +9,8 @@ export declare namespace Conversation {
|
|
|
9
9
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
10
|
appId?: core.Supplier<string | undefined>;
|
|
11
11
|
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
organizationId: core.Supplier<string>;
|
|
13
|
+
agentId: core.Supplier<string>;
|
|
14
14
|
fetcher?: core.FetchFunction;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
@@ -144,7 +144,7 @@ export declare class Conversation {
|
|
|
144
144
|
* Submit a filled out action form
|
|
145
145
|
*
|
|
146
146
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
147
|
-
* @param {MavenAGI.
|
|
147
|
+
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
148
148
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
149
|
*
|
|
150
150
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -171,7 +171,7 @@ export declare class Conversation {
|
|
|
171
171
|
* }
|
|
172
172
|
* })
|
|
173
173
|
*/
|
|
174
|
-
submitActionForm(conversationId: string, request: MavenAGI.
|
|
174
|
+
submitActionForm(conversationId: string, request: MavenAGI.SubmitActionFormRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
175
175
|
/**
|
|
176
176
|
* Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
|
|
177
177
|
*
|
|
@@ -50,11 +50,11 @@ export class Conversation {
|
|
|
50
50
|
method: "POST",
|
|
51
51
|
headers: {
|
|
52
52
|
Authorization: yield this._getAuthorizationHeader(),
|
|
53
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
54
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
53
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
54
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
55
55
|
"X-Fern-Language": "JavaScript",
|
|
56
56
|
"X-Fern-SDK-Name": "mavenagi",
|
|
57
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
57
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
58
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
60
|
},
|
|
@@ -138,11 +138,11 @@ export class Conversation {
|
|
|
138
138
|
method: "GET",
|
|
139
139
|
headers: {
|
|
140
140
|
Authorization: yield this._getAuthorizationHeader(),
|
|
141
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
142
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
141
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
142
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
143
143
|
"X-Fern-Language": "JavaScript",
|
|
144
144
|
"X-Fern-SDK-Name": "mavenagi",
|
|
145
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -231,11 +231,11 @@ export class Conversation {
|
|
|
231
231
|
method: "POST",
|
|
232
232
|
headers: {
|
|
233
233
|
Authorization: yield this._getAuthorizationHeader(),
|
|
234
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
235
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
234
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
235
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
236
236
|
"X-Fern-Language": "JavaScript",
|
|
237
237
|
"X-Fern-SDK-Name": "mavenagi",
|
|
238
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
238
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
239
239
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
240
240
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
241
241
|
},
|
|
@@ -327,11 +327,11 @@ export class Conversation {
|
|
|
327
327
|
method: "POST",
|
|
328
328
|
headers: {
|
|
329
329
|
Authorization: yield this._getAuthorizationHeader(),
|
|
330
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
331
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
330
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
331
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
332
332
|
"X-Fern-Language": "JavaScript",
|
|
333
333
|
"X-Fern-SDK-Name": "mavenagi",
|
|
334
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
334
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
335
335
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
336
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
337
|
},
|
|
@@ -405,11 +405,11 @@ export class Conversation {
|
|
|
405
405
|
method: "POST",
|
|
406
406
|
headers: {
|
|
407
407
|
Authorization: yield this._getAuthorizationHeader(),
|
|
408
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
409
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
408
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
409
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
410
410
|
"X-Fern-Language": "JavaScript",
|
|
411
411
|
"X-Fern-SDK-Name": "mavenagi",
|
|
412
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
412
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
413
413
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
414
414
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
415
415
|
},
|
|
@@ -507,11 +507,11 @@ export class Conversation {
|
|
|
507
507
|
method: "POST",
|
|
508
508
|
headers: {
|
|
509
509
|
Authorization: yield this._getAuthorizationHeader(),
|
|
510
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
511
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
510
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
511
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
512
512
|
"X-Fern-Language": "JavaScript",
|
|
513
513
|
"X-Fern-SDK-Name": "mavenagi",
|
|
514
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
514
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
515
515
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
516
516
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
517
517
|
},
|
|
@@ -603,11 +603,11 @@ export class Conversation {
|
|
|
603
603
|
method: "POST",
|
|
604
604
|
headers: {
|
|
605
605
|
Authorization: yield this._getAuthorizationHeader(),
|
|
606
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
607
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
606
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
607
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
608
608
|
"X-Fern-Language": "JavaScript",
|
|
609
609
|
"X-Fern-SDK-Name": "mavenagi",
|
|
610
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
610
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
611
611
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
612
612
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
613
613
|
},
|
|
@@ -669,7 +669,7 @@ export class Conversation {
|
|
|
669
669
|
* Submit a filled out action form
|
|
670
670
|
*
|
|
671
671
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
672
|
-
* @param {MavenAGI.
|
|
672
|
+
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
673
673
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
674
674
|
*
|
|
675
675
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -704,22 +704,22 @@ export class Conversation {
|
|
|
704
704
|
method: "POST",
|
|
705
705
|
headers: {
|
|
706
706
|
Authorization: yield this._getAuthorizationHeader(),
|
|
707
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
708
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
707
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
708
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
709
709
|
"X-Fern-Language": "JavaScript",
|
|
710
710
|
"X-Fern-SDK-Name": "mavenagi",
|
|
711
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
711
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
712
712
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
713
713
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
714
714
|
},
|
|
715
715
|
contentType: "application/json",
|
|
716
|
-
body: yield serializers.
|
|
716
|
+
body: yield serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
717
717
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
718
718
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
719
719
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
720
720
|
});
|
|
721
721
|
if (_response.ok) {
|
|
722
|
-
return yield serializers.
|
|
722
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
723
723
|
unrecognizedObjectKeys: "passthrough",
|
|
724
724
|
allowUnrecognizedUnionMembers: true,
|
|
725
725
|
allowUnrecognizedEnumValues: true,
|
|
@@ -795,11 +795,11 @@ export class Conversation {
|
|
|
795
795
|
method: "POST",
|
|
796
796
|
headers: {
|
|
797
797
|
Authorization: yield this._getAuthorizationHeader(),
|
|
798
|
-
"X-Organization-Id": yield core.Supplier.get(this._options.
|
|
799
|
-
"X-Agent-Id": yield core.Supplier.get(this._options.
|
|
798
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
799
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
800
800
|
"X-Fern-Language": "JavaScript",
|
|
801
801
|
"X-Fern-SDK-Name": "mavenagi",
|
|
802
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
802
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.8",
|
|
803
803
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
804
804
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
805
805
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
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 SubmitActionFormRequest {
|
|
6
6
|
actionFormId: string;
|
|
7
7
|
userContext: MavenAGI.User;
|
|
8
8
|
/** Map of parameter names to values */
|
|
@@ -16,8 +16,7 @@ export * from "./BotResponse";
|
|
|
16
16
|
export * from "./BotTextResponse";
|
|
17
17
|
export * from "./BotActionFormResponse";
|
|
18
18
|
export * from "./ActionFormField";
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./ActionExecutionResponse";
|
|
19
|
+
export * from "./SubmitActionFormRequest";
|
|
21
20
|
export * from "./ConversationContext";
|
|
22
21
|
export * from "./ConversationMessageContext";
|
|
23
22
|
export * from "./UserConversationMessageType";
|
|
@@ -16,8 +16,7 @@ export * from "./BotResponse";
|
|
|
16
16
|
export * from "./BotTextResponse";
|
|
17
17
|
export * from "./BotActionFormResponse";
|
|
18
18
|
export * from "./ActionFormField";
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./ActionExecutionResponse";
|
|
19
|
+
export * from "./SubmitActionFormRequest";
|
|
21
20
|
export * from "./ConversationContext";
|
|
22
21
|
export * from "./ConversationMessageContext";
|
|
23
22
|
export * from "./UserConversationMessageType";
|