mavenagi 0.0.0-alpha.7 → 0.0.0-alpha.9

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 (206) hide show
  1. package/README.md +3 -0
  2. package/api/resources/actions/client/Client.d.ts +12 -10
  3. package/api/resources/actions/client/Client.js +17 -15
  4. package/api/resources/actions/types/ActionBase.d.ts +7 -6
  5. package/api/resources/actions/types/ActionRequest.d.ts +5 -3
  6. package/api/resources/actions/types/ActionResponse.d.ts +5 -3
  7. package/api/resources/actions/types/Preconditions.d.ts +7 -0
  8. package/api/resources/actions/types/index.d.ts +1 -0
  9. package/api/resources/actions/types/index.js +1 -0
  10. package/api/resources/commons/types/AppUserIdentification.d.ts +2 -2
  11. package/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +1 -1
  12. package/api/resources/commons/types/AppUserRequest.d.ts +5 -0
  13. package/api/resources/commons/types/AppUserResponse.d.ts +5 -0
  14. package/api/resources/commons/types/index.d.ts +3 -1
  15. package/api/resources/commons/types/index.js +3 -1
  16. package/api/resources/conversation/client/Client.d.ts +5 -2
  17. package/api/resources/conversation/client/Client.js +15 -12
  18. package/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
  19. package/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
  20. package/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
  21. package/api/resources/conversation/types/index.d.ts +1 -2
  22. package/api/resources/conversation/types/index.js +1 -2
  23. package/api/resources/knowledge/client/Client.d.ts +43 -52
  24. package/api/resources/knowledge/client/Client.js +60 -71
  25. package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
  26. package/{dist/api/resources/knowledge/types/KnowledgeBase.d.ts → api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
  27. package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
  28. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
  29. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
  30. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
  31. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
  32. package/api/resources/knowledge/types/index.d.ts +4 -4
  33. package/api/resources/knowledge/types/index.js +4 -4
  34. package/api/resources/triggers/client/Client.d.ts +10 -10
  35. package/api/resources/triggers/client/Client.js +15 -15
  36. package/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
  37. package/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
  38. package/api/resources/users/client/Client.d.ts +4 -4
  39. package/api/resources/users/client/Client.js +7 -7
  40. package/dist/api/resources/actions/client/Client.d.ts +12 -10
  41. package/dist/api/resources/actions/client/Client.js +17 -15
  42. package/dist/api/resources/actions/types/ActionBase.d.ts +7 -6
  43. package/dist/api/resources/actions/types/ActionRequest.d.ts +5 -3
  44. package/dist/api/resources/actions/types/ActionResponse.d.ts +5 -3
  45. package/dist/api/resources/actions/types/Preconditions.d.ts +7 -0
  46. package/dist/api/resources/actions/types/index.d.ts +1 -0
  47. package/dist/api/resources/actions/types/index.js +1 -0
  48. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +2 -2
  49. package/dist/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +1 -1
  50. package/dist/api/resources/commons/types/AppUserRequest.d.ts +5 -0
  51. package/dist/api/resources/commons/types/AppUserResponse.d.ts +5 -0
  52. package/dist/api/resources/commons/types/index.d.ts +3 -1
  53. package/dist/api/resources/commons/types/index.js +3 -1
  54. package/dist/api/resources/conversation/client/Client.d.ts +5 -2
  55. package/dist/api/resources/conversation/client/Client.js +15 -12
  56. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -0
  57. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +2 -0
  58. package/dist/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
  59. package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
  60. package/dist/api/resources/conversation/types/index.d.ts +1 -2
  61. package/dist/api/resources/conversation/types/index.js +1 -2
  62. package/dist/api/resources/knowledge/client/Client.d.ts +43 -52
  63. package/dist/api/resources/knowledge/client/Client.js +60 -71
  64. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
  65. package/{api/resources/knowledge/types/KnowledgeBase.d.ts → dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
  66. package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
  67. package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
  68. package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
  69. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
  70. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
  71. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
  72. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
  73. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
  74. package/dist/api/resources/knowledge/types/index.d.ts +4 -4
  75. package/dist/api/resources/knowledge/types/index.js +4 -4
  76. package/dist/api/resources/triggers/client/Client.d.ts +10 -10
  77. package/dist/api/resources/triggers/client/Client.js +15 -15
  78. package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
  79. package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
  80. package/dist/api/resources/users/client/Client.d.ts +4 -4
  81. package/dist/api/resources/users/client/Client.js +7 -7
  82. package/dist/serialization/resources/actions/types/ActionBase.d.ts +2 -1
  83. package/dist/serialization/resources/actions/types/ActionBase.js +2 -1
  84. package/dist/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
  85. package/dist/serialization/resources/actions/types/ActionRequest.js +1 -1
  86. package/dist/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
  87. package/dist/serialization/resources/actions/types/ActionResponse.js +1 -1
  88. package/{serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → dist/serialization/resources/actions/types/Preconditions.d.ts} +3 -3
  89. package/dist/serialization/resources/actions/types/Preconditions.js +7 -0
  90. package/dist/serialization/resources/actions/types/index.d.ts +1 -0
  91. package/dist/serialization/resources/actions/types/index.js +1 -0
  92. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
  93. package/dist/serialization/resources/commons/types/AppUserIdentification.js +2 -2
  94. package/dist/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
  95. package/{serialization/resources/commons/types/AppUserIdentifyingProperty.js → dist/serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
  96. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
  97. package/dist/serialization/resources/commons/types/AppUserRequest.js +5 -0
  98. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
  99. package/dist/serialization/resources/commons/types/AppUserResponse.js +5 -0
  100. package/dist/serialization/resources/commons/types/index.d.ts +3 -1
  101. package/dist/serialization/resources/commons/types/index.js +3 -1
  102. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
  103. package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -0
  104. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
  105. package/dist/serialization/resources/conversation/types/ConversationResponse.js +2 -0
  106. package/{serialization/resources/conversation/types/ActionExecutionRequest.d.ts → dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
  107. package/{serialization/resources/conversation/types/ActionExecutionRequest.js → dist/serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
  108. package/dist/serialization/resources/conversation/types/index.d.ts +1 -2
  109. package/dist/serialization/resources/conversation/types/index.js +1 -2
  110. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
  111. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
  112. package/{serialization/resources/knowledge/types/KnowledgeBase.d.ts → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
  113. package/{serialization/resources/knowledge/types/KnowledgeBase.js → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
  114. package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
  115. package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
  116. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
  117. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
  118. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
  119. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
  120. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
  121. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
  122. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
  123. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
  124. package/dist/serialization/resources/knowledge/types/index.d.ts +4 -4
  125. package/dist/serialization/resources/knowledge/types/index.js +4 -4
  126. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  127. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  128. package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
  129. package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
  130. package/package.json +1 -1
  131. package/serialization/resources/actions/types/ActionBase.d.ts +2 -1
  132. package/serialization/resources/actions/types/ActionBase.js +2 -1
  133. package/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
  134. package/serialization/resources/actions/types/ActionRequest.js +1 -1
  135. package/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
  136. package/serialization/resources/actions/types/ActionResponse.js +1 -1
  137. package/{dist/serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → serialization/resources/actions/types/Preconditions.d.ts} +3 -3
  138. package/serialization/resources/actions/types/Preconditions.js +7 -0
  139. package/serialization/resources/actions/types/index.d.ts +1 -0
  140. package/serialization/resources/actions/types/index.js +1 -0
  141. package/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
  142. package/serialization/resources/commons/types/AppUserIdentification.js +2 -2
  143. package/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
  144. package/{dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js → serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
  145. package/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
  146. package/serialization/resources/commons/types/AppUserRequest.js +5 -0
  147. package/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
  148. package/serialization/resources/commons/types/AppUserResponse.js +5 -0
  149. package/serialization/resources/commons/types/index.d.ts +3 -1
  150. package/serialization/resources/commons/types/index.js +3 -1
  151. package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -0
  152. package/serialization/resources/conversation/types/ConversationRequest.js +2 -0
  153. package/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -0
  154. package/serialization/resources/conversation/types/ConversationResponse.js +2 -0
  155. package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.d.ts → serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
  156. package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.js → serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
  157. package/serialization/resources/conversation/types/index.d.ts +1 -2
  158. package/serialization/resources/conversation/types/index.js +1 -2
  159. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
  160. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
  161. package/{dist/serialization/resources/knowledge/types/KnowledgeBase.d.ts → serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
  162. package/{dist/serialization/resources/knowledge/types/KnowledgeBase.js → serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
  163. package/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
  164. package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
  165. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
  166. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
  167. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
  168. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
  169. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
  170. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
  171. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
  172. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
  173. package/serialization/resources/knowledge/types/index.d.ts +4 -4
  174. package/serialization/resources/knowledge/types/index.js +4 -4
  175. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  176. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  177. package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
  178. package/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
  179. package/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
  180. package/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
  181. package/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
  182. package/dist/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
  183. package/dist/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
  184. package/dist/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
  185. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
  186. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
  187. package/dist/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
  188. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
  189. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
  190. package/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
  191. package/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
  192. package/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
  193. package/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
  194. package/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
  195. /package/api/resources/{commons/types/AppUserIdentifyingProperty.js → actions/types/Preconditions.js} +0 -0
  196. /package/api/resources/{conversation/types/ActionExecutionRequest.js → commons/types/AppUserIdentifier.js} +0 -0
  197. /package/api/resources/{conversation/types/ActionExecutionResponse.js → commons/types/AppUserRequest.js} +0 -0
  198. /package/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserResponse.js} +0 -0
  199. /package/api/resources/{knowledge/types/KnowledgeBaseId.js → conversation/types/SubmitActionFormRequest.js} +0 -0
  200. /package/api/resources/knowledge/types/{KnowledgeDocumentId.js → KnowledgeBaseProperties.js} +0 -0
  201. /package/{dist/api/resources/commons/types/AppUserIdentifyingProperty.js → api/resources/knowledge/types/KnowledgeBaseRequest.js} +0 -0
  202. /package/{dist/api/resources/conversation/types/ActionExecutionRequest.js → api/resources/knowledge/types/KnowledgeBaseResponse.js} +0 -0
  203. /package/dist/api/resources/{conversation/types/ActionExecutionResponse.js → actions/types/Preconditions.js} +0 -0
  204. /package/dist/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserIdentifier.js} +0 -0
  205. /package/dist/api/resources/{knowledge/types/KnowledgeBaseId.js → commons/types/AppUserRequest.js} +0 -0
  206. /package/dist/api/resources/{knowledge/types/KnowledgeDocumentId.js → commons/types/AppUserResponse.js} +0 -0
package/README.md CHANGED
@@ -26,6 +26,9 @@ const client = new MavenAGIClient({
26
26
  agentId: "YOUR_AGENT_ID",
27
27
  });
28
28
  await client.conversation.initialize({
29
+ conversationId: {
30
+ referenceId: "string",
31
+ },
29
32
  messages: [{}],
30
33
  context: {},
31
34
  id: "string",
@@ -33,22 +33,24 @@ export declare class Actions {
33
33
  * @throws {@link MavenAGI.ServerError}
34
34
  *
35
35
  * @example
36
- * await client.actions.createOrUpdateAction({
37
- * entityId: {
36
+ * await client.actions.createOrUpdate({
37
+ * actionId: {
38
38
  * referenceId: "get-balance"
39
39
  * },
40
40
  * name: "Get the user's balance",
41
41
  * description: "This action calls an API to get the user's current balance.",
42
42
  * userInteractionRequired: false,
43
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
43
+ * preconditions: {
44
+ * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
45
+ * },
44
46
  * userFormParameters: []
45
47
  * })
46
48
  */
47
- createOrUpdateAction(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
49
+ createOrUpdate(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
48
50
  /**
49
51
  * Get an action by its supplied ID
50
52
  *
51
- * @param {string} referenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
53
+ * @param {string} actionReferenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
52
54
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
53
55
  *
54
56
  * @throws {@link MavenAGI.NotFoundError}
@@ -56,13 +58,13 @@ export declare class Actions {
56
58
  * @throws {@link MavenAGI.ServerError}
57
59
  *
58
60
  * @example
59
- * await client.actions.getAction("get-balance")
61
+ * await client.actions.get("get-balance")
60
62
  */
61
- getAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
63
+ get(actionReferenceId: string, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
62
64
  /**
63
65
  * Delete an action
64
66
  *
65
- * @param {string} referenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
67
+ * @param {string} actionReferenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
66
68
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
67
69
  *
68
70
  * @throws {@link MavenAGI.NotFoundError}
@@ -70,8 +72,8 @@ export declare class Actions {
70
72
  * @throws {@link MavenAGI.ServerError}
71
73
  *
72
74
  * @example
73
- * await client.actions.deleteAction("get-balance")
75
+ * await client.actions.delete("get-balance")
74
76
  */
75
- deleteAction(referenceId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
77
+ delete(actionReferenceId: string, requestOptions?: Actions.RequestOptions): Promise<void>;
76
78
  protected _getAuthorizationHeader(): Promise<string | undefined>;
77
79
  }
@@ -31,18 +31,20 @@ export class Actions {
31
31
  * @throws {@link MavenAGI.ServerError}
32
32
  *
33
33
  * @example
34
- * await client.actions.createOrUpdateAction({
35
- * entityId: {
34
+ * await client.actions.createOrUpdate({
35
+ * actionId: {
36
36
  * referenceId: "get-balance"
37
37
  * },
38
38
  * name: "Get the user's balance",
39
39
  * description: "This action calls an API to get the user's current balance.",
40
40
  * userInteractionRequired: false,
41
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
41
+ * preconditions: {
42
+ * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
43
+ * },
42
44
  * userFormParameters: []
43
45
  * })
44
46
  */
45
- createOrUpdateAction(request, requestOptions) {
47
+ createOrUpdate(request, requestOptions) {
46
48
  var _a, _b;
47
49
  return __awaiter(this, void 0, void 0, function* () {
48
50
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -54,7 +56,7 @@ export class Actions {
54
56
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
55
57
  "X-Fern-Language": "JavaScript",
56
58
  "X-Fern-SDK-Name": "mavenagi",
57
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
59
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
58
60
  "X-Fern-Runtime": core.RUNTIME.type,
59
61
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
62
  },
@@ -120,7 +122,7 @@ export class Actions {
120
122
  /**
121
123
  * Get an action by its supplied ID
122
124
  *
123
- * @param {string} referenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
125
+ * @param {string} actionReferenceId - The reference ID of the action to get. All other entity ID fields are inferred from the request.
124
126
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
125
127
  *
126
128
  * @throws {@link MavenAGI.NotFoundError}
@@ -128,13 +130,13 @@ export class Actions {
128
130
  * @throws {@link MavenAGI.ServerError}
129
131
  *
130
132
  * @example
131
- * await client.actions.getAction("get-balance")
133
+ * await client.actions.get("get-balance")
132
134
  */
133
- getAction(referenceId, requestOptions) {
135
+ get(actionReferenceId, requestOptions) {
134
136
  var _a, _b;
135
137
  return __awaiter(this, void 0, void 0, function* () {
136
138
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
137
- url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(referenceId)}`),
139
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
138
140
  method: "GET",
139
141
  headers: {
140
142
  Authorization: yield this._getAuthorizationHeader(),
@@ -142,7 +144,7 @@ export class Actions {
142
144
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
143
145
  "X-Fern-Language": "JavaScript",
144
146
  "X-Fern-SDK-Name": "mavenagi",
145
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
147
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
146
148
  "X-Fern-Runtime": core.RUNTIME.type,
147
149
  "X-Fern-Runtime-Version": core.RUNTIME.version,
148
150
  },
@@ -207,7 +209,7 @@ export class Actions {
207
209
  /**
208
210
  * Delete an action
209
211
  *
210
- * @param {string} referenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
212
+ * @param {string} actionReferenceId - The reference ID of the action to unregister. All other entity ID fields are inferred from the request.
211
213
  * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
212
214
  *
213
215
  * @throws {@link MavenAGI.NotFoundError}
@@ -215,13 +217,13 @@ export class Actions {
215
217
  * @throws {@link MavenAGI.ServerError}
216
218
  *
217
219
  * @example
218
- * await client.actions.deleteAction("get-balance")
220
+ * await client.actions.delete("get-balance")
219
221
  */
220
- deleteAction(referenceId, requestOptions) {
222
+ delete(actionReferenceId, requestOptions) {
221
223
  var _a, _b;
222
224
  return __awaiter(this, void 0, void 0, function* () {
223
225
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
224
- url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(referenceId)}`),
226
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
225
227
  method: "DELETE",
226
228
  headers: {
227
229
  Authorization: yield this._getAuthorizationHeader(),
@@ -229,7 +231,7 @@ export class Actions {
229
231
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
230
232
  "X-Fern-Language": "JavaScript",
231
233
  "X-Fern-SDK-Name": "mavenagi",
232
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
234
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
233
235
  "X-Fern-Runtime": core.RUNTIME.type,
234
236
  "X-Fern-Runtime-Version": core.RUNTIME.version,
235
237
  },
@@ -3,15 +3,16 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface ActionBase {
6
- /** The name of the action */
6
+ /** The name of the action. This is displayed to the end user as part of forms when user interaction is required. It is also used to help Maven decide if the action is relevant to a conversation. */
7
7
  name: string;
8
- /** The description of the action. This helps Maven decide when to trigger the action and is not displayed directly to the end user. */
8
+ /** The description of the action. This helps Maven decide if the action is relevant to a conversation and is not displayed directly to the end user. */
9
9
  description: string;
10
- /** Whether the action requires user interaction to execute */
10
+ /** Whether the action requires user interaction to execute. If false, and all of the required action parameters are known, the LLM may call the action automatically. If true, an conversations ask call will return a BotActionFormResponse which must be submitted by an API caller. API callers must display a button with the buttonName label to confirm the user's intent. */
11
11
  userInteractionRequired: boolean;
12
- /** When user interaction is required, the name of the button that is shown to the end user to execute the action */
12
+ /** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action */
13
13
  buttonName?: string;
14
- /** The names of the user context fields required by the action */
15
- requiredUserContextFieldNames: Set<string>;
14
+ /** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
15
+ preconditions: MavenAGI.Preconditions;
16
+ /** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
16
17
  userFormParameters: MavenAGI.ActionParameter[];
17
18
  }
@@ -5,17 +5,19 @@ import * as MavenAGI from "../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * entityId: {
8
+ * actionId: {
9
9
  * referenceId: "get-balance"
10
10
  * },
11
11
  * name: "Get the user's balance",
12
12
  * description: "This action calls an API to get the user's current balance.",
13
13
  * userInteractionRequired: false,
14
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
14
+ * preconditions: {
15
+ * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
16
+ * },
15
17
  * userFormParameters: []
16
18
  * }
17
19
  */
18
20
  export interface ActionRequest extends MavenAGI.ActionBase {
19
21
  /** ID that uniquely identifies this action */
20
- entityId: MavenAGI.EntityIdBase;
22
+ actionId: MavenAGI.EntityIdBase;
21
23
  }
@@ -5,7 +5,7 @@ import * as MavenAGI from "../../../index";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * entityId: {
8
+ * actionId: {
9
9
  * referenceId: "get-balance",
10
10
  * appId: "my-billing-system",
11
11
  * organizationId: "acme",
@@ -15,11 +15,13 @@ import * as MavenAGI from "../../../index";
15
15
  * name: "Get the user's balance",
16
16
  * description: "This action calls an API to get the user's current balance.",
17
17
  * userInteractionRequired: false,
18
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"]),
18
+ * preconditions: {
19
+ * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
20
+ * },
19
21
  * userFormParameters: []
20
22
  * }
21
23
  */
22
24
  export interface ActionResponse extends MavenAGI.ActionBase {
23
25
  /** ID that uniquely identifies this action */
24
- entityId: MavenAGI.EntityId;
26
+ actionId: MavenAGI.EntityId;
25
27
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface Preconditions {
5
+ /** The names of the user context fields that must be present in order for this object to be considered relevant to a conversation. */
6
+ requiredUserContextFieldNames: Set<string>;
7
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./Preconditions";
1
2
  export * from "./ActionBase";
2
3
  export * from "./ActionParameter";
3
4
  export * from "./ActionRequest";
@@ -1,3 +1,4 @@
1
+ export * from "./Preconditions";
1
2
  export * from "./ActionBase";
2
3
  export * from "./ActionParameter";
3
4
  export * from "./ActionRequest";
@@ -3,6 +3,6 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface AppUserIdentification {
6
- /** At least one identifying property must be provided. etc */
7
- identifiers: MavenAGI.AppUserIdentifyingProperty[];
6
+ /** At least one identifying property must be provided */
7
+ identifiers: MavenAGI.AppUserIdentifier[];
8
8
  }
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
- export interface AppUserIdentifyingProperty {
5
+ export interface AppUserIdentifier {
6
6
  /** The identifying property text */
7
7
  value: string;
8
8
  userIdentifyingPropertyType: MavenAGI.AppUserIdentifyingPropertyType;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export declare type AppUserRequest = MavenAGI.AppUser;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export declare type AppUserResponse = MavenAGI.AppUser;
@@ -6,6 +6,8 @@ export * from "./User";
6
6
  export * from "./FeedbackType";
7
7
  export * from "./Feedback";
8
8
  export * from "./AppUserIdentification";
9
- export * from "./AppUserIdentifyingProperty";
9
+ export * from "./AppUserIdentifier";
10
10
  export * from "./AppUserIdentifyingPropertyType";
11
11
  export * from "./AppUser";
12
+ export * from "./AppUserRequest";
13
+ export * from "./AppUserResponse";
@@ -6,6 +6,8 @@ export * from "./User";
6
6
  export * from "./FeedbackType";
7
7
  export * from "./Feedback";
8
8
  export * from "./AppUserIdentification";
9
- export * from "./AppUserIdentifyingProperty";
9
+ export * from "./AppUserIdentifier";
10
10
  export * from "./AppUserIdentifyingPropertyType";
11
11
  export * from "./AppUser";
12
+ export * from "./AppUserRequest";
13
+ export * from "./AppUserResponse";
@@ -34,6 +34,9 @@ export declare class Conversation {
34
34
  *
35
35
  * @example
36
36
  * await client.conversation.initialize({
37
+ * conversationId: {
38
+ * referenceId: "string"
39
+ * },
37
40
  * messages: [{}],
38
41
  * context: {},
39
42
  * id: "string",
@@ -144,7 +147,7 @@ export declare class Conversation {
144
147
  * Submit a filled out action form
145
148
  *
146
149
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
147
- * @param {MavenAGI.ActionExecutionRequest} request
150
+ * @param {MavenAGI.SubmitActionFormRequest} request
148
151
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
149
152
  *
150
153
  * @throws {@link MavenAGI.NotFoundError}
@@ -171,7 +174,7 @@ export declare class Conversation {
171
174
  * }
172
175
  * })
173
176
  */
174
- submitActionForm(conversationId: string, request: MavenAGI.ActionExecutionRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ActionExecutionResponse>;
177
+ submitActionForm(conversationId: string, request: MavenAGI.SubmitActionFormRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
175
178
  /**
176
179
  * Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
177
180
  *
@@ -32,6 +32,9 @@ export class Conversation {
32
32
  *
33
33
  * @example
34
34
  * await client.conversation.initialize({
35
+ * conversationId: {
36
+ * referenceId: "string"
37
+ * },
35
38
  * messages: [{}],
36
39
  * context: {},
37
40
  * id: "string",
@@ -54,7 +57,7 @@ export class Conversation {
54
57
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
55
58
  "X-Fern-Language": "JavaScript",
56
59
  "X-Fern-SDK-Name": "mavenagi",
57
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
60
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
58
61
  "X-Fern-Runtime": core.RUNTIME.type,
59
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
63
  },
@@ -142,7 +145,7 @@ export class Conversation {
142
145
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
143
146
  "X-Fern-Language": "JavaScript",
144
147
  "X-Fern-SDK-Name": "mavenagi",
145
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
148
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
146
149
  "X-Fern-Runtime": core.RUNTIME.type,
147
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
148
151
  },
@@ -235,7 +238,7 @@ export class Conversation {
235
238
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
236
239
  "X-Fern-Language": "JavaScript",
237
240
  "X-Fern-SDK-Name": "mavenagi",
238
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
241
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
239
242
  "X-Fern-Runtime": core.RUNTIME.type,
240
243
  "X-Fern-Runtime-Version": core.RUNTIME.version,
241
244
  },
@@ -331,7 +334,7 @@ export class Conversation {
331
334
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
332
335
  "X-Fern-Language": "JavaScript",
333
336
  "X-Fern-SDK-Name": "mavenagi",
334
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
337
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
335
338
  "X-Fern-Runtime": core.RUNTIME.type,
336
339
  "X-Fern-Runtime-Version": core.RUNTIME.version,
337
340
  },
@@ -409,7 +412,7 @@ export class Conversation {
409
412
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
410
413
  "X-Fern-Language": "JavaScript",
411
414
  "X-Fern-SDK-Name": "mavenagi",
412
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
415
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
413
416
  "X-Fern-Runtime": core.RUNTIME.type,
414
417
  "X-Fern-Runtime-Version": core.RUNTIME.version,
415
418
  },
@@ -511,7 +514,7 @@ export class Conversation {
511
514
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
512
515
  "X-Fern-Language": "JavaScript",
513
516
  "X-Fern-SDK-Name": "mavenagi",
514
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
517
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
515
518
  "X-Fern-Runtime": core.RUNTIME.type,
516
519
  "X-Fern-Runtime-Version": core.RUNTIME.version,
517
520
  },
@@ -607,7 +610,7 @@ export class Conversation {
607
610
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
608
611
  "X-Fern-Language": "JavaScript",
609
612
  "X-Fern-SDK-Name": "mavenagi",
610
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
613
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
611
614
  "X-Fern-Runtime": core.RUNTIME.type,
612
615
  "X-Fern-Runtime-Version": core.RUNTIME.version,
613
616
  },
@@ -669,7 +672,7 @@ export class Conversation {
669
672
  * Submit a filled out action form
670
673
  *
671
674
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
672
- * @param {MavenAGI.ActionExecutionRequest} request
675
+ * @param {MavenAGI.SubmitActionFormRequest} request
673
676
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
674
677
  *
675
678
  * @throws {@link MavenAGI.NotFoundError}
@@ -708,18 +711,18 @@ export class Conversation {
708
711
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
709
712
  "X-Fern-Language": "JavaScript",
710
713
  "X-Fern-SDK-Name": "mavenagi",
711
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
714
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
712
715
  "X-Fern-Runtime": core.RUNTIME.type,
713
716
  "X-Fern-Runtime-Version": core.RUNTIME.version,
714
717
  },
715
718
  contentType: "application/json",
716
- body: yield serializers.ActionExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
719
+ body: yield serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
717
720
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
718
721
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
719
722
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
720
723
  });
721
724
  if (_response.ok) {
722
- return yield serializers.ActionExecutionResponse.parseOrThrow(_response.body, {
725
+ return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
723
726
  unrecognizedObjectKeys: "passthrough",
724
727
  allowUnrecognizedUnionMembers: true,
725
728
  allowUnrecognizedEnumValues: true,
@@ -799,7 +802,7 @@ export class Conversation {
799
802
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
800
803
  "X-Fern-Language": "JavaScript",
801
804
  "X-Fern-SDK-Name": "mavenagi",
802
- "X-Fern-SDK-Version": "0.0.0-alpha.7",
805
+ "X-Fern-SDK-Version": "0.0.0-alpha.9",
803
806
  "X-Fern-Runtime": core.RUNTIME.type,
804
807
  "X-Fern-Runtime-Version": core.RUNTIME.version,
805
808
  },
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface ConversationRequest extends MavenAGI.ConversationBase {
6
+ /** An externally supplied ID to uniquely identify this conversation */
7
+ conversationId: MavenAGI.EntityIdBase;
6
8
  /** The messages in the conversation */
7
9
  messages: MavenAGI.ConversationMessageRequest[];
8
10
  /** The context of the conversation */
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface ConversationResponse extends MavenAGI.ConversationBase {
6
+ /** The ID that uniquely identifies this conversation */
7
+ conversationId: MavenAGI.EntityId;
6
8
  /** The messages in the conversation */
7
9
  messages: MavenAGI.ConversationMessageResponse[];
8
10
  /** The context of the conversation */
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
- export interface ActionExecutionRequest {
5
+ export interface SubmitActionFormRequest {
6
6
  actionFormId: string;
7
7
  userContext: MavenAGI.User;
8
8
  /** Map of parameter names to values */
@@ -16,8 +16,7 @@ export * from "./BotResponse";
16
16
  export * from "./BotTextResponse";
17
17
  export * from "./BotActionFormResponse";
18
18
  export * from "./ActionFormField";
19
- export * from "./ActionExecutionRequest";
20
- export * from "./ActionExecutionResponse";
19
+ export * from "./SubmitActionFormRequest";
21
20
  export * from "./ConversationContext";
22
21
  export * from "./ConversationMessageContext";
23
22
  export * from "./UserConversationMessageType";
@@ -16,8 +16,7 @@ export * from "./BotResponse";
16
16
  export * from "./BotTextResponse";
17
17
  export * from "./BotActionFormResponse";
18
18
  export * from "./ActionFormField";
19
- export * from "./ActionExecutionRequest";
20
- export * from "./ActionExecutionResponse";
19
+ export * from "./SubmitActionFormRequest";
21
20
  export * from "./ConversationContext";
22
21
  export * from "./ConversationMessageContext";
23
22
  export * from "./UserConversationMessageType";