mavenagi 0.0.0-alpha.20 → 0.0.0-alpha.21
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.
- package/README.md +19 -6
- package/api/resources/actions/client/Client.d.ts +1 -1
- package/api/resources/actions/client/Client.js +7 -4
- package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
- package/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
- package/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
- package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/api/resources/actions/types/PreconditionBase.js +4 -0
- package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/api/resources/actions/types/TagsPrecondition.js +4 -0
- package/api/resources/actions/types/index.d.ts +4 -2
- package/api/resources/actions/types/index.js +4 -2
- package/api/resources/appSettings/client/Client.js +2 -1
- package/api/resources/conversation/client/Client.d.ts +20 -9
- package/api/resources/conversation/client/Client.js +40 -19
- package/api/resources/knowledge/client/Client.d.ts +4 -4
- package/api/resources/knowledge/client/Client.js +18 -11
- package/api/resources/triggers/client/Client.d.ts +1 -1
- package/api/resources/triggers/client/Client.js +7 -4
- package/api/resources/users/client/Client.d.ts +2 -2
- package/api/resources/users/client/Client.js +6 -4
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +46 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +1 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/api/resources/actions/client/Client.d.ts +1 -1
- package/dist/api/resources/actions/client/Client.js +7 -4
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
- package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
- package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
- package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
- package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +4 -2
- package/dist/api/resources/actions/types/index.js +4 -2
- package/dist/api/resources/appSettings/client/Client.js +2 -1
- package/dist/api/resources/conversation/client/Client.d.ts +20 -9
- package/dist/api/resources/conversation/client/Client.js +40 -19
- package/dist/api/resources/knowledge/client/Client.d.ts +4 -4
- package/dist/api/resources/knowledge/client/Client.js +18 -11
- package/dist/api/resources/triggers/client/Client.d.ts +1 -1
- package/dist/api/resources/triggers/client/Client.js +7 -4
- package/dist/api/resources/users/client/Client.d.ts +2 -2
- package/dist/api/resources/users/client/Client.js +6 -4
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +46 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +1 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
- package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
- package/dist/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
- package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
- package/dist/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
- package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/dist/serialization/resources/actions/types/index.d.ts +4 -2
- package/dist/serialization/resources/actions/types/index.js +4 -2
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +6 -1
- package/reference.md +30 -17
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
- package/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
- package/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
- package/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
- package/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
- package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/serialization/resources/actions/types/index.d.ts +4 -2
- package/serialization/resources/actions/types/index.js +4 -2
- package/version.d.ts +1 -0
- 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:
|
|
40
|
+
* type: "EMAIL"
|
|
41
41
|
* }]),
|
|
42
42
|
* data: {
|
|
43
43
|
* "name": {
|
|
44
44
|
* value: "Joe",
|
|
45
|
-
* visibility:
|
|
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.
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
63
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
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.
|
|
152
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
153
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
152
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
153
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
154
156
|
},
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
|
|
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<
|
|
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<
|
|
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<
|
|
15
|
-
pipeTo(dest: Node18UniversalStreamWrapper | Writable | WritableStream<
|
|
16
|
-
unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream<
|
|
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<
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
16
|
+
else if (RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
17
17
|
return new (yield import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody);
|
|
18
18
|
}
|
|
19
19
|
else {
|
package/core/schemas/Schema.d.ts
CHANGED
package/core/schemas/Schema.js
CHANGED
|
@@ -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";
|
|
@@ -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:
|
|
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:
|
|
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.
|
|
67
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
68
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
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.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
158
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
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.
|
|
246
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
247
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
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 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
|
+
}
|
|
@@ -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.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.21",
|
|
48
|
+
"User-Agent": "mavenagi/0.0.0-alpha.21",
|
|
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: [
|
|
62
|
+
* capabilities: ["MARKDOWN"],
|
|
52
63
|
* isCopilot: true,
|
|
53
|
-
* responseLength:
|
|
64
|
+
* responseLength: "SHORT"
|
|
54
65
|
* },
|
|
55
66
|
* subject: "string",
|
|
56
67
|
* url: "string",
|
|
57
|
-
* createdAt:
|
|
58
|
-
* updatedAt:
|
|
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:
|
|
101
|
-
* createdAt:
|
|
102
|
-
* updatedAt:
|
|
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:
|
|
198
|
+
* type: "THUMBS_UP",
|
|
188
199
|
* text: "string"
|
|
189
200
|
* })
|
|
190
201
|
*/
|