mavenagi 1.2.55 → 1.2.57
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.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +21 -16
- package/api/resources/analytics/types/ConversationBasicMetric.d.ts +5 -0
- package/api/resources/analytics/types/ConversationGroupBy.d.ts +9 -1
- package/api/resources/analytics/types/ConversationNumericMetric.d.ts +5 -0
- package/api/resources/analytics/types/ConversationTableRequest.d.ts +6 -0
- package/api/resources/charters/index.d.ts +1 -0
- package/api/resources/charters/index.js +17 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +17 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +20 -0
- package/api/resources/charters/types/CharterStatus.d.ts +16 -0
- package/api/resources/charters/types/CharterStatus.js +19 -0
- package/api/resources/charters/types/CharterSummary.d.ts +28 -0
- package/api/resources/charters/types/CharterType.d.ts +25 -0
- package/api/resources/charters/types/CharterType.js +28 -0
- package/api/resources/charters/types/index.d.ts +4 -0
- package/api/resources/charters/types/index.js +20 -0
- package/api/resources/commons/types/ActionParameter.d.ts +2 -2
- package/api/resources/commons/types/BaseConversationResponse.d.ts +5 -0
- package/api/resources/commons/types/BotObjectResponse.d.ts +2 -4
- package/api/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +13 -0
- package/api/resources/commons/types/ConversationMode.d.ts +10 -0
- package/api/resources/commons/types/ConversationMode.js +13 -0
- package/api/resources/commons/types/ConversationModePrecondition.d.ts +10 -0
- package/api/resources/commons/types/ConversationModePrecondition.js +3 -0
- package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
- package/api/resources/commons/types/ConversationPreconditionResponse.d.ts +4 -1
- package/api/resources/commons/types/ConversationResponse.d.ts +1 -0
- package/api/resources/commons/types/FieldCondition.d.ts +45 -0
- package/api/resources/commons/types/FieldCondition.js +3 -0
- package/api/resources/commons/types/IntelligentFieldPrecondition.d.ts +1 -1
- package/api/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +1 -1
- package/api/resources/commons/types/KeyValueEntryCondition.d.ts +13 -0
- package/api/resources/commons/types/KeyValueEntryCondition.js +3 -0
- package/api/resources/commons/types/ObjectCondition.d.ts +10 -0
- package/api/resources/commons/types/ObjectCondition.js +3 -0
- package/api/resources/commons/types/TextFormat.d.ts +13 -0
- package/api/resources/commons/types/TextFormat.js +3 -0
- package/api/resources/commons/types/TextFormatJsonSchema.d.ts +35 -0
- package/api/resources/commons/types/TextFormatJsonSchema.js +3 -0
- package/api/resources/commons/types/TextFormatText.d.ts +4 -0
- package/api/resources/commons/types/TextFormatText.js +3 -0
- package/api/resources/commons/types/UniversalCondition.d.ts +3 -3
- package/api/resources/commons/types/index.d.ts +8 -1
- package/api/resources/commons/types/index.js +8 -1
- package/api/resources/conversation/types/AskRequest.d.ts +59 -0
- package/api/resources/conversation/types/AskStreamObjectEvent.d.ts +7 -0
- package/api/resources/conversation/types/AskStreamObjectEvent.js +3 -0
- package/api/resources/conversation/types/ConversationField.d.ts +8 -0
- package/api/resources/conversation/types/ConversationField.js +8 -0
- package/api/resources/conversation/types/ConversationsSearchRequest.d.ts +5 -0
- package/api/resources/conversation/types/NumericConversationField.d.ts +4 -0
- package/api/resources/conversation/types/NumericConversationField.js +4 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/api/resources/conversation/types/index.d.ts +1 -0
- package/api/resources/conversation/types/index.js +1 -0
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +6 -1
- package/api/resources/intelligentFields/client/Client.d.ts +156 -0
- package/api/resources/intelligentFields/client/Client.js +627 -0
- package/api/resources/intelligentFields/client/index.d.ts +1 -0
- package/api/resources/intelligentFields/client/index.js +17 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.d.ts +12 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +8 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +26 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +3 -0
- package/api/resources/intelligentFields/client/requests/index.d.ts +3 -0
- package/api/resources/intelligentFields/client/requests/index.js +2 -0
- package/api/resources/intelligentFields/exports.d.ts +2 -0
- package/api/resources/intelligentFields/exports.js +21 -0
- package/api/resources/intelligentFields/index.d.ts +2 -0
- package/api/resources/intelligentFields/index.js +18 -0
- package/api/resources/intelligentFields/types/EnumOption.d.ts +9 -0
- package/api/resources/intelligentFields/types/EnumOption.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +7 -0
- package/api/resources/intelligentFields/types/IntelligentFieldBase.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +28 -0
- package/api/resources/intelligentFields/types/IntelligentFieldCore.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +36 -0
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +28 -0
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +41 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +7 -0
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.js +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +9 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +12 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.d.ts +8 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.d.ts +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +17 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.d.ts +35 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.js +3 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSortField.d.ts +5 -0
- package/api/resources/intelligentFields/types/IntelligentFieldValueSortField.js +8 -0
- package/api/resources/intelligentFields/types/index.d.ts +13 -0
- package/api/resources/intelligentFields/types/index.js +29 -0
- package/api/resources/knowledge/client/Client.d.ts +39 -3
- package/api/resources/knowledge/client/Client.js +123 -3
- package/api/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +5 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +25 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.d.ts +5 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.js +5 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgress.d.ts +29 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgress.js +3 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.d.ts +24 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.js +3 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +3 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.js +3 -0
- package/api/resources/knowledge/types/index.d.ts +2 -0
- package/api/resources/knowledge/types/index.js +2 -0
- package/api/resources/segments/client/Client.js +3 -1
- package/api/resources/segments/client/requests/SegmentDeleteRequest.d.ts +12 -0
- package/api/resources/segments/types/SegmentPatchRequest.d.ts +8 -0
- package/api/resources/segments/types/SegmentRequest.d.ts +8 -0
- package/api/resources/segments/types/SegmentSummary.d.ts +14 -0
- package/api/resources/segments/types/SegmentSummary.js +3 -0
- package/api/resources/segments/types/index.d.ts +1 -0
- package/api/resources/segments/types/index.js +1 -0
- package/package.json +1 -1
- package/reference.md +482 -3
- package/serialization/resources/analytics/types/ConversationBasicMetric.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationBasicMetric.js +2 -0
- package/serialization/resources/analytics/types/ConversationGroupBy.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationGroupBy.js +2 -0
- package/serialization/resources/analytics/types/ConversationNumericMetric.d.ts +2 -0
- package/serialization/resources/analytics/types/ConversationNumericMetric.js +2 -0
- package/serialization/resources/charters/index.d.ts +1 -0
- package/serialization/resources/charters/index.js +17 -0
- package/serialization/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +7 -0
- package/serialization/resources/charters/types/CharterChildrenExclusionPolicy.js +39 -0
- package/serialization/resources/charters/types/CharterStatus.d.ts +7 -0
- package/serialization/resources/charters/types/CharterStatus.js +39 -0
- package/serialization/resources/charters/types/CharterSummary.d.ts +22 -0
- package/serialization/resources/charters/types/CharterSummary.js +54 -0
- package/serialization/resources/charters/types/CharterType.d.ts +7 -0
- package/serialization/resources/charters/types/CharterType.js +39 -0
- package/serialization/resources/charters/types/index.d.ts +4 -0
- package/serialization/resources/charters/types/index.js +20 -0
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
- package/serialization/resources/commons/types/BotObjectResponse.d.ts +0 -1
- package/serialization/resources/commons/types/BotObjectResponse.js +0 -1
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationMode.d.ts +7 -0
- package/serialization/resources/commons/types/ConversationMode.js +39 -0
- package/serialization/resources/commons/types/ConversationModePrecondition.d.ts +11 -0
- package/serialization/resources/commons/types/ConversationModePrecondition.js +45 -0
- package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationPreconditionResponse.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPreconditionResponse.js +2 -0
- package/serialization/resources/commons/types/{IntelligentFieldCondition.d.ts → FieldCondition.d.ts} +3 -3
- package/serialization/resources/commons/types/{IntelligentFieldCondition.js → FieldCondition.js} +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPrecondition.d.ts +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPrecondition.js +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.d.ts +2 -2
- package/serialization/resources/commons/types/IntelligentFieldPreconditionResponse.js +2 -2
- package/serialization/resources/commons/types/KeyValueEntryCondition.d.ts +11 -0
- package/serialization/resources/commons/types/KeyValueEntryCondition.js +43 -0
- package/serialization/resources/commons/types/ObjectCondition.d.ts +11 -0
- package/serialization/resources/commons/types/ObjectCondition.js +47 -0
- package/serialization/resources/commons/types/TextFormat.d.ts +15 -0
- package/serialization/resources/commons/types/TextFormat.js +49 -0
- package/serialization/resources/commons/types/TextFormatJsonSchema.d.ts +10 -0
- package/serialization/resources/commons/types/TextFormatJsonSchema.js +42 -0
- package/serialization/resources/commons/types/TextFormatText.d.ts +7 -0
- package/serialization/resources/commons/types/TextFormatText.js +39 -0
- package/serialization/resources/commons/types/index.d.ts +8 -1
- package/serialization/resources/commons/types/index.js +8 -1
- package/serialization/resources/conversation/types/AskRequest.d.ts +2 -0
- package/serialization/resources/conversation/types/AskRequest.js +2 -0
- package/serialization/resources/conversation/types/AskStreamObjectEvent.d.ts +9 -0
- package/serialization/resources/conversation/types/AskStreamObjectEvent.js +40 -0
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +2 -0
- package/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/NumericConversationField.js +1 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/serialization/resources/conversation/types/index.d.ts +1 -0
- package/serialization/resources/conversation/types/index.js +1 -0
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +6 -1
- package/serialization/resources/intelligentFields/client/index.d.ts +1 -0
- package/serialization/resources/intelligentFields/client/index.js +17 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +17 -0
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +49 -0
- package/serialization/resources/intelligentFields/client/requests/index.d.ts +1 -0
- package/serialization/resources/intelligentFields/client/requests/index.js +5 -0
- package/serialization/resources/intelligentFields/index.d.ts +2 -0
- package/serialization/resources/intelligentFields/index.js +18 -0
- package/serialization/resources/intelligentFields/types/EnumOption.d.ts +10 -0
- package/serialization/resources/intelligentFields/types/EnumOption.js +42 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldBase.d.ts +13 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldBase.js +47 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.d.ts +15 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.js +47 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldDetailResponse.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +15 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +49 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldStatus.js +39 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldType.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldType.js +39 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.d.ts +10 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueEntityFilter.js +42 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.d.ts +12 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueFieldFilter.js +44 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +20 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.js +54 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.d.ts +11 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSearchResponse.js +45 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSortField.d.ts +7 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldValueSortField.js +39 -0
- package/serialization/resources/intelligentFields/types/index.d.ts +13 -0
- package/serialization/resources/intelligentFields/types/index.js +29 -0
- package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.d.ts +1 -0
- package/serialization/resources/knowledge/types/CancelKnowledgeBaseVersionRequest.js +1 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionFinalizeStatus.js +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgress.d.ts +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgress.js +43 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.d.ts +13 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionProgressRequest.js +45 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionStatus.js +1 -1
- package/serialization/resources/knowledge/types/index.d.ts +2 -0
- package/serialization/resources/knowledge/types/index.js +2 -0
- package/serialization/resources/segments/types/SegmentPatchRequest.d.ts +2 -0
- package/serialization/resources/segments/types/SegmentPatchRequest.js +2 -0
- package/serialization/resources/segments/types/SegmentRequest.d.ts +2 -0
- package/serialization/resources/segments/types/SegmentRequest.js +2 -0
- package/serialization/resources/segments/types/SegmentSummary.d.ts +14 -0
- package/serialization/resources/segments/types/SegmentSummary.js +47 -0
- package/serialization/resources/segments/types/index.d.ts +1 -0
- package/serialization/resources/segments/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/commons/types/IntelligentFieldCondition.d.ts +0 -37
- /package/api/resources/{commons/types/IntelligentFieldCondition.js → charters/types/CharterSummary.js} +0 -0
|
@@ -462,10 +462,13 @@ class KnowledgeClient {
|
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
/**
|
|
465
|
-
* in-progress knowledge base version.
|
|
465
|
+
* Cancel an in-progress knowledge base version.
|
|
466
466
|
*
|
|
467
|
-
* If the knowledge base has a version that is currently being ingested,
|
|
468
|
-
*
|
|
467
|
+
* If the knowledge base has a version that is currently being ingested, this cancels the
|
|
468
|
+
* ingestion workflow and sets the version status to CANCELED.
|
|
469
|
+
*
|
|
470
|
+
* An app still refreshing that version finds out on its next write to it: adding or
|
|
471
|
+
* removing a document on a canceled version is rejected rather than succeeding.
|
|
469
472
|
*
|
|
470
473
|
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to cancel ingestion for. All other entity ID fields are inferred from the request.
|
|
471
474
|
* @param {MavenAGI.CancelKnowledgeBaseVersionRequest} request
|
|
@@ -972,6 +975,123 @@ class KnowledgeClient {
|
|
|
972
975
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/version/finalize");
|
|
973
976
|
});
|
|
974
977
|
}
|
|
978
|
+
/**
|
|
979
|
+
* Report refresh progress for an in-progress knowledge base version.
|
|
980
|
+
*
|
|
981
|
+
* Progress is advisory and shown to users while a refresh runs. Each call replaces the
|
|
982
|
+
* version's entire progress state - no history is kept, only the most recent value is
|
|
983
|
+
* retained. Will throw an exception if the target version is not in progress.
|
|
984
|
+
*
|
|
985
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to report progress for. All other entity ID fields are inferred from the request.
|
|
986
|
+
* @param {MavenAGI.KnowledgeBaseVersionProgressRequest} request
|
|
987
|
+
* @param {KnowledgeClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
988
|
+
*
|
|
989
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
990
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
991
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
992
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
993
|
+
* @throws {@link MavenAGI.ServerError}
|
|
994
|
+
*
|
|
995
|
+
* @example
|
|
996
|
+
* await client.knowledge.updateKnowledgeBaseVersionProgress("help-center", {
|
|
997
|
+
* versionId: {
|
|
998
|
+
* type: "KNOWLEDGE_BASE_VERSION",
|
|
999
|
+
* referenceId: "versionId",
|
|
1000
|
+
* appId: "maven"
|
|
1001
|
+
* },
|
|
1002
|
+
* progress: {
|
|
1003
|
+
* message: "Fetching articles from the help center",
|
|
1004
|
+
* completedCount: 120,
|
|
1005
|
+
* totalCount: 500
|
|
1006
|
+
* }
|
|
1007
|
+
* })
|
|
1008
|
+
*/
|
|
1009
|
+
updateKnowledgeBaseVersionProgress(knowledgeBaseReferenceId, request, requestOptions) {
|
|
1010
|
+
return core.HttpResponsePromise.fromPromise(this.__updateKnowledgeBaseVersionProgress(knowledgeBaseReferenceId, request, requestOptions));
|
|
1011
|
+
}
|
|
1012
|
+
__updateKnowledgeBaseVersionProgress(knowledgeBaseReferenceId, request, requestOptions) {
|
|
1013
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1014
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1015
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1016
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1017
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
1018
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
1019
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1020
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
1021
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/knowledge/${core.url.encodePathParam(knowledgeBaseReferenceId)}/version/progress`),
|
|
1022
|
+
method: "POST",
|
|
1023
|
+
headers: _headers,
|
|
1024
|
+
contentType: "application/json",
|
|
1025
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1026
|
+
requestType: "json",
|
|
1027
|
+
body: serializers.KnowledgeBaseVersionProgressRequest.jsonOrThrow(request, {
|
|
1028
|
+
unrecognizedObjectKeys: "strip",
|
|
1029
|
+
}),
|
|
1030
|
+
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
|
+
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
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1033
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
1034
|
+
logging: this._options.logging,
|
|
1035
|
+
});
|
|
1036
|
+
if (_response.ok) {
|
|
1037
|
+
return {
|
|
1038
|
+
data: serializers.KnowledgeBaseVersion.parseOrThrow(_response.body, {
|
|
1039
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1040
|
+
allowUnrecognizedUnionMembers: true,
|
|
1041
|
+
allowUnrecognizedEnumValues: true,
|
|
1042
|
+
breadcrumbsPrefix: ["response"],
|
|
1043
|
+
}),
|
|
1044
|
+
rawResponse: _response.rawResponse,
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
if (_response.error.reason === "status-code") {
|
|
1048
|
+
switch (_response.error.statusCode) {
|
|
1049
|
+
case 404:
|
|
1050
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1051
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1052
|
+
allowUnrecognizedUnionMembers: true,
|
|
1053
|
+
allowUnrecognizedEnumValues: true,
|
|
1054
|
+
breadcrumbsPrefix: ["response"],
|
|
1055
|
+
}), _response.rawResponse);
|
|
1056
|
+
case 400:
|
|
1057
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1058
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1059
|
+
allowUnrecognizedUnionMembers: true,
|
|
1060
|
+
allowUnrecognizedEnumValues: true,
|
|
1061
|
+
breadcrumbsPrefix: ["response"],
|
|
1062
|
+
}), _response.rawResponse);
|
|
1063
|
+
case 413:
|
|
1064
|
+
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1065
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1066
|
+
allowUnrecognizedUnionMembers: true,
|
|
1067
|
+
allowUnrecognizedEnumValues: true,
|
|
1068
|
+
breadcrumbsPrefix: ["response"],
|
|
1069
|
+
}), _response.rawResponse);
|
|
1070
|
+
case 429:
|
|
1071
|
+
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1072
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1073
|
+
allowUnrecognizedUnionMembers: true,
|
|
1074
|
+
allowUnrecognizedEnumValues: true,
|
|
1075
|
+
breadcrumbsPrefix: ["response"],
|
|
1076
|
+
}), _response.rawResponse);
|
|
1077
|
+
case 500:
|
|
1078
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1079
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1080
|
+
allowUnrecognizedUnionMembers: true,
|
|
1081
|
+
allowUnrecognizedEnumValues: true,
|
|
1082
|
+
breadcrumbsPrefix: ["response"],
|
|
1083
|
+
}), _response.rawResponse);
|
|
1084
|
+
default:
|
|
1085
|
+
throw new errors.MavenAGIError({
|
|
1086
|
+
statusCode: _response.error.statusCode,
|
|
1087
|
+
body: _response.error.body,
|
|
1088
|
+
rawResponse: _response.rawResponse,
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/knowledge/{knowledgeBaseReferenceId}/version/progress");
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
975
1095
|
/**
|
|
976
1096
|
* List all active versions for a knowledge base. Returns the most recent versions first.
|
|
977
1097
|
*
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
export interface CancelKnowledgeBaseVersionRequest {
|
|
3
|
+
/** The App ID of the knowledge base to cancel. If not provided the ID of the calling app will be used. */
|
|
4
|
+
appId?: string;
|
|
3
5
|
/** ID that uniquely identifies which knowledge base version to cancel. If not provided will use the most recent version of the knowledge base. */
|
|
4
6
|
versionId?: MavenAGI.EntityIdWithoutAgent;
|
|
5
7
|
}
|
|
@@ -83,4 +83,9 @@ export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties
|
|
|
83
83
|
url?: string;
|
|
84
84
|
/** The indexing status of the latest version of the knowledge base. */
|
|
85
85
|
indexingState?: MavenAGI.KnowledgeBaseIndexingProgressState;
|
|
86
|
+
/**
|
|
87
|
+
* Refresh progress most recently reported by the app that owns this knowledge base.
|
|
88
|
+
* Only populated while the latest version is in progress - absent once it has completed.
|
|
89
|
+
*/
|
|
90
|
+
progress?: MavenAGI.KnowledgeBaseVersionProgress;
|
|
86
91
|
}
|
|
@@ -14,6 +14,26 @@ import type * as MavenAGI from "../../../index";
|
|
|
14
14
|
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
15
15
|
* updatedAt: new Date("2024-02-02T00:00:00.000Z")
|
|
16
16
|
* }
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* {
|
|
20
|
+
* versionId: {
|
|
21
|
+
* type: MavenAGI.EntityType.KnowledgeBaseVersion,
|
|
22
|
+
* referenceId: "versionId",
|
|
23
|
+
* appId: "maven",
|
|
24
|
+
* organizationId: "acme",
|
|
25
|
+
* agentId: "support"
|
|
26
|
+
* },
|
|
27
|
+
* type: MavenAGI.KnowledgeBaseVersionType.Full,
|
|
28
|
+
* status: MavenAGI.KnowledgeBaseVersionStatus.InProgress,
|
|
29
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
30
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z"),
|
|
31
|
+
* progress: {
|
|
32
|
+
* message: "Fetching articles from the help center",
|
|
33
|
+
* completedCount: 120,
|
|
34
|
+
* totalCount: 500
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
17
37
|
*/
|
|
18
38
|
export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionRequest {
|
|
19
39
|
/** The unique ID of the knowledge base version. */
|
|
@@ -28,4 +48,9 @@ export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionReque
|
|
|
28
48
|
updatedAt: Date;
|
|
29
49
|
/** The indexing status of the knowledge base version. */
|
|
30
50
|
indexingState?: MavenAGI.KnowledgeBaseIndexingProgressState;
|
|
51
|
+
/**
|
|
52
|
+
* Refresh progress most recently reported by the app that owns this knowledge base.
|
|
53
|
+
* Only populated while the version is in progress - absent once the version has completed.
|
|
54
|
+
*/
|
|
55
|
+
progress?: MavenAGI.KnowledgeBaseVersionProgress;
|
|
31
56
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** How the knowledge base version processing ended. */
|
|
2
2
|
export declare const KnowledgeBaseVersionFinalizeStatus: {
|
|
3
3
|
readonly Succeeded: "SUCCEEDED";
|
|
4
4
|
readonly Failed: "FAILED";
|
|
5
|
+
/**
|
|
6
|
+
* Processing stopped before completing because it was cancelled, rather than because it
|
|
7
|
+
* failed. */
|
|
8
|
+
readonly Canceled: "CANCELED";
|
|
5
9
|
};
|
|
6
10
|
export type KnowledgeBaseVersionFinalizeStatus = (typeof KnowledgeBaseVersionFinalizeStatus)[keyof typeof KnowledgeBaseVersionFinalizeStatus] | string;
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.KnowledgeBaseVersionFinalizeStatus = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/** How the knowledge base version processing ended. */
|
|
6
6
|
exports.KnowledgeBaseVersionFinalizeStatus = {
|
|
7
7
|
Succeeded: "SUCCEEDED",
|
|
8
8
|
Failed: "FAILED",
|
|
9
|
+
/**
|
|
10
|
+
* Processing stopped before completing because it was cancelled, rather than because it
|
|
11
|
+
* failed. */
|
|
12
|
+
Canceled: "CANCELED",
|
|
9
13
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refresh progress reported by the app that owns a knowledge base, surfaced to users while
|
|
3
|
+
* a version is being built. Shared by the progress update request and the version response.
|
|
4
|
+
*
|
|
5
|
+
* The `message` is always present. The two counts are optional but must be supplied
|
|
6
|
+
* together - providing one without the other is rejected, since a progress bar needs both.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* {
|
|
10
|
+
* message: "Fetching articles from the help center",
|
|
11
|
+
* completedCount: 120,
|
|
12
|
+
* totalCount: 500
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface KnowledgeBaseVersionProgress {
|
|
16
|
+
/** A user-facing message describing what the refresh is currently doing. */
|
|
17
|
+
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* How many units of work the refresh has finished so far. The numerator of a progress bar.
|
|
20
|
+
* Must be supplied together with `totalCount`.
|
|
21
|
+
*/
|
|
22
|
+
completedCount?: number;
|
|
23
|
+
/**
|
|
24
|
+
* How many units of work the refresh expects in total. The denominator of a progress bar.
|
|
25
|
+
* Must be supplied together with `completedCount`. Apps may revise this as a refresh
|
|
26
|
+
* discovers more work.
|
|
27
|
+
*/
|
|
28
|
+
totalCount?: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* versionId: {
|
|
6
|
+
* type: MavenAGI.EntityType.KnowledgeBaseVersion,
|
|
7
|
+
* referenceId: "versionId",
|
|
8
|
+
* appId: "maven"
|
|
9
|
+
* },
|
|
10
|
+
* progress: {
|
|
11
|
+
* message: "Fetching articles from the help center",
|
|
12
|
+
* completedCount: 120,
|
|
13
|
+
* totalCount: 500
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export interface KnowledgeBaseVersionProgressRequest {
|
|
18
|
+
/** The App ID of the knowledge base to report progress for. If not provided the ID of the calling app will be used. */
|
|
19
|
+
appId?: string;
|
|
20
|
+
/** ID that uniquely identifies which knowledge base version to report progress for. */
|
|
21
|
+
versionId: MavenAGI.EntityIdWithoutAgent;
|
|
22
|
+
/** The progress state to store on the version, replacing any previously reported progress. */
|
|
23
|
+
progress: MavenAGI.KnowledgeBaseVersionProgress;
|
|
24
|
+
}
|
|
@@ -3,5 +3,8 @@ export declare const KnowledgeBaseVersionStatus: {
|
|
|
3
3
|
readonly Succeeded: "SUCCEEDED";
|
|
4
4
|
readonly Failed: "FAILED";
|
|
5
5
|
readonly InProgress: "IN_PROGRESS";
|
|
6
|
+
/**
|
|
7
|
+
* Stopped before completing, by a cancel request rather than a failure. */
|
|
8
|
+
readonly Canceled: "CANCELED";
|
|
6
9
|
};
|
|
7
10
|
export type KnowledgeBaseVersionStatus = (typeof KnowledgeBaseVersionStatus)[keyof typeof KnowledgeBaseVersionStatus] | string;
|
|
@@ -15,6 +15,8 @@ export * from "./KnowledgeBasesResponse";
|
|
|
15
15
|
export * from "./KnowledgeBaseType";
|
|
16
16
|
export * from "./KnowledgeBaseVersion";
|
|
17
17
|
export * from "./KnowledgeBaseVersionFinalizeStatus";
|
|
18
|
+
export * from "./KnowledgeBaseVersionProgress";
|
|
19
|
+
export * from "./KnowledgeBaseVersionProgressRequest";
|
|
18
20
|
export * from "./KnowledgeBaseVersionRequest";
|
|
19
21
|
export * from "./KnowledgeBaseVersionStatus";
|
|
20
22
|
export * from "./KnowledgeBaseVersionsListResponse";
|
|
@@ -31,6 +31,8 @@ __exportStar(require("./KnowledgeBasesResponse"), exports);
|
|
|
31
31
|
__exportStar(require("./KnowledgeBaseType"), exports);
|
|
32
32
|
__exportStar(require("./KnowledgeBaseVersion"), exports);
|
|
33
33
|
__exportStar(require("./KnowledgeBaseVersionFinalizeStatus"), exports);
|
|
34
|
+
__exportStar(require("./KnowledgeBaseVersionProgress"), exports);
|
|
35
|
+
__exportStar(require("./KnowledgeBaseVersionProgressRequest"), exports);
|
|
34
36
|
__exportStar(require("./KnowledgeBaseVersionRequest"), exports);
|
|
35
37
|
__exportStar(require("./KnowledgeBaseVersionStatus"), exports);
|
|
36
38
|
__exportStar(require("./KnowledgeBaseVersionsListResponse"), exports);
|
|
@@ -502,9 +502,11 @@ class SegmentsClient {
|
|
|
502
502
|
__delete(segmentReferenceId_1) {
|
|
503
503
|
return __awaiter(this, arguments, void 0, function* (segmentReferenceId, request = {}, requestOptions) {
|
|
504
504
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
505
|
-
const { appId } = request;
|
|
505
|
+
const { appId, variantReferenceId, variantAppId } = request;
|
|
506
506
|
const _queryParams = {
|
|
507
507
|
appId,
|
|
508
|
+
variantReferenceId,
|
|
509
|
+
variantAppId,
|
|
508
510
|
};
|
|
509
511
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
510
512
|
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
@@ -5,4 +5,16 @@
|
|
|
5
5
|
export interface SegmentDeleteRequest {
|
|
6
6
|
/** The App ID of the segment to delete. If not provided, the ID of the calling app will be used. */
|
|
7
7
|
appId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The reference ID of the agent variant this delete is scoped to. When set, the
|
|
10
|
+
* deletion is staged in that variant's working set instead of being applied to the
|
|
11
|
+
* agent's live configuration.
|
|
12
|
+
*
|
|
13
|
+
* Omit this parameter to delete directly from the agent. Variant scoping is not
|
|
14
|
+
* active yet: a variant supplied today is accepted and ignored, and the delete applies
|
|
15
|
+
* to the agent.
|
|
16
|
+
*/
|
|
17
|
+
variantReferenceId?: string;
|
|
18
|
+
/** The App ID of the agent variant named by `variantReferenceId`. If not provided, the ID of the calling app will be used. */
|
|
19
|
+
variantAppId?: string;
|
|
8
20
|
}
|
|
@@ -10,4 +10,12 @@ export interface SegmentPatchRequest {
|
|
|
10
10
|
precondition?: MavenAGI.Precondition;
|
|
11
11
|
/** The status of the segment. Segments can only be deactivated if they are not set on any actions or active knowledge bases. */
|
|
12
12
|
status?: MavenAGI.SegmentStatus;
|
|
13
|
+
/**
|
|
14
|
+
* The agent variant this patch is scoped to. When set, the patch is staged in that
|
|
15
|
+
* variant's working set instead of being applied to the agent's live configuration.
|
|
16
|
+
*
|
|
17
|
+
* Omit this field to patch the agent directly. Variant scoping is not active yet: a
|
|
18
|
+
* variant supplied today is accepted and ignored, and the patch applies to the agent.
|
|
19
|
+
*/
|
|
20
|
+
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
13
21
|
}
|
|
@@ -22,6 +22,14 @@ import type * as MavenAGI from "../../../index";
|
|
|
22
22
|
export interface SegmentRequest extends MavenAGI.SegmentBase {
|
|
23
23
|
/** ID that uniquely identifies this segment */
|
|
24
24
|
segmentId: MavenAGI.EntityIdBase;
|
|
25
|
+
/**
|
|
26
|
+
* The agent variant this write is scoped to. When set, the segment content is staged in
|
|
27
|
+
* that variant's working set instead of being applied to the agent's live configuration.
|
|
28
|
+
*
|
|
29
|
+
* Omit this field to write directly to the agent. Variant scoping is not active yet: a
|
|
30
|
+
* variant supplied today is accepted and ignored, and the write applies to the agent.
|
|
31
|
+
*/
|
|
32
|
+
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
25
33
|
/** The precondition that must be met for a conversation message to be included in the segment. */
|
|
26
34
|
precondition: MavenAGI.Precondition;
|
|
27
35
|
/** Desired status for the segment. If omitted, defaults to ACTIVE. In the future this will become required, so specify ACTIVE or INACTIVE if possible. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* A lightweight segment representation containing identity, name, status, and precondition.
|
|
4
|
+
*/
|
|
5
|
+
export interface SegmentSummary {
|
|
6
|
+
/** ID that uniquely identifies this segment. */
|
|
7
|
+
segmentId: MavenAGI.EntityId;
|
|
8
|
+
/** The display name of the segment. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** The lifecycle status of the segment. */
|
|
11
|
+
status: MavenAGI.SegmentStatus;
|
|
12
|
+
/** The precondition that must be met for a conversation message to match this segment. */
|
|
13
|
+
precondition: MavenAGI.PreconditionResponse;
|
|
14
|
+
}
|
|
@@ -21,5 +21,6 @@ __exportStar(require("./SegmentPatchRequest"), exports);
|
|
|
21
21
|
__exportStar(require("./SegmentRequest"), exports);
|
|
22
22
|
__exportStar(require("./SegmentResponse"), exports);
|
|
23
23
|
__exportStar(require("./SegmentStatus"), exports);
|
|
24
|
+
__exportStar(require("./SegmentSummary"), exports);
|
|
24
25
|
__exportStar(require("./SegmentsSearchRequest"), exports);
|
|
25
26
|
__exportStar(require("./SegmentsSearchResponse"), exports);
|