@hydradb/sdk 2.0.1 → 2.1.1
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/README.md +493 -554
- package/dist/Client.d.ts +33 -8
- package/dist/Client.js +124 -18
- package/dist/api/client/requests/ListProvidersRequest.d.ts +10 -0
- package/dist/api/client/requests/SearchQueryRequest.d.ts +55 -15
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/errors/BadGatewayError.d.ts +6 -0
- package/dist/api/errors/{TooManyRequestsError.js → BadGatewayError.js} +5 -5
- package/dist/api/errors/{TooManyRequestsError.d.ts → ContentTooLargeError.d.ts} +1 -1
- package/dist/api/errors/ContentTooLargeError.js +54 -0
- package/dist/api/errors/NotFoundError.d.ts +1 -2
- package/dist/api/errors/ServiceUnavailableError.d.ts +6 -0
- package/dist/api/errors/ServiceUnavailableError.js +54 -0
- package/dist/api/errors/index.d.ts +3 -1
- package/dist/api/errors/index.js +3 -1
- package/dist/api/resources/connectors/client/Client.d.ts +240 -0
- package/dist/api/resources/connectors/client/Client.js +1034 -0
- package/dist/api/resources/connectors/client/requests/DeleteConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/DeleteResourceConnectorsRequest.d.ts +13 -0
- package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/GetConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +34 -0
- package/dist/api/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +41 -0
- package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +17 -0
- package/dist/api/resources/connectors/client/requests/HandlerResourceCreateReq.d.ts +34 -0
- package/dist/api/resources/connectors/client/requests/ListConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/ListResourcesConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.d.ts +14 -0
- package/dist/api/resources/connectors/client/requests/SyncConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/index.d.ts +12 -0
- package/dist/api/resources/connectors/exports.d.ts +2 -0
- package/dist/api/resources/{embeddings → connectors}/exports.js +2 -2
- package/dist/api/resources/context/client/Client.d.ts +33 -6
- package/dist/api/resources/context/client/Client.js +134 -19
- package/dist/api/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +30 -0
- package/dist/api/resources/context/client/requests/IngestContextRequest.d.ts +6 -3
- package/dist/api/resources/context/client/requests/InspectContextRequest.d.ts +12 -5
- package/dist/api/resources/context/client/requests/ListV2ListContentRequest.d.ts +16 -1
- package/dist/api/resources/context/client/requests/RelationsContextRequest.d.ts +14 -6
- package/dist/api/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +14 -1
- package/dist/api/resources/context/client/requests/StatusContextRequest.d.ts +10 -3
- package/dist/api/resources/context/client/requests/index.d.ts +1 -0
- package/dist/api/resources/context/index.d.ts +1 -0
- package/dist/api/resources/context/index.js +1 -0
- package/dist/api/resources/context/types/IngestContextRequestType.d.ts +5 -0
- package/dist/api/resources/context/types/IngestContextRequestType.js +8 -0
- package/dist/api/resources/context/types/ListV2ListContentRequestType.d.ts +6 -0
- package/dist/api/resources/context/types/ListV2ListContentRequestType.js +9 -0
- package/dist/api/resources/context/types/RelationsContextRequestType.d.ts +5 -0
- package/dist/api/resources/context/types/RelationsContextRequestType.js +8 -0
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +6 -0
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.js +9 -0
- package/dist/api/resources/context/types/index.d.ts +4 -0
- package/dist/api/resources/context/types/index.js +20 -0
- package/dist/api/resources/databases/client/Client.d.ts +127 -0
- package/dist/api/resources/{tenants → databases}/client/Client.js +146 -78
- package/dist/api/resources/databases/client/requests/CollectionsDatabasesRequest.d.ts +10 -0
- package/dist/api/resources/databases/client/requests/DeleteDatabasesRequest.d.ts +10 -0
- package/dist/api/resources/databases/client/requests/StatsDatabasesRequest.d.ts +10 -0
- package/dist/api/resources/databases/client/requests/StatusDatabasesRequest.d.ts +10 -0
- package/dist/api/resources/databases/client/requests/TenantsTenantCreateRequest.d.ts +23 -0
- package/dist/api/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.d.ts +13 -0
- package/dist/api/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.js +3 -0
- package/dist/api/resources/databases/client/requests/index.d.ts +6 -0
- package/dist/api/resources/databases/exports.d.ts +2 -0
- package/dist/api/resources/{tenants → databases}/exports.js +2 -2
- package/dist/api/resources/index.d.ts +5 -4
- package/dist/api/resources/index.js +6 -5
- package/dist/api/resources/webhooks/client/Client.d.ts +15 -3
- package/dist/api/resources/webhooks/client/Client.js +19 -31
- package/dist/api/resources/webhooks/client/requests/GetDeliveryWebhooksRequest.d.ts +1 -1
- package/dist/api/resources/webhooks/client/requests/RetryDeliveryWebhooksRequest.d.ts +1 -1
- package/dist/api/resources/webhooks/client/requests/WebhooksWebhookRegisterRequest.d.ts +3 -0
- package/dist/api/types/ConnectorsConnector.d.ts +58 -0
- package/dist/api/types/ConnectorsConnector.js +3 -0
- package/dist/api/types/ConnectorsResource.d.ts +71 -0
- package/dist/api/types/ConnectorsResource.js +3 -0
- package/dist/api/types/DashboardPaginationMeta.d.ts +6 -0
- package/dist/api/types/FetchV2SourceFetchResponse.d.ts +10 -0
- package/dist/api/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +26 -0
- package/dist/api/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +3 -0
- package/dist/api/types/GraphEntity.d.ts +12 -0
- package/dist/api/types/GraphGraphRelationsResponse.d.ts +4 -0
- package/dist/api/types/GraphRelationEvidence.d.ts +6 -0
- package/dist/api/types/GraphTripletWithEvidence.d.ts +2 -0
- package/dist/api/types/HandlerApiError.d.ts +2 -0
- package/dist/api/types/HandlerDeprecationNotice.d.ts +12 -0
- package/dist/api/types/HandlerDeprecationNotice.js +3 -0
- package/dist/api/types/HandlerEnvelopeFetchV2SourceFetchResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +9 -0
- package/dist/api/types/HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +3 -0
- package/dist/api/types/HandlerEnvelopeGraphGraphRelationsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeIngestionV2BatchProcessingStatus.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeIngestionV2SourceUploadResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeListV2SourceListResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeSourcesMemoryDeleteResponse.d.ts +9 -0
- package/dist/api/types/HandlerEnvelopeSourcesMemoryDeleteResponse.js +3 -0
- package/dist/api/types/HandlerEnvelopeTenantsInfraStatusResponseV2.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsSubTenantIdsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantCreateAcceptedResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantDeleteResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantIdsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantStatsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksDeliveryItem.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksDeliveryListResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksRetryResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookDeleteResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookGetResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookRegisterResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookTestResponse.d.ts +2 -0
- package/dist/api/types/HandlerErrorDetail.d.ts +9 -0
- package/dist/api/types/HandlerErrorResponse.d.ts +1 -0
- package/dist/api/types/HandlerMetadataSchemaUpdateResponse.d.ts +7 -0
- package/dist/api/types/HandlerMetadataSchemaUpdateResponse.js +3 -0
- package/dist/api/types/HandlerResourceMapping.d.ts +46 -0
- package/dist/api/types/HandlerResourceMapping.js +3 -0
- package/dist/api/types/HandlerResponseMeta.d.ts +19 -0
- package/dist/api/types/IngestionV2BatchProcessingStatus.d.ts +1 -0
- package/dist/api/types/IngestionV2ProcessingStatus.d.ts +6 -0
- package/dist/api/types/IngestionV2SourceUploadResponse.d.ts +5 -0
- package/dist/api/types/IngestionV2SourceUploadResultItem.d.ts +7 -0
- package/dist/api/types/ListContentFilter.d.ts +8 -2
- package/dist/api/types/ListSourceListResponse.d.ts +4 -0
- package/dist/api/types/SearchGraphContext.d.ts +9 -0
- package/dist/api/types/SearchMetadataFilters.d.ts +4 -0
- package/dist/api/types/SearchMetadataFilters.js +3 -0
- package/dist/api/types/SearchPathTriplet.d.ts +3 -0
- package/dist/api/types/SearchQueryRequestCollections.d.ts +4 -0
- package/dist/api/types/SearchQueryRequestCollections.js +3 -0
- package/dist/api/types/SearchQueryRequestSubTenantIds.d.ts +4 -0
- package/dist/api/types/SearchQueryRequestSubTenantIds.js +3 -0
- package/dist/api/types/SearchRecallMode.d.ts +1 -0
- package/dist/api/types/SearchRecallMode.js +1 -0
- package/dist/api/types/SearchScoredPathResponse.d.ts +5 -0
- package/dist/api/types/SearchSourceInfo.d.ts +11 -0
- package/dist/api/types/SearchV2Chunk.d.ts +13 -0
- package/dist/api/types/SearchV2RetrievalResult.d.ts +3 -0
- package/dist/api/types/SourcesMemoryDeleteResponse.d.ts +13 -0
- package/dist/api/types/SourcesMemoryDeleteResponse.js +3 -0
- package/dist/api/types/SourcesSourceDeleteResultItem.d.ts +3 -0
- package/dist/api/types/TenantsCollectionStats.d.ts +2 -0
- package/dist/api/types/TenantsCustomPropertyDefinition.d.ts +7 -0
- package/dist/api/types/TenantsFailedTenant.d.ts +3 -0
- package/dist/api/types/TenantsInfraStatusResponseV2.d.ts +4 -0
- package/dist/api/types/TenantsInfraV2.d.ts +2 -0
- package/dist/api/types/TenantsSubTenantIdsResponse.d.ts +4 -0
- package/dist/api/types/TenantsTenantCreateAcceptedResponse.d.ts +4 -0
- package/dist/api/types/TenantsTenantDeleteResponse.d.ts +4 -0
- package/dist/api/types/TenantsTenantIdsResponse.d.ts +7 -0
- package/dist/api/types/TenantsTenantStatsResponse.d.ts +3 -0
- package/dist/api/types/TenantsVectorstoreStatusV2.d.ts +2 -0
- package/dist/api/types/WebhooksDeliveryItem.d.ts +10 -0
- package/dist/api/types/WebhooksDeliveryListResponse.d.ts +3 -0
- package/dist/api/types/WebhooksRetryResponse.d.ts +3 -0
- package/dist/api/types/WebhooksWebhookDeleteResponse.d.ts +2 -0
- package/dist/api/types/WebhooksWebhookGetResponse.d.ts +4 -0
- package/dist/api/types/WebhooksWebhookRegisterResponse.d.ts +5 -0
- package/dist/api/types/WebhooksWebhookTestResponse.d.ts +3 -0
- package/dist/api/types/index.d.ts +12 -10
- package/dist/api/types/index.js +12 -10
- package/dist/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/serialization/client/catalog.d.ts +6 -0
- package/dist/serialization/{types/EmbeddingsRawEmbeddingVector.js → client/catalog.js} +2 -5
- package/dist/serialization/client/index.d.ts +2 -0
- package/dist/serialization/client/index.js +25 -0
- package/dist/serialization/client/listProviders.d.ts +6 -0
- package/dist/serialization/{types/EmbeddingsDeleteResult.js → client/listProviders.js} +2 -6
- package/dist/serialization/client/requests/SearchQueryRequest.d.ts +11 -3
- package/dist/serialization/client/requests/SearchQueryRequest.js +11 -3
- package/dist/serialization/resources/connectors/client/configure.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/configure.js +39 -0
- package/dist/serialization/resources/connectors/client/delete.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/delete.js +39 -0
- package/dist/serialization/resources/connectors/client/deleteResource.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/deleteResource.js +39 -0
- package/dist/serialization/resources/connectors/client/discover.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/discover.js +39 -0
- package/dist/serialization/resources/connectors/client/discoverPreview.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/discoverPreview.js +39 -0
- package/dist/serialization/resources/connectors/client/index.d.ts +10 -0
- package/dist/serialization/resources/connectors/client/index.js +49 -0
- package/dist/serialization/resources/connectors/client/list.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/list.js +39 -0
- package/dist/serialization/resources/connectors/client/listResources.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/listResources.js +39 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.d.ts +12 -0
- package/dist/serialization/resources/{embeddings/client/requests/EmbeddingsInsertRawEmbeddingsRequest.js → connectors/client/requests/HandlerConfigureReq.js} +6 -7
- package/dist/serialization/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +21 -0
- package/dist/serialization/resources/{embeddings/client/requests/EmbeddingsSearchRawEmbeddingsRequest.js → connectors/client/requests/HandlerConnectorCreateReq.js} +15 -8
- package/dist/serialization/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +11 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerDiscoverPreviewReq.js +43 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerResourceCreateReq.d.ts +19 -0
- package/dist/serialization/{types/EmbeddingsRawEmbeddingSearchResult.js → resources/connectors/client/requests/HandlerResourceCreateReq.js} +13 -8
- package/dist/serialization/resources/connectors/client/requests/index.d.ts +4 -0
- package/dist/serialization/resources/connectors/client/requests/index.js +11 -0
- package/dist/serialization/resources/connectors/client/rotateAConnectorsStoredOAuthRefreshToken.d.ts +10 -0
- package/dist/serialization/resources/connectors/client/rotateAConnectorsStoredOAuthRefreshToken.js +40 -0
- package/dist/serialization/resources/connectors/client/sync.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/sync.js +39 -0
- package/dist/serialization/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +16 -0
- package/dist/serialization/resources/{embeddings/client/requests/EmbeddingsFilterRawEmbeddingsRequest.js → context/client/requests/HandlerContextMetadataUpdateRequest.js} +10 -8
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.d.ts +4 -1
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.js +4 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +4 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.js +4 -1
- package/dist/serialization/resources/context/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/context/client/requests/index.js +3 -1
- package/dist/serialization/resources/context/index.d.ts +1 -0
- package/dist/serialization/resources/context/index.js +1 -0
- package/dist/serialization/resources/context/types/IngestContextRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/IngestContextRequestType.js +39 -0
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.js +39 -0
- package/dist/serialization/resources/context/types/RelationsContextRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/RelationsContextRequestType.js +39 -0
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.js +39 -0
- package/dist/serialization/resources/context/types/index.d.ts +4 -0
- package/dist/serialization/resources/context/types/index.js +20 -0
- package/dist/serialization/resources/{tenants → databases}/client/requests/TenantsTenantCreateRequest.d.ts +2 -0
- package/dist/serialization/resources/{tenants → databases}/client/requests/TenantsTenantCreateRequest.js +2 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.d.ts +10 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.js +42 -0
- package/dist/serialization/resources/databases/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/databases/client/requests/index.js +7 -0
- package/dist/serialization/resources/index.d.ts +5 -4
- package/dist/serialization/resources/index.js +6 -5
- package/dist/serialization/types/ConnectorsConnector.d.ts +30 -0
- package/dist/serialization/types/ConnectorsConnector.js +62 -0
- package/dist/serialization/types/ConnectorsResource.d.ts +26 -0
- package/dist/serialization/types/ConnectorsResource.js +58 -0
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +20 -0
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +52 -0
- package/dist/serialization/types/GraphEntity.d.ts +1 -0
- package/dist/serialization/types/GraphEntity.js +1 -0
- package/dist/serialization/types/HandlerDeprecationNotice.d.ts +13 -0
- package/dist/serialization/types/HandlerDeprecationNotice.js +45 -0
- package/dist/serialization/types/HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +15 -0
- package/dist/serialization/types/{HandlerEnvelopeEmbeddingsInsertResult.js → HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js} +4 -4
- package/dist/serialization/types/{HandlerEnvelopeSourcesSourceDeleteResponse.d.ts → HandlerEnvelopeSourcesMemoryDeleteResponse.d.ts} +4 -4
- package/dist/serialization/types/{HandlerEnvelopeSourcesSourceDeleteResponse.js → HandlerEnvelopeSourcesMemoryDeleteResponse.js} +4 -4
- package/dist/serialization/types/HandlerErrorDetail.d.ts +3 -0
- package/dist/serialization/types/HandlerErrorDetail.js +3 -0
- package/dist/serialization/types/HandlerMetadataSchemaUpdateResponse.d.ts +11 -0
- package/dist/serialization/types/HandlerMetadataSchemaUpdateResponse.js +43 -0
- package/dist/serialization/types/HandlerResourceMapping.d.ts +17 -0
- package/dist/serialization/types/{EmbeddingsRawEmbeddingDocument.js → HandlerResourceMapping.js} +8 -5
- package/dist/serialization/types/HandlerResponseMeta.d.ts +7 -0
- package/dist/serialization/types/HandlerResponseMeta.js +7 -0
- package/dist/serialization/types/ListContentFilter.d.ts +2 -2
- package/dist/serialization/types/ListContentFilter.js +2 -2
- package/dist/serialization/types/SearchMetadataFilters.d.ts +7 -0
- package/dist/serialization/types/{EmbeddingsInsertResult.js → SearchMetadataFilters.js} +2 -7
- package/dist/serialization/types/SearchQueryRequestCollections.d.ts +7 -0
- package/dist/serialization/types/SearchQueryRequestCollections.js +42 -0
- package/dist/serialization/types/SearchQueryRequestSubTenantIds.d.ts +7 -0
- package/dist/serialization/types/SearchQueryRequestSubTenantIds.js +42 -0
- package/dist/serialization/types/SearchRecallMode.d.ts +1 -1
- package/dist/serialization/types/SearchRecallMode.js +1 -1
- package/dist/serialization/types/SearchSourceInfo.d.ts +1 -0
- package/dist/serialization/types/SearchSourceInfo.js +1 -0
- package/dist/serialization/types/SearchV2Chunk.d.ts +1 -0
- package/dist/serialization/types/SearchV2Chunk.js +1 -0
- package/dist/serialization/types/{SourcesSourceDeleteResponse.d.ts → SourcesMemoryDeleteResponse.d.ts} +3 -2
- package/dist/serialization/types/{SourcesSourceDeleteResponse.js → SourcesMemoryDeleteResponse.js} +3 -2
- package/dist/serialization/types/TenantsFailedTenant.d.ts +1 -0
- package/dist/serialization/types/TenantsFailedTenant.js +1 -0
- package/dist/serialization/types/TenantsInfraStatusResponseV2.d.ts +1 -0
- package/dist/serialization/types/TenantsInfraStatusResponseV2.js +1 -0
- package/dist/serialization/types/TenantsSubTenantIdsResponse.d.ts +1 -0
- package/dist/serialization/types/TenantsSubTenantIdsResponse.js +1 -0
- package/dist/serialization/types/TenantsTenantCreateAcceptedResponse.d.ts +1 -0
- package/dist/serialization/types/TenantsTenantCreateAcceptedResponse.js +1 -0
- package/dist/serialization/types/TenantsTenantDeleteResponse.d.ts +1 -0
- package/dist/serialization/types/TenantsTenantDeleteResponse.js +1 -0
- package/dist/serialization/types/TenantsTenantIdsResponse.d.ts +2 -0
- package/dist/serialization/types/TenantsTenantIdsResponse.js +2 -0
- package/dist/serialization/types/TenantsTenantStatsResponse.d.ts +1 -0
- package/dist/serialization/types/TenantsTenantStatsResponse.js +1 -0
- package/dist/serialization/types/index.d.ts +12 -10
- package/dist/serialization/types/index.js +12 -10
- package/package.json +1 -1
- package/dist/api/resources/embeddings/client/Client.d.ts +0 -80
- package/dist/api/resources/embeddings/client/Client.js +0 -351
- package/dist/api/resources/embeddings/client/requests/DeleteEmbeddingsRequest.d.ts +0 -18
- package/dist/api/resources/embeddings/client/requests/EmbeddingsFilterRawEmbeddingsRequest.d.ts +0 -15
- package/dist/api/resources/embeddings/client/requests/EmbeddingsInsertRawEmbeddingsRequest.d.ts +0 -14
- package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRawEmbeddingsRequest.d.ts +0 -16
- package/dist/api/resources/embeddings/client/requests/index.d.ts +0 -4
- package/dist/api/resources/embeddings/exports.d.ts +0 -2
- package/dist/api/resources/tenants/client/Client.d.ts +0 -109
- package/dist/api/resources/tenants/client/requests/DeleteTenantsRequest.d.ts +0 -10
- package/dist/api/resources/tenants/client/requests/StatsTenantsRequest.d.ts +0 -10
- package/dist/api/resources/tenants/client/requests/StatusTenantsRequest.d.ts +0 -10
- package/dist/api/resources/tenants/client/requests/SubTenantsTenantsRequest.d.ts +0 -10
- package/dist/api/resources/tenants/client/requests/TenantsTenantCreateRequest.d.ts +0 -11
- package/dist/api/resources/tenants/client/requests/index.d.ts +0 -5
- package/dist/api/resources/tenants/exports.d.ts +0 -2
- package/dist/api/types/EmbeddingsDeleteResult.d.ts +0 -5
- package/dist/api/types/EmbeddingsInsertResult.d.ts +0 -6
- package/dist/api/types/EmbeddingsRawEmbeddingDocument.d.ts +0 -8
- package/dist/api/types/EmbeddingsRawEmbeddingSearchResult.d.ts +0 -8
- package/dist/api/types/EmbeddingsRawEmbeddingVector.d.ts +0 -5
- package/dist/api/types/HandlerEnvelopeArrayEmbeddingsRawEmbeddingSearchResult.d.ts +0 -7
- package/dist/api/types/HandlerEnvelopeEmbeddingsDeleteResult.d.ts +0 -7
- package/dist/api/types/HandlerEnvelopeEmbeddingsInsertResult.d.ts +0 -7
- package/dist/api/types/HandlerEnvelopeSourcesSourceDeleteResponse.d.ts +0 -7
- package/dist/api/types/SourcesSourceDeleteResponse.d.ts +0 -7
- package/dist/serialization/resources/embeddings/client/requests/EmbeddingsFilterRawEmbeddingsRequest.d.ts +0 -14
- package/dist/serialization/resources/embeddings/client/requests/EmbeddingsInsertRawEmbeddingsRequest.d.ts +0 -13
- package/dist/serialization/resources/embeddings/client/requests/EmbeddingsSearchRawEmbeddingsRequest.d.ts +0 -14
- package/dist/serialization/resources/embeddings/client/requests/index.d.ts +0 -3
- package/dist/serialization/resources/embeddings/client/requests/index.js +0 -9
- package/dist/serialization/resources/tenants/client/index.d.ts +0 -1
- package/dist/serialization/resources/tenants/client/index.js +0 -17
- package/dist/serialization/resources/tenants/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/tenants/client/requests/index.js +0 -5
- package/dist/serialization/types/EmbeddingsDeleteResult.d.ts +0 -11
- package/dist/serialization/types/EmbeddingsInsertResult.d.ts +0 -12
- package/dist/serialization/types/EmbeddingsRawEmbeddingDocument.d.ts +0 -14
- package/dist/serialization/types/EmbeddingsRawEmbeddingSearchResult.d.ts +0 -14
- package/dist/serialization/types/EmbeddingsRawEmbeddingVector.d.ts +0 -10
- package/dist/serialization/types/HandlerEnvelopeArrayEmbeddingsRawEmbeddingSearchResult.d.ts +0 -15
- package/dist/serialization/types/HandlerEnvelopeArrayEmbeddingsRawEmbeddingSearchResult.js +0 -47
- package/dist/serialization/types/HandlerEnvelopeEmbeddingsDeleteResult.d.ts +0 -15
- package/dist/serialization/types/HandlerEnvelopeEmbeddingsDeleteResult.js +0 -47
- package/dist/serialization/types/HandlerEnvelopeEmbeddingsInsertResult.d.ts +0 -15
- /package/dist/api/{resources/embeddings/client/requests/DeleteEmbeddingsRequest.js → client/requests/ListProvidersRequest.js} +0 -0
- /package/dist/api/resources/{embeddings → connectors}/client/index.d.ts +0 -0
- /package/dist/api/resources/{embeddings → connectors}/client/index.js +0 -0
- /package/dist/api/resources/{embeddings/client/requests/EmbeddingsFilterRawEmbeddingsRequest.js → connectors/client/requests/DeleteConnectorsRequest.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/EmbeddingsInsertRawEmbeddingsRequest.js → connectors/client/requests/DeleteResourceConnectorsRequest.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/EmbeddingsSearchRawEmbeddingsRequest.js → connectors/client/requests/DiscoverConnectorsRequest.js} +0 -0
- /package/dist/api/resources/{tenants/client/requests/DeleteTenantsRequest.js → connectors/client/requests/GetConnectorsRequest.js} +0 -0
- /package/dist/api/resources/{tenants/client/requests/StatsTenantsRequest.js → connectors/client/requests/HandlerConfigureReq.js} +0 -0
- /package/dist/api/resources/{tenants/client/requests/StatusTenantsRequest.js → connectors/client/requests/HandlerConnectorCreateReq.js} +0 -0
- /package/dist/api/resources/{tenants/client/requests/SubTenantsTenantsRequest.js → connectors/client/requests/HandlerDiscoverPreviewReq.js} +0 -0
- /package/dist/api/resources/{tenants/client/requests/TenantsTenantCreateRequest.js → connectors/client/requests/HandlerResourceCreateReq.js} +0 -0
- /package/dist/api/{types/EmbeddingsDeleteResult.js → resources/connectors/client/requests/ListConnectorsRequest.js} +0 -0
- /package/dist/api/{types/EmbeddingsInsertResult.js → resources/connectors/client/requests/ListResourcesConnectorsRequest.js} +0 -0
- /package/dist/api/{types/EmbeddingsRawEmbeddingDocument.js → resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.js} +0 -0
- /package/dist/api/{types/EmbeddingsRawEmbeddingSearchResult.js → resources/connectors/client/requests/SyncConnectorsRequest.js} +0 -0
- /package/dist/api/resources/{embeddings → connectors}/client/requests/index.js +0 -0
- /package/dist/api/resources/{embeddings → connectors}/index.d.ts +0 -0
- /package/dist/api/resources/{embeddings → connectors}/index.js +0 -0
- /package/dist/api/{types/EmbeddingsRawEmbeddingVector.js → resources/context/client/requests/HandlerContextMetadataUpdateRequest.js} +0 -0
- /package/dist/api/resources/{tenants → databases}/client/index.d.ts +0 -0
- /package/dist/api/resources/{tenants → databases}/client/index.js +0 -0
- /package/dist/api/{types/HandlerEnvelopeArrayEmbeddingsRawEmbeddingSearchResult.js → resources/databases/client/requests/CollectionsDatabasesRequest.js} +0 -0
- /package/dist/api/{types/HandlerEnvelopeEmbeddingsDeleteResult.js → resources/databases/client/requests/DeleteDatabasesRequest.js} +0 -0
- /package/dist/api/{types/HandlerEnvelopeEmbeddingsInsertResult.js → resources/databases/client/requests/StatsDatabasesRequest.js} +0 -0
- /package/dist/api/{types/HandlerEnvelopeSourcesSourceDeleteResponse.js → resources/databases/client/requests/StatusDatabasesRequest.js} +0 -0
- /package/dist/api/{types/SourcesSourceDeleteResponse.js → resources/databases/client/requests/TenantsTenantCreateRequest.js} +0 -0
- /package/dist/api/resources/{tenants → databases}/client/requests/index.js +0 -0
- /package/dist/api/resources/{tenants → databases}/index.d.ts +0 -0
- /package/dist/api/resources/{tenants → databases}/index.js +0 -0
- /package/dist/serialization/resources/{embeddings → connectors}/index.d.ts +0 -0
- /package/dist/serialization/resources/{embeddings → connectors}/index.js +0 -0
- /package/dist/serialization/resources/{embeddings → databases}/client/index.d.ts +0 -0
- /package/dist/serialization/resources/{embeddings → databases}/client/index.js +0 -0
- /package/dist/serialization/resources/{tenants → databases}/index.d.ts +0 -0
- /package/dist/serialization/resources/{tenants → databases}/index.js +0 -0
package/dist/Client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as HydraDB from "./api/index.js";
|
|
2
|
+
import { ConnectorsClient } from "./api/resources/connectors/client/Client.js";
|
|
2
3
|
import { ContextClient } from "./api/resources/context/client/Client.js";
|
|
3
|
-
import {
|
|
4
|
-
import { TenantsClient } from "./api/resources/tenants/client/Client.js";
|
|
4
|
+
import { DatabasesClient } from "./api/resources/databases/client/Client.js";
|
|
5
5
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
6
6
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
7
7
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
@@ -13,17 +13,42 @@ export declare namespace HydraDBClient {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class HydraDBClient {
|
|
15
15
|
protected readonly _options: NormalizedClientOptionsWithAuth<HydraDBClient.Options>;
|
|
16
|
+
protected _connectors: ConnectorsClient | undefined;
|
|
16
17
|
protected _context: ContextClient | undefined;
|
|
17
|
-
protected
|
|
18
|
-
protected _embeddings: EmbeddingsClient | undefined;
|
|
18
|
+
protected _databases: DatabasesClient | undefined;
|
|
19
19
|
protected _webhooks: WebhooksClient | undefined;
|
|
20
|
-
constructor(options
|
|
20
|
+
constructor(options?: HydraDBClient.Options);
|
|
21
|
+
get connectors(): ConnectorsClient;
|
|
21
22
|
get context(): ContextClient;
|
|
22
|
-
get
|
|
23
|
-
get embeddings(): EmbeddingsClient;
|
|
23
|
+
get databases(): DatabasesClient;
|
|
24
24
|
get webhooks(): WebhooksClient;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* List every provider in the supported_connectors control-plane table (availability, sync engine, maturity, category) for the dashboard connector catalog.
|
|
27
|
+
*
|
|
28
|
+
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.catalog()
|
|
32
|
+
*/
|
|
33
|
+
catalog(requestOptions?: HydraDBClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
34
|
+
private __catalog;
|
|
35
|
+
/**
|
|
36
|
+
* Without ?id: returns every supported connector with its availability, maturity, category, and sync engine (the connector catalog). With ?id=<provider>: returns what that provider stores and how to use it — indexed_object_types (the streams that become searchable documents), searchable_fields (rendered into the indexed text), filterable_fields (each with the exact filter_key to pass in a query's metadata_filters), and the credential_schema for connecting it.
|
|
37
|
+
*
|
|
38
|
+
* @param {HydraDB.ListProvidersRequest} request
|
|
39
|
+
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.listProviders({
|
|
45
|
+
* id: "HydraDoc1234"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
listProviders(request?: HydraDB.ListProvidersRequest, requestOptions?: HydraDBClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
49
|
+
private __listProviders;
|
|
50
|
+
/**
|
|
51
|
+
* Unified query endpoint that dispatches across type (knowledge/memory/all) and query_by (hybrid/text). Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids.
|
|
27
52
|
*
|
|
28
53
|
* @param {HydraDB.SearchQueryRequest} request
|
|
29
54
|
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/Client.js
CHANGED
|
@@ -36,9 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.HydraDBClient = void 0;
|
|
38
38
|
const HydraDB = __importStar(require("./api/index.js"));
|
|
39
|
-
const Client_js_1 = require("./api/resources/
|
|
40
|
-
const Client_js_2 = require("./api/resources/
|
|
41
|
-
const Client_js_3 = require("./api/resources/
|
|
39
|
+
const Client_js_1 = require("./api/resources/connectors/client/Client.js");
|
|
40
|
+
const Client_js_2 = require("./api/resources/context/client/Client.js");
|
|
41
|
+
const Client_js_3 = require("./api/resources/databases/client/Client.js");
|
|
42
42
|
const Client_js_4 = require("./api/resources/webhooks/client/Client.js");
|
|
43
43
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
44
44
|
const headers_js_1 = require("./core/headers.js");
|
|
@@ -48,23 +48,135 @@ const handleNonStatusCodeError_js_1 = require("./errors/handleNonStatusCodeError
|
|
|
48
48
|
const errors = __importStar(require("./errors/index.js"));
|
|
49
49
|
const serializers = __importStar(require("./serialization/index.js"));
|
|
50
50
|
class HydraDBClient {
|
|
51
|
-
constructor(options) {
|
|
51
|
+
constructor(options = {}) {
|
|
52
52
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
53
53
|
}
|
|
54
|
-
get
|
|
55
|
-
return (this.
|
|
54
|
+
get connectors() {
|
|
55
|
+
return (this._connectors ?? (this._connectors = new Client_js_1.ConnectorsClient(this._options)));
|
|
56
56
|
}
|
|
57
|
-
get
|
|
58
|
-
return (this.
|
|
57
|
+
get context() {
|
|
58
|
+
return (this._context ?? (this._context = new Client_js_2.ContextClient(this._options)));
|
|
59
59
|
}
|
|
60
|
-
get
|
|
61
|
-
return (this.
|
|
60
|
+
get databases() {
|
|
61
|
+
return (this._databases ?? (this._databases = new Client_js_3.DatabasesClient(this._options)));
|
|
62
62
|
}
|
|
63
63
|
get webhooks() {
|
|
64
64
|
return (this._webhooks ?? (this._webhooks = new Client_js_4.WebhooksClient(this._options)));
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* List every provider in the supported_connectors control-plane table (availability, sync engine, maturity, category) for the dashboard connector catalog.
|
|
68
|
+
*
|
|
69
|
+
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* await client.catalog()
|
|
73
|
+
*/
|
|
74
|
+
catalog(requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__catalog(requestOptions));
|
|
76
|
+
}
|
|
77
|
+
async __catalog(requestOptions) {
|
|
78
|
+
const _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
79
|
+
const _response = await core.fetcher({
|
|
80
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
81
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
82
|
+
environments.HydraDBEnvironment.Default, "connector-catalog"),
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers: _headers,
|
|
85
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
86
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
87
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
88
|
+
abortSignal: requestOptions?.abortSignal,
|
|
89
|
+
fetchFn: this._options?.fetch,
|
|
90
|
+
logging: this._options.logging,
|
|
91
|
+
});
|
|
92
|
+
if (_response.ok) {
|
|
93
|
+
return {
|
|
94
|
+
data: serializers.catalog.Response.parseOrThrow(_response.body, {
|
|
95
|
+
unrecognizedObjectKeys: "passthrough",
|
|
96
|
+
allowUnrecognizedUnionMembers: true,
|
|
97
|
+
allowUnrecognizedEnumValues: true,
|
|
98
|
+
skipValidation: true,
|
|
99
|
+
breadcrumbsPrefix: ["response"],
|
|
100
|
+
}),
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
throw new errors.HydraDBError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.body,
|
|
108
|
+
rawResponse: _response.rawResponse,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connector-catalog");
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Without ?id: returns every supported connector with its availability, maturity, category, and sync engine (the connector catalog). With ?id=<provider>: returns what that provider stores and how to use it — indexed_object_types (the streams that become searchable documents), searchable_fields (rendered into the indexed text), filterable_fields (each with the exact filter_key to pass in a query's metadata_filters), and the credential_schema for connecting it.
|
|
115
|
+
*
|
|
116
|
+
* @param {HydraDB.ListProvidersRequest} request
|
|
117
|
+
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.listProviders({
|
|
123
|
+
* id: "HydraDoc1234"
|
|
124
|
+
* })
|
|
125
|
+
*/
|
|
126
|
+
listProviders(request = {}, requestOptions) {
|
|
127
|
+
return core.HttpResponsePromise.fromPromise(this.__listProviders(request, requestOptions));
|
|
128
|
+
}
|
|
129
|
+
async __listProviders(request = {}, requestOptions) {
|
|
130
|
+
const { id } = request;
|
|
131
|
+
const _queryParams = {
|
|
132
|
+
id,
|
|
133
|
+
};
|
|
134
|
+
const _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
135
|
+
const _response = await core.fetcher({
|
|
136
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
137
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
138
|
+
environments.HydraDBEnvironment.Default, "connectors/providers"),
|
|
139
|
+
method: "GET",
|
|
140
|
+
headers: _headers,
|
|
141
|
+
queryString: core.url
|
|
142
|
+
.queryBuilder()
|
|
143
|
+
.addMany(_queryParams)
|
|
144
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
145
|
+
.build(),
|
|
146
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
147
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
148
|
+
abortSignal: requestOptions?.abortSignal,
|
|
149
|
+
fetchFn: this._options?.fetch,
|
|
150
|
+
logging: this._options.logging,
|
|
151
|
+
});
|
|
152
|
+
if (_response.ok) {
|
|
153
|
+
return {
|
|
154
|
+
data: serializers.listProviders.Response.parseOrThrow(_response.body, {
|
|
155
|
+
unrecognizedObjectKeys: "passthrough",
|
|
156
|
+
allowUnrecognizedUnionMembers: true,
|
|
157
|
+
allowUnrecognizedEnumValues: true,
|
|
158
|
+
skipValidation: true,
|
|
159
|
+
breadcrumbsPrefix: ["response"],
|
|
160
|
+
}),
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
if (_response.error.reason === "status-code") {
|
|
165
|
+
switch (_response.error.statusCode) {
|
|
166
|
+
case 404:
|
|
167
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
168
|
+
default:
|
|
169
|
+
throw new errors.HydraDBError({
|
|
170
|
+
statusCode: _response.error.statusCode,
|
|
171
|
+
body: _response.error.body,
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connectors/providers");
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Unified query endpoint that dispatches across type (knowledge/memory/all) and query_by (hybrid/text). Prefer sub_tenant_ids for sub-tenant scoping; legacy sub_tenant_id is deprecated for /query and cannot be sent together with sub_tenant_ids.
|
|
68
180
|
*
|
|
69
181
|
* @param {HydraDB.SearchQueryRequest} request
|
|
70
182
|
* @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -124,13 +236,7 @@ class HydraDBClient {
|
|
|
124
236
|
breadcrumbsPrefix: ["response"],
|
|
125
237
|
}), _response.rawResponse);
|
|
126
238
|
case 404:
|
|
127
|
-
throw new HydraDB.NotFoundError(
|
|
128
|
-
unrecognizedObjectKeys: "passthrough",
|
|
129
|
-
allowUnrecognizedUnionMembers: true,
|
|
130
|
-
allowUnrecognizedEnumValues: true,
|
|
131
|
-
skipValidation: true,
|
|
132
|
-
breadcrumbsPrefix: ["response"],
|
|
133
|
-
}), _response.rawResponse);
|
|
239
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
134
240
|
case 500:
|
|
135
241
|
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
136
242
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -4,36 +4,76 @@ import type * as HydraDB from "../../index.js";
|
|
|
4
4
|
* {}
|
|
5
5
|
*/
|
|
6
6
|
export interface SearchQueryRequest {
|
|
7
|
+
/** Optional context string prepended to the query to improve retrieval relevance. */
|
|
7
8
|
additionalContext?: string;
|
|
9
|
+
/** Weighting balance between dense and sparse retrieval in hybrid mode. `"auto"` lets HydraDB choose; a number from 0 (full BM25) to 1 (full dense) sets it explicitly. */
|
|
8
10
|
alpha?: unknown;
|
|
11
|
+
/** Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated). */
|
|
12
|
+
collection?: string;
|
|
13
|
+
/** Preferred /query scope selector. Send either a list of collection IDs for equal normalized weighting, or an object mapping collection ID to a positive relative ranking weight with at most one decimal place. Do not send together with the deprecated sub_tenant_ids or sub_tenant_id. */
|
|
14
|
+
collections?: HydraDB.SearchQueryRequestCollections;
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
16
|
+
* Database is the canonical v2 name for the tenant scope. TenantID is its
|
|
17
|
+
* deprecated alias and remains fully accepted. The TenantAliases middleware
|
|
18
|
+
* reconciles the two before binding, so TenantID is always populated and the
|
|
19
|
+
* handler reads it; Database/Collection are carried only for docs/OpenAPI.
|
|
12
20
|
*/
|
|
21
|
+
database?: string;
|
|
22
|
+
/** Whether to include graph context in the response. Defaults to true for /query when omitted. */
|
|
13
23
|
graphContext?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* GraphVectorPrune switches the graph-connected-chunks lane from "fetch
|
|
26
|
+
* graph-selected chunks and let the fusion reranker sort them out" to "fetch
|
|
27
|
+
* a wider graph-selected candidate pool, then rank that pool by Milvus vector
|
|
28
|
+
* similarity, fully replacing the final chunk list." Works in either fast or
|
|
29
|
+
* thinking mode. Default false preserves existing behavior. Also gated
|
|
30
|
+
* server-side by a repo-level config flag (SearchService's
|
|
31
|
+
* graphVectorPruneEnabled) — if that flag is off, this is forced to false
|
|
32
|
+
* regardless of what the request sets, so a deployment can disable the
|
|
33
|
+
* mechanism without any client-side change.
|
|
34
|
+
*/
|
|
35
|
+
graphVectorPrune?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* GraphVectorPruneSpacyEntities: when GraphVectorPrune is also set, swaps the
|
|
38
|
+
* graph lane's entity-extraction source from the default LLM-based extractor
|
|
39
|
+
* to a local spaCy subprocess (faster, no network round trip, but a
|
|
40
|
+
* narrower/mismatched entity vocabulary versus the graph's own LLM-extracted
|
|
41
|
+
* node names). No-op if GraphVectorPrune is false (including when forced
|
|
42
|
+
* false by the server-level flag) or no spaCy extractor was configured at
|
|
43
|
+
* startup.
|
|
44
|
+
*/
|
|
45
|
+
graphVectorPruneSpacyEntities?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* IDs optionally scopes retrieval to specific source ids. The v2 wire field is
|
|
48
|
+
* `ids` (matching /context/list); empty means search the whole corpus. Applied
|
|
49
|
+
* as a Milvus `source_id in [...]` pre-filter that is preserved across the
|
|
50
|
+
* metadata zero-result retry, so a source-scoped search that matches nothing
|
|
51
|
+
* returns nothing rather than silently widening to the whole corpus.
|
|
52
|
+
*/
|
|
53
|
+
ids?: string[];
|
|
54
|
+
/** Maximum number of chunks to return. */
|
|
14
55
|
maxResults?: number;
|
|
15
|
-
metadataFilters?:
|
|
56
|
+
metadataFilters?: HydraDB.SearchMetadataFilters;
|
|
16
57
|
mode?: HydraDB.SearchRecallMode;
|
|
58
|
+
/** Number of adjacent chunks to pull alongside each matched chunk for additional context. */
|
|
17
59
|
numRelatedChunks?: number;
|
|
18
60
|
operator?: HydraDB.SearchOperator;
|
|
61
|
+
/** Natural-language search query. */
|
|
19
62
|
query?: string;
|
|
20
|
-
/**
|
|
21
|
-
* QueryApps mirrors the v2 wire field and is forwarded into the derived
|
|
22
|
-
* RecallSearchRequest only for knowledge hybrid searches.
|
|
23
|
-
*/
|
|
63
|
+
/** Whether to include app-aware knowledge retrieval. Applies to knowledge hybrid queries. */
|
|
24
64
|
queryApps?: boolean;
|
|
65
|
+
/** Retrieval method to use for the query. */
|
|
25
66
|
queryBy?: HydraDB.SearchQueryBy;
|
|
26
|
-
/**
|
|
27
|
-
* QueryForcefulRelationsPtr is the v2 wire field `query_forceful_relations`
|
|
28
|
-
* (Python QueryRequest exposes this and drops the v1 `search_forceful_relations`
|
|
29
|
-
* alias). resolveForcefulRelations writes it through to the embedded
|
|
30
|
-
* RecallSearchRequest.SearchForcefulRelations, defaulting to true when omitted.
|
|
31
|
-
*/
|
|
67
|
+
/** Whether to force relation expansion for graph-aware query retrieval. Defaults to true when omitted. */
|
|
32
68
|
queryForcefulRelations?: boolean;
|
|
69
|
+
/** Recency boost applied to ranking. 0 disables it; higher values favour more recent sources. */
|
|
33
70
|
recencyBias?: number;
|
|
34
|
-
|
|
35
|
-
source?: HydraDB.SearchSourceType;
|
|
71
|
+
/** Deprecated for /query (since 2.0.1). Use collection for a single scope or collections for multiple. Backwards-compatible and will be removed in a future version. Do not send together with a multi-scope selector. */
|
|
36
72
|
subTenantId?: string;
|
|
73
|
+
/** Deprecated for /query (since 2.0.1). Use collections instead; it accepts the same list or weighted-object shape. Backwards-compatible and will be removed in a future version. Do not send together with collections. */
|
|
74
|
+
subTenantIds?: HydraDB.SearchQueryRequestSubTenantIds;
|
|
75
|
+
/** deprecated: use database */
|
|
37
76
|
tenantId?: string;
|
|
77
|
+
/** Corpus to query: knowledge, memory, or all. */
|
|
38
78
|
type?: HydraDB.SearchSourceType;
|
|
39
79
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as HydraDB from "../index.js";
|
|
4
|
+
export declare class BadGatewayError extends errors.HydraDBError {
|
|
5
|
+
constructor(body: HydraDB.HandlerErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -34,13 +34,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
37
|
+
exports.BadGatewayError = void 0;
|
|
38
38
|
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
-
class
|
|
39
|
+
class BadGatewayError extends errors.HydraDBError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message: "
|
|
43
|
-
statusCode:
|
|
42
|
+
message: "BadGatewayError",
|
|
43
|
+
statusCode: 502,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
@@ -51,4 +51,4 @@ class TooManyRequestsError extends errors.HydraDBError {
|
|
|
51
51
|
this.name = this.constructor.name;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
exports.
|
|
54
|
+
exports.BadGatewayError = BadGatewayError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as core from "../../core/index.js";
|
|
2
2
|
import * as errors from "../../errors/index.js";
|
|
3
3
|
import type * as HydraDB from "../index.js";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class ContentTooLargeError extends errors.HydraDBError {
|
|
5
5
|
constructor(body: HydraDB.HandlerErrorResponse, rawResponse?: core.RawResponse);
|
|
6
6
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ContentTooLargeError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class ContentTooLargeError extends errors.HydraDBError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ContentTooLargeError",
|
|
43
|
+
statusCode: 413,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ContentTooLargeError = ContentTooLargeError;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type * as core from "../../core/index.js";
|
|
2
2
|
import * as errors from "../../errors/index.js";
|
|
3
|
-
import type * as HydraDB from "../index.js";
|
|
4
3
|
export declare class NotFoundError extends errors.HydraDBError {
|
|
5
|
-
constructor(body
|
|
4
|
+
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
6
5
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as HydraDB from "../index.js";
|
|
4
|
+
export declare class ServiceUnavailableError extends errors.HydraDBError {
|
|
5
|
+
constructor(body: HydraDB.HandlerErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ServiceUnavailableError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class ServiceUnavailableError extends errors.HydraDBError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ServiceUnavailableError",
|
|
43
|
+
statusCode: 503,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from "./BadGatewayError.js";
|
|
1
2
|
export * from "./BadRequestError.js";
|
|
2
3
|
export * from "./ConflictError.js";
|
|
4
|
+
export * from "./ContentTooLargeError.js";
|
|
3
5
|
export * from "./ForbiddenError.js";
|
|
4
6
|
export * from "./InternalServerError.js";
|
|
5
7
|
export * from "./NotFoundError.js";
|
|
6
|
-
export * from "./
|
|
8
|
+
export * from "./ServiceUnavailableError.js";
|
|
7
9
|
export * from "./UnprocessableEntityError.js";
|
package/dist/api/errors/index.js
CHANGED
|
@@ -14,10 +14,12 @@ 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("./BadGatewayError.js"), exports);
|
|
17
18
|
__exportStar(require("./BadRequestError.js"), exports);
|
|
18
19
|
__exportStar(require("./ConflictError.js"), exports);
|
|
20
|
+
__exportStar(require("./ContentTooLargeError.js"), exports);
|
|
19
21
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
20
22
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
21
23
|
__exportStar(require("./NotFoundError.js"), exports);
|
|
22
|
-
__exportStar(require("./
|
|
24
|
+
__exportStar(require("./ServiceUnavailableError.js"), exports);
|
|
23
25
|
__exportStar(require("./UnprocessableEntityError.js"), exports);
|