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
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
/** Result type hint used for schema generation, UI, and validation */
|
|
2
2
|
export declare const IntelligentFieldType: {
|
|
3
|
+
/**
|
|
4
|
+
* A single short string value. */
|
|
3
5
|
readonly String: "STRING";
|
|
6
|
+
/**
|
|
7
|
+
* A single string value expected to run to several lines, such as a summary. */
|
|
4
8
|
readonly Multiline: "MULTILINE";
|
|
9
|
+
/**
|
|
10
|
+
* A list of string values, normally paired with `enumOptions` to constrain the choices. */
|
|
5
11
|
readonly MultiSelect: "MULTI_SELECT";
|
|
12
|
+
/**
|
|
13
|
+
* A true/false value. */
|
|
6
14
|
readonly Boolean: "BOOLEAN";
|
|
15
|
+
/**
|
|
16
|
+
* A numeric value. */
|
|
7
17
|
readonly Number: "NUMBER";
|
|
8
18
|
};
|
|
9
19
|
export type IntelligentFieldType = (typeof IntelligentFieldType)[keyof typeof IntelligentFieldType] | string;
|
|
@@ -4,9 +4,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.IntelligentFieldType = void 0;
|
|
5
5
|
/** Result type hint used for schema generation, UI, and validation */
|
|
6
6
|
exports.IntelligentFieldType = {
|
|
7
|
+
/**
|
|
8
|
+
* A single short string value. */
|
|
7
9
|
String: "STRING",
|
|
10
|
+
/**
|
|
11
|
+
* A single string value expected to run to several lines, such as a summary. */
|
|
8
12
|
Multiline: "MULTILINE",
|
|
13
|
+
/**
|
|
14
|
+
* A list of string values, normally paired with `enumOptions` to constrain the choices. */
|
|
9
15
|
MultiSelect: "MULTI_SELECT",
|
|
16
|
+
/**
|
|
17
|
+
* A true/false value. */
|
|
10
18
|
Boolean: "BOOLEAN",
|
|
19
|
+
/**
|
|
20
|
+
* A numeric value. */
|
|
11
21
|
Number: "NUMBER",
|
|
12
22
|
};
|
|
@@ -21,6 +21,8 @@ export declare class KnowledgeClient {
|
|
|
21
21
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
22
22
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
23
23
|
* @throws {@link MavenAGI.ServerError}
|
|
24
|
+
* @throws {@link errors.MavenAGIError}
|
|
25
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
24
26
|
*
|
|
25
27
|
* @example
|
|
26
28
|
* await client.knowledge.searchKnowledgeBases({})
|
|
@@ -38,6 +40,8 @@ export declare class KnowledgeClient {
|
|
|
38
40
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
39
41
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
40
42
|
* @throws {@link MavenAGI.ServerError}
|
|
43
|
+
* @throws {@link errors.MavenAGIError}
|
|
44
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
41
45
|
*
|
|
42
46
|
* @example
|
|
43
47
|
* await client.knowledge.createOrUpdateKnowledgeBase({
|
|
@@ -61,6 +65,8 @@ export declare class KnowledgeClient {
|
|
|
61
65
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
62
66
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
63
67
|
* @throws {@link MavenAGI.ServerError}
|
|
68
|
+
* @throws {@link errors.MavenAGIError}
|
|
69
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
64
70
|
*
|
|
65
71
|
* @example
|
|
66
72
|
* await client.knowledge.getKnowledgeBase("help-center")
|
|
@@ -82,6 +88,8 @@ export declare class KnowledgeClient {
|
|
|
82
88
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
83
89
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
84
90
|
* @throws {@link MavenAGI.ServerError}
|
|
91
|
+
* @throws {@link errors.MavenAGIError}
|
|
92
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
85
93
|
*
|
|
86
94
|
* @example
|
|
87
95
|
* await client.knowledge.refreshKnowledgeBase("help-center", {
|
|
@@ -108,6 +116,8 @@ export declare class KnowledgeClient {
|
|
|
108
116
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
109
117
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
110
118
|
* @throws {@link MavenAGI.ServerError}
|
|
119
|
+
* @throws {@link errors.MavenAGIError}
|
|
120
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
111
121
|
*
|
|
112
122
|
* @example
|
|
113
123
|
* await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {})
|
|
@@ -125,6 +135,8 @@ export declare class KnowledgeClient {
|
|
|
125
135
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
126
136
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
127
137
|
* @throws {@link MavenAGI.ServerError}
|
|
138
|
+
* @throws {@link errors.MavenAGIError}
|
|
139
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
128
140
|
*
|
|
129
141
|
* @example
|
|
130
142
|
* await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
|
|
@@ -146,6 +158,8 @@ export declare class KnowledgeClient {
|
|
|
146
158
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
147
159
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
148
160
|
* @throws {@link MavenAGI.ServerError}
|
|
161
|
+
* @throws {@link errors.MavenAGIError}
|
|
162
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
149
163
|
*
|
|
150
164
|
* @example
|
|
151
165
|
* await client.knowledge.patchKnowledgeBase("help-center", {
|
|
@@ -176,6 +190,8 @@ export declare class KnowledgeClient {
|
|
|
176
190
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
177
191
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
178
192
|
* @throws {@link MavenAGI.ServerError}
|
|
193
|
+
* @throws {@link errors.MavenAGIError}
|
|
194
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
179
195
|
*
|
|
180
196
|
* @example
|
|
181
197
|
* await client.knowledge.createKnowledgeBaseVersion("help-center", {
|
|
@@ -196,6 +212,8 @@ export declare class KnowledgeClient {
|
|
|
196
212
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
197
213
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
198
214
|
* @throws {@link MavenAGI.ServerError}
|
|
215
|
+
* @throws {@link errors.MavenAGIError}
|
|
216
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
199
217
|
*
|
|
200
218
|
* @example
|
|
201
219
|
* await client.knowledge.finalizeKnowledgeBaseVersion("help-center", {
|
|
@@ -225,6 +243,8 @@ export declare class KnowledgeClient {
|
|
|
225
243
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
226
244
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
227
245
|
* @throws {@link MavenAGI.ServerError}
|
|
246
|
+
* @throws {@link errors.MavenAGIError}
|
|
247
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
228
248
|
*
|
|
229
249
|
* @example
|
|
230
250
|
* await client.knowledge.updateKnowledgeBaseVersionProgress("help-center", {
|
|
@@ -254,6 +274,8 @@ export declare class KnowledgeClient {
|
|
|
254
274
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
255
275
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
256
276
|
* @throws {@link MavenAGI.ServerError}
|
|
277
|
+
* @throws {@link errors.MavenAGIError}
|
|
278
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
257
279
|
*
|
|
258
280
|
* @example
|
|
259
281
|
* await client.knowledge.listKnowledgeBaseVersions("knowledgeBaseReferenceId")
|
|
@@ -271,6 +293,8 @@ export declare class KnowledgeClient {
|
|
|
271
293
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
272
294
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
273
295
|
* @throws {@link MavenAGI.ServerError}
|
|
296
|
+
* @throws {@link errors.MavenAGIError}
|
|
297
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
274
298
|
*
|
|
275
299
|
* @example
|
|
276
300
|
* await client.knowledge.searchKnowledgeDocuments({})
|
|
@@ -295,6 +319,8 @@ export declare class KnowledgeClient {
|
|
|
295
319
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
296
320
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
297
321
|
* @throws {@link MavenAGI.ServerError}
|
|
322
|
+
* @throws {@link errors.MavenAGIError}
|
|
323
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
298
324
|
*
|
|
299
325
|
* @example
|
|
300
326
|
* await client.knowledge.createKnowledgeDocument("help-center", {
|
|
@@ -332,6 +358,8 @@ export declare class KnowledgeClient {
|
|
|
332
358
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
333
359
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
334
360
|
* @throws {@link MavenAGI.ServerError}
|
|
361
|
+
* @throws {@link errors.MavenAGIError}
|
|
362
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
335
363
|
*
|
|
336
364
|
* @example
|
|
337
365
|
* await client.knowledge.deleteKnowledgeDocument("help-center", "getting-started", {
|
|
@@ -357,6 +385,8 @@ export declare class KnowledgeClient {
|
|
|
357
385
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
358
386
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
359
387
|
* @throws {@link MavenAGI.ServerError}
|
|
388
|
+
* @throws {@link errors.MavenAGIError}
|
|
389
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
360
390
|
*
|
|
361
391
|
* @example
|
|
362
392
|
* await client.knowledge.getKnowledgeDocument("knowledgeBaseVersionReferenceId", "knowledgeDocumentReferenceId", {
|
|
@@ -383,6 +413,8 @@ export declare class KnowledgeClient {
|
|
|
383
413
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
384
414
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
385
415
|
* @throws {@link MavenAGI.ServerError}
|
|
416
|
+
* @throws {@link errors.MavenAGIError}
|
|
417
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
386
418
|
*
|
|
387
419
|
* @example
|
|
388
420
|
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
@@ -47,6 +47,7 @@ exports.KnowledgeClient = void 0;
|
|
|
47
47
|
const BaseClient_1 = require("../../../../BaseClient");
|
|
48
48
|
const core = __importStar(require("../../../../core"));
|
|
49
49
|
const headers_1 = require("../../../../core/headers");
|
|
50
|
+
const requestBody_1 = require("../../../../core/requestBody");
|
|
50
51
|
const environments = __importStar(require("../../../../environments"));
|
|
51
52
|
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
52
53
|
const errors = __importStar(require("../../../../errors/index"));
|
|
@@ -67,6 +68,8 @@ class KnowledgeClient {
|
|
|
67
68
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
68
69
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
69
70
|
* @throws {@link MavenAGI.ServerError}
|
|
71
|
+
* @throws {@link errors.MavenAGIError}
|
|
72
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
70
73
|
*
|
|
71
74
|
* @example
|
|
72
75
|
* await client.knowledge.searchKnowledgeBases({})
|
|
@@ -89,7 +92,7 @@ class KnowledgeClient {
|
|
|
89
92
|
contentType: "application/json",
|
|
90
93
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
91
94
|
requestType: "json",
|
|
92
|
-
body: serializers.KnowledgeBaseSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
95
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBaseSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
93
96
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
94
97
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
95
98
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -166,6 +169,8 @@ class KnowledgeClient {
|
|
|
166
169
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
167
170
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
168
171
|
* @throws {@link MavenAGI.ServerError}
|
|
172
|
+
* @throws {@link errors.MavenAGIError}
|
|
173
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
169
174
|
*
|
|
170
175
|
* @example
|
|
171
176
|
* await client.knowledge.createOrUpdateKnowledgeBase({
|
|
@@ -193,7 +198,7 @@ class KnowledgeClient {
|
|
|
193
198
|
contentType: "application/json",
|
|
194
199
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
195
200
|
requestType: "json",
|
|
196
|
-
body: serializers.KnowledgeBaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
201
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
197
202
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
198
203
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
199
204
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -271,6 +276,8 @@ class KnowledgeClient {
|
|
|
271
276
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
272
277
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
273
278
|
* @throws {@link MavenAGI.ServerError}
|
|
279
|
+
* @throws {@link errors.MavenAGIError}
|
|
280
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
274
281
|
*
|
|
275
282
|
* @example
|
|
276
283
|
* await client.knowledge.getKnowledgeBase("help-center")
|
|
@@ -379,6 +386,8 @@ class KnowledgeClient {
|
|
|
379
386
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
380
387
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
381
388
|
* @throws {@link MavenAGI.ServerError}
|
|
389
|
+
* @throws {@link errors.MavenAGIError}
|
|
390
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
382
391
|
*
|
|
383
392
|
* @example
|
|
384
393
|
* await client.knowledge.refreshKnowledgeBase("help-center", {
|
|
@@ -403,7 +412,7 @@ class KnowledgeClient {
|
|
|
403
412
|
contentType: "application/json",
|
|
404
413
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
405
414
|
requestType: "json",
|
|
406
|
-
body: serializers.KnowledgeBaseRefreshRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
415
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBaseRefreshRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
407
416
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
408
417
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
409
418
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -479,6 +488,8 @@ class KnowledgeClient {
|
|
|
479
488
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
480
489
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
481
490
|
* @throws {@link MavenAGI.ServerError}
|
|
491
|
+
* @throws {@link errors.MavenAGIError}
|
|
492
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
482
493
|
*
|
|
483
494
|
* @example
|
|
484
495
|
* await client.knowledge.cancelKnowledgeBaseVersion("knowledgeBaseReferenceId", {})
|
|
@@ -501,9 +512,7 @@ class KnowledgeClient {
|
|
|
501
512
|
contentType: "application/json",
|
|
502
513
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
503
514
|
requestType: "json",
|
|
504
|
-
body: serializers.CancelKnowledgeBaseVersionRequest.jsonOrThrow(request, {
|
|
505
|
-
unrecognizedObjectKeys: "strip",
|
|
506
|
-
}),
|
|
515
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.CancelKnowledgeBaseVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
507
516
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
508
517
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
509
518
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -572,6 +581,8 @@ class KnowledgeClient {
|
|
|
572
581
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
573
582
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
574
583
|
* @throws {@link MavenAGI.ServerError}
|
|
584
|
+
* @throws {@link errors.MavenAGIError}
|
|
585
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
575
586
|
*
|
|
576
587
|
* @example
|
|
577
588
|
* await client.knowledge.rollbackKnowledgeBaseVersion("knowledgeBaseReferenceId")
|
|
@@ -664,6 +675,8 @@ class KnowledgeClient {
|
|
|
664
675
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
665
676
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
666
677
|
* @throws {@link MavenAGI.ServerError}
|
|
678
|
+
* @throws {@link errors.MavenAGIError}
|
|
679
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
667
680
|
*
|
|
668
681
|
* @example
|
|
669
682
|
* await client.knowledge.patchKnowledgeBase("help-center", {
|
|
@@ -696,7 +709,7 @@ class KnowledgeClient {
|
|
|
696
709
|
contentType: "application/merge-patch+json",
|
|
697
710
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
698
711
|
requestType: "json",
|
|
699
|
-
body: serializers.KnowledgeBasePatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
712
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBasePatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
700
713
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
701
714
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
702
715
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -776,6 +789,8 @@ class KnowledgeClient {
|
|
|
776
789
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
777
790
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
778
791
|
* @throws {@link MavenAGI.ServerError}
|
|
792
|
+
* @throws {@link errors.MavenAGIError}
|
|
793
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
779
794
|
*
|
|
780
795
|
* @example
|
|
781
796
|
* await client.knowledge.createKnowledgeBaseVersion("help-center", {
|
|
@@ -800,7 +815,7 @@ class KnowledgeClient {
|
|
|
800
815
|
contentType: "application/json",
|
|
801
816
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
802
817
|
requestType: "json",
|
|
803
|
-
body: serializers.KnowledgeBaseVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
818
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBaseVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
804
819
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
805
820
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
806
821
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -878,6 +893,8 @@ class KnowledgeClient {
|
|
|
878
893
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
879
894
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
880
895
|
* @throws {@link MavenAGI.ServerError}
|
|
896
|
+
* @throws {@link errors.MavenAGIError}
|
|
897
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
881
898
|
*
|
|
882
899
|
* @example
|
|
883
900
|
* await client.knowledge.finalizeKnowledgeBaseVersion("help-center", {
|
|
@@ -907,9 +924,9 @@ class KnowledgeClient {
|
|
|
907
924
|
contentType: "application/json",
|
|
908
925
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
909
926
|
requestType: "json",
|
|
910
|
-
body: serializers.FinalizeKnowledgeBaseVersionRequest.jsonOrThrow(request, {
|
|
927
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.FinalizeKnowledgeBaseVersionRequest.jsonOrThrow(request, {
|
|
911
928
|
unrecognizedObjectKeys: "strip",
|
|
912
|
-
}),
|
|
929
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
913
930
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
914
931
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
915
932
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -991,6 +1008,8 @@ class KnowledgeClient {
|
|
|
991
1008
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
992
1009
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
993
1010
|
* @throws {@link MavenAGI.ServerError}
|
|
1011
|
+
* @throws {@link errors.MavenAGIError}
|
|
1012
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
994
1013
|
*
|
|
995
1014
|
* @example
|
|
996
1015
|
* await client.knowledge.updateKnowledgeBaseVersionProgress("help-center", {
|
|
@@ -1024,9 +1043,9 @@ class KnowledgeClient {
|
|
|
1024
1043
|
contentType: "application/json",
|
|
1025
1044
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1026
1045
|
requestType: "json",
|
|
1027
|
-
body: serializers.KnowledgeBaseVersionProgressRequest.jsonOrThrow(request, {
|
|
1046
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeBaseVersionProgressRequest.jsonOrThrow(request, {
|
|
1028
1047
|
unrecognizedObjectKeys: "strip",
|
|
1029
|
-
}),
|
|
1048
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1030
1049
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
1031
1050
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
1032
1051
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1104,6 +1123,8 @@ class KnowledgeClient {
|
|
|
1104
1123
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1105
1124
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1106
1125
|
* @throws {@link MavenAGI.ServerError}
|
|
1126
|
+
* @throws {@link errors.MavenAGIError}
|
|
1127
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1107
1128
|
*
|
|
1108
1129
|
* @example
|
|
1109
1130
|
* await client.knowledge.listKnowledgeBaseVersions("knowledgeBaseReferenceId")
|
|
@@ -1208,6 +1229,8 @@ class KnowledgeClient {
|
|
|
1208
1229
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1209
1230
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1210
1231
|
* @throws {@link MavenAGI.ServerError}
|
|
1232
|
+
* @throws {@link errors.MavenAGIError}
|
|
1233
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1211
1234
|
*
|
|
1212
1235
|
* @example
|
|
1213
1236
|
* await client.knowledge.searchKnowledgeDocuments({})
|
|
@@ -1230,7 +1253,7 @@ class KnowledgeClient {
|
|
|
1230
1253
|
contentType: "application/json",
|
|
1231
1254
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1232
1255
|
requestType: "json",
|
|
1233
|
-
body: serializers.KnowledgeDocumentSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1256
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeDocumentSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1234
1257
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
1235
1258
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
1236
1259
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1314,6 +1337,8 @@ class KnowledgeClient {
|
|
|
1314
1337
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1315
1338
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1316
1339
|
* @throws {@link MavenAGI.ServerError}
|
|
1340
|
+
* @throws {@link errors.MavenAGIError}
|
|
1341
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1317
1342
|
*
|
|
1318
1343
|
* @example
|
|
1319
1344
|
* await client.knowledge.createKnowledgeDocument("help-center", {
|
|
@@ -1351,7 +1376,7 @@ class KnowledgeClient {
|
|
|
1351
1376
|
contentType: "application/json",
|
|
1352
1377
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1353
1378
|
requestType: "json",
|
|
1354
|
-
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1379
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1355
1380
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
1356
1381
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
1357
1382
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1433,6 +1458,8 @@ class KnowledgeClient {
|
|
|
1433
1458
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1434
1459
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1435
1460
|
* @throws {@link MavenAGI.ServerError}
|
|
1461
|
+
* @throws {@link errors.MavenAGIError}
|
|
1462
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1436
1463
|
*
|
|
1437
1464
|
* @example
|
|
1438
1465
|
* await client.knowledge.deleteKnowledgeDocument("help-center", "getting-started", {
|
|
@@ -1461,7 +1488,7 @@ class KnowledgeClient {
|
|
|
1461
1488
|
contentType: "application/json",
|
|
1462
1489
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1463
1490
|
requestType: "json",
|
|
1464
|
-
body: serializers.KnowledgeDeleteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1491
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeDeleteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1465
1492
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
1466
1493
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
1467
1494
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1532,6 +1559,8 @@ class KnowledgeClient {
|
|
|
1532
1559
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1533
1560
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1534
1561
|
* @throws {@link MavenAGI.ServerError}
|
|
1562
|
+
* @throws {@link errors.MavenAGIError}
|
|
1563
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1535
1564
|
*
|
|
1536
1565
|
* @example
|
|
1537
1566
|
* await client.knowledge.getKnowledgeDocument("knowledgeBaseVersionReferenceId", "knowledgeDocumentReferenceId", {
|
|
@@ -1645,6 +1674,8 @@ class KnowledgeClient {
|
|
|
1645
1674
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1646
1675
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1647
1676
|
* @throws {@link MavenAGI.ServerError}
|
|
1677
|
+
* @throws {@link errors.MavenAGIError}
|
|
1678
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1648
1679
|
*
|
|
1649
1680
|
* @example
|
|
1650
1681
|
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
@@ -1669,7 +1700,7 @@ class KnowledgeClient {
|
|
|
1669
1700
|
contentType: "application/merge-patch+json",
|
|
1670
1701
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1671
1702
|
requestType: "json",
|
|
1672
|
-
body: serializers.KnowledgeDocumentPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1703
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.KnowledgeDocumentPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1673
1704
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
1674
1705
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
1675
1706
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -18,26 +18,34 @@ export interface KnowledgeBasePatchRequest {
|
|
|
18
18
|
appId?: string;
|
|
19
19
|
/** The name of the knowledge base. */
|
|
20
20
|
name?: string;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
23
|
+
*
|
|
24
|
+
* The tags of the knowledge base.
|
|
25
|
+
*/
|
|
22
26
|
tags?: Set<string>;
|
|
23
27
|
/** Determines whether documents in the knowledge base are sent to the LLM as part of a conversation. Note that at this time knowledge bases can not be set to `ALWAYS`. */
|
|
24
28
|
llmInclusionStatus?: MavenAGI.LlmInclusionStatus;
|
|
25
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
31
|
+
*
|
|
32
|
+
* The preconditions that must be met for a knowledge base to be relevant to a conversation.
|
|
33
|
+
* A null value will remove the precondition from the knowledge base, it will be available on all conversations.
|
|
34
|
+
*/
|
|
26
35
|
precondition?: MavenAGI.Precondition | null;
|
|
27
36
|
/**
|
|
37
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
38
|
+
*
|
|
28
39
|
* The ID of a segment that must be matched for the knowledge base to be relevant to a conversation.
|
|
29
40
|
* A null value will remove the segment from the knowledge base, it will be available on all conversations.
|
|
30
|
-
*
|
|
31
|
-
* Segments are replacing inline preconditions - a knowledge base may not have both an inline precondition and a segment.
|
|
32
|
-
* Inline precondition support will be removed in a future release.
|
|
33
41
|
*/
|
|
34
42
|
segmentId?: MavenAGI.EntityId | null;
|
|
35
43
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
44
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
45
|
+
*
|
|
46
|
+
* The IDs of segments that should be matched (under an OR clause) for the knowledge base to be relevant
|
|
47
|
+
* to a conversation. An empty list will remove segments from the knowledge base, it will be available on
|
|
48
|
+
* all conversations.
|
|
41
49
|
*/
|
|
42
50
|
segmentIds?: MavenAGI.EntityId[];
|
|
43
51
|
/** How often the knowledge base should be refreshed. */
|
|
@@ -31,6 +31,11 @@ export interface KnowledgeBaseFilter {
|
|
|
31
31
|
llmInclusionStatus?: MavenAGI.LlmInclusionStatus;
|
|
32
32
|
/** Filter knowledge bases by the segment they are assigned to. */
|
|
33
33
|
segmentId?: string;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Deprecated. Segment assignment on knowledge bases is superseded by charters.
|
|
36
|
+
*
|
|
37
|
+
* Filter knowledge bases by the segments they are assigned to. Uses OR semantics — returns knowledge bases
|
|
38
|
+
* assigned to any of the provided segments.
|
|
39
|
+
*/
|
|
35
40
|
segmentIds?: MavenAGI.EntityId[];
|
|
36
41
|
}
|
|
@@ -2,6 +2,10 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface KnowledgeBaseProperties {
|
|
3
3
|
/** The name of the knowledge base */
|
|
4
4
|
name: string;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
7
|
+
*
|
|
8
|
+
* The preconditions that must be met for a knowledge base to be relevant to a conversation.
|
|
9
|
+
*/
|
|
6
10
|
precondition?: MavenAGI.Precondition;
|
|
7
11
|
}
|
|
@@ -61,22 +61,26 @@ export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties
|
|
|
61
61
|
type: MavenAGI.KnowledgeBaseType;
|
|
62
62
|
/** Metadata for the knowledge base. */
|
|
63
63
|
metadata: Record<string, string>;
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
66
|
+
*
|
|
67
|
+
* The tags of the knowledge base.
|
|
68
|
+
*/
|
|
65
69
|
tags: Set<string>;
|
|
66
70
|
/** Determines whether documents in the knowledge base are sent to the LLM as part of a conversation. */
|
|
67
71
|
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
68
72
|
/** How often the knowledge base should be refreshed. */
|
|
69
73
|
refreshFrequency: MavenAGI.KnowledgeBaseRefreshFrequency;
|
|
70
74
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
75
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
76
|
+
*
|
|
77
|
+
* The ID of the segment that must be matched for the knowledge base to be relevant to a conversation.
|
|
74
78
|
*/
|
|
75
79
|
segmentId?: MavenAGI.EntityId;
|
|
76
80
|
/**
|
|
81
|
+
* Deprecated. Superseded by charters, which determine when knowledge bases and actions apply. Has no effect for agents using charters.
|
|
82
|
+
*
|
|
77
83
|
* The IDs of the segments that should be matched for the knowledge base to be relevant to a conversation.
|
|
78
|
-
* Segments are replacing inline preconditions - a Knowledge Base may not have both an inline precondition and a segment.
|
|
79
|
-
* Inline precondition support will be removed in a future release.
|
|
80
84
|
*/
|
|
81
85
|
segmentIds: MavenAGI.EntityId[];
|
|
82
86
|
/** The source URL of URL and RSS knowledge bases that was used for crawl. */
|
|
@@ -32,4 +32,17 @@ export interface KnowledgeDocumentFilter {
|
|
|
32
32
|
knowledgeBaseVersionId?: MavenAGI.EntityIdWithoutAgent;
|
|
33
33
|
/** Filter by the LLM inclusion status */
|
|
34
34
|
llmInclusionStatus?: MavenAGI.LlmInclusionStatus[];
|
|
35
|
+
/**
|
|
36
|
+
* Return only documents narrowed to one of these entities. Uses OR semantics - a document
|
|
37
|
+
* matching any of them is returned.
|
|
38
|
+
*
|
|
39
|
+
* This is an exact match on the document's `relevantEntities`, not the widening a
|
|
40
|
+
* conversation's `contextFilter` performs: filtering by a customer returns that customer's
|
|
41
|
+
* documents and not the agent's general knowledge. Omit the field to search every
|
|
42
|
+
* document regardless of what it is narrowed to; an empty list does the same.
|
|
43
|
+
*
|
|
44
|
+
* Each `entityId` must be fully specified and belong to the organization and agent the
|
|
45
|
+
* request is made against.
|
|
46
|
+
*/
|
|
47
|
+
relevantEntities?: MavenAGI.ScopedEntity[];
|
|
35
48
|
}
|
|
@@ -58,6 +58,21 @@ export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument
|
|
|
58
58
|
createdAt?: Date;
|
|
59
59
|
/** The time at which this document was last modified. */
|
|
60
60
|
updatedAt?: Date;
|
|
61
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Narrows this document to the given entities. Omit it - the default - to make the document
|
|
63
|
+
* part of the agent's general knowledge, retrievable on every conversation.
|
|
64
|
+
*
|
|
65
|
+
* A document narrowed to entities is only retrieved on conversations whose
|
|
66
|
+
* `responseConfig.contextFilter` names one of them, so it never surfaces on unrelated
|
|
67
|
+
* conversations. Each `entityId` must be fully specified and must belong to the
|
|
68
|
+
* organization and agent the request is made against; one that does not, or that names an
|
|
69
|
+
* entity type with no internal form, is rejected rather than dropped - dropping the last
|
|
70
|
+
* entity would widen the document back to the whole agent.
|
|
71
|
+
*
|
|
72
|
+
* Changing the entities on an existing document is not supported yet: document reuse is
|
|
73
|
+
* decided by a checksum over `title`, `text`, `metadata`, `sourceUrl` and the attached
|
|
74
|
+
* asset, so re-sending a document with different `relevantEntities` but none of those
|
|
75
|
+
* changed returns the stored document and discards the new entities.
|
|
76
|
+
*/
|
|
62
77
|
relevantEntities?: MavenAGI.ScopedEntity[];
|
|
63
78
|
}
|