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.
Files changed (242) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +28 -33
  3. package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  4. package/api/resources/commons/types/ConversationSummary.d.ts +2 -0
  5. package/api/resources/conversation/client/Client.d.ts +19 -0
  6. package/api/resources/conversation/client/Client.js +94 -0
  7. package/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  8. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  9. package/api/resources/index.d.ts +0 -2
  10. package/api/resources/index.js +1 -3
  11. package/api/resources/knowledge/client/Client.d.ts +24 -0
  12. package/api/resources/knowledge/client/Client.js +104 -0
  13. package/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  14. package/api/resources/knowledge/client/requests/index.d.ts +1 -0
  15. package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  16. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  17. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  18. package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  19. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  20. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  21. package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  22. package/core/exports.d.ts +1 -0
  23. package/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  24. package/core/file/exports.d.ts +1 -0
  25. package/core/file/file.d.ts +5 -0
  26. package/core/file/file.js +203 -0
  27. package/{dist/serialization/resources/agentCapabilities → core/file}/index.d.ts +1 -0
  28. package/{dist/serialization/resources/agentCapabilities → core/file}/index.js +1 -0
  29. package/core/file/types.d.ts +66 -0
  30. package/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  31. package/core/form-data-utils/FormDataWrapper.js +208 -0
  32. package/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  33. package/core/form-data-utils/encodeAsFormParameter.js +12 -0
  34. package/core/form-data-utils/index.d.ts +2 -0
  35. package/core/form-data-utils/index.js +20 -0
  36. package/core/index.d.ts +2 -0
  37. package/core/index.js +3 -1
  38. package/dist/Client.d.ts +0 -3
  39. package/dist/Client.js +28 -33
  40. package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  41. package/dist/api/resources/commons/types/ConversationSummary.d.ts +2 -0
  42. package/dist/api/resources/conversation/client/Client.d.ts +19 -0
  43. package/dist/api/resources/conversation/client/Client.js +94 -0
  44. package/dist/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  45. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  46. package/dist/api/resources/index.d.ts +0 -2
  47. package/dist/api/resources/index.js +1 -3
  48. package/dist/api/resources/knowledge/client/Client.d.ts +24 -0
  49. package/dist/api/resources/knowledge/client/Client.js +104 -0
  50. package/dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  51. package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
  52. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  53. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  54. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  55. package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  56. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  57. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  58. package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  59. package/dist/core/exports.d.ts +1 -0
  60. package/dist/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  61. package/dist/core/file/exports.d.ts +1 -0
  62. package/dist/core/file/exports.js +2 -0
  63. package/dist/core/file/file.d.ts +5 -0
  64. package/dist/core/file/file.js +203 -0
  65. package/{serialization/resources/agentCapabilities → dist/core/file}/index.d.ts +1 -0
  66. package/{serialization/resources/agentCapabilities → dist/core/file}/index.js +1 -0
  67. package/dist/core/file/types.d.ts +66 -0
  68. package/dist/core/file/types.js +2 -0
  69. package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  70. package/dist/core/form-data-utils/FormDataWrapper.js +208 -0
  71. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  72. package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
  73. package/dist/core/form-data-utils/index.d.ts +2 -0
  74. package/dist/core/form-data-utils/index.js +20 -0
  75. package/dist/core/index.d.ts +2 -0
  76. package/dist/core/index.js +3 -1
  77. package/dist/exports.d.ts +1 -0
  78. package/dist/exports.js +17 -0
  79. package/dist/index.d.ts +1 -0
  80. package/dist/index.js +4 -0
  81. package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
  82. package/dist/serialization/resources/commons/types/ConversationSummary.js +1 -0
  83. package/dist/serialization/resources/index.d.ts +0 -2
  84. package/dist/serialization/resources/index.js +1 -3
  85. package/dist/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  86. package/dist/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -4
  87. package/dist/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  88. package/dist/serialization/resources/knowledge/client/requests/index.js +3 -1
  89. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  90. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  91. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  92. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  93. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  94. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  95. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  96. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  97. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  98. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  99. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  100. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  101. package/dist/version.d.ts +1 -1
  102. package/dist/version.js +1 -1
  103. package/exports.d.ts +1 -0
  104. package/exports.js +17 -0
  105. package/index.d.ts +1 -0
  106. package/index.js +4 -0
  107. package/package.json +1 -1
  108. package/reference.md +86 -264
  109. package/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
  110. package/serialization/resources/commons/types/ConversationSummary.js +1 -0
  111. package/serialization/resources/index.d.ts +0 -2
  112. package/serialization/resources/index.js +1 -3
  113. package/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  114. package/{dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js → serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -6
  115. package/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  116. package/serialization/resources/knowledge/client/requests/index.js +3 -1
  117. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  118. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  119. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  120. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  121. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  122. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  123. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  124. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  125. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  126. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  127. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  128. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  129. package/version.d.ts +1 -1
  130. package/version.js +1 -1
  131. package/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  132. package/api/resources/agentCapabilities/client/Client.js +0 -450
  133. package/api/resources/agentCapabilities/client/index.d.ts +0 -1
  134. package/api/resources/agentCapabilities/index.d.ts +0 -2
  135. package/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  136. package/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  137. package/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  138. package/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  139. package/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  140. package/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  141. package/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  142. package/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  143. package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  144. package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
  145. package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  146. package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
  147. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  148. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  149. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  150. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  151. package/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  152. package/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  153. package/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  154. package/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  155. package/api/resources/agentCapabilities/types/index.d.ts +0 -12
  156. package/api/resources/agentCapabilities/types/index.js +0 -28
  157. package/dist/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  158. package/dist/api/resources/agentCapabilities/client/Client.js +0 -450
  159. package/dist/api/resources/agentCapabilities/client/index.d.ts +0 -1
  160. package/dist/api/resources/agentCapabilities/index.d.ts +0 -2
  161. package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  162. package/dist/api/resources/agentCapabilities/types/ActionCapability.js +0 -3
  163. package/dist/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  164. package/dist/api/resources/agentCapabilities/types/AgentCapability.js +0 -3
  165. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  166. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -3
  167. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  168. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  169. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  170. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -3
  171. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  172. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  173. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  174. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
  175. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  176. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
  177. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  178. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  179. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  180. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  181. package/dist/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  182. package/dist/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  183. package/dist/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  184. package/dist/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  185. package/dist/api/resources/agentCapabilities/types/index.d.ts +0 -12
  186. package/dist/api/resources/agentCapabilities/types/index.js +0 -28
  187. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  188. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  189. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  190. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  191. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  192. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  193. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  194. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
  195. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  196. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  197. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  198. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  199. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  200. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  201. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  202. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  203. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  204. package/dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  205. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  206. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  207. package/dist/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  208. package/dist/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  209. package/dist/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  210. package/dist/serialization/resources/agentCapabilities/types/index.js +0 -28
  211. package/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  212. package/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  213. package/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  214. package/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  215. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  216. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  217. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  218. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
  219. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  220. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  221. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  222. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  223. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  224. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -41
  225. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  226. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  227. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  228. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  229. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  230. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -43
  231. package/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  232. package/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  233. package/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  234. package/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  235. package/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  236. package/serialization/resources/agentCapabilities/types/index.js +0 -28
  237. /package/api/resources/{agentCapabilities/types/ActionCapability.js → conversation/client/requests/SimulationImportRequest.js} +0 -0
  238. /package/api/resources/{agentCapabilities/types/AgentCapability.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
  239. /package/{api/resources/agentCapabilities/client/index.js → core/file/exports.js} +0 -0
  240. /package/{dist/api/resources/agentCapabilities/client/index.js → core/file/types.js} +0 -0
  241. /package/{api/resources/agentCapabilities/types/AgentCapabilityBase.js → dist/api/resources/conversation/client/requests/SimulationImportRequest.js} +0 -0
  242. /package/{api/resources/agentCapabilities/types/AgentCapabilityListRequest.js → dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AgentCapability"), exports);
18
- __exportStar(require("./AgentCapabilityBase"), exports);
19
- __exportStar(require("./ActionCapability"), exports);
20
- __exportStar(require("./TriggerCapability"), exports);
21
- __exportStar(require("./ListAgentCapabilitiesResponse"), exports);
22
- __exportStar(require("./AgentCapabilityListRequest"), exports);
23
- __exportStar(require("./PatchAgentCapabilityRequest"), exports);
24
- __exportStar(require("./ExecuteCapabilityRequest"), exports);
25
- __exportStar(require("./ExecuteCapabilityResponse"), exports);
26
- __exportStar(require("./TriggerType"), exports);
27
- __exportStar(require("./AgentCapabilityType"), exports);
28
- __exportStar(require("./AgentCapabilityField"), exports);
@@ -1,101 +0,0 @@
1
- import * as environments from "../../../../environments";
2
- import * as core from "../../../../core";
3
- import * as MavenAGI from "../../../index";
4
- export declare namespace AgentCapabilities {
5
- interface Options {
6
- environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
7
- /** Specify a custom URL to connect the client to. */
8
- baseUrl?: core.Supplier<string>;
9
- appId?: core.Supplier<string | undefined>;
10
- appSecret?: core.Supplier<string | undefined>;
11
- /** Override the X-Organization-Id header */
12
- organizationId: core.Supplier<string>;
13
- /** Override the X-Agent-Id header */
14
- agentId: core.Supplier<string>;
15
- /** Additional headers to include in requests. */
16
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
17
- fetcher?: core.FetchFunction;
18
- }
19
- interface RequestOptions {
20
- /** The maximum time to wait for a response in seconds. */
21
- timeoutInSeconds?: number;
22
- /** The number of times to retry the request. Defaults to 2. */
23
- maxRetries?: number;
24
- /** A hook to abort the request. */
25
- abortSignal?: AbortSignal;
26
- /** Override the X-Organization-Id header */
27
- organizationId?: string;
28
- /** Override the X-Agent-Id header */
29
- agentId?: string;
30
- /** Additional query string parameters to include in the request. */
31
- queryParams?: Record<string, unknown>;
32
- /** Additional headers to include in the request. */
33
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
34
- }
35
- }
36
- export declare class AgentCapabilities {
37
- protected readonly _options: AgentCapabilities.Options;
38
- constructor(_options: AgentCapabilities.Options);
39
- /**
40
- * List all capabilities for an agent.
41
- *
42
- * @param {MavenAGI.AgentCapabilityListRequest} request
43
- * @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
44
- *
45
- * @throws {@link MavenAGI.NotFoundError}
46
- * @throws {@link MavenAGI.BadRequestError}
47
- * @throws {@link MavenAGI.ServerError}
48
- *
49
- * @example
50
- * await client.agentCapabilities.list({})
51
- */
52
- list(request: MavenAGI.AgentCapabilityListRequest, requestOptions?: AgentCapabilities.RequestOptions): core.HttpResponsePromise<MavenAGI.ListAgentCapabilitiesResponse>;
53
- private __list;
54
- /**
55
- * @param {string} integrationId
56
- * @param {string} capabilityId
57
- * @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
58
- *
59
- * @throws {@link MavenAGI.NotFoundError}
60
- * @throws {@link MavenAGI.BadRequestError}
61
- * @throws {@link MavenAGI.ServerError}
62
- *
63
- * @example
64
- * await client.agentCapabilities.get("integrationId", "capabilityId")
65
- */
66
- get(integrationId: string, capabilityId: string, requestOptions?: AgentCapabilities.RequestOptions): core.HttpResponsePromise<MavenAGI.AgentCapability>;
67
- private __get;
68
- /**
69
- * @param {string} integrationId
70
- * @param {string} capabilityId
71
- * @param {MavenAGI.PatchAgentCapabilityRequest} request
72
- * @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
73
- *
74
- * @throws {@link MavenAGI.NotFoundError}
75
- * @throws {@link MavenAGI.BadRequestError}
76
- * @throws {@link MavenAGI.ServerError}
77
- *
78
- * @example
79
- * await client.agentCapabilities.patch("integrationId", "capabilityId", {})
80
- */
81
- patch(integrationId: string, capabilityId: string, request: MavenAGI.PatchAgentCapabilityRequest, requestOptions?: AgentCapabilities.RequestOptions): core.HttpResponsePromise<MavenAGI.AgentCapability>;
82
- private __patch;
83
- /**
84
- * Execute an action capability.
85
- *
86
- * @param {string} integrationId
87
- * @param {string} capabilityId
88
- * @param {MavenAGI.ExecuteCapabilityRequest} request
89
- * @param {AgentCapabilities.RequestOptions} requestOptions - Request-specific configuration.
90
- *
91
- * @throws {@link MavenAGI.NotFoundError}
92
- * @throws {@link MavenAGI.BadRequestError}
93
- * @throws {@link MavenAGI.ServerError}
94
- *
95
- * @example
96
- * await client.agentCapabilities.execute("integrationId", "capabilityId", {})
97
- */
98
- execute(integrationId: string, capabilityId: string, request: MavenAGI.ExecuteCapabilityRequest, requestOptions?: AgentCapabilities.RequestOptions): core.HttpResponsePromise<MavenAGI.ExecuteCapabilityResponse>;
99
- private __execute;
100
- protected _getAuthorizationHeader(): Promise<string | undefined>;
101
- }
@@ -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,2 +0,0 @@
1
- export * from "./types";
2
- export * from "./client";
@@ -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,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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];