mavenagi 1.2.60 → 1.2.61
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/BaseClient.d.ts +12 -0
- package/BaseClient.js +5 -3
- package/Client.d.ts +3 -0
- package/Client.js +33 -28
- package/api/resources/actions/client/Client.d.ts +10 -0
- package/api/resources/actions/client/Client.js +14 -3
- package/api/resources/agents/client/Client.d.ts +12 -0
- package/api/resources/agents/client/Client.js +16 -3
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +3 -3
- package/api/resources/agents/types/AgentPrompting.d.ts +3 -3
- package/api/resources/analytics/client/Client.d.ts +14 -0
- package/api/resources/analytics/client/Client.js +22 -7
- package/api/resources/analytics/types/ConversationMedian.d.ts +4 -0
- package/api/resources/analytics/types/ConversationPercentile.d.ts +4 -0
- package/api/resources/analytics/types/RowBase.d.ts +5 -1
- package/api/resources/analytics/types/Series.d.ts +4 -1
- package/api/resources/analytics/types/TimeSeries.d.ts +5 -1
- package/api/resources/appDirectory/client/Client.d.ts +12 -0
- package/api/resources/appDirectory/client/Client.js +16 -3
- package/api/resources/appSettings/client/Client.d.ts +6 -0
- package/api/resources/appSettings/client/Client.js +8 -1
- package/api/resources/assets/client/Client.d.ts +4 -0
- package/api/resources/assets/client/Client.js +7 -2
- package/api/resources/charters/client/Client.d.ts +245 -0
- package/api/resources/charters/client/Client.js +884 -0
- package/api/resources/charters/client/index.d.ts +1 -0
- package/api/resources/charters/client/index.js +17 -0
- package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +20 -0
- package/api/resources/charters/client/requests/CharterDeleteRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.d.ts +8 -0
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterGetRequest.d.ts +8 -0
- package/api/resources/charters/client/requests/CharterGetRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +67 -0
- package/api/resources/charters/client/requests/CharterPatchRequest.js +3 -0
- package/api/resources/charters/client/requests/index.d.ts +4 -0
- package/api/resources/charters/client/requests/index.js +2 -0
- package/api/resources/charters/exports.d.ts +2 -0
- package/api/resources/charters/exports.js +21 -0
- package/api/resources/charters/index.d.ts +1 -0
- package/api/resources/charters/index.js +1 -0
- package/api/resources/charters/types/CharterAncestorsResponse.d.ts +8 -0
- package/api/resources/charters/types/CharterAncestorsResponse.js +3 -0
- package/api/resources/charters/types/CharterBase.d.ts +14 -0
- package/api/resources/charters/types/CharterBase.js +3 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +1 -1
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +1 -1
- package/api/resources/charters/types/CharterChildrenGroup.d.ts +18 -0
- package/api/resources/charters/types/CharterChildrenGroup.js +3 -0
- package/api/resources/charters/types/CharterContent.d.ts +60 -0
- package/api/resources/charters/types/CharterContent.js +3 -0
- package/api/resources/charters/types/CharterKnowledgeBaseReference.d.ts +16 -0
- package/api/resources/charters/types/CharterKnowledgeBaseReference.js +3 -0
- package/api/resources/charters/types/CharterListChildrenRequest.d.ts +18 -0
- package/api/resources/charters/types/CharterListChildrenRequest.js +3 -0
- package/api/resources/charters/types/CharterListChildrenResponse.d.ts +55 -0
- package/api/resources/charters/types/CharterListChildrenResponse.js +3 -0
- package/api/resources/charters/types/CharterPatchReferences.d.ts +22 -0
- package/api/resources/charters/types/CharterPatchReferences.js +3 -0
- package/api/resources/charters/types/CharterReferences.d.ts +21 -0
- package/api/resources/charters/types/CharterReferences.js +3 -0
- package/api/resources/charters/types/CharterRequest.d.ts +36 -0
- package/api/resources/charters/types/CharterRequest.js +3 -0
- package/api/resources/charters/types/CharterResponse.d.ts +66 -0
- package/api/resources/charters/types/CharterResponse.js +3 -0
- package/api/resources/charters/types/CharterSearchField.d.ts +5 -0
- package/api/resources/charters/types/CharterSearchField.js +8 -0
- package/api/resources/charters/types/CharterSearchFilter.d.ts +15 -0
- package/api/resources/charters/types/CharterSearchFilter.js +3 -0
- package/api/resources/charters/types/CharterSearchRequest.d.ts +5 -0
- package/api/resources/charters/types/CharterSearchRequest.js +3 -0
- package/api/resources/charters/types/CharterSearchResponse.d.ts +36 -0
- package/api/resources/charters/types/CharterSearchResponse.js +3 -0
- package/api/resources/charters/types/CharterStatus.d.ts +2 -2
- package/api/resources/charters/types/CharterStatus.js +2 -2
- package/api/resources/charters/types/CharterSummary.d.ts +1 -9
- package/api/resources/charters/types/CharterType.d.ts +4 -4
- package/api/resources/charters/types/CharterType.js +4 -4
- package/api/resources/charters/types/index.d.ts +15 -0
- package/api/resources/charters/types/index.js +15 -0
- package/api/resources/commons/errors/BadRequestError.d.ts +1 -0
- package/api/resources/commons/errors/BadRequestError.js +1 -1
- package/api/resources/commons/errors/NotFoundError.d.ts +1 -0
- package/api/resources/commons/errors/NotFoundError.js +1 -1
- package/api/resources/commons/errors/PayloadTooLargeError.d.ts +1 -0
- package/api/resources/commons/errors/PayloadTooLargeError.js +1 -1
- package/api/resources/commons/errors/ServerError.d.ts +1 -0
- package/api/resources/commons/errors/ServerError.js +1 -1
- package/api/resources/commons/errors/TooManyRequestsError.d.ts +1 -0
- package/api/resources/commons/errors/TooManyRequestsError.js +1 -1
- package/api/resources/commons/types/AskType.d.ts +2 -2
- package/api/resources/commons/types/AskType.js +2 -2
- package/api/resources/commons/types/BotObjectResponse.d.ts +1 -1
- package/api/resources/commons/types/ConversationRound.d.ts +1 -1
- package/api/resources/commons/types/ConversationRound.js +1 -1
- package/api/resources/commons/types/IntelligentFieldPrecondition.d.ts +0 -4
- package/api/resources/commons/types/LlmPersona.d.ts +1 -1
- package/api/resources/commons/types/LlmPersona.js +1 -1
- package/api/resources/commons/types/MetadataComparisonCondition.d.ts +10 -0
- package/api/resources/commons/types/MetadataComparisonCondition.js +3 -0
- package/api/resources/commons/types/MetadataComparisonOperator.d.ts +22 -0
- package/api/resources/commons/types/MetadataComparisonOperator.js +25 -0
- package/api/resources/commons/types/MetadataCondition.d.ts +21 -0
- package/api/resources/commons/types/MetadataCondition.js +3 -0
- package/api/resources/commons/types/MetadataEntryCondition.d.ts +10 -0
- package/api/resources/commons/types/MetadataEntryCondition.js +3 -0
- package/api/resources/commons/types/MetadataFilter.d.ts +41 -0
- package/api/resources/commons/types/MetadataFilter.js +3 -0
- package/api/resources/commons/types/MetadataFilterGroup.d.ts +14 -0
- package/api/resources/commons/types/MetadataFilterGroup.js +3 -0
- package/api/resources/commons/types/SimulationContext.d.ts +2 -2
- package/api/resources/commons/types/SystemEventName.d.ts +3 -0
- package/api/resources/commons/types/SystemEventName.js +3 -0
- package/api/resources/commons/types/index.d.ts +6 -0
- package/api/resources/commons/types/index.js +6 -0
- package/api/resources/conversation/client/Client.d.ts +32 -0
- package/api/resources/conversation/client/Client.js +48 -17
- package/api/resources/conversation/types/AskRequest.d.ts +10 -10
- package/api/resources/conversation/types/ConversationFilter.d.ts +6 -1
- package/api/resources/customers/client/Client.d.ts +8 -0
- package/api/resources/customers/client/Client.js +12 -3
- package/api/resources/events/client/Client.d.ts +8 -0
- package/api/resources/events/client/Client.js +12 -3
- package/api/resources/inbox/client/Client.d.ts +16 -0
- package/api/resources/inbox/client/Client.js +22 -5
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +1 -0
- package/api/resources/integrations/client/Client.d.ts +2 -0
- package/api/resources/integrations/client/Client.js +4 -1
- package/api/resources/intelligentFields/client/Client.d.ts +28 -3
- package/api/resources/intelligentFields/client/Client.js +36 -8
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +4 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +13 -4
- package/api/resources/intelligentFields/types/EnumOption.d.ts +3 -1
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +12 -11
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +4 -1
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +4 -1
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +8 -1
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.js +8 -1
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +10 -0
- package/api/resources/knowledge/client/Client.d.ts +32 -0
- package/api/resources/knowledge/client/Client.js +47 -16
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +13 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -2
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +33 -9
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +7 -1
- package/api/resources/organizations/client/Client.d.ts +12 -0
- package/api/resources/organizations/client/Client.js +17 -4
- package/api/resources/segments/client/Client.d.ts +10 -0
- package/api/resources/segments/client/Client.js +14 -3
- package/api/resources/translations/client/Client.d.ts +2 -0
- package/api/resources/translations/client/Client.js +4 -1
- package/api/resources/triggers/client/Client.d.ts +10 -0
- package/api/resources/triggers/client/Client.js +14 -3
- package/api/resources/users/client/Client.d.ts +10 -0
- package/api/resources/users/client/Client.js +13 -2
- package/api/resources/voice/client/Client.d.ts +2 -0
- package/api/resources/voice/client/Client.js +4 -1
- package/api/resources/voiceConversations/client/Client.d.ts +4 -1
- package/api/resources/voiceConversations/client/Client.js +2 -1
- package/api/resources/voiceConversations/client/Socket.d.ts +11 -0
- package/api/resources/voiceConversations/client/Socket.js +15 -0
- package/core/fetcher/Fetcher.js +9 -92
- package/core/fetcher/getResponseBody.js +11 -0
- package/core/fetcher/makePassthroughRequest.js +26 -4
- package/core/fetcher/redactUrl.d.ts +2 -0
- package/core/fetcher/redactUrl.js +88 -0
- package/core/fetcher/signals.js +9 -1
- package/core/file/file.js +3 -0
- package/core/form-data-utils/FormDataWrapper.js +3 -0
- package/core/requestBody.d.ts +12 -0
- package/core/requestBody.js +26 -0
- package/core/runtime/index.d.ts +1 -1
- package/core/runtime/index.js +2 -1
- package/core/runtime/runtime.d.ts +19 -0
- package/core/runtime/runtime.js +74 -2
- package/core/schemas/builders/schema-utils/JsonError.js +2 -2
- package/core/schemas/builders/schema-utils/ParseError.js +2 -2
- package/core/stream/Stream.d.ts +45 -1
- package/core/stream/Stream.js +323 -84
- package/core/stream/index.d.ts +1 -0
- package/core/url/qs.js +2 -2
- package/core/websocket/ws.d.ts +6 -0
- package/core/websocket/ws.js +14 -1
- package/errors/MavenAGIError.d.ts +1 -0
- package/errors/MavenAGIError.js +5 -1
- package/errors/MavenAGITimeoutError.d.ts +2 -2
- package/errors/MavenAGITimeoutError.js +40 -6
- package/package.json +2 -2
- package/reference.md +587 -3
- package/serialization/resources/charters/client/index.d.ts +1 -0
- package/serialization/resources/charters/client/index.js +17 -0
- package/serialization/resources/charters/client/requests/CharterPatchRequest.d.ts +24 -0
- package/serialization/resources/charters/client/requests/CharterPatchRequest.js +57 -0
- package/serialization/resources/charters/client/requests/index.d.ts +1 -0
- package/serialization/resources/charters/client/requests/index.js +5 -0
- package/serialization/resources/charters/index.d.ts +1 -0
- package/serialization/resources/charters/index.js +1 -0
- package/serialization/resources/charters/types/CharterAncestorsResponse.d.ts +10 -0
- package/serialization/resources/charters/types/CharterAncestorsResponse.js +42 -0
- package/serialization/resources/charters/types/CharterBase.d.ts +11 -0
- package/serialization/resources/charters/types/CharterBase.js +43 -0
- package/serialization/resources/charters/types/CharterChildrenGroup.d.ts +13 -0
- package/serialization/resources/charters/types/CharterChildrenGroup.js +45 -0
- package/serialization/resources/charters/types/CharterContent.d.ts +19 -0
- package/serialization/resources/charters/types/CharterContent.js +54 -0
- package/serialization/resources/charters/types/CharterKnowledgeBaseReference.d.ts +11 -0
- package/serialization/resources/charters/types/CharterKnowledgeBaseReference.js +44 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.d.ts +11 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.js +45 -0
- package/serialization/resources/charters/types/CharterListChildrenResponse.d.ts +11 -0
- package/serialization/resources/charters/types/CharterListChildrenResponse.js +45 -0
- package/serialization/resources/charters/types/CharterPatchReferences.d.ts +12 -0
- package/serialization/resources/charters/types/CharterPatchReferences.js +44 -0
- package/serialization/resources/charters/types/CharterReferences.d.ts +12 -0
- package/serialization/resources/charters/types/CharterReferences.js +44 -0
- package/serialization/resources/charters/types/CharterRequest.d.ts +13 -0
- package/serialization/resources/charters/types/CharterRequest.js +47 -0
- package/serialization/resources/charters/types/CharterResponse.d.ts +25 -0
- package/serialization/resources/charters/types/CharterResponse.js +60 -0
- package/serialization/resources/charters/types/CharterSearchField.d.ts +7 -0
- package/serialization/resources/charters/types/CharterSearchField.js +39 -0
- package/serialization/resources/charters/types/CharterSearchFilter.d.ts +11 -0
- package/serialization/resources/charters/types/CharterSearchFilter.js +43 -0
- package/serialization/resources/charters/types/CharterSearchRequest.d.ts +13 -0
- package/serialization/resources/charters/types/CharterSearchRequest.js +47 -0
- package/serialization/resources/charters/types/CharterSearchResponse.d.ts +11 -0
- package/serialization/resources/charters/types/CharterSearchResponse.js +45 -0
- package/serialization/resources/charters/types/CharterSummary.d.ts +0 -2
- package/serialization/resources/charters/types/CharterSummary.js +0 -2
- package/serialization/resources/charters/types/index.d.ts +15 -0
- package/serialization/resources/charters/types/index.js +15 -0
- package/serialization/resources/commons/types/MetadataComparisonCondition.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataComparisonCondition.js +43 -0
- package/serialization/resources/commons/types/MetadataComparisonOperator.d.ts +7 -0
- package/serialization/resources/commons/types/MetadataComparisonOperator.js +39 -0
- package/serialization/resources/commons/types/MetadataCondition.d.ts +19 -0
- package/serialization/resources/commons/types/MetadataCondition.js +51 -0
- package/serialization/resources/commons/types/MetadataEntryCondition.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataEntryCondition.js +43 -0
- package/serialization/resources/commons/types/MetadataFilter.d.ts +14 -0
- package/serialization/resources/commons/types/MetadataFilter.js +49 -0
- package/serialization/resources/commons/types/MetadataFilterGroup.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataFilterGroup.js +44 -0
- package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
- package/serialization/resources/commons/types/SystemEventName.js +1 -0
- package/serialization/resources/commons/types/index.d.ts +6 -0
- package/serialization/resources/commons/types/index.js +6 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +1 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +1 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +0 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +0 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface CharterDeleteRequest {
|
|
6
|
+
/** The App ID of the charter to delete. If not provided, the ID of the calling app will be used. */
|
|
7
|
+
appId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The reference ID of the agent variant this delete is scoped to. When set, the
|
|
10
|
+
* deletion is staged in that variant's working set instead of being applied to the
|
|
11
|
+
* agent's live configuration.
|
|
12
|
+
*
|
|
13
|
+
* Omit this parameter to delete directly from the agent. Variant scoping is not
|
|
14
|
+
* active yet: a variant supplied today is accepted and ignored, and the delete applies
|
|
15
|
+
* to the agent.
|
|
16
|
+
*/
|
|
17
|
+
variantReferenceId?: string;
|
|
18
|
+
/** The App ID of the agent variant named by `variantReferenceId`. If not provided, the ID of the calling app will be used. */
|
|
19
|
+
variantAppId?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* precondition: {
|
|
6
|
+
* preconditionType: "conversation",
|
|
7
|
+
* value: {
|
|
8
|
+
* conversationPreconditionType: "tags",
|
|
9
|
+
* tags: new Set(["cancellation"])
|
|
10
|
+
* }
|
|
11
|
+
* },
|
|
12
|
+
* status: "ACTIVE"
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface CharterPatchRequest {
|
|
16
|
+
/** The App ID of the charter to update. If not provided, the ID of the calling app will be used. */
|
|
17
|
+
appId?: string;
|
|
18
|
+
/** The display name of the charter. */
|
|
19
|
+
name?: string;
|
|
20
|
+
/** A plain text description. Omit to leave unchanged. */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** The instruction text. Omit to leave unchanged. */
|
|
23
|
+
manual?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Move this charter to a new parent. Omit to leave the current parent unchanged.
|
|
26
|
+
* To promote this charter to root level instead, set the field explicitly to null.
|
|
27
|
+
*
|
|
28
|
+
* The resulting tree must remain acyclic. A move that would make this charter its own
|
|
29
|
+
* ancestor is rejected with a 400 and leaves the tree unchanged.
|
|
30
|
+
*/
|
|
31
|
+
parentCharterId?: MavenAGI.EntityId | null;
|
|
32
|
+
/**
|
|
33
|
+
* The rule controlling when this charter applies. Replaces the charter's existing
|
|
34
|
+
* rule outright -- this is not a merge. Set to null to make this charter a
|
|
35
|
+
* wildcard, removing the rule. Omit to leave unchanged.
|
|
36
|
+
*/
|
|
37
|
+
precondition?: MavenAGI.Precondition | null;
|
|
38
|
+
/** The lifecycle status of this charter. */
|
|
39
|
+
status?: MavenAGI.CharterStatus;
|
|
40
|
+
/**
|
|
41
|
+
* Whether this charter's children mutually exclude each other.
|
|
42
|
+
* Omit to leave unchanged.
|
|
43
|
+
*/
|
|
44
|
+
childrenExclusionPolicy?: MavenAGI.CharterChildrenExclusionPolicy;
|
|
45
|
+
/**
|
|
46
|
+
* User-defined rank among siblings. When combined with `parentCharterId`,
|
|
47
|
+
* the rank is interpreted relative to the **new** sibling group, not the
|
|
48
|
+
* current one. Siblings in the destination at or above the target rank are
|
|
49
|
+
* shifted up by 1. Omit to keep the current rank value (which will still
|
|
50
|
+
* be applied to the new sibling group if `parentCharterId` is also changing).
|
|
51
|
+
*/
|
|
52
|
+
userRank?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Context items (knowledge bases and actions) this charter makes available.
|
|
55
|
+
* Each sub-field is independently optional — omit to leave unchanged.
|
|
56
|
+
*/
|
|
57
|
+
references?: MavenAGI.CharterPatchReferences;
|
|
58
|
+
/**
|
|
59
|
+
* The agent variant this patch is scoped to. When set, the patch is staged in that
|
|
60
|
+
* variant's working set instead of being applied to the agent's live configuration.
|
|
61
|
+
*
|
|
62
|
+
* Omit this field to patch the agent directly. Variant scoping is not active yet:
|
|
63
|
+
* a variant supplied today is accepted and ignored, and the patch applies to the
|
|
64
|
+
* agent.
|
|
65
|
+
*/
|
|
66
|
+
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
67
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { CharterDeleteRequest } from "./CharterDeleteRequest";
|
|
2
|
+
export type { CharterGetAncestorsRequest } from "./CharterGetAncestorsRequest";
|
|
3
|
+
export type { CharterGetRequest } from "./CharterGetRequest";
|
|
4
|
+
export type { CharterPatchRequest } from "./CharterPatchRequest";
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ChartersClient = void 0;
|
|
19
|
+
var Client_1 = require("./client/Client");
|
|
20
|
+
Object.defineProperty(exports, "ChartersClient", { enumerable: true, get: function () { return Client_1.ChartersClient; } });
|
|
21
|
+
__exportStar(require("./client/index"), exports);
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
17
18
|
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface CharterAncestorsResponse {
|
|
3
|
+
/**
|
|
4
|
+
* The requested charter and all of its ancestors up to the root,
|
|
5
|
+
* ordered from root to leaf. The last element is the requested charter.
|
|
6
|
+
*/
|
|
7
|
+
charters: MavenAGI.CharterResponse[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CharterBase {
|
|
2
|
+
/** Display name for this charter or group. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** A plain text description of this charter. If not set, existing description is preserved if present. */
|
|
5
|
+
description?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional additional natural language instruction text when this
|
|
8
|
+
* charter matches. Manuals concatenate with ancestor charter manuals
|
|
9
|
+
* before delivery.
|
|
10
|
+
*
|
|
11
|
+
* If not set, existing manual is preserved if present.
|
|
12
|
+
*/
|
|
13
|
+
manual?: string;
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Controls whether this charter's direct children mutually exclude each other when more than
|
|
3
|
-
* one of them matches a
|
|
3
|
+
* one of them matches a round. Set on the parent (group) charter; it has no effect on a charter
|
|
4
4
|
* with no children.
|
|
5
5
|
*
|
|
6
6
|
* - DEFAULT: Standard behavior. A parent's children are mutually exclusive only when all of that
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.CharterChildrenExclusionPolicy = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* Controls whether this charter's direct children mutually exclude each other when more than
|
|
7
|
-
* one of them matches a
|
|
7
|
+
* one of them matches a round. Set on the parent (group) charter; it has no effect on a charter
|
|
8
8
|
* with no children.
|
|
9
9
|
*
|
|
10
10
|
* - DEFAULT: Standard behavior. A parent's children are mutually exclusive only when all of that
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface CharterChildrenGroup {
|
|
3
|
+
/** The parent whose children are listed. Null for root charters (when parentIds was empty). */
|
|
4
|
+
parentId: MavenAGI.EntityId | null;
|
|
5
|
+
/**
|
|
6
|
+
* Direct children ordered by userRank ASC, updatedAt DESC.
|
|
7
|
+
* childCharterIds on each child is fully populated — use childCharterIds.length > 0
|
|
8
|
+
* to determine whether the node has children to expand.
|
|
9
|
+
*/
|
|
10
|
+
children: MavenAGI.CharterResponse[];
|
|
11
|
+
/**
|
|
12
|
+
* True if this group's children were truncated by the page limit. Only
|
|
13
|
+
* one group (the last non-empty group) in a response can have
|
|
14
|
+
* hasMore=true; all preceding groups are guaranteed complete. Fetch the
|
|
15
|
+
* next page with the same parentIds to retrieve remaining children.
|
|
16
|
+
*/
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A charter's full content: its text fields, its position in the tree, the rule controlling
|
|
4
|
+
* when it applies, its lifecycle status and its references.
|
|
5
|
+
*
|
|
6
|
+
* `parentCharterId` is `nullable`, not `optional`: null is meaningful -- root level -- and
|
|
7
|
+
* distinct from absent.
|
|
8
|
+
*/
|
|
9
|
+
export interface CharterContent extends MavenAGI.CharterBase {
|
|
10
|
+
/**
|
|
11
|
+
* The fully-qualified ID of the parent charter. Send null to place this charter at the
|
|
12
|
+
* root level -- the field is nullable rather than optional, so null is meaningful and
|
|
13
|
+
* distinct from absent.
|
|
14
|
+
*
|
|
15
|
+
* The resulting tree must remain acyclic. A write that would make this charter its own
|
|
16
|
+
* ancestor is rejected with a 400 and leaves the tree unchanged.
|
|
17
|
+
*/
|
|
18
|
+
parentCharterId: MavenAGI.EntityId | null;
|
|
19
|
+
/**
|
|
20
|
+
* The rule controlling when this charter applies. Preconditions on
|
|
21
|
+
* ancestor charters are AND'd together with this charter's own
|
|
22
|
+
* precondition to determine whether there is a match. When null, the
|
|
23
|
+
* charter is a wildcard and always matches (subject to ancestor
|
|
24
|
+
* preconditions still combining with AND logic).
|
|
25
|
+
*/
|
|
26
|
+
precondition?: MavenAGI.Precondition | null;
|
|
27
|
+
/** Desired lifecycle status. */
|
|
28
|
+
status: MavenAGI.CharterStatus;
|
|
29
|
+
/**
|
|
30
|
+
* The behavioral mode for this charter. Defaults to STANDARD when omitted.
|
|
31
|
+
*
|
|
32
|
+
* Set at creation and immutable afterward. When updating an existing charter (via
|
|
33
|
+
* createOrUpdate), this field must either be omitted or repeat the charter's current
|
|
34
|
+
* type — a differing value is rejected. There is no way to change a charter's type once
|
|
35
|
+
* created. (Recreating a deleted charter is a create, so it may pick any type.)
|
|
36
|
+
*
|
|
37
|
+
* STRICT_RETURN charters cannot have children, and reference neither knowledge bases nor
|
|
38
|
+
* actions: no charter may name a STRICT_RETURN charter as its parent.
|
|
39
|
+
*/
|
|
40
|
+
type?: MavenAGI.CharterType;
|
|
41
|
+
/**
|
|
42
|
+
* User-defined 0-indexed rank among siblings.
|
|
43
|
+
*
|
|
44
|
+
* The rank is currently only meaningful for leaf charters as we enforce
|
|
45
|
+
* mutual exclusion among the leafs and pick only the highest ranked
|
|
46
|
+
* (lowest numerical value) leaf to include in the round. userRank may have
|
|
47
|
+
* gaps.
|
|
48
|
+
*
|
|
49
|
+
* Lower rank = higher priority. When provided and conflicts with an
|
|
50
|
+
* existing sibling, siblings at that rank and above are shifted up by 1
|
|
51
|
+
* (like linked list semantics). When omitted on create, auto-assigned as
|
|
52
|
+
* `max(siblings.userRank) + 1` (0 if no siblings).
|
|
53
|
+
*/
|
|
54
|
+
userRank?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Context items (knowledge bases and actions) this charter makes available.
|
|
57
|
+
* Maximum 50 knowledge bases and 50 actions per charter.
|
|
58
|
+
*/
|
|
59
|
+
references: MavenAGI.CharterReferences;
|
|
60
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A knowledge base a charter makes available, and optionally which of its documents.
|
|
4
|
+
*/
|
|
5
|
+
export interface CharterKnowledgeBaseReference {
|
|
6
|
+
/** The knowledge base this charter makes available. */
|
|
7
|
+
knowledgeBaseId: MavenAGI.EntityId;
|
|
8
|
+
/**
|
|
9
|
+
* Narrows this reference to the documents in the knowledge base whose `metadata`
|
|
10
|
+
* satisfies this filter. Omit to reference every document in the knowledge base.
|
|
11
|
+
*
|
|
12
|
+
* An entry's `key` is a metadata key on the document. A document carrying no such
|
|
13
|
+
* key matches only `presence` `IS_UNDETERMINED`.
|
|
14
|
+
*/
|
|
15
|
+
documentFilter?: MavenAGI.MetadataFilter;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Note: sortDesc is ignored — results are always ordered by userRank ASC,
|
|
4
|
+
* updatedAt DESC within each group.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* parentIds: []
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface CharterListChildrenRequest extends MavenAGI.BaseCappedPaginatedRequest {
|
|
12
|
+
/**
|
|
13
|
+
* Parents whose direct children to return. Pass an empty list to fetch root
|
|
14
|
+
* charters for the agent. Roots and specific parents cannot be mixed in one request.
|
|
15
|
+
* Maximum 50 parent IDs per request.
|
|
16
|
+
*/
|
|
17
|
+
parentIds: MavenAGI.EntityId[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* number: 0,
|
|
6
|
+
* size: 500,
|
|
7
|
+
* totalElements: 1,
|
|
8
|
+
* totalPages: 1,
|
|
9
|
+
* results: [{
|
|
10
|
+
* hasMore: false,
|
|
11
|
+
* children: [{
|
|
12
|
+
* charterId: {
|
|
13
|
+
* referenceId: "cancellation-flow",
|
|
14
|
+
* appId: "support-app",
|
|
15
|
+
* organizationId: "acme",
|
|
16
|
+
* agentId: "support",
|
|
17
|
+
* type: MavenAGI.EntityType.Charter
|
|
18
|
+
* },
|
|
19
|
+
* name: "Cancellation Flow",
|
|
20
|
+
* manual: "Guide the user through the cancellation process with empathy. Always confirm their intent before proceeding.",
|
|
21
|
+
* childCharterIds: [{
|
|
22
|
+
* referenceId: "cancellation-step-1",
|
|
23
|
+
* appId: "support-app",
|
|
24
|
+
* organizationId: "acme",
|
|
25
|
+
* agentId: "support",
|
|
26
|
+
* type: MavenAGI.EntityType.Charter
|
|
27
|
+
* }],
|
|
28
|
+
* references: {
|
|
29
|
+
* knowledgeBases: [],
|
|
30
|
+
* actionIds: []
|
|
31
|
+
* },
|
|
32
|
+
* precondition: {
|
|
33
|
+
* preconditionType: "conversation",
|
|
34
|
+
* value: {
|
|
35
|
+
* conversationPreconditionType: "tags",
|
|
36
|
+
* tags: new Set(["cancellation"])
|
|
37
|
+
* }
|
|
38
|
+
* },
|
|
39
|
+
* status: MavenAGI.CharterStatus.Active,
|
|
40
|
+
* type: MavenAGI.CharterType.Standard,
|
|
41
|
+
* userRank: 0,
|
|
42
|
+
* createdAt: new Date("2025-01-01T00:00:00.000Z"),
|
|
43
|
+
* updatedAt: new Date("2025-01-15T12:30:00.000Z")
|
|
44
|
+
* }]
|
|
45
|
+
* }]
|
|
46
|
+
* }
|
|
47
|
+
*/
|
|
48
|
+
export interface CharterListChildrenResponse extends MavenAGI.Page {
|
|
49
|
+
/**
|
|
50
|
+
* One group per requested parent, in parentIds order. For an empty parentIds
|
|
51
|
+
* request, will return a single group with null parentId. Groups may be partially populated
|
|
52
|
+
* at page boundaries; merge by parentId across pages.
|
|
53
|
+
*/
|
|
54
|
+
results: MavenAGI.CharterChildrenGroup[];
|
|
55
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* References to context items (knowledge bases and actions) a charter makes available.
|
|
4
|
+
* Each field is independently optional — omit a field to leave that set unchanged.
|
|
5
|
+
*/
|
|
6
|
+
export interface CharterPatchReferences {
|
|
7
|
+
/**
|
|
8
|
+
* The knowledge bases this charter makes available, each optionally narrowed to a
|
|
9
|
+
* subset of that knowledge base's documents.
|
|
10
|
+
* Replaces the entire list when provided. Omit to leave unchanged.
|
|
11
|
+
* An empty list removes all knowledge base associations.
|
|
12
|
+
* At most one entry per knowledge base. Maximum 50 knowledge bases per charter.
|
|
13
|
+
*/
|
|
14
|
+
knowledgeBases?: MavenAGI.CharterKnowledgeBaseReference[];
|
|
15
|
+
/**
|
|
16
|
+
* The IDs of actions this charter makes available.
|
|
17
|
+
* Replaces the entire set when provided. Omit to leave unchanged.
|
|
18
|
+
* An empty set removes all action associations.
|
|
19
|
+
* Maximum 50 actions per charter.
|
|
20
|
+
*/
|
|
21
|
+
actionIds?: MavenAGI.EntityId[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Context items (knowledge bases and actions) a charter makes available.
|
|
4
|
+
*/
|
|
5
|
+
export interface CharterReferences {
|
|
6
|
+
/**
|
|
7
|
+
* The knowledge bases this charter makes available, each optionally narrowed to a
|
|
8
|
+
* subset of that knowledge base's documents.
|
|
9
|
+
*
|
|
10
|
+
* At most one entry per knowledge base. Maximum 50 knowledge bases per charter.
|
|
11
|
+
*
|
|
12
|
+
* On a write, supplying this replaces the charter's whole knowledge base set. A response
|
|
13
|
+
* always populates it.
|
|
14
|
+
*/
|
|
15
|
+
knowledgeBases?: MavenAGI.CharterKnowledgeBaseReference[];
|
|
16
|
+
/**
|
|
17
|
+
* The IDs of actions this charter makes available.
|
|
18
|
+
* Maximum 50 actions per charter.
|
|
19
|
+
*/
|
|
20
|
+
actionIds: MavenAGI.EntityId[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* charterId: {
|
|
6
|
+
* referenceId: "cancellation-flow"
|
|
7
|
+
* },
|
|
8
|
+
* name: "Cancellation Flow",
|
|
9
|
+
* manual: "Guide the user through the cancellation process with empathy. Always confirm their intent before proceeding.",
|
|
10
|
+
* precondition: {
|
|
11
|
+
* preconditionType: "conversation",
|
|
12
|
+
* value: {
|
|
13
|
+
* conversationPreconditionType: "tags",
|
|
14
|
+
* tags: new Set(["cancellation"])
|
|
15
|
+
* }
|
|
16
|
+
* },
|
|
17
|
+
* status: MavenAGI.CharterStatus.Active,
|
|
18
|
+
* type: MavenAGI.CharterType.Standard,
|
|
19
|
+
* references: {
|
|
20
|
+
* knowledgeBases: [],
|
|
21
|
+
* actionIds: []
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface CharterRequest extends MavenAGI.CharterContent {
|
|
26
|
+
/** ID that uniquely identifies this charter. */
|
|
27
|
+
charterId: MavenAGI.EntityIdBase;
|
|
28
|
+
/**
|
|
29
|
+
* The agent variant this write is scoped to. When set, the charter content is staged in
|
|
30
|
+
* that variant's working set instead of being applied to the agent's live configuration.
|
|
31
|
+
*
|
|
32
|
+
* Omit this field to write directly to the agent. Variant scoping is not active yet: a
|
|
33
|
+
* variant supplied today is accepted and ignored, and the write applies to the agent.
|
|
34
|
+
*/
|
|
35
|
+
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
36
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* charterId: {
|
|
6
|
+
* referenceId: "cancellation-flow",
|
|
7
|
+
* appId: "support-app",
|
|
8
|
+
* organizationId: "acme",
|
|
9
|
+
* agentId: "support",
|
|
10
|
+
* type: MavenAGI.EntityType.Charter
|
|
11
|
+
* },
|
|
12
|
+
* name: "Cancellation Flow",
|
|
13
|
+
* manual: "Guide the user through the cancellation process with empathy. Always confirm their intent before proceeding.",
|
|
14
|
+
* childCharterIds: [],
|
|
15
|
+
* references: {
|
|
16
|
+
* knowledgeBases: [],
|
|
17
|
+
* actionIds: []
|
|
18
|
+
* },
|
|
19
|
+
* precondition: {
|
|
20
|
+
* preconditionType: "conversation",
|
|
21
|
+
* value: {
|
|
22
|
+
* conversationPreconditionType: "tags",
|
|
23
|
+
* tags: new Set(["cancellation"])
|
|
24
|
+
* }
|
|
25
|
+
* },
|
|
26
|
+
* status: MavenAGI.CharterStatus.Active,
|
|
27
|
+
* type: MavenAGI.CharterType.Standard,
|
|
28
|
+
* userRank: 0,
|
|
29
|
+
* createdAt: new Date("2025-01-01T00:00:00.000Z"),
|
|
30
|
+
* updatedAt: new Date("2025-01-15T12:30:00.000Z")
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
export interface CharterResponse extends MavenAGI.CharterBase {
|
|
34
|
+
/** ID that uniquely identifies this charter. */
|
|
35
|
+
charterId: MavenAGI.EntityId;
|
|
36
|
+
/**
|
|
37
|
+
* The ID of the parent charter. Empty for root-level charters.
|
|
38
|
+
*
|
|
39
|
+
* Charter hierarchies are acyclic, so following this field repeatedly always reaches a
|
|
40
|
+
* root-level charter in a finite number of steps. A charter is never its own ancestor, and
|
|
41
|
+
* callers walking the chain do not need their own cycle guard.
|
|
42
|
+
*/
|
|
43
|
+
parentCharterId?: MavenAGI.EntityId;
|
|
44
|
+
/** The IDs of direct child charters, in their userRank order. */
|
|
45
|
+
childCharterIds: MavenAGI.EntityId[];
|
|
46
|
+
/** The rule controlling when this charter applies. Empty means wildcard (always matches). */
|
|
47
|
+
precondition?: MavenAGI.PreconditionResponse;
|
|
48
|
+
/** The lifecycle status of this charter. */
|
|
49
|
+
status: MavenAGI.CharterStatus;
|
|
50
|
+
/** The behavioral mode for this charter. Defaults to STANDARD. */
|
|
51
|
+
type?: MavenAGI.CharterType;
|
|
52
|
+
/** Whether this charter's children mutually exclude each other. Defaults to DEFAULT. */
|
|
53
|
+
childrenExclusionPolicy?: MavenAGI.CharterChildrenExclusionPolicy;
|
|
54
|
+
/**
|
|
55
|
+
* User-defined rank among siblings. Lower rank = higher priority. When multiple charters
|
|
56
|
+
* in the same leaf group match, the lowest-rank ACTIVE charter is applied.
|
|
57
|
+
* Auto-assigned as `max(siblings.userRank) + 1` (0 if no siblings) when not explicitly set.
|
|
58
|
+
*/
|
|
59
|
+
userRank: number;
|
|
60
|
+
/** Context items (knowledge bases and actions) this charter makes available. */
|
|
61
|
+
references: MavenAGI.CharterReferences;
|
|
62
|
+
/** The date and time this charter was created. */
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
/** The date and time this charter was last updated. */
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CharterSearchField = void 0;
|
|
5
|
+
exports.CharterSearchField = {
|
|
6
|
+
CreatedAt: "CreatedAt",
|
|
7
|
+
UpdatedAt: "UpdatedAt",
|
|
8
|
+
};
|