mavenagi 1.2.59 → 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/actions/client/requests/ActionPatchRequest.d.ts +2 -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 +7 -3
- package/api/resources/agents/types/AgentPrompting.d.ts +7 -3
- package/api/resources/analytics/client/Client.d.ts +21 -1
- package/api/resources/analytics/client/Client.js +29 -8
- 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 +2 -5
- 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/ActionProperties.d.ts +5 -1
- package/api/resources/commons/types/ActionResponse.d.ts +3 -3
- 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/EventFilter.d.ts +5 -0
- package/api/resources/commons/types/EventTriggerType.d.ts +2 -0
- package/api/resources/commons/types/EventTriggerType.js +2 -0
- package/api/resources/commons/types/IntelligentFieldPrecondition.d.ts +0 -4
- package/api/resources/commons/types/KnowledgeContextByEntities.d.ts +11 -0
- package/api/resources/commons/types/KnowledgeContextByEntityTypes.d.ts +3 -0
- package/api/resources/commons/types/KnowledgeContextFilter.d.ts +6 -1
- package/api/resources/commons/types/LlmPersona.d.ts +1 -0
- package/api/resources/commons/types/LlmPersona.js +1 -0
- 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/NovelUserEvent.d.ts +4 -1
- package/api/resources/commons/types/ResponseConfig.d.ts +9 -3
- package/api/resources/commons/types/SimulationContext.d.ts +3 -3
- package/api/resources/commons/types/SystemEventName.d.ts +27 -0
- package/api/resources/commons/types/SystemEventName.js +27 -0
- package/api/resources/commons/types/UserEvent.d.ts +4 -1
- package/api/resources/commons/types/UserEventName.d.ts +84 -0
- package/api/resources/commons/types/UserEventName.js +84 -0
- package/api/resources/commons/types/UserMessage.d.ts +7 -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 +35 -1
- package/api/resources/conversation/client/Client.js +51 -18
- package/api/resources/conversation/types/AskRequest.d.ts +10 -10
- package/api/resources/conversation/types/ConversationFilter.d.ts +10 -4
- 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/client/requests/KnowledgeBasePatchRequest.d.ts +18 -10
- package/api/resources/knowledge/types/KnowledgeBaseFilter.d.ts +6 -1
- package/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +5 -1
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +10 -6
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +13 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +16 -1
- 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 +20 -0
- package/api/resources/segments/client/Client.js +24 -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/triggers/types/EventTriggerBase.d.ts +3 -1
- 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 +595 -5
- 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 +2 -3
- package/serialization/resources/charters/types/CharterSummary.js +2 -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 +14 -1
- package/serialization/resources/commons/types/UserEventName.d.ts +1 -1
- package/serialization/resources/commons/types/UserEventName.js +28 -0
- package/serialization/resources/commons/types/UserMessage.d.ts +1 -0
- package/serialization/resources/commons/types/UserMessage.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,15 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface CharterSearchFilter {
|
|
3
|
+
/**
|
|
4
|
+
* Filter to charters that reference any of the specified actions (OR within this field).
|
|
5
|
+
* When combined with knowledgeBaseIds, both filters must match (AND across fields).
|
|
6
|
+
* An empty list is equivalent to omitting the field. Maximum 50 IDs.
|
|
7
|
+
*/
|
|
8
|
+
actionIds?: MavenAGI.EntityId[];
|
|
9
|
+
/**
|
|
10
|
+
* Filter to charters that reference any of the specified knowledge bases (OR within this field).
|
|
11
|
+
* When combined with actionIds, both filters must match (AND across fields).
|
|
12
|
+
* An empty list is equivalent to omitting the field. Maximum 50 IDs.
|
|
13
|
+
*/
|
|
14
|
+
knowledgeBaseIds?: MavenAGI.EntityId[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* number: 0,
|
|
6
|
+
* size: 20,
|
|
7
|
+
* totalElements: 1,
|
|
8
|
+
* totalPages: 1,
|
|
9
|
+
* charters: [{
|
|
10
|
+
* charterId: {
|
|
11
|
+
* referenceId: "cancellation-flow",
|
|
12
|
+
* appId: "support-app",
|
|
13
|
+
* organizationId: "acme",
|
|
14
|
+
* agentId: "support",
|
|
15
|
+
* type: MavenAGI.EntityType.Charter
|
|
16
|
+
* },
|
|
17
|
+
* name: "Cancellation Flow",
|
|
18
|
+
* precondition: {
|
|
19
|
+
* preconditionType: "conversation",
|
|
20
|
+
* value: {
|
|
21
|
+
* conversationPreconditionType: "tags",
|
|
22
|
+
* tags: new Set(["cancellation"])
|
|
23
|
+
* }
|
|
24
|
+
* },
|
|
25
|
+
* status: MavenAGI.CharterStatus.Active,
|
|
26
|
+
* type: MavenAGI.CharterType.Standard,
|
|
27
|
+
* childrenExclusionPolicy: MavenAGI.CharterChildrenExclusionPolicy.Default,
|
|
28
|
+
* createdAt: new Date("2025-01-01T00:00:00.000Z"),
|
|
29
|
+
* updatedAt: new Date("2025-01-15T12:30:00.000Z")
|
|
30
|
+
* }]
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
export interface CharterSearchResponse extends MavenAGI.Page {
|
|
34
|
+
/** Charters matching the search criteria. */
|
|
35
|
+
charters: MavenAGI.CharterSummary[];
|
|
36
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The lifecycle status of a charter.
|
|
3
3
|
*
|
|
4
|
-
* - ACTIVE: The charter is active and will be evaluated
|
|
4
|
+
* - ACTIVE: The charter is active and will be evaluated on every round. The caller is responsible
|
|
5
5
|
* for ensuring ancestor charters are also ACTIVE if the full subtree should be reachable.
|
|
6
6
|
* - INACTIVE: The charter is inactive. It retains its rank among siblings and its descendants retain their statuses.
|
|
7
|
-
* However, it and its descendants are skipped during runtime
|
|
7
|
+
* However, it and its descendants are skipped during runtime evaluation.
|
|
8
8
|
* - DELETED: The charter has been soft deleted. Excluded from searches and cannot be modified.
|
|
9
9
|
* Deleting a charter cascades to all descendants (they are also soft-deleted).
|
|
10
10
|
*/
|
|
@@ -5,10 +5,10 @@ exports.CharterStatus = void 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* The lifecycle status of a charter.
|
|
7
7
|
*
|
|
8
|
-
* - ACTIVE: The charter is active and will be evaluated
|
|
8
|
+
* - ACTIVE: The charter is active and will be evaluated on every round. The caller is responsible
|
|
9
9
|
* for ensuring ancestor charters are also ACTIVE if the full subtree should be reachable.
|
|
10
10
|
* - INACTIVE: The charter is inactive. It retains its rank among siblings and its descendants retain their statuses.
|
|
11
|
-
* However, it and its descendants are skipped during runtime
|
|
11
|
+
* However, it and its descendants are skipped during runtime evaluation.
|
|
12
12
|
* - DELETED: The charter has been soft deleted. Excluded from searches and cannot be modified.
|
|
13
13
|
* Deleting a charter cascades to all descendants (they are also soft-deleted).
|
|
14
14
|
*/
|
|
@@ -8,11 +8,8 @@ export interface CharterSummary {
|
|
|
8
8
|
charterId: MavenAGI.EntityId;
|
|
9
9
|
/** The display name of the charter. */
|
|
10
10
|
name: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
* (always matches).
|
|
14
|
-
*/
|
|
15
|
-
segmentSummary: MavenAGI.SegmentSummary | null;
|
|
11
|
+
/** The rule controlling when this charter applies. Null means wildcard (always matches). */
|
|
12
|
+
precondition: MavenAGI.PreconditionResponse | null;
|
|
16
13
|
/** The ID of the parent charter. Null for root-level charters. */
|
|
17
14
|
parentCharterId: MavenAGI.EntityId | null;
|
|
18
15
|
/** The lifecycle status of this charter. */
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
* verbatim, without invoking the LLM. The charter cannot have children, and
|
|
8
8
|
* its manual must be non-blank — the manual is the response.
|
|
9
9
|
*
|
|
10
|
-
* A STRICT_RETURN charter references nothing: both `
|
|
10
|
+
* A STRICT_RETURN charter references nothing: both `knowledgeBases` and
|
|
11
11
|
* `actionIds` must be empty, and a create or update supplying either is
|
|
12
|
-
* rejected. With no LLM in the
|
|
12
|
+
* rejected. With no LLM in the round there is nothing to consult a knowledge
|
|
13
13
|
* base or to choose an action.
|
|
14
14
|
*
|
|
15
15
|
* A STRICT_RETURN charter is matched exactly like any other charter — same
|
|
16
16
|
* ordering and mutual-exclusion rules. The only difference is what a match
|
|
17
|
-
* does: the first matched STRICT_RETURN charter takes over the
|
|
17
|
+
* does: the first matched STRICT_RETURN charter takes over the round, so its
|
|
18
18
|
* manual is the whole response and every other matched charter is ignored.
|
|
19
|
-
* (At most one applies per
|
|
19
|
+
* (At most one applies per round.)
|
|
20
20
|
*/
|
|
21
21
|
export declare const CharterType: {
|
|
22
22
|
readonly Standard: "STANDARD";
|
|
@@ -11,16 +11,16 @@ exports.CharterType = void 0;
|
|
|
11
11
|
* verbatim, without invoking the LLM. The charter cannot have children, and
|
|
12
12
|
* its manual must be non-blank — the manual is the response.
|
|
13
13
|
*
|
|
14
|
-
* A STRICT_RETURN charter references nothing: both `
|
|
14
|
+
* A STRICT_RETURN charter references nothing: both `knowledgeBases` and
|
|
15
15
|
* `actionIds` must be empty, and a create or update supplying either is
|
|
16
|
-
* rejected. With no LLM in the
|
|
16
|
+
* rejected. With no LLM in the round there is nothing to consult a knowledge
|
|
17
17
|
* base or to choose an action.
|
|
18
18
|
*
|
|
19
19
|
* A STRICT_RETURN charter is matched exactly like any other charter — same
|
|
20
20
|
* ordering and mutual-exclusion rules. The only difference is what a match
|
|
21
|
-
* does: the first matched STRICT_RETURN charter takes over the
|
|
21
|
+
* does: the first matched STRICT_RETURN charter takes over the round, so its
|
|
22
22
|
* manual is the whole response and every other matched charter is ignored.
|
|
23
|
-
* (At most one applies per
|
|
23
|
+
* (At most one applies per round.)
|
|
24
24
|
*/
|
|
25
25
|
exports.CharterType = {
|
|
26
26
|
Standard: "STANDARD",
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
export * from "./CharterAncestorsResponse";
|
|
2
|
+
export * from "./CharterBase";
|
|
1
3
|
export * from "./CharterChildrenExclusionPolicy";
|
|
4
|
+
export * from "./CharterChildrenGroup";
|
|
5
|
+
export * from "./CharterContent";
|
|
6
|
+
export * from "./CharterKnowledgeBaseReference";
|
|
7
|
+
export * from "./CharterListChildrenRequest";
|
|
8
|
+
export * from "./CharterListChildrenResponse";
|
|
9
|
+
export * from "./CharterPatchReferences";
|
|
10
|
+
export * from "./CharterReferences";
|
|
11
|
+
export * from "./CharterRequest";
|
|
12
|
+
export * from "./CharterResponse";
|
|
13
|
+
export * from "./CharterSearchField";
|
|
14
|
+
export * from "./CharterSearchFilter";
|
|
15
|
+
export * from "./CharterSearchRequest";
|
|
16
|
+
export * from "./CharterSearchResponse";
|
|
2
17
|
export * from "./CharterStatus";
|
|
3
18
|
export * from "./CharterSummary";
|
|
4
19
|
export * from "./CharterType";
|
|
@@ -14,7 +14,22 @@ 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("./CharterAncestorsResponse"), exports);
|
|
18
|
+
__exportStar(require("./CharterBase"), exports);
|
|
17
19
|
__exportStar(require("./CharterChildrenExclusionPolicy"), exports);
|
|
20
|
+
__exportStar(require("./CharterChildrenGroup"), exports);
|
|
21
|
+
__exportStar(require("./CharterContent"), exports);
|
|
22
|
+
__exportStar(require("./CharterKnowledgeBaseReference"), exports);
|
|
23
|
+
__exportStar(require("./CharterListChildrenRequest"), exports);
|
|
24
|
+
__exportStar(require("./CharterListChildrenResponse"), exports);
|
|
25
|
+
__exportStar(require("./CharterPatchReferences"), exports);
|
|
26
|
+
__exportStar(require("./CharterReferences"), exports);
|
|
27
|
+
__exportStar(require("./CharterRequest"), exports);
|
|
28
|
+
__exportStar(require("./CharterResponse"), exports);
|
|
29
|
+
__exportStar(require("./CharterSearchField"), exports);
|
|
30
|
+
__exportStar(require("./CharterSearchFilter"), exports);
|
|
31
|
+
__exportStar(require("./CharterSearchRequest"), exports);
|
|
32
|
+
__exportStar(require("./CharterSearchResponse"), exports);
|
|
18
33
|
__exportStar(require("./CharterStatus"), exports);
|
|
19
34
|
__exportStar(require("./CharterSummary"), exports);
|
|
20
35
|
__exportStar(require("./CharterType"), exports);
|
|
@@ -2,5 +2,6 @@ import type * as core from "../../../../core";
|
|
|
2
2
|
import * as errors from "../../../../errors/index";
|
|
3
3
|
import type * as MavenAGI from "../../../index";
|
|
4
4
|
export declare class BadRequestError extends errors.MavenAGIError {
|
|
5
|
+
readonly body: MavenAGI.ErrorMessage;
|
|
5
6
|
constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
|
|
6
7
|
}
|
|
@@ -48,7 +48,7 @@ class BadRequestError extends errors.MavenAGIError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "BadRequestError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.BadRequestError = BadRequestError;
|
|
@@ -2,5 +2,6 @@ import type * as core from "../../../../core";
|
|
|
2
2
|
import * as errors from "../../../../errors/index";
|
|
3
3
|
import type * as MavenAGI from "../../../index";
|
|
4
4
|
export declare class NotFoundError extends errors.MavenAGIError {
|
|
5
|
+
readonly body: MavenAGI.ErrorMessage;
|
|
5
6
|
constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
|
|
6
7
|
}
|
|
@@ -48,7 +48,7 @@ class NotFoundError extends errors.MavenAGIError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "NotFoundError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.NotFoundError = NotFoundError;
|
|
@@ -2,5 +2,6 @@ import type * as core from "../../../../core";
|
|
|
2
2
|
import * as errors from "../../../../errors/index";
|
|
3
3
|
import type * as MavenAGI from "../../../index";
|
|
4
4
|
export declare class PayloadTooLargeError extends errors.MavenAGIError {
|
|
5
|
+
readonly body: MavenAGI.ErrorMessage;
|
|
5
6
|
constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
|
|
6
7
|
}
|
|
@@ -48,7 +48,7 @@ class PayloadTooLargeError extends errors.MavenAGIError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "PayloadTooLargeError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.PayloadTooLargeError = PayloadTooLargeError;
|
|
@@ -2,5 +2,6 @@ import type * as core from "../../../../core";
|
|
|
2
2
|
import * as errors from "../../../../errors/index";
|
|
3
3
|
import type * as MavenAGI from "../../../index";
|
|
4
4
|
export declare class ServerError extends errors.MavenAGIError {
|
|
5
|
+
readonly body: MavenAGI.ErrorMessage;
|
|
5
6
|
constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
|
|
6
7
|
}
|
|
@@ -2,5 +2,6 @@ import type * as core from "../../../../core";
|
|
|
2
2
|
import * as errors from "../../../../errors/index";
|
|
3
3
|
import type * as MavenAGI from "../../../index";
|
|
4
4
|
export declare class TooManyRequestsError extends errors.MavenAGIError {
|
|
5
|
+
readonly body: MavenAGI.ErrorMessage;
|
|
5
6
|
constructor(body: MavenAGI.ErrorMessage, rawResponse?: core.RawResponse);
|
|
6
7
|
}
|
|
@@ -48,7 +48,7 @@ class TooManyRequestsError extends errors.MavenAGIError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "TooManyRequestsError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -4,7 +4,11 @@ export interface ActionProperties {
|
|
|
4
4
|
userInteractionRequired: boolean;
|
|
5
5
|
/** When user interaction is required, the name of the button that is shown to the end user to confirm execution of the action. Defaults to "Submit" if not supplied. */
|
|
6
6
|
buttonName?: string;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
9
|
+
*
|
|
10
|
+
* The preconditions that must be met for an action to be relevant to a conversation.
|
|
11
|
+
*/
|
|
8
12
|
precondition?: MavenAGI.Precondition;
|
|
9
13
|
/** The parameters that the action uses as input. An action will only be executed when all of the required parameters are provided. During execution, actions all have access to the full Conversation and User objects. Parameter values may be inferred from the user's conversation by the LLM. */
|
|
10
14
|
userFormParameters: MavenAGI.ActionParameter[];
|
|
@@ -54,9 +54,9 @@ export interface ActionResponse extends MavenAGI.ActionBase {
|
|
|
54
54
|
*/
|
|
55
55
|
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
57
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
58
|
+
*
|
|
59
|
+
* The ID of the segment that must be matched for the action to be relevant to a conversation.
|
|
60
60
|
*/
|
|
61
61
|
segmentId?: MavenAGI.EntityId;
|
|
62
62
|
/** No longer populated. This field is always absent and will be removed in a future release. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/** What prompts the assistant
|
|
1
|
+
/** What prompts the assistant response produced by an ask. Defaults to USER_MESSAGE when omitted. */
|
|
2
2
|
export declare const AskType: {
|
|
3
3
|
/**
|
|
4
4
|
* The default. Respond to a message the user sent; the user's words are in `text` (required). */
|
|
5
5
|
readonly UserMessage: "USER_MESSAGE";
|
|
6
6
|
/**
|
|
7
|
-
* The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first
|
|
7
|
+
* The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first round of a conversation. */
|
|
8
8
|
readonly Welcome: "WELCOME";
|
|
9
9
|
/**
|
|
10
10
|
* The agent proactively sends a message the user did not prompt. `text` is optional here; when provided it steers what the agent says (e.g. "tell the user to restart their machine") and is a directive to the agent, not the user's own words. */
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.AskType = void 0;
|
|
5
|
-
/** What prompts the assistant
|
|
5
|
+
/** What prompts the assistant response produced by an ask. Defaults to USER_MESSAGE when omitted. */
|
|
6
6
|
exports.AskType = {
|
|
7
7
|
/**
|
|
8
8
|
* The default. Respond to a message the user sent; the user's words are in `text` (required). */
|
|
9
9
|
UserMessage: "USER_MESSAGE",
|
|
10
10
|
/**
|
|
11
|
-
* The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first
|
|
11
|
+
* The agent opens the conversation with its own greeting, with no user input. `text` is optional here; when provided it steers the greeting. Intended as the first round of a conversation. */
|
|
12
12
|
Welcome: "WELCOME",
|
|
13
13
|
/**
|
|
14
14
|
* The agent proactively sends a message the user did not prompt. `text` is optional here; when provided it steers what the agent says (e.g. "tell the user to restart their machine") and is a directive to the agent, not the user's own words. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The structured answer for an ask whose `textFormat` was `jsonSchema`. Accompanies the `BotTextResponse` rather than replacing it — the same
|
|
2
|
+
* The structured answer for an ask whose `textFormat` was `jsonSchema`. Accompanies the `BotTextResponse` rather than replacing it — the same round produces both, so the conversation still reads as prose.
|
|
3
3
|
*/
|
|
4
4
|
export interface BotObjectResponse {
|
|
5
5
|
/** The answer, matching the schema the ask supplied. Every property the schema requires is present, with `null` where a nullable one does not apply. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is
|
|
1
|
+
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is one user-visible bot response, which may span several model calls as actions run. The current round is the response being generated now, so CURRENT matches an action that ran earlier in this same response. */
|
|
2
2
|
export declare const ConversationRound: {
|
|
3
3
|
/**
|
|
4
4
|
* The action has executed in any round of the conversation. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ConversationRound = void 0;
|
|
5
|
-
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is
|
|
5
|
+
/** Which round of the conversation an action must have executed in for a ConversationExecutedActionPrecondition to be met. A round is one user-visible bot response, which may span several model calls as actions run. The current round is the response being generated now, so CURRENT matches an action that ran earlier in this same response. */
|
|
6
6
|
exports.ConversationRound = {
|
|
7
7
|
/**
|
|
8
8
|
* The action has executed in any round of the conversation. */
|
|
@@ -8,6 +8,11 @@ export interface EventFilter {
|
|
|
8
8
|
userEventNames?: MavenAGI.UserEventName[];
|
|
9
9
|
systemEventNames?: MavenAGI.SystemEventName[];
|
|
10
10
|
agentUserIds?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Narrow to the events that carry a rating. `ThumbsUp` and `ThumbsDown` match `BUTTON_CLICKED`
|
|
13
|
+
* events by their `feedbackInfo.thumbUp` value, and `Insert` matches `TEXT_INSERTED` events.
|
|
14
|
+
* `Handoff` is no longer supported.
|
|
15
|
+
*/
|
|
11
16
|
legacyFeedbackTypes?: MavenAGI.FeedbackType[];
|
|
12
17
|
hasEventText?: boolean;
|
|
13
18
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const EventTriggerType: {
|
|
2
2
|
readonly ConversationCreated: "CONVERSATION_CREATED";
|
|
3
|
+
/**
|
|
4
|
+
* Deprecated. Use `EVENT_CREATED` instead. */
|
|
3
5
|
readonly FeedbackCreated: "FEEDBACK_CREATED";
|
|
4
6
|
readonly InboxItemCreated: "INBOX_ITEM_CREATED";
|
|
5
7
|
readonly EventCreated: "EVENT_CREATED";
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.EventTriggerType = void 0;
|
|
5
5
|
exports.EventTriggerType = {
|
|
6
6
|
ConversationCreated: "CONVERSATION_CREATED",
|
|
7
|
+
/**
|
|
8
|
+
* Deprecated. Use `EVENT_CREATED` instead. */
|
|
7
9
|
FeedbackCreated: "FEEDBACK_CREATED",
|
|
8
10
|
InboxItemCreated: "INBOX_ITEM_CREATED",
|
|
9
11
|
EventCreated: "EVENT_CREATED",
|
|
@@ -6,10 +6,6 @@ import type * as MavenAGI from "../../../index";
|
|
|
6
6
|
* the ID of the intelligent field (<referenceId, appId>). Available
|
|
7
7
|
* operators and the corresponding types of the RHS depends on the
|
|
8
8
|
* validationType of the intelligent field.
|
|
9
|
-
*
|
|
10
|
-
* Note: in early beta, only opt-in apps and organizations/agents can
|
|
11
|
-
* specify intelligent field preconditions. Otherwise, the request will be
|
|
12
|
-
* rejected.
|
|
13
9
|
*/
|
|
14
10
|
export interface IntelligentFieldPrecondition {
|
|
15
11
|
/** The ID of the intelligent field. */
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
export interface KnowledgeContextByEntities {
|
|
3
|
+
/**
|
|
4
|
+
* The entities whose documents should be retrievable, in addition to the agent's own
|
|
5
|
+
* knowledge. Each `entityId` must be fully specified and must belong to the organization
|
|
6
|
+
* and agent the request is made against; one that does not is rejected. Entities are never
|
|
7
|
+
* silently dropped, which would omit exactly the documents the caller asked to bring into
|
|
8
|
+
* scope.
|
|
9
|
+
*
|
|
10
|
+
* `AGENT` and `FEEDBACK` are rejected: neither has an internal form to resolve to, and
|
|
11
|
+
* `AGENT` in particular is redundant here because the agent's own knowledge is always in
|
|
12
|
+
* scope. Every other `EntityType` is accepted.
|
|
13
|
+
*/
|
|
3
14
|
entities: MavenAGI.ScopedEntity[];
|
|
4
15
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
|
-
export type KnowledgeContextFilter = MavenAGI.KnowledgeContextFilter.ByEntities
|
|
2
|
+
export type KnowledgeContextFilter = MavenAGI.KnowledgeContextFilter.ByEntities
|
|
3
|
+
/**
|
|
4
|
+
* Not yet supported. This variant is accepted but has no effect on retrieval - a
|
|
5
|
+
* conversation supplying it behaves as though no `contextFilter` were provided at all.
|
|
6
|
+
* Use `byEntities` to scope retrieval today. */
|
|
7
|
+
| MavenAGI.KnowledgeContextFilter.ByEntityTypes;
|
|
3
8
|
export declare namespace KnowledgeContextFilter {
|
|
4
9
|
interface ByEntities extends MavenAGI.KnowledgeContextByEntities {
|
|
5
10
|
scopeType: "byEntities";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.LlmPersona = void 0;
|
|
5
|
+
/** Deprecated. Superseded by charters, which determine agent behavior per round. */
|
|
5
6
|
exports.LlmPersona = {
|
|
6
7
|
CasualBuddy: "CASUAL_BUDDY",
|
|
7
8
|
EmpatheticSupporter: "EMPATHETIC_SUPPORTER",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Condition comparing a metadata value against a single string.
|
|
4
|
+
*/
|
|
5
|
+
export interface MetadataComparisonCondition {
|
|
6
|
+
/** The comparison operator to apply */
|
|
7
|
+
operator: MavenAGI.MetadataComparisonOperator;
|
|
8
|
+
/** The string value to compare against */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operators comparing a metadata value against a single string.
|
|
3
|
+
*
|
|
4
|
+
* Narrower than `StringComparisonOperator` by design. Its substring and suffix
|
|
5
|
+
* operators need an unanchored scan of every value, which a metadata filter cannot
|
|
6
|
+
* afford; equality and prefix are answerable straight from an index.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MetadataComparisonOperator: {
|
|
9
|
+
/**
|
|
10
|
+
* Equals (=) */
|
|
11
|
+
readonly Eq: "EQ";
|
|
12
|
+
/**
|
|
13
|
+
* Not equals (!=) */
|
|
14
|
+
readonly Neq: "NEQ";
|
|
15
|
+
/**
|
|
16
|
+
* Value starts with the specified prefix */
|
|
17
|
+
readonly StartsWith: "STARTS_WITH";
|
|
18
|
+
/**
|
|
19
|
+
* Value does not start with the specified prefix */
|
|
20
|
+
readonly NotStartsWith: "NOT_STARTS_WITH";
|
|
21
|
+
};
|
|
22
|
+
export type MetadataComparisonOperator = (typeof MetadataComparisonOperator)[keyof typeof MetadataComparisonOperator] | string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MetadataComparisonOperator = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Operators comparing a metadata value against a single string.
|
|
7
|
+
*
|
|
8
|
+
* Narrower than `StringComparisonOperator` by design. Its substring and suffix
|
|
9
|
+
* operators need an unanchored scan of every value, which a metadata filter cannot
|
|
10
|
+
* afford; equality and prefix are answerable straight from an index.
|
|
11
|
+
*/
|
|
12
|
+
exports.MetadataComparisonOperator = {
|
|
13
|
+
/**
|
|
14
|
+
* Equals (=) */
|
|
15
|
+
Eq: "EQ",
|
|
16
|
+
/**
|
|
17
|
+
* Not equals (!=) */
|
|
18
|
+
Neq: "NEQ",
|
|
19
|
+
/**
|
|
20
|
+
* Value starts with the specified prefix */
|
|
21
|
+
StartsWith: "STARTS_WITH",
|
|
22
|
+
/**
|
|
23
|
+
* Value does not start with the specified prefix */
|
|
24
|
+
NotStartsWith: "NOT_STARTS_WITH",
|
|
25
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A condition on a single metadata value.
|
|
4
|
+
*
|
|
5
|
+
* Unlike `FieldCondition` this has no type discriminant. `FieldCondition` coerces a
|
|
6
|
+
* value to a declared type before comparing it because the values it tests may be
|
|
7
|
+
* numbers, booleans or sets; metadata values are always strings, so there is nothing
|
|
8
|
+
* to declare.
|
|
9
|
+
*/
|
|
10
|
+
export type MetadataCondition = MavenAGI.MetadataCondition.Comparison | MavenAGI.MetadataCondition.Membership | MavenAGI.MetadataCondition.Presence;
|
|
11
|
+
export declare namespace MetadataCondition {
|
|
12
|
+
interface Comparison extends MavenAGI.MetadataComparisonCondition {
|
|
13
|
+
opType: "comparison";
|
|
14
|
+
}
|
|
15
|
+
interface Membership extends MavenAGI.StringMembershipCondition {
|
|
16
|
+
opType: "membership";
|
|
17
|
+
}
|
|
18
|
+
interface Presence extends MavenAGI.PresenceCondition {
|
|
19
|
+
opType: "presence";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A condition on the value stored under one metadata key.
|
|
4
|
+
*/
|
|
5
|
+
export interface MetadataEntryCondition {
|
|
6
|
+
/** The metadata key to test. A plain key, not a path: metadata is a flat string-to-string map, so there is no nesting to address. */
|
|
7
|
+
key: string;
|
|
8
|
+
/** The condition to evaluate against the value stored under `key`. */
|
|
9
|
+
condition: MavenAGI.MetadataCondition;
|
|
10
|
+
}
|