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
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.AgentCapabilities = void 0;
|
|
47
|
-
const environments = __importStar(require("../../../../environments"));
|
|
48
|
-
const core = __importStar(require("../../../../core"));
|
|
49
|
-
const MavenAGI = __importStar(require("../../../index"));
|
|
50
|
-
const headers_1 = require("../../../../core/headers");
|
|
51
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
52
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
53
|
-
class AgentCapabilities {
|
|
54
|
-
constructor(_options) {
|
|
55
|
-
this._options = _options;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* List all capabilities for an agent.
|
|
59
|
-
*
|
|
60
|
-
* @param {MavenAGI.AgentCapabilityListRequest} request
|
|
61
|
-
* @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
-
*
|
|
63
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
64
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
65
|
-
* @throws {@link MavenAGI.ServerError}
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* await client.agentCapabilities.list({})
|
|
69
|
-
*/
|
|
70
|
-
list(request, requestOptions) {
|
|
71
|
-
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
72
|
-
}
|
|
73
|
-
__list(request, requestOptions) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
76
|
-
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
77
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
78
|
-
"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,
|
|
79
|
-
"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,
|
|
80
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
|
-
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
82
|
-
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/capabilities"),
|
|
83
|
-
method: "POST",
|
|
84
|
-
headers: _headers,
|
|
85
|
-
contentType: "application/json",
|
|
86
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
87
|
-
requestType: "json",
|
|
88
|
-
body: serializers.AgentCapabilityListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
89
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
-
});
|
|
93
|
-
if (_response.ok) {
|
|
94
|
-
return {
|
|
95
|
-
data: serializers.ListAgentCapabilitiesResponse.parseOrThrow(_response.body, {
|
|
96
|
-
unrecognizedObjectKeys: "passthrough",
|
|
97
|
-
allowUnrecognizedUnionMembers: true,
|
|
98
|
-
allowUnrecognizedEnumValues: true,
|
|
99
|
-
breadcrumbsPrefix: ["response"],
|
|
100
|
-
}),
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
if (_response.error.reason === "status-code") {
|
|
105
|
-
switch (_response.error.statusCode) {
|
|
106
|
-
case 404:
|
|
107
|
-
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
108
|
-
unrecognizedObjectKeys: "passthrough",
|
|
109
|
-
allowUnrecognizedUnionMembers: true,
|
|
110
|
-
allowUnrecognizedEnumValues: true,
|
|
111
|
-
breadcrumbsPrefix: ["response"],
|
|
112
|
-
}), _response.rawResponse);
|
|
113
|
-
case 400:
|
|
114
|
-
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
115
|
-
unrecognizedObjectKeys: "passthrough",
|
|
116
|
-
allowUnrecognizedUnionMembers: true,
|
|
117
|
-
allowUnrecognizedEnumValues: true,
|
|
118
|
-
breadcrumbsPrefix: ["response"],
|
|
119
|
-
}), _response.rawResponse);
|
|
120
|
-
case 500:
|
|
121
|
-
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
122
|
-
unrecognizedObjectKeys: "passthrough",
|
|
123
|
-
allowUnrecognizedUnionMembers: true,
|
|
124
|
-
allowUnrecognizedEnumValues: true,
|
|
125
|
-
breadcrumbsPrefix: ["response"],
|
|
126
|
-
}), _response.rawResponse);
|
|
127
|
-
default:
|
|
128
|
-
throw new errors.MavenAGIError({
|
|
129
|
-
statusCode: _response.error.statusCode,
|
|
130
|
-
body: _response.error.body,
|
|
131
|
-
rawResponse: _response.rawResponse,
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
switch (_response.error.reason) {
|
|
136
|
-
case "non-json":
|
|
137
|
-
throw new errors.MavenAGIError({
|
|
138
|
-
statusCode: _response.error.statusCode,
|
|
139
|
-
body: _response.error.rawBody,
|
|
140
|
-
rawResponse: _response.rawResponse,
|
|
141
|
-
});
|
|
142
|
-
case "timeout":
|
|
143
|
-
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/capabilities.");
|
|
144
|
-
case "unknown":
|
|
145
|
-
throw new errors.MavenAGIError({
|
|
146
|
-
message: _response.error.errorMessage,
|
|
147
|
-
rawResponse: _response.rawResponse,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* @param {string} integrationId
|
|
154
|
-
* @param {string} capabilityId
|
|
155
|
-
* @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
|
-
*
|
|
157
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
158
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
159
|
-
* @throws {@link MavenAGI.ServerError}
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* await client.agentCapabilities.get("integrationId", "capabilityId")
|
|
163
|
-
*/
|
|
164
|
-
get(integrationId, capabilityId, requestOptions) {
|
|
165
|
-
return core.HttpResponsePromise.fromPromise(this.__get(integrationId, capabilityId, requestOptions));
|
|
166
|
-
}
|
|
167
|
-
__get(integrationId, capabilityId, requestOptions) {
|
|
168
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
170
|
-
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
171
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
172
|
-
"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,
|
|
173
|
-
"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,
|
|
174
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
175
|
-
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
176
|
-
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/integrations/${encodeURIComponent(integrationId)}/capabilities/${encodeURIComponent(capabilityId)}`),
|
|
177
|
-
method: "GET",
|
|
178
|
-
headers: _headers,
|
|
179
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
181
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
182
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
-
});
|
|
184
|
-
if (_response.ok) {
|
|
185
|
-
return {
|
|
186
|
-
data: serializers.AgentCapability.parseOrThrow(_response.body, {
|
|
187
|
-
unrecognizedObjectKeys: "passthrough",
|
|
188
|
-
allowUnrecognizedUnionMembers: true,
|
|
189
|
-
allowUnrecognizedEnumValues: true,
|
|
190
|
-
breadcrumbsPrefix: ["response"],
|
|
191
|
-
}),
|
|
192
|
-
rawResponse: _response.rawResponse,
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
if (_response.error.reason === "status-code") {
|
|
196
|
-
switch (_response.error.statusCode) {
|
|
197
|
-
case 404:
|
|
198
|
-
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
199
|
-
unrecognizedObjectKeys: "passthrough",
|
|
200
|
-
allowUnrecognizedUnionMembers: true,
|
|
201
|
-
allowUnrecognizedEnumValues: true,
|
|
202
|
-
breadcrumbsPrefix: ["response"],
|
|
203
|
-
}), _response.rawResponse);
|
|
204
|
-
case 400:
|
|
205
|
-
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
206
|
-
unrecognizedObjectKeys: "passthrough",
|
|
207
|
-
allowUnrecognizedUnionMembers: true,
|
|
208
|
-
allowUnrecognizedEnumValues: true,
|
|
209
|
-
breadcrumbsPrefix: ["response"],
|
|
210
|
-
}), _response.rawResponse);
|
|
211
|
-
case 500:
|
|
212
|
-
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
213
|
-
unrecognizedObjectKeys: "passthrough",
|
|
214
|
-
allowUnrecognizedUnionMembers: true,
|
|
215
|
-
allowUnrecognizedEnumValues: true,
|
|
216
|
-
breadcrumbsPrefix: ["response"],
|
|
217
|
-
}), _response.rawResponse);
|
|
218
|
-
default:
|
|
219
|
-
throw new errors.MavenAGIError({
|
|
220
|
-
statusCode: _response.error.statusCode,
|
|
221
|
-
body: _response.error.body,
|
|
222
|
-
rawResponse: _response.rawResponse,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
switch (_response.error.reason) {
|
|
227
|
-
case "non-json":
|
|
228
|
-
throw new errors.MavenAGIError({
|
|
229
|
-
statusCode: _response.error.statusCode,
|
|
230
|
-
body: _response.error.rawBody,
|
|
231
|
-
rawResponse: _response.rawResponse,
|
|
232
|
-
});
|
|
233
|
-
case "timeout":
|
|
234
|
-
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling GET /v1/integrations/{integrationId}/capabilities/{capabilityId}.");
|
|
235
|
-
case "unknown":
|
|
236
|
-
throw new errors.MavenAGIError({
|
|
237
|
-
message: _response.error.errorMessage,
|
|
238
|
-
rawResponse: _response.rawResponse,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* @param {string} integrationId
|
|
245
|
-
* @param {string} capabilityId
|
|
246
|
-
* @param {MavenAGI.PatchAgentCapabilityRequest} request
|
|
247
|
-
* @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
248
|
-
*
|
|
249
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
250
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
251
|
-
* @throws {@link MavenAGI.ServerError}
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* await client.agentCapabilities.patch("integrationId", "capabilityId", {})
|
|
255
|
-
*/
|
|
256
|
-
patch(integrationId, capabilityId, request, requestOptions) {
|
|
257
|
-
return core.HttpResponsePromise.fromPromise(this.__patch(integrationId, capabilityId, request, requestOptions));
|
|
258
|
-
}
|
|
259
|
-
__patch(integrationId, capabilityId, request, requestOptions) {
|
|
260
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
262
|
-
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
263
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
264
|
-
"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,
|
|
265
|
-
"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,
|
|
266
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
267
|
-
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
268
|
-
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/integrations/${encodeURIComponent(integrationId)}/capabilities/${encodeURIComponent(capabilityId)}`),
|
|
269
|
-
method: "PATCH",
|
|
270
|
-
headers: _headers,
|
|
271
|
-
contentType: "application/json",
|
|
272
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
273
|
-
requestType: "json",
|
|
274
|
-
body: serializers.PatchAgentCapabilityRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
275
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
276
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
277
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
278
|
-
});
|
|
279
|
-
if (_response.ok) {
|
|
280
|
-
return {
|
|
281
|
-
data: serializers.AgentCapability.parseOrThrow(_response.body, {
|
|
282
|
-
unrecognizedObjectKeys: "passthrough",
|
|
283
|
-
allowUnrecognizedUnionMembers: true,
|
|
284
|
-
allowUnrecognizedEnumValues: true,
|
|
285
|
-
breadcrumbsPrefix: ["response"],
|
|
286
|
-
}),
|
|
287
|
-
rawResponse: _response.rawResponse,
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
if (_response.error.reason === "status-code") {
|
|
291
|
-
switch (_response.error.statusCode) {
|
|
292
|
-
case 404:
|
|
293
|
-
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
294
|
-
unrecognizedObjectKeys: "passthrough",
|
|
295
|
-
allowUnrecognizedUnionMembers: true,
|
|
296
|
-
allowUnrecognizedEnumValues: true,
|
|
297
|
-
breadcrumbsPrefix: ["response"],
|
|
298
|
-
}), _response.rawResponse);
|
|
299
|
-
case 400:
|
|
300
|
-
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
301
|
-
unrecognizedObjectKeys: "passthrough",
|
|
302
|
-
allowUnrecognizedUnionMembers: true,
|
|
303
|
-
allowUnrecognizedEnumValues: true,
|
|
304
|
-
breadcrumbsPrefix: ["response"],
|
|
305
|
-
}), _response.rawResponse);
|
|
306
|
-
case 500:
|
|
307
|
-
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
308
|
-
unrecognizedObjectKeys: "passthrough",
|
|
309
|
-
allowUnrecognizedUnionMembers: true,
|
|
310
|
-
allowUnrecognizedEnumValues: true,
|
|
311
|
-
breadcrumbsPrefix: ["response"],
|
|
312
|
-
}), _response.rawResponse);
|
|
313
|
-
default:
|
|
314
|
-
throw new errors.MavenAGIError({
|
|
315
|
-
statusCode: _response.error.statusCode,
|
|
316
|
-
body: _response.error.body,
|
|
317
|
-
rawResponse: _response.rawResponse,
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
switch (_response.error.reason) {
|
|
322
|
-
case "non-json":
|
|
323
|
-
throw new errors.MavenAGIError({
|
|
324
|
-
statusCode: _response.error.statusCode,
|
|
325
|
-
body: _response.error.rawBody,
|
|
326
|
-
rawResponse: _response.rawResponse,
|
|
327
|
-
});
|
|
328
|
-
case "timeout":
|
|
329
|
-
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/integrations/{integrationId}/capabilities/{capabilityId}.");
|
|
330
|
-
case "unknown":
|
|
331
|
-
throw new errors.MavenAGIError({
|
|
332
|
-
message: _response.error.errorMessage,
|
|
333
|
-
rawResponse: _response.rawResponse,
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Execute an action capability.
|
|
340
|
-
*
|
|
341
|
-
* @param {string} integrationId
|
|
342
|
-
* @param {string} capabilityId
|
|
343
|
-
* @param {MavenAGI.ExecuteCapabilityRequest} request
|
|
344
|
-
* @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
|
|
345
|
-
*
|
|
346
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
347
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
348
|
-
* @throws {@link MavenAGI.ServerError}
|
|
349
|
-
*
|
|
350
|
-
* @example
|
|
351
|
-
* await client.agentCapabilities.execute("integrationId", "capabilityId", {})
|
|
352
|
-
*/
|
|
353
|
-
execute(integrationId, capabilityId, request, requestOptions) {
|
|
354
|
-
return core.HttpResponsePromise.fromPromise(this.__execute(integrationId, capabilityId, request, requestOptions));
|
|
355
|
-
}
|
|
356
|
-
__execute(integrationId, capabilityId, request, requestOptions) {
|
|
357
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
359
|
-
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
360
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
361
|
-
"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,
|
|
362
|
-
"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,
|
|
363
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
364
|
-
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
365
|
-
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/integrations/${encodeURIComponent(integrationId)}/capabilities/${encodeURIComponent(capabilityId)}/execute`),
|
|
366
|
-
method: "POST",
|
|
367
|
-
headers: _headers,
|
|
368
|
-
contentType: "application/json",
|
|
369
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
370
|
-
requestType: "json",
|
|
371
|
-
body: serializers.ExecuteCapabilityRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
372
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
373
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
374
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
375
|
-
});
|
|
376
|
-
if (_response.ok) {
|
|
377
|
-
return {
|
|
378
|
-
data: serializers.ExecuteCapabilityResponse.parseOrThrow(_response.body, {
|
|
379
|
-
unrecognizedObjectKeys: "passthrough",
|
|
380
|
-
allowUnrecognizedUnionMembers: true,
|
|
381
|
-
allowUnrecognizedEnumValues: true,
|
|
382
|
-
breadcrumbsPrefix: ["response"],
|
|
383
|
-
}),
|
|
384
|
-
rawResponse: _response.rawResponse,
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
if (_response.error.reason === "status-code") {
|
|
388
|
-
switch (_response.error.statusCode) {
|
|
389
|
-
case 404:
|
|
390
|
-
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
391
|
-
unrecognizedObjectKeys: "passthrough",
|
|
392
|
-
allowUnrecognizedUnionMembers: true,
|
|
393
|
-
allowUnrecognizedEnumValues: true,
|
|
394
|
-
breadcrumbsPrefix: ["response"],
|
|
395
|
-
}), _response.rawResponse);
|
|
396
|
-
case 400:
|
|
397
|
-
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
398
|
-
unrecognizedObjectKeys: "passthrough",
|
|
399
|
-
allowUnrecognizedUnionMembers: true,
|
|
400
|
-
allowUnrecognizedEnumValues: true,
|
|
401
|
-
breadcrumbsPrefix: ["response"],
|
|
402
|
-
}), _response.rawResponse);
|
|
403
|
-
case 500:
|
|
404
|
-
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
405
|
-
unrecognizedObjectKeys: "passthrough",
|
|
406
|
-
allowUnrecognizedUnionMembers: true,
|
|
407
|
-
allowUnrecognizedEnumValues: true,
|
|
408
|
-
breadcrumbsPrefix: ["response"],
|
|
409
|
-
}), _response.rawResponse);
|
|
410
|
-
default:
|
|
411
|
-
throw new errors.MavenAGIError({
|
|
412
|
-
statusCode: _response.error.statusCode,
|
|
413
|
-
body: _response.error.body,
|
|
414
|
-
rawResponse: _response.rawResponse,
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
switch (_response.error.reason) {
|
|
419
|
-
case "non-json":
|
|
420
|
-
throw new errors.MavenAGIError({
|
|
421
|
-
statusCode: _response.error.statusCode,
|
|
422
|
-
body: _response.error.rawBody,
|
|
423
|
-
rawResponse: _response.rawResponse,
|
|
424
|
-
});
|
|
425
|
-
case "timeout":
|
|
426
|
-
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/integrations/{integrationId}/capabilities/{capabilityId}/execute.");
|
|
427
|
-
case "unknown":
|
|
428
|
-
throw new errors.MavenAGIError({
|
|
429
|
-
message: _response.error.errorMessage,
|
|
430
|
-
rawResponse: _response.rawResponse,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
_getAuthorizationHeader() {
|
|
436
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
-
var _a, _b;
|
|
438
|
-
const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_ID"];
|
|
439
|
-
const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_SECRET"];
|
|
440
|
-
if (appId != null && appSecret != null) {
|
|
441
|
-
return core.BasicAuth.toAuthorizationHeader({
|
|
442
|
-
username: appId,
|
|
443
|
-
password: appSecret,
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
return undefined;
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
exports.AgentCapabilities = AgentCapabilities;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as MavenAGI from "../../../index";
|
|
2
|
-
export interface ActionCapability extends MavenAGI.AgentCapabilityBase {
|
|
3
|
-
userInteractionRequired: boolean;
|
|
4
|
-
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
5
|
-
buttonName?: string;
|
|
6
|
-
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
7
|
-
userFormParameters: MavenAGI.ActionParameter[];
|
|
8
|
-
precondition?: MavenAGI.Precondition;
|
|
9
|
-
descriptionOverride?: string;
|
|
10
|
-
/** A human-readable explanation of the precondition associated with this action, if present. */
|
|
11
|
-
preconditionExplanation?: string;
|
|
12
|
-
pinned: boolean;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as MavenAGI from "../../../index";
|
|
2
|
-
export type AgentCapability = MavenAGI.AgentCapability.Action | MavenAGI.AgentCapability.Trigger;
|
|
3
|
-
export declare namespace AgentCapability {
|
|
4
|
-
interface Action extends MavenAGI.ActionCapability {
|
|
5
|
-
type: "ACTION";
|
|
6
|
-
}
|
|
7
|
-
interface Trigger extends MavenAGI.TriggerCapability {
|
|
8
|
-
type: "TRIGGER";
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as MavenAGI from "../../../index";
|
|
2
|
-
export interface AgentCapabilityBase {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string | null;
|
|
5
|
-
/** Timestamp when the capability was created */
|
|
6
|
-
createdAt: Date;
|
|
7
|
-
/** Whether this capability will be called by Maven. */
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
version: number;
|
|
10
|
-
/** ID that uniquely identifies this capability */
|
|
11
|
-
capabilityId: MavenAGI.EntityId;
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const AgentCapabilityField: {
|
|
2
|
-
readonly CreatedAt: "CreatedAt";
|
|
3
|
-
readonly Enabled: "Enabled";
|
|
4
|
-
readonly Name: "Name";
|
|
5
|
-
readonly Type: "Type";
|
|
6
|
-
readonly UserInteractionRequired: "UserInteractionRequired";
|
|
7
|
-
};
|
|
8
|
-
export type AgentCapabilityField = (typeof AgentCapabilityField)[keyof typeof AgentCapabilityField];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AgentCapabilityField = void 0;
|
|
5
|
-
exports.AgentCapabilityField = {
|
|
6
|
-
CreatedAt: "CreatedAt",
|
|
7
|
-
Enabled: "Enabled",
|
|
8
|
-
Name: "Name",
|
|
9
|
-
Type: "Type",
|
|
10
|
-
UserInteractionRequired: "UserInteractionRequired",
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as MavenAGI from "../../../index";
|
|
2
|
-
export interface AgentCapabilityListRequest extends MavenAGI.BasePaginatedRequest {
|
|
3
|
-
capabilityType?: MavenAGI.AgentCapabilityType;
|
|
4
|
-
pinned?: boolean;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
integrationIds?: string[];
|
|
7
|
-
description?: string | null;
|
|
8
|
-
userInteractionRequired?: boolean;
|
|
9
|
-
/** The field to sort by, defaults to created timestamp */
|
|
10
|
-
sortId?: MavenAGI.AgentCapabilityField;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AgentCapabilityType = void 0;
|
|
5
|
-
exports.AgentCapabilityType = {
|
|
6
|
-
Action: "ACTION",
|
|
7
|
-
Trigger: "TRIGGER",
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface PatchAgentCapabilityRequest {
|
|
2
|
-
/** Whether this capability is enabled or disabled */
|
|
3
|
-
enabled?: boolean;
|
|
4
|
-
/** Override description for action capabilities. Only applies to actions, ignored for triggers. */
|
|
5
|
-
descriptionOverride?: string | null;
|
|
6
|
-
/** Whether this action capability is pinned. Only applies to actions, ignored for triggers. */
|
|
7
|
-
pinned?: boolean;
|
|
8
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const TriggerType: {
|
|
2
|
-
readonly ConversationCreated: "CONVERSATION_CREATED";
|
|
3
|
-
readonly FeedbackCreated: "FEEDBACK_CREATED";
|
|
4
|
-
readonly InboxItemCreated: "INBOX_ITEM_CREATED";
|
|
5
|
-
readonly EventCreated: "EVENT_CREATED";
|
|
6
|
-
};
|
|
7
|
-
export type TriggerType = (typeof TriggerType)[keyof typeof TriggerType];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.TriggerType = void 0;
|
|
5
|
-
exports.TriggerType = {
|
|
6
|
-
ConversationCreated: "CONVERSATION_CREATED",
|
|
7
|
-
FeedbackCreated: "FEEDBACK_CREATED",
|
|
8
|
-
InboxItemCreated: "INBOX_ITEM_CREATED",
|
|
9
|
-
EventCreated: "EVENT_CREATED",
|
|
10
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./AgentCapability";
|
|
2
|
-
export * from "./AgentCapabilityBase";
|
|
3
|
-
export * from "./ActionCapability";
|
|
4
|
-
export * from "./TriggerCapability";
|
|
5
|
-
export * from "./ListAgentCapabilitiesResponse";
|
|
6
|
-
export * from "./AgentCapabilityListRequest";
|
|
7
|
-
export * from "./PatchAgentCapabilityRequest";
|
|
8
|
-
export * from "./ExecuteCapabilityRequest";
|
|
9
|
-
export * from "./ExecuteCapabilityResponse";
|
|
10
|
-
export * from "./TriggerType";
|
|
11
|
-
export * from "./AgentCapabilityType";
|
|
12
|
-
export * from "./AgentCapabilityField";
|