mavenagi 0.0.0-alpha.20 → 0.0.0-alpha.22

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 (111) hide show
  1. package/README.md +19 -6
  2. package/api/resources/actions/client/Client.d.ts +1 -1
  3. package/api/resources/actions/client/Client.js +7 -4
  4. package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  5. package/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  6. package/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  7. package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  8. package/api/resources/actions/types/PreconditionBase.js +4 -0
  9. package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  10. package/api/resources/actions/types/TagsPrecondition.js +4 -0
  11. package/api/resources/actions/types/index.d.ts +4 -2
  12. package/api/resources/actions/types/index.js +4 -2
  13. package/api/resources/appSettings/client/Client.js +2 -1
  14. package/api/resources/conversation/client/Client.d.ts +20 -9
  15. package/api/resources/conversation/client/Client.js +40 -19
  16. package/api/resources/conversation/types/ConversationAnalysis.d.ts +4 -0
  17. package/api/resources/knowledge/client/Client.d.ts +4 -4
  18. package/api/resources/knowledge/client/Client.js +18 -11
  19. package/api/resources/triggers/client/Client.d.ts +1 -1
  20. package/api/resources/triggers/client/Client.js +7 -4
  21. package/api/resources/users/client/Client.d.ts +2 -2
  22. package/api/resources/users/client/Client.js +6 -4
  23. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  24. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  25. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  26. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  27. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  28. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  29. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  30. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  31. package/core/schemas/Schema.d.ts +1 -0
  32. package/core/schemas/Schema.js +1 -0
  33. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  34. package/core/schemas/builders/bigint/bigint.js +46 -0
  35. package/core/schemas/builders/bigint/index.d.ts +1 -0
  36. package/core/schemas/builders/bigint/index.js +1 -0
  37. package/core/schemas/builders/index.d.ts +1 -0
  38. package/core/schemas/builders/index.js +1 -0
  39. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  40. package/dist/api/resources/actions/client/Client.d.ts +1 -1
  41. package/dist/api/resources/actions/client/Client.js +7 -4
  42. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  43. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  44. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  45. package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  46. package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
  47. package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  48. package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
  49. package/dist/api/resources/actions/types/index.d.ts +4 -2
  50. package/dist/api/resources/actions/types/index.js +4 -2
  51. package/dist/api/resources/appSettings/client/Client.js +2 -1
  52. package/dist/api/resources/conversation/client/Client.d.ts +20 -9
  53. package/dist/api/resources/conversation/client/Client.js +40 -19
  54. package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +4 -0
  55. package/dist/api/resources/knowledge/client/Client.d.ts +4 -4
  56. package/dist/api/resources/knowledge/client/Client.js +18 -11
  57. package/dist/api/resources/triggers/client/Client.d.ts +1 -1
  58. package/dist/api/resources/triggers/client/Client.js +7 -4
  59. package/dist/api/resources/users/client/Client.d.ts +2 -2
  60. package/dist/api/resources/users/client/Client.js +6 -4
  61. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  62. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  63. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  64. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  65. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  66. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  67. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  68. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  69. package/dist/core/schemas/Schema.d.ts +1 -0
  70. package/dist/core/schemas/Schema.js +1 -0
  71. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  72. package/dist/core/schemas/builders/bigint/bigint.js +46 -0
  73. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  74. package/dist/core/schemas/builders/bigint/index.js +1 -0
  75. package/dist/core/schemas/builders/index.d.ts +1 -0
  76. package/dist/core/schemas/builders/index.js +1 -0
  77. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  78. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  79. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  80. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  81. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  82. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  83. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  84. package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  85. package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
  86. package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  87. package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  88. package/dist/serialization/resources/actions/types/index.d.ts +4 -2
  89. package/dist/serialization/resources/actions/types/index.js +4 -2
  90. package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +2 -0
  91. package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +2 -0
  92. package/dist/version.d.ts +1 -0
  93. package/dist/version.js +1 -0
  94. package/package.json +6 -1
  95. package/reference.md +30 -17
  96. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  97. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  98. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  99. package/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  100. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  101. package/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  102. package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  103. package/serialization/resources/actions/types/PreconditionBase.js +8 -0
  104. package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  105. package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  106. package/serialization/resources/actions/types/index.d.ts +4 -2
  107. package/serialization/resources/actions/types/index.js +4 -2
  108. package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +2 -0
  109. package/serialization/resources/conversation/types/ConversationAnalysis.js +2 -0
  110. package/version.d.ts +1 -0
  111. package/version.js +1 -0
@@ -37,12 +37,12 @@ export class Users {
37
37
  * },
38
38
  * identifiers: new Set([{
39
39
  * value: "joe@myapp.com",
40
- * type: MavenAGI.AppUserIdentifyingPropertyType.Email
40
+ * type: "EMAIL"
41
41
  * }]),
42
42
  * data: {
43
43
  * "name": {
44
44
  * value: "Joe",
45
- * visibility: MavenAGI.VisibilityType.Visible
45
+ * visibility: "VISIBLE"
46
46
  * }
47
47
  * }
48
48
  * })
@@ -59,7 +59,8 @@ 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.20",
62
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
63
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
63
64
  "X-Fern-Runtime": core.RUNTIME.type,
64
65
  "X-Fern-Runtime-Version": core.RUNTIME.version,
65
66
  },
@@ -148,7 +149,8 @@ export class Users {
148
149
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
149
150
  "X-Fern-Language": "JavaScript",
150
151
  "X-Fern-SDK-Name": "mavenagi",
151
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
152
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
153
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
152
154
  "X-Fern-Runtime": core.RUNTIME.type,
153
155
  "X-Fern-Runtime-Version": core.RUNTIME.version,
154
156
  },
@@ -1,24 +1,23 @@
1
- /// <reference types="node" />
2
- import type { Writable } from "stream";
1
+ import type { Writable } from "readable-stream";
3
2
  import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
- export declare class Node18UniversalStreamWrapper implements StreamWrapper<Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>, Uint8Array> {
3
+ export declare class Node18UniversalStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>, ReadFormat> {
5
4
  private readableStream;
6
5
  private reader;
7
6
  private events;
8
7
  private paused;
9
8
  private resumeCallback;
10
9
  private encoding;
11
- constructor(readableStream: ReadableStream<Uint8Array>);
10
+ constructor(readableStream: ReadableStream<ReadFormat>);
12
11
  on(event: string, callback: EventCallback): void;
13
12
  off(event: string, callback: EventCallback): void;
14
- pipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>;
15
- pipeTo(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>;
16
- unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): void;
13
+ pipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
14
+ pipeTo(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
15
+ unpipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): void;
17
16
  destroy(error?: Error): void;
18
17
  pause(): void;
19
18
  resume(): void;
20
19
  get isPaused(): boolean;
21
- read(): Promise<Uint8Array | undefined>;
20
+ read(): Promise<ReadFormat | undefined>;
22
21
  setEncoding(encoding: string): void;
23
22
  text(): Promise<string>;
24
23
  json<T>(): Promise<T>;
@@ -27,4 +26,5 @@ export declare class Node18UniversalStreamWrapper implements StreamWrapper<Node1
27
26
  private _error;
28
27
  private _emit;
29
28
  private _startReading;
29
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
30
30
  }
@@ -162,10 +162,12 @@ export class Node18UniversalStreamWrapper {
162
162
  const chunks = [];
163
163
  while (true) {
164
164
  const { done, value } = yield this.reader.read();
165
- if (done)
165
+ if (done) {
166
166
  break;
167
- if (value)
167
+ }
168
+ if (value) {
168
169
  chunks.push(value);
170
+ }
169
171
  }
170
172
  const decoder = new TextDecoder(this.encoding || "utf-8");
171
173
  return decoder.decode(yield new Blob(chunks).arrayBuffer());
@@ -219,4 +221,23 @@ export class Node18UniversalStreamWrapper {
219
221
  }
220
222
  });
221
223
  }
224
+ [Symbol.asyncIterator]() {
225
+ return {
226
+ next: () => __awaiter(this, void 0, void 0, function* () {
227
+ if (this.paused) {
228
+ yield new Promise((resolve) => {
229
+ this.resumeCallback = resolve;
230
+ });
231
+ }
232
+ const { done, value } = yield this.reader.read();
233
+ if (done) {
234
+ return { done: true, value: undefined };
235
+ }
236
+ return { done: false, value };
237
+ }),
238
+ [Symbol.asyncIterator]() {
239
+ return this;
240
+ },
241
+ };
242
+ }
222
243
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Readable, Writable } from "stream";
2
+ import type { Readable, Writable } from "readable-stream";
3
3
  import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
4
  export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
5
5
  private readableStream;
@@ -18,4 +18,5 @@ export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, B
18
18
  setEncoding(encoding?: string): void;
19
19
  text(): Promise<string>;
20
20
  json<T>(): Promise<T>;
21
+ [Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
21
22
  }
@@ -101,4 +101,20 @@ export class NodePre18StreamWrapper {
101
101
  return JSON.parse(text);
102
102
  });
103
103
  }
104
+ [Symbol.asyncIterator]() {
105
+ const readableStream = this.readableStream;
106
+ const iterator = readableStream[Symbol.asyncIterator]();
107
+ // Create and return an async iterator that yields buffers
108
+ return {
109
+ next() {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const { value, done } = yield iterator.next();
112
+ return { value: value, done };
113
+ });
114
+ },
115
+ [Symbol.asyncIterator]() {
116
+ return this;
117
+ },
118
+ };
119
+ }
104
120
  }
@@ -12,7 +12,7 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
12
12
  off(event: string, callback: EventCallback): void;
13
13
  pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
14
14
  pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
15
- unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<any>): void;
15
+ unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
16
16
  destroy(error?: Error): void;
17
17
  pause(): void;
18
18
  resume(): void;
@@ -26,5 +26,6 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
26
26
  private _error;
27
27
  private _emit;
28
28
  private _startReading;
29
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
29
30
  }
30
31
  export {};
@@ -144,10 +144,12 @@ export class UndiciStreamWrapper {
144
144
  const chunks = [];
145
145
  while (true) {
146
146
  const { done, value } = yield this.reader.read();
147
- if (done)
147
+ if (done) {
148
148
  break;
149
- if (value)
149
+ }
150
+ if (value) {
150
151
  chunks.push(value);
152
+ }
151
153
  }
152
154
  const decoder = new TextDecoder(this.encoding || "utf-8");
153
155
  return decoder.decode(yield new Blob(chunks).arrayBuffer());
@@ -201,4 +203,23 @@ export class UndiciStreamWrapper {
201
203
  }
202
204
  });
203
205
  }
206
+ [Symbol.asyncIterator]() {
207
+ return {
208
+ next: () => __awaiter(this, void 0, void 0, function* () {
209
+ if (this.paused) {
210
+ yield new Promise((resolve) => {
211
+ this.resumeCallback = resolve;
212
+ });
213
+ }
214
+ const { done, value } = yield this.reader.read();
215
+ if (done) {
216
+ return { done: true, value: undefined };
217
+ }
218
+ return { done: false, value };
219
+ }),
220
+ [Symbol.asyncIterator]() {
221
+ return this;
222
+ },
223
+ };
224
+ }
204
225
  }
@@ -13,5 +13,6 @@ export interface StreamWrapper<WritableStream, ReadFormat> {
13
13
  read(): Promise<ReadFormat | undefined>;
14
14
  text(): Promise<string>;
15
15
  json<T>(): Promise<T>;
16
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
16
17
  }
17
18
  export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
@@ -13,7 +13,7 @@ export function chooseStreamWrapper(responseBody) {
13
13
  if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
14
14
  return new (yield import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper(responseBody);
15
15
  }
16
- else if (RUNTIME.type !== "node" && typeof fetch == "function") {
16
+ else if (RUNTIME.type !== "node" && typeof fetch === "function") {
17
17
  return new (yield import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody);
18
18
  }
19
19
  else {
@@ -8,6 +8,7 @@ export interface BaseSchema<Raw, Parsed> {
8
8
  getType: () => SchemaType | SchemaType;
9
9
  }
10
10
  export declare const SchemaType: {
11
+ readonly BIGINT: "bigint";
11
12
  readonly DATE: "date";
12
13
  readonly ENUM: "enum";
13
14
  readonly LIST: "list";
@@ -1,4 +1,5 @@
1
1
  export const SchemaType = {
2
+ BIGINT: "bigint",
2
3
  DATE: "date",
3
4
  ENUM: "enum",
4
5
  LIST: "list",
@@ -0,0 +1,2 @@
1
+ import { Schema } from "../../Schema";
2
+ export declare function bigint(): Schema<string, bigint>;
@@ -0,0 +1,46 @@
1
+ import { SchemaType } from "../../Schema";
2
+ import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType";
3
+ import { maybeSkipValidation } from "../../utils/maybeSkipValidation";
4
+ import { getSchemaUtils } from "../schema-utils";
5
+ export function bigint() {
6
+ const baseSchema = {
7
+ parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
8
+ if (typeof raw !== "string") {
9
+ return {
10
+ ok: false,
11
+ errors: [
12
+ {
13
+ path: breadcrumbsPrefix,
14
+ message: getErrorMessageForIncorrectType(raw, "string"),
15
+ },
16
+ ],
17
+ };
18
+ }
19
+ return {
20
+ ok: true,
21
+ value: BigInt(raw),
22
+ };
23
+ },
24
+ json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
25
+ if (typeof bigint === "bigint") {
26
+ return {
27
+ ok: true,
28
+ value: bigint.toString(),
29
+ };
30
+ }
31
+ else {
32
+ return {
33
+ ok: false,
34
+ errors: [
35
+ {
36
+ path: breadcrumbsPrefix,
37
+ message: getErrorMessageForIncorrectType(bigint, "bigint"),
38
+ },
39
+ ],
40
+ };
41
+ }
42
+ },
43
+ getType: () => SchemaType.BIGINT,
44
+ };
45
+ return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
46
+ }
@@ -0,0 +1 @@
1
+ export { bigint } from "./bigint";
@@ -0,0 +1 @@
1
+ export { bigint } from "./bigint";
@@ -1,3 +1,4 @@
1
+ export * from "./bigint";
1
2
  export * from "./date";
2
3
  export * from "./enum";
3
4
  export * from "./lazy";
@@ -1,3 +1,4 @@
1
+ export * from "./bigint";
1
2
  export * from "./date";
2
3
  export * from "./enum";
3
4
  export * from "./lazy";
@@ -8,9 +8,13 @@ function getTypeAsString(value) {
8
8
  if (value === null) {
9
9
  return "null";
10
10
  }
11
+ if (value instanceof BigInt) {
12
+ return "BigInt";
13
+ }
11
14
  switch (typeof value) {
12
15
  case "string":
13
16
  return `"${value}"`;
17
+ case "bigint":
14
18
  case "number":
15
19
  case "boolean":
16
20
  case "undefined":
@@ -52,7 +52,7 @@ export declare class Actions {
52
52
  * userFormParameters: [],
53
53
  * precondition: {
54
54
  * preconditionType: "group",
55
- * operator: MavenAGI.PreconditionGroupOperator.And,
55
+ * operator: "AND",
56
56
  * preconditions: [{
57
57
  * preconditionType: "user",
58
58
  * key: "userKey"
@@ -41,7 +41,7 @@ export class Actions {
41
41
  * userFormParameters: [],
42
42
  * precondition: {
43
43
  * preconditionType: "group",
44
- * operator: MavenAGI.PreconditionGroupOperator.And,
44
+ * operator: "AND",
45
45
  * preconditions: [{
46
46
  * preconditionType: "user",
47
47
  * key: "userKey"
@@ -64,7 +64,8 @@ export class Actions {
64
64
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
65
65
  "X-Fern-Language": "JavaScript",
66
66
  "X-Fern-SDK-Name": "mavenagi",
67
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
67
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
68
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
68
69
  "X-Fern-Runtime": core.RUNTIME.type,
69
70
  "X-Fern-Runtime-Version": core.RUNTIME.version,
70
71
  },
@@ -153,7 +154,8 @@ export class Actions {
153
154
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
154
155
  "X-Fern-Language": "JavaScript",
155
156
  "X-Fern-SDK-Name": "mavenagi",
156
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
157
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
158
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
157
159
  "X-Fern-Runtime": core.RUNTIME.type,
158
160
  "X-Fern-Runtime-Version": core.RUNTIME.version,
159
161
  },
@@ -241,7 +243,8 @@ export class Actions {
241
243
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
242
244
  "X-Fern-Language": "JavaScript",
243
245
  "X-Fern-SDK-Name": "mavenagi",
244
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
246
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
247
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
245
248
  "X-Fern-Runtime": core.RUNTIME.type,
246
249
  "X-Fern-Runtime-Version": core.RUNTIME.version,
247
250
  },
@@ -2,9 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
- export interface ConversationExecutedActionPrecondition {
6
- /** Operator to apply to this precondition */
7
- operator?: MavenAGI.PreconditionOperator;
5
+ export interface ConversationExecutedActionPrecondition extends MavenAGI.PreconditionBase {
8
6
  /** ID of an action that must have executed in this conversation for the precondition to be met */
9
7
  actionId: string;
10
8
  /** App ID that the given actionId belongs to. If not provided, the calling appId will be used. */
@@ -2,14 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
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 | MavenAGI.ConversationPrecondition.ActionExecuted;
5
+ export declare type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted;
9
6
  export declare namespace ConversationPrecondition {
10
- interface Tags {
7
+ interface Tags extends MavenAGI.TagsPrecondition {
11
8
  conversationPreconditionType: "tags";
12
- value: Set<string>;
13
9
  }
14
10
  interface Metadata extends MavenAGI.MetadataPrecondition {
15
11
  conversationPreconditionType: "metadata";
@@ -2,9 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as MavenAGI from "../../../index";
5
- export interface MetadataPrecondition {
6
- /** Operator to apply to this precondition */
7
- operator?: MavenAGI.PreconditionOperator;
5
+ export interface MetadataPrecondition extends MavenAGI.PreconditionBase {
8
6
  /** The key that must be present in the metadata for a precondition to be met */
9
7
  key: string;
10
8
  /** If set, the value must match the metadata value for the given key */
@@ -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 PreconditionBase {
6
+ /** Operator to apply to this precondition */
7
+ operator?: MavenAGI.PreconditionOperator;
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
+ import * as MavenAGI from "../../../index";
5
+ export interface TagsPrecondition extends MavenAGI.PreconditionBase {
6
+ /** The tags that must be present in the conversation context for the precondition to be met */
7
+ tags: Set<string>;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -3,9 +3,11 @@ export * from "./ActionParameter";
3
3
  export * from "./ActionRequest";
4
4
  export * from "./ActionResponse";
5
5
  export * from "./Precondition";
6
- export * from "./MetadataPrecondition";
7
6
  export * from "./PreconditionOperator";
7
+ export * from "./PreconditionBase";
8
+ export * from "./MetadataPrecondition";
8
9
  export * from "./ConversationPrecondition";
9
- export * from "./PreconditionGroup";
10
10
  export * from "./PreconditionGroupOperator";
11
+ export * from "./PreconditionGroup";
12
+ export * from "./TagsPrecondition";
11
13
  export * from "./ConversationExecutedActionPrecondition";
@@ -44,7 +44,8 @@ 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.20",
47
+ "X-Fern-SDK-Version": "0.0.0-alpha.22",
48
+ "User-Agent": "mavenagi/0.0.0-alpha.22",
48
49
  "X-Fern-Runtime": core.RUNTIME.type,
49
50
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
51
  },
@@ -46,16 +46,27 @@ export declare class Conversation {
46
46
  * conversationId: {
47
47
  * referenceId: "string"
48
48
  * },
49
- * messages: [{}],
49
+ * messages: [{
50
+ * conversationMessageId: {
51
+ * referenceId: "string"
52
+ * },
53
+ * userId: {
54
+ * referenceId: "string"
55
+ * },
56
+ * text: "string",
57
+ * userMessageType: "USER",
58
+ * createdAt: "2024-01-15T09:30:00Z",
59
+ * updatedAt: "2024-01-15T09:30:00Z"
60
+ * }],
50
61
  * responseConfig: {
51
- * capabilities: [MavenAGI.Capability.Markdown],
62
+ * capabilities: ["MARKDOWN"],
52
63
  * isCopilot: true,
53
- * responseLength: MavenAGI.ResponseLength.Short
64
+ * responseLength: "SHORT"
54
65
  * },
55
66
  * subject: "string",
56
67
  * url: "string",
57
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
58
- * updatedAt: new Date("2024-01-15T09:30:00.000Z"),
68
+ * createdAt: "2024-01-15T09:30:00Z",
69
+ * updatedAt: "2024-01-15T09:30:00Z",
59
70
  * tags: new Set(["string"]),
60
71
  * metadata: {
61
72
  * "string": "string"
@@ -97,9 +108,9 @@ export declare class Conversation {
97
108
  * referenceId: "string"
98
109
  * },
99
110
  * text: "string",
100
- * userMessageType: MavenAGI.UserConversationMessageType.User,
101
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
102
- * updatedAt: new Date("2024-01-15T09:30:00.000Z")
111
+ * userMessageType: "USER",
112
+ * createdAt: "2024-01-15T09:30:00Z",
113
+ * updatedAt: "2024-01-15T09:30:00Z"
103
114
  * }])
104
115
  */
105
116
  appendNewMessages(conversationId: string, request: MavenAGI.ConversationMessageRequest[], requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
@@ -184,7 +195,7 @@ export declare class Conversation {
184
195
  * conversationMessageId: {
185
196
  * referenceId: "string"
186
197
  * },
187
- * type: MavenAGI.FeedbackType.ThumbsUp,
198
+ * type: "THUMBS_UP",
188
199
  * text: "string"
189
200
  * })
190
201
  */