mavenagi 1.2.54 → 1.2.56

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 (84) hide show
  1. package/BaseClient.js +2 -2
  2. package/api/resources/analytics/types/ConversationBarChartRequest.d.ts +2 -0
  3. package/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts +1 -0
  4. package/api/resources/analytics/types/ConversationPieChartRequest.d.ts +1 -0
  5. package/api/resources/commons/types/ActionResponse.d.ts +1 -1
  6. package/api/resources/commons/types/AskType.d.ts +13 -0
  7. package/api/resources/commons/types/AskType.js +16 -0
  8. package/api/resources/commons/types/BaseConversationResponse.d.ts +5 -0
  9. package/api/resources/commons/types/BotLogicItem.d.ts +4 -1
  10. package/api/resources/commons/types/BotLogicSteeringItem.d.ts +10 -0
  11. package/api/resources/commons/types/BotLogicSteeringItem.js +3 -0
  12. package/api/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +13 -0
  13. package/api/resources/commons/types/ConversationMode.d.ts +10 -0
  14. package/api/resources/commons/types/ConversationMode.js +13 -0
  15. package/api/resources/commons/types/ConversationModePrecondition.d.ts +10 -0
  16. package/api/resources/commons/types/ConversationModePrecondition.js +3 -0
  17. package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
  18. package/api/resources/commons/types/ConversationPreconditionResponse.d.ts +4 -1
  19. package/api/resources/commons/types/ConversationResponse.d.ts +1 -0
  20. package/api/resources/commons/types/EntityType.d.ts +1 -0
  21. package/api/resources/commons/types/EntityType.js +1 -0
  22. package/api/resources/commons/types/KeyValueEntryCondition.d.ts +13 -0
  23. package/api/resources/commons/types/KeyValueEntryCondition.js +3 -0
  24. package/api/resources/commons/types/ObjectCondition.d.ts +10 -0
  25. package/api/resources/commons/types/ObjectCondition.js +3 -0
  26. package/api/resources/commons/types/index.d.ts +6 -0
  27. package/api/resources/commons/types/index.js +6 -0
  28. package/api/resources/conversation/types/AskRequest.d.ts +37 -2
  29. package/api/resources/conversation/types/ConversationField.d.ts +3 -0
  30. package/api/resources/conversation/types/ConversationField.js +3 -0
  31. package/api/resources/conversation/types/ConversationFilter.d.ts +2 -0
  32. package/api/resources/conversation/types/NumericConversationField.d.ts +2 -0
  33. package/api/resources/conversation/types/NumericConversationField.js +2 -0
  34. package/api/resources/knowledge/client/Client.d.ts +6 -3
  35. package/api/resources/knowledge/client/Client.js +6 -3
  36. package/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +2 -0
  37. package/api/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.d.ts +5 -1
  38. package/api/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.js +5 -1
  39. package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +3 -0
  40. package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.js +3 -0
  41. package/package.json +1 -1
  42. package/reference.md +6 -3
  43. package/serialization/resources/commons/types/AskType.d.ts +7 -0
  44. package/serialization/resources/commons/types/AskType.js +39 -0
  45. package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
  46. package/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
  47. package/serialization/resources/commons/types/BotLogicItem.d.ts +5 -1
  48. package/serialization/resources/commons/types/BotLogicItem.js +2 -0
  49. package/serialization/resources/commons/types/BotLogicSteeringItem.d.ts +11 -0
  50. package/serialization/resources/commons/types/BotLogicSteeringItem.js +43 -0
  51. package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +2 -0
  52. package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +2 -0
  53. package/serialization/resources/commons/types/ConversationMode.d.ts +7 -0
  54. package/serialization/resources/commons/types/ConversationMode.js +39 -0
  55. package/serialization/resources/commons/types/ConversationModePrecondition.d.ts +11 -0
  56. package/serialization/resources/commons/types/ConversationModePrecondition.js +45 -0
  57. package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
  58. package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
  59. package/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +5 -1
  60. package/serialization/resources/commons/types/ConversationPreconditionResponse.js +2 -0
  61. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  62. package/serialization/resources/commons/types/EntityType.js +1 -0
  63. package/serialization/resources/commons/types/KeyValueEntryCondition.d.ts +11 -0
  64. package/serialization/resources/commons/types/KeyValueEntryCondition.js +43 -0
  65. package/serialization/resources/commons/types/ObjectCondition.d.ts +11 -0
  66. package/serialization/resources/commons/types/ObjectCondition.js +47 -0
  67. package/serialization/resources/commons/types/index.d.ts +6 -0
  68. package/serialization/resources/commons/types/index.js +6 -0
  69. package/serialization/resources/conversation/types/AskRequest.d.ts +3 -1
  70. package/serialization/resources/conversation/types/AskRequest.js +3 -1
  71. package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
  72. package/serialization/resources/conversation/types/ConversationField.js +3 -0
  73. package/serialization/resources/conversation/types/ConversationFilter.d.ts +1 -0
  74. package/serialization/resources/conversation/types/ConversationFilter.js +1 -0
  75. package/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
  76. package/serialization/resources/conversation/types/NumericConversationField.js +2 -0
  77. package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +1 -0
  78. package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +1 -0
  79. package/serialization/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.d.ts +1 -1
  80. package/serialization/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.js +1 -1
  81. package/serialization/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +1 -1
  82. package/serialization/resources/knowledge/types/KnowledgeBaseVersionStatus.js +1 -1
  83. package/version.d.ts +1 -1
  84. package/version.js +1 -1
package/BaseClient.js CHANGED
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "mavenagi",
46
- "X-Fern-SDK-Version": "1.2.54",
47
- "User-Agent": "mavenagi/1.2.54",
46
+ "X-Fern-SDK-Version": "1.2.56",
47
+ "User-Agent": "mavenagi/1.2.56",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
@@ -8,6 +8,7 @@ export interface ConversationBarChartRequest extends MavenAGI.ConversationAnalyt
8
8
  * - `Sources`: Document title (e.g., "Product Documentation")
9
9
  * - `Actions`: "Action Name - App Name" (e.g., "Create Ticket - Freshdesk")
10
10
  * - `IncompleteActions`: "Action Name - App Name" (e.g., "Search Documents - Zendesk")
11
+ * - `ErroredActions`: "Action Name - App Name" (e.g., "Get Balance - Core Banking")
11
12
  * - `Users`: User identifier value (e.g., "user@example.com")
12
13
  * - `InboxItems`: Inbox item title
13
14
  * - `HumanAgents`: Human agent display name
@@ -25,6 +26,7 @@ export interface ConversationBarChartRequest extends MavenAGI.ConversationAnalyt
25
26
  * - `Sources`: Document title (e.g., "Product Documentation")
26
27
  * - `Actions`: "Action Name - App Name" (e.g., "Create Ticket - Freshdesk")
27
28
  * - `IncompleteActions`: "Action Name - App Name" (e.g., "Search Documents - Zendesk")
29
+ * - `ErroredActions`: "Action Name - App Name" (e.g., "Get Balance - Core Banking")
28
30
  * - `Users`: User identifier value (e.g., "user@example.com")
29
31
  * - `InboxItems`: Inbox item title
30
32
  * - `HumanAgents`: Human agent display name
@@ -9,6 +9,7 @@ export interface ConversationDateHistogramRequest extends MavenAGI.ConversationA
9
9
  * - `Sources`: Document title (e.g., "Product Documentation")
10
10
  * - `Actions`: "Action Name - App Name" (e.g., "Create Ticket - Freshdesk")
11
11
  * - `IncompleteActions`: "Action Name - App Name" (e.g., "Search Documents - Zendesk")
12
+ * - `ErroredActions`: "Action Name - App Name" (e.g., "Get Balance - Core Banking")
12
13
  * - `Users`: User identifier value (e.g., "user@example.com")
13
14
  * - `InboxItems`: Inbox item title
14
15
  * - `HumanAgents`: Human agent display name
@@ -7,6 +7,7 @@ export interface ConversationPieChartRequest extends MavenAGI.ConversationAnalyt
7
7
  * - `Sources`: Document title (e.g., "Product Documentation")
8
8
  * - `Actions`: "Action Name - App Name" (e.g., "Create Ticket - Freshdesk")
9
9
  * - `IncompleteActions`: "Action Name - App Name" (e.g., "Search Documents - Zendesk")
10
+ * - `ErroredActions`: "Action Name - App Name" (e.g., "Get Balance - Core Banking")
10
11
  * - `Users`: User identifier value (e.g., "user@example.com")
11
12
  * - `InboxItems`: Inbox item title
12
13
  * - `HumanAgents`: Human agent display name
@@ -59,7 +59,7 @@ export interface ActionResponse extends MavenAGI.ActionBase {
59
59
  * Inline precondition support will be removed in a future release.
60
60
  */
61
61
  segmentId?: MavenAGI.EntityId;
62
- /** A human-readable explanation of the precondition associated with this action, if present. */
62
+ /** No longer populated. This field is always absent and will be removed in a future release. */
63
63
  preconditionExplanation?: string;
64
64
  /** Whether the action has been deleted. Deleted actions will not sent to the LLM nor returned in search results. */
65
65
  deleted: boolean;
@@ -0,0 +1,13 @@
1
+ /** What prompts the assistant turn produced by an ask. Defaults to USER_MESSAGE when omitted. */
2
+ export declare const AskType: {
3
+ /**
4
+ * The default. Respond to a message the user sent; the user's words are in `text` (required). */
5
+ readonly UserMessage: "USER_MESSAGE";
6
+ /**
7
+ * The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first turn of a conversation. */
8
+ readonly Welcome: "WELCOME";
9
+ /**
10
+ * The agent proactively sends a message the user did not prompt. `text` is optional here; when provided it steers what the agent says (e.g. "tell the user to restart their machine") and is a directive to the agent, not the user's own words. */
11
+ readonly Proactive: "PROACTIVE";
12
+ };
13
+ export type AskType = (typeof AskType)[keyof typeof AskType] | string;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AskType = void 0;
5
+ /** What prompts the assistant turn produced by an ask. Defaults to USER_MESSAGE when omitted. */
6
+ exports.AskType = {
7
+ /**
8
+ * The default. Respond to a message the user sent; the user's words are in `text` (required). */
9
+ UserMessage: "USER_MESSAGE",
10
+ /**
11
+ * The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first turn of a conversation. */
12
+ Welcome: "WELCOME",
13
+ /**
14
+ * The agent proactively sends a message the user did not prompt. `text` is optional here; when provided it steers what the agent says (e.g. "tell the user to restart their machine") and is a directive to the agent, not the user's own words. */
15
+ Proactive: "PROACTIVE",
16
+ };
@@ -47,4 +47,9 @@ export interface BaseConversationResponse {
47
47
  * - `SPAWN_TO`: the conversations that were spawned from this conversation.
48
48
  */
49
49
  relatedEntities?: Partial<Record<MavenAGI.RelationshipType, MavenAGI.EntityId[]>>;
50
+ /**
51
+ * Whether the conversation is spoken or written. Set by the platform and read-only —
52
+ * it cannot be supplied when creating or updating a conversation.
53
+ */
54
+ conversationMode?: MavenAGI.ConversationMode;
50
55
  }
@@ -1,5 +1,5 @@
1
1
  import type * as MavenAGI from "../../../index";
2
- export type BotLogicItem = MavenAGI.BotLogicItem.Knowledge | MavenAGI.BotLogicItem.Actions | MavenAGI.BotLogicItem.Form | MavenAGI.BotLogicItem.Safety | MavenAGI.BotLogicItem.User | MavenAGI.BotLogicItem.Segments | MavenAGI.BotLogicItem.IntelligentFields | MavenAGI.BotLogicItem.Charters;
2
+ export type BotLogicItem = MavenAGI.BotLogicItem.Knowledge | MavenAGI.BotLogicItem.Actions | MavenAGI.BotLogicItem.Form | MavenAGI.BotLogicItem.Safety | MavenAGI.BotLogicItem.User | MavenAGI.BotLogicItem.Segments | MavenAGI.BotLogicItem.IntelligentFields | MavenAGI.BotLogicItem.Charters | MavenAGI.BotLogicItem.Steering;
3
3
  export declare namespace BotLogicItem {
4
4
  interface Knowledge extends MavenAGI.BotLogicKnowledgeItem {
5
5
  type: "knowledge";
@@ -25,4 +25,7 @@ export declare namespace BotLogicItem {
25
25
  interface Charters extends MavenAGI.BotLogicChartersItem {
26
26
  type: "charters";
27
27
  }
28
+ interface Steering extends MavenAGI.BotLogicSteeringItem {
29
+ type: "steering";
30
+ }
28
31
  }
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * Present when this response was triggered by a steering ask (WELCOME or PROACTIVE) rather than a user message. The steering message itself is not returned in the conversation.
4
+ */
5
+ export interface BotLogicSteeringItem {
6
+ /** The ask type that triggered this response. */
7
+ askType: MavenAGI.AskType;
8
+ /** The steering text the agent was given, if any. */
9
+ text?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,4 +6,17 @@ export interface ConversationExecutedActionPrecondition extends MavenAGI.Precond
6
6
  appId?: string;
7
7
  /** Restricts which round the action must have executed in. Defaults to ANY when omitted, matching an action executed in any round. */
8
8
  conversationRound?: MavenAGI.ConversationRound;
9
+ /**
10
+ * Restricts the match to executions whose returned data satisfies this condition.
11
+ * When omitted, any execution of the action matches regardless of what it returned.
12
+ *
13
+ * Actions may return `{response, data}`, where `data` is a JSON object persisted
14
+ * alongside the response. This gates the precondition on what the action returned
15
+ * rather than only on whether it ran.
16
+ *
17
+ * The precondition is met when *some* execution of the action in scope returned data
18
+ * satisfying this condition. An action that executed but returned no data never
19
+ * matches, except via `universal` `IS_UNDETERMINED`.
20
+ */
21
+ dataCondition?: MavenAGI.ObjectCondition;
9
22
  }
@@ -0,0 +1,10 @@
1
+ /** Whether a conversation is spoken or written. */
2
+ export declare const ConversationMode: {
3
+ /**
4
+ * A spoken conversation — phone or realtime audio. */
5
+ readonly Voice: "VOICE";
6
+ /**
7
+ * A written conversation. The default for any conversation the platform does not identify as voice. */
8
+ readonly Text: "TEXT";
9
+ };
10
+ export type ConversationMode = (typeof ConversationMode)[keyof typeof ConversationMode] | string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ConversationMode = void 0;
5
+ /** Whether a conversation is spoken or written. */
6
+ exports.ConversationMode = {
7
+ /**
8
+ * A spoken conversation — phone or realtime audio. */
9
+ Voice: "VOICE",
10
+ /**
11
+ * A written conversation. The default for any conversation the platform does not identify as voice. */
12
+ Text: "TEXT",
13
+ };
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A precondition based on the mode — voice or text — the conversation is running in.
4
+ *
5
+ * The mode is set by the platform and is not customer-writable.
6
+ */
7
+ export interface ConversationModePrecondition extends MavenAGI.PreconditionBase {
8
+ /** The mode the conversation must be running in for the precondition to be met. Omit the operator for an exact match, or set it to NOT to invert (NOT + VOICE is equivalent to TEXT). Any other operator is rejected with a 400. */
9
+ conversationMode: MavenAGI.ConversationMode;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  import type * as MavenAGI from "../../../index";
2
- export type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted | MavenAGI.ConversationPrecondition.ResponseConfig | MavenAGI.ConversationPrecondition.App | MavenAGI.ConversationPrecondition.ConversationState | MavenAGI.ConversationPrecondition.IntelligentField;
2
+ export type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted | MavenAGI.ConversationPrecondition.ResponseConfig | MavenAGI.ConversationPrecondition.App | MavenAGI.ConversationPrecondition.ConversationState | MavenAGI.ConversationPrecondition.ConversationMode | MavenAGI.ConversationPrecondition.IntelligentField;
3
3
  export declare namespace ConversationPrecondition {
4
4
  interface Tags extends MavenAGI.TagsPrecondition {
5
5
  conversationPreconditionType: "tags";
@@ -19,6 +19,9 @@ export declare namespace ConversationPrecondition {
19
19
  interface ConversationState extends MavenAGI.ConversationStatePrecondition {
20
20
  conversationPreconditionType: "conversationState";
21
21
  }
22
+ interface ConversationMode extends MavenAGI.ConversationModePrecondition {
23
+ conversationPreconditionType: "conversationMode";
24
+ }
22
25
  interface IntelligentField extends MavenAGI.IntelligentFieldPrecondition {
23
26
  conversationPreconditionType: "intelligentField";
24
27
  }
@@ -1,5 +1,5 @@
1
1
  import type * as MavenAGI from "../../../index";
2
- export type ConversationPreconditionResponse = MavenAGI.ConversationPreconditionResponse.Tags | MavenAGI.ConversationPreconditionResponse.Metadata | MavenAGI.ConversationPreconditionResponse.ActionExecuted | MavenAGI.ConversationPreconditionResponse.ResponseConfig | MavenAGI.ConversationPreconditionResponse.App | MavenAGI.ConversationPreconditionResponse.ConversationState | MavenAGI.ConversationPreconditionResponse.IntelligentField;
2
+ export type ConversationPreconditionResponse = MavenAGI.ConversationPreconditionResponse.Tags | MavenAGI.ConversationPreconditionResponse.Metadata | MavenAGI.ConversationPreconditionResponse.ActionExecuted | MavenAGI.ConversationPreconditionResponse.ResponseConfig | MavenAGI.ConversationPreconditionResponse.App | MavenAGI.ConversationPreconditionResponse.ConversationState | MavenAGI.ConversationPreconditionResponse.ConversationMode | MavenAGI.ConversationPreconditionResponse.IntelligentField;
3
3
  export declare namespace ConversationPreconditionResponse {
4
4
  interface Tags extends MavenAGI.TagsPrecondition {
5
5
  conversationPreconditionType: "tags";
@@ -19,6 +19,9 @@ export declare namespace ConversationPreconditionResponse {
19
19
  interface ConversationState extends MavenAGI.ConversationStatePrecondition {
20
20
  conversationPreconditionType: "conversationState";
21
21
  }
22
+ interface ConversationMode extends MavenAGI.ConversationModePrecondition {
23
+ conversationPreconditionType: "conversationMode";
24
+ }
22
25
  interface IntelligentField extends MavenAGI.IntelligentFieldPreconditionResponse {
23
26
  conversationPreconditionType: "intelligentField";
24
27
  }
@@ -12,6 +12,7 @@ import type * as MavenAGI from "../../../index";
12
12
  * deleted: false,
13
13
  * open: false,
14
14
  * llmEnabled: true,
15
+ * conversationMode: MavenAGI.ConversationMode.Text,
15
16
  * analysis: {
16
17
  * resolutionStatus: MavenAGI.ResolutionStatus.Resolved,
17
18
  * sentiment: MavenAGI.Sentiment.Positive,
@@ -21,5 +21,6 @@ export declare const EntityType: {
21
21
  readonly AgentVariant: "AGENT_VARIANT";
22
22
  readonly ConfigSnapshot: "CONFIG_SNAPSHOT";
23
23
  readonly Asset: "ASSET";
24
+ readonly TrafficConfig: "TRAFFIC_CONFIG";
24
25
  };
25
26
  export type EntityType = (typeof EntityType)[keyof typeof EntityType] | string;
@@ -25,4 +25,5 @@ exports.EntityType = {
25
25
  AgentVariant: "AGENT_VARIANT",
26
26
  ConfigSnapshot: "CONFIG_SNAPSHOT",
27
27
  Asset: "ASSET",
28
+ TrafficConfig: "TRAFFIC_CONFIG",
28
29
  };
@@ -0,0 +1,13 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A condition on one entry inside a JSON object, addressed by path.
4
+ */
5
+ export interface KeyValueEntryCondition {
6
+ /**
7
+ * Dot-separated path to a value inside the object, e.g. `name` or `customer.tier`. Array elements are indexed with brackets (`orders[0].id`), and a key containing a dot needs bracket notation (`['a.b']`). A path that reaches nothing resolves to undetermined rather than failing.
8
+ * The path must address a single value. Wildcards, filters, slices and recursive descent (`orders[*].total`, `$..total`) address many values and are rejected, as is a path with a syntax error.
9
+ */
10
+ path: string;
11
+ /** The condition to evaluate against the value at `path`. */
12
+ condition: MavenAGI.IntelligentFieldCondition;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as MavenAGI from "../../../index";
2
+ /**
3
+ * A condition on a JSON object.
4
+ */
5
+ export type ObjectCondition = MavenAGI.ObjectCondition.Entry;
6
+ export declare namespace ObjectCondition {
7
+ interface Entry extends MavenAGI.KeyValueEntryCondition {
8
+ objectConditionType: "entry";
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,7 @@ export * from "./AppUserIdentifyingPropertyType";
15
15
  export * from "./AppUserRequest";
16
16
  export * from "./AppUserResponse";
17
17
  export * from "./ArraySettingsSchemaEntry";
18
+ export * from "./AskType";
18
19
  export * from "./AttachmentRequest";
19
20
  export * from "./AttachmentResponse";
20
21
  export * from "./AttachmentStatus";
@@ -41,6 +42,7 @@ export * from "./BotLogicKnowledgeDetail";
41
42
  export * from "./BotLogicKnowledgeItem";
42
43
  export * from "./BotLogicSafetyItem";
43
44
  export * from "./BotLogicSegmentsItem";
45
+ export * from "./BotLogicSteeringItem";
44
46
  export * from "./BotLogicUserItem";
45
47
  export * from "./BotMessage";
46
48
  export * from "./BotOAuthButtonResponse";
@@ -63,6 +65,8 @@ export * from "./ConversationKickoffExecutionResponse";
63
65
  export * from "./ConversationKickoffStatus";
64
66
  export * from "./ConversationMessageBase";
65
67
  export * from "./ConversationMessageResponse";
68
+ export * from "./ConversationMode";
69
+ export * from "./ConversationModePrecondition";
66
70
  export * from "./ConversationPrecondition";
67
71
  export * from "./ConversationPreconditionResponse";
68
72
  export * from "./ConversationPreview";
@@ -120,6 +124,7 @@ export * from "./IntelligentFieldPreconditionResponse";
120
124
  export * from "./IntelligentFieldValueResponse";
121
125
  export * from "./IpInfo";
122
126
  export * from "./JsonSchemaSettingsSchemaEntry";
127
+ export * from "./KeyValueEntryCondition";
123
128
  export * from "./KnowledgeContextByEntities";
124
129
  export * from "./KnowledgeContextByEntityTypes";
125
130
  export * from "./KnowledgeContextFilter";
@@ -141,6 +146,7 @@ export * from "./NumericMembershipCondition";
141
146
  export * from "./NumericMembershipOperator";
142
147
  export * from "./OAuthAuthenticationMethod";
143
148
  export * from "./OAuthSettingsSchemaEntry";
149
+ export * from "./ObjectCondition";
144
150
  export * from "./OneOfSettingsSchemaEntry";
145
151
  export * from "./OsInfo";
146
152
  export * from "./OsType";
@@ -31,6 +31,7 @@ __exportStar(require("./AppUserIdentifyingPropertyType"), exports);
31
31
  __exportStar(require("./AppUserRequest"), exports);
32
32
  __exportStar(require("./AppUserResponse"), exports);
33
33
  __exportStar(require("./ArraySettingsSchemaEntry"), exports);
34
+ __exportStar(require("./AskType"), exports);
34
35
  __exportStar(require("./AttachmentRequest"), exports);
35
36
  __exportStar(require("./AttachmentResponse"), exports);
36
37
  __exportStar(require("./AttachmentStatus"), exports);
@@ -57,6 +58,7 @@ __exportStar(require("./BotLogicKnowledgeDetail"), exports);
57
58
  __exportStar(require("./BotLogicKnowledgeItem"), exports);
58
59
  __exportStar(require("./BotLogicSafetyItem"), exports);
59
60
  __exportStar(require("./BotLogicSegmentsItem"), exports);
61
+ __exportStar(require("./BotLogicSteeringItem"), exports);
60
62
  __exportStar(require("./BotLogicUserItem"), exports);
61
63
  __exportStar(require("./BotMessage"), exports);
62
64
  __exportStar(require("./BotOAuthButtonResponse"), exports);
@@ -79,6 +81,8 @@ __exportStar(require("./ConversationKickoffExecutionResponse"), exports);
79
81
  __exportStar(require("./ConversationKickoffStatus"), exports);
80
82
  __exportStar(require("./ConversationMessageBase"), exports);
81
83
  __exportStar(require("./ConversationMessageResponse"), exports);
84
+ __exportStar(require("./ConversationMode"), exports);
85
+ __exportStar(require("./ConversationModePrecondition"), exports);
82
86
  __exportStar(require("./ConversationPrecondition"), exports);
83
87
  __exportStar(require("./ConversationPreconditionResponse"), exports);
84
88
  __exportStar(require("./ConversationPreview"), exports);
@@ -136,6 +140,7 @@ __exportStar(require("./IntelligentFieldPreconditionResponse"), exports);
136
140
  __exportStar(require("./IntelligentFieldValueResponse"), exports);
137
141
  __exportStar(require("./IpInfo"), exports);
138
142
  __exportStar(require("./JsonSchemaSettingsSchemaEntry"), exports);
143
+ __exportStar(require("./KeyValueEntryCondition"), exports);
139
144
  __exportStar(require("./KnowledgeContextByEntities"), exports);
140
145
  __exportStar(require("./KnowledgeContextByEntityTypes"), exports);
141
146
  __exportStar(require("./KnowledgeContextFilter"), exports);
@@ -157,6 +162,7 @@ __exportStar(require("./NumericMembershipCondition"), exports);
157
162
  __exportStar(require("./NumericMembershipOperator"), exports);
158
163
  __exportStar(require("./OAuthAuthenticationMethod"), exports);
159
164
  __exportStar(require("./OAuthSettingsSchemaEntry"), exports);
165
+ __exportStar(require("./ObjectCondition"), exports);
160
166
  __exportStar(require("./OneOfSettingsSchemaEntry"), exports);
161
167
  __exportStar(require("./OsInfo"), exports);
162
168
  __exportStar(require("./OsType"), exports);
@@ -19,14 +19,49 @@ import type * as MavenAGI from "../../../index";
19
19
  * },
20
20
  * timezone: "America/New_York"
21
21
  * }
22
+ *
23
+ * @example
24
+ * {
25
+ * conversationMessageId: {
26
+ * referenceId: "message-0"
27
+ * },
28
+ * userId: {
29
+ * referenceId: "user-0"
30
+ * },
31
+ * type: MavenAGI.AskType.Welcome
32
+ * }
33
+ *
34
+ * @example
35
+ * {
36
+ * conversationMessageId: {
37
+ * referenceId: "message-0"
38
+ * },
39
+ * userId: {
40
+ * referenceId: "user-0"
41
+ * },
42
+ * type: MavenAGI.AskType.Proactive,
43
+ * text: "Inform the user that they should restart their machine."
44
+ * }
22
45
  */
23
46
  export interface AskRequest {
24
47
  /** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
25
48
  conversationMessageId: MavenAGI.EntityIdBase;
26
49
  /** Externally supplied ID to uniquely identify the user that created this message */
27
50
  userId: MavenAGI.EntityIdBase;
28
- /** The text of the message */
29
- text: string;
51
+ /**
52
+ * What prompts this assistant turn. Omit (or send USER_MESSAGE) for a normal user
53
+ * question — this is the backwards-compatible default. Use WELCOME for an agent-authored
54
+ * opener, or PROACTIVE for a message the user did not prompt.
55
+ */
56
+ type?: MavenAGI.AskType;
57
+ /**
58
+ * For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
59
+ * is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
60
+ * agent's response (a directive to the agent, not the user's own words). (Changed from
61
+ * required to optional to support the non-user turn types — existing USER_MESSAGE callers
62
+ * are unaffected.)
63
+ */
64
+ text?: string;
30
65
  /**
31
66
  * The attachments to the message. Image attachments will be sent to the LLM as additional data.
32
67
  * Non-image attachments can be stored and downloaded from the API but will not be sent to the LLM.
@@ -21,6 +21,9 @@ export declare const ConversationField: {
21
21
  readonly Languages: "Languages";
22
22
  readonly Actions: "Actions";
23
23
  readonly IncompleteActions: "IncompleteActions";
24
+ readonly ErroredActions: "ErroredActions";
25
+ readonly ActionExecutionCount: "ActionExecutionCount";
26
+ readonly ActionErrorCount: "ActionErrorCount";
24
27
  readonly Charters: "Charters";
25
28
  readonly Sources: "Sources";
26
29
  readonly CreatedAt: "CreatedAt";
@@ -25,6 +25,9 @@ exports.ConversationField = {
25
25
  Languages: "Languages",
26
26
  Actions: "Actions",
27
27
  IncompleteActions: "IncompleteActions",
28
+ ErroredActions: "ErroredActions",
29
+ ActionExecutionCount: "ActionExecutionCount",
30
+ ActionErrorCount: "ActionErrorCount",
28
31
  Charters: "Charters",
29
32
  Sources: "Sources",
30
33
  CreatedAt: "CreatedAt",
@@ -34,6 +34,8 @@ export interface ConversationFilter {
34
34
  actions?: MavenAGI.EntityIdFilter[];
35
35
  /** Filter by actions that were suggested but not completed by the AI agent */
36
36
  incompleteActions?: MavenAGI.EntityIdFilter[];
37
+ /** Filter by actions that returned an error when executed in the conversation */
38
+ erroredActions?: MavenAGI.EntityIdFilter[];
37
39
  /**
38
40
  * Filter by feedback types received in the conversation.
39
41
  * This is a legacy field that maps to Events saved in the system for `ThumbsUp`, `ThumbsDown`, and `Insert`.
@@ -8,5 +8,7 @@ export declare const NumericConversationField: {
8
8
  readonly FirstResponseTime: "FirstResponseTime";
9
9
  readonly PredictedNps: "PredictedNPS";
10
10
  readonly Csat: "Csat";
11
+ readonly ActionExecutionCount: "ActionExecutionCount";
12
+ readonly ActionErrorCount: "ActionErrorCount";
11
13
  };
12
14
  export type NumericConversationField = (typeof NumericConversationField)[keyof typeof NumericConversationField] | string;
@@ -12,4 +12,6 @@ exports.NumericConversationField = {
12
12
  FirstResponseTime: "FirstResponseTime",
13
13
  PredictedNps: "PredictedNPS",
14
14
  Csat: "Csat",
15
+ ActionExecutionCount: "ActionExecutionCount",
16
+ ActionErrorCount: "ActionErrorCount",
15
17
  };
@@ -91,10 +91,13 @@ export declare class KnowledgeClient {
91
91
  refreshKnowledgeBase(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseRefreshRequest, requestOptions?: KnowledgeClient.RequestOptions): core.HttpResponsePromise<void>;
92
92
  private __refreshKnowledgeBase;
93
93
  /**
94
- * in-progress knowledge base version.
94
+ * Cancel an in-progress knowledge base version.
95
95
  *
96
- * If the knowledge base has a version that is currently being ingested,
97
- * this will cancel the ingestion workflow and set the version status to FAILED.
96
+ * If the knowledge base has a version that is currently being ingested, this cancels the
97
+ * ingestion workflow and sets the version status to CANCELED.
98
+ *
99
+ * An app still refreshing that version finds out on its next write to it: adding or
100
+ * removing a document on a canceled version is rejected rather than succeeding.
98
101
  *
99
102
  * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to cancel ingestion for. All other entity ID fields are inferred from the request.
100
103
  * @param {MavenAGI.CancelKnowledgeBaseVersionRequest} request
@@ -462,10 +462,13 @@ class KnowledgeClient {
462
462
  });
463
463
  }
464
464
  /**
465
- * in-progress knowledge base version.
465
+ * Cancel an in-progress knowledge base version.
466
466
  *
467
- * If the knowledge base has a version that is currently being ingested,
468
- * this will cancel the ingestion workflow and set the version status to FAILED.
467
+ * If the knowledge base has a version that is currently being ingested, this cancels the
468
+ * ingestion workflow and sets the version status to CANCELED.
469
+ *
470
+ * An app still refreshing that version finds out on its next write to it: adding or
471
+ * removing a document on a canceled version is rejected rather than succeeding.
469
472
  *
470
473
  * @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to cancel ingestion for. All other entity ID fields are inferred from the request.
471
474
  * @param {MavenAGI.CancelKnowledgeBaseVersionRequest} request
@@ -1,5 +1,7 @@
1
1
  import type * as MavenAGI from "../../../index";
2
2
  export interface CancelKnowledgeBaseVersionRequest {
3
+ /** The App ID of the knowledge base to cancel. If not provided the ID of the calling app will be used. */
4
+ appId?: string;
3
5
  /** ID that uniquely identifies which knowledge base version to cancel. If not provided will use the most recent version of the knowledge base. */
4
6
  versionId?: MavenAGI.EntityIdWithoutAgent;
5
7
  }
@@ -1,6 +1,10 @@
1
- /** Whether the knowledge base version processing was successful or not. */
1
+ /** How the knowledge base version processing ended. */
2
2
  export declare const KnowledgeBaseVersionFinalizeStatus: {
3
3
  readonly Succeeded: "SUCCEEDED";
4
4
  readonly Failed: "FAILED";
5
+ /**
6
+ * Processing stopped before completing because it was cancelled, rather than because it
7
+ * failed. */
8
+ readonly Canceled: "CANCELED";
5
9
  };
6
10
  export type KnowledgeBaseVersionFinalizeStatus = (typeof KnowledgeBaseVersionFinalizeStatus)[keyof typeof KnowledgeBaseVersionFinalizeStatus] | string;
@@ -2,8 +2,12 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.KnowledgeBaseVersionFinalizeStatus = void 0;
5
- /** Whether the knowledge base version processing was successful or not. */
5
+ /** How the knowledge base version processing ended. */
6
6
  exports.KnowledgeBaseVersionFinalizeStatus = {
7
7
  Succeeded: "SUCCEEDED",
8
8
  Failed: "FAILED",
9
+ /**
10
+ * Processing stopped before completing because it was cancelled, rather than because it
11
+ * failed. */
12
+ Canceled: "CANCELED",
9
13
  };
@@ -3,5 +3,8 @@ export declare const KnowledgeBaseVersionStatus: {
3
3
  readonly Succeeded: "SUCCEEDED";
4
4
  readonly Failed: "FAILED";
5
5
  readonly InProgress: "IN_PROGRESS";
6
+ /**
7
+ * Stopped before completing, by a cancel request rather than a failure. */
8
+ readonly Canceled: "CANCELED";
6
9
  };
7
10
  export type KnowledgeBaseVersionStatus = (typeof KnowledgeBaseVersionStatus)[keyof typeof KnowledgeBaseVersionStatus] | string;
@@ -7,4 +7,7 @@ exports.KnowledgeBaseVersionStatus = {
7
7
  Succeeded: "SUCCEEDED",
8
8
  Failed: "FAILED",
9
9
  InProgress: "IN_PROGRESS",
10
+ /**
11
+ * Stopped before completing, by a cancel request rather than a failure. */
12
+ Canceled: "CANCELED",
10
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mavenagi",
3
- "version": "1.2.54",
3
+ "version": "1.2.56",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -4397,10 +4397,13 @@ await client.knowledge.refreshKnowledgeBase("help-center", {
4397
4397
  <dl>
4398
4398
  <dd>
4399
4399
 
4400
- in-progress knowledge base version.
4400
+ Cancel an in-progress knowledge base version.
4401
4401
 
4402
- If the knowledge base has a version that is currently being ingested,
4403
- this will cancel the ingestion workflow and set the version status to FAILED.
4402
+ If the knowledge base has a version that is currently being ingested, this cancels the
4403
+ ingestion workflow and sets the version status to CANCELED.
4404
+
4405
+ An app still refreshing that version finds out on its next write to it: adding or
4406
+ removing a document on a canceled version is rejected rather than succeeding.
4404
4407
  </dd>
4405
4408
  </dl>
4406
4409
  </dd>
@@ -0,0 +1,7 @@
1
+ import type * as MavenAGI from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ export declare const AskType: core.serialization.Schema<serializers.AskType.Raw, MavenAGI.AskType>;
5
+ export declare namespace AskType {
6
+ type Raw = "USER_MESSAGE" | "WELCOME" | "PROACTIVE";
7
+ }