mavenagi 0.0.0-alpha.12 → 0.0.0-alpha.14

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 (179) hide show
  1. package/README.md +8 -1
  2. package/api/resources/actions/client/Client.js +3 -3
  3. package/api/resources/commons/types/AppUser.d.ts +3 -2
  4. package/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  5. package/api/resources/commons/types/AppUserRequest.d.ts +19 -1
  6. package/api/resources/commons/types/AppUserResponse.d.ts +34 -2
  7. package/api/resources/commons/types/Feedback.d.ts +12 -0
  8. package/api/resources/commons/types/UserData.d.ts +1 -1
  9. package/api/resources/commons/types/index.d.ts +4 -2
  10. package/api/resources/commons/types/index.js +4 -2
  11. package/api/resources/conversation/client/Client.d.ts +21 -19
  12. package/api/resources/conversation/client/Client.js +35 -28
  13. package/api/resources/conversation/types/AskRequest.d.ts +2 -4
  14. package/api/resources/conversation/types/ConversationBase.d.ts +12 -0
  15. package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -3
  16. package/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  17. package/api/resources/conversation/types/ConversationResponse.d.ts +0 -2
  18. package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  19. package/api/resources/conversation/types/UserMessageBase.d.ts +2 -0
  20. package/api/resources/conversation/types/index.d.ts +0 -2
  21. package/api/resources/conversation/types/index.js +0 -2
  22. package/api/resources/knowledge/client/Client.js +7 -7
  23. package/api/resources/triggers/client/Client.js +3 -3
  24. package/api/resources/triggers/types/index.d.ts +0 -3
  25. package/api/resources/triggers/types/index.js +0 -3
  26. package/api/resources/users/client/Client.d.ts +18 -14
  27. package/api/resources/users/client/Client.js +21 -17
  28. package/dist/api/resources/actions/client/Client.js +3 -3
  29. package/dist/api/resources/commons/types/AppUser.d.ts +3 -2
  30. package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  31. package/dist/api/resources/commons/types/AppUserRequest.d.ts +19 -1
  32. package/dist/api/resources/commons/types/AppUserResponse.d.ts +34 -2
  33. package/dist/api/resources/commons/types/Feedback.d.ts +12 -0
  34. package/dist/api/resources/commons/types/UserData.d.ts +1 -1
  35. package/dist/api/resources/commons/types/index.d.ts +4 -2
  36. package/dist/api/resources/commons/types/index.js +4 -2
  37. package/dist/api/resources/conversation/client/Client.d.ts +21 -19
  38. package/dist/api/resources/conversation/client/Client.js +35 -28
  39. package/dist/api/resources/conversation/types/AskRequest.d.ts +2 -4
  40. package/dist/api/resources/conversation/types/ConversationBase.d.ts +12 -0
  41. package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -3
  42. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  43. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +0 -2
  44. package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  45. package/dist/api/resources/conversation/types/UserMessageBase.d.ts +2 -0
  46. package/dist/api/resources/conversation/types/index.d.ts +0 -2
  47. package/dist/api/resources/conversation/types/index.js +0 -2
  48. package/dist/api/resources/knowledge/client/Client.js +7 -7
  49. package/dist/api/resources/triggers/client/Client.js +3 -3
  50. package/dist/api/resources/triggers/types/index.d.ts +0 -3
  51. package/dist/api/resources/triggers/types/index.js +0 -3
  52. package/dist/api/resources/users/client/Client.d.ts +18 -14
  53. package/dist/api/resources/users/client/Client.js +21 -17
  54. package/dist/serialization/resources/commons/types/AppUser.d.ts +3 -3
  55. package/dist/serialization/resources/commons/types/AppUser.js +3 -3
  56. package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  57. package/dist/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  58. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +1 -1
  59. package/dist/serialization/resources/commons/types/AppUserRequest.js +1 -1
  60. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +2 -1
  61. package/dist/serialization/resources/commons/types/AppUserResponse.js +2 -1
  62. package/{serialization/resources/triggers → dist/serialization/resources/commons}/types/EventTriggerResponse.d.ts +1 -1
  63. package/{serialization/resources/triggers → dist/serialization/resources/commons}/types/EventTriggerResponse.js +1 -1
  64. package/dist/serialization/resources/commons/types/Feedback.d.ts +16 -0
  65. package/dist/serialization/resources/commons/types/Feedback.js +13 -0
  66. package/dist/serialization/resources/commons/types/UserData.d.ts +1 -1
  67. package/dist/serialization/resources/commons/types/UserData.js +1 -1
  68. package/dist/serialization/resources/commons/types/index.d.ts +4 -2
  69. package/dist/serialization/resources/commons/types/index.js +4 -2
  70. package/dist/serialization/resources/conversation/types/AskRequest.d.ts +1 -4
  71. package/dist/serialization/resources/conversation/types/AskRequest.js +1 -4
  72. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +6 -0
  73. package/dist/serialization/resources/conversation/types/ConversationBase.js +6 -0
  74. package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -2
  75. package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -2
  76. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  77. package/dist/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  78. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +0 -2
  79. package/dist/serialization/resources/conversation/types/ConversationResponse.js +0 -2
  80. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  81. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  82. package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +2 -0
  83. package/dist/serialization/resources/conversation/types/UserMessageBase.js +2 -0
  84. package/dist/serialization/resources/conversation/types/index.d.ts +0 -2
  85. package/dist/serialization/resources/conversation/types/index.js +0 -2
  86. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  87. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  88. package/dist/serialization/resources/triggers/types/index.d.ts +0 -3
  89. package/dist/serialization/resources/triggers/types/index.js +0 -3
  90. package/package.json +1 -1
  91. package/reference.md +43 -34
  92. package/serialization/resources/commons/types/AppUser.d.ts +3 -3
  93. package/serialization/resources/commons/types/AppUser.js +3 -3
  94. package/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  95. package/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  96. package/serialization/resources/commons/types/AppUserRequest.d.ts +1 -1
  97. package/serialization/resources/commons/types/AppUserRequest.js +1 -1
  98. package/serialization/resources/commons/types/AppUserResponse.d.ts +2 -1
  99. package/serialization/resources/commons/types/AppUserResponse.js +2 -1
  100. package/{dist/serialization/resources/triggers → serialization/resources/commons}/types/EventTriggerResponse.d.ts +1 -1
  101. package/{dist/serialization/resources/triggers → serialization/resources/commons}/types/EventTriggerResponse.js +1 -1
  102. package/serialization/resources/commons/types/Feedback.d.ts +16 -0
  103. package/serialization/resources/commons/types/Feedback.js +13 -0
  104. package/serialization/resources/commons/types/UserData.d.ts +1 -1
  105. package/serialization/resources/commons/types/UserData.js +1 -1
  106. package/serialization/resources/commons/types/index.d.ts +4 -2
  107. package/serialization/resources/commons/types/index.js +4 -2
  108. package/serialization/resources/conversation/types/AskRequest.d.ts +1 -4
  109. package/serialization/resources/conversation/types/AskRequest.js +1 -4
  110. package/serialization/resources/conversation/types/ConversationBase.d.ts +6 -0
  111. package/serialization/resources/conversation/types/ConversationBase.js +6 -0
  112. package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -2
  113. package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -2
  114. package/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  115. package/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  116. package/serialization/resources/conversation/types/ConversationResponse.d.ts +0 -2
  117. package/serialization/resources/conversation/types/ConversationResponse.js +0 -2
  118. package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  119. package/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  120. package/serialization/resources/conversation/types/UserMessageBase.d.ts +2 -0
  121. package/serialization/resources/conversation/types/UserMessageBase.js +2 -0
  122. package/serialization/resources/conversation/types/index.d.ts +0 -2
  123. package/serialization/resources/conversation/types/index.js +0 -2
  124. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  125. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  126. package/serialization/resources/triggers/types/index.d.ts +0 -3
  127. package/serialization/resources/triggers/types/index.js +0 -3
  128. package/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  129. package/api/resources/commons/types/User.d.ts +0 -10
  130. package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  131. package/api/resources/conversation/types/ConversationContext.js +0 -4
  132. package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  133. package/api/resources/conversation/types/ConversationMessageContext.js +0 -4
  134. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  135. package/dist/api/resources/commons/types/AppUserIdentification.js +0 -4
  136. package/dist/api/resources/commons/types/User.d.ts +0 -10
  137. package/dist/api/resources/commons/types/User.js +0 -4
  138. package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  139. package/dist/api/resources/conversation/types/ConversationContext.js +0 -4
  140. package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  141. package/dist/api/resources/conversation/types/ConversationMessageContext.js +0 -4
  142. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  143. package/dist/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  144. package/dist/serialization/resources/commons/types/User.d.ts +0 -15
  145. package/dist/serialization/resources/commons/types/User.js +0 -10
  146. package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  147. package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
  148. package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  149. package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  150. package/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  151. package/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  152. package/serialization/resources/commons/types/User.d.ts +0 -15
  153. package/serialization/resources/commons/types/User.js +0 -10
  154. package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  155. package/serialization/resources/conversation/types/ConversationContext.js +0 -15
  156. package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  157. package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  158. /package/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  159. /package/api/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  160. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  161. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.js +0 -0
  162. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  163. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  164. /package/api/resources/commons/types/{AppUserIdentification.js → Feedback.js} +0 -0
  165. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  166. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  167. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  168. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.js +0 -0
  169. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  170. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  171. /package/{api/resources/commons/types/User.js → dist/api/resources/commons/types/Feedback.js} +0 -0
  172. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  173. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  174. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  175. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  176. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  177. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  178. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  179. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
@@ -5,10 +5,8 @@ import * as MavenAGI from "../../../index";
5
5
  export interface AskRequest {
6
6
  /** Externally supplied ID to uniquely identify this message within the conversation */
7
7
  conversationMessageId: MavenAGI.EntityIdBase;
8
+ /** Externally supplied ID to uniquely identify the user that created this message */
9
+ userId: MavenAGI.EntityIdBase;
8
10
  /** The text of the message */
9
11
  text: string;
10
- /** The context of the message */
11
- context?: MavenAGI.ConversationMessageContext;
12
- /** Optional configuration for responses to this conversation. Only applies to new conversations. */
13
- responseConfig?: MavenAGI.ResponseConfig;
14
12
  }
@@ -5,4 +5,16 @@ import * as MavenAGI from "../../../index";
5
5
  export interface ConversationBase {
6
6
  /** Optional configurations for responses to this conversation */
7
7
  responseConfig?: MavenAGI.ResponseConfig;
8
+ /** The subject of the conversation */
9
+ subject?: string;
10
+ /** The url of the conversation */
11
+ url?: string;
12
+ /** The date and time the conversation was created */
13
+ createdAt?: Date;
14
+ /** The date and time the conversation was last updated */
15
+ updatedAt?: Date;
16
+ /** The tags of the conversation. Used for filtering in Agent Designer. */
17
+ tags?: Set<string>;
18
+ /** The metadata of the conversation. */
19
+ metadata?: Record<string, string>;
8
20
  }
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as MavenAGI from "../../../index";
5
4
  export interface ConversationMessageBase {
6
- /** The context of the message */
7
- context?: MavenAGI.ConversationMessageContext;
5
+ /** The date and time the conversation was created */
6
+ createdAt?: Date;
7
+ /** The date and time the conversation was last updated */
8
+ updatedAt?: Date;
8
9
  }
@@ -7,6 +7,4 @@ export interface ConversationRequest extends MavenAGI.ConversationBase {
7
7
  conversationId: MavenAGI.EntityIdBase;
8
8
  /** The messages in the conversation */
9
9
  messages: MavenAGI.ConversationMessageRequest[];
10
- /** The context of the conversation */
11
- context?: MavenAGI.ConversationContext;
12
10
  }
@@ -7,6 +7,4 @@ export interface ConversationResponse extends MavenAGI.ConversationBase {
7
7
  conversationId: MavenAGI.EntityId;
8
8
  /** The messages in the conversation */
9
9
  messages: MavenAGI.ConversationMessageResponse[];
10
- /** The context of the conversation */
11
- context: MavenAGI.ConversationContext;
12
10
  }
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as MavenAGI from "../../../index";
5
4
  export interface SubmitActionFormRequest {
6
5
  actionFormId: string;
7
- userContext: MavenAGI.User;
8
- /** Map of parameter names to values */
6
+ /** Map of parameter IDs to values provided by the user. All required action fields must be provided. */
9
7
  parameters: Record<string, unknown>;
10
8
  }
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
5
  export interface UserMessageBase extends MavenAGI.ConversationMessageBase {
6
+ /** ID that uniquely identifies the user that created this message */
7
+ userId: MavenAGI.EntityIdBase;
6
8
  /** The text of the message. Cannot be empty */
7
9
  text: string;
8
10
  userMessageType: MavenAGI.UserConversationMessageType;
@@ -18,8 +18,6 @@ export * from "./BotTextResponse";
18
18
  export * from "./BotActionFormResponse";
19
19
  export * from "./ActionFormField";
20
20
  export * from "./SubmitActionFormRequest";
21
- export * from "./ConversationContext";
22
- export * from "./ConversationMessageContext";
23
21
  export * from "./UserConversationMessageType";
24
22
  export * from "./BotConversationMessageType";
25
23
  export * from "./FeedbackRequest";
@@ -18,8 +18,6 @@ export * from "./BotTextResponse";
18
18
  export * from "./BotActionFormResponse";
19
19
  export * from "./ActionFormField";
20
20
  export * from "./SubmitActionFormRequest";
21
- export * from "./ConversationContext";
22
- export * from "./ConversationMessageContext";
23
21
  export * from "./UserConversationMessageType";
24
22
  export * from "./BotConversationMessageType";
25
23
  export * from "./FeedbackRequest";
@@ -51,7 +51,7 @@ export class Knowledge {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  },
@@ -140,7 +140,7 @@ export class Knowledge {
140
140
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
144
144
  "X-Fern-Runtime": core.RUNTIME.type,
145
145
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
146
  },
@@ -231,7 +231,7 @@ export class Knowledge {
231
231
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
232
232
  "X-Fern-Language": "JavaScript",
233
233
  "X-Fern-SDK-Name": "mavenagi",
234
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
234
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
235
235
  "X-Fern-Runtime": core.RUNTIME.type,
236
236
  "X-Fern-Runtime-Version": core.RUNTIME.version,
237
237
  },
@@ -320,7 +320,7 @@ export class Knowledge {
320
320
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
321
321
  "X-Fern-Language": "JavaScript",
322
322
  "X-Fern-SDK-Name": "mavenagi",
323
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
323
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
324
324
  "X-Fern-Runtime": core.RUNTIME.type,
325
325
  "X-Fern-Runtime-Version": core.RUNTIME.version,
326
326
  },
@@ -411,7 +411,7 @@ export class Knowledge {
411
411
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
412
412
  "X-Fern-Language": "JavaScript",
413
413
  "X-Fern-SDK-Name": "mavenagi",
414
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
414
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
415
415
  "X-Fern-Runtime": core.RUNTIME.type,
416
416
  "X-Fern-Runtime-Version": core.RUNTIME.version,
417
417
  },
@@ -508,7 +508,7 @@ export class Knowledge {
508
508
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
509
509
  "X-Fern-Language": "JavaScript",
510
510
  "X-Fern-SDK-Name": "mavenagi",
511
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
511
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
512
512
  "X-Fern-Runtime": core.RUNTIME.type,
513
513
  "X-Fern-Runtime-Version": core.RUNTIME.version,
514
514
  },
@@ -598,7 +598,7 @@ export class Knowledge {
598
598
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
599
599
  "X-Fern-Language": "JavaScript",
600
600
  "X-Fern-SDK-Name": "mavenagi",
601
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
601
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
602
602
  "X-Fern-Runtime": core.RUNTIME.type,
603
603
  "X-Fern-Runtime-Version": core.RUNTIME.version,
604
604
  },
@@ -51,7 +51,7 @@ export class Triggers {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
55
55
  "X-Fern-Runtime": core.RUNTIME.type,
56
56
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
57
  },
@@ -140,7 +140,7 @@ export class Triggers {
140
140
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
141
  "X-Fern-Language": "JavaScript",
142
142
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
144
144
  "X-Fern-Runtime": core.RUNTIME.type,
145
145
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
146
  },
@@ -228,7 +228,7 @@ export class Triggers {
228
228
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
229
229
  "X-Fern-Language": "JavaScript",
230
230
  "X-Fern-SDK-Name": "mavenagi",
231
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
231
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
232
232
  "X-Fern-Runtime": core.RUNTIME.type,
233
233
  "X-Fern-Runtime-Version": core.RUNTIME.version,
234
234
  },
@@ -1,4 +1 @@
1
- export * from "./EventTriggerBase";
2
1
  export * from "./EventTriggerRequest";
3
- export * from "./EventTriggerResponse";
4
- export * from "./EventTriggerType";
@@ -1,4 +1 @@
1
- export * from "./EventTriggerBase";
2
1
  export * from "./EventTriggerRequest";
3
- export * from "./EventTriggerResponse";
4
- export * from "./EventTriggerType";
@@ -32,7 +32,7 @@ export declare class Users {
32
32
  protected readonly _options: Users.Options;
33
33
  constructor(_options: Users.Options);
34
34
  /**
35
- * Create a new user or update an existing one
35
+ * Update a user or create it if it doesn't exist.
36
36
  *
37
37
  * @param {MavenAGI.AppUserRequest} request
38
38
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
@@ -42,23 +42,27 @@ export declare class Users {
42
42
  * @throws {@link MavenAGI.ServerError}
43
43
  *
44
44
  * @example
45
- * await client.users.upsertAppUser({
46
- * appUserId: {
47
- * referenceId: "string"
45
+ * await client.users.createOrUpdate({
46
+ * userId: {
47
+ * referenceId: "user-0"
48
48
  * },
49
- * userIdentifiers: {
50
- * identifiers: new Set([{}])
51
- * },
52
- * metadata: {
53
- * "string": {}
49
+ * identifiers: new Set([{
50
+ * value: "joe@myapp.com",
51
+ * type: MavenAGI.AppUserIdentifyingPropertyType.Email
52
+ * }]),
53
+ * data: {
54
+ * "name": {
55
+ * value: "Joe",
56
+ * visibility: MavenAGI.VisibilityType.Visible
57
+ * }
54
58
  * }
55
59
  * })
56
60
  */
57
- upsertAppUser(request: MavenAGI.AppUserRequest, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
61
+ createOrUpdate(request: MavenAGI.AppUserRequest, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
58
62
  /**
59
- * Get a user
63
+ * Get a user by its supplied ID
60
64
  *
61
- * @param {string} userId - Externally supplied unique ID of the user
65
+ * @param {string} userId - The reference ID of the user to get. All other entity ID fields are inferred from the request.
62
66
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
63
67
  *
64
68
  * @throws {@link MavenAGI.NotFoundError}
@@ -66,8 +70,8 @@ export declare class Users {
66
70
  * @throws {@link MavenAGI.ServerError}
67
71
  *
68
72
  * @example
69
- * await client.users.getAppUser("string")
73
+ * await client.users.get("user-0")
70
74
  */
71
- getAppUser(userId: string, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
75
+ get(userId: string, requestOptions?: Users.RequestOptions): Promise<MavenAGI.AppUserResponse>;
72
76
  protected _getAuthorizationHeader(): Promise<string | undefined>;
73
77
  }
@@ -21,7 +21,7 @@ export class Users {
21
21
  this._options = _options;
22
22
  }
23
23
  /**
24
- * Create a new user or update an existing one
24
+ * Update a user or create it if it doesn't exist.
25
25
  *
26
26
  * @param {MavenAGI.AppUserRequest} request
27
27
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
@@ -31,19 +31,23 @@ export class Users {
31
31
  * @throws {@link MavenAGI.ServerError}
32
32
  *
33
33
  * @example
34
- * await client.users.upsertAppUser({
35
- * appUserId: {
36
- * referenceId: "string"
34
+ * await client.users.createOrUpdate({
35
+ * userId: {
36
+ * referenceId: "user-0"
37
37
  * },
38
- * userIdentifiers: {
39
- * identifiers: new Set([{}])
40
- * },
41
- * metadata: {
42
- * "string": {}
38
+ * identifiers: new Set([{
39
+ * value: "joe@myapp.com",
40
+ * type: MavenAGI.AppUserIdentifyingPropertyType.Email
41
+ * }]),
42
+ * data: {
43
+ * "name": {
44
+ * value: "Joe",
45
+ * visibility: MavenAGI.VisibilityType.Visible
46
+ * }
43
47
  * }
44
48
  * })
45
49
  */
46
- upsertAppUser(request, requestOptions) {
50
+ createOrUpdate(request, requestOptions) {
47
51
  var _a, _b;
48
52
  return __awaiter(this, void 0, void 0, function* () {
49
53
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -55,7 +59,7 @@ export class Users {
55
59
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
56
60
  "X-Fern-Language": "JavaScript",
57
61
  "X-Fern-SDK-Name": "mavenagi",
58
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
62
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
59
63
  "X-Fern-Runtime": core.RUNTIME.type,
60
64
  "X-Fern-Runtime-Version": core.RUNTIME.version,
61
65
  },
@@ -120,9 +124,9 @@ export class Users {
120
124
  });
121
125
  }
122
126
  /**
123
- * Get a user
127
+ * Get a user by its supplied ID
124
128
  *
125
- * @param {string} userId - Externally supplied unique ID of the user
129
+ * @param {string} userId - The reference ID of the user to get. All other entity ID fields are inferred from the request.
126
130
  * @param {Users.RequestOptions} requestOptions - Request-specific configuration.
127
131
  *
128
132
  * @throws {@link MavenAGI.NotFoundError}
@@ -130,13 +134,13 @@ export class Users {
130
134
  * @throws {@link MavenAGI.ServerError}
131
135
  *
132
136
  * @example
133
- * await client.users.getAppUser("string")
137
+ * await client.users.get("user-0")
134
138
  */
135
- getAppUser(userId, requestOptions) {
139
+ get(userId, requestOptions) {
136
140
  var _a, _b;
137
141
  return __awaiter(this, void 0, void 0, function* () {
138
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
139
- url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/users/agent_user/${encodeURIComponent(userId)}`),
143
+ url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/users/${encodeURIComponent(userId)}`),
140
144
  method: "GET",
141
145
  headers: {
142
146
  Authorization: yield this._getAuthorizationHeader(),
@@ -144,7 +148,7 @@ export class Users {
144
148
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
145
149
  "X-Fern-Language": "JavaScript",
146
150
  "X-Fern-SDK-Name": "mavenagi",
147
- "X-Fern-SDK-Version": "0.0.0-alpha.12",
151
+ "X-Fern-SDK-Version": "0.0.0-alpha.14",
148
152
  "X-Fern-Runtime": core.RUNTIME.type,
149
153
  "X-Fern-Runtime-Version": core.RUNTIME.version,
150
154
  },
@@ -4,12 +4,12 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { AppUserIdentification } from "./AppUserIdentification";
7
+ import { AppUserIdentifier } from "./AppUserIdentifier";
8
8
  import { UserData } from "./UserData";
9
9
  export declare const AppUser: core.serialization.ObjectSchema<serializers.AppUser.Raw, MavenAGI.AppUser>;
10
10
  export declare namespace AppUser {
11
11
  interface Raw {
12
- userIdentifiers?: AppUserIdentification.Raw | null;
13
- metadata?: Record<string, UserData.Raw> | null;
12
+ identifiers: AppUserIdentifier.Raw[];
13
+ data: Record<string, UserData.Raw>;
14
14
  }
15
15
  }
@@ -2,9 +2,9 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { AppUserIdentification } from "./AppUserIdentification";
5
+ import { AppUserIdentifier } from "./AppUserIdentifier";
6
6
  import { UserData } from "./UserData";
7
7
  export const AppUser = core.serialization.object({
8
- userIdentifiers: AppUserIdentification.optional(),
9
- metadata: core.serialization.record(core.serialization.string(), UserData).optional(),
8
+ identifiers: core.serialization.list(AppUserIdentifier),
9
+ data: core.serialization.record(core.serialization.string(), UserData),
10
10
  });
@@ -9,6 +9,6 @@ export declare const AppUserIdentifier: core.serialization.ObjectSchema<serializ
9
9
  export declare namespace AppUserIdentifier {
10
10
  interface Raw {
11
11
  value: string;
12
- userIdentifyingPropertyType: AppUserIdentifyingPropertyType.Raw;
12
+ type: AppUserIdentifyingPropertyType.Raw;
13
13
  }
14
14
  }
@@ -5,5 +5,5 @@ import * as core from "../../../../core";
5
5
  import { AppUserIdentifyingPropertyType } from "./AppUserIdentifyingPropertyType";
6
6
  export const AppUserIdentifier = core.serialization.object({
7
7
  value: core.serialization.string(),
8
- userIdentifyingPropertyType: AppUserIdentifyingPropertyType,
8
+ type: AppUserIdentifyingPropertyType,
9
9
  });
@@ -9,6 +9,6 @@ import { AppUser } from "./AppUser";
9
9
  export declare const AppUserRequest: core.serialization.ObjectSchema<serializers.AppUserRequest.Raw, MavenAGI.AppUserRequest>;
10
10
  export declare namespace AppUserRequest {
11
11
  interface Raw extends AppUser.Raw {
12
- appUserId: EntityIdBase.Raw;
12
+ userId: EntityIdBase.Raw;
13
13
  }
14
14
  }
@@ -6,6 +6,6 @@ import { EntityIdBase } from "./EntityIdBase";
6
6
  import { AppUser } from "./AppUser";
7
7
  export const AppUserRequest = core.serialization
8
8
  .object({
9
- appUserId: EntityIdBase,
9
+ userId: EntityIdBase,
10
10
  })
11
11
  .extend(AppUser);
@@ -9,6 +9,7 @@ import { AppUser } from "./AppUser";
9
9
  export declare const AppUserResponse: core.serialization.ObjectSchema<serializers.AppUserResponse.Raw, MavenAGI.AppUserResponse>;
10
10
  export declare namespace AppUserResponse {
11
11
  interface Raw extends AppUser.Raw {
12
- appUserId: EntityId.Raw;
12
+ userId: EntityId.Raw;
13
+ allUserData: Record<string, Record<string, string>>;
13
14
  }
14
15
  }
@@ -6,6 +6,7 @@ import { EntityId } from "./EntityId";
6
6
  import { AppUser } from "./AppUser";
7
7
  export const AppUserResponse = core.serialization
8
8
  .object({
9
- appUserId: EntityId,
9
+ userId: EntityId,
10
+ allUserData: core.serialization.record(core.serialization.string(), core.serialization.record(core.serialization.string(), core.serialization.string())),
10
11
  })
11
12
  .extend(AppUser);
@@ -4,7 +4,7 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { EntityId } from "../../commons/types/EntityId";
7
+ import { EntityId } from "./EntityId";
8
8
  import { EventTriggerBase } from "./EventTriggerBase";
9
9
  export declare const EventTriggerResponse: core.serialization.ObjectSchema<serializers.EventTriggerResponse.Raw, MavenAGI.EventTriggerResponse>;
10
10
  export declare namespace EventTriggerResponse {
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { EntityId } from "../../commons/types/EntityId";
5
+ import { EntityId } from "./EntityId";
6
6
  import { EventTriggerBase } from "./EventTriggerBase";
7
7
  export const EventTriggerResponse = core.serialization
8
8
  .object({
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as MavenAGI from "../../../../api/index";
6
+ import * as core from "../../../../core";
7
+ import { EntityId } from "./EntityId";
8
+ import { FeedbackBase } from "./FeedbackBase";
9
+ export declare const Feedback: core.serialization.ObjectSchema<serializers.Feedback.Raw, MavenAGI.Feedback>;
10
+ export declare namespace Feedback {
11
+ interface Raw extends FeedbackBase.Raw {
12
+ feedbackId: EntityId.Raw;
13
+ conversationId: EntityId.Raw;
14
+ conversationMessageId: EntityId.Raw;
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core";
5
+ import { EntityId } from "./EntityId";
6
+ import { FeedbackBase } from "./FeedbackBase";
7
+ export const Feedback = core.serialization
8
+ .object({
9
+ feedbackId: EntityId,
10
+ conversationId: EntityId,
11
+ conversationMessageId: EntityId,
12
+ })
13
+ .extend(FeedbackBase);
@@ -9,6 +9,6 @@ export declare const UserData: core.serialization.ObjectSchema<serializers.UserD
9
9
  export declare namespace UserData {
10
10
  interface Raw {
11
11
  value: string;
12
- visibility?: VisibilityType.Raw | null;
12
+ visibility: VisibilityType.Raw;
13
13
  }
14
14
  }
@@ -5,5 +5,5 @@ import * as core from "../../../../core";
5
5
  import { VisibilityType } from "./VisibilityType";
6
6
  export const UserData = core.serialization.object({
7
7
  value: core.serialization.string(),
8
- visibility: VisibilityType.optional(),
8
+ visibility: VisibilityType,
9
9
  });
@@ -2,10 +2,9 @@ export * from "./ErrorMessage";
2
2
  export * from "./EntityType";
3
3
  export * from "./EntityIdBase";
4
4
  export * from "./EntityId";
5
- export * from "./User";
6
5
  export * from "./FeedbackBase";
7
6
  export * from "./FeedbackType";
8
- export * from "./AppUserIdentification";
7
+ export * from "./Feedback";
9
8
  export * from "./AppUserIdentifier";
10
9
  export * from "./AppUserIdentifyingPropertyType";
11
10
  export * from "./AppUser";
@@ -13,3 +12,6 @@ export * from "./UserData";
13
12
  export * from "./VisibilityType";
14
13
  export * from "./AppUserRequest";
15
14
  export * from "./AppUserResponse";
15
+ export * from "./EventTriggerBase";
16
+ export * from "./EventTriggerResponse";
17
+ export * from "./EventTriggerType";
@@ -2,10 +2,9 @@ export * from "./ErrorMessage";
2
2
  export * from "./EntityType";
3
3
  export * from "./EntityIdBase";
4
4
  export * from "./EntityId";
5
- export * from "./User";
6
5
  export * from "./FeedbackBase";
7
6
  export * from "./FeedbackType";
8
- export * from "./AppUserIdentification";
7
+ export * from "./Feedback";
9
8
  export * from "./AppUserIdentifier";
10
9
  export * from "./AppUserIdentifyingPropertyType";
11
10
  export * from "./AppUser";
@@ -13,3 +12,6 @@ export * from "./UserData";
13
12
  export * from "./VisibilityType";
14
13
  export * from "./AppUserRequest";
15
14
  export * from "./AppUserResponse";
15
+ export * from "./EventTriggerBase";
16
+ export * from "./EventTriggerResponse";
17
+ export * from "./EventTriggerType";
@@ -5,14 +5,11 @@ import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { EntityIdBase } from "../../commons/types/EntityIdBase";
8
- import { ConversationMessageContext } from "./ConversationMessageContext";
9
- import { ResponseConfig } from "./ResponseConfig";
10
8
  export declare const AskRequest: core.serialization.ObjectSchema<serializers.AskRequest.Raw, MavenAGI.AskRequest>;
11
9
  export declare namespace AskRequest {
12
10
  interface Raw {
13
11
  conversationMessageId: EntityIdBase.Raw;
12
+ userId: EntityIdBase.Raw;
14
13
  text: string;
15
- context?: ConversationMessageContext.Raw | null;
16
- responseConfig?: ResponseConfig.Raw | null;
17
14
  }
18
15
  }
@@ -3,11 +3,8 @@
3
3
  */
4
4
  import * as core from "../../../../core";
5
5
  import { EntityIdBase } from "../../commons/types/EntityIdBase";
6
- import { ConversationMessageContext } from "./ConversationMessageContext";
7
- import { ResponseConfig } from "./ResponseConfig";
8
6
  export const AskRequest = core.serialization.object({
9
7
  conversationMessageId: EntityIdBase,
8
+ userId: EntityIdBase,
10
9
  text: core.serialization.string(),
11
- context: ConversationMessageContext.optional(),
12
- responseConfig: ResponseConfig.optional(),
13
10
  });
@@ -9,5 +9,11 @@ export declare const ConversationBase: core.serialization.ObjectSchema<serialize
9
9
  export declare namespace ConversationBase {
10
10
  interface Raw {
11
11
  responseConfig?: ResponseConfig.Raw | null;
12
+ subject?: string | null;
13
+ url?: string | null;
14
+ createdAt?: string | null;
15
+ updatedAt?: string | null;
16
+ tags?: string[] | null;
17
+ metadata?: Record<string, string> | null;
12
18
  }
13
19
  }
@@ -5,4 +5,10 @@ import * as core from "../../../../core";
5
5
  import { ResponseConfig } from "./ResponseConfig";
6
6
  export const ConversationBase = core.serialization.object({
7
7
  responseConfig: ResponseConfig.optional(),
8
+ subject: core.serialization.string().optional(),
9
+ url: core.serialization.string().optional(),
10
+ createdAt: core.serialization.date().optional(),
11
+ updatedAt: core.serialization.date().optional(),
12
+ tags: core.serialization.set(core.serialization.string()).optional(),
13
+ metadata: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
8
14
  });
@@ -4,10 +4,10 @@
4
4
  import * as serializers from "../../../index";
5
5
  import * as MavenAGI from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
- import { ConversationMessageContext } from "./ConversationMessageContext";
8
7
  export declare const ConversationMessageBase: core.serialization.ObjectSchema<serializers.ConversationMessageBase.Raw, MavenAGI.ConversationMessageBase>;
9
8
  export declare namespace ConversationMessageBase {
10
9
  interface Raw {
11
- context?: ConversationMessageContext.Raw | null;
10
+ createdAt?: string | null;
11
+ updatedAt?: string | null;
12
12
  }
13
13
  }
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as core from "../../../../core";
5
- import { ConversationMessageContext } from "./ConversationMessageContext";
6
5
  export const ConversationMessageBase = core.serialization.object({
7
- context: ConversationMessageContext.optional(),
6
+ createdAt: core.serialization.date().optional(),
7
+ updatedAt: core.serialization.date().optional(),
8
8
  });