mavenagi 0.0.0-alpha.17 → 0.0.0-alpha.19

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 (94) hide show
  1. package/api/resources/actions/client/Client.d.ts +12 -4
  2. package/api/resources/actions/client/Client.js +15 -7
  3. package/api/resources/actions/types/ActionBase.d.ts +1 -1
  4. package/api/resources/actions/types/ActionRequest.d.ts +12 -4
  5. package/api/resources/actions/types/ActionResponse.d.ts +12 -4
  6. package/api/resources/actions/types/ConversationPrecondition.d.ts +17 -0
  7. package/api/resources/actions/types/MetadataPrecondition.d.ts +12 -0
  8. package/api/resources/actions/types/Precondition.d.ts +31 -0
  9. package/api/resources/actions/types/Precondition.js +4 -0
  10. package/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  11. package/api/resources/actions/types/PreconditionGroup.js +4 -0
  12. package/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  13. package/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  14. package/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  15. package/api/resources/actions/types/PreconditionOperator.js +6 -0
  16. package/api/resources/actions/types/index.d.ts +6 -1
  17. package/api/resources/actions/types/index.js +6 -1
  18. package/api/resources/appSettings/client/Client.js +1 -1
  19. package/api/resources/conversation/client/Client.js +10 -10
  20. package/api/resources/conversation/types/ConversationAnalysis.d.ts +1 -1
  21. package/api/resources/knowledge/client/Client.js +7 -7
  22. package/api/resources/triggers/client/Client.js +3 -3
  23. package/api/resources/users/client/Client.js +2 -2
  24. package/dist/api/resources/actions/client/Client.d.ts +12 -4
  25. package/dist/api/resources/actions/client/Client.js +15 -7
  26. package/dist/api/resources/actions/types/ActionBase.d.ts +1 -1
  27. package/dist/api/resources/actions/types/ActionRequest.d.ts +12 -4
  28. package/dist/api/resources/actions/types/ActionResponse.d.ts +12 -4
  29. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +17 -0
  30. package/dist/api/resources/actions/types/ConversationPrecondition.js +4 -0
  31. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +12 -0
  32. package/dist/api/resources/actions/types/MetadataPrecondition.js +4 -0
  33. package/dist/api/resources/actions/types/Precondition.d.ts +31 -0
  34. package/dist/api/resources/actions/types/Precondition.js +4 -0
  35. package/dist/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  36. package/dist/api/resources/actions/types/PreconditionGroup.js +4 -0
  37. package/dist/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  38. package/dist/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  39. package/dist/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  40. package/dist/api/resources/actions/types/PreconditionOperator.js +6 -0
  41. package/dist/api/resources/actions/types/index.d.ts +6 -1
  42. package/dist/api/resources/actions/types/index.js +6 -1
  43. package/dist/api/resources/appSettings/client/Client.js +1 -1
  44. package/dist/api/resources/conversation/client/Client.js +10 -10
  45. package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +1 -1
  46. package/dist/api/resources/knowledge/client/Client.js +7 -7
  47. package/dist/api/resources/triggers/client/Client.js +3 -3
  48. package/dist/api/resources/users/client/Client.js +2 -2
  49. package/dist/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  50. package/dist/serialization/resources/actions/types/ActionBase.js +2 -2
  51. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +18 -0
  52. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +16 -0
  53. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +15 -0
  54. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +10 -0
  55. package/dist/serialization/resources/actions/types/Precondition.d.ts +22 -0
  56. package/dist/serialization/resources/actions/types/Precondition.js +19 -0
  57. package/dist/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  58. package/dist/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  59. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  60. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  61. package/dist/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  62. package/dist/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  63. package/dist/serialization/resources/actions/types/index.d.ts +6 -1
  64. package/dist/serialization/resources/actions/types/index.js +6 -1
  65. package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +1 -1
  66. package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +14 -3
  69. package/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  70. package/serialization/resources/actions/types/ActionBase.js +2 -2
  71. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +18 -0
  72. package/serialization/resources/actions/types/ConversationPrecondition.js +16 -0
  73. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +15 -0
  74. package/serialization/resources/actions/types/MetadataPrecondition.js +10 -0
  75. package/serialization/resources/actions/types/Precondition.d.ts +22 -0
  76. package/serialization/resources/actions/types/Precondition.js +19 -0
  77. package/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  78. package/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  79. package/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  80. package/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  81. package/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  82. package/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  83. package/serialization/resources/actions/types/index.d.ts +6 -1
  84. package/serialization/resources/actions/types/index.js +6 -1
  85. package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +1 -1
  86. package/serialization/resources/conversation/types/ConversationAnalysis.js +1 -1
  87. package/api/resources/actions/types/Preconditions.d.ts +0 -7
  88. package/dist/api/resources/actions/types/Preconditions.d.ts +0 -7
  89. package/dist/serialization/resources/actions/types/Preconditions.d.ts +0 -12
  90. package/dist/serialization/resources/actions/types/Preconditions.js +0 -7
  91. package/serialization/resources/actions/types/Preconditions.d.ts +0 -12
  92. package/serialization/resources/actions/types/Preconditions.js +0 -7
  93. /package/api/resources/actions/types/{Preconditions.js → ConversationPrecondition.js} +0 -0
  94. /package/{dist/api/resources/actions/types/Preconditions.js → api/resources/actions/types/MetadataPrecondition.js} +0 -0
@@ -49,10 +49,18 @@ export declare class Actions {
49
49
  * name: "Get the user's balance",
50
50
  * description: "This action calls an API to get the user's current balance.",
51
51
  * userInteractionRequired: false,
52
- * preconditions: {
53
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
54
- * },
55
- * userFormParameters: []
52
+ * userFormParameters: [],
53
+ * precondition: {
54
+ * preconditionType: "group",
55
+ * operator: MavenAGI.PreconditionGroupOperator.And,
56
+ * preconditions: [{
57
+ * preconditionType: "user",
58
+ * key: "userKey"
59
+ * }, {
60
+ * preconditionType: "user",
61
+ * key: "userKey2"
62
+ * }]
63
+ * }
56
64
  * })
57
65
  */
58
66
  createOrUpdate(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
@@ -38,10 +38,18 @@ export class Actions {
38
38
  * name: "Get the user's balance",
39
39
  * description: "This action calls an API to get the user's current balance.",
40
40
  * userInteractionRequired: false,
41
- * preconditions: {
42
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
43
- * },
44
- * userFormParameters: []
41
+ * userFormParameters: [],
42
+ * precondition: {
43
+ * preconditionType: "group",
44
+ * operator: MavenAGI.PreconditionGroupOperator.And,
45
+ * preconditions: [{
46
+ * preconditionType: "user",
47
+ * key: "userKey"
48
+ * }, {
49
+ * preconditionType: "user",
50
+ * key: "userKey2"
51
+ * }]
52
+ * }
45
53
  * })
46
54
  */
47
55
  createOrUpdate(request, requestOptions) {
@@ -56,7 +64,7 @@ export class Actions {
56
64
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
57
65
  "X-Fern-Language": "JavaScript",
58
66
  "X-Fern-SDK-Name": "mavenagi",
59
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
67
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
60
68
  "X-Fern-Runtime": core.RUNTIME.type,
61
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
62
70
  },
@@ -145,7 +153,7 @@ export class Actions {
145
153
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
146
154
  "X-Fern-Language": "JavaScript",
147
155
  "X-Fern-SDK-Name": "mavenagi",
148
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
156
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
149
157
  "X-Fern-Runtime": core.RUNTIME.type,
150
158
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
159
  },
@@ -233,7 +241,7 @@ export class Actions {
233
241
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
234
242
  "X-Fern-Language": "JavaScript",
235
243
  "X-Fern-SDK-Name": "mavenagi",
236
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
244
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
237
245
  "X-Fern-Runtime": core.RUNTIME.type,
238
246
  "X-Fern-Runtime-Version": core.RUNTIME.version,
239
247
  },
@@ -12,7 +12,7 @@ export interface ActionBase {
12
12
  /** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action */
13
13
  buttonName?: string;
14
14
  /** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
15
- preconditions: MavenAGI.Preconditions;
15
+ precondition?: MavenAGI.Precondition;
16
16
  /** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
17
17
  userFormParameters: MavenAGI.ActionParameter[];
18
18
  }
@@ -11,10 +11,18 @@ import * as MavenAGI from "../../../index";
11
11
  * name: "Get the user's balance",
12
12
  * description: "This action calls an API to get the user's current balance.",
13
13
  * userInteractionRequired: false,
14
- * preconditions: {
15
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
16
- * },
17
- * userFormParameters: []
14
+ * userFormParameters: [],
15
+ * precondition: {
16
+ * preconditionType: "group",
17
+ * operator: MavenAGI.PreconditionGroupOperator.And,
18
+ * preconditions: [{
19
+ * preconditionType: "user",
20
+ * key: "userKey"
21
+ * }, {
22
+ * preconditionType: "user",
23
+ * key: "userKey2"
24
+ * }]
25
+ * }
18
26
  * }
19
27
  */
20
28
  export interface ActionRequest extends MavenAGI.ActionBase {
@@ -15,10 +15,18 @@ 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
- * preconditions: {
19
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
20
- * },
21
- * userFormParameters: []
18
+ * userFormParameters: [],
19
+ * precondition: {
20
+ * preconditionType: "group",
21
+ * operator: MavenAGI.PreconditionGroupOperator.And,
22
+ * preconditions: [{
23
+ * preconditionType: "user",
24
+ * key: "userKey"
25
+ * }, {
26
+ * preconditionType: "user",
27
+ * key: "userKey2"
28
+ * }]
29
+ * }
22
30
  * }
23
31
  */
24
32
  export interface ActionResponse extends MavenAGI.ActionBase {
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export declare type ConversationPrecondition =
6
+ /**
7
+ * The tags that must be present in the conversation context for the precondition to be met */
8
+ MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata;
9
+ export declare namespace ConversationPrecondition {
10
+ interface Tags {
11
+ conversationPreconditionType: "tags";
12
+ value: Set<string>;
13
+ }
14
+ interface Metadata extends MavenAGI.MetadataPrecondition {
15
+ conversationPreconditionType: "metadata";
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface MetadataPrecondition {
6
+ /** Operator to apply to this precondition */
7
+ operator?: MavenAGI.PreconditionOperator;
8
+ /** The key that must be present in the metadata for a precondition to be met */
9
+ key: string;
10
+ /** If set, the value must match the metadata value for the given key */
11
+ value?: string;
12
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * preconditionType: "group",
9
+ * operator: MavenAGI.PreconditionGroupOperator.And,
10
+ * preconditions: [{
11
+ * preconditionType: "user",
12
+ * key: "userKey"
13
+ * }, {
14
+ * preconditionType: "user",
15
+ * key: "userKey2"
16
+ * }]
17
+ * }
18
+ */
19
+ export declare type Precondition = MavenAGI.Precondition.User | MavenAGI.Precondition.Conversation | MavenAGI.Precondition.Group;
20
+ export declare namespace Precondition {
21
+ interface User extends MavenAGI.MetadataPrecondition {
22
+ preconditionType: "user";
23
+ }
24
+ interface Conversation {
25
+ preconditionType: "conversation";
26
+ value: MavenAGI.ConversationPrecondition;
27
+ }
28
+ interface Group extends MavenAGI.PreconditionGroup {
29
+ preconditionType: "group";
30
+ }
31
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as MavenAGI from "../../../index";
5
+ export interface PreconditionGroup {
6
+ operator: MavenAGI.PreconditionGroupOperator;
7
+ preconditions: MavenAGI.Precondition[];
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type PreconditionGroupOperator = "AND" | "OR";
5
+ export declare const PreconditionGroupOperator: {
6
+ readonly And: "AND";
7
+ readonly Or: "OR";
8
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const PreconditionGroupOperator = {
5
+ And: "AND",
6
+ Or: "OR",
7
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type PreconditionOperator = "NOT";
5
+ export declare const PreconditionOperator: {
6
+ readonly Not: "NOT";
7
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const PreconditionOperator = {
5
+ Not: "NOT",
6
+ };
@@ -1,5 +1,10 @@
1
- export * from "./Preconditions";
2
1
  export * from "./ActionBase";
3
2
  export * from "./ActionParameter";
4
3
  export * from "./ActionRequest";
5
4
  export * from "./ActionResponse";
5
+ export * from "./Precondition";
6
+ export * from "./MetadataPrecondition";
7
+ export * from "./PreconditionOperator";
8
+ export * from "./ConversationPrecondition";
9
+ export * from "./PreconditionGroup";
10
+ export * from "./PreconditionGroupOperator";
@@ -1,5 +1,10 @@
1
- export * from "./Preconditions";
2
1
  export * from "./ActionBase";
3
2
  export * from "./ActionParameter";
4
3
  export * from "./ActionRequest";
5
4
  export * from "./ActionResponse";
5
+ export * from "./Precondition";
6
+ export * from "./MetadataPrecondition";
7
+ export * from "./PreconditionOperator";
8
+ export * from "./ConversationPrecondition";
9
+ export * from "./PreconditionGroup";
10
+ export * from "./PreconditionGroupOperator";
@@ -44,7 +44,7 @@ export class AppSettings {
44
44
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
45
45
  "X-Fern-Language": "JavaScript",
46
46
  "X-Fern-SDK-Name": "mavenagi",
47
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
47
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  },
@@ -63,7 +63,7 @@ export class Conversation {
63
63
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "mavenagi",
66
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
66
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
67
67
  "X-Fern-Runtime": core.RUNTIME.type,
68
68
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
69
  },
@@ -152,7 +152,7 @@ export class Conversation {
152
152
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
153
153
  "X-Fern-Language": "JavaScript",
154
154
  "X-Fern-SDK-Name": "mavenagi",
155
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
155
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
156
156
  "X-Fern-Runtime": core.RUNTIME.type,
157
157
  "X-Fern-Runtime-Version": core.RUNTIME.version,
158
158
  },
@@ -252,7 +252,7 @@ export class Conversation {
252
252
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
253
253
  "X-Fern-Language": "JavaScript",
254
254
  "X-Fern-SDK-Name": "mavenagi",
255
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
255
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
256
256
  "X-Fern-Runtime": core.RUNTIME.type,
257
257
  "X-Fern-Runtime-Version": core.RUNTIME.version,
258
258
  },
@@ -352,7 +352,7 @@ export class Conversation {
352
352
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
353
353
  "X-Fern-Language": "JavaScript",
354
354
  "X-Fern-SDK-Name": "mavenagi",
355
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
355
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
356
356
  "X-Fern-Runtime": core.RUNTIME.type,
357
357
  "X-Fern-Runtime-Version": core.RUNTIME.version,
358
358
  },
@@ -431,7 +431,7 @@ export class Conversation {
431
431
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
432
432
  "X-Fern-Language": "JavaScript",
433
433
  "X-Fern-SDK-Name": "mavenagi",
434
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
434
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
435
435
  "X-Fern-Runtime": core.RUNTIME.type,
436
436
  "X-Fern-Runtime-Version": core.RUNTIME.version,
437
437
  },
@@ -536,7 +536,7 @@ export class Conversation {
536
536
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
537
537
  "X-Fern-Language": "JavaScript",
538
538
  "X-Fern-SDK-Name": "mavenagi",
539
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
539
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
540
540
  "X-Fern-Runtime": core.RUNTIME.type,
541
541
  "X-Fern-Runtime-Version": core.RUNTIME.version,
542
542
  },
@@ -625,7 +625,7 @@ export class Conversation {
625
625
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
626
626
  "X-Fern-Language": "JavaScript",
627
627
  "X-Fern-SDK-Name": "mavenagi",
628
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
628
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
629
629
  "X-Fern-Runtime": core.RUNTIME.type,
630
630
  "X-Fern-Runtime-Version": core.RUNTIME.version,
631
631
  },
@@ -725,7 +725,7 @@ export class Conversation {
725
725
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
726
726
  "X-Fern-Language": "JavaScript",
727
727
  "X-Fern-SDK-Name": "mavenagi",
728
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
728
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
729
729
  "X-Fern-Runtime": core.RUNTIME.type,
730
730
  "X-Fern-Runtime-Version": core.RUNTIME.version,
731
731
  },
@@ -822,7 +822,7 @@ export class Conversation {
822
822
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
823
823
  "X-Fern-Language": "JavaScript",
824
824
  "X-Fern-SDK-Name": "mavenagi",
825
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
825
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
826
826
  "X-Fern-Runtime": core.RUNTIME.type,
827
827
  "X-Fern-Runtime-Version": core.RUNTIME.version,
828
828
  },
@@ -914,7 +914,7 @@ export class Conversation {
914
914
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
915
915
  "X-Fern-Language": "JavaScript",
916
916
  "X-Fern-SDK-Name": "mavenagi",
917
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
917
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
918
918
  "X-Fern-Runtime": core.RUNTIME.type,
919
919
  "X-Fern-Runtime-Version": core.RUNTIME.version,
920
920
  },
@@ -8,5 +8,5 @@ export interface ConversationAnalysis {
8
8
  /** Generated agent response summary of the conversation */
9
9
  agentResponse?: string;
10
10
  /** Generated sentiment of the conversation */
11
- sentiment: MavenAGI.Sentiment;
11
+ sentiment?: MavenAGI.Sentiment;
12
12
  }
@@ -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.17",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
234
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
323
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
414
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
511
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
601
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
143
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
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.17",
231
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
232
232
  "X-Fern-Runtime": core.RUNTIME.type,
233
233
  "X-Fern-Runtime-Version": core.RUNTIME.version,
234
234
  },
@@ -59,7 +59,7 @@ export class Users {
59
59
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
60
60
  "X-Fern-Language": "JavaScript",
61
61
  "X-Fern-SDK-Name": "mavenagi",
62
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
62
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
63
63
  "X-Fern-Runtime": core.RUNTIME.type,
64
64
  "X-Fern-Runtime-Version": core.RUNTIME.version,
65
65
  },
@@ -148,7 +148,7 @@ export class Users {
148
148
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
149
149
  "X-Fern-Language": "JavaScript",
150
150
  "X-Fern-SDK-Name": "mavenagi",
151
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
151
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
152
152
  "X-Fern-Runtime": core.RUNTIME.type,
153
153
  "X-Fern-Runtime-Version": core.RUNTIME.version,
154
154
  },
@@ -49,10 +49,18 @@ export declare class Actions {
49
49
  * name: "Get the user's balance",
50
50
  * description: "This action calls an API to get the user's current balance.",
51
51
  * userInteractionRequired: false,
52
- * preconditions: {
53
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
54
- * },
55
- * userFormParameters: []
52
+ * userFormParameters: [],
53
+ * precondition: {
54
+ * preconditionType: "group",
55
+ * operator: MavenAGI.PreconditionGroupOperator.And,
56
+ * preconditions: [{
57
+ * preconditionType: "user",
58
+ * key: "userKey"
59
+ * }, {
60
+ * preconditionType: "user",
61
+ * key: "userKey2"
62
+ * }]
63
+ * }
56
64
  * })
57
65
  */
58
66
  createOrUpdate(request: MavenAGI.ActionRequest, requestOptions?: Actions.RequestOptions): Promise<MavenAGI.ActionResponse>;
@@ -38,10 +38,18 @@ export class Actions {
38
38
  * name: "Get the user's balance",
39
39
  * description: "This action calls an API to get the user's current balance.",
40
40
  * userInteractionRequired: false,
41
- * preconditions: {
42
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
43
- * },
44
- * userFormParameters: []
41
+ * userFormParameters: [],
42
+ * precondition: {
43
+ * preconditionType: "group",
44
+ * operator: MavenAGI.PreconditionGroupOperator.And,
45
+ * preconditions: [{
46
+ * preconditionType: "user",
47
+ * key: "userKey"
48
+ * }, {
49
+ * preconditionType: "user",
50
+ * key: "userKey2"
51
+ * }]
52
+ * }
45
53
  * })
46
54
  */
47
55
  createOrUpdate(request, requestOptions) {
@@ -56,7 +64,7 @@ export class Actions {
56
64
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
57
65
  "X-Fern-Language": "JavaScript",
58
66
  "X-Fern-SDK-Name": "mavenagi",
59
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
67
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
60
68
  "X-Fern-Runtime": core.RUNTIME.type,
61
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
62
70
  },
@@ -145,7 +153,7 @@ export class Actions {
145
153
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
146
154
  "X-Fern-Language": "JavaScript",
147
155
  "X-Fern-SDK-Name": "mavenagi",
148
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
156
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
149
157
  "X-Fern-Runtime": core.RUNTIME.type,
150
158
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
159
  },
@@ -233,7 +241,7 @@ export class Actions {
233
241
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
234
242
  "X-Fern-Language": "JavaScript",
235
243
  "X-Fern-SDK-Name": "mavenagi",
236
- "X-Fern-SDK-Version": "0.0.0-alpha.17",
244
+ "X-Fern-SDK-Version": "0.0.0-alpha.19",
237
245
  "X-Fern-Runtime": core.RUNTIME.type,
238
246
  "X-Fern-Runtime-Version": core.RUNTIME.version,
239
247
  },
@@ -12,7 +12,7 @@ export interface ActionBase {
12
12
  /** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action */
13
13
  buttonName?: string;
14
14
  /** The preconditions that must be met for an action to be relevant to a conversation. Can be used to restrict actions to certain types of users. */
15
- preconditions: MavenAGI.Preconditions;
15
+ precondition?: MavenAGI.Precondition;
16
16
  /** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
17
17
  userFormParameters: MavenAGI.ActionParameter[];
18
18
  }
@@ -11,10 +11,18 @@ import * as MavenAGI from "../../../index";
11
11
  * name: "Get the user's balance",
12
12
  * description: "This action calls an API to get the user's current balance.",
13
13
  * userInteractionRequired: false,
14
- * preconditions: {
15
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
16
- * },
17
- * userFormParameters: []
14
+ * userFormParameters: [],
15
+ * precondition: {
16
+ * preconditionType: "group",
17
+ * operator: MavenAGI.PreconditionGroupOperator.And,
18
+ * preconditions: [{
19
+ * preconditionType: "user",
20
+ * key: "userKey"
21
+ * }, {
22
+ * preconditionType: "user",
23
+ * key: "userKey2"
24
+ * }]
25
+ * }
18
26
  * }
19
27
  */
20
28
  export interface ActionRequest extends MavenAGI.ActionBase {
@@ -15,10 +15,18 @@ 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
- * preconditions: {
19
- * requiredUserContextFieldNames: new Set(["my-billing-system.userId"])
20
- * },
21
- * userFormParameters: []
18
+ * userFormParameters: [],
19
+ * precondition: {
20
+ * preconditionType: "group",
21
+ * operator: MavenAGI.PreconditionGroupOperator.And,
22
+ * preconditions: [{
23
+ * preconditionType: "user",
24
+ * key: "userKey"
25
+ * }, {
26
+ * preconditionType: "user",
27
+ * key: "userKey2"
28
+ * }]
29
+ * }
22
30
  * }
23
31
  */
24
32
  export interface ActionResponse extends MavenAGI.ActionBase {