mavenagi 0.0.0-alpha.6 → 0.0.0-alpha.8

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 (196) hide show
  1. package/Client.d.ts +2 -2
  2. package/README.md +2 -2
  3. package/api/resources/actions/client/Client.d.ts +14 -12
  4. package/api/resources/actions/client/Client.js +23 -21
  5. package/api/resources/actions/types/ActionBase.d.ts +7 -6
  6. package/api/resources/actions/types/ActionRequest.d.ts +5 -3
  7. package/api/resources/actions/types/ActionResponse.d.ts +5 -3
  8. package/api/resources/actions/types/Preconditions.d.ts +7 -0
  9. package/api/resources/actions/types/index.d.ts +1 -0
  10. package/api/resources/actions/types/index.js +1 -0
  11. package/api/resources/commons/types/AppUserIdentification.d.ts +2 -2
  12. package/api/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +1 -1
  13. package/api/resources/commons/types/AppUserRequest.d.ts +5 -0
  14. package/api/resources/commons/types/AppUserResponse.d.ts +5 -0
  15. package/api/resources/commons/types/index.d.ts +3 -1
  16. package/api/resources/commons/types/index.js +3 -1
  17. package/api/resources/conversation/client/Client.d.ts +4 -4
  18. package/api/resources/conversation/client/Client.js +30 -30
  19. package/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
  20. package/api/resources/conversation/types/index.d.ts +1 -2
  21. package/api/resources/conversation/types/index.js +1 -2
  22. package/api/resources/knowledge/client/Client.d.ts +45 -54
  23. package/api/resources/knowledge/client/Client.js +74 -85
  24. package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
  25. package/{dist/api/resources/knowledge/types/KnowledgeBase.d.ts → api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
  26. package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
  27. package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
  28. package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
  29. package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
  30. package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
  31. package/api/resources/knowledge/types/index.d.ts +4 -4
  32. package/api/resources/knowledge/types/index.js +4 -4
  33. package/api/resources/triggers/client/Client.d.ts +12 -12
  34. package/api/resources/triggers/client/Client.js +21 -21
  35. package/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
  36. package/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
  37. package/api/resources/users/client/Client.d.ts +6 -6
  38. package/api/resources/users/client/Client.js +11 -11
  39. package/dist/Client.d.ts +2 -2
  40. package/dist/api/resources/actions/client/Client.d.ts +14 -12
  41. package/dist/api/resources/actions/client/Client.js +23 -21
  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 +4 -4
  55. package/dist/api/resources/conversation/client/Client.js +30 -30
  56. package/dist/api/resources/conversation/types/{ActionExecutionRequest.d.ts → SubmitActionFormRequest.d.ts} +1 -1
  57. package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
  58. package/dist/api/resources/conversation/types/index.d.ts +1 -2
  59. package/dist/api/resources/conversation/types/index.js +1 -2
  60. package/dist/api/resources/knowledge/client/Client.d.ts +45 -54
  61. package/dist/api/resources/knowledge/client/Client.js +74 -85
  62. package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +2 -3
  63. package/{api/resources/knowledge/types/KnowledgeBase.d.ts → dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +2 -2
  64. package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
  65. package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
  66. package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
  67. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
  68. package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
  69. package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +6 -2
  70. package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +13 -0
  71. package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +16 -0
  72. package/dist/api/resources/knowledge/types/index.d.ts +4 -4
  73. package/dist/api/resources/knowledge/types/index.js +4 -4
  74. package/dist/api/resources/triggers/client/Client.d.ts +12 -12
  75. package/dist/api/resources/triggers/client/Client.js +21 -21
  76. package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +2 -2
  77. package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +2 -2
  78. package/dist/api/resources/users/client/Client.d.ts +6 -6
  79. package/dist/api/resources/users/client/Client.js +11 -11
  80. package/dist/serialization/resources/actions/types/ActionBase.d.ts +2 -1
  81. package/dist/serialization/resources/actions/types/ActionBase.js +2 -1
  82. package/dist/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
  83. package/dist/serialization/resources/actions/types/ActionRequest.js +1 -1
  84. package/dist/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
  85. package/dist/serialization/resources/actions/types/ActionResponse.js +1 -1
  86. package/{serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → dist/serialization/resources/actions/types/Preconditions.d.ts} +3 -3
  87. package/dist/serialization/resources/actions/types/Preconditions.js +7 -0
  88. package/dist/serialization/resources/actions/types/index.d.ts +1 -0
  89. package/dist/serialization/resources/actions/types/index.js +1 -0
  90. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
  91. package/dist/serialization/resources/commons/types/AppUserIdentification.js +2 -2
  92. package/dist/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
  93. package/{serialization/resources/commons/types/AppUserIdentifyingProperty.js → dist/serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
  94. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
  95. package/dist/serialization/resources/commons/types/AppUserRequest.js +5 -0
  96. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
  97. package/dist/serialization/resources/commons/types/AppUserResponse.js +5 -0
  98. package/dist/serialization/resources/commons/types/index.d.ts +3 -1
  99. package/dist/serialization/resources/commons/types/index.js +3 -1
  100. package/{serialization/resources/conversation/types/ActionExecutionRequest.d.ts → dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
  101. package/{serialization/resources/conversation/types/ActionExecutionRequest.js → dist/serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
  102. package/dist/serialization/resources/conversation/types/index.d.ts +1 -2
  103. package/dist/serialization/resources/conversation/types/index.js +1 -2
  104. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
  105. package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
  106. package/{serialization/resources/knowledge/types/KnowledgeBase.d.ts → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
  107. package/{serialization/resources/knowledge/types/KnowledgeBase.js → dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
  108. package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
  109. package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
  110. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
  111. package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
  112. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
  113. package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
  114. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
  115. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
  116. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
  117. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
  118. package/dist/serialization/resources/knowledge/types/index.d.ts +4 -4
  119. package/dist/serialization/resources/knowledge/types/index.js +4 -4
  120. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  121. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  122. package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
  123. package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
  124. package/package.json +1 -1
  125. package/serialization/resources/actions/types/ActionBase.d.ts +2 -1
  126. package/serialization/resources/actions/types/ActionBase.js +2 -1
  127. package/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
  128. package/serialization/resources/actions/types/ActionRequest.js +1 -1
  129. package/serialization/resources/actions/types/ActionResponse.d.ts +1 -1
  130. package/serialization/resources/actions/types/ActionResponse.js +1 -1
  131. package/{dist/serialization/resources/knowledge/types/KnowledgeBaseId.d.ts → serialization/resources/actions/types/Preconditions.d.ts} +3 -3
  132. package/serialization/resources/actions/types/Preconditions.js +7 -0
  133. package/serialization/resources/actions/types/index.d.ts +1 -0
  134. package/serialization/resources/actions/types/index.js +1 -0
  135. package/serialization/resources/commons/types/AppUserIdentification.d.ts +2 -2
  136. package/serialization/resources/commons/types/AppUserIdentification.js +2 -2
  137. package/serialization/resources/commons/types/{AppUserIdentifyingProperty.d.ts → AppUserIdentifier.d.ts} +2 -2
  138. package/{dist/serialization/resources/commons/types/AppUserIdentifyingProperty.js → serialization/resources/commons/types/AppUserIdentifier.js} +1 -1
  139. package/serialization/resources/commons/types/AppUserRequest.d.ts +11 -0
  140. package/serialization/resources/commons/types/AppUserRequest.js +5 -0
  141. package/serialization/resources/commons/types/AppUserResponse.d.ts +11 -0
  142. package/serialization/resources/commons/types/AppUserResponse.js +5 -0
  143. package/serialization/resources/commons/types/index.d.ts +3 -1
  144. package/serialization/resources/commons/types/index.js +3 -1
  145. package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.d.ts → serialization/resources/conversation/types/SubmitActionFormRequest.d.ts} +2 -2
  146. package/{dist/serialization/resources/conversation/types/ActionExecutionRequest.js → serialization/resources/conversation/types/SubmitActionFormRequest.js} +1 -1
  147. package/serialization/resources/conversation/types/index.d.ts +1 -2
  148. package/serialization/resources/conversation/types/index.js +1 -2
  149. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +3 -4
  150. package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +4 -7
  151. package/{dist/serialization/resources/knowledge/types/KnowledgeBase.d.ts → serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts} +4 -5
  152. package/{dist/serialization/resources/knowledge/types/KnowledgeBase.js → serialization/resources/knowledge/types/KnowledgeBaseProperties.js} +3 -6
  153. package/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
  154. package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
  155. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
  156. package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
  157. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +0 -1
  158. package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +0 -1
  159. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +3 -1
  160. package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +3 -1
  161. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +2 -0
  162. package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -0
  163. package/serialization/resources/knowledge/types/index.d.ts +4 -4
  164. package/serialization/resources/knowledge/types/index.js +4 -4
  165. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  166. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  167. package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +1 -1
  168. package/serialization/resources/triggers/types/EventTriggerResponse.js +1 -1
  169. package/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
  170. package/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
  171. package/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
  172. package/dist/api/resources/conversation/types/ActionExecutionResponse.d.ts +0 -7
  173. package/dist/api/resources/knowledge/types/KnowledgeBaseId.d.ts +0 -7
  174. package/dist/api/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -9
  175. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
  176. package/dist/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
  177. package/dist/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
  178. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
  179. package/dist/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
  180. package/serialization/resources/conversation/types/ActionExecutionResponse.d.ts +0 -12
  181. package/serialization/resources/conversation/types/ActionExecutionResponse.js +0 -7
  182. package/serialization/resources/knowledge/types/KnowledgeBaseId.js +0 -7
  183. package/serialization/resources/knowledge/types/KnowledgeDocumentId.d.ts +0 -13
  184. package/serialization/resources/knowledge/types/KnowledgeDocumentId.js +0 -8
  185. /package/api/resources/{commons/types/AppUserIdentifyingProperty.js → actions/types/Preconditions.js} +0 -0
  186. /package/api/resources/{conversation/types/ActionExecutionRequest.js → commons/types/AppUserIdentifier.js} +0 -0
  187. /package/api/resources/{conversation/types/ActionExecutionResponse.js → commons/types/AppUserRequest.js} +0 -0
  188. /package/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserResponse.js} +0 -0
  189. /package/api/resources/{knowledge/types/KnowledgeBaseId.js → conversation/types/SubmitActionFormRequest.js} +0 -0
  190. /package/api/resources/knowledge/types/{KnowledgeDocumentId.js → KnowledgeBaseProperties.js} +0 -0
  191. /package/{dist/api/resources/commons/types/AppUserIdentifyingProperty.js → api/resources/knowledge/types/KnowledgeBaseRequest.js} +0 -0
  192. /package/{dist/api/resources/conversation/types/ActionExecutionRequest.js → api/resources/knowledge/types/KnowledgeBaseResponse.js} +0 -0
  193. /package/dist/api/resources/{conversation/types/ActionExecutionResponse.js → actions/types/Preconditions.js} +0 -0
  194. /package/dist/api/resources/{knowledge/types/KnowledgeBase.js → commons/types/AppUserIdentifier.js} +0 -0
  195. /package/dist/api/resources/{knowledge/types/KnowledgeBaseId.js → commons/types/AppUserRequest.js} +0 -0
  196. /package/dist/api/resources/{knowledge/types/KnowledgeDocumentId.js → commons/types/AppUserResponse.js} +0 -0
@@ -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";
@@ -9,8 +9,8 @@ export declare namespace Conversation {
9
9
  environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
10
10
  appId?: core.Supplier<string | undefined>;
11
11
  appSecret?: core.Supplier<string | undefined>;
12
- xOrganizationId: core.Supplier<string>;
13
- xAgentId: core.Supplier<string>;
12
+ organizationId: core.Supplier<string>;
13
+ agentId: core.Supplier<string>;
14
14
  fetcher?: core.FetchFunction;
15
15
  }
16
16
  interface RequestOptions {
@@ -144,7 +144,7 @@ export declare class Conversation {
144
144
  * Submit a filled out action form
145
145
  *
146
146
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
147
- * @param {MavenAGI.ActionExecutionRequest} request
147
+ * @param {MavenAGI.SubmitActionFormRequest} request
148
148
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
149
149
  *
150
150
  * @throws {@link MavenAGI.NotFoundError}
@@ -171,7 +171,7 @@ export declare class Conversation {
171
171
  * }
172
172
  * })
173
173
  */
174
- submitActionForm(conversationId: string, request: MavenAGI.ActionExecutionRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ActionExecutionResponse>;
174
+ submitActionForm(conversationId: string, request: MavenAGI.SubmitActionFormRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
175
175
  /**
176
176
  * Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
177
177
  *
@@ -50,11 +50,11 @@ export class Conversation {
50
50
  method: "POST",
51
51
  headers: {
52
52
  Authorization: yield this._getAuthorizationHeader(),
53
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
54
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
53
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
54
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
55
55
  "X-Fern-Language": "JavaScript",
56
56
  "X-Fern-SDK-Name": "mavenagi",
57
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
57
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
58
58
  "X-Fern-Runtime": core.RUNTIME.type,
59
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
60
  },
@@ -138,11 +138,11 @@ export class Conversation {
138
138
  method: "GET",
139
139
  headers: {
140
140
  Authorization: yield this._getAuthorizationHeader(),
141
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
142
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
141
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
142
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
143
143
  "X-Fern-Language": "JavaScript",
144
144
  "X-Fern-SDK-Name": "mavenagi",
145
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
145
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
146
146
  "X-Fern-Runtime": core.RUNTIME.type,
147
147
  "X-Fern-Runtime-Version": core.RUNTIME.version,
148
148
  },
@@ -231,11 +231,11 @@ export class Conversation {
231
231
  method: "POST",
232
232
  headers: {
233
233
  Authorization: yield this._getAuthorizationHeader(),
234
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
235
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
234
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
235
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
236
236
  "X-Fern-Language": "JavaScript",
237
237
  "X-Fern-SDK-Name": "mavenagi",
238
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
238
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
239
239
  "X-Fern-Runtime": core.RUNTIME.type,
240
240
  "X-Fern-Runtime-Version": core.RUNTIME.version,
241
241
  },
@@ -327,11 +327,11 @@ export class Conversation {
327
327
  method: "POST",
328
328
  headers: {
329
329
  Authorization: yield this._getAuthorizationHeader(),
330
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
331
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
330
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
331
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
332
332
  "X-Fern-Language": "JavaScript",
333
333
  "X-Fern-SDK-Name": "mavenagi",
334
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
334
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
335
335
  "X-Fern-Runtime": core.RUNTIME.type,
336
336
  "X-Fern-Runtime-Version": core.RUNTIME.version,
337
337
  },
@@ -405,11 +405,11 @@ export class Conversation {
405
405
  method: "POST",
406
406
  headers: {
407
407
  Authorization: yield this._getAuthorizationHeader(),
408
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
409
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
408
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
409
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
410
410
  "X-Fern-Language": "JavaScript",
411
411
  "X-Fern-SDK-Name": "mavenagi",
412
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
412
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
413
413
  "X-Fern-Runtime": core.RUNTIME.type,
414
414
  "X-Fern-Runtime-Version": core.RUNTIME.version,
415
415
  },
@@ -507,11 +507,11 @@ export class Conversation {
507
507
  method: "POST",
508
508
  headers: {
509
509
  Authorization: yield this._getAuthorizationHeader(),
510
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
511
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
510
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
511
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
512
512
  "X-Fern-Language": "JavaScript",
513
513
  "X-Fern-SDK-Name": "mavenagi",
514
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
514
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
515
515
  "X-Fern-Runtime": core.RUNTIME.type,
516
516
  "X-Fern-Runtime-Version": core.RUNTIME.version,
517
517
  },
@@ -603,11 +603,11 @@ export class Conversation {
603
603
  method: "POST",
604
604
  headers: {
605
605
  Authorization: yield this._getAuthorizationHeader(),
606
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
607
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
606
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
607
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
608
608
  "X-Fern-Language": "JavaScript",
609
609
  "X-Fern-SDK-Name": "mavenagi",
610
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
610
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
611
611
  "X-Fern-Runtime": core.RUNTIME.type,
612
612
  "X-Fern-Runtime-Version": core.RUNTIME.version,
613
613
  },
@@ -669,7 +669,7 @@ export class Conversation {
669
669
  * Submit a filled out action form
670
670
  *
671
671
  * @param {string} conversationId - The ID of a conversation the form being submitted belongs to
672
- * @param {MavenAGI.ActionExecutionRequest} request
672
+ * @param {MavenAGI.SubmitActionFormRequest} request
673
673
  * @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
674
674
  *
675
675
  * @throws {@link MavenAGI.NotFoundError}
@@ -704,22 +704,22 @@ export class Conversation {
704
704
  method: "POST",
705
705
  headers: {
706
706
  Authorization: yield this._getAuthorizationHeader(),
707
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
708
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
707
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
708
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
709
709
  "X-Fern-Language": "JavaScript",
710
710
  "X-Fern-SDK-Name": "mavenagi",
711
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
711
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
712
712
  "X-Fern-Runtime": core.RUNTIME.type,
713
713
  "X-Fern-Runtime-Version": core.RUNTIME.version,
714
714
  },
715
715
  contentType: "application/json",
716
- body: yield serializers.ActionExecutionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
716
+ body: yield serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
717
717
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
718
718
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
719
719
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
720
720
  });
721
721
  if (_response.ok) {
722
- return yield serializers.ActionExecutionResponse.parseOrThrow(_response.body, {
722
+ return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
723
723
  unrecognizedObjectKeys: "passthrough",
724
724
  allowUnrecognizedUnionMembers: true,
725
725
  allowUnrecognizedEnumValues: true,
@@ -795,11 +795,11 @@ export class Conversation {
795
795
  method: "POST",
796
796
  headers: {
797
797
  Authorization: yield this._getAuthorizationHeader(),
798
- "X-Organization-Id": yield core.Supplier.get(this._options.xOrganizationId),
799
- "X-Agent-Id": yield core.Supplier.get(this._options.xAgentId),
798
+ "X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
799
+ "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
800
800
  "X-Fern-Language": "JavaScript",
801
801
  "X-Fern-SDK-Name": "mavenagi",
802
- "X-Fern-SDK-Version": "0.0.0-alpha.6",
802
+ "X-Fern-SDK-Version": "0.0.0-alpha.8",
803
803
  "X-Fern-Runtime": core.RUNTIME.type,
804
804
  "X-Fern-Runtime-Version": core.RUNTIME.version,
805
805
  },
@@ -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 */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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";
@@ -9,8 +9,8 @@ export declare namespace Knowledge {
9
9
  environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
10
10
  appId?: core.Supplier<string | undefined>;
11
11
  appSecret?: core.Supplier<string | undefined>;
12
- xOrganizationId: core.Supplier<string>;
13
- xAgentId: core.Supplier<string>;
12
+ organizationId: core.Supplier<string>;
13
+ agentId: core.Supplier<string>;
14
14
  fetcher?: core.FetchFunction;
15
15
  }
16
16
  interface RequestOptions {
@@ -23,9 +23,9 @@ export declare class Knowledge {
23
23
  protected readonly _options: Knowledge.Options;
24
24
  constructor(_options: Knowledge.Options);
25
25
  /**
26
- * Create a new knowledge base.
26
+ * Update a knowledge base or create it if it doesn't exist.
27
27
  *
28
- * @param {MavenAGI.KnowledgeBase} request
28
+ * @param {MavenAGI.KnowledgeBaseRequest} request
29
29
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
30
30
  *
31
31
  * @throws {@link MavenAGI.NotFoundError}
@@ -33,18 +33,19 @@ export declare class Knowledge {
33
33
  * @throws {@link MavenAGI.ServerError}
34
34
  *
35
35
  * @example
36
- * await client.knowledge.createKnowledgeBase({
37
- * displayName: "string",
38
- * type: MavenAGI.KnowledgeBaseType.Api,
39
- * url: "string",
40
- * knowledgeBaseId: "string"
36
+ * await client.knowledge.createOrUpdateKnowledgeBase({
37
+ * knowledgeBaseId: {
38
+ * referenceId: "help-center"
39
+ * },
40
+ * name: "Help center",
41
+ * type: MavenAGI.KnowledgeBaseType.Api
41
42
  * })
42
43
  */
43
- createKnowledgeBase(request: MavenAGI.KnowledgeBase, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBase>;
44
+ createOrUpdateKnowledgeBase(request: MavenAGI.KnowledgeBaseRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseResponse>;
44
45
  /**
45
- * Get an existing knowledge base.
46
+ * Get an existing knowledge base by its supplied ID
46
47
  *
47
- * @param {string} knowledgeBaseId - The ID of the knowledge base to get
48
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to get. All other entity ID fields are inferred from the request.
48
49
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
49
50
  *
50
51
  * @throws {@link MavenAGI.NotFoundError}
@@ -52,12 +53,13 @@ export declare class Knowledge {
52
53
  * @throws {@link MavenAGI.ServerError}
53
54
  *
54
55
  * @example
55
- * await client.knowledge.getKnowledgeBase("string")
56
+ * await client.knowledge.getKnowledgeBase("help-center")
56
57
  */
57
- getKnowledgeBase(knowledgeBaseId: string, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBase>;
58
+ getKnowledgeBase(knowledgeBaseReferenceId: string, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseResponse>;
58
59
  /**
59
60
  * Create a new knowledge base version. Only supported on API knowledge bases. Will throw an exception if there is an existing version in progress.
60
61
  *
62
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to create a version for. All other entity ID fields are inferred from the request.
61
63
  * @param {MavenAGI.KnowledgeBaseVersion} request
62
64
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
63
65
  *
@@ -66,16 +68,15 @@ export declare class Knowledge {
66
68
  * @throws {@link MavenAGI.ServerError}
67
69
  *
68
70
  * @example
69
- * await client.knowledge.createKnowledgeBaseVersion({
70
- * knowledgeBaseId: "string",
71
+ * await client.knowledge.createKnowledgeBaseVersion("help-center", {
71
72
  * type: MavenAGI.KnowledgeBaseVersionType.Full
72
73
  * })
73
74
  */
74
- createKnowledgeBaseVersion(request: MavenAGI.KnowledgeBaseVersion, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseVersion>;
75
+ createKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseVersion, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseVersion>;
75
76
  /**
76
77
  * Finalize the latest knowledge base version. Required to indicate the version is complete. Will throw an exception if the latest version is not in progress.
77
78
  *
78
- * @param {MavenAGI.KnowledgeBaseId} request
79
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to finalize a version for. All other entity ID fields are inferred from the request.
79
80
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
80
81
  *
81
82
  * @throws {@link MavenAGI.NotFoundError}
@@ -83,14 +84,13 @@ export declare class Knowledge {
83
84
  * @throws {@link MavenAGI.ServerError}
84
85
  *
85
86
  * @example
86
- * await client.knowledge.finalizeKnowledgeBaseVersion({
87
- * knowledgeBaseId: "string"
88
- * })
87
+ * await client.knowledge.finalizeKnowledgeBaseVersion("help-center")
89
88
  */
90
- finalizeKnowledgeBaseVersion(request: MavenAGI.KnowledgeBaseId, requestOptions?: Knowledge.RequestOptions): Promise<void>;
89
+ finalizeKnowledgeBaseVersion(knowledgeBaseReferenceId: string, requestOptions?: Knowledge.RequestOptions): Promise<void>;
91
90
  /**
92
91
  * Create knowledge document. Requires an existing knowledge base with an in progress version. Will throw an exception if the latest version is not in progress.
93
92
  *
93
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to create a document for. All other entity ID fields are inferred from the request.
94
94
  * @param {MavenAGI.KnowledgeDocumentRequest} request
95
95
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
96
96
  *
@@ -99,23 +99,20 @@ export declare class Knowledge {
99
99
  * @throws {@link MavenAGI.ServerError}
100
100
  *
101
101
  * @example
102
- * await client.knowledge.createKnowledgeDocument({
103
- * contentType: MavenAGI.KnowledgeDocumentContentType.Html,
104
- * content: "string",
105
- * title: "string",
106
- * url: "string",
107
- * language: "string",
108
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
109
- * updatedAt: new Date("2024-01-15T09:30:00.000Z"),
110
- * author: "string",
111
- * knowledgeBaseId: "string",
112
- * documentId: "string"
102
+ * await client.knowledge.createKnowledgeDocument("help-center", {
103
+ * knowledgeDocumentId: {
104
+ * referenceId: "getting-started"
105
+ * },
106
+ * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
107
+ * content: "## Getting started\\nThis is a getting started guide for the help center.",
108
+ * title: "Getting started"
113
109
  * })
114
110
  */
115
- createKnowledgeDocument(request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
111
+ createKnowledgeDocument(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
116
112
  /**
117
- * Update knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
113
+ * Not yet implemented. Update knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
118
114
  *
115
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base that contains the document to update. All other entity ID fields are inferred from the request.
119
116
  * @param {MavenAGI.KnowledgeDocumentRequest} request
120
117
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
121
118
  *
@@ -124,24 +121,21 @@ export declare class Knowledge {
124
121
  * @throws {@link MavenAGI.ServerError}
125
122
  *
126
123
  * @example
127
- * await client.knowledge.updateKnowledgeDocument({
128
- * contentType: MavenAGI.KnowledgeDocumentContentType.Html,
129
- * content: "string",
130
- * title: "string",
131
- * url: "string",
132
- * language: "string",
133
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
134
- * updatedAt: new Date("2024-01-15T09:30:00.000Z"),
135
- * author: "string",
136
- * knowledgeBaseId: "string",
137
- * documentId: "string"
124
+ * await client.knowledge.updateKnowledgeDocument("help-center", {
125
+ * knowledgeDocumentId: {
126
+ * referenceId: "getting-started"
127
+ * },
128
+ * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
129
+ * content: "## Getting started\\nThis is a getting started guide for the help center.",
130
+ * title: "Getting started"
138
131
  * })
139
132
  */
140
- updateKnowledgeDocument(request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
133
+ updateKnowledgeDocument(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeDocumentRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeDocumentResponse>;
141
134
  /**
142
- * Delete knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
135
+ * Not yet implemented. Delete knowledge document. Requires an existing knowledge base with an in progress version of type PARTIAL. Will throw an exception if the latest version is not in progress.
143
136
  *
144
- * @param {MavenAGI.KnowledgeDocumentId} request
137
+ * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base that contains the document to delete. All other entity ID fields are inferred from the request
138
+ * @param {string} knowledgeDocumentReferenceId - The reference ID of the knowledge document to delete. All other entity ID fields are inferred from the request.
145
139
  * @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
146
140
  *
147
141
  * @throws {@link MavenAGI.NotFoundError}
@@ -149,11 +143,8 @@ export declare class Knowledge {
149
143
  * @throws {@link MavenAGI.ServerError}
150
144
  *
151
145
  * @example
152
- * await client.knowledge.deleteKnowledgeDocument({
153
- * knowledgeBaseId: "string",
154
- * documentId: "string"
155
- * })
146
+ * await client.knowledge.deleteKnowledgeDocument("help-center", "getting-started")
156
147
  */
157
- deleteKnowledgeDocument(request: MavenAGI.KnowledgeDocumentId, requestOptions?: Knowledge.RequestOptions): Promise<void>;
148
+ deleteKnowledgeDocument(knowledgeBaseReferenceId: string, knowledgeDocumentReferenceId: string, requestOptions?: Knowledge.RequestOptions): Promise<void>;
158
149
  protected _getAuthorizationHeader(): Promise<string | undefined>;
159
150
  }