mavenagi 0.0.0-alpha.22 → 0.0.0-alpha.24
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 +27 -14
- package/api/resources/actions/client/Client.js +6 -6
- package/api/resources/appSettings/client/Client.js +2 -2
- package/api/resources/conversation/client/Client.d.ts +10 -3
- package/api/resources/conversation/client/Client.js +36 -23
- package/api/resources/conversation/client/index.d.ts +1 -1
- package/api/resources/conversation/client/index.js +1 -1
- package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
- package/api/resources/conversation/client/requests/ConversationGetRequest.js +4 -0
- package/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/api/resources/conversation/client/requests/index.js +1 -0
- package/api/resources/conversation/types/AskRequest.d.ts +7 -1
- package/api/resources/conversation/types/Attachment.d.ts +9 -0
- package/api/resources/conversation/types/Attachment.js +4 -0
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +1 -0
- package/api/resources/knowledge/client/Client.js +14 -14
- package/api/resources/triggers/client/Client.js +6 -6
- package/api/resources/users/client/Client.js +4 -4
- package/dist/api/resources/actions/client/Client.js +6 -6
- package/dist/api/resources/appSettings/client/Client.js +2 -2
- package/dist/api/resources/conversation/client/Client.d.ts +10 -3
- package/dist/api/resources/conversation/client/Client.js +36 -23
- package/dist/api/resources/conversation/client/index.d.ts +1 -1
- package/dist/api/resources/conversation/client/index.js +1 -1
- package/dist/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
- package/dist/api/resources/conversation/client/requests/ConversationGetRequest.js +4 -0
- package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversation/client/requests/index.js +1 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +7 -1
- package/dist/api/resources/conversation/types/Attachment.d.ts +9 -0
- package/dist/api/resources/conversation/types/Attachment.js +4 -0
- package/dist/api/resources/conversation/types/index.d.ts +1 -0
- package/dist/api/resources/conversation/types/index.js +1 -0
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +1 -0
- package/dist/api/resources/knowledge/client/Client.js +14 -14
- package/dist/api/resources/triggers/client/Client.js +6 -6
- package/dist/api/resources/users/client/Client.js +4 -4
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/dist/serialization/resources/conversation/types/Attachment.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/Attachment.js +8 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +24 -2
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/Attachment.d.ts +13 -0
- package/serialization/resources/conversation/types/Attachment.js +8 -0
- package/serialization/resources/conversation/types/index.d.ts +1 -0
- package/serialization/resources/conversation/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mavenagi TypeScript Library
|
|
2
2
|
|
|
3
|
-
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fmavenagi%2Fmavenagi-node)
|
|
4
4
|
[](https://www.npmjs.com/package/mavenagi)
|
|
5
5
|
|
|
6
6
|
The Mavenagi TypeScript library provides convenient access to the Mavenagi API from TypeScript.
|
|
@@ -58,23 +58,17 @@ await client.conversation.initialize({
|
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
##
|
|
61
|
+
## Request And Response Types
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
64
|
+
following namespace:
|
|
65
65
|
|
|
66
66
|
```typescript
|
|
67
|
-
import {
|
|
67
|
+
import { MavenAGI } from "mavenagi";
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
if (err instanceof MavenAGIError) {
|
|
73
|
-
console.log(err.statusCode);
|
|
74
|
-
console.log(err.message);
|
|
75
|
-
console.log(err.body);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
69
|
+
const request: MavenAGI.ConversationGetRequest = {
|
|
70
|
+
...
|
|
71
|
+
};
|
|
78
72
|
```
|
|
79
73
|
|
|
80
74
|
## Aborting Requests
|
|
@@ -115,6 +109,25 @@ const client = new MavenAGIClient({
|
|
|
115
109
|
});
|
|
116
110
|
```
|
|
117
111
|
|
|
112
|
+
## Exception Handling
|
|
113
|
+
|
|
114
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
115
|
+
will be thrown.
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { MavenAGIError } from "mavenagi";
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
await client.conversation.initialize(...);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
if (err instanceof MavenAGIError) {
|
|
124
|
+
console.log(err.statusCode);
|
|
125
|
+
console.log(err.message);
|
|
126
|
+
console.log(err.body);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
118
131
|
## Advanced
|
|
119
132
|
|
|
120
133
|
### Retries
|
|
@@ -64,8 +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.
|
|
68
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
67
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
68
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
69
69
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
70
70
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
71
71
|
},
|
|
@@ -154,8 +154,8 @@ export class Actions {
|
|
|
154
154
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
155
155
|
"X-Fern-Language": "JavaScript",
|
|
156
156
|
"X-Fern-SDK-Name": "mavenagi",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
158
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
158
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
159
159
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
160
160
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
161
161
|
},
|
|
@@ -243,8 +243,8 @@ export class Actions {
|
|
|
243
243
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
244
244
|
"X-Fern-Language": "JavaScript",
|
|
245
245
|
"X-Fern-SDK-Name": "mavenagi",
|
|
246
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
247
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
246
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
247
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
248
248
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
249
249
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
250
250
|
},
|
|
@@ -44,8 +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.
|
|
48
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
48
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
},
|
|
@@ -78,6 +78,7 @@ export declare class Conversation {
|
|
|
78
78
|
* Get a conversation
|
|
79
79
|
*
|
|
80
80
|
* @param {string} conversationId - The ID of the conversation to get
|
|
81
|
+
* @param {MavenAGI.ConversationGetRequest} request
|
|
81
82
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
83
|
*
|
|
83
84
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -85,9 +86,11 @@ export declare class Conversation {
|
|
|
85
86
|
* @throws {@link MavenAGI.ServerError}
|
|
86
87
|
*
|
|
87
88
|
* @example
|
|
88
|
-
* await client.conversation.get("string"
|
|
89
|
+
* await client.conversation.get("string", {
|
|
90
|
+
* appId: "string"
|
|
91
|
+
* })
|
|
89
92
|
*/
|
|
90
|
-
get(conversationId: string, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
93
|
+
get(conversationId: string, request?: MavenAGI.ConversationGetRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
91
94
|
/**
|
|
92
95
|
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same id already exists, it will be ignored.
|
|
93
96
|
*
|
|
@@ -133,7 +136,11 @@ export declare class Conversation {
|
|
|
133
136
|
* userId: {
|
|
134
137
|
* referenceId: "user-1"
|
|
135
138
|
* },
|
|
136
|
-
* text: "How do I reset my password?"
|
|
139
|
+
* text: "How do I reset my password?",
|
|
140
|
+
* attachments: [{
|
|
141
|
+
* type: "image/png",
|
|
142
|
+
* content: "iVBORw0KGgo..."
|
|
143
|
+
* }]
|
|
137
144
|
* })
|
|
138
145
|
*/
|
|
139
146
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
@@ -74,8 +74,8 @@ export class Conversation {
|
|
|
74
74
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "mavenagi",
|
|
77
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
78
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
77
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
78
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
79
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
81
|
},
|
|
@@ -143,6 +143,7 @@ export class Conversation {
|
|
|
143
143
|
* Get a conversation
|
|
144
144
|
*
|
|
145
145
|
* @param {string} conversationId - The ID of the conversation to get
|
|
146
|
+
* @param {MavenAGI.ConversationGetRequest} request
|
|
146
147
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
148
|
*
|
|
148
149
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -150,11 +151,18 @@ export class Conversation {
|
|
|
150
151
|
* @throws {@link MavenAGI.ServerError}
|
|
151
152
|
*
|
|
152
153
|
* @example
|
|
153
|
-
* await client.conversation.get("string"
|
|
154
|
+
* await client.conversation.get("string", {
|
|
155
|
+
* appId: "string"
|
|
156
|
+
* })
|
|
154
157
|
*/
|
|
155
|
-
get(conversationId, requestOptions) {
|
|
158
|
+
get(conversationId, request = {}, requestOptions) {
|
|
156
159
|
var _a, _b;
|
|
157
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const { appId } = request;
|
|
162
|
+
const _queryParams = {};
|
|
163
|
+
if (appId != null) {
|
|
164
|
+
_queryParams["appId"] = appId;
|
|
165
|
+
}
|
|
158
166
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
159
167
|
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
160
168
|
method: "GET",
|
|
@@ -164,12 +172,13 @@ export class Conversation {
|
|
|
164
172
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
165
173
|
"X-Fern-Language": "JavaScript",
|
|
166
174
|
"X-Fern-SDK-Name": "mavenagi",
|
|
167
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
168
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
175
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
176
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
169
177
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
170
178
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
171
179
|
},
|
|
172
180
|
contentType: "application/json",
|
|
181
|
+
queryParameters: _queryParams,
|
|
173
182
|
requestType: "json",
|
|
174
183
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
175
184
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -265,8 +274,8 @@ export class Conversation {
|
|
|
265
274
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
266
275
|
"X-Fern-Language": "JavaScript",
|
|
267
276
|
"X-Fern-SDK-Name": "mavenagi",
|
|
268
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
269
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
277
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
278
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
270
279
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
271
280
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
272
281
|
},
|
|
@@ -351,7 +360,11 @@ export class Conversation {
|
|
|
351
360
|
* userId: {
|
|
352
361
|
* referenceId: "user-1"
|
|
353
362
|
* },
|
|
354
|
-
* text: "How do I reset my password?"
|
|
363
|
+
* text: "How do I reset my password?",
|
|
364
|
+
* attachments: [{
|
|
365
|
+
* type: "image/png",
|
|
366
|
+
* content: "iVBORw0KGgo..."
|
|
367
|
+
* }]
|
|
355
368
|
* })
|
|
356
369
|
*/
|
|
357
370
|
ask(conversationId, request, requestOptions) {
|
|
@@ -366,8 +379,8 @@ export class Conversation {
|
|
|
366
379
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
367
380
|
"X-Fern-Language": "JavaScript",
|
|
368
381
|
"X-Fern-SDK-Name": "mavenagi",
|
|
369
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
370
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
382
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
383
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
371
384
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
372
385
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
373
386
|
},
|
|
@@ -446,8 +459,8 @@ export class Conversation {
|
|
|
446
459
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
447
460
|
"X-Fern-Language": "JavaScript",
|
|
448
461
|
"X-Fern-SDK-Name": "mavenagi",
|
|
449
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
450
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
462
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
463
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
451
464
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
452
465
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
453
466
|
},
|
|
@@ -552,8 +565,8 @@ export class Conversation {
|
|
|
552
565
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
553
566
|
"X-Fern-Language": "JavaScript",
|
|
554
567
|
"X-Fern-SDK-Name": "mavenagi",
|
|
555
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
556
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
568
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
569
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
557
570
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
558
571
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
559
572
|
},
|
|
@@ -642,8 +655,8 @@ export class Conversation {
|
|
|
642
655
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
643
656
|
"X-Fern-Language": "JavaScript",
|
|
644
657
|
"X-Fern-SDK-Name": "mavenagi",
|
|
645
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
646
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
658
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
659
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
647
660
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
648
661
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
649
662
|
},
|
|
@@ -743,8 +756,8 @@ export class Conversation {
|
|
|
743
756
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
744
757
|
"X-Fern-Language": "JavaScript",
|
|
745
758
|
"X-Fern-SDK-Name": "mavenagi",
|
|
746
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
747
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
759
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
760
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
748
761
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
749
762
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
750
763
|
},
|
|
@@ -841,8 +854,8 @@ export class Conversation {
|
|
|
841
854
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
842
855
|
"X-Fern-Language": "JavaScript",
|
|
843
856
|
"X-Fern-SDK-Name": "mavenagi",
|
|
844
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
845
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
857
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
858
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
846
859
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
847
860
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
848
861
|
},
|
|
@@ -934,8 +947,8 @@ export class Conversation {
|
|
|
934
947
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
935
948
|
"X-Fern-Language": "JavaScript",
|
|
936
949
|
"X-Fern-SDK-Name": "mavenagi",
|
|
937
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
938
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
950
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
951
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
939
952
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
940
953
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
941
954
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* appId: "string"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ConversationGetRequest {
|
|
11
|
+
/**
|
|
12
|
+
* The App ID of the conversation to get. If not provided the ID of the calling app will be used.
|
|
13
|
+
*/
|
|
14
|
+
appId?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ConversationGetRequest } from "./ConversationGetRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,7 +11,11 @@ import * as MavenAGI from "../../../index";
|
|
|
11
11
|
* userId: {
|
|
12
12
|
* referenceId: "user-1"
|
|
13
13
|
* },
|
|
14
|
-
* text: "How do I reset my password?"
|
|
14
|
+
* text: "How do I reset my password?",
|
|
15
|
+
* attachments: [{
|
|
16
|
+
* type: "image/png",
|
|
17
|
+
* content: "iVBORw0KGgo..."
|
|
18
|
+
* }]
|
|
15
19
|
* }
|
|
16
20
|
*/
|
|
17
21
|
export interface AskRequest {
|
|
@@ -21,4 +25,6 @@ export interface AskRequest {
|
|
|
21
25
|
userId: MavenAGI.EntityIdBase;
|
|
22
26
|
/** The text of the message */
|
|
23
27
|
text: string;
|
|
28
|
+
/** The attachments to the message. */
|
|
29
|
+
attachments?: MavenAGI.Attachment[];
|
|
24
30
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface Attachment {
|
|
5
|
+
/** The mime-type of the attachment. Supported types are {image/jpeg, image/jpg, image/png, image/gif, image/webp}. */
|
|
6
|
+
type: string;
|
|
7
|
+
/** The attachment data. */
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
package/api/resources/index.d.ts
CHANGED
package/api/resources/index.js
CHANGED
|
@@ -51,8 +51,8 @@ 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.
|
|
55
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
55
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
},
|
|
@@ -141,8 +141,8 @@ export class Knowledge {
|
|
|
141
141
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
142
|
"X-Fern-Language": "JavaScript",
|
|
143
143
|
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
144
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
145
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -233,8 +233,8 @@ export class Knowledge {
|
|
|
233
233
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
234
234
|
"X-Fern-Language": "JavaScript",
|
|
235
235
|
"X-Fern-SDK-Name": "mavenagi",
|
|
236
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
237
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
236
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
237
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
238
238
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
239
239
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
240
240
|
},
|
|
@@ -323,8 +323,8 @@ export class Knowledge {
|
|
|
323
323
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
324
324
|
"X-Fern-Language": "JavaScript",
|
|
325
325
|
"X-Fern-SDK-Name": "mavenagi",
|
|
326
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
327
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
326
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
327
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
328
328
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
329
329
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
330
330
|
},
|
|
@@ -415,8 +415,8 @@ export class Knowledge {
|
|
|
415
415
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
416
416
|
"X-Fern-Language": "JavaScript",
|
|
417
417
|
"X-Fern-SDK-Name": "mavenagi",
|
|
418
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
419
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
418
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
419
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
420
420
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
421
421
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
422
422
|
},
|
|
@@ -513,8 +513,8 @@ export class Knowledge {
|
|
|
513
513
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
514
514
|
"X-Fern-Language": "JavaScript",
|
|
515
515
|
"X-Fern-SDK-Name": "mavenagi",
|
|
516
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
517
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
516
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
517
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
518
518
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
519
519
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
520
520
|
},
|
|
@@ -604,8 +604,8 @@ export class Knowledge {
|
|
|
604
604
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
605
605
|
"X-Fern-Language": "JavaScript",
|
|
606
606
|
"X-Fern-SDK-Name": "mavenagi",
|
|
607
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
608
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
607
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
608
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
609
609
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
610
610
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
611
611
|
},
|
|
@@ -51,8 +51,8 @@ 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.
|
|
55
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
54
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
55
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
},
|
|
@@ -141,8 +141,8 @@ export class Triggers {
|
|
|
141
141
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
142
142
|
"X-Fern-Language": "JavaScript",
|
|
143
143
|
"X-Fern-SDK-Name": "mavenagi",
|
|
144
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
145
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
144
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
145
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
146
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
147
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
148
148
|
},
|
|
@@ -230,8 +230,8 @@ export class Triggers {
|
|
|
230
230
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
231
231
|
"X-Fern-Language": "JavaScript",
|
|
232
232
|
"X-Fern-SDK-Name": "mavenagi",
|
|
233
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
234
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
233
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
234
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
235
235
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
236
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
237
|
},
|
|
@@ -59,8 +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.
|
|
63
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
62
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
63
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
64
64
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
65
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
66
|
},
|
|
@@ -149,8 +149,8 @@ export class Users {
|
|
|
149
149
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
150
150
|
"X-Fern-Language": "JavaScript",
|
|
151
151
|
"X-Fern-SDK-Name": "mavenagi",
|
|
152
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
153
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
152
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
153
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
154
154
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
155
155
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
156
156
|
},
|
|
@@ -64,8 +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.
|
|
68
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
67
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
68
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
69
69
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
70
70
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
71
71
|
},
|
|
@@ -154,8 +154,8 @@ export class Actions {
|
|
|
154
154
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
155
155
|
"X-Fern-Language": "JavaScript",
|
|
156
156
|
"X-Fern-SDK-Name": "mavenagi",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
158
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
158
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
159
159
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
160
160
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
161
161
|
},
|
|
@@ -243,8 +243,8 @@ export class Actions {
|
|
|
243
243
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
244
244
|
"X-Fern-Language": "JavaScript",
|
|
245
245
|
"X-Fern-SDK-Name": "mavenagi",
|
|
246
|
-
"X-Fern-SDK-Version": "0.0.0-alpha.
|
|
247
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
246
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
247
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
248
248
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
249
249
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
250
250
|
},
|
|
@@ -44,8 +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.
|
|
48
|
-
"User-Agent": "mavenagi/0.0.0-alpha.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.24",
|
|
48
|
+
"User-Agent": "mavenagi/0.0.0-alpha.24",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
},
|
|
@@ -78,6 +78,7 @@ export declare class Conversation {
|
|
|
78
78
|
* Get a conversation
|
|
79
79
|
*
|
|
80
80
|
* @param {string} conversationId - The ID of the conversation to get
|
|
81
|
+
* @param {MavenAGI.ConversationGetRequest} request
|
|
81
82
|
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
83
|
*
|
|
83
84
|
* @throws {@link MavenAGI.NotFoundError}
|
|
@@ -85,9 +86,11 @@ export declare class Conversation {
|
|
|
85
86
|
* @throws {@link MavenAGI.ServerError}
|
|
86
87
|
*
|
|
87
88
|
* @example
|
|
88
|
-
* await client.conversation.get("string"
|
|
89
|
+
* await client.conversation.get("string", {
|
|
90
|
+
* appId: "string"
|
|
91
|
+
* })
|
|
89
92
|
*/
|
|
90
|
-
get(conversationId: string, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
93
|
+
get(conversationId: string, request?: MavenAGI.ConversationGetRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
91
94
|
/**
|
|
92
95
|
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same id already exists, it will be ignored.
|
|
93
96
|
*
|
|
@@ -133,7 +136,11 @@ export declare class Conversation {
|
|
|
133
136
|
* userId: {
|
|
134
137
|
* referenceId: "user-1"
|
|
135
138
|
* },
|
|
136
|
-
* text: "How do I reset my password?"
|
|
139
|
+
* text: "How do I reset my password?",
|
|
140
|
+
* attachments: [{
|
|
141
|
+
* type: "image/png",
|
|
142
|
+
* content: "iVBORw0KGgo..."
|
|
143
|
+
* }]
|
|
137
144
|
* })
|
|
138
145
|
*/
|
|
139
146
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|