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,245 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export declare namespace ChartersClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ChartersClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ChartersClient.Options>;
|
|
12
|
+
constructor(options: ChartersClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Create a new charter or update an existing one. Charters are governing
|
|
15
|
+
* documents that combine a precondition (when the charter applies), a manual
|
|
16
|
+
* (what the LLM should do), and the knowledge bases and actions the charter
|
|
17
|
+
* makes available.
|
|
18
|
+
*
|
|
19
|
+
* All charters in an agent form a tree (forest / multi-roots). When a
|
|
20
|
+
* charter is matched on a round, all its ancestor charters will be
|
|
21
|
+
* incorporated. Non-leaf charters are referred to as a charter group.
|
|
22
|
+
*
|
|
23
|
+
* Charters may specify a 0-indexed custom `userRank` that indicates
|
|
24
|
+
* preferences among its siblings. The rank is currently only meaningful
|
|
25
|
+
* for leaf charters as we enforce mutual exclusion among the leafs and
|
|
26
|
+
* pick only the highest ranked (lowest numerical value) leaf to include in
|
|
27
|
+
* the round. userRank may have gaps.
|
|
28
|
+
*
|
|
29
|
+
* @param {MavenAGI.CharterRequest} request
|
|
30
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
33
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
34
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
35
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
36
|
+
* @throws {@link MavenAGI.ServerError}
|
|
37
|
+
* @throws {@link errors.MavenAGIError}
|
|
38
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.charters.createOrUpdate({
|
|
42
|
+
* charterId: {
|
|
43
|
+
* referenceId: "cancellation-flow"
|
|
44
|
+
* },
|
|
45
|
+
* name: "Cancellation Flow",
|
|
46
|
+
* manual: "Guide the user through the cancellation process with empathy. Always confirm their intent before proceeding.",
|
|
47
|
+
* precondition: {
|
|
48
|
+
* preconditionType: "conversation",
|
|
49
|
+
* value: {
|
|
50
|
+
* conversationPreconditionType: "tags",
|
|
51
|
+
* tags: new Set(["cancellation"])
|
|
52
|
+
* }
|
|
53
|
+
* },
|
|
54
|
+
* status: "ACTIVE",
|
|
55
|
+
* type: "STANDARD",
|
|
56
|
+
* references: {
|
|
57
|
+
* knowledgeBases: [],
|
|
58
|
+
* actionIds: []
|
|
59
|
+
* }
|
|
60
|
+
* })
|
|
61
|
+
*/
|
|
62
|
+
createOrUpdate(request: MavenAGI.CharterRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterResponse>;
|
|
63
|
+
private __createOrUpdate;
|
|
64
|
+
/**
|
|
65
|
+
* Get a charter by its reference ID.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} charterReferenceId - The reference ID of the charter to get. All other entity ID fields are inferred from the request.
|
|
68
|
+
* @param {MavenAGI.CharterGetRequest} request
|
|
69
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
72
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
73
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
74
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
75
|
+
* @throws {@link MavenAGI.ServerError}
|
|
76
|
+
* @throws {@link errors.MavenAGIError}
|
|
77
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.charters.get("cancellation-flow")
|
|
81
|
+
*/
|
|
82
|
+
get(charterReferenceId: string, request?: MavenAGI.CharterGetRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterResponse>;
|
|
83
|
+
private __get;
|
|
84
|
+
/**
|
|
85
|
+
* Update mutable fields on a charter. Only provided fields are modified.
|
|
86
|
+
*
|
|
87
|
+
* To move a charter within the tree, set `parentCharterId`.
|
|
88
|
+
* To promote to root level, set `parentCharterId` explicitly to null.
|
|
89
|
+
*
|
|
90
|
+
* **Status behavior**:
|
|
91
|
+
* - Setting `status` to `INACTIVE` applies only to the targeted charter;
|
|
92
|
+
* it does not cascade to descendants. However, its descendants will no
|
|
93
|
+
* longer be incorporated at runtime.
|
|
94
|
+
* - Setting `status` to `ACTIVE` applies only to the targeted charter.
|
|
95
|
+
* The caller is responsible for ensuring ancestor charters are also `ACTIVE`
|
|
96
|
+
* if the full subtree should be reachable at runtime.
|
|
97
|
+
*
|
|
98
|
+
* **userRank conflict resolution**: When `userRank` is set to a value already held by a
|
|
99
|
+
* sibling, siblings at that rank and above are shifted up by 1 (like linked list semantics).
|
|
100
|
+
* The caller does not need to manage uniqueness explicitly.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} charterReferenceId - The reference ID of the charter to patch.
|
|
103
|
+
* @param {MavenAGI.CharterPatchRequest} request
|
|
104
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
107
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
108
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
109
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
110
|
+
* @throws {@link MavenAGI.ServerError}
|
|
111
|
+
* @throws {@link errors.MavenAGIError}
|
|
112
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await client.charters.patch("cancellation-flow", {
|
|
116
|
+
* precondition: {
|
|
117
|
+
* preconditionType: "conversation",
|
|
118
|
+
* value: {
|
|
119
|
+
* conversationPreconditionType: "tags",
|
|
120
|
+
* tags: new Set(["cancellation"])
|
|
121
|
+
* }
|
|
122
|
+
* },
|
|
123
|
+
* status: "ACTIVE"
|
|
124
|
+
* })
|
|
125
|
+
*/
|
|
126
|
+
patch(charterReferenceId: string, request?: MavenAGI.CharterPatchRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterResponse>;
|
|
127
|
+
private __patch;
|
|
128
|
+
/**
|
|
129
|
+
* Delete a charter and all of its descendants recursively.
|
|
130
|
+
*
|
|
131
|
+
* The charter must be set to `INACTIVE` before it can be deleted. This prevents accidental
|
|
132
|
+
* deletion of active charters. Descendant charters may be in any status — they will be
|
|
133
|
+
* soft-deleted regardless.
|
|
134
|
+
*
|
|
135
|
+
* Deleted charters are excluded from list results but can be retrieved by ID for archival purposes.
|
|
136
|
+
*
|
|
137
|
+
* Deleted charters cannot be modified.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} charterReferenceId - The reference ID of the charter to delete.
|
|
140
|
+
* @param {MavenAGI.CharterDeleteRequest} request
|
|
141
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
144
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
145
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
146
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
147
|
+
* @throws {@link MavenAGI.ServerError}
|
|
148
|
+
* @throws {@link errors.MavenAGIError}
|
|
149
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* await client.charters.delete("cancellation-flow")
|
|
153
|
+
*/
|
|
154
|
+
delete(charterReferenceId: string, request?: MavenAGI.CharterDeleteRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterResponse>;
|
|
155
|
+
private __delete;
|
|
156
|
+
/**
|
|
157
|
+
* Search for charters matching the provided filters. Supports filtering by
|
|
158
|
+
* referenced action IDs and knowledge base IDs to find charters that make
|
|
159
|
+
* specific context items available.
|
|
160
|
+
*
|
|
161
|
+
* Returns both ACTIVE and INACTIVE charters (DELETED charters are excluded).
|
|
162
|
+
*
|
|
163
|
+
* Results are ordered by the `sort` field (defaults to CreatedAt). Use `sortDesc`
|
|
164
|
+
* to control direction (defaults to descending). An empty filter list is
|
|
165
|
+
* equivalent to omitting the field (no filter applied).
|
|
166
|
+
*
|
|
167
|
+
* @param {MavenAGI.CharterSearchRequest} request
|
|
168
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
|
+
*
|
|
170
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
171
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
172
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
173
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
174
|
+
* @throws {@link MavenAGI.ServerError}
|
|
175
|
+
* @throws {@link errors.MavenAGIError}
|
|
176
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* await client.charters.search({
|
|
180
|
+
* page: 0,
|
|
181
|
+
* size: 20
|
|
182
|
+
* })
|
|
183
|
+
*/
|
|
184
|
+
search(request: MavenAGI.CharterSearchRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterSearchResponse>;
|
|
185
|
+
private __search;
|
|
186
|
+
/**
|
|
187
|
+
* Return a flat list containing the specified charter and all of its ancestors
|
|
188
|
+
* up to the root. Useful for rendering tree context around search results.
|
|
189
|
+
*
|
|
190
|
+
* Each entry is a full charter, so an ancestor's references and precondition are
|
|
191
|
+
* readable without a follow-up request per level.
|
|
192
|
+
*
|
|
193
|
+
* The list is always finite: charter hierarchies are acyclic, so a charter is never its own
|
|
194
|
+
* ancestor and the walk to the root terminates.
|
|
195
|
+
*
|
|
196
|
+
* Returns 404 if the charter does not exist or is deleted.
|
|
197
|
+
*
|
|
198
|
+
* @param {string} charterReferenceId - The reference ID of the charter. All other entity ID fields are inferred from the request.
|
|
199
|
+
* @param {MavenAGI.CharterGetAncestorsRequest} request
|
|
200
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
201
|
+
*
|
|
202
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
203
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
204
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
205
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
206
|
+
* @throws {@link MavenAGI.ServerError}
|
|
207
|
+
* @throws {@link errors.MavenAGIError}
|
|
208
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* await client.charters.getAncestors("cancellation-step-1")
|
|
212
|
+
*/
|
|
213
|
+
getAncestors(charterReferenceId: string, request?: MavenAGI.CharterGetAncestorsRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterAncestorsResponse>;
|
|
214
|
+
private __getAncestors;
|
|
215
|
+
/**
|
|
216
|
+
* Batch fetch direct children of the specified parent charters. Returns one
|
|
217
|
+
* group per requested parent in the same order as parentIds, with grandchild
|
|
218
|
+
* IDs populated on each child for expandability signals.
|
|
219
|
+
*
|
|
220
|
+
* Pass an empty parentIds list to fetch all root-level charters for the agent.
|
|
221
|
+
* Intended to be used for easy BFS traversal, though calling with parents
|
|
222
|
+
* at mixed levels are allowed. Roots and specific parents cannot be mixed
|
|
223
|
+
* in one request.
|
|
224
|
+
*
|
|
225
|
+
* DELETED charters are never returned.
|
|
226
|
+
*
|
|
227
|
+
* @param {MavenAGI.CharterListChildrenRequest} request
|
|
228
|
+
* @param {ChartersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
229
|
+
*
|
|
230
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
231
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
232
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
233
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
234
|
+
* @throws {@link MavenAGI.ServerError}
|
|
235
|
+
* @throws {@link errors.MavenAGIError}
|
|
236
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* await client.charters.listChildren({
|
|
240
|
+
* parentIds: []
|
|
241
|
+
* })
|
|
242
|
+
*/
|
|
243
|
+
listChildren(request: MavenAGI.CharterListChildrenRequest, requestOptions?: ChartersClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CharterListChildrenResponse>;
|
|
244
|
+
private __listChildren;
|
|
245
|
+
}
|