mavenagi 1.2.6 → 1.2.8
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/Client.d.ts +0 -3
- package/Client.js +28 -33
- package/README.md +21 -1
- package/api/resources/commons/types/ConversationResponse.d.ts +2 -1
- package/api/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/api/resources/commons/types/EntityIdBase.d.ts +12 -1
- package/api/resources/commons/types/InboxItem.d.ts +24 -1
- package/api/resources/commons/types/InboxItemCustom.d.ts +5 -0
- package/api/resources/commons/types/index.d.ts +1 -0
- package/api/resources/commons/types/index.js +1 -0
- package/api/resources/conversation/client/Client.d.ts +31 -12
- package/api/resources/conversation/client/Client.js +106 -12
- package/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
- package/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/api/resources/events/client/Client.d.ts +2 -2
- package/api/resources/events/client/Client.js +2 -2
- package/api/resources/index.d.ts +0 -2
- package/api/resources/index.js +1 -3
- package/api/resources/knowledge/client/Client.d.ts +24 -0
- package/api/resources/knowledge/client/Client.js +104 -0
- package/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
- package/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -2
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -1
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
- package/api/resources/knowledge/types/KnowledgeDocumentStatus.d.ts +6 -0
- package/api/resources/knowledge/types/KnowledgeDocumentStatus.js +9 -0
- package/api/resources/knowledge/types/index.d.ts +1 -0
- package/api/resources/knowledge/types/index.js +1 -0
- package/api/resources/users/types/AgentUserFilter.d.ts +5 -0
- package/core/exports.d.ts +1 -0
- package/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
- package/core/file/exports.d.ts +1 -0
- package/core/file/file.d.ts +5 -0
- package/core/file/file.js +203 -0
- package/{dist/serialization/resources/agentCapabilities → core/file}/index.d.ts +1 -0
- package/{dist/serialization/resources/agentCapabilities → core/file}/index.js +1 -0
- package/core/file/types.d.ts +66 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +16 -0
- package/core/form-data-utils/FormDataWrapper.js +208 -0
- package/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/core/form-data-utils/index.d.ts +2 -0
- package/core/form-data-utils/index.js +20 -0
- package/core/index.d.ts +2 -0
- package/core/index.js +3 -1
- package/dist/Client.d.ts +0 -3
- package/dist/Client.js +28 -33
- package/dist/api/resources/commons/types/ConversationResponse.d.ts +2 -1
- package/dist/api/resources/commons/types/ConversationSummary.d.ts +2 -0
- package/dist/api/resources/commons/types/EntityIdBase.d.ts +12 -1
- package/dist/api/resources/commons/types/InboxItem.d.ts +24 -1
- package/dist/api/resources/commons/types/InboxItemCustom.d.ts +5 -0
- package/dist/api/resources/commons/types/index.d.ts +1 -0
- package/dist/api/resources/commons/types/index.js +1 -0
- package/dist/api/resources/conversation/client/Client.d.ts +31 -12
- package/dist/api/resources/conversation/client/Client.js +106 -12
- package/dist/api/resources/conversation/client/requests/SimulationImportRequest.d.ts +5 -0
- package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/client/Client.d.ts +2 -2
- package/dist/api/resources/events/client/Client.js +2 -2
- package/dist/api/resources/index.d.ts +0 -2
- package/dist/api/resources/index.js +1 -3
- package/dist/api/resources/knowledge/client/Client.d.ts +24 -0
- package/dist/api/resources/knowledge/client/Client.js +104 -0
- package/dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +13 -0
- package/dist/api/resources/knowledge/client/requests/index.d.ts +1 -0
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -4
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +7 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +9 -2
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +8 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +30 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentStatus.d.ts +6 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentStatus.js +9 -0
- package/dist/api/resources/knowledge/types/index.d.ts +1 -0
- package/dist/api/resources/knowledge/types/index.js +1 -0
- package/dist/api/resources/users/types/AgentUserFilter.d.ts +5 -0
- package/dist/core/exports.d.ts +1 -0
- package/dist/{api/resources/agentCapabilities/index.js → core/exports.js} +1 -2
- package/dist/core/file/exports.d.ts +1 -0
- package/dist/core/file/exports.js +2 -0
- package/dist/core/file/file.d.ts +5 -0
- package/dist/core/file/file.js +203 -0
- package/{serialization/resources/agentCapabilities → dist/core/file}/index.d.ts +1 -0
- package/{serialization/resources/agentCapabilities → dist/core/file}/index.js +1 -0
- package/dist/core/file/types.d.ts +66 -0
- package/dist/core/file/types.js +2 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +208 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/dist/core/form-data-utils/index.d.ts +2 -0
- package/dist/core/form-data-utils/index.js +20 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -1
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.js +1 -0
- package/dist/serialization/resources/commons/types/InboxItem.d.ts +5 -1
- package/dist/serialization/resources/commons/types/InboxItem.js +2 -0
- package/dist/serialization/resources/commons/types/InboxItemCustom.d.ts +10 -0
- package/dist/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → commons/types/InboxItemCustom.js} +7 -4
- package/dist/serialization/resources/commons/types/index.d.ts +1 -0
- package/dist/serialization/resources/commons/types/index.js +1 -0
- package/dist/serialization/resources/index.d.ts +0 -2
- package/dist/serialization/resources/index.js +1 -3
- package/dist/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
- package/dist/serialization/resources/{agentCapabilities/types/PatchAgentCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -6
- package/dist/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/client/requests/index.js +3 -1
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -1
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentStatus.d.ts +7 -0
- package/{serialization/resources/agentCapabilities/types/AgentCapabilityType.js → dist/serialization/resources/knowledge/types/KnowledgeDocumentStatus.js} +2 -2
- package/dist/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/index.js +1 -0
- package/dist/serialization/resources/users/types/AgentUserFilter.d.ts +1 -0
- package/dist/serialization/resources/users/types/AgentUserFilter.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/exports.d.ts +1 -0
- package/exports.js +17 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/reference.md +102 -280
- package/serialization/resources/commons/types/ConversationSummary.d.ts +1 -0
- package/serialization/resources/commons/types/ConversationSummary.js +1 -0
- package/serialization/resources/commons/types/InboxItem.d.ts +5 -1
- package/serialization/resources/commons/types/InboxItem.js +2 -0
- package/serialization/resources/commons/types/InboxItemCustom.d.ts +10 -0
- package/{dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.js → serialization/resources/commons/types/InboxItemCustom.js} +7 -2
- package/serialization/resources/commons/types/index.d.ts +1 -0
- package/serialization/resources/commons/types/index.js +1 -0
- package/serialization/resources/index.d.ts +0 -2
- package/serialization/resources/index.js +1 -3
- package/serialization/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.d.ts +11 -0
- package/serialization/resources/{agentCapabilities/types/ExecuteCapabilityRequest.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +6 -4
- package/serialization/resources/knowledge/client/requests/index.d.ts +1 -0
- package/serialization/resources/knowledge/client/requests/index.js +3 -1
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +0 -2
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +0 -2
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +1 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +3 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +3 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +4 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +4 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +4 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentStatus.d.ts +7 -0
- package/{dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.js → serialization/resources/knowledge/types/KnowledgeDocumentStatus.js} +2 -2
- package/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/serialization/resources/knowledge/types/index.js +1 -0
- package/serialization/resources/users/types/AgentUserFilter.d.ts +1 -0
- package/serialization/resources/users/types/AgentUserFilter.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agentCapabilities/client/Client.d.ts +0 -101
- package/api/resources/agentCapabilities/client/Client.js +0 -450
- package/api/resources/agentCapabilities/client/index.d.ts +0 -1
- package/api/resources/agentCapabilities/index.d.ts +0 -2
- package/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
- package/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
- package/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
- package/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
- package/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
- package/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
- package/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
- package/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
- package/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
- package/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
- package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
- package/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
- package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
- package/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
- package/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
- package/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
- package/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/api/resources/agentCapabilities/types/TriggerType.js +0 -10
- package/api/resources/agentCapabilities/types/index.d.ts +0 -12
- package/api/resources/agentCapabilities/types/index.js +0 -28
- package/dist/api/resources/agentCapabilities/client/Client.d.ts +0 -101
- package/dist/api/resources/agentCapabilities/client/Client.js +0 -450
- package/dist/api/resources/agentCapabilities/client/index.d.ts +0 -1
- package/dist/api/resources/agentCapabilities/index.d.ts +0 -2
- package/dist/api/resources/agentCapabilities/types/ActionCapability.d.ts +0 -13
- package/dist/api/resources/agentCapabilities/types/ActionCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapability.d.ts +0 -10
- package/dist/api/resources/agentCapabilities/types/AgentCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -12
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -8
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityField.js +0 -11
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -11
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -5
- package/dist/api/resources/agentCapabilities/types/AgentCapabilityType.js +0 -8
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -3
- package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -5
- package/dist/api/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -3
- package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -8
- package/dist/api/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -3
- package/dist/api/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -4
- package/dist/api/resources/agentCapabilities/types/TriggerCapability.js +0 -3
- package/dist/api/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/dist/api/resources/agentCapabilities/types/TriggerType.js +0 -10
- package/dist/api/resources/agentCapabilities/types/index.d.ts +0 -12
- package/dist/api/resources/agentCapabilities/types/index.js +0 -28
- package/dist/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
- package/dist/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
- package/dist/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
- package/dist/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
- package/dist/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
- package/dist/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
- package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
- package/dist/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
- package/dist/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
- package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
- package/dist/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
- package/dist/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/dist/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
- package/dist/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
- package/dist/serialization/resources/agentCapabilities/types/index.js +0 -28
- package/serialization/resources/agentCapabilities/types/ActionCapability.d.ts +0 -17
- package/serialization/resources/agentCapabilities/types/ActionCapability.js +0 -52
- package/serialization/resources/agentCapabilities/types/AgentCapability.d.ts +0 -15
- package/serialization/resources/agentCapabilities/types/AgentCapability.js +0 -49
- package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.d.ts +0 -15
- package/serialization/resources/agentCapabilities/types/AgentCapabilityBase.js +0 -47
- package/serialization/resources/agentCapabilities/types/AgentCapabilityField.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/AgentCapabilityField.js +0 -39
- package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.d.ts +0 -18
- package/serialization/resources/agentCapabilities/types/AgentCapabilityListRequest.js +0 -52
- package/serialization/resources/agentCapabilities/types/AgentCapabilityType.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityRequest.d.ts +0 -9
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.d.ts +0 -10
- package/serialization/resources/agentCapabilities/types/ExecuteCapabilityResponse.js +0 -42
- package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.d.ts +0 -12
- package/serialization/resources/agentCapabilities/types/ListAgentCapabilitiesResponse.js +0 -46
- package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.d.ts +0 -11
- package/serialization/resources/agentCapabilities/types/PatchAgentCapabilityRequest.js +0 -43
- package/serialization/resources/agentCapabilities/types/TriggerCapability.d.ts +0 -11
- package/serialization/resources/agentCapabilities/types/TriggerCapability.js +0 -45
- package/serialization/resources/agentCapabilities/types/TriggerType.d.ts +0 -7
- package/serialization/resources/agentCapabilities/types/TriggerType.js +0 -39
- package/serialization/resources/agentCapabilities/types/index.d.ts +0 -12
- package/serialization/resources/agentCapabilities/types/index.js +0 -28
- /package/api/resources/{agentCapabilities/types/ActionCapability.js → commons/types/InboxItemCustom.js} +0 -0
- /package/api/resources/{agentCapabilities/types/AgentCapability.js → conversation/client/requests/SimulationImportRequest.js} +0 -0
- /package/api/resources/{agentCapabilities/types/AgentCapabilityBase.js → knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
- /package/{api/resources/agentCapabilities/client/index.js → core/file/exports.js} +0 -0
- /package/{dist/api/resources/agentCapabilities/client/index.js → core/file/types.js} +0 -0
- /package/{api/resources/agentCapabilities/types/AgentCapabilityListRequest.js → dist/api/resources/commons/types/InboxItemCustom.js} +0 -0
- /package/{api/resources/agentCapabilities/types/ExecuteCapabilityRequest.js → dist/api/resources/conversation/client/requests/SimulationImportRequest.js} +0 -0
- /package/{api/resources/agentCapabilities/types/ExecuteCapabilityResponse.js → dist/api/resources/knowledge/client/requests/KnowledgeDocumentPatchRequest.js} +0 -0
|
@@ -291,5 +291,29 @@ export declare class Knowledge {
|
|
|
291
291
|
*/
|
|
292
292
|
getKnowledgeDocument(knowledgeBaseVersionReferenceId: string, knowledgeDocumentReferenceId: string, request: MavenAGI.KnowledgeDocumentGetRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeDocumentResponse>;
|
|
293
293
|
private __getKnowledgeDocument;
|
|
294
|
+
/**
|
|
295
|
+
* Update mutable knowledge document fields that can be set independently of a knowledge base version.
|
|
296
|
+
*
|
|
297
|
+
* For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
|
|
298
|
+
*
|
|
299
|
+
* The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
|
|
300
|
+
* All other fields will overwrite the existing value on the knowledge document only if provided.
|
|
301
|
+
*
|
|
302
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to patch.
|
|
303
|
+
* @param {string} knowledgeDocumentReferenceId - The reference ID of the knowledge document to patch.
|
|
304
|
+
* @param {MavenAGI.KnowledgeDocumentPatchRequest} request
|
|
305
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
306
|
+
*
|
|
307
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
308
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
309
|
+
* @throws {@link MavenAGI.ServerError}
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
313
|
+
* llmInclusionStatus: "ALWAYS"
|
|
314
|
+
* })
|
|
315
|
+
*/
|
|
316
|
+
patchKnowledgeDocument(knowledgeBaseReferenceId: string, knowledgeDocumentReferenceId: string, request?: MavenAGI.KnowledgeDocumentPatchRequest, requestOptions?: Knowledge.RequestOptions): core.HttpResponsePromise<MavenAGI.KnowledgeDocumentResponse>;
|
|
317
|
+
private __patchKnowledgeDocument;
|
|
294
318
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
295
319
|
}
|
|
@@ -1259,6 +1259,110 @@ class Knowledge {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Update mutable knowledge document fields that can be set independently of a knowledge base version.
|
|
1264
|
+
*
|
|
1265
|
+
* For any changes in document content see the `createKnowledgeBaseVersion` and `createKnowledgeDocument` endpoints.
|
|
1266
|
+
*
|
|
1267
|
+
* The `knowledgeBaseAppId` field can be provided to update a knowledge document in a knowledge base owned by a different app.
|
|
1268
|
+
* All other fields will overwrite the existing value on the knowledge document only if provided.
|
|
1269
|
+
*
|
|
1270
|
+
* @param {string} knowledgeBaseReferenceId - The reference ID of the knowledge base to patch.
|
|
1271
|
+
* @param {string} knowledgeDocumentReferenceId - The reference ID of the knowledge document to patch.
|
|
1272
|
+
* @param {MavenAGI.KnowledgeDocumentPatchRequest} request
|
|
1273
|
+
* @param {Knowledge.RequestOptions} requestOptions - Request-specific configuration.
|
|
1274
|
+
*
|
|
1275
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
1276
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
1277
|
+
* @throws {@link MavenAGI.ServerError}
|
|
1278
|
+
*
|
|
1279
|
+
* @example
|
|
1280
|
+
* await client.knowledge.patchKnowledgeDocument("help-center", "how-it-works", {
|
|
1281
|
+
* llmInclusionStatus: "ALWAYS"
|
|
1282
|
+
* })
|
|
1283
|
+
*/
|
|
1284
|
+
patchKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request = {}, requestOptions) {
|
|
1285
|
+
return core.HttpResponsePromise.fromPromise(this.__patchKnowledgeDocument(knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request, requestOptions));
|
|
1286
|
+
}
|
|
1287
|
+
__patchKnowledgeDocument(knowledgeBaseReferenceId_1, knowledgeDocumentReferenceId_1) {
|
|
1288
|
+
return __awaiter(this, arguments, void 0, function* (knowledgeBaseReferenceId, knowledgeDocumentReferenceId, request = {}, requestOptions) {
|
|
1289
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1290
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1291
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1292
|
+
"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,
|
|
1293
|
+
"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,
|
|
1294
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1295
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
1296
|
+
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/${encodeURIComponent(knowledgeBaseReferenceId)}/${encodeURIComponent(knowledgeDocumentReferenceId)}/document`),
|
|
1297
|
+
method: "PATCH",
|
|
1298
|
+
headers: _headers,
|
|
1299
|
+
contentType: "application/merge-patch+json",
|
|
1300
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1301
|
+
requestType: "json",
|
|
1302
|
+
body: serializers.KnowledgeDocumentPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1303
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1304
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1305
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1306
|
+
});
|
|
1307
|
+
if (_response.ok) {
|
|
1308
|
+
return {
|
|
1309
|
+
data: serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
1310
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1311
|
+
allowUnrecognizedUnionMembers: true,
|
|
1312
|
+
allowUnrecognizedEnumValues: true,
|
|
1313
|
+
breadcrumbsPrefix: ["response"],
|
|
1314
|
+
}),
|
|
1315
|
+
rawResponse: _response.rawResponse,
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
if (_response.error.reason === "status-code") {
|
|
1319
|
+
switch (_response.error.statusCode) {
|
|
1320
|
+
case 404:
|
|
1321
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1322
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1323
|
+
allowUnrecognizedUnionMembers: true,
|
|
1324
|
+
allowUnrecognizedEnumValues: true,
|
|
1325
|
+
breadcrumbsPrefix: ["response"],
|
|
1326
|
+
}), _response.rawResponse);
|
|
1327
|
+
case 400:
|
|
1328
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1329
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1330
|
+
allowUnrecognizedUnionMembers: true,
|
|
1331
|
+
allowUnrecognizedEnumValues: true,
|
|
1332
|
+
breadcrumbsPrefix: ["response"],
|
|
1333
|
+
}), _response.rawResponse);
|
|
1334
|
+
case 500:
|
|
1335
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
1336
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1337
|
+
allowUnrecognizedUnionMembers: true,
|
|
1338
|
+
allowUnrecognizedEnumValues: true,
|
|
1339
|
+
breadcrumbsPrefix: ["response"],
|
|
1340
|
+
}), _response.rawResponse);
|
|
1341
|
+
default:
|
|
1342
|
+
throw new errors.MavenAGIError({
|
|
1343
|
+
statusCode: _response.error.statusCode,
|
|
1344
|
+
body: _response.error.body,
|
|
1345
|
+
rawResponse: _response.rawResponse,
|
|
1346
|
+
});
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
switch (_response.error.reason) {
|
|
1350
|
+
case "non-json":
|
|
1351
|
+
throw new errors.MavenAGIError({
|
|
1352
|
+
statusCode: _response.error.statusCode,
|
|
1353
|
+
body: _response.error.rawBody,
|
|
1354
|
+
rawResponse: _response.rawResponse,
|
|
1355
|
+
});
|
|
1356
|
+
case "timeout":
|
|
1357
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling PATCH /v1/knowledge/{knowledgeBaseReferenceId}/{knowledgeDocumentReferenceId}/document.");
|
|
1358
|
+
case "unknown":
|
|
1359
|
+
throw new errors.MavenAGIError({
|
|
1360
|
+
message: _response.error.errorMessage,
|
|
1361
|
+
rawResponse: _response.rawResponse,
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1262
1366
|
_getAuthorizationHeader() {
|
|
1263
1367
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1264
1368
|
var _a, _b;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as MavenAGI from "../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* llmInclusionStatus: "ALWAYS"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface KnowledgeDocumentPatchRequest {
|
|
9
|
+
/** The App ID of the knowledge base that contains the knowledge document to patch. If not provided the ID of the calling app will be used. */
|
|
10
|
+
knowledgeBaseAppId?: string;
|
|
11
|
+
/** Determines whether this document is sent to the LLM as part of a conversation. */
|
|
12
|
+
llmInclusionStatus?: MavenAGI.LlmInclusionStatus;
|
|
13
|
+
}
|
|
@@ -2,3 +2,4 @@ export { type KnowledgeBaseGetRequest } from "./KnowledgeBaseGetRequest";
|
|
|
2
2
|
export { type KnowledgeBasePatchRequest } from "./KnowledgeBasePatchRequest";
|
|
3
3
|
export { type KnowledgeBaseVersionsListRequest } from "./KnowledgeBaseVersionsListRequest";
|
|
4
4
|
export { type KnowledgeDocumentGetRequest } from "./KnowledgeDocumentGetRequest";
|
|
5
|
+
export { type KnowledgeDocumentPatchRequest } from "./KnowledgeDocumentPatchRequest";
|
|
@@ -3,10 +3,6 @@ export interface BaseKnowledgeDocument {
|
|
|
3
3
|
url?: string;
|
|
4
4
|
/** The document language. Must be a valid ISO 639-1 language code. */
|
|
5
5
|
language?: string;
|
|
6
|
-
/** The time at which this document was created. */
|
|
7
|
-
createdAt?: Date;
|
|
8
|
-
/** The time at which this document was last modified. */
|
|
9
|
-
updatedAt?: Date;
|
|
10
6
|
/** The name of the author who created this document. */
|
|
11
7
|
author?: string;
|
|
12
8
|
}
|
|
@@ -58,7 +58,7 @@ export interface KnowledgeBaseResponse extends MavenAGI.KnowledgeBaseProperties
|
|
|
58
58
|
/** The tags of the knowledge base. */
|
|
59
59
|
tags: Set<string>;
|
|
60
60
|
/** Determines whether documents in the knowledge base are sent to the LLM as part of a conversation. */
|
|
61
|
-
llmInclusionStatus
|
|
61
|
+
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
62
62
|
/** How often the knowledge base should be refreshed. */
|
|
63
63
|
refreshFrequency: MavenAGI.KnowledgeBaseRefreshFrequency;
|
|
64
64
|
/**
|
|
@@ -10,7 +10,9 @@ import * as MavenAGI from "../../../index";
|
|
|
10
10
|
* agentId: "support"
|
|
11
11
|
* },
|
|
12
12
|
* type: MavenAGI.KnowledgeBaseVersionType.Full,
|
|
13
|
-
* status: MavenAGI.KnowledgeBaseVersionStatus.InProgress
|
|
13
|
+
* status: MavenAGI.KnowledgeBaseVersionStatus.InProgress,
|
|
14
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
15
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z")
|
|
14
16
|
* }
|
|
15
17
|
*/
|
|
16
18
|
export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionRequest {
|
|
@@ -20,4 +22,8 @@ export interface KnowledgeBaseVersion extends MavenAGI.KnowledgeBaseVersionReque
|
|
|
20
22
|
status: MavenAGI.KnowledgeBaseVersionStatus;
|
|
21
23
|
/** A user-facing error message that provides more details about a version failure. */
|
|
22
24
|
errorMessage?: string;
|
|
25
|
+
/** The date and time the knowledge base version was created. */
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
/** The date and time the knowledge base version was last updated. */
|
|
28
|
+
updatedAt: Date;
|
|
23
29
|
}
|
|
@@ -17,6 +17,8 @@ export interface KnowledgeDocumentFilter {
|
|
|
17
17
|
search?: string;
|
|
18
18
|
/** Filter by title */
|
|
19
19
|
title?: string;
|
|
20
|
+
/** Filter by url */
|
|
21
|
+
url?: string;
|
|
20
22
|
/** Filter knowledge documents created on or after this timestamp */
|
|
21
23
|
createdAfter?: Date;
|
|
22
24
|
/** Filter knowledge documents created on or before this timestamp */
|
|
@@ -28,4 +30,6 @@ export interface KnowledgeDocumentFilter {
|
|
|
28
30
|
* If not provided all active knowledge base versions within the agent will be searched.
|
|
29
31
|
*/
|
|
30
32
|
knowledgeBaseVersionId?: MavenAGI.EntityIdWithoutAgent;
|
|
33
|
+
/** Filter by the LLM inclusion status */
|
|
34
|
+
llmInclusionStatus?: MavenAGI.LlmInclusionStatus[];
|
|
31
35
|
}
|
|
@@ -23,11 +23,18 @@ export interface KnowledgeDocumentRequest extends MavenAGI.BaseKnowledgeDocument
|
|
|
23
23
|
knowledgeDocumentId: MavenAGI.EntityIdBase;
|
|
24
24
|
/** ID that uniquely identifies which knowledge base version to create the document in. If not provided will use the most recent version of the knowledge base. */
|
|
25
25
|
versionId?: MavenAGI.EntityIdWithoutAgent;
|
|
26
|
+
/** Type of knowledge document content, if content is provided. This does not need to be set if content is not provided */
|
|
26
27
|
contentType: MavenAGI.KnowledgeDocumentContentType;
|
|
27
28
|
/** The title of the document. Will be shown as part of answers. */
|
|
28
29
|
title: string;
|
|
29
|
-
/**
|
|
30
|
-
|
|
30
|
+
/** ID of the asset associated with this document. Either this or content is required, but not both */
|
|
31
|
+
assetId?: MavenAGI.EntityIdBase;
|
|
32
|
+
/** The content of the document. Not shown directly to users. May be provided in HTML or markdown. HTML will be converted to markdown automatically. Images are not currently supported and will be ignored. Either this or assetId is required, but not both */
|
|
33
|
+
content?: string;
|
|
31
34
|
/** Metadata for the knowledge document. */
|
|
32
35
|
metadata?: Record<string, string>;
|
|
36
|
+
/** The time at which this document was created. */
|
|
37
|
+
createdAt?: Date;
|
|
38
|
+
/** The time at which this document was last modified. */
|
|
39
|
+
updatedAt?: Date;
|
|
33
40
|
}
|
|
@@ -20,12 +20,19 @@ import * as MavenAGI from "../../../index";
|
|
|
20
20
|
* title: "Getting started",
|
|
21
21
|
* metadata: {
|
|
22
22
|
* "category": "getting-started"
|
|
23
|
-
* }
|
|
23
|
+
* },
|
|
24
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
25
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z"),
|
|
26
|
+
* llmInclusionStatus: MavenAGI.LlmInclusionStatus.WhenRelevant
|
|
24
27
|
* }
|
|
25
28
|
*/
|
|
26
29
|
export interface KnowledgeDocumentResponse extends MavenAGI.KnowledgeDocumentSearchResponse {
|
|
30
|
+
/** The current processing status of the knowledge document */
|
|
31
|
+
processingStatus?: MavenAGI.KnowledgeDocumentStatus;
|
|
27
32
|
/** The content of the document in markdown format. Not shown directly to users. */
|
|
28
33
|
content: string;
|
|
34
|
+
/** If the document is associated with an asset, this will contain the asset metadata */
|
|
35
|
+
asset?: MavenAGI.AttachmentResponse;
|
|
29
36
|
/** Metadata for the knowledge document. */
|
|
30
37
|
metadata: Record<string, string>;
|
|
31
38
|
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import * as MavenAGI from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* knowledgeDocumentId: {
|
|
6
|
+
* referenceId: "how-it-works",
|
|
7
|
+
* appId: "help-center",
|
|
8
|
+
* organizationId: "acme",
|
|
9
|
+
* agentId: "support",
|
|
10
|
+
* type: MavenAGI.EntityType.KnowledgeDocument
|
|
11
|
+
* },
|
|
12
|
+
* knowledgeBaseVersionId: {
|
|
13
|
+
* referenceId: "version-1",
|
|
14
|
+
* appId: "help-center",
|
|
15
|
+
* organizationId: "acme",
|
|
16
|
+
* agentId: "support",
|
|
17
|
+
* type: MavenAGI.EntityType.KnowledgeBaseVersion
|
|
18
|
+
* },
|
|
19
|
+
* title: "How it works",
|
|
20
|
+
* llmInclusionStatus: MavenAGI.LlmInclusionStatus.WhenRelevant,
|
|
21
|
+
* url: "https://help-center.acme.com/how-it-works",
|
|
22
|
+
* createdAt: new Date("2024-01-01T00:00:00.000Z"),
|
|
23
|
+
* updatedAt: new Date("2024-02-02T00:00:00.000Z")
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
2
26
|
export interface KnowledgeDocumentSearchResponse extends MavenAGI.BaseKnowledgeDocument {
|
|
3
27
|
/** ID that uniquely identifies this knowledge document within its knowledge base */
|
|
4
28
|
knowledgeDocumentId: MavenAGI.EntityId;
|
|
@@ -9,4 +33,10 @@ export interface KnowledgeDocumentSearchResponse extends MavenAGI.BaseKnowledgeD
|
|
|
9
33
|
knowledgeBaseVersionId?: MavenAGI.EntityId;
|
|
10
34
|
/** The title of the document. Will be shown as part of answers. May be missing on legacy documents. */
|
|
11
35
|
title?: string;
|
|
36
|
+
/** Whether the document is included in the agent's knowledge. */
|
|
37
|
+
llmInclusionStatus: MavenAGI.LlmInclusionStatus;
|
|
38
|
+
/** The time at which this document was created. */
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
/** The time at which this document was last modified. */
|
|
41
|
+
updatedAt: Date;
|
|
12
42
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The current processing status of the knowledge document */
|
|
2
|
+
export declare const KnowledgeDocumentStatus: {
|
|
3
|
+
readonly Succeeded: "SUCCEEDED";
|
|
4
|
+
readonly InProgress: "IN_PROGRESS";
|
|
5
|
+
};
|
|
6
|
+
export type KnowledgeDocumentStatus = (typeof KnowledgeDocumentStatus)[keyof typeof KnowledgeDocumentStatus];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.KnowledgeDocumentStatus = void 0;
|
|
5
|
+
/** The current processing status of the knowledge document */
|
|
6
|
+
exports.KnowledgeDocumentStatus = {
|
|
7
|
+
Succeeded: "SUCCEEDED",
|
|
8
|
+
InProgress: "IN_PROGRESS",
|
|
9
|
+
};
|
|
@@ -14,6 +14,7 @@ export * from "./KnowledgeDocumentContentType";
|
|
|
14
14
|
export * from "./KnowledgeDeleteRequest";
|
|
15
15
|
export * from "./KnowledgeDocumentRequest";
|
|
16
16
|
export * from "./KnowledgeDocumentResponse";
|
|
17
|
+
export * from "./KnowledgeDocumentStatus";
|
|
17
18
|
export * from "./KnowledgeBaseField";
|
|
18
19
|
export * from "./KnowledgeDocumentField";
|
|
19
20
|
export * from "./KnowledgeBaseFilter";
|
|
@@ -30,6 +30,7 @@ __exportStar(require("./KnowledgeDocumentContentType"), exports);
|
|
|
30
30
|
__exportStar(require("./KnowledgeDeleteRequest"), exports);
|
|
31
31
|
__exportStar(require("./KnowledgeDocumentRequest"), exports);
|
|
32
32
|
__exportStar(require("./KnowledgeDocumentResponse"), exports);
|
|
33
|
+
__exportStar(require("./KnowledgeDocumentStatus"), exports);
|
|
33
34
|
__exportStar(require("./KnowledgeBaseField"), exports);
|
|
34
35
|
__exportStar(require("./KnowledgeDocumentField"), exports);
|
|
35
36
|
__exportStar(require("./KnowledgeBaseFilter"), exports);
|
|
@@ -6,6 +6,11 @@ export interface AgentUserFilter {
|
|
|
6
6
|
search?: string;
|
|
7
7
|
/** Filter by identifiers */
|
|
8
8
|
identifiers?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Full-text search query for matching agent users by display name.
|
|
11
|
+
* When you search with this parameter, you're performing a full-text search across the user display names.
|
|
12
|
+
*/
|
|
13
|
+
displayName?: string;
|
|
9
14
|
/**
|
|
10
15
|
* Filter by anonymous users. When true, only anonymous users are returned.
|
|
11
16
|
* When false, only non-anonymous users are returned. An anonymous user is one without any identifiers or name data.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./file/exports";
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
17
|
+
__exportStar(require("./file/exports"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Uploadable } from "./types";
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.toBinaryUploadRequest = toBinaryUploadRequest;
|
|
46
|
+
function toBinaryUploadRequest(file) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
const { data, filename, contentLength, contentType } = yield getFileWithMetadata(file);
|
|
49
|
+
const request = {
|
|
50
|
+
body: data,
|
|
51
|
+
headers: {},
|
|
52
|
+
};
|
|
53
|
+
if (filename) {
|
|
54
|
+
request.headers["Content-Disposition"] = `attachment; filename="${filename}"`;
|
|
55
|
+
}
|
|
56
|
+
if (contentType) {
|
|
57
|
+
request.headers["Content-Type"] = contentType;
|
|
58
|
+
}
|
|
59
|
+
if (contentLength != null) {
|
|
60
|
+
request.headers["Content-Length"] = contentLength.toString();
|
|
61
|
+
}
|
|
62
|
+
return request;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function getFileWithMetadata(file) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
var _a, _b, _c, _d, _e;
|
|
68
|
+
if (isFileLike(file)) {
|
|
69
|
+
return getFileWithMetadata({
|
|
70
|
+
data: file,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if ("path" in file) {
|
|
74
|
+
const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
|
|
75
|
+
if (!fs || !fs.createReadStream) {
|
|
76
|
+
throw new Error("File path uploads are not supported in this environment.");
|
|
77
|
+
}
|
|
78
|
+
const data = fs.createReadStream(file.path);
|
|
79
|
+
const contentLength = (_a = file.contentLength) !== null && _a !== void 0 ? _a : (yield tryGetFileSizeFromPath(file.path));
|
|
80
|
+
const filename = (_b = file.filename) !== null && _b !== void 0 ? _b : getNameFromPath(file.path);
|
|
81
|
+
return {
|
|
82
|
+
data,
|
|
83
|
+
filename,
|
|
84
|
+
contentType: file.contentType,
|
|
85
|
+
contentLength,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if ("data" in file) {
|
|
89
|
+
const data = file.data;
|
|
90
|
+
const contentLength = (_c = file.contentLength) !== null && _c !== void 0 ? _c : (yield tryGetContentLengthFromFileLike(data));
|
|
91
|
+
const filename = (_d = file.filename) !== null && _d !== void 0 ? _d : tryGetNameFromFileLike(data);
|
|
92
|
+
return {
|
|
93
|
+
data,
|
|
94
|
+
filename,
|
|
95
|
+
contentType: (_e = file.contentType) !== null && _e !== void 0 ? _e : tryGetContentTypeFromFileLike(data),
|
|
96
|
+
contentLength,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
throw new Error(`Invalid FileUpload of type ${typeof file}: ${JSON.stringify(file)}`);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function isFileLike(value) {
|
|
103
|
+
return (isBuffer(value) ||
|
|
104
|
+
isArrayBufferView(value) ||
|
|
105
|
+
isArrayBuffer(value) ||
|
|
106
|
+
isUint8Array(value) ||
|
|
107
|
+
isBlob(value) ||
|
|
108
|
+
isFile(value) ||
|
|
109
|
+
isStreamLike(value) ||
|
|
110
|
+
isReadableStream(value));
|
|
111
|
+
}
|
|
112
|
+
function tryGetFileSizeFromPath(path) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
try {
|
|
115
|
+
const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
|
|
116
|
+
if (!fs || !fs.promises || !fs.promises.stat) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const fileStat = yield fs.promises.stat(path);
|
|
120
|
+
return fileStat.size;
|
|
121
|
+
}
|
|
122
|
+
catch (fallbackError) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function tryGetNameFromFileLike(data) {
|
|
128
|
+
if (isNamedValue(data)) {
|
|
129
|
+
return data.name;
|
|
130
|
+
}
|
|
131
|
+
if (isPathedValue(data)) {
|
|
132
|
+
return getNameFromPath(data.path.toString());
|
|
133
|
+
}
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
function tryGetContentLengthFromFileLike(data) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
if (isBuffer(data)) {
|
|
139
|
+
return data.length;
|
|
140
|
+
}
|
|
141
|
+
if (isArrayBufferView(data)) {
|
|
142
|
+
return data.byteLength;
|
|
143
|
+
}
|
|
144
|
+
if (isArrayBuffer(data)) {
|
|
145
|
+
return data.byteLength;
|
|
146
|
+
}
|
|
147
|
+
if (isBlob(data)) {
|
|
148
|
+
return data.size;
|
|
149
|
+
}
|
|
150
|
+
if (isFile(data)) {
|
|
151
|
+
return data.size;
|
|
152
|
+
}
|
|
153
|
+
if (isPathedValue(data)) {
|
|
154
|
+
return yield tryGetFileSizeFromPath(data.path.toString());
|
|
155
|
+
}
|
|
156
|
+
return undefined;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function tryGetContentTypeFromFileLike(data) {
|
|
160
|
+
if (isBlob(data)) {
|
|
161
|
+
return data.type;
|
|
162
|
+
}
|
|
163
|
+
if (isFile(data)) {
|
|
164
|
+
return data.type;
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
function getNameFromPath(path) {
|
|
169
|
+
const lastForwardSlash = path.lastIndexOf("/");
|
|
170
|
+
const lastBackSlash = path.lastIndexOf("\\");
|
|
171
|
+
const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
|
|
172
|
+
return lastSlashIndex >= 0 ? path.substring(lastSlashIndex + 1) : path;
|
|
173
|
+
}
|
|
174
|
+
function isNamedValue(value) {
|
|
175
|
+
return typeof value === "object" && value != null && "name" in value;
|
|
176
|
+
}
|
|
177
|
+
function isPathedValue(value) {
|
|
178
|
+
return typeof value === "object" && value != null && "path" in value;
|
|
179
|
+
}
|
|
180
|
+
function isStreamLike(value) {
|
|
181
|
+
return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
|
|
182
|
+
}
|
|
183
|
+
function isReadableStream(value) {
|
|
184
|
+
return typeof value === "object" && value != null && "getReader" in value;
|
|
185
|
+
}
|
|
186
|
+
function isBuffer(value) {
|
|
187
|
+
return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
|
|
188
|
+
}
|
|
189
|
+
function isArrayBufferView(value) {
|
|
190
|
+
return typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView(value);
|
|
191
|
+
}
|
|
192
|
+
function isArrayBuffer(value) {
|
|
193
|
+
return typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer;
|
|
194
|
+
}
|
|
195
|
+
function isUint8Array(value) {
|
|
196
|
+
return typeof Uint8Array !== "undefined" && value instanceof Uint8Array;
|
|
197
|
+
}
|
|
198
|
+
function isBlob(value) {
|
|
199
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
200
|
+
}
|
|
201
|
+
function isFile(value) {
|
|
202
|
+
return typeof File !== "undefined" && value instanceof File;
|
|
203
|
+
}
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./file"), exports);
|
|
17
18
|
__exportStar(require("./types"), exports);
|