mavenagi 1.2.6 → 1.2.7
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 +0 -3
- package/Client.js +28 -33
- package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
- package/api/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/api/resources/conversation/client/Client.d.ts +19 -0
- package/api/resources/conversation/client/Client.js +94 -0
- package/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
- package/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/api/resources/index.d.ts +0 -2
- package/api/resources/index.js +1 -3
- package/api/resources/knowledge/client/Client.d.ts +24 -0
- package/api/resources/knowledge/client/Client.js +104 -0
- package/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
- package/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
- package/core/exports.d.ts +1 -0
- package/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
- package/core/file/exports.d.ts +1 -0
- package/core/file/file.d.ts +5 -0
- package/core/file/file.js +203 -0
- package/{dist/serialization/resources/agentCapabilities → core/file}/index.d.ts +1 -0
- package/{dist/serialization/resources/agentCapabilities → core/file}/index.js +1 -0
- package/core/file/types.d.ts +66 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +16 -0
- package/core/form-data-utils/FormDataWrapper.js +208 -0
- package/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/core/form-data-utils/index.d.ts +2 -0
- package/core/form-data-utils/index.js +20 -0
- package/core/index.d.ts +2 -0
- package/core/index.js +3 -1
- package/dist/Client.d.ts +0 -3
- package/dist/Client.js +28 -33
- package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
- package/dist/api/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/dist/api/resources/conversation/client/Client.d.ts +19 -0
- package/dist/api/resources/conversation/client/Client.js +94 -0
- package/dist/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
- package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/dist/api/resources/index.d.ts +0 -2
- package/dist/api/resources/index.js +1 -3
- package/dist/api/resources/knowledge/client/Client.d.ts +24 -0
- package/dist/api/resources/knowledge/client/Client.js +104 -0
- package/dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
- package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
- package/dist/core/file/exports.d.ts +1 -0
- package/dist/core/file/exports.js +2 -0
- package/dist/core/file/file.d.ts +5 -0
- package/dist/core/file/file.js +203 -0
- package/{serialization/resources/agentCapabilities → dist/core/file}/index.d.ts +1 -0
- package/{serialization/resources/agentCapabilities → dist/core/file}/index.js +1 -0
- package/dist/core/file/types.d.ts +66 -0
- package/dist/core/file/types.js +2 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +208 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/dist/core/form-data-utils/index.d.ts +2 -0
- package/dist/core/form-data-utils/index.js +20 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -1
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.js +1 -0
- package/dist/serialization/resources/index.d.ts +0 -2
- package/dist/serialization/resources/index.js +1 -3
- package/dist/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
- package/dist/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -4
- package/dist/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/client/requests/index.js +3 -1
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/exports.d.ts +1 -0
- package/exports.js +17 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/reference.md +86 -264
- package/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
- package/serialization/resources/commons/types/ConversationSummary.js +1 -0
- package/serialization/resources/index.d.ts +0 -2
- package/serialization/resources/index.js +1 -3
- package/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
- package/{dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js → serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -6
- package/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
- package/serialization/resources/knowledge/client/requests/index.js +3 -1
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agentCapabilities/client/Client.d.ts +0 -101
- package/api/resources/agentCapabilities/client/Client.js +0 -450
- package/api/resources/agentCapabilities/client/index.d.ts +0 -1
- package/api/resources/agentCapabilities/index.d.ts +0 -2
- package/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
- package/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
- package/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
- package/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
- package/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
- package/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
- package/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
- package/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
- package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
- package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
- package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
- package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
- package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
- package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
- package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
- package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
- package/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
- package/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
- package/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/api/resources/agentCapabilities/types/TriggerType.js +0 -10
- package/api/resources/agentCapabilities/types/index.d.ts +0 -12
- package/api/resources/agentCapabilities/types/index.js +0 -28
- package/dist/api/resources/agentCapabilities/client/Client.d.ts +0 -101
- package/dist/api/resources/agentCapabilities/client/Client.js +0 -450
- package/dist/api/resources/agentCapabilities/client/index.d.ts +0 -1
- package/dist/api/resources/agentCapabilities/index.d.ts +0 -2
- package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
- package/dist/api/resources/agentCapabilities/types/ActionCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
- package/dist/api/resources/agentCapabilities/types/AgentCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
- package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
- package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
- package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
- package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/dist/api/resources/agentCapabilities/types/TriggerType.js +0 -10
- package/dist/api/resources/agentCapabilities/types/index.d.ts +0 -12
- package/dist/api/resources/agentCapabilities/types/index.js +0 -28
- package/dist/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
- package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
- package/dist/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
- package/dist/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
- package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
- package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
- package/dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
- package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
- package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
- package/dist/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
- package/dist/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
- package/dist/serialization/resources/agentCapabilities/types/index.js +0 -28
- package/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
- package/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
- package/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
- package/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
- package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
- package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
- package/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
- package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
- package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
- package/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -41
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
- package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
- package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
- package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
- package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -43
- package/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
- package/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
- package/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
- package/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
- package/serialization/resources/agentCapabilities/types/index.js +0 -28
- /package/api/resources/{agentCapabilities/types/ActionCapability.js → conversation/client/requests/SimulationImportRequest.js} +0 -0
- /package/api/resources/{agentCapabilities/types/AgentCapability.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
- /package/{api/resources/agentCapabilities/client/index.js → core/file/exports.js} +0 -0
- /package/{dist/api/resources/agentCapabilities/client/index.js → core/file/types.js} +0 -0
- /package/{api/resources/agentCapabilities/types/AgentCapabilityBase.js → dist/api/resources/conversation/client/requests/SimulationImportRequest.js} +0 -0
- /package/{api/resources/agentCapabilities/types/AgentCapabilityListRequest.js → dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as environments from "./environments";
|
|
2
2
|
import * as core from "./core";
|
|
3
3
|
import { Actions } from "./api/resources/actions/client/Client";
|
|
4
|
-
import { AgentCapabilities } from "./api/resources/agentCapabilities/client/Client";
|
|
5
4
|
import { Agents } from "./api/resources/agents/client/Client";
|
|
6
5
|
import { Analytics } from "./api/resources/analytics/client/Client";
|
|
7
6
|
import { AppSettings } from "./api/resources/appSettings/client/Client";
|
|
@@ -50,7 +49,6 @@ export declare namespace MavenAGIClient {
|
|
|
50
49
|
export declare class MavenAGIClient {
|
|
51
50
|
protected readonly _options: MavenAGIClient.Options;
|
|
52
51
|
protected _actions: Actions | undefined;
|
|
53
|
-
protected _agentCapabilities: AgentCapabilities | undefined;
|
|
54
52
|
protected _agents: Agents | undefined;
|
|
55
53
|
protected _analytics: Analytics | undefined;
|
|
56
54
|
protected _appSettings: AppSettings | undefined;
|
|
@@ -66,7 +64,6 @@ export declare class MavenAGIClient {
|
|
|
66
64
|
protected _users: Users | undefined;
|
|
67
65
|
constructor(_options: MavenAGIClient.Options);
|
|
68
66
|
get actions(): Actions;
|
|
69
|
-
get agentCapabilities(): AgentCapabilities;
|
|
70
67
|
get agents(): Agents;
|
|
71
68
|
get analytics(): Analytics;
|
|
72
69
|
get appSettings(): AppSettings;
|
package/Client.js
CHANGED
|
@@ -38,20 +38,19 @@ exports.MavenAGIClient = void 0;
|
|
|
38
38
|
const core = __importStar(require("./core"));
|
|
39
39
|
const headers_1 = require("./core/headers");
|
|
40
40
|
const Client_1 = require("./api/resources/actions/client/Client");
|
|
41
|
-
const Client_2 = require("./api/resources/
|
|
42
|
-
const Client_3 = require("./api/resources/
|
|
43
|
-
const Client_4 = require("./api/resources/
|
|
44
|
-
const Client_5 = require("./api/resources/
|
|
45
|
-
const Client_6 = require("./api/resources/
|
|
46
|
-
const Client_7 = require("./api/resources/
|
|
47
|
-
const Client_8 = require("./api/resources/
|
|
48
|
-
const Client_9 = require("./api/resources/
|
|
49
|
-
const Client_10 = require("./api/resources/
|
|
50
|
-
const Client_11 = require("./api/resources/
|
|
51
|
-
const Client_12 = require("./api/resources/
|
|
52
|
-
const Client_13 = require("./api/resources/
|
|
53
|
-
const Client_14 = require("./api/resources/
|
|
54
|
-
const Client_15 = require("./api/resources/users/client/Client");
|
|
41
|
+
const Client_2 = require("./api/resources/agents/client/Client");
|
|
42
|
+
const Client_3 = require("./api/resources/analytics/client/Client");
|
|
43
|
+
const Client_4 = require("./api/resources/appSettings/client/Client");
|
|
44
|
+
const Client_5 = require("./api/resources/assets/client/Client");
|
|
45
|
+
const Client_6 = require("./api/resources/conversation/client/Client");
|
|
46
|
+
const Client_7 = require("./api/resources/events/client/Client");
|
|
47
|
+
const Client_8 = require("./api/resources/inbox/client/Client");
|
|
48
|
+
const Client_9 = require("./api/resources/knowledge/client/Client");
|
|
49
|
+
const Client_10 = require("./api/resources/organizations/client/Client");
|
|
50
|
+
const Client_11 = require("./api/resources/segments/client/Client");
|
|
51
|
+
const Client_12 = require("./api/resources/translations/client/Client");
|
|
52
|
+
const Client_13 = require("./api/resources/triggers/client/Client");
|
|
53
|
+
const Client_14 = require("./api/resources/users/client/Client");
|
|
55
54
|
class MavenAGIClient {
|
|
56
55
|
constructor(_options) {
|
|
57
56
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_1.mergeHeaders)({
|
|
@@ -59,8 +58,8 @@ class MavenAGIClient {
|
|
|
59
58
|
"X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
|
|
60
59
|
"X-Fern-Language": "JavaScript",
|
|
61
60
|
"X-Fern-SDK-Name": "mavenagi",
|
|
62
|
-
"X-Fern-SDK-Version": "1.2.
|
|
63
|
-
"User-Agent": "mavenagi/1.2.
|
|
61
|
+
"X-Fern-SDK-Version": "1.2.7",
|
|
62
|
+
"User-Agent": "mavenagi/1.2.7",
|
|
64
63
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
64
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
65
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -69,61 +68,57 @@ class MavenAGIClient {
|
|
|
69
68
|
var _a;
|
|
70
69
|
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Client_1.Actions(this._options)));
|
|
71
70
|
}
|
|
72
|
-
get agentCapabilities() {
|
|
73
|
-
var _a;
|
|
74
|
-
return ((_a = this._agentCapabilities) !== null && _a !== void 0 ? _a : (this._agentCapabilities = new Client_2.AgentCapabilities(this._options)));
|
|
75
|
-
}
|
|
76
71
|
get agents() {
|
|
77
72
|
var _a;
|
|
78
|
-
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new
|
|
73
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_2.Agents(this._options)));
|
|
79
74
|
}
|
|
80
75
|
get analytics() {
|
|
81
76
|
var _a;
|
|
82
|
-
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new
|
|
77
|
+
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_3.Analytics(this._options)));
|
|
83
78
|
}
|
|
84
79
|
get appSettings() {
|
|
85
80
|
var _a;
|
|
86
|
-
return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new
|
|
81
|
+
return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_4.AppSettings(this._options)));
|
|
87
82
|
}
|
|
88
83
|
get assets() {
|
|
89
84
|
var _a;
|
|
90
|
-
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new
|
|
85
|
+
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_5.Assets(this._options)));
|
|
91
86
|
}
|
|
92
87
|
get conversation() {
|
|
93
88
|
var _a;
|
|
94
|
-
return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new
|
|
89
|
+
return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_6.Conversation(this._options)));
|
|
95
90
|
}
|
|
96
91
|
get events() {
|
|
97
92
|
var _a;
|
|
98
|
-
return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new
|
|
93
|
+
return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_7.Events(this._options)));
|
|
99
94
|
}
|
|
100
95
|
get inbox() {
|
|
101
96
|
var _a;
|
|
102
|
-
return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new
|
|
97
|
+
return ((_a = this._inbox) !== null && _a !== void 0 ? _a : (this._inbox = new Client_8.Inbox(this._options)));
|
|
103
98
|
}
|
|
104
99
|
get knowledge() {
|
|
105
100
|
var _a;
|
|
106
|
-
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new
|
|
101
|
+
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_9.Knowledge(this._options)));
|
|
107
102
|
}
|
|
108
103
|
get organizations() {
|
|
109
104
|
var _a;
|
|
110
|
-
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new
|
|
105
|
+
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_10.Organizations(this._options)));
|
|
111
106
|
}
|
|
112
107
|
get segments() {
|
|
113
108
|
var _a;
|
|
114
|
-
return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new
|
|
109
|
+
return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_11.Segments(this._options)));
|
|
115
110
|
}
|
|
116
111
|
get translations() {
|
|
117
112
|
var _a;
|
|
118
|
-
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new
|
|
113
|
+
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_12.Translations(this._options)));
|
|
119
114
|
}
|
|
120
115
|
get triggers() {
|
|
121
116
|
var _a;
|
|
122
|
-
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new
|
|
117
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_13.Triggers(this._options)));
|
|
123
118
|
}
|
|
124
119
|
get users() {
|
|
125
120
|
var _a;
|
|
126
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
121
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_14.Users(this._options)));
|
|
127
122
|
}
|
|
128
123
|
}
|
|
129
124
|
exports.MavenAGIClient = MavenAGIClient;
|
|
@@ -33,6 +33,8 @@ export interface ConversationSummary {
|
|
|
33
33
|
humanAgentsWithInserts: string[];
|
|
34
34
|
/** The names of all users that have a message of type `USER` on the conversation. */
|
|
35
35
|
users: string[];
|
|
36
|
+
/** The user identifiers (typically email addresses or phone numbers) of all users that have a message of type `USER` on the conversation. */
|
|
37
|
+
userIdentifiers: string[];
|
|
36
38
|
/** The text of the last user message in the conversation. */
|
|
37
39
|
lastUserMessage?: string;
|
|
38
40
|
/** The text of the last bot message in the conversation. */
|
|
@@ -401,6 +401,25 @@ export declare class Conversation {
|
|
|
401
401
|
*/
|
|
402
402
|
export(request: MavenAGI.ConversationsSearchRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
403
403
|
private __export;
|
|
404
|
+
/**
|
|
405
|
+
* Import simulation conversations from a CSV file.
|
|
406
|
+
*
|
|
407
|
+
* This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
|
|
408
|
+
* Each row will generate one simulation conversation, using the provided response config, if present.
|
|
409
|
+
*
|
|
410
|
+
* This API is offered for backwards compatibility.
|
|
411
|
+
* Most API callers should create simulations programmatically to allow for more flexibility.
|
|
412
|
+
*
|
|
413
|
+
* @param {core.file.Uploadable.FileLike} file
|
|
414
|
+
* @param {MavenAGI.SimulationImportRequest} request
|
|
415
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
416
|
+
*
|
|
417
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
418
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
419
|
+
* @throws {@link MavenAGI.ServerError}
|
|
420
|
+
*/
|
|
421
|
+
importSimulations(file: core.file.Uploadable.FileLike, request: MavenAGI.SimulationImportRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<void>;
|
|
422
|
+
private __importSimulations;
|
|
404
423
|
/**
|
|
405
424
|
* Deliver a message to a user or conversation.
|
|
406
425
|
*
|
|
@@ -50,6 +50,7 @@ const MavenAGI = __importStar(require("../../../index"));
|
|
|
50
50
|
const headers_1 = require("../../../../core/headers");
|
|
51
51
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index"));
|
|
53
|
+
const json_1 = require("../../../../core/json");
|
|
53
54
|
class Conversation {
|
|
54
55
|
constructor(_options) {
|
|
55
56
|
this._options = _options;
|
|
@@ -1635,6 +1636,99 @@ class Conversation {
|
|
|
1635
1636
|
}
|
|
1636
1637
|
});
|
|
1637
1638
|
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Import simulation conversations from a CSV file.
|
|
1641
|
+
*
|
|
1642
|
+
* This CSV format is very simple and only allows for one column: `question`. A header containing this column is required.
|
|
1643
|
+
* Each row will generate one simulation conversation, using the provided response config, if present.
|
|
1644
|
+
*
|
|
1645
|
+
* This API is offered for backwards compatibility.
|
|
1646
|
+
* Most API callers should create simulations programmatically to allow for more flexibility.
|
|
1647
|
+
*
|
|
1648
|
+
* @param {core.file.Uploadable.FileLike} file
|
|
1649
|
+
* @param {MavenAGI.SimulationImportRequest} request
|
|
1650
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
1651
|
+
*
|
|
1652
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
1653
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
1654
|
+
* @throws {@link MavenAGI.ServerError}
|
|
1655
|
+
*/
|
|
1656
|
+
importSimulations(file, request, requestOptions) {
|
|
1657
|
+
return core.HttpResponsePromise.fromPromise(this.__importSimulations(file, request, requestOptions));
|
|
1658
|
+
}
|
|
1659
|
+
__importSimulations(file, request, requestOptions) {
|
|
1660
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1661
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1662
|
+
const _request = yield core.newFormData();
|
|
1663
|
+
yield _request.appendFile("file", file);
|
|
1664
|
+
if (request.responseConfig != null) {
|
|
1665
|
+
_request.append("responseConfig", (0, json_1.toJson)(serializers.ResponseConfig.jsonOrThrow(request.responseConfig, { unrecognizedObjectKeys: "strip" })));
|
|
1666
|
+
}
|
|
1667
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
1668
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId, "X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1669
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
1670
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/conversations/import_simulations"),
|
|
1671
|
+
method: "POST",
|
|
1672
|
+
headers: _headers,
|
|
1673
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1674
|
+
requestType: "file",
|
|
1675
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
1676
|
+
body: _maybeEncodedRequest.body,
|
|
1677
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1678
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1679
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1680
|
+
});
|
|
1681
|
+
if (_response.ok) {
|
|
1682
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
1683
|
+
}
|
|
1684
|
+
if (_response.error.reason === "status-code") {
|
|
1685
|
+
switch (_response.error.statusCode) {
|
|
1686
|
+
case 404:
|
|
1687
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1688
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1689
|
+
allowUnrecognizedUnionMembers: true,
|
|
1690
|
+
allowUnrecognizedEnumValues: true,
|
|
1691
|
+
breadcrumbsPrefix: ["response"],
|
|
1692
|
+
}), _response.rawResponse);
|
|
1693
|
+
case 400:
|
|
1694
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1695
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1696
|
+
allowUnrecognizedUnionMembers: true,
|
|
1697
|
+
allowUnrecognizedEnumValues: true,
|
|
1698
|
+
breadcrumbsPrefix: ["response"],
|
|
1699
|
+
}), _response.rawResponse);
|
|
1700
|
+
case 500:
|
|
1701
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1702
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1703
|
+
allowUnrecognizedUnionMembers: true,
|
|
1704
|
+
allowUnrecognizedEnumValues: true,
|
|
1705
|
+
breadcrumbsPrefix: ["response"],
|
|
1706
|
+
}), _response.rawResponse);
|
|
1707
|
+
default:
|
|
1708
|
+
throw new errors.MavenAGIError({
|
|
1709
|
+
statusCode: _response.error.statusCode,
|
|
1710
|
+
body: _response.error.body,
|
|
1711
|
+
rawResponse: _response.rawResponse,
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
switch (_response.error.reason) {
|
|
1716
|
+
case "non-json":
|
|
1717
|
+
throw new errors.MavenAGIError({
|
|
1718
|
+
statusCode: _response.error.statusCode,
|
|
1719
|
+
body: _response.error.rawBody,
|
|
1720
|
+
rawResponse: _response.rawResponse,
|
|
1721
|
+
});
|
|
1722
|
+
case "timeout":
|
|
1723
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/conversations/import_simulations.");
|
|
1724
|
+
case "unknown":
|
|
1725
|
+
throw new errors.MavenAGIError({
|
|
1726
|
+
message: _response.error.errorMessage,
|
|
1727
|
+
rawResponse: _response.rawResponse,
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1638
1732
|
/**
|
|
1639
1733
|
* Deliver a message to a user or conversation.
|
|
1640
1734
|
*
|
package/api/resources/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * as actions from "./actions";
|
|
2
2
|
export * from "./actions/types";
|
|
3
|
-
export * as agentCapabilities from "./agentCapabilities";
|
|
4
|
-
export * from "./agentCapabilities/types";
|
|
5
3
|
export * as agents from "./agents";
|
|
6
4
|
export * from "./agents/types";
|
|
7
5
|
export * as analytics from "./analytics";
|
package/api/resources/index.js
CHANGED
|
@@ -36,11 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.events = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.inbox = exports.conversation = exports.commons = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.
|
|
39
|
+
exports.events = exports.users = exports.triggers = exports.translations = exports.segments = exports.organizations = exports.knowledge = exports.inbox = exports.conversation = exports.commons = exports.assets = exports.appSettings = exports.analytics = exports.agents = exports.actions = void 0;
|
|
40
40
|
exports.actions = __importStar(require("./actions"));
|
|
41
41
|
__exportStar(require("./actions/types"), exports);
|
|
42
|
-
exports.agentCapabilities = __importStar(require("./agentCapabilities"));
|
|
43
|
-
__exportStar(require("./agentCapabilities/types"), exports);
|
|
44
42
|
exports.agents = __importStar(require("./agents"));
|
|
45
43
|
__exportStar(require("./agents/types"), exports);
|
|
46
44
|
exports.analytics = __importStar(require("./analytics"));
|
|
@@ -291,5 +291,29 @@ export declare class Knowledge {
|
|
|
291
291
|
*/
|
|
292
292
|
getKnowledgeDocument(knowledgeBaseVersionReferenceId: string, knowledgeDocumentReferenceId: string, request: MavenAGI.KnowledgeDocumentGetRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeDocumentResponse>;
|
|
293
293
|
private __getKnowledgeDocument;
|
|
294
|
+
/**
|
|
295
|
+
* Update mutable knowledge document fields that can be set independently of a knowledge base version.
|
|
296
|
+
*
|
|
297
|
+
* For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
|
|
298
|
+
*
|
|
299
|
+
* The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
|
|
300
|
+
* All other fields will overwrite the existing value on the knowledge document only if provided.
|
|
301
|
+
*
|
|
302
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to patch.
|
|
303
|
+
* @param {string} knowledgeDocumentReferenceId - The reference ID of the knowledge document to patch.
|
|
304
|
+
* @param {MavenAGI.KnowledgeDocumentPatchRequest} request
|
|
305
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
306
|
+
*
|
|
307
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
308
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
309
|
+
* @throws {@link MavenAGI.ServerError}
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
313
|
+
* llmInclusionStatus: "ALWAYS"
|
|
314
|
+
* })
|
|
315
|
+
*/
|
|
316
|
+
patchKnowledgeDocument(knowledgeBaseReferenceId: string, knowledgeDocumentReferenceId: string, request?: MavenAGI.KnowledgeDocumentPatchRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeDocumentResponse>;
|
|
317
|
+
private __patchKnowledgeDocument;
|
|
294
318
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
295
319
|
}
|
|
@@ -1259,6 +1259,110 @@ class Knowledge {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Update mutable knowledge document fields that can be set independently of a knowledge base version.
|
|
1264
|
+
*
|
|
1265
|
+
* For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
|
|
1266
|
+
*
|
|
1267
|
+
* The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
|
|
1268
|
+
* All other fields will overwrite the existing value on the knowledge document only if provided.
|
|
1269
|
+
*
|
|
1270
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to patch.
|
|
1271
|
+
* @param {string} knowledgeDocumentReferenceId - The reference ID of the knowledge document to patch.
|
|
1272
|
+
* @param {MavenAGI.KnowledgeDocumentPatchRequest} request
|
|
1273
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
1274
|
+
*
|
|
1275
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
1276
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
1277
|
+
* @throws {@link MavenAGI.ServerError}
|
|
1278
|
+
*
|
|
1279
|
+
* @example
|
|
1280
|
+
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
1281
|
+
* llmInclusionStatus: "ALWAYS"
|
|
1282
|
+
* })
|
|
1283
|
+
*/
|
|
1284
|
+
patchKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request = {}, requestOptions) {
|
|
1285
|
+
return core.HttpResponsePromise.fromPromise(this.__patchKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request, requestOptions));
|
|
1286
|
+
}
|
|
1287
|
+
__patchKnowledgeDocument(knowledgeBaseReferenceId_1, knowledgeDocumentReferenceId_1) {
|
|
1288
|
+
return __awaiter(this, arguments, void 0, function* (knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request = {}, requestOptions) {
|
|
1289
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1290
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1291
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1292
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
1293
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
1294
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1295
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
1296
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/${encodeURIComponent(knowledgeDocumentReferenceId)}/document`),
|
|
1297
|
+
method: "PATCH",
|
|
1298
|
+
headers: _headers,
|
|
1299
|
+
contentType: "application/merge-patch+json",
|
|
1300
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1301
|
+
requestType: "json",
|
|
1302
|
+
body: serializers.KnowledgeDocumentPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1303
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1304
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1305
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1306
|
+
});
|
|
1307
|
+
if (_response.ok) {
|
|
1308
|
+
return {
|
|
1309
|
+
data: serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
1310
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1311
|
+
allowUnrecognizedUnionMembers: true,
|
|
1312
|
+
allowUnrecognizedEnumValues: true,
|
|
1313
|
+
breadcrumbsPrefix: ["response"],
|
|
1314
|
+
}),
|
|
1315
|
+
rawResponse: _response.rawResponse,
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
if (_response.error.reason === "status-code") {
|
|
1319
|
+
switch (_response.error.statusCode) {
|
|
1320
|
+
case 404:
|
|
1321
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1322
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1323
|
+
allowUnrecognizedUnionMembers: true,
|
|
1324
|
+
allowUnrecognizedEnumValues: true,
|
|
1325
|
+
breadcrumbsPrefix: ["response"],
|
|
1326
|
+
}), _response.rawResponse);
|
|
1327
|
+
case 400:
|
|
1328
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1329
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1330
|
+
allowUnrecognizedUnionMembers: true,
|
|
1331
|
+
allowUnrecognizedEnumValues: true,
|
|
1332
|
+
breadcrumbsPrefix: ["response"],
|
|
1333
|
+
}), _response.rawResponse);
|
|
1334
|
+
case 500:
|
|
1335
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1336
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1337
|
+
allowUnrecognizedUnionMembers: true,
|
|
1338
|
+
allowUnrecognizedEnumValues: true,
|
|
1339
|
+
breadcrumbsPrefix: ["response"],
|
|
1340
|
+
}), _response.rawResponse);
|
|
1341
|
+
default:
|
|
1342
|
+
throw new errors.MavenAGIError({
|
|
1343
|
+
statusCode: _response.error.statusCode,
|
|
1344
|
+
body: _response.error.body,
|
|
1345
|
+
rawResponse: _response.rawResponse,
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
switch (_response.error.reason) {
|
|
1350
|
+
case "non-json":
|
|
1351
|
+
throw new errors.MavenAGIError({
|
|
1352
|
+
statusCode: _response.error.statusCode,
|
|
1353
|
+
body: _response.error.rawBody,
|
|
1354
|
+
rawResponse: _response.rawResponse,
|
|
1355
|
+
});
|
|
1356
|
+
case "timeout":
|
|
1357
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/knowledge/{knowledgeBaseReferenceId}/{knowledgeDocumentReferenceId}/document.");
|
|
1358
|
+
case "unknown":
|
|
1359
|
+
throw new errors.MavenAGIError({
|
|
1360
|
+
message: _response.error.errorMessage,
|
|
1361
|
+
rawResponse: _response.rawResponse,
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1262
1366
|
_getAuthorizationHeader() {
|
|
1263
1367
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1264
1368
|
var _a, _b;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as MavenAGI from "../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* llmInclusionStatus: "ALWAYS"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface KnowledgeDocumentPatchRequest {
|
|
9
|
+
/** The App ID of the knowledge base that contains the knowledge document to patch. If not provided the ID of the calling app will be used. */
|
|
10
|
+
knowledgeBaseAppId?: string;
|
|
11
|
+
/** Determines whether this document is sent to the LLM as part of a conversation. */
|
|
12
|
+
llmInclusionStatus?: MavenAGI.LlmInclusionStatus;
|
|
13
|
+
}
|
|
@@ -2,3 +2,4 @@ export { type KnowledgeBaseGetRequest } from "./KnowledgeBaseGetRequest";
|
|
|
2
2
|
export { type KnowledgeBasePatchRequest } from "./KnowledgeBasePatchRequest";
|
|
3
3
|
export { type KnowledgeBaseVersionsListRequest } from "./KnowledgeBaseVersionsListRequest";
|
|
4
4
|
export { type KnowledgeDocumentGetRequest } from "./KnowledgeDocumentGetRequest";
|
|
5
|
+
export { type KnowledgeDocumentPatchRequest } from "./KnowledgeDocumentPatchRequest";
|
|
@@ -3,10 +3,6 @@ export interface BaseKnowledgeDocument {
|
|
|
3
3
|
url?: string;
|
|
4
4
|
/** The document language. Must be a valid ISO 639-1 language code. */
|
|
5
5
|
language?: string;
|
|
6
|
-
/** The time at which this document was created. */
|
|
7
|
-
createdAt?: Date;
|
|
8
|
-
/** The time at which this document was last modified. */
|
|
9
|
-
updatedAt?: Date;
|
|
10
6
|
/** The name of the author who created this document. */
|
|
11
7
|
author?: string;
|
|
12
8
|
}
|
|
@@ -58,7 +58,7 @@ export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties
|
|
|
58
58
|
/** The tags of the knowledge base. */
|
|
59
59
|
tags: Set<string>;
|
|
60
60
|
/** Determines whether documents in the knowledge base are sent to the LLM as part of a conversation. */
|
|
61
|
-
llmInclusionStatus
|
|
61
|
+
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
62
62
|
/** How often the knowledge base should be refreshed. */
|
|
63
63
|
refreshFrequency: MavenAGI.KnowledgeBaseRefreshFrequency;
|
|
64
64
|
/**
|
|
@@ -10,7 +10,9 @@ import * as MavenAGI from "../../../index";
|
|
|
10
10
|
* agentId: "support"
|
|
11
11
|
* },
|
|
12
12
|
* type: MavenAGI.KnowledgeBaseVersionType.Full,
|
|
13
|
-
* status: MavenAGI.KnowledgeBaseVersionStatus.InProgress
|
|
13
|
+
* status: MavenAGI.KnowledgeBaseVersionStatus.InProgress,
|
|
14
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
15
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z")
|
|
14
16
|
* }
|
|
15
17
|
*/
|
|
16
18
|
export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionRequest {
|
|
@@ -20,4 +22,8 @@ export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionReque
|
|
|
20
22
|
status: MavenAGI.KnowledgeBaseVersionStatus;
|
|
21
23
|
/** A user-facing error message that provides more details about a version failure. */
|
|
22
24
|
errorMessage?: string;
|
|
25
|
+
/** The date and time the knowledge base version was created. */
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
/** The date and time the knowledge base version was last updated. */
|
|
28
|
+
updatedAt: Date;
|
|
23
29
|
}
|
|
@@ -17,6 +17,8 @@ export interface KnowledgeDocumentFilter {
|
|
|
17
17
|
search?: string;
|
|
18
18
|
/** Filter by title */
|
|
19
19
|
title?: string;
|
|
20
|
+
/** Filter by url */
|
|
21
|
+
url?: string;
|
|
20
22
|
/** Filter knowledge documents created on or after this timestamp */
|
|
21
23
|
createdAfter?: Date;
|
|
22
24
|
/** Filter knowledge documents created on or before this timestamp */
|
|
@@ -28,4 +30,6 @@ export interface KnowledgeDocumentFilter {
|
|
|
28
30
|
* If not provided all active knowledge base versions within the agent will be searched.
|
|
29
31
|
*/
|
|
30
32
|
knowledgeBaseVersionId?: MavenAGI.EntityIdWithoutAgent;
|
|
33
|
+
/** Filter by the LLM inclusion status */
|
|
34
|
+
llmInclusionStatus?: MavenAGI.LlmInclusionStatus[];
|
|
31
35
|
}
|
|
@@ -30,4 +30,8 @@ export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument
|
|
|
30
30
|
content: string;
|
|
31
31
|
/** Metadata for the knowledge document. */
|
|
32
32
|
metadata?: Record<string, string>;
|
|
33
|
+
/** The time at which this document was created. */
|
|
34
|
+
createdAt?: Date;
|
|
35
|
+
/** The time at which this document was last modified. */
|
|
36
|
+
updatedAt?: Date;
|
|
33
37
|
}
|
|
@@ -20,7 +20,10 @@ import * as MavenAGI from "../../../index";
|
|
|
20
20
|
* title: "Getting started",
|
|
21
21
|
* metadata: {
|
|
22
22
|
* "category": "getting-started"
|
|
23
|
-
* }
|
|
23
|
+
* },
|
|
24
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
25
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z"),
|
|
26
|
+
* llmInclusionStatus: MavenAGI.LlmInclusionStatus.WhenRelevant
|
|
24
27
|
* }
|
|
25
28
|
*/
|
|
26
29
|
export interface KnowledgeDocumentResponse extends MavenAGI.KnowledgeDocumentSearchResponse {
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* knowledgeDocumentId: {
|
|
6
|
+
* referenceId: "how-it-works",
|
|
7
|
+
* appId: "help-center",
|
|
8
|
+
* organizationId: "acme",
|
|
9
|
+
* agentId: "support",
|
|
10
|
+
* type: MavenAGI.EntityType.KnowledgeDocument
|
|
11
|
+
* },
|
|
12
|
+
* knowledgeBaseVersionId: {
|
|
13
|
+
* referenceId: "version-1",
|
|
14
|
+
* appId: "help-center",
|
|
15
|
+
* organizationId: "acme",
|
|
16
|
+
* agentId: "support",
|
|
17
|
+
* type: MavenAGI.EntityType.KnowledgeBaseVersion
|
|
18
|
+
* },
|
|
19
|
+
* title: "How it works",
|
|
20
|
+
* llmInclusionStatus: MavenAGI.LlmInclusionStatus.WhenRelevant,
|
|
21
|
+
* url: "https://help-center.acme.com/how-it-works",
|
|
22
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
23
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z")
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
2
26
|
export interface KnowledgeDocumentSearchResponse extends MavenAGI.BaseKnowledgeDocument {
|
|
3
27
|
/** ID that uniquely identifies this knowledge document within its knowledge base */
|
|
4
28
|
knowledgeDocumentId: MavenAGI.EntityId;
|
|
@@ -9,4 +33,10 @@ export interface KnowledgeDocumentSearchResponse extends MavenAGI.BaseKnowledgeD
|
|
|
9
33
|
knowledgeBaseVersionId?: MavenAGI.EntityId;
|
|
10
34
|
/** The title of the document. Will be shown as part of answers. May be missing on legacy documents. */
|
|
11
35
|
title?: string;
|
|
36
|
+
/** Whether the document is included in the agent's knowledge. */
|
|
37
|
+
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
38
|
+
/** The time at which this document was created. */
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
/** The time at which this document was last modified. */
|
|
41
|
+
updatedAt: Date;
|
|
12
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./file/exports";
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
17
|
+
__exportStar(require("./file/exports"), exports);
|