mavenagi 1.2.4 → 1.2.5
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 +390 -0
- package/api/resources/actions/client/Client.d.ts +11 -1
- package/api/resources/actions/client/Client.js +11 -1
- package/api/resources/actions/client/requests/ActionPatchRequest.d.ts +11 -1
- package/api/resources/agents/client/Client.d.ts +2 -2
- package/api/resources/agents/client/Client.js +5 -5
- package/api/resources/agents/client/index.d.ts +1 -0
- package/api/resources/agents/client/index.js +15 -0
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +27 -0
- package/api/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/agents/client/requests/index.js +2 -0
- package/api/resources/agents/types/Agent.d.ts +8 -0
- package/api/resources/agents/types/AgentPrompting.d.ts +23 -0
- package/api/resources/agents/types/index.d.ts +1 -1
- package/api/resources/agents/types/index.js +1 -1
- package/api/resources/analytics/types/ConversationBarChartRequest.d.ts +20 -0
- package/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts +13 -1
- package/api/resources/analytics/types/ConversationPieChartRequest.d.ts +13 -1
- package/api/resources/commons/types/ActionResponse.d.ts +7 -0
- package/api/resources/commons/types/SimulationContext.d.ts +6 -0
- package/api/resources/conversation/client/Client.d.ts +18 -1
- package/api/resources/conversation/client/Client.js +91 -1
- package/api/resources/events/client/Client.d.ts +10 -0
- package/api/resources/events/client/Client.js +83 -0
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +1 -0
- package/api/resources/knowledge/client/Client.d.ts +32 -1
- package/api/resources/knowledge/client/Client.js +104 -1
- package/api/resources/knowledge/client/requests/KnowledgeBasePatchRequest.d.ts +11 -1
- package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/api/resources/knowledge/types/KnowledgeBaseField.d.ts +1 -0
- package/api/resources/knowledge/types/KnowledgeBaseField.js +1 -0
- package/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +5 -0
- package/api/resources/knowledge/types/KnowledgeBaseRefreshRequest.d.ts +10 -0
- package/api/resources/knowledge/types/KnowledgeBaseRefreshRequest.js +3 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +29 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +8 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.js +8 -1
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +2 -0
- package/api/resources/knowledge/types/index.d.ts +1 -0
- package/api/resources/knowledge/types/index.js +1 -0
- package/dist/Client.js +2 -2
- package/dist/api/resources/actions/client/Client.d.ts +11 -1
- package/dist/api/resources/actions/client/Client.js +11 -1
- package/dist/api/resources/actions/client/requests/ActionPatchRequest.d.ts +11 -1
- package/dist/api/resources/agents/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/client/Client.js +5 -5
- package/dist/api/resources/agents/client/index.d.ts +1 -0
- package/dist/api/resources/agents/client/index.js +15 -0
- package/dist/api/resources/agents/client/requests/AgentPatchRequest.d.ts +27 -0
- package/dist/api/resources/agents/client/requests/AgentPatchRequest.js +3 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/client/requests/index.js +2 -0
- package/dist/api/resources/agents/types/Agent.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentPrompting.d.ts +23 -0
- package/dist/api/resources/agents/types/AgentPrompting.js +3 -0
- package/dist/api/resources/agents/types/index.d.ts +1 -1
- package/dist/api/resources/agents/types/index.js +1 -1
- package/dist/api/resources/analytics/types/ConversationBarChartRequest.d.ts +20 -0
- package/dist/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts +13 -1
- package/dist/api/resources/analytics/types/ConversationPieChartRequest.d.ts +13 -1
- package/dist/api/resources/commons/types/ActionResponse.d.ts +7 -0
- package/dist/api/resources/commons/types/SimulationContext.d.ts +6 -0
- package/dist/api/resources/conversation/client/Client.d.ts +18 -1
- package/dist/api/resources/conversation/client/Client.js +91 -1
- package/dist/api/resources/events/client/Client.d.ts +10 -0
- package/dist/api/resources/events/client/Client.js +83 -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.d.ts +32 -1
- package/dist/api/resources/knowledge/client/Client.js +104 -1
- package/dist/api/resources/knowledge/client/requests/KnowledgeBasePatchRequest.d.ts +11 -1
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/dist/api/resources/knowledge/types/KnowledgeBaseField.d.ts +1 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseField.js +1 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +5 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRefreshRequest.d.ts +10 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRefreshRequest.js +3 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +29 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +8 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.js +8 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +2 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +2 -0
- package/dist/api/resources/knowledge/types/index.d.ts +1 -0
- package/dist/api/resources/knowledge/types/index.js +1 -0
- package/dist/serialization/resources/agents/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/client/index.js +4 -0
- package/dist/serialization/resources/agents/client/requests/AgentPatchRequest.d.ts +21 -0
- package/dist/serialization/resources/agents/client/requests/AgentPatchRequest.js +53 -0
- package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/agents/client/requests/index.js +5 -0
- package/dist/serialization/resources/agents/types/Agent.d.ts +3 -0
- package/dist/serialization/resources/agents/types/Agent.js +3 -0
- package/dist/serialization/resources/agents/types/AgentPrompting.d.ts +14 -0
- package/dist/serialization/resources/agents/types/AgentPrompting.js +46 -0
- package/dist/serialization/resources/agents/types/index.d.ts +1 -1
- package/dist/serialization/resources/agents/types/index.js +1 -1
- package/dist/serialization/resources/commons/types/SimulationContext.d.ts +1 -0
- package/dist/serialization/resources/commons/types/SimulationContext.js +1 -0
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +1 -0
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -1
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseField.d.ts +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseField.js +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseFilter.d.ts +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseFilter.js +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRefreshRequest.d.ts +9 -0
- package/dist/serialization/resources/{agents/types/AgentPatchRequest.js → knowledge/types/KnowledgeBaseRefreshRequest.js} +3 -8
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.js +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +1 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/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 +237 -4
- package/serialization/resources/agents/client/index.d.ts +1 -0
- package/serialization/resources/agents/client/index.js +4 -0
- package/serialization/resources/agents/client/requests/AgentPatchRequest.d.ts +21 -0
- package/serialization/resources/agents/client/requests/AgentPatchRequest.js +53 -0
- package/serialization/resources/agents/client/requests/index.d.ts +1 -0
- package/serialization/resources/agents/client/requests/index.js +5 -0
- package/serialization/resources/agents/types/Agent.d.ts +3 -0
- package/serialization/resources/agents/types/Agent.js +3 -0
- package/serialization/resources/agents/types/AgentPrompting.d.ts +14 -0
- package/serialization/resources/agents/types/AgentPrompting.js +46 -0
- package/serialization/resources/agents/types/index.d.ts +1 -1
- package/serialization/resources/agents/types/index.js +1 -1
- package/serialization/resources/commons/types/SimulationContext.d.ts +1 -0
- package/serialization/resources/commons/types/SimulationContext.js +1 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +1 -0
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -1
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseField.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseField.js +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseFilter.d.ts +4 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseFilter.js +4 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRefreshRequest.d.ts +9 -0
- package/serialization/resources/{agents/types/AgentPatchRequest.js → knowledge/types/KnowledgeBaseRefreshRequest.js} +3 -8
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +4 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseType.js +1 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +1 -0
- package/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/serialization/resources/knowledge/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/types/AgentPatchRequest.d.ts +0 -11
- package/dist/api/resources/agents/types/AgentPatchRequest.d.ts +0 -11
- package/dist/serialization/resources/agents/types/AgentPatchRequest.d.ts +0 -14
- package/serialization/resources/agents/types/AgentPatchRequest.d.ts +0 -14
- /package/api/resources/agents/{types → client/requests}/AgentPatchRequest.js +0 -0
- /package/{dist/api/resources/agents/types/AgentPatchRequest.js → api/resources/agents/types/AgentPrompting.js} +0 -0
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import * as MavenAGI from "../../../index";
|
|
2
2
|
export interface ConversationPieChartRequest extends MavenAGI.ConversationAnalyticsRequest {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Field used to group data into slices for the pie chart.
|
|
5
|
+
*
|
|
6
|
+
* **Series Name Formats by Field:**
|
|
7
|
+
* - `Sources`: Document title (e.g., "Product Documentation")
|
|
8
|
+
* - `Actions`: "Action Name - App Name" (e.g., "Create Ticket - Freshdesk")
|
|
9
|
+
* - `IncompleteActions`: "Action Name - App Name" (e.g., "Search Documents - Zendesk")
|
|
10
|
+
* - `Users`: User identifier value (e.g., "user@example.com")
|
|
11
|
+
* - `InboxItems`: Inbox item title
|
|
12
|
+
* - `HumanAgents`: Human agent display name
|
|
13
|
+
* - `HumanAgentsWithInserts`: Human agent display name (for agents who made inserts)
|
|
14
|
+
* - Other fields: Field value as stored (e.g., "GOOD", "NEEDS_IMPROVEMENT" for Quality)
|
|
15
|
+
*/
|
|
4
16
|
groupBy: MavenAGI.ConversationGroupBy;
|
|
5
17
|
/** Metric defining the value for each pie slice, stored in the y-axis value. */
|
|
6
18
|
metric: MavenAGI.ConversationMetric;
|
|
@@ -26,6 +26,13 @@ import * as MavenAGI from "../../../index";
|
|
|
26
26
|
* key: "userKey2"
|
|
27
27
|
* }]
|
|
28
28
|
* },
|
|
29
|
+
* segmentId: {
|
|
30
|
+
* referenceId: "premium-users",
|
|
31
|
+
* appId: "my-billing-system",
|
|
32
|
+
* organizationId: "acme",
|
|
33
|
+
* agentId: "support",
|
|
34
|
+
* type: MavenAGI.EntityType.Segment
|
|
35
|
+
* },
|
|
29
36
|
* language: "en",
|
|
30
37
|
* deleted: false
|
|
31
38
|
* }
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as MavenAGI from "../../../index";
|
|
2
2
|
export interface SimulationContext {
|
|
3
|
+
/**
|
|
4
|
+
* If provided, overrides the agent's default additional prompt text during the simulation.
|
|
5
|
+
* Note that this field is provided for backwards compatibility and will be removed in a future release.
|
|
6
|
+
* Instead please use the `availableKnowledgeBases` field to include a knowledge base with a document `llmInclusionStatus` set to `ALWAYS`.
|
|
7
|
+
*/
|
|
8
|
+
additionalPromptText?: string;
|
|
3
9
|
/** The persona to use during the simulation. If not provided, the agent's default persona will be used. */
|
|
4
10
|
persona?: MavenAGI.LlmPersona;
|
|
5
11
|
/** If provided, knowledge search will be restricted to the provided list of knowledge bases. Otherwise, all active knowledge bases will be used. An empty list means no knowledge bases will be used. */
|
|
@@ -300,7 +300,11 @@ export declare class Conversation {
|
|
|
300
300
|
createFeedback(request: MavenAGI.FeedbackRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<MavenAGI.Feedback>;
|
|
301
301
|
private __createFeedback;
|
|
302
302
|
/**
|
|
303
|
-
* Submit a filled out action form
|
|
303
|
+
* Submit a filled out action form.
|
|
304
|
+
* Action forms can not be submitted more than once, attempting to do so will result in an error.
|
|
305
|
+
*
|
|
306
|
+
* Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
307
|
+
* Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
|
|
304
308
|
*
|
|
305
309
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
306
310
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
@@ -384,6 +388,19 @@ export declare class Conversation {
|
|
|
384
388
|
*/
|
|
385
389
|
search(request: MavenAGI.ConversationsSearchRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<MavenAGI.ConversationsResponse>;
|
|
386
390
|
private __search;
|
|
391
|
+
/**
|
|
392
|
+
* Export conversations to a CSV file.
|
|
393
|
+
*
|
|
394
|
+
* This will output a summary of each conversation that matches the supplied filter. A maximum of 10,000 conversations can be exported at a time.
|
|
395
|
+
*
|
|
396
|
+
* For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
397
|
+
* The CSV format may change over time and should not be relied upon by code consumers.
|
|
398
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
399
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
400
|
+
* @throws {@link MavenAGI.ServerError}
|
|
401
|
+
*/
|
|
402
|
+
export(request: MavenAGI.ConversationsSearchRequest, requestOptions?: Conversation.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
403
|
+
private __export;
|
|
387
404
|
/**
|
|
388
405
|
* Deliver a message to a user or conversation.
|
|
389
406
|
*
|
|
@@ -1139,7 +1139,11 @@ class Conversation {
|
|
|
1139
1139
|
});
|
|
1140
1140
|
}
|
|
1141
1141
|
/**
|
|
1142
|
-
* Submit a filled out action form
|
|
1142
|
+
* Submit a filled out action form.
|
|
1143
|
+
* Action forms can not be submitted more than once, attempting to do so will result in an error.
|
|
1144
|
+
*
|
|
1145
|
+
* Additionally, form submission is only allowed when the form is the last message in the conversation.
|
|
1146
|
+
* Forms should be disabled in surface UI if a conversation continues and they remain unsubmitted.
|
|
1143
1147
|
*
|
|
1144
1148
|
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
1145
1149
|
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
@@ -1545,6 +1549,92 @@ class Conversation {
|
|
|
1545
1549
|
}
|
|
1546
1550
|
});
|
|
1547
1551
|
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Export conversations to a CSV file.
|
|
1554
|
+
*
|
|
1555
|
+
* This will output a summary of each conversation that matches the supplied filter. A maximum of 10,000 conversations can be exported at a time.
|
|
1556
|
+
*
|
|
1557
|
+
* For most use cases it is recommended to use the `search` API instead and convert the JSON response to your desired format.
|
|
1558
|
+
* The CSV format may change over time and should not be relied upon by code consumers.
|
|
1559
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
1560
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
1561
|
+
* @throws {@link MavenAGI.ServerError}
|
|
1562
|
+
*/
|
|
1563
|
+
export(request, requestOptions) {
|
|
1564
|
+
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
1565
|
+
}
|
|
1566
|
+
__export(request, requestOptions) {
|
|
1567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1568
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1569
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1570
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1571
|
+
"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,
|
|
1572
|
+
"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,
|
|
1573
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1574
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
1575
|
+
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/conversations/export"),
|
|
1576
|
+
method: "POST",
|
|
1577
|
+
headers: _headers,
|
|
1578
|
+
contentType: "application/json",
|
|
1579
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1580
|
+
requestType: "json",
|
|
1581
|
+
body: serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1582
|
+
responseType: "binary-response",
|
|
1583
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1584
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1585
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1586
|
+
});
|
|
1587
|
+
if (_response.ok) {
|
|
1588
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1589
|
+
}
|
|
1590
|
+
if (_response.error.reason === "status-code") {
|
|
1591
|
+
switch (_response.error.statusCode) {
|
|
1592
|
+
case 404:
|
|
1593
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1594
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1595
|
+
allowUnrecognizedUnionMembers: true,
|
|
1596
|
+
allowUnrecognizedEnumValues: true,
|
|
1597
|
+
breadcrumbsPrefix: ["response"],
|
|
1598
|
+
}), _response.rawResponse);
|
|
1599
|
+
case 400:
|
|
1600
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1601
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1602
|
+
allowUnrecognizedUnionMembers: true,
|
|
1603
|
+
allowUnrecognizedEnumValues: true,
|
|
1604
|
+
breadcrumbsPrefix: ["response"],
|
|
1605
|
+
}), _response.rawResponse);
|
|
1606
|
+
case 500:
|
|
1607
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1608
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1609
|
+
allowUnrecognizedUnionMembers: true,
|
|
1610
|
+
allowUnrecognizedEnumValues: true,
|
|
1611
|
+
breadcrumbsPrefix: ["response"],
|
|
1612
|
+
}), _response.rawResponse);
|
|
1613
|
+
default:
|
|
1614
|
+
throw new errors.MavenAGIError({
|
|
1615
|
+
statusCode: _response.error.statusCode,
|
|
1616
|
+
body: _response.error.body,
|
|
1617
|
+
rawResponse: _response.rawResponse,
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
switch (_response.error.reason) {
|
|
1622
|
+
case "non-json":
|
|
1623
|
+
throw new errors.MavenAGIError({
|
|
1624
|
+
statusCode: _response.error.statusCode,
|
|
1625
|
+
body: _response.error.rawBody,
|
|
1626
|
+
rawResponse: _response.rawResponse,
|
|
1627
|
+
});
|
|
1628
|
+
case "timeout":
|
|
1629
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/conversations/export.");
|
|
1630
|
+
case "unknown":
|
|
1631
|
+
throw new errors.MavenAGIError({
|
|
1632
|
+
message: _response.error.errorMessage,
|
|
1633
|
+
rawResponse: _response.rawResponse,
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1548
1638
|
/**
|
|
1549
1639
|
* Deliver a message to a user or conversation.
|
|
1550
1640
|
*
|
|
@@ -95,5 +95,15 @@ export declare class Events {
|
|
|
95
95
|
*/
|
|
96
96
|
get(eventId: string, request: MavenAGI.EventGetRequest, requestOptions?: Events.RequestOptions): core.HttpResponsePromise<MavenAGI.EventResponse>;
|
|
97
97
|
private __get;
|
|
98
|
+
/**
|
|
99
|
+
* Export events to a CSV file.
|
|
100
|
+
*
|
|
101
|
+
* This will output a summary of each event that matches the supplied filter. A maximum of 10,000 events can be exported at a time. For most use cases it is recommended to use the search API instead and convert the JSON response to your desired format. The CSV format may change over time and should not be relied upon by code consumers.
|
|
102
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
103
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
104
|
+
* @throws {@link MavenAGI.ServerError}
|
|
105
|
+
*/
|
|
106
|
+
export(request: MavenAGI.EventsSearchRequest, requestOptions?: Events.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
107
|
+
private __export;
|
|
98
108
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
99
109
|
}
|
|
@@ -353,6 +353,89 @@ class Events {
|
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* Export events to a CSV file.
|
|
358
|
+
*
|
|
359
|
+
* This will output a summary of each event that matches the supplied filter. A maximum of 10,000 events can be exported at a time. For most use cases it is recommended to use the search API instead and convert the JSON response to your desired format. The CSV format may change over time and should not be relied upon by code consumers.
|
|
360
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
361
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
362
|
+
* @throws {@link MavenAGI.ServerError}
|
|
363
|
+
*/
|
|
364
|
+
export(request, requestOptions) {
|
|
365
|
+
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
366
|
+
}
|
|
367
|
+
__export(request, requestOptions) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
370
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
371
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
372
|
+
"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,
|
|
373
|
+
"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,
|
|
374
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
375
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
376
|
+
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/events/export"),
|
|
377
|
+
method: "POST",
|
|
378
|
+
headers: _headers,
|
|
379
|
+
contentType: "application/json",
|
|
380
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
381
|
+
requestType: "json",
|
|
382
|
+
body: serializers.EventsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
383
|
+
responseType: "binary-response",
|
|
384
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
385
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
386
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
387
|
+
});
|
|
388
|
+
if (_response.ok) {
|
|
389
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
390
|
+
}
|
|
391
|
+
if (_response.error.reason === "status-code") {
|
|
392
|
+
switch (_response.error.statusCode) {
|
|
393
|
+
case 404:
|
|
394
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
395
|
+
unrecognizedObjectKeys: "passthrough",
|
|
396
|
+
allowUnrecognizedUnionMembers: true,
|
|
397
|
+
allowUnrecognizedEnumValues: true,
|
|
398
|
+
breadcrumbsPrefix: ["response"],
|
|
399
|
+
}), _response.rawResponse);
|
|
400
|
+
case 400:
|
|
401
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
402
|
+
unrecognizedObjectKeys: "passthrough",
|
|
403
|
+
allowUnrecognizedUnionMembers: true,
|
|
404
|
+
allowUnrecognizedEnumValues: true,
|
|
405
|
+
breadcrumbsPrefix: ["response"],
|
|
406
|
+
}), _response.rawResponse);
|
|
407
|
+
case 500:
|
|
408
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
409
|
+
unrecognizedObjectKeys: "passthrough",
|
|
410
|
+
allowUnrecognizedUnionMembers: true,
|
|
411
|
+
allowUnrecognizedEnumValues: true,
|
|
412
|
+
breadcrumbsPrefix: ["response"],
|
|
413
|
+
}), _response.rawResponse);
|
|
414
|
+
default:
|
|
415
|
+
throw new errors.MavenAGIError({
|
|
416
|
+
statusCode: _response.error.statusCode,
|
|
417
|
+
body: _response.error.body,
|
|
418
|
+
rawResponse: _response.rawResponse,
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
switch (_response.error.reason) {
|
|
423
|
+
case "non-json":
|
|
424
|
+
throw new errors.MavenAGIError({
|
|
425
|
+
statusCode: _response.error.statusCode,
|
|
426
|
+
body: _response.error.rawBody,
|
|
427
|
+
rawResponse: _response.rawResponse,
|
|
428
|
+
});
|
|
429
|
+
case "timeout":
|
|
430
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/events/export.");
|
|
431
|
+
case "unknown":
|
|
432
|
+
throw new errors.MavenAGIError({
|
|
433
|
+
message: _response.error.errorMessage,
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
356
439
|
_getAuthorizationHeader() {
|
|
357
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
441
|
var _a, _b;
|
package/api/resources/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./users/types";
|
|
|
31
31
|
export * from "./commons/errors";
|
|
32
32
|
export * as events from "./events";
|
|
33
33
|
export * from "./actions/client/requests";
|
|
34
|
+
export * from "./agents/client/requests";
|
|
34
35
|
export * from "./appSettings/client/requests";
|
|
35
36
|
export * from "./conversation/client/requests";
|
|
36
37
|
export * from "./events/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -70,6 +70,7 @@ __exportStar(require("./users/types"), exports);
|
|
|
70
70
|
__exportStar(require("./commons/errors"), exports);
|
|
71
71
|
exports.events = __importStar(require("./events"));
|
|
72
72
|
__exportStar(require("./actions/client/requests"), exports);
|
|
73
|
+
__exportStar(require("./agents/client/requests"), exports);
|
|
73
74
|
__exportStar(require("./appSettings/client/requests"), exports);
|
|
74
75
|
__exportStar(require("./conversation/client/requests"), exports);
|
|
75
76
|
__exportStar(require("./events/client/requests"), exports);
|
|
@@ -87,6 +87,27 @@ export declare class Knowledge {
|
|
|
87
87
|
*/
|
|
88
88
|
getKnowledgeBase(knowledgeBaseReferenceId: string, request?: MavenAGI.KnowledgeBaseGetRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeBaseResponse>;
|
|
89
89
|
private __getKnowledgeBase;
|
|
90
|
+
/**
|
|
91
|
+
* Request that a knowledge base refresh itself.
|
|
92
|
+
*
|
|
93
|
+
* Knowledge bases refresh on a schedule determined by the `refreshFrequency` field.
|
|
94
|
+
* They can also be refreshed on demand by calling this endpoint.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to refresh. All other entity ID fields are inferred from the request.
|
|
97
|
+
* @param {MavenAGI.KnowledgeBaseRefreshRequest} request
|
|
98
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
101
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
102
|
+
* @throws {@link MavenAGI.ServerError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.knowledge.refreshKnowledgeBase("help-center", {
|
|
106
|
+
* appId: "readme"
|
|
107
|
+
* })
|
|
108
|
+
*/
|
|
109
|
+
refreshKnowledgeBase(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseRefreshRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<void>;
|
|
110
|
+
private __refreshKnowledgeBase;
|
|
90
111
|
/**
|
|
91
112
|
* Update mutable knowledge base fields
|
|
92
113
|
*
|
|
@@ -102,7 +123,17 @@ export declare class Knowledge {
|
|
|
102
123
|
* @throws {@link MavenAGI.ServerError}
|
|
103
124
|
*
|
|
104
125
|
* @example
|
|
105
|
-
* await client.knowledge.patchKnowledgeBase("
|
|
126
|
+
* await client.knowledge.patchKnowledgeBase("help-center", {
|
|
127
|
+
* name: "Updated Help Center",
|
|
128
|
+
* tags: new Set(["tag1", "tag2", "tag3"]),
|
|
129
|
+
* segmentId: {
|
|
130
|
+
* referenceId: "premium-users",
|
|
131
|
+
* appId: "readme",
|
|
132
|
+
* organizationId: "acme",
|
|
133
|
+
* agentId: "support",
|
|
134
|
+
* type: "SEGMENT"
|
|
135
|
+
* }
|
|
136
|
+
* })
|
|
106
137
|
*/
|
|
107
138
|
patchKnowledgeBase(knowledgeBaseReferenceId: string, request?: MavenAGI.KnowledgeBasePatchRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeBaseResponse>;
|
|
108
139
|
private __patchKnowledgeBase;
|
|
@@ -347,6 +347,99 @@ class Knowledge {
|
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Request that a knowledge base refresh itself.
|
|
352
|
+
*
|
|
353
|
+
* Knowledge bases refresh on a schedule determined by the `refreshFrequency` field.
|
|
354
|
+
* They can also be refreshed on demand by calling this endpoint.
|
|
355
|
+
*
|
|
356
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to refresh. All other entity ID fields are inferred from the request.
|
|
357
|
+
* @param {MavenAGI.KnowledgeBaseRefreshRequest} request
|
|
358
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
359
|
+
*
|
|
360
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
361
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
362
|
+
* @throws {@link MavenAGI.ServerError}
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* await client.knowledge.refreshKnowledgeBase("help-center", {
|
|
366
|
+
* appId: "readme"
|
|
367
|
+
* })
|
|
368
|
+
*/
|
|
369
|
+
refreshKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions) {
|
|
370
|
+
return core.HttpResponsePromise.fromPromise(this.__refreshKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions));
|
|
371
|
+
}
|
|
372
|
+
__refreshKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions) {
|
|
373
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
375
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
376
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
377
|
+
"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,
|
|
378
|
+
"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,
|
|
379
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
380
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
381
|
+
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/knowledge/${encodeURIComponent(knowledgeBaseReferenceId)}/refresh`),
|
|
382
|
+
method: "POST",
|
|
383
|
+
headers: _headers,
|
|
384
|
+
contentType: "application/json",
|
|
385
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
386
|
+
requestType: "json",
|
|
387
|
+
body: serializers.KnowledgeBaseRefreshRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
388
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
389
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
390
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
391
|
+
});
|
|
392
|
+
if (_response.ok) {
|
|
393
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
394
|
+
}
|
|
395
|
+
if (_response.error.reason === "status-code") {
|
|
396
|
+
switch (_response.error.statusCode) {
|
|
397
|
+
case 404:
|
|
398
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
399
|
+
unrecognizedObjectKeys: "passthrough",
|
|
400
|
+
allowUnrecognizedUnionMembers: true,
|
|
401
|
+
allowUnrecognizedEnumValues: true,
|
|
402
|
+
breadcrumbsPrefix: ["response"],
|
|
403
|
+
}), _response.rawResponse);
|
|
404
|
+
case 400:
|
|
405
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
406
|
+
unrecognizedObjectKeys: "passthrough",
|
|
407
|
+
allowUnrecognizedUnionMembers: true,
|
|
408
|
+
allowUnrecognizedEnumValues: true,
|
|
409
|
+
breadcrumbsPrefix: ["response"],
|
|
410
|
+
}), _response.rawResponse);
|
|
411
|
+
case 500:
|
|
412
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
413
|
+
unrecognizedObjectKeys: "passthrough",
|
|
414
|
+
allowUnrecognizedUnionMembers: true,
|
|
415
|
+
allowUnrecognizedEnumValues: true,
|
|
416
|
+
breadcrumbsPrefix: ["response"],
|
|
417
|
+
}), _response.rawResponse);
|
|
418
|
+
default:
|
|
419
|
+
throw new errors.MavenAGIError({
|
|
420
|
+
statusCode: _response.error.statusCode,
|
|
421
|
+
body: _response.error.body,
|
|
422
|
+
rawResponse: _response.rawResponse,
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
switch (_response.error.reason) {
|
|
427
|
+
case "non-json":
|
|
428
|
+
throw new errors.MavenAGIError({
|
|
429
|
+
statusCode: _response.error.statusCode,
|
|
430
|
+
body: _response.error.rawBody,
|
|
431
|
+
rawResponse: _response.rawResponse,
|
|
432
|
+
});
|
|
433
|
+
case "timeout":
|
|
434
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/knowledge/{knowledgeBaseReferenceId}/refresh.");
|
|
435
|
+
case "unknown":
|
|
436
|
+
throw new errors.MavenAGIError({
|
|
437
|
+
message: _response.error.errorMessage,
|
|
438
|
+
rawResponse: _response.rawResponse,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}
|
|
350
443
|
/**
|
|
351
444
|
* Update mutable knowledge base fields
|
|
352
445
|
*
|
|
@@ -362,7 +455,17 @@ class Knowledge {
|
|
|
362
455
|
* @throws {@link MavenAGI.ServerError}
|
|
363
456
|
*
|
|
364
457
|
* @example
|
|
365
|
-
* await client.knowledge.patchKnowledgeBase("
|
|
458
|
+
* await client.knowledge.patchKnowledgeBase("help-center", {
|
|
459
|
+
* name: "Updated Help Center",
|
|
460
|
+
* tags: new Set(["tag1", "tag2", "tag3"]),
|
|
461
|
+
* segmentId: {
|
|
462
|
+
* referenceId: "premium-users",
|
|
463
|
+
* appId: "readme",
|
|
464
|
+
* organizationId: "acme",
|
|
465
|
+
* agentId: "support",
|
|
466
|
+
* type: "SEGMENT"
|
|
467
|
+
* }
|
|
468
|
+
* })
|
|
366
469
|
*/
|
|
367
470
|
patchKnowledgeBase(knowledgeBaseReferenceId, request = {}, requestOptions) {
|
|
368
471
|
return core.HttpResponsePromise.fromPromise(this.__patchKnowledgeBase(knowledgeBaseReferenceId, request, requestOptions));
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import * as MavenAGI from "../../../../index";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
|
-
* {
|
|
4
|
+
* {
|
|
5
|
+
* name: "Updated Help Center",
|
|
6
|
+
* tags: new Set(["tag1", "tag2", "tag3"]),
|
|
7
|
+
* segmentId: {
|
|
8
|
+
* referenceId: "premium-users",
|
|
9
|
+
* appId: "readme",
|
|
10
|
+
* organizationId: "acme",
|
|
11
|
+
* agentId: "support",
|
|
12
|
+
* type: "SEGMENT"
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
5
15
|
*/
|
|
6
16
|
export interface KnowledgeBasePatchRequest {
|
|
7
17
|
/** The App ID of the knowledge base to patch. If not provided the ID of the calling app will be used. */
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export interface BaseKnowledgeDocument {
|
|
2
|
-
/** The title of the document. Will be shown as part of answers. */
|
|
3
|
-
title: string;
|
|
4
2
|
/** The URL of the document. Should be visible to end users. Will be shown as part of answers. Not used for crawling. */
|
|
5
3
|
url?: string;
|
|
6
4
|
/** The document language. Must be a valid ISO 639-1 language code. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as MavenAGI from "../../../index";
|
|
1
2
|
export interface KnowledgeBaseFilter {
|
|
2
3
|
/**
|
|
3
4
|
* Full-text search query for matching knowledge bases by content.
|
|
@@ -22,4 +23,8 @@ export interface KnowledgeBaseFilter {
|
|
|
22
23
|
createdBefore?: Date;
|
|
23
24
|
/** Filter by app IDs */
|
|
24
25
|
appIds?: string[];
|
|
26
|
+
/** Filter knowledge bases by the most recent version status */
|
|
27
|
+
mostRecentVersionStatus?: MavenAGI.KnowledgeBaseVersionStatus[];
|
|
28
|
+
/** Filter knowledge bases by the LLM inclusion status */
|
|
29
|
+
llmInclusionStatus?: MavenAGI.LlmInclusionStatus;
|
|
25
30
|
}
|
|
@@ -2,6 +2,8 @@ import * as MavenAGI from "../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* createdAt: new Date("2025-01-01T00:00:00.000Z"),
|
|
6
|
+
* updatedAt: new Date("2025-02-02T00:00:00.000Z"),
|
|
5
7
|
* knowledgeBaseId: {
|
|
6
8
|
* referenceId: "help-center",
|
|
7
9
|
* appId: "readme",
|
|
@@ -9,20 +11,46 @@ import * as MavenAGI from "../../../index";
|
|
|
9
11
|
* agentId: "support",
|
|
10
12
|
* type: MavenAGI.EntityType.KnowledgeBase
|
|
11
13
|
* },
|
|
14
|
+
* activeVersionId: {
|
|
15
|
+
* referenceId: "version-1",
|
|
16
|
+
* appId: "readme",
|
|
17
|
+
* organizationId: "acme",
|
|
18
|
+
* agentId: "support",
|
|
19
|
+
* type: MavenAGI.EntityType.KnowledgeBaseVersion
|
|
20
|
+
* },
|
|
21
|
+
* mostRecentVersionStatus: MavenAGI.KnowledgeBaseVersionStatus.Succeeded,
|
|
22
|
+
* llmInclusionStatus: MavenAGI.LlmInclusionStatus.WhenRelevant,
|
|
12
23
|
* name: "Help center",
|
|
13
24
|
* type: MavenAGI.KnowledgeBaseType.Api,
|
|
14
25
|
* metadata: {
|
|
15
26
|
* "key": "value"
|
|
16
27
|
* },
|
|
17
28
|
* tags: new Set(["tag1", "tag2"]),
|
|
18
|
-
* refreshFrequency: MavenAGI.KnowledgeBaseRefreshFrequency.Daily
|
|
29
|
+
* refreshFrequency: MavenAGI.KnowledgeBaseRefreshFrequency.Daily,
|
|
30
|
+
* segmentId: {
|
|
31
|
+
* referenceId: "premium-users",
|
|
32
|
+
* appId: "readme",
|
|
33
|
+
* organizationId: "acme",
|
|
34
|
+
* agentId: "support",
|
|
35
|
+
* type: MavenAGI.EntityType.Segment
|
|
36
|
+
* }
|
|
19
37
|
* }
|
|
20
38
|
*/
|
|
21
39
|
export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties {
|
|
40
|
+
/** The date and time when the knowledge base was created. */
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
/** The date and time when the knowledge base was last updated. */
|
|
43
|
+
updatedAt: Date;
|
|
22
44
|
/** ID that uniquely identifies this knowledge base */
|
|
23
45
|
knowledgeBaseId: MavenAGI.EntityId;
|
|
24
46
|
/** ID of the knowledge base version that is currently active. Documents can be fetched using this version ID. */
|
|
25
47
|
activeVersionId?: MavenAGI.EntityId;
|
|
48
|
+
/**
|
|
49
|
+
* The status of the most recent version of the knowledge base.
|
|
50
|
+
* The `activeVersionId` will only be populated if this status is `SUCCEEDED`.
|
|
51
|
+
* Use the `listKnowledgeBaseVersions` endpoint to get the full list of versions.
|
|
52
|
+
*/
|
|
53
|
+
mostRecentVersionStatus: MavenAGI.KnowledgeBaseVersionStatus;
|
|
26
54
|
/** The type of the knowledge base. Can not be changed once created. */
|
|
27
55
|
type: MavenAGI.KnowledgeBaseType;
|
|
28
56
|
/** Metadata for the knowledge base. */
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* API knowledge bases are managed by a Maven App.
|
|
3
|
+
* All other knowledge base types are deprecated and can not be created.
|
|
4
|
+
*/
|
|
2
5
|
export declare const KnowledgeBaseType: {
|
|
3
6
|
readonly Api: "API";
|
|
7
|
+
readonly Url: "URL";
|
|
8
|
+
readonly Manual: "MANUAL";
|
|
9
|
+
readonly Rss: "RSS";
|
|
10
|
+
readonly Legacy: "LEGACY";
|
|
4
11
|
};
|
|
5
12
|
export type KnowledgeBaseType = (typeof KnowledgeBaseType)[keyof typeof KnowledgeBaseType];
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.KnowledgeBaseType = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* API knowledge bases are managed by a Maven App.
|
|
7
|
+
* All other knowledge base types are deprecated and can not be created.
|
|
8
|
+
*/
|
|
6
9
|
exports.KnowledgeBaseType = {
|
|
7
10
|
Api: "API",
|
|
11
|
+
Url: "URL",
|
|
12
|
+
Manual: "MANUAL",
|
|
13
|
+
Rss: "RSS",
|
|
14
|
+
Legacy: "LEGACY",
|
|
8
15
|
};
|