mavenagi 1.2.5 → 1.2.6
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/Client.js +2 -2
- package/README.md +21 -21
- package/api/resources/agentCapabilities/types/ActionCapability.d.ts +1 -1
- package/api/resources/analytics/client/Client.d.ts +10 -0
- package/api/resources/analytics/client/Client.js +83 -0
- package/api/resources/commons/types/AppUserResponse.d.ts +12 -0
- package/api/resources/commons/types/ConversationSummary.d.ts +4 -0
- package/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
- package/api/resources/commons/types/UserDataWithReference.js +3 -0
- package/api/resources/commons/types/index.d.ts +1 -0
- package/api/resources/commons/types/index.js +1 -0
- package/dist/Client.js +2 -2
- package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +1 -1
- package/dist/api/resources/analytics/client/Client.d.ts +10 -0
- package/dist/api/resources/analytics/client/Client.js +83 -0
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +12 -0
- package/dist/api/resources/commons/types/ConversationSummary.d.ts +4 -0
- package/dist/api/resources/commons/types/UserDataWithReference.d.ts +5 -0
- package/dist/api/resources/commons/types/UserDataWithReference.js +3 -0
- package/dist/api/resources/commons/types/index.d.ts +1 -0
- package/dist/api/resources/commons/types/index.js +1 -0
- package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +1 -1
- package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.js +2 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.js +2 -0
- package/dist/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
- package/dist/serialization/resources/commons/types/UserDataWithReference.js +45 -0
- package/dist/serialization/resources/commons/types/index.d.ts +1 -0
- package/dist/serialization/resources/commons/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 +88 -0
- package/serialization/resources/agentCapabilities/types/ActionCapability.js +1 -1
- package/serialization/resources/commons/types/AppUserResponse.d.ts +2 -0
- package/serialization/resources/commons/types/AppUserResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationSummary.js +2 -0
- package/serialization/resources/commons/types/UserDataWithReference.d.ts +11 -0
- package/serialization/resources/commons/types/UserDataWithReference.js +45 -0
- package/serialization/resources/commons/types/index.d.ts +1 -0
- package/serialization/resources/commons/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.js
CHANGED
|
@@ -59,8 +59,8 @@ class MavenAGIClient {
|
|
|
59
59
|
"X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
|
|
60
60
|
"X-Fern-Language": "JavaScript",
|
|
61
61
|
"X-Fern-SDK-Name": "mavenagi",
|
|
62
|
-
"X-Fern-SDK-Version": "1.2.
|
|
63
|
-
"User-Agent": "mavenagi/1.2.
|
|
62
|
+
"X-Fern-SDK-Version": "1.2.6",
|
|
63
|
+
"User-Agent": "mavenagi/1.2.6",
|
|
64
64
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
65
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
66
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ try {
|
|
|
107
107
|
You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
|
|
108
108
|
|
|
109
109
|
```typescript
|
|
110
|
-
const response = await client.
|
|
110
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
111
111
|
const stream: ReadableStream<Uint8Array> = response.stream();
|
|
112
112
|
// const arrayBuffer: ArrayBuffer = await response.arrayBuffer();
|
|
113
113
|
// const blob: Blob = response.blob();
|
|
@@ -133,7 +133,7 @@ import { createWriteStream } from 'fs';
|
|
|
133
133
|
import { Readable } from 'stream';
|
|
134
134
|
import { pipeline } from 'stream/promises';
|
|
135
135
|
|
|
136
|
-
const response = await client.
|
|
136
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
137
137
|
|
|
138
138
|
const stream = response.stream();
|
|
139
139
|
const nodeStream = Readable.fromWeb(stream);
|
|
@@ -152,7 +152,7 @@ await pipeline(nodeStream, writeStream);
|
|
|
152
152
|
```ts
|
|
153
153
|
import { writeFile } from 'fs/promises';
|
|
154
154
|
|
|
155
|
-
const response = await client.
|
|
155
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
156
156
|
|
|
157
157
|
const arrayBuffer = await response.arrayBuffer();
|
|
158
158
|
await writeFile('path/to/file', Buffer.from(arrayBuffer));
|
|
@@ -168,7 +168,7 @@ await writeFile('path/to/file', Buffer.from(arrayBuffer));
|
|
|
168
168
|
```ts
|
|
169
169
|
import { writeFile } from 'fs/promises';
|
|
170
170
|
|
|
171
|
-
const response = await client.
|
|
171
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
172
172
|
|
|
173
173
|
const blob = await response.blob();
|
|
174
174
|
const arrayBuffer = await blob.arrayBuffer();
|
|
@@ -185,7 +185,7 @@ await writeFile('output.bin', Buffer.from(arrayBuffer));
|
|
|
185
185
|
```ts
|
|
186
186
|
import { writeFile } from 'fs/promises';
|
|
187
187
|
|
|
188
|
-
const response = await client.
|
|
188
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
189
189
|
|
|
190
190
|
const bytes = await response.bytes();
|
|
191
191
|
await writeFile('path/to/file', bytes);
|
|
@@ -206,7 +206,7 @@ await writeFile('path/to/file', bytes);
|
|
|
206
206
|
<summary>ReadableStream (most-efficient)</summary>
|
|
207
207
|
|
|
208
208
|
```ts
|
|
209
|
-
const response = await client.
|
|
209
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
210
210
|
|
|
211
211
|
const stream = response.stream();
|
|
212
212
|
await Bun.write('path/to/file', stream);
|
|
@@ -220,7 +220,7 @@ await Bun.write('path/to/file', stream);
|
|
|
220
220
|
<summary>ArrayBuffer</summary>
|
|
221
221
|
|
|
222
222
|
```ts
|
|
223
|
-
const response = await client.
|
|
223
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
224
224
|
|
|
225
225
|
const arrayBuffer = await response.arrayBuffer();
|
|
226
226
|
await Bun.write('path/to/file', arrayBuffer);
|
|
@@ -234,7 +234,7 @@ await Bun.write('path/to/file', arrayBuffer);
|
|
|
234
234
|
<summary>Blob</summary>
|
|
235
235
|
|
|
236
236
|
```ts
|
|
237
|
-
const response = await client.
|
|
237
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
238
238
|
|
|
239
239
|
const blob = await response.blob();
|
|
240
240
|
await Bun.write('path/to/file', blob);
|
|
@@ -248,7 +248,7 @@ await Bun.write('path/to/file', blob);
|
|
|
248
248
|
<summary>Bytes (UIntArray8)</summary>
|
|
249
249
|
|
|
250
250
|
```ts
|
|
251
|
-
const response = await client.
|
|
251
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
252
252
|
|
|
253
253
|
const bytes = await response.bytes();
|
|
254
254
|
await Bun.write('path/to/file', bytes);
|
|
@@ -269,7 +269,7 @@ await Bun.write('path/to/file', bytes);
|
|
|
269
269
|
<summary>ReadableStream (most-efficient)</summary>
|
|
270
270
|
|
|
271
271
|
```ts
|
|
272
|
-
const response = await client.
|
|
272
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
273
273
|
|
|
274
274
|
const stream = response.stream();
|
|
275
275
|
const file = await Deno.open('path/to/file', { write: true, create: true });
|
|
@@ -284,7 +284,7 @@ await stream.pipeTo(file.writable);
|
|
|
284
284
|
<summary>ArrayBuffer</summary>
|
|
285
285
|
|
|
286
286
|
```ts
|
|
287
|
-
const response = await client.
|
|
287
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
288
288
|
|
|
289
289
|
const arrayBuffer = await response.arrayBuffer();
|
|
290
290
|
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
@@ -298,7 +298,7 @@ await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
|
298
298
|
<summary>Blob</summary>
|
|
299
299
|
|
|
300
300
|
```ts
|
|
301
|
-
const response = await client.
|
|
301
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
302
302
|
|
|
303
303
|
const blob = await response.blob();
|
|
304
304
|
const arrayBuffer = await blob.arrayBuffer();
|
|
@@ -313,7 +313,7 @@ await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
|
313
313
|
<summary>Bytes (UIntArray8)</summary>
|
|
314
314
|
|
|
315
315
|
```ts
|
|
316
|
-
const response = await client.
|
|
316
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
317
317
|
|
|
318
318
|
const bytes = await response.bytes();
|
|
319
319
|
await Deno.writeFile('path/to/file', bytes);
|
|
@@ -334,7 +334,7 @@ await Deno.writeFile('path/to/file', bytes);
|
|
|
334
334
|
<summary>Blob (most-efficient)</summary>
|
|
335
335
|
|
|
336
336
|
```ts
|
|
337
|
-
const response = await client.
|
|
337
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
338
338
|
|
|
339
339
|
const blob = await response.blob();
|
|
340
340
|
const url = URL.createObjectURL(blob);
|
|
@@ -355,7 +355,7 @@ URL.revokeObjectURL(url);
|
|
|
355
355
|
<summary>ReadableStream</summary>
|
|
356
356
|
|
|
357
357
|
```ts
|
|
358
|
-
const response = await client.
|
|
358
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
359
359
|
|
|
360
360
|
const stream = response.stream();
|
|
361
361
|
const reader = stream.getReader();
|
|
@@ -386,7 +386,7 @@ URL.revokeObjectURL(url);
|
|
|
386
386
|
<summary>ArrayBuffer</summary>
|
|
387
387
|
|
|
388
388
|
```ts
|
|
389
|
-
const response = await client.
|
|
389
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
390
390
|
|
|
391
391
|
const arrayBuffer = await response.arrayBuffer();
|
|
392
392
|
const blob = new Blob([arrayBuffer]);
|
|
@@ -408,7 +408,7 @@ URL.revokeObjectURL(url);
|
|
|
408
408
|
<summary>Bytes (UIntArray8)</summary>
|
|
409
409
|
|
|
410
410
|
```ts
|
|
411
|
-
const response = await client.
|
|
411
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
412
412
|
|
|
413
413
|
const bytes = await response.bytes();
|
|
414
414
|
const blob = new Blob([bytes]);
|
|
@@ -439,7 +439,7 @@ URL.revokeObjectURL(url);
|
|
|
439
439
|
<summary>ReadableStream</summary>
|
|
440
440
|
|
|
441
441
|
```ts
|
|
442
|
-
const response = await client.
|
|
442
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
443
443
|
|
|
444
444
|
const stream = response.stream();
|
|
445
445
|
const text = await new Response(stream).text();
|
|
@@ -453,7 +453,7 @@ const text = await new Response(stream).text();
|
|
|
453
453
|
<summary>ArrayBuffer</summary>
|
|
454
454
|
|
|
455
455
|
```ts
|
|
456
|
-
const response = await client.
|
|
456
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
457
457
|
|
|
458
458
|
const arrayBuffer = await response.arrayBuffer();
|
|
459
459
|
const text = new TextDecoder().decode(arrayBuffer);
|
|
@@ -467,7 +467,7 @@ const text = new TextDecoder().decode(arrayBuffer);
|
|
|
467
467
|
<summary>Blob</summary>
|
|
468
468
|
|
|
469
469
|
```ts
|
|
470
|
-
const response = await client.
|
|
470
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
471
471
|
|
|
472
472
|
const blob = await response.blob();
|
|
473
473
|
const text = await blob.text();
|
|
@@ -481,7 +481,7 @@ const text = await blob.text();
|
|
|
481
481
|
<summary>Bytes (UIntArray8)</summary>
|
|
482
482
|
|
|
483
483
|
```ts
|
|
484
|
-
const response = await client.
|
|
484
|
+
const response = await client.analytics.exportConversationTable(...);
|
|
485
485
|
|
|
486
486
|
const bytes = await response.bytes();
|
|
487
487
|
const text = new TextDecoder().decode(bytes);
|
|
@@ -2,7 +2,7 @@ import * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface ActionCapability extends MavenAGI.AgentCapabilityBase {
|
|
3
3
|
userInteractionRequired: boolean;
|
|
4
4
|
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
5
|
-
buttonName
|
|
5
|
+
buttonName?: string;
|
|
6
6
|
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
7
7
|
userFormParameters: MavenAGI.ActionParameter[];
|
|
8
8
|
precondition?: MavenAGI.Precondition;
|
|
@@ -136,6 +136,16 @@ export declare class Analytics {
|
|
|
136
136
|
*/
|
|
137
137
|
getConversationChart(request: MavenAGI.ConversationChartRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<MavenAGI.ChartResponse>;
|
|
138
138
|
private __getConversationChart;
|
|
139
|
+
/**
|
|
140
|
+
* Export the conversation analytics table to a CSV file.
|
|
141
|
+
*
|
|
142
|
+
* This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
|
|
143
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
144
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
145
|
+
* @throws {@link MavenAGI.ServerError}
|
|
146
|
+
*/
|
|
147
|
+
exportConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
148
|
+
private __exportConversationTable;
|
|
139
149
|
/**
|
|
140
150
|
* Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
141
151
|
*
|
|
@@ -314,6 +314,89 @@ class Analytics {
|
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* Export the conversation analytics table to a CSV file.
|
|
319
|
+
*
|
|
320
|
+
* This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
|
|
321
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
322
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
323
|
+
* @throws {@link MavenAGI.ServerError}
|
|
324
|
+
*/
|
|
325
|
+
exportConversationTable(request, requestOptions) {
|
|
326
|
+
return core.HttpResponsePromise.fromPromise(this.__exportConversationTable(request, requestOptions));
|
|
327
|
+
}
|
|
328
|
+
__exportConversationTable(request, requestOptions) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
331
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
332
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
333
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
334
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
335
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
336
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
337
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/tables/conversations/export"),
|
|
338
|
+
method: "POST",
|
|
339
|
+
headers: _headers,
|
|
340
|
+
contentType: "application/json",
|
|
341
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
342
|
+
requestType: "json",
|
|
343
|
+
body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
344
|
+
responseType: "binary-response",
|
|
345
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
346
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
347
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
348
|
+
});
|
|
349
|
+
if (_response.ok) {
|
|
350
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
351
|
+
}
|
|
352
|
+
if (_response.error.reason === "status-code") {
|
|
353
|
+
switch (_response.error.statusCode) {
|
|
354
|
+
case 404:
|
|
355
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
356
|
+
unrecognizedObjectKeys: "passthrough",
|
|
357
|
+
allowUnrecognizedUnionMembers: true,
|
|
358
|
+
allowUnrecognizedEnumValues: true,
|
|
359
|
+
breadcrumbsPrefix: ["response"],
|
|
360
|
+
}), _response.rawResponse);
|
|
361
|
+
case 400:
|
|
362
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
363
|
+
unrecognizedObjectKeys: "passthrough",
|
|
364
|
+
allowUnrecognizedUnionMembers: true,
|
|
365
|
+
allowUnrecognizedEnumValues: true,
|
|
366
|
+
breadcrumbsPrefix: ["response"],
|
|
367
|
+
}), _response.rawResponse);
|
|
368
|
+
case 500:
|
|
369
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
370
|
+
unrecognizedObjectKeys: "passthrough",
|
|
371
|
+
allowUnrecognizedUnionMembers: true,
|
|
372
|
+
allowUnrecognizedEnumValues: true,
|
|
373
|
+
breadcrumbsPrefix: ["response"],
|
|
374
|
+
}), _response.rawResponse);
|
|
375
|
+
default:
|
|
376
|
+
throw new errors.MavenAGIError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.body,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
switch (_response.error.reason) {
|
|
384
|
+
case "non-json":
|
|
385
|
+
throw new errors.MavenAGIError({
|
|
386
|
+
statusCode: _response.error.statusCode,
|
|
387
|
+
body: _response.error.rawBody,
|
|
388
|
+
rawResponse: _response.rawResponse,
|
|
389
|
+
});
|
|
390
|
+
case "timeout":
|
|
391
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/tables/conversations/export.");
|
|
392
|
+
case "unknown":
|
|
393
|
+
throw new errors.MavenAGIError({
|
|
394
|
+
message: _response.error.errorMessage,
|
|
395
|
+
rawResponse: _response.rawResponse,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
317
400
|
/**
|
|
318
401
|
* Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
319
402
|
*
|
|
@@ -27,6 +27,16 @@ import * as MavenAGI from "../../../index";
|
|
|
27
27
|
* },
|
|
28
28
|
* defaultUserData: {
|
|
29
29
|
* "name": "Joe"
|
|
30
|
+
* },
|
|
31
|
+
* agentUserData: {
|
|
32
|
+
* "name": [{
|
|
33
|
+
* value: "Joe",
|
|
34
|
+
* visibility: MavenAGI.VisibilityType.Visible,
|
|
35
|
+
* userId: {
|
|
36
|
+
* appId: "myapp",
|
|
37
|
+
* referenceId: "user0"
|
|
38
|
+
* }
|
|
39
|
+
* }]
|
|
30
40
|
* }
|
|
31
41
|
* }
|
|
32
42
|
*/
|
|
@@ -39,4 +49,6 @@ export interface AppUserResponse extends MavenAGI.AppUser {
|
|
|
39
49
|
allUserData: Record<string, Record<string, string>>;
|
|
40
50
|
/** Default data for this user */
|
|
41
51
|
defaultUserData: Record<string, string>;
|
|
52
|
+
/** All user data for this user, including reverse indexable user data */
|
|
53
|
+
agentUserData: Record<string, MavenAGI.UserDataWithReference[]>;
|
|
42
54
|
}
|
|
@@ -33,4 +33,8 @@ export interface ConversationSummary {
|
|
|
33
33
|
humanAgentsWithInserts: string[];
|
|
34
34
|
/** The names of all users that have a message of type `USER` on the conversation. */
|
|
35
35
|
users: string[];
|
|
36
|
+
/** The text of the last user message in the conversation. */
|
|
37
|
+
lastUserMessage?: string;
|
|
38
|
+
/** The text of the last bot message in the conversation. */
|
|
39
|
+
lastBotMessage?: string;
|
|
36
40
|
}
|
|
@@ -46,6 +46,7 @@ export * from "./AppUserIdentifier";
|
|
|
46
46
|
export * from "./AppUserIdentifyingPropertyType";
|
|
47
47
|
export * from "./AppUser";
|
|
48
48
|
export * from "./UserData";
|
|
49
|
+
export * from "./UserDataWithReference";
|
|
49
50
|
export * from "./VisibilityType";
|
|
50
51
|
export * from "./AppUserRequest";
|
|
51
52
|
export * from "./AppUserResponse";
|
|
@@ -62,6 +62,7 @@ __exportStar(require("./AppUserIdentifier"), exports);
|
|
|
62
62
|
__exportStar(require("./AppUserIdentifyingPropertyType"), exports);
|
|
63
63
|
__exportStar(require("./AppUser"), exports);
|
|
64
64
|
__exportStar(require("./UserData"), exports);
|
|
65
|
+
__exportStar(require("./UserDataWithReference"), exports);
|
|
65
66
|
__exportStar(require("./VisibilityType"), exports);
|
|
66
67
|
__exportStar(require("./AppUserRequest"), exports);
|
|
67
68
|
__exportStar(require("./AppUserResponse"), exports);
|
package/dist/Client.js
CHANGED
|
@@ -59,8 +59,8 @@ class MavenAGIClient {
|
|
|
59
59
|
"X-Agent-Id": _options === null || _options === void 0 ? void 0 : _options.agentId,
|
|
60
60
|
"X-Fern-Language": "JavaScript",
|
|
61
61
|
"X-Fern-SDK-Name": "mavenagi",
|
|
62
|
-
"X-Fern-SDK-Version": "1.2.
|
|
63
|
-
"User-Agent": "mavenagi/1.2.
|
|
62
|
+
"X-Fern-SDK-Version": "1.2.6",
|
|
63
|
+
"User-Agent": "mavenagi/1.2.6",
|
|
64
64
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
65
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
66
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -2,7 +2,7 @@ import * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface ActionCapability extends MavenAGI.AgentCapabilityBase {
|
|
3
3
|
userInteractionRequired: boolean;
|
|
4
4
|
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
5
|
-
buttonName
|
|
5
|
+
buttonName?: string;
|
|
6
6
|
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
7
7
|
userFormParameters: MavenAGI.ActionParameter[];
|
|
8
8
|
precondition?: MavenAGI.Precondition;
|
|
@@ -136,6 +136,16 @@ export declare class Analytics {
|
|
|
136
136
|
*/
|
|
137
137
|
getConversationChart(request: MavenAGI.ConversationChartRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<MavenAGI.ChartResponse>;
|
|
138
138
|
private __getConversationChart;
|
|
139
|
+
/**
|
|
140
|
+
* Export the conversation analytics table to a CSV file.
|
|
141
|
+
*
|
|
142
|
+
* This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
|
|
143
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
144
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
145
|
+
* @throws {@link MavenAGI.ServerError}
|
|
146
|
+
*/
|
|
147
|
+
exportConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: Analytics.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
148
|
+
private __exportConversationTable;
|
|
139
149
|
/**
|
|
140
150
|
* Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
141
151
|
*
|
|
@@ -314,6 +314,89 @@ class Analytics {
|
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* Export the conversation analytics table to a CSV file.
|
|
319
|
+
*
|
|
320
|
+
* This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
|
|
321
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
322
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
323
|
+
* @throws {@link MavenAGI.ServerError}
|
|
324
|
+
*/
|
|
325
|
+
exportConversationTable(request, requestOptions) {
|
|
326
|
+
return core.HttpResponsePromise.fromPromise(this.__exportConversationTable(request, requestOptions));
|
|
327
|
+
}
|
|
328
|
+
__exportConversationTable(request, requestOptions) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
331
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
332
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
333
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
334
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
335
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
336
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
337
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/tables/conversations/export"),
|
|
338
|
+
method: "POST",
|
|
339
|
+
headers: _headers,
|
|
340
|
+
contentType: "application/json",
|
|
341
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
342
|
+
requestType: "json",
|
|
343
|
+
body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
344
|
+
responseType: "binary-response",
|
|
345
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
346
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
347
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
348
|
+
});
|
|
349
|
+
if (_response.ok) {
|
|
350
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
351
|
+
}
|
|
352
|
+
if (_response.error.reason === "status-code") {
|
|
353
|
+
switch (_response.error.statusCode) {
|
|
354
|
+
case 404:
|
|
355
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
356
|
+
unrecognizedObjectKeys: "passthrough",
|
|
357
|
+
allowUnrecognizedUnionMembers: true,
|
|
358
|
+
allowUnrecognizedEnumValues: true,
|
|
359
|
+
breadcrumbsPrefix: ["response"],
|
|
360
|
+
}), _response.rawResponse);
|
|
361
|
+
case 400:
|
|
362
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
363
|
+
unrecognizedObjectKeys: "passthrough",
|
|
364
|
+
allowUnrecognizedUnionMembers: true,
|
|
365
|
+
allowUnrecognizedEnumValues: true,
|
|
366
|
+
breadcrumbsPrefix: ["response"],
|
|
367
|
+
}), _response.rawResponse);
|
|
368
|
+
case 500:
|
|
369
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
370
|
+
unrecognizedObjectKeys: "passthrough",
|
|
371
|
+
allowUnrecognizedUnionMembers: true,
|
|
372
|
+
allowUnrecognizedEnumValues: true,
|
|
373
|
+
breadcrumbsPrefix: ["response"],
|
|
374
|
+
}), _response.rawResponse);
|
|
375
|
+
default:
|
|
376
|
+
throw new errors.MavenAGIError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.body,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
switch (_response.error.reason) {
|
|
384
|
+
case "non-json":
|
|
385
|
+
throw new errors.MavenAGIError({
|
|
386
|
+
statusCode: _response.error.statusCode,
|
|
387
|
+
body: _response.error.rawBody,
|
|
388
|
+
rawResponse: _response.rawResponse,
|
|
389
|
+
});
|
|
390
|
+
case "timeout":
|
|
391
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/tables/conversations/export.");
|
|
392
|
+
case "unknown":
|
|
393
|
+
throw new errors.MavenAGIError({
|
|
394
|
+
message: _response.error.errorMessage,
|
|
395
|
+
rawResponse: _response.rawResponse,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
317
400
|
/**
|
|
318
401
|
* Retrieves structured feedback data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
319
402
|
*
|
|
@@ -27,6 +27,16 @@ import * as MavenAGI from "../../../index";
|
|
|
27
27
|
* },
|
|
28
28
|
* defaultUserData: {
|
|
29
29
|
* "name": "Joe"
|
|
30
|
+
* },
|
|
31
|
+
* agentUserData: {
|
|
32
|
+
* "name": [{
|
|
33
|
+
* value: "Joe",
|
|
34
|
+
* visibility: MavenAGI.VisibilityType.Visible,
|
|
35
|
+
* userId: {
|
|
36
|
+
* appId: "myapp",
|
|
37
|
+
* referenceId: "user0"
|
|
38
|
+
* }
|
|
39
|
+
* }]
|
|
30
40
|
* }
|
|
31
41
|
* }
|
|
32
42
|
*/
|
|
@@ -39,4 +49,6 @@ export interface AppUserResponse extends MavenAGI.AppUser {
|
|
|
39
49
|
allUserData: Record<string, Record<string, string>>;
|
|
40
50
|
/** Default data for this user */
|
|
41
51
|
defaultUserData: Record<string, string>;
|
|
52
|
+
/** All user data for this user, including reverse indexable user data */
|
|
53
|
+
agentUserData: Record<string, MavenAGI.UserDataWithReference[]>;
|
|
42
54
|
}
|
|
@@ -33,4 +33,8 @@ export interface ConversationSummary {
|
|
|
33
33
|
humanAgentsWithInserts: string[];
|
|
34
34
|
/** The names of all users that have a message of type `USER` on the conversation. */
|
|
35
35
|
users: string[];
|
|
36
|
+
/** The text of the last user message in the conversation. */
|
|
37
|
+
lastUserMessage?: string;
|
|
38
|
+
/** The text of the last bot message in the conversation. */
|
|
39
|
+
lastBotMessage?: string;
|
|
36
40
|
}
|
|
@@ -46,6 +46,7 @@ export * from "./AppUserIdentifier";
|
|
|
46
46
|
export * from "./AppUserIdentifyingPropertyType";
|
|
47
47
|
export * from "./AppUser";
|
|
48
48
|
export * from "./UserData";
|
|
49
|
+
export * from "./UserDataWithReference";
|
|
49
50
|
export * from "./VisibilityType";
|
|
50
51
|
export * from "./AppUserRequest";
|
|
51
52
|
export * from "./AppUserResponse";
|
|
@@ -62,6 +62,7 @@ __exportStar(require("./AppUserIdentifier"), exports);
|
|
|
62
62
|
__exportStar(require("./AppUserIdentifyingPropertyType"), exports);
|
|
63
63
|
__exportStar(require("./AppUser"), exports);
|
|
64
64
|
__exportStar(require("./UserData"), exports);
|
|
65
|
+
__exportStar(require("./UserDataWithReference"), exports);
|
|
65
66
|
__exportStar(require("./VisibilityType"), exports);
|
|
66
67
|
__exportStar(require("./AppUserRequest"), exports);
|
|
67
68
|
__exportStar(require("./AppUserResponse"), exports);
|
|
@@ -42,7 +42,7 @@ const AgentCapabilityBase_1 = require("./AgentCapabilityBase");
|
|
|
42
42
|
exports.ActionCapability = core.serialization
|
|
43
43
|
.object({
|
|
44
44
|
userInteractionRequired: core.serialization.boolean(),
|
|
45
|
-
buttonName: core.serialization.string().
|
|
45
|
+
buttonName: core.serialization.string().optional(),
|
|
46
46
|
userFormParameters: core.serialization.list(ActionParameter_1.ActionParameter),
|
|
47
47
|
precondition: core.serialization.lazy(() => serializers.Precondition).optional(),
|
|
48
48
|
descriptionOverride: core.serialization.string().optional(),
|
|
@@ -2,6 +2,7 @@ import * as serializers from "../../../index";
|
|
|
2
2
|
import * as MavenAGI from "../../../../api/index";
|
|
3
3
|
import * as core from "../../../../core";
|
|
4
4
|
import { EntityId } from "./EntityId";
|
|
5
|
+
import { UserDataWithReference } from "./UserDataWithReference";
|
|
5
6
|
import { AppUser } from "./AppUser";
|
|
6
7
|
export declare const AppUserResponse: core.serialization.ObjectSchema<serializers.AppUserResponse.Raw, MavenAGI.AppUserResponse>;
|
|
7
8
|
export declare namespace AppUserResponse {
|
|
@@ -10,5 +11,6 @@ export declare namespace AppUserResponse {
|
|
|
10
11
|
agentUserId: string;
|
|
11
12
|
allUserData: Record<string, Record<string, string>>;
|
|
12
13
|
defaultUserData: Record<string, string>;
|
|
14
|
+
agentUserData: Record<string, UserDataWithReference.Raw[]>;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.AppUserResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
const EntityId_1 = require("./EntityId");
|
|
40
|
+
const UserDataWithReference_1 = require("./UserDataWithReference");
|
|
40
41
|
const AppUser_1 = require("./AppUser");
|
|
41
42
|
exports.AppUserResponse = core.serialization
|
|
42
43
|
.object({
|
|
@@ -44,5 +45,6 @@ exports.AppUserResponse = core.serialization
|
|
|
44
45
|
agentUserId: core.serialization.string(),
|
|
45
46
|
allUserData: core.serialization.record(core.serialization.string(), core.serialization.record(core.serialization.string(), core.serialization.string())),
|
|
46
47
|
defaultUserData: core.serialization.record(core.serialization.string(), core.serialization.string()),
|
|
48
|
+
agentUserData: core.serialization.record(core.serialization.string(), core.serialization.list(UserDataWithReference_1.UserDataWithReference)),
|
|
47
49
|
})
|
|
48
50
|
.extend(AppUser_1.AppUser);
|
|
@@ -50,4 +50,6 @@ exports.ConversationSummary = core.serialization.object({
|
|
|
50
50
|
humanAgents: core.serialization.list(core.serialization.string()),
|
|
51
51
|
humanAgentsWithInserts: core.serialization.list(core.serialization.string()),
|
|
52
52
|
users: core.serialization.list(core.serialization.string()),
|
|
53
|
+
lastUserMessage: core.serialization.string().optional(),
|
|
54
|
+
lastBotMessage: core.serialization.string().optional(),
|
|
53
55
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as serializers from "../../../index";
|
|
2
|
+
import * as MavenAGI from "../../../../api/index";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import { EntityIdFilter } from "./EntityIdFilter";
|
|
5
|
+
import { UserData } from "./UserData";
|
|
6
|
+
export declare const UserDataWithReference: core.serialization.ObjectSchema<serializers.UserDataWithReference.Raw, MavenAGI.UserDataWithReference>;
|
|
7
|
+
export declare namespace UserDataWithReference {
|
|
8
|
+
interface Raw extends UserData.Raw {
|
|
9
|
+
userId: EntityIdFilter.Raw;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.UserDataWithReference = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const EntityIdFilter_1 = require("./EntityIdFilter");
|
|
40
|
+
const UserData_1 = require("./UserData");
|
|
41
|
+
exports.UserDataWithReference = core.serialization
|
|
42
|
+
.object({
|
|
43
|
+
userId: EntityIdFilter_1.EntityIdFilter,
|
|
44
|
+
})
|
|
45
|
+
.extend(UserData_1.UserData);
|
|
@@ -46,6 +46,7 @@ export * from "./AppUserIdentifier";
|
|
|
46
46
|
export * from "./AppUserIdentifyingPropertyType";
|
|
47
47
|
export * from "./AppUser";
|
|
48
48
|
export * from "./UserData";
|
|
49
|
+
export * from "./UserDataWithReference";
|
|
49
50
|
export * from "./VisibilityType";
|
|
50
51
|
export * from "./AppUserRequest";
|
|
51
52
|
export * from "./AppUserResponse";
|
|
@@ -62,6 +62,7 @@ __exportStar(require("./AppUserIdentifier"), exports);
|
|
|
62
62
|
__exportStar(require("./AppUserIdentifyingPropertyType"), exports);
|
|
63
63
|
__exportStar(require("./AppUser"), exports);
|
|
64
64
|
__exportStar(require("./UserData"), exports);
|
|
65
|
+
__exportStar(require("./UserDataWithReference"), exports);
|
|
65
66
|
__exportStar(require("./VisibilityType"), exports);
|
|
66
67
|
__exportStar(require("./AppUserRequest"), exports);
|
|
67
68
|
__exportStar(require("./AppUserResponse"), exports);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.6";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1234,6 +1234,94 @@ await client.analytics.getConversationChart({
|
|
|
1234
1234
|
</dl>
|
|
1235
1235
|
</details>
|
|
1236
1236
|
|
|
1237
|
+
<details><summary><code>client.analytics.<a href="/src/api/resources/analytics/client/Client.ts">exportConversationTable</a>({ ...params }) -> core.BinaryResponse</code></summary>
|
|
1238
|
+
<dl>
|
|
1239
|
+
<dd>
|
|
1240
|
+
|
|
1241
|
+
#### 📝 Description
|
|
1242
|
+
|
|
1243
|
+
<dl>
|
|
1244
|
+
<dd>
|
|
1245
|
+
|
|
1246
|
+
<dl>
|
|
1247
|
+
<dd>
|
|
1248
|
+
|
|
1249
|
+
Export the conversation analytics table to a CSV file.
|
|
1250
|
+
|
|
1251
|
+
This outputs the current table view defined by the request. For most programmatic use cases, prefer `getConversationTable` and format client-side. The CSV format may change and should not be relied upon by code consumers. A maximum of 10,000 rows can be exported at a time.
|
|
1252
|
+
|
|
1253
|
+
</dd>
|
|
1254
|
+
</dl>
|
|
1255
|
+
</dd>
|
|
1256
|
+
</dl>
|
|
1257
|
+
|
|
1258
|
+
#### 🔌 Usage
|
|
1259
|
+
|
|
1260
|
+
<dl>
|
|
1261
|
+
<dd>
|
|
1262
|
+
|
|
1263
|
+
<dl>
|
|
1264
|
+
<dd>
|
|
1265
|
+
|
|
1266
|
+
```typescript
|
|
1267
|
+
await client.analytics.exportConversationTable({
|
|
1268
|
+
fieldGroupings: [
|
|
1269
|
+
{
|
|
1270
|
+
field: "Category",
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
field: "Category",
|
|
1274
|
+
},
|
|
1275
|
+
],
|
|
1276
|
+
columnDefinitions: [
|
|
1277
|
+
{
|
|
1278
|
+
metric: {
|
|
1279
|
+
type: "count",
|
|
1280
|
+
},
|
|
1281
|
+
header: "header",
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
metric: {
|
|
1285
|
+
type: "count",
|
|
1286
|
+
},
|
|
1287
|
+
header: "header",
|
|
1288
|
+
},
|
|
1289
|
+
],
|
|
1290
|
+
});
|
|
1291
|
+
```
|
|
1292
|
+
|
|
1293
|
+
</dd>
|
|
1294
|
+
</dl>
|
|
1295
|
+
</dd>
|
|
1296
|
+
</dl>
|
|
1297
|
+
|
|
1298
|
+
#### ⚙️ Parameters
|
|
1299
|
+
|
|
1300
|
+
<dl>
|
|
1301
|
+
<dd>
|
|
1302
|
+
|
|
1303
|
+
<dl>
|
|
1304
|
+
<dd>
|
|
1305
|
+
|
|
1306
|
+
**request:** `MavenAGI.ConversationTableRequest`
|
|
1307
|
+
|
|
1308
|
+
</dd>
|
|
1309
|
+
</dl>
|
|
1310
|
+
|
|
1311
|
+
<dl>
|
|
1312
|
+
<dd>
|
|
1313
|
+
|
|
1314
|
+
**requestOptions:** `Analytics.RequestOptions`
|
|
1315
|
+
|
|
1316
|
+
</dd>
|
|
1317
|
+
</dl>
|
|
1318
|
+
</dd>
|
|
1319
|
+
</dl>
|
|
1320
|
+
|
|
1321
|
+
</dd>
|
|
1322
|
+
</dl>
|
|
1323
|
+
</details>
|
|
1324
|
+
|
|
1237
1325
|
<details><summary><code>client.analytics.<a href="/src/api/resources/analytics/client/Client.ts">getFeedbackTable</a>({ ...params }) -> MavenAGI.FeedbackTableResponse</code></summary>
|
|
1238
1326
|
<dl>
|
|
1239
1327
|
<dd>
|
|
@@ -42,7 +42,7 @@ const AgentCapabilityBase_1 = require("./AgentCapabilityBase");
|
|
|
42
42
|
exports.ActionCapability = core.serialization
|
|
43
43
|
.object({
|
|
44
44
|
userInteractionRequired: core.serialization.boolean(),
|
|
45
|
-
buttonName: core.serialization.string().
|
|
45
|
+
buttonName: core.serialization.string().optional(),
|
|
46
46
|
userFormParameters: core.serialization.list(ActionParameter_1.ActionParameter),
|
|
47
47
|
precondition: core.serialization.lazy(() => serializers.Precondition).optional(),
|
|
48
48
|
descriptionOverride: core.serialization.string().optional(),
|
|
@@ -2,6 +2,7 @@ import * as serializers from "../../../index";
|
|
|
2
2
|
import * as MavenAGI from "../../../../api/index";
|
|
3
3
|
import * as core from "../../../../core";
|
|
4
4
|
import { EntityId } from "./EntityId";
|
|
5
|
+
import { UserDataWithReference } from "./UserDataWithReference";
|
|
5
6
|
import { AppUser } from "./AppUser";
|
|
6
7
|
export declare const AppUserResponse: core.serialization.ObjectSchema<serializers.AppUserResponse.Raw, MavenAGI.AppUserResponse>;
|
|
7
8
|
export declare namespace AppUserResponse {
|
|
@@ -10,5 +11,6 @@ export declare namespace AppUserResponse {
|
|
|
10
11
|
agentUserId: string;
|
|
11
12
|
allUserData: Record<string, Record<string, string>>;
|
|
12
13
|
defaultUserData: Record<string, string>;
|
|
14
|
+
agentUserData: Record<string, UserDataWithReference.Raw[]>;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.AppUserResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
const EntityId_1 = require("./EntityId");
|
|
40
|
+
const UserDataWithReference_1 = require("./UserDataWithReference");
|
|
40
41
|
const AppUser_1 = require("./AppUser");
|
|
41
42
|
exports.AppUserResponse = core.serialization
|
|
42
43
|
.object({
|
|
@@ -44,5 +45,6 @@ exports.AppUserResponse = core.serialization
|
|
|
44
45
|
agentUserId: core.serialization.string(),
|
|
45
46
|
allUserData: core.serialization.record(core.serialization.string(), core.serialization.record(core.serialization.string(), core.serialization.string())),
|
|
46
47
|
defaultUserData: core.serialization.record(core.serialization.string(), core.serialization.string()),
|
|
48
|
+
agentUserData: core.serialization.record(core.serialization.string(), core.serialization.list(UserDataWithReference_1.UserDataWithReference)),
|
|
47
49
|
})
|
|
48
50
|
.extend(AppUser_1.AppUser);
|
|
@@ -50,4 +50,6 @@ exports.ConversationSummary = core.serialization.object({
|
|
|
50
50
|
humanAgents: core.serialization.list(core.serialization.string()),
|
|
51
51
|
humanAgentsWithInserts: core.serialization.list(core.serialization.string()),
|
|
52
52
|
users: core.serialization.list(core.serialization.string()),
|
|
53
|
+
lastUserMessage: core.serialization.string().optional(),
|
|
54
|
+
lastBotMessage: core.serialization.string().optional(),
|
|
53
55
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as serializers from "../../../index";
|
|
2
|
+
import * as MavenAGI from "../../../../api/index";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import { EntityIdFilter } from "./EntityIdFilter";
|
|
5
|
+
import { UserData } from "./UserData";
|
|
6
|
+
export declare const UserDataWithReference: core.serialization.ObjectSchema<serializers.UserDataWithReference.Raw, MavenAGI.UserDataWithReference>;
|
|
7
|
+
export declare namespace UserDataWithReference {
|
|
8
|
+
interface Raw extends UserData.Raw {
|
|
9
|
+
userId: EntityIdFilter.Raw;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.UserDataWithReference = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const EntityIdFilter_1 = require("./EntityIdFilter");
|
|
40
|
+
const UserData_1 = require("./UserData");
|
|
41
|
+
exports.UserDataWithReference = core.serialization
|
|
42
|
+
.object({
|
|
43
|
+
userId: EntityIdFilter_1.EntityIdFilter,
|
|
44
|
+
})
|
|
45
|
+
.extend(UserData_1.UserData);
|
|
@@ -46,6 +46,7 @@ export * from "./AppUserIdentifier";
|
|
|
46
46
|
export * from "./AppUserIdentifyingPropertyType";
|
|
47
47
|
export * from "./AppUser";
|
|
48
48
|
export * from "./UserData";
|
|
49
|
+
export * from "./UserDataWithReference";
|
|
49
50
|
export * from "./VisibilityType";
|
|
50
51
|
export * from "./AppUserRequest";
|
|
51
52
|
export * from "./AppUserResponse";
|
|
@@ -62,6 +62,7 @@ __exportStar(require("./AppUserIdentifier"), exports);
|
|
|
62
62
|
__exportStar(require("./AppUserIdentifyingPropertyType"), exports);
|
|
63
63
|
__exportStar(require("./AppUser"), exports);
|
|
64
64
|
__exportStar(require("./UserData"), exports);
|
|
65
|
+
__exportStar(require("./UserDataWithReference"), exports);
|
|
65
66
|
__exportStar(require("./VisibilityType"), exports);
|
|
66
67
|
__exportStar(require("./AppUserRequest"), exports);
|
|
67
68
|
__exportStar(require("./AppUserResponse"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.6";
|
package/version.js
CHANGED