mavenagi 1.2.5 → 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 (265) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +28 -33
  3. package/README.md +21 -21
  4. package/api/resources/analytics/client/Client.d.ts +10 -0
  5. package/api/resources/analytics/client/Client.js +83 -0
  6. package/api/resources/commons/types/AppUserResponse.d.ts +12 -0
  7. package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  8. package/api/resources/commons/types/ConversationSummary.d.ts +6 -0
  9. package/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
  10. package/api/resources/commons/types/index.d.ts +1 -0
  11. package/api/resources/commons/types/index.js +1 -0
  12. package/api/resources/conversation/client/Client.d.ts +19 -0
  13. package/api/resources/conversation/client/Client.js +94 -0
  14. package/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  15. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  16. package/api/resources/index.d.ts +0 -2
  17. package/api/resources/index.js +1 -3
  18. package/api/resources/knowledge/client/Client.d.ts +24 -0
  19. package/api/resources/knowledge/client/Client.js +104 -0
  20. package/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  21. package/api/resources/knowledge/client/requests/index.d.ts +1 -0
  22. package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  23. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  24. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  25. package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  26. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  27. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  28. package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  29. package/core/exports.d.ts +1 -0
  30. package/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  31. package/core/file/exports.d.ts +1 -0
  32. package/core/file/file.d.ts +5 -0
  33. package/core/file/file.js +203 -0
  34. package/{dist/serialization/resources/agentCapabilities → core/file}/index.d.ts +1 -0
  35. package/{dist/serialization/resources/agentCapabilities → core/file}/index.js +1 -0
  36. package/core/file/types.d.ts +66 -0
  37. package/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  38. package/core/form-data-utils/FormDataWrapper.js +208 -0
  39. package/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  40. package/core/form-data-utils/encodeAsFormParameter.js +12 -0
  41. package/core/form-data-utils/index.d.ts +2 -0
  42. package/core/form-data-utils/index.js +20 -0
  43. package/core/index.d.ts +2 -0
  44. package/core/index.js +3 -1
  45. package/dist/Client.d.ts +0 -3
  46. package/dist/Client.js +28 -33
  47. package/dist/api/resources/analytics/client/Client.d.ts +10 -0
  48. package/dist/api/resources/analytics/client/Client.js +83 -0
  49. package/dist/api/resources/commons/types/AppUserResponse.d.ts +12 -0
  50. package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
  51. package/dist/api/resources/commons/types/ConversationSummary.d.ts +6 -0
  52. package/dist/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
  53. package/dist/api/resources/commons/types/index.d.ts +1 -0
  54. package/dist/api/resources/commons/types/index.js +1 -0
  55. package/dist/api/resources/conversation/client/Client.d.ts +19 -0
  56. package/dist/api/resources/conversation/client/Client.js +94 -0
  57. package/dist/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
  58. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  59. package/dist/api/resources/index.d.ts +0 -2
  60. package/dist/api/resources/index.js +1 -3
  61. package/dist/api/resources/knowledge/client/Client.d.ts +24 -0
  62. package/dist/api/resources/knowledge/client/Client.js +104 -0
  63. package/dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
  64. package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
  65. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
  66. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  67. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
  68. package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
  69. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -0
  70. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -1
  71. package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
  72. package/dist/core/exports.d.ts +1 -0
  73. package/dist/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
  74. package/dist/core/file/exports.d.ts +1 -0
  75. package/dist/core/file/exports.js +2 -0
  76. package/dist/core/file/file.d.ts +5 -0
  77. package/dist/core/file/file.js +203 -0
  78. package/{serialization/resources/agentCapabilities → dist/core/file}/index.d.ts +1 -0
  79. package/{serialization/resources/agentCapabilities → dist/core/file}/index.js +1 -0
  80. package/dist/core/file/types.d.ts +66 -0
  81. package/dist/core/file/types.js +2 -0
  82. package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  83. package/dist/core/form-data-utils/FormDataWrapper.js +208 -0
  84. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  85. package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
  86. package/dist/core/form-data-utils/index.d.ts +2 -0
  87. package/dist/core/form-data-utils/index.js +20 -0
  88. package/dist/core/index.d.ts +2 -0
  89. package/dist/core/index.js +3 -1
  90. package/dist/exports.d.ts +1 -0
  91. package/dist/exports.js +17 -0
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.js +4 -0
  94. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
  95. package/dist/serialization/resources/commons/types/AppUserResponse.js +2 -0
  96. package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
  97. package/dist/serialization/resources/commons/types/ConversationSummary.js +3 -0
  98. package/dist/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
  99. package/dist/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → commons/types/UserDataWithReference.js} +8 -4
  100. package/dist/serialization/resources/commons/types/index.d.ts +1 -0
  101. package/dist/serialization/resources/commons/types/index.js +1 -0
  102. package/dist/serialization/resources/index.d.ts +0 -2
  103. package/dist/serialization/resources/index.js +1 -3
  104. package/dist/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  105. package/dist/serialization/resources/{agentCapabilities/types/PatchAgentCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -6
  106. package/dist/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  107. package/dist/serialization/resources/knowledge/client/requests/index.js +3 -1
  108. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  109. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  110. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  111. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  112. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  113. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  114. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  115. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  116. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  117. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  118. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  119. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.js +1 -1
  122. package/exports.d.ts +1 -0
  123. package/exports.js +17 -0
  124. package/index.d.ts +1 -0
  125. package/index.js +4 -0
  126. package/package.json +1 -1
  127. package/reference.md +174 -264
  128. package/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
  129. package/serialization/resources/commons/types/AppUserResponse.js +2 -0
  130. package/serialization/resources/commons/types/ConversationSummary.d.ts +3 -0
  131. package/serialization/resources/commons/types/ConversationSummary.js +3 -0
  132. package/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
  133. package/{dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.js → serialization/resources/commons/types/UserDataWithReference.js} +8 -2
  134. package/serialization/resources/commons/types/index.d.ts +1 -0
  135. package/serialization/resources/commons/types/index.js +1 -0
  136. package/serialization/resources/index.d.ts +0 -2
  137. package/serialization/resources/index.js +1 -3
  138. package/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
  139. package/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -4
  140. package/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
  141. package/serialization/resources/knowledge/client/requests/index.js +3 -1
  142. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
  143. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
  144. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
  145. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
  146. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
  147. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
  148. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
  149. package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
  150. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
  151. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -0
  152. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
  153. package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
  154. package/version.d.ts +1 -1
  155. package/version.js +1 -1
  156. package/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  157. package/api/resources/agentCapabilities/client/Client.js +0 -450
  158. package/api/resources/agentCapabilities/client/index.d.ts +0 -1
  159. package/api/resources/agentCapabilities/index.d.ts +0 -2
  160. package/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  161. package/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  162. package/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  163. package/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  164. package/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  165. package/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  166. package/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  167. package/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  168. package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  169. package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  170. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  171. package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  172. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  173. package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  174. package/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  175. package/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  176. package/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  177. package/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  178. package/api/resources/agentCapabilities/types/index.d.ts +0 -12
  179. package/api/resources/agentCapabilities/types/index.js +0 -28
  180. package/dist/api/resources/agentCapabilities/client/Client.d.ts +0 -101
  181. package/dist/api/resources/agentCapabilities/client/Client.js +0 -450
  182. package/dist/api/resources/agentCapabilities/client/index.d.ts +0 -1
  183. package/dist/api/resources/agentCapabilities/index.d.ts +0 -2
  184. package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
  185. package/dist/api/resources/agentCapabilities/types/ActionCapability.js +0 -3
  186. package/dist/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
  187. package/dist/api/resources/agentCapabilities/types/AgentCapability.js +0 -3
  188. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
  189. package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -3
  190. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
  191. package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
  192. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
  193. package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -3
  194. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
  195. package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
  196. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
  197. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
  198. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
  199. package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
  200. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
  201. package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
  202. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
  203. package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
  204. package/dist/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
  205. package/dist/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
  206. package/dist/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  207. package/dist/api/resources/agentCapabilities/types/TriggerType.js +0 -10
  208. package/dist/api/resources/agentCapabilities/types/index.d.ts +0 -12
  209. package/dist/api/resources/agentCapabilities/types/index.js +0 -28
  210. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  211. package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  212. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  213. package/dist/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  214. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  215. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  216. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  217. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  218. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  219. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  220. package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  221. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  222. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  223. package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  224. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  225. package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  226. package/dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  227. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  228. package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  229. package/dist/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  230. package/dist/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  231. package/dist/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  232. package/dist/serialization/resources/agentCapabilities/types/index.js +0 -28
  233. package/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
  234. package/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
  235. package/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
  236. package/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
  237. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
  238. package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
  239. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
  240. package/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
  241. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
  242. package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
  243. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
  244. package/serialization/resources/agentCapabilities/types/AgentCapabilityType.js +0 -39
  245. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
  246. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
  247. package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
  248. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
  249. package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
  250. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
  251. package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -43
  252. package/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
  253. package/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
  254. package/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
  255. package/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
  256. package/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
  257. package/serialization/resources/agentCapabilities/types/index.js +0 -28
  258. /package/api/resources/{agentCapabilities/types/ActionCapability.js → commons/types/UserDataWithReference.js} +0 -0
  259. /package/api/resources/{agentCapabilities/types/AgentCapability.js → conversation/client/requests/SimulationImportRequest.js} +0 -0
  260. /package/api/resources/{agentCapabilities/types/AgentCapabilityBase.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
  261. /package/{api/resources/agentCapabilities/client/index.js → core/file/exports.js} +0 -0
  262. /package/{dist/api/resources/agentCapabilities/client/index.js → core/file/types.js} +0 -0
  263. /package/{api/resources/agentCapabilities/types/AgentCapabilityListRequest.js → dist/api/resources/commons/types/UserDataWithReference.js} +0 -0
  264. /package/{api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js → dist/api/resources/conversation/client/requests/SimulationImportRequest.js} +0 -0
  265. /package/{api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js → dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
@@ -2,14 +2,17 @@ import * as serializers from "../../../index";
2
2
  import * as MavenAGI from "../../../../api/index";
3
3
  import * as core from "../../../../core";
4
4
  import { EntityIdWithoutAgent } from "../../commons/types/EntityIdWithoutAgent";
5
+ import { LlmInclusionStatus } from "../../commons/types/LlmInclusionStatus";
5
6
  export declare const KnowledgeDocumentFilter: core.serialization.ObjectSchema<serializers.KnowledgeDocumentFilter.Raw, MavenAGI.KnowledgeDocumentFilter>;
6
7
  export declare namespace KnowledgeDocumentFilter {
7
8
  interface Raw {
8
9
  search?: string | null;
9
10
  title?: string | null;
11
+ url?: string | null;
10
12
  createdAfter?: string | null;
11
13
  createdBefore?: string | null;
12
14
  appIds?: string[] | null;
13
15
  knowledgeBaseVersionId?: EntityIdWithoutAgent.Raw | null;
16
+ llmInclusionStatus?: LlmInclusionStatus.Raw[] | null;
14
17
  }
15
18
  }
@@ -37,11 +37,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.KnowledgeDocumentFilter = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
39
  const EntityIdWithoutAgent_1 = require("../../commons/types/EntityIdWithoutAgent");
40
+ const LlmInclusionStatus_1 = require("../../commons/types/LlmInclusionStatus");
40
41
  exports.KnowledgeDocumentFilter = core.serialization.object({
41
42
  search: core.serialization.string().optional(),
42
43
  title: core.serialization.string().optional(),
44
+ url: core.serialization.string().optional(),
43
45
  createdAfter: core.serialization.date().optional(),
44
46
  createdBefore: core.serialization.date().optional(),
45
47
  appIds: core.serialization.list(core.serialization.string()).optional(),
46
48
  knowledgeBaseVersionId: EntityIdWithoutAgent_1.EntityIdWithoutAgent.optional(),
49
+ llmInclusionStatus: core.serialization.list(LlmInclusionStatus_1.LlmInclusionStatus).optional(),
47
50
  });
@@ -14,5 +14,7 @@ export declare namespace KnowledgeDocumentRequest {
14
14
  title: string;
15
15
  content: string;
16
16
  metadata?: Record<string, string> | null;
17
+ createdAt?: string | null;
18
+ updatedAt?: string | null;
17
19
  }
18
20
  }
@@ -48,5 +48,7 @@ exports.KnowledgeDocumentRequest = core.serialization
48
48
  title: core.serialization.string(),
49
49
  content: core.serialization.string(),
50
50
  metadata: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
51
+ createdAt: core.serialization.date().optional(),
52
+ updatedAt: core.serialization.date().optional(),
51
53
  })
52
54
  .extend(BaseKnowledgeDocument_1.BaseKnowledgeDocument);
@@ -2,6 +2,7 @@ import * as serializers from "../../../index";
2
2
  import * as MavenAGI from "../../../../api/index";
3
3
  import * as core from "../../../../core";
4
4
  import { EntityId } from "../../commons/types/EntityId";
5
+ import { LlmInclusionStatus } from "../../commons/types/LlmInclusionStatus";
5
6
  import { BaseKnowledgeDocument } from "./BaseKnowledgeDocument";
6
7
  export declare const KnowledgeDocumentSearchResponse: core.serialization.ObjectSchema<serializers.KnowledgeDocumentSearchResponse.Raw, MavenAGI.KnowledgeDocumentSearchResponse>;
7
8
  export declare namespace KnowledgeDocumentSearchResponse {
@@ -9,5 +10,8 @@ export declare namespace KnowledgeDocumentSearchResponse {
9
10
  knowledgeDocumentId: EntityId.Raw;
10
11
  knowledgeBaseVersionId?: EntityId.Raw | null;
11
12
  title?: string | null;
13
+ llmInclusionStatus: LlmInclusionStatus.Raw;
14
+ createdAt: string;
15
+ updatedAt: string;
12
16
  }
13
17
  }
@@ -37,11 +37,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.KnowledgeDocumentSearchResponse = void 0;
38
38
  const core = __importStar(require("../../../../core"));
39
39
  const EntityId_1 = require("../../commons/types/EntityId");
40
+ const LlmInclusionStatus_1 = require("../../commons/types/LlmInclusionStatus");
40
41
  const BaseKnowledgeDocument_1 = require("./BaseKnowledgeDocument");
41
42
  exports.KnowledgeDocumentSearchResponse = core.serialization
42
43
  .object({
43
44
  knowledgeDocumentId: EntityId_1.EntityId,
44
45
  knowledgeBaseVersionId: EntityId_1.EntityId.optional(),
45
46
  title: core.serialization.string().optional(),
47
+ llmInclusionStatus: LlmInclusionStatus_1.LlmInclusionStatus,
48
+ createdAt: core.serialization.date(),
49
+ updatedAt: core.serialization.date(),
46
50
  })
47
51
  .extend(BaseKnowledgeDocument_1.BaseKnowledgeDocument);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.5";
1
+ export declare const SDK_VERSION = "1.2.7";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.2.5";
4
+ exports.SDK_VERSION = "1.2.7";
@@ -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 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./types";
2
- export * from "./client";