@hydradb/sdk 2.1.0 → 2.1.2
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 +22 -23
- package/dist/Client.d.ts +29 -1
- package/dist/Client.js +124 -14
- package/dist/api/client/requests/ListProvidersRequest.d.ts +10 -0
- package/dist/api/client/requests/ListProvidersRequest.js +3 -0
- package/dist/api/client/requests/SearchQueryRequest.d.ts +29 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/errors/BadGatewayError.d.ts +6 -0
- package/dist/api/errors/BadGatewayError.js +54 -0
- package/dist/api/errors/ContentTooLargeError.d.ts +6 -0
- 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/UnsupportedMediaTypeError.d.ts +6 -0
- package/dist/api/errors/UnsupportedMediaTypeError.js +54 -0
- package/dist/api/errors/index.d.ts +4 -0
- package/dist/api/errors/index.js +4 -0
- package/dist/api/resources/connectors/client/Client.d.ts +238 -0
- package/dist/api/resources/connectors/client/Client.js +1049 -0
- package/dist/api/resources/connectors/client/index.d.ts +1 -0
- package/dist/api/resources/connectors/client/index.js +17 -0
- package/dist/api/resources/connectors/client/requests/DeleteConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/DeleteConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/DeleteResourceConnectorsRequest.d.ts +13 -0
- package/dist/api/resources/connectors/client/requests/DeleteResourceConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.d.ts +14 -0
- package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/GetConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/GetConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +32 -0
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +41 -0
- package/dist/api/resources/connectors/client/requests/HandlerConnectorCreateReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +21 -0
- package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerResourceCreateReq.d.ts +34 -0
- package/dist/api/resources/connectors/client/requests/HandlerResourceCreateReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/ListConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/ListConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/ListResourcesConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/ListResourcesConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.d.ts +14 -0
- package/dist/api/resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/SyncConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/SyncConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/index.d.ts +12 -0
- package/dist/api/resources/connectors/client/requests/index.js +2 -0
- package/dist/api/resources/connectors/exports.d.ts +2 -0
- package/dist/api/resources/connectors/exports.js +21 -0
- package/dist/api/resources/connectors/index.d.ts +1 -0
- package/dist/api/resources/connectors/index.js +17 -0
- package/dist/api/resources/context/client/Client.d.ts +31 -20
- package/dist/api/resources/context/client/Client.js +113 -78
- package/dist/api/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +17 -2
- 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 +7 -1
- package/dist/api/resources/context/client/requests/RelationsContextRequest.d.ts +14 -6
- package/dist/api/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +5 -1
- package/dist/api/resources/context/client/requests/StatusContextRequest.d.ts +10 -3
- 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 +23 -5
- package/dist/api/resources/databases/client/Client.js +96 -28
- package/dist/api/resources/databases/client/requests/CollectionsDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/DeleteDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/StatsDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/StatusDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/TenantsTenantCreateRequest.d.ts +5 -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 +1 -0
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- 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 +27 -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 +5 -0
- package/dist/api/types/HandlerEnvelopeFetchV2SourceFetchResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +2 -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 +2 -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 +6 -0
- package/dist/api/types/HandlerErrorMeta.d.ts +6 -0
- package/dist/api/types/HandlerErrorMeta.js +3 -0
- package/dist/api/types/HandlerErrorResponse.d.ts +7 -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 +12 -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/ListSourceListResponse.d.ts +4 -0
- package/dist/api/types/SearchGraphContext.d.ts +3 -1
- package/dist/api/types/SearchPathTriplet.d.ts +3 -0
- package/dist/api/types/SearchScoredPathResponse.d.ts +5 -0
- package/dist/api/types/SearchSourceInfo.d.ts +10 -0
- package/dist/api/types/SearchV2Chunk.d.ts +12 -0
- package/dist/api/types/SearchV2RetrievalResult.d.ts +3 -0
- package/dist/api/types/SourcesMemoryDeleteResponse.d.ts +5 -0
- package/dist/api/types/SourcesSourceDeleteResultItem.d.ts +3 -0
- package/dist/api/types/TenantsCollectionStats.d.ts +1 -1
- package/dist/api/types/TenantsCustomPropertyDefinition.d.ts +7 -0
- package/dist/api/types/TenantsFailedTenant.d.ts +2 -0
- package/dist/api/types/TenantsInfraStatusResponseV2.d.ts +3 -0
- package/dist/api/types/TenantsInfraV2.d.ts +4 -0
- package/dist/api/types/TenantsSubTenantIdsResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantCreateAcceptedResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantDeleteResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantIdsResponse.d.ts +5 -0
- package/dist/api/types/TenantsTenantStatsResponse.d.ts +2 -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 +5 -0
- package/dist/api/types/index.js +5 -0
- package/dist/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/helpers/buildString.js +0 -6
- package/dist/serialization/client/catalog.d.ts +6 -0
- package/dist/serialization/client/catalog.js +39 -0
- 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/client/listProviders.js +39 -0
- package/dist/serialization/client/requests/SearchQueryRequest.d.ts +2 -0
- package/dist/serialization/client/requests/SearchQueryRequest.js +2 -0
- 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/connectors/client/requests/HandlerConfigureReq.js +44 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +21 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConnectorCreateReq.js +53 -0
- 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/resources/connectors/client/requests/HandlerResourceCreateReq.js +51 -0
- 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/connectors/index.d.ts +1 -0
- package/dist/serialization/resources/connectors/index.js +17 -0
- package/dist/serialization/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +4 -1
- package/dist/serialization/resources/context/client/requests/HandlerContextMetadataUpdateRequest.js +3 -0
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.d.ts +2 -1
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.js +2 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +2 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.js +2 -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/databases/client/requests/TenantsTenantCreateRequest.d.ts +1 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantCreateRequest.js +1 -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 +1 -0
- package/dist/serialization/resources/databases/client/requests/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- 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 +4 -0
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +4 -0
- package/dist/serialization/types/GraphEntity.d.ts +1 -0
- package/dist/serialization/types/GraphEntity.js +1 -0
- package/dist/serialization/types/HandlerErrorMeta.d.ts +11 -0
- package/dist/serialization/types/HandlerErrorMeta.js +43 -0
- package/dist/serialization/types/HandlerErrorResponse.d.ts +6 -0
- package/dist/serialization/types/HandlerErrorResponse.js +6 -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/HandlerResourceMapping.js +49 -0
- package/dist/serialization/types/HandlerResponseMeta.d.ts +1 -0
- package/dist/serialization/types/HandlerResponseMeta.js +1 -0
- package/dist/serialization/types/SearchGraphContext.d.ts +0 -1
- package/dist/serialization/types/SearchGraphContext.js +0 -1
- package/dist/serialization/types/TenantsCollectionStats.d.ts +0 -1
- package/dist/serialization/types/TenantsCollectionStats.js +0 -1
- package/dist/serialization/types/TenantsInfraV2.d.ts +1 -0
- package/dist/serialization/types/TenantsInfraV2.js +1 -0
- package/dist/serialization/types/index.d.ts +5 -0
- package/dist/serialization/types/index.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ engine that combines vector search, full‑text search, and a knowledge graph be
|
|
|
5
5
|
|
|
6
6
|
- **Package:** `@hydradb/sdk`
|
|
7
7
|
- **Client class:** `HydraDBClient`
|
|
8
|
-
- **Version:** `2.1.
|
|
8
|
+
- **Version:** `2.1.1` (API version `2`)
|
|
9
9
|
- **Docs:** https://docs.hydradb.com
|
|
10
10
|
- **Runtime:** Node.js 18+ (works with any `fetch`-capable runtime)
|
|
11
11
|
|
|
@@ -243,9 +243,9 @@ import { createReadStream } from "fs";
|
|
|
243
243
|
|
|
244
244
|
// Ingest a document file
|
|
245
245
|
const res = await client.context.ingest({
|
|
246
|
-
|
|
246
|
+
database: "acme-corp", // required
|
|
247
247
|
documents: createReadStream("handbook.pdf"),
|
|
248
|
-
|
|
248
|
+
collection: "hr",
|
|
249
249
|
type: "knowledge",
|
|
250
250
|
// documentMetadata is a JSON *array* — one object per uploaded file.
|
|
251
251
|
documentMetadata: JSON.stringify([{ title: "Employee Handbook", author: "HR" }]),
|
|
@@ -256,7 +256,7 @@ console.log(res.data);
|
|
|
256
256
|
|
|
257
257
|
// Ingest memories (no file). Each item needs "text" (or "user_assistant_pairs").
|
|
258
258
|
await client.context.ingest({
|
|
259
|
-
|
|
259
|
+
database: "acme-corp",
|
|
260
260
|
memories: JSON.stringify([{ text: "User prefers dark mode" }]),
|
|
261
261
|
type: "memory",
|
|
262
262
|
});
|
|
@@ -264,13 +264,13 @@ await client.context.ingest({
|
|
|
264
264
|
|
|
265
265
|
| Field | Type | Notes |
|
|
266
266
|
| ------------------ | ------------------------ | ----- |
|
|
267
|
-
| `
|
|
267
|
+
| `database` | `string` (required) | Database (tenant scope). Alias: `tenantId`. |
|
|
268
268
|
| `documents` | `Uploadable` | File upload (stream, `Blob`, `Buffer`, etc.). |
|
|
269
269
|
| `memories` | `string` | JSON **array** string; each item needs `text` (or `user_assistant_pairs`). |
|
|
270
270
|
| `documentMetadata` | `string` | JSON **array** string of per‑document metadata — one object per uploaded file (count must match). |
|
|
271
|
-
| `appKnowledge` | `string` | App‑knowledge
|
|
271
|
+
| `appKnowledge` | `string` | App‑knowledge items as a JSON **array** string (not raw text). |
|
|
272
272
|
| `graphPayload` | `string` | Pre‑computed graph payload. |
|
|
273
|
-
| `
|
|
273
|
+
| `collection` | `string` | Collection (sub‑tenant scope). Alias: `subTenantId`. |
|
|
274
274
|
| `type` | `string` | `"knowledge"` or `"memory"`. |
|
|
275
275
|
| `upsert` | `string` | `"true"` to upsert on existing IDs. |
|
|
276
276
|
|
|
@@ -295,7 +295,7 @@ const res = await client.context.list({
|
|
|
295
295
|
},
|
|
296
296
|
});
|
|
297
297
|
|
|
298
|
-
for (const source of res.data
|
|
298
|
+
for (const source of res.data?.inner?.sources ?? []) {
|
|
299
299
|
console.log(source);
|
|
300
300
|
}
|
|
301
301
|
```
|
|
@@ -309,8 +309,8 @@ Fetch a single ingested source: its content, inferred content, and a presigned d
|
|
|
309
309
|
```typescript
|
|
310
310
|
const res = await client.context.inspect({
|
|
311
311
|
id: "doc_1234", // required — source ID
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
database: "acme-corp", // required
|
|
313
|
+
collection: "hr",
|
|
314
314
|
expirySeconds: 3600, // presigned URL lifetime
|
|
315
315
|
mode: "both", // fetch mode: "content", "url", or "both"
|
|
316
316
|
});
|
|
@@ -325,11 +325,11 @@ Check processing status for one or more source IDs.
|
|
|
325
325
|
|
|
326
326
|
```typescript
|
|
327
327
|
// Single source
|
|
328
|
-
await client.context.status({
|
|
328
|
+
await client.context.status({ database: "acme-corp", id: "doc_1234", collection: "hr" });
|
|
329
329
|
|
|
330
330
|
// Batch
|
|
331
331
|
const res = await client.context.status({
|
|
332
|
-
|
|
332
|
+
database: "acme-corp",
|
|
333
333
|
ids: ["doc_1", "doc_2", "doc_3"],
|
|
334
334
|
});
|
|
335
335
|
console.log(res.data);
|
|
@@ -343,8 +343,8 @@ Return knowledge‑graph relations for a whole database or a single source.
|
|
|
343
343
|
|
|
344
344
|
```typescript
|
|
345
345
|
const res = await client.context.relations({
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
database: "acme-corp", // required
|
|
347
|
+
collection: "hr",
|
|
348
348
|
id: "doc_1234", // omit for database-wide relations
|
|
349
349
|
type: "knowledge", // "knowledge" | "memory"
|
|
350
350
|
limit: 100,
|
|
@@ -355,16 +355,16 @@ console.log(res.data);
|
|
|
355
355
|
|
|
356
356
|
#### `context.updateSourceMetadata`
|
|
357
357
|
|
|
358
|
-
`PATCH /context/
|
|
358
|
+
`PATCH /context/{id}/metadata` → `HandlerEnvelope…MetadataEditResult`
|
|
359
359
|
|
|
360
|
-
Merge/upsert `tenantMetadata` and `additionalMetadata` for one source. `
|
|
361
|
-
required by the server.
|
|
360
|
+
Merge/upsert `tenantMetadata` and `additionalMetadata` for one source. `collection`
|
|
361
|
+
(alias `subTenantId`) is required by the server.
|
|
362
362
|
|
|
363
363
|
```typescript
|
|
364
364
|
const res = await client.context.updateSourceMetadata({
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
365
|
+
id: "doc_1234", // required — source ID (path param)
|
|
366
|
+
database: "acme-corp",
|
|
367
|
+
collection: "hr", // required by the server
|
|
368
368
|
// tenantMetadata keys must be declared in the database's tenant_metadata_schema
|
|
369
369
|
// (and match the declared type). Use additionalMetadata for free-form fields.
|
|
370
370
|
tenantMetadata: { department: "finance" },
|
|
@@ -409,8 +409,7 @@ Create a new database, optionally with a custom metadata schema for its collecti
|
|
|
409
409
|
const res = await client.databases.create({
|
|
410
410
|
database: "acme-corp",
|
|
411
411
|
embeddingsDimension: 1536,
|
|
412
|
-
|
|
413
|
-
tenantMetadataSchema: [
|
|
412
|
+
databaseMetadataSchema: [
|
|
414
413
|
{
|
|
415
414
|
name: "department",
|
|
416
415
|
dataType: "VARCHAR", // BOOL | INT8..INT64 | FLOAT | DOUBLE | VARCHAR | JSON | ARRAY
|
|
@@ -668,7 +667,7 @@ const client = new HydraDBClient({
|
|
|
668
667
|
| context | `inspect` | `GET /context/inspect` | Fetch a source’s content + presigned URL. |
|
|
669
668
|
| context | `status` | `GET /context/status` | Processing status for one or many source IDs. |
|
|
670
669
|
| context | `relations` | `GET /context/relations` | KG relations for a database or source. |
|
|
671
|
-
| context | `updateSourceMetadata` | `PATCH /context/
|
|
670
|
+
| context | `updateSourceMetadata` | `PATCH /context/{id}/metadata` | Merge/upsert metadata for a source. |
|
|
672
671
|
| context | `delete` | `DELETE /context` | Delete sources/memories by ID. |
|
|
673
672
|
| databases | `create` | `POST /databases` | Create a database with optional schema. |
|
|
674
673
|
| databases | `list` | `GET /databases` | List all databases. |
|
package/dist/Client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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
4
|
import { DatabasesClient } from "./api/resources/databases/client/Client.js";
|
|
4
5
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
@@ -12,13 +13,40 @@ export declare namespace HydraDBClient {
|
|
|
12
13
|
}
|
|
13
14
|
export declare class HydraDBClient {
|
|
14
15
|
protected readonly _options: NormalizedClientOptionsWithAuth<HydraDBClient.Options>;
|
|
16
|
+
protected _connectors: ConnectorsClient | undefined;
|
|
15
17
|
protected _context: ContextClient | undefined;
|
|
16
18
|
protected _databases: DatabasesClient | undefined;
|
|
17
19
|
protected _webhooks: WebhooksClient | undefined;
|
|
18
|
-
constructor(options
|
|
20
|
+
constructor(options?: HydraDBClient.Options);
|
|
21
|
+
get connectors(): ConnectorsClient;
|
|
19
22
|
get context(): ContextClient;
|
|
20
23
|
get databases(): DatabasesClient;
|
|
21
24
|
get webhooks(): WebhooksClient;
|
|
25
|
+
/**
|
|
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), the credential_schema for connecting it, and setup_guide (present for providers whose configuration goes beyond the credential schema — e.g. bigquery's per-table cursor/change-history settings and the one-time ALTER statement they may require).
|
|
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;
|
|
22
50
|
/**
|
|
23
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.
|
|
24
52
|
*
|
package/dist/Client.js
CHANGED
|
@@ -36,9 +36,10 @@ 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
|
+
const Client_js_4 = require("./api/resources/webhooks/client/Client.js");
|
|
42
43
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
43
44
|
const headers_js_1 = require("./core/headers.js");
|
|
44
45
|
const core = __importStar(require("./core/index.js"));
|
|
@@ -47,17 +48,132 @@ const handleNonStatusCodeError_js_1 = require("./errors/handleNonStatusCodeError
|
|
|
47
48
|
const errors = __importStar(require("./errors/index.js"));
|
|
48
49
|
const serializers = __importStar(require("./serialization/index.js"));
|
|
49
50
|
class HydraDBClient {
|
|
50
|
-
constructor(options) {
|
|
51
|
+
constructor(options = {}) {
|
|
51
52
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
52
53
|
}
|
|
54
|
+
get connectors() {
|
|
55
|
+
return (this._connectors ?? (this._connectors = new Client_js_1.ConnectorsClient(this._options)));
|
|
56
|
+
}
|
|
53
57
|
get context() {
|
|
54
|
-
return (this._context ?? (this._context = new
|
|
58
|
+
return (this._context ?? (this._context = new Client_js_2.ContextClient(this._options)));
|
|
55
59
|
}
|
|
56
60
|
get databases() {
|
|
57
|
-
return (this._databases ?? (this._databases = new
|
|
61
|
+
return (this._databases ?? (this._databases = new Client_js_3.DatabasesClient(this._options)));
|
|
58
62
|
}
|
|
59
63
|
get webhooks() {
|
|
60
|
-
return (this._webhooks ?? (this._webhooks = new
|
|
64
|
+
return (this._webhooks ?? (this._webhooks = new Client_js_4.WebhooksClient(this._options)));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
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), the credential_schema for connecting it, and setup_guide (present for providers whose configuration goes beyond the credential schema — e.g. bigquery's per-table cursor/change-history settings and the one-time ALTER statement they may require).
|
|
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");
|
|
61
177
|
}
|
|
62
178
|
/**
|
|
63
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.
|
|
@@ -120,13 +236,7 @@ class HydraDBClient {
|
|
|
120
236
|
breadcrumbsPrefix: ["response"],
|
|
121
237
|
}), _response.rawResponse);
|
|
122
238
|
case 404:
|
|
123
|
-
throw new HydraDB.NotFoundError(
|
|
124
|
-
unrecognizedObjectKeys: "passthrough",
|
|
125
|
-
allowUnrecognizedUnionMembers: true,
|
|
126
|
-
allowUnrecognizedEnumValues: true,
|
|
127
|
-
skipValidation: true,
|
|
128
|
-
breadcrumbsPrefix: ["response"],
|
|
129
|
-
}), _response.rawResponse);
|
|
239
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
130
240
|
case 500:
|
|
131
241
|
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
132
242
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -4,8 +4,11 @@ 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). */
|
|
9
12
|
collection?: string;
|
|
10
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. */
|
|
11
14
|
collections?: HydraDB.SearchQueryRequestCollections;
|
|
@@ -18,6 +21,28 @@ export interface SearchQueryRequest {
|
|
|
18
21
|
database?: string;
|
|
19
22
|
/** Whether to include graph context in the response. Defaults to true for /query when omitted. */
|
|
20
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;
|
|
21
46
|
/**
|
|
22
47
|
* IDs optionally scopes retrieval to specific source ids. The v2 wire field is
|
|
23
48
|
* `ids` (matching /context/list); empty means search the whole corpus. Applied
|
|
@@ -26,11 +51,14 @@ export interface SearchQueryRequest {
|
|
|
26
51
|
* returns nothing rather than silently widening to the whole corpus.
|
|
27
52
|
*/
|
|
28
53
|
ids?: string[];
|
|
54
|
+
/** Maximum number of chunks to return. */
|
|
29
55
|
maxResults?: number;
|
|
30
56
|
metadataFilters?: HydraDB.SearchMetadataFilters;
|
|
31
57
|
mode?: HydraDB.SearchRecallMode;
|
|
58
|
+
/** Number of adjacent chunks to pull alongside each matched chunk for additional context. */
|
|
32
59
|
numRelatedChunks?: number;
|
|
33
60
|
operator?: HydraDB.SearchOperator;
|
|
61
|
+
/** Natural-language search query. */
|
|
34
62
|
query?: string;
|
|
35
63
|
/** Whether to include app-aware knowledge retrieval. Applies to knowledge hybrid queries. */
|
|
36
64
|
queryApps?: boolean;
|
|
@@ -38,6 +66,7 @@ export interface SearchQueryRequest {
|
|
|
38
66
|
queryBy?: HydraDB.SearchQueryBy;
|
|
39
67
|
/** Whether to force relation expansion for graph-aware query retrieval. Defaults to true when omitted. */
|
|
40
68
|
queryForcefulRelations?: boolean;
|
|
69
|
+
/** Recency boost applied to ranking. 0 disables it; higher values favour more recent sources. */
|
|
41
70
|
recencyBias?: number;
|
|
42
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. */
|
|
43
72
|
subTenantId?: string;
|
|
@@ -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
|
+
}
|
|
@@ -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.BadGatewayError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class BadGatewayError extends errors.HydraDBError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "BadGatewayError",
|
|
43
|
+
statusCode: 502,
|
|
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.BadGatewayError = BadGatewayError;
|
|
@@ -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 ContentTooLargeError 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.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;
|
|
@@ -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 UnsupportedMediaTypeError extends errors.HydraDBError {
|
|
5
|
+
constructor(body: HydraDB.HandlerErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|