@hydradb/sdk 2.1.1 → 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.
Files changed (42) hide show
  1. package/dist/Client.d.ts +1 -1
  2. package/dist/Client.js +1 -1
  3. package/dist/api/errors/UnsupportedMediaTypeError.d.ts +6 -0
  4. package/dist/api/errors/UnsupportedMediaTypeError.js +54 -0
  5. package/dist/api/errors/index.d.ts +1 -0
  6. package/dist/api/errors/index.js +1 -0
  7. package/dist/api/resources/connectors/client/Client.d.ts +3 -5
  8. package/dist/api/resources/connectors/client/Client.js +24 -9
  9. package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.d.ts +4 -0
  10. package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +1 -3
  11. package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +4 -0
  12. package/dist/api/resources/context/client/Client.d.ts +1 -0
  13. package/dist/api/resources/context/client/Client.js +9 -0
  14. package/dist/api/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +17 -3
  15. package/dist/api/types/HandlerErrorMeta.d.ts +6 -0
  16. package/dist/api/types/HandlerErrorMeta.js +3 -0
  17. package/dist/api/types/HandlerErrorResponse.d.ts +6 -0
  18. package/dist/api/types/HandlerResponseMeta.d.ts +7 -0
  19. package/dist/api/types/SearchGraphContext.d.ts +0 -2
  20. package/dist/api/types/TenantsCollectionStats.d.ts +0 -2
  21. package/dist/api/types/TenantsInfraV2.d.ts +2 -0
  22. package/dist/api/types/index.d.ts +1 -0
  23. package/dist/api/types/index.js +1 -0
  24. package/dist/helpers/buildString.js +0 -6
  25. package/dist/serialization/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +1 -1
  26. package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +3 -0
  27. package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +3 -0
  28. package/dist/serialization/types/HandlerErrorMeta.d.ts +11 -0
  29. package/dist/serialization/types/HandlerErrorMeta.js +43 -0
  30. package/dist/serialization/types/HandlerErrorResponse.d.ts +6 -0
  31. package/dist/serialization/types/HandlerErrorResponse.js +6 -0
  32. package/dist/serialization/types/HandlerResponseMeta.d.ts +1 -0
  33. package/dist/serialization/types/HandlerResponseMeta.js +1 -0
  34. package/dist/serialization/types/SearchGraphContext.d.ts +0 -1
  35. package/dist/serialization/types/SearchGraphContext.js +0 -1
  36. package/dist/serialization/types/TenantsCollectionStats.d.ts +0 -1
  37. package/dist/serialization/types/TenantsCollectionStats.js +0 -1
  38. package/dist/serialization/types/TenantsInfraV2.d.ts +1 -0
  39. package/dist/serialization/types/TenantsInfraV2.js +1 -0
  40. package/dist/serialization/types/index.d.ts +1 -0
  41. package/dist/serialization/types/index.js +1 -0
  42. package/package.json +1 -1
package/dist/Client.d.ts CHANGED
@@ -33,7 +33,7 @@ export declare class HydraDBClient {
33
33
  catalog(requestOptions?: HydraDBClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
34
34
  private __catalog;
35
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.
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
37
  *
38
38
  * @param {HydraDB.ListProvidersRequest} request
39
39
  * @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
package/dist/Client.js CHANGED
@@ -111,7 +111,7 @@ class HydraDBClient {
111
111
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connector-catalog");
112
112
  }
113
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.
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
115
  *
116
116
  * @param {HydraDB.ListProvidersRequest} request
117
117
  * @param {HydraDBClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -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
+ }
@@ -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.UnsupportedMediaTypeError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class UnsupportedMediaTypeError extends errors.HydraDBError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "UnsupportedMediaTypeError",
43
+ statusCode: 415,
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.UnsupportedMediaTypeError = UnsupportedMediaTypeError;
@@ -7,3 +7,4 @@ export * from "./InternalServerError.js";
7
7
  export * from "./NotFoundError.js";
8
8
  export * from "./ServiceUnavailableError.js";
9
9
  export * from "./UnprocessableEntityError.js";
10
+ export * from "./UnsupportedMediaTypeError.js";
@@ -23,3 +23,4 @@ __exportStar(require("./InternalServerError.js"), exports);
23
23
  __exportStar(require("./NotFoundError.js"), exports);
24
24
  __exportStar(require("./ServiceUnavailableError.js"), exports);
25
25
  __exportStar(require("./UnprocessableEntityError.js"), exports);
26
+ __exportStar(require("./UnsupportedMediaTypeError.js"), exports);
@@ -11,7 +11,7 @@ export declare class ConnectorsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ConnectorsClient.Options>;
12
12
  constructor(options?: ConnectorsClient.Options);
13
13
  /**
14
- * List a provider's resources directly from supplied credentials, before creating a connector.
14
+ * List a provider's resources directly from supplied credentials, before creating a connector. Passing cursor or limit opts into pagination (currently Notion only): the response then adds next_cursor and has_more, a page may hold fewer than limit resources, and clients must continue while has_more is true. Without either param the full resource list is returned.
15
15
  *
16
16
  * @param {HydraDB.HandlerDiscoverPreviewReq} request
17
17
  * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -119,9 +119,7 @@ export declare class ConnectorsClient {
119
119
  * },
120
120
  * name: "general",
121
121
  * resourceId: "C0123456789",
122
- * resourceType: "channel",
123
- * subTenantId: "sub_tenant_4567",
124
- * tenantId: "tenant_1234"
122
+ * resourceType: "channel"
125
123
  * }]
126
124
  * })
127
125
  */
@@ -150,7 +148,7 @@ export declare class ConnectorsClient {
150
148
  rotateAConnectorsStoredOAuthRefreshToken(request: HydraDB.PatchConnectorsIdCredentialsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
151
149
  private __rotateAConnectorsStoredOAuthRefreshToken;
152
150
  /**
153
- * List a connected provider's resources using the connector's stored credentials.
151
+ * List a connected provider's resources using the connector's stored credentials. Passing cursor or limit opts into pagination (currently Notion only): the response then adds next_cursor and has_more, a page may hold fewer than limit resources, and clients must continue while has_more is true. Without either param the full resource list is returned.
154
152
  *
155
153
  * @param {HydraDB.DiscoverConnectorsRequest} request
156
154
  * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -48,7 +48,7 @@ class ConnectorsClient {
48
48
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
49
49
  }
50
50
  /**
51
- * List a provider's resources directly from supplied credentials, before creating a connector.
51
+ * List a provider's resources directly from supplied credentials, before creating a connector. Passing cursor or limit opts into pagination (currently Notion only): the response then adds next_cursor and has_more, a page may hold fewer than limit resources, and clients must continue while has_more is true. Without either param the full resource list is returned.
52
52
  *
53
53
  * @param {HydraDB.HandlerDiscoverPreviewReq} request
54
54
  * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -68,6 +68,11 @@ class ConnectorsClient {
68
68
  return core.HttpResponsePromise.fromPromise(this.__discoverPreview(request, requestOptions));
69
69
  }
70
70
  async __discoverPreview(request, requestOptions) {
71
+ const { cursor, limit, ..._body } = request;
72
+ const _queryParams = {
73
+ cursor,
74
+ limit,
75
+ };
71
76
  const _authRequest = await this._options.authProvider.getAuthRequest();
72
77
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
73
78
  const _response = await core.fetcher({
@@ -77,9 +82,13 @@ class ConnectorsClient {
77
82
  method: "POST",
78
83
  headers: _headers,
79
84
  contentType: "application/json",
80
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
85
+ queryString: core.url
86
+ .queryBuilder()
87
+ .addMany(_queryParams)
88
+ .mergeAdditional(requestOptions?.queryParams)
89
+ .build(),
81
90
  requestType: "json",
82
- body: serializers.HandlerDiscoverPreviewReq.jsonOrThrow(request, {
91
+ body: serializers.HandlerDiscoverPreviewReq.jsonOrThrow(_body, {
83
92
  unrecognizedObjectKeys: "strip",
84
93
  omitUndefined: true,
85
94
  }),
@@ -451,9 +460,7 @@ class ConnectorsClient {
451
460
  * },
452
461
  * name: "general",
453
462
  * resourceId: "C0123456789",
454
- * resourceType: "channel",
455
- * subTenantId: "sub_tenant_4567",
456
- * tenantId: "tenant_1234"
463
+ * resourceType: "channel"
457
464
  * }]
458
465
  * })
459
466
  */
@@ -629,7 +636,7 @@ class ConnectorsClient {
629
636
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/connectors/{id}/credentials");
630
637
  }
631
638
  /**
632
- * List a connected provider's resources using the connector's stored credentials.
639
+ * List a connected provider's resources using the connector's stored credentials. Passing cursor or limit opts into pagination (currently Notion only): the response then adds next_cursor and has_more, a page may hold fewer than limit resources, and clients must continue while has_more is true. Without either param the full resource list is returned.
633
640
  *
634
641
  * @param {HydraDB.DiscoverConnectorsRequest} request
635
642
  * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -648,7 +655,11 @@ class ConnectorsClient {
648
655
  return core.HttpResponsePromise.fromPromise(this.__discover(request, requestOptions));
649
656
  }
650
657
  async __discover(request, requestOptions) {
651
- const { id } = request;
658
+ const { id, cursor, limit } = request;
659
+ const _queryParams = {
660
+ cursor,
661
+ limit,
662
+ };
652
663
  const _authRequest = await this._options.authProvider.getAuthRequest();
653
664
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
654
665
  const _response = await core.fetcher({
@@ -657,7 +668,11 @@ class ConnectorsClient {
657
668
  environments.HydraDBEnvironment.Default, `connectors/${core.url.encodePathParam(id)}/discover`),
658
669
  method: "GET",
659
670
  headers: _headers,
660
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
671
+ queryString: core.url
672
+ .queryBuilder()
673
+ .addMany(_queryParams)
674
+ .mergeAdditional(requestOptions?.queryParams)
675
+ .build(),
661
676
  timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
662
677
  maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
663
678
  abortSignal: requestOptions?.abortSignal,
@@ -7,4 +7,8 @@
7
7
  export interface DiscoverConnectorsRequest {
8
8
  /** Connector ID */
9
9
  id: string;
10
+ /** Opaque pagination cursor from a previous response's next_cursor */
11
+ cursor?: string;
12
+ /** Max resources per page, 1-100 (values above 100 are clamped) */
13
+ limit?: number;
10
14
  }
@@ -16,9 +16,7 @@ import type * as HydraDB from "../../../../index.js";
16
16
  * },
17
17
  * name: "general",
18
18
  * resourceId: "C0123456789",
19
- * resourceType: "channel",
20
- * subTenantId: "sub_tenant_4567",
21
- * tenantId: "tenant_1234"
19
+ * resourceType: "channel"
22
20
  * }]
23
21
  * }
24
22
  */
@@ -8,6 +8,10 @@
8
8
  * }
9
9
  */
10
10
  export interface HandlerDiscoverPreviewReq {
11
+ /** Opaque pagination cursor from a previous response's next_cursor */
12
+ cursor?: string;
13
+ /** Max resources per page, 1-100 (values above 100 are clamped) */
14
+ limit?: number;
11
15
  /** Authentication method for the provider connection (e.g. `api_token`, `oauth`). */
12
16
  authType?: string;
13
17
  /** Provider-specific credentials (typically `{"api_token": "..."}` or `{"access_token": "..."}`). */
@@ -31,6 +31,7 @@ export declare class ContextClient {
31
31
  *
32
32
  * @throws {@link HydraDB.BadRequestError}
33
33
  * @throws {@link HydraDB.ContentTooLargeError}
34
+ * @throws {@link HydraDB.UnsupportedMediaTypeError}
34
35
  * @throws {@link HydraDB.UnprocessableEntityError}
35
36
  *
36
37
  * @example
@@ -123,6 +123,7 @@ class ContextClient {
123
123
  *
124
124
  * @throws {@link HydraDB.BadRequestError}
125
125
  * @throws {@link HydraDB.ContentTooLargeError}
126
+ * @throws {@link HydraDB.UnsupportedMediaTypeError}
126
127
  * @throws {@link HydraDB.UnprocessableEntityError}
127
128
  *
128
129
  * @example
@@ -222,6 +223,14 @@ class ContextClient {
222
223
  skipValidation: true,
223
224
  breadcrumbsPrefix: ["response"],
224
225
  }), _response.rawResponse);
226
+ case 415:
227
+ throw new HydraDB.UnsupportedMediaTypeError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
228
+ unrecognizedObjectKeys: "passthrough",
229
+ allowUnrecognizedUnionMembers: true,
230
+ allowUnrecognizedEnumValues: true,
231
+ skipValidation: true,
232
+ breadcrumbsPrefix: ["response"],
233
+ }), _response.rawResponse);
225
234
  case 422:
226
235
  throw new HydraDB.UnprocessableEntityError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
227
236
  unrecognizedObjectKeys: "passthrough",
@@ -9,11 +9,14 @@ export interface GithubComHydradbHydradbApplicationInternalServiceMetadataEditRe
9
9
  databaseMetadataKeys?: string[];
10
10
  /** Unique identifier for this resource. */
11
11
  id?: string;
12
- /** Number of chunk rows synced to Milvus when sync was required. */
12
+ /** deprecated: use vector_rows_synced */
13
13
  milvusRowsSynced?: number;
14
- /** Whether at least one changed database metadata field has dense or sparse embedding enabled. */
14
+ /**
15
+ * Deprecated: use vector_sync_required / vector_synced / vector_rows_synced.
16
+ * Retained as additive aliases for existing clients; carry the same values.
17
+ */
15
18
  milvusSyncRequired?: boolean;
16
- /** Whether the Milvus metadata sync completed. Present when sync was required. */
19
+ /** deprecated: use vector_synced */
17
20
  milvusSynced?: boolean;
18
21
  /** Collection that contained the source. */
19
22
  subTenantId?: string;
@@ -23,4 +26,15 @@ export interface GithubComHydradbHydradbApplicationInternalServiceMetadataEditRe
23
26
  tenantMetadataKeys?: string[];
24
27
  /** Whether the source metadata was updated. */
25
28
  updated?: boolean;
29
+ /** Number of chunk rows synced to the vector store when sync was required. */
30
+ vectorRowsSynced?: number;
31
+ /**
32
+ * Vendor-neutral vector-sync signal (PRO-1185): the canonical field must not
33
+ * name the vector store. The milvus_* fields below are deprecated aliases kept
34
+ * for backward compatibility (additive change, not a rename) and carry the same
35
+ * values; they are slated for removal in a future major version.
36
+ */
37
+ vectorSyncRequired?: boolean;
38
+ /** Whether the vector store metadata sync completed. Present when sync was required. */
39
+ vectorSynced?: boolean;
26
40
  }
@@ -0,0 +1,6 @@
1
+ export interface HandlerErrorMeta {
2
+ apiVersion?: string;
3
+ latencyMs?: number;
4
+ /** Unique identifier for this request, useful for support and tracing. */
5
+ requestId?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,11 @@
1
1
  import type * as HydraDB from "../index.js";
2
2
  export interface HandlerErrorResponse {
3
+ data?: unknown;
3
4
  /** Structured error detail with code, message, and deprecation hints. */
4
5
  detail?: HydraDB.HandlerErrorDetail;
6
+ /** Error message, empty string on success. */
7
+ error?: HydraDB.HandlerApiError;
8
+ meta?: HydraDB.HandlerErrorMeta;
9
+ /** Whether the request succeeded. */
10
+ success?: boolean;
5
11
  }
@@ -1,5 +1,12 @@
1
1
  import type * as HydraDB from "../index.js";
2
2
  export interface HandlerResponseMeta {
3
+ /**
4
+ * APIVersion echoes the version of the API that served the request (PRO-1209),
5
+ * sourced from reqmeta.APIVersion — the same value carried by OpenAPI
6
+ * info.version and /health — so a client always knows which API version
7
+ * produced a response. Always present (no omitempty).
8
+ */
9
+ apiVersion?: string;
3
10
  /** Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated). */
4
11
  collection?: string;
5
12
  /** Owning database. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated). */
@@ -11,6 +11,4 @@ export interface SearchGraphContext {
11
11
  chunkRelations?: HydraDB.SearchScoredPathResponse[];
12
12
  /** Scored relation paths ranked by relevance to the query. */
13
13
  queryPaths?: HydraDB.SearchScoredPathResponse[];
14
- /** LLM-synthesized summary of the most relevant graph entities and relationships. */
15
- synthesisContext?: string;
16
14
  }
@@ -1,6 +1,4 @@
1
1
  export interface TenantsCollectionStats {
2
- /** Embedding vector dimension for this collection. */
3
- dimensions?: number;
4
2
  /** Total number of indexed rows in this collection. */
5
3
  rowCount?: number;
6
4
  }
@@ -2,6 +2,8 @@ import type * as HydraDB from "../index.js";
2
2
  export interface TenantsInfraV2 {
3
3
  /** Whether the graph store is healthy for this database. */
4
4
  graphStatus?: boolean;
5
+ /** Derived readiness flag: true only when scheduler_status, graph_status, and both vectorstore_status.knowledge and vectorstore_status.memories are true — i.e. the database is fully provisioned and ready to accept ingestion and serve queries. Database creation is asynchronous, so poll GET /databases/status until this is true before ingesting or querying. */
6
+ readyForIngestion?: boolean;
5
7
  /** Whether the sync scheduler is healthy for this database. */
6
8
  schedulerStatus?: boolean;
7
9
  vectorstoreStatus?: HydraDB.TenantsVectorstoreStatusV2;
@@ -31,6 +31,7 @@ export * from "./HandlerEnvelopeWebhooksWebhookGetResponse.js";
31
31
  export * from "./HandlerEnvelopeWebhooksWebhookRegisterResponse.js";
32
32
  export * from "./HandlerEnvelopeWebhooksWebhookTestResponse.js";
33
33
  export * from "./HandlerErrorDetail.js";
34
+ export * from "./HandlerErrorMeta.js";
34
35
  export * from "./HandlerErrorResponse.js";
35
36
  export * from "./HandlerMetadataSchemaUpdateResponse.js";
36
37
  export * from "./HandlerResourceMapping.js";
@@ -47,6 +47,7 @@ __exportStar(require("./HandlerEnvelopeWebhooksWebhookGetResponse.js"), exports)
47
47
  __exportStar(require("./HandlerEnvelopeWebhooksWebhookRegisterResponse.js"), exports);
48
48
  __exportStar(require("./HandlerEnvelopeWebhooksWebhookTestResponse.js"), exports);
49
49
  __exportStar(require("./HandlerErrorDetail.js"), exports);
50
+ __exportStar(require("./HandlerErrorMeta.js"), exports);
50
51
  __exportStar(require("./HandlerErrorResponse.js"), exports);
51
52
  __exportStar(require("./HandlerMetadataSchemaUpdateResponse.js"), exports);
52
53
  __exportStar(require("./HandlerResourceMapping.js"), exports);
@@ -192,12 +192,6 @@ function buildString(result) {
192
192
  const queryPathsStr = formatQueryPaths(data.graphContext);
193
193
  if (queryPathsStr)
194
194
  sections.push(queryPathsStr);
195
- // Synthesis renders independently of queryPaths so it isn't lost when only
196
- // chunkRelations are present.
197
- const synthesis = data.graphContext?.synthesisContext;
198
- if (synthesis) {
199
- sections.push(`Synthesis: ${synthesis.trim()}`);
200
- }
201
195
  return sections.length > 0
202
196
  ? sections.join("\n\n")
203
197
  : "No relevant context found.";
@@ -1,7 +1,7 @@
1
1
  import type * as HydraDB from "../../../../../api/index.js";
2
2
  import * as core from "../../../../../core/index.js";
3
3
  import type * as serializers from "../../../../index.js";
4
- export declare const HandlerDiscoverPreviewReq: core.serialization.Schema<serializers.HandlerDiscoverPreviewReq.Raw, HydraDB.HandlerDiscoverPreviewReq>;
4
+ export declare const HandlerDiscoverPreviewReq: core.serialization.Schema<serializers.HandlerDiscoverPreviewReq.Raw, Omit<HydraDB.HandlerDiscoverPreviewReq, "cursor" | "limit">>;
5
5
  export declare namespace HandlerDiscoverPreviewReq {
6
6
  interface Raw {
7
7
  auth_type?: string | null;
@@ -16,5 +16,8 @@ export declare namespace GithubComHydradbHydradbApplicationInternalServiceMetada
16
16
  tenant_id?: string | null;
17
17
  tenant_metadata_keys?: string[] | null;
18
18
  updated?: boolean | null;
19
+ vector_rows_synced?: number | null;
20
+ vector_sync_required?: boolean | null;
21
+ vector_synced?: boolean | null;
19
22
  }
20
23
  }
@@ -49,4 +49,7 @@ exports.GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult = co
49
49
  tenantId: core.serialization.property("tenant_id", core.serialization.string().optional()),
50
50
  tenantMetadataKeys: core.serialization.property("tenant_metadata_keys", core.serialization.list(core.serialization.string()).optional()),
51
51
  updated: core.serialization.boolean().optional(),
52
+ vectorRowsSynced: core.serialization.property("vector_rows_synced", core.serialization.number().optional()),
53
+ vectorSyncRequired: core.serialization.property("vector_sync_required", core.serialization.boolean().optional()),
54
+ vectorSynced: core.serialization.property("vector_synced", core.serialization.boolean().optional()),
52
55
  });
@@ -0,0 +1,11 @@
1
+ import type * as HydraDB from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const HandlerErrorMeta: core.serialization.ObjectSchema<serializers.HandlerErrorMeta.Raw, HydraDB.HandlerErrorMeta>;
5
+ export declare namespace HandlerErrorMeta {
6
+ interface Raw {
7
+ api_version?: string | null;
8
+ latency_ms?: number | null;
9
+ request_id?: string | null;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
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.HandlerErrorMeta = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.HandlerErrorMeta = core.serialization.object({
40
+ apiVersion: core.serialization.property("api_version", core.serialization.string().optional()),
41
+ latencyMs: core.serialization.property("latency_ms", core.serialization.number().optional()),
42
+ requestId: core.serialization.property("request_id", core.serialization.string().optional()),
43
+ });
@@ -1,10 +1,16 @@
1
1
  import type * as HydraDB from "../../api/index.js";
2
2
  import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
+ import { HandlerApiError } from "./HandlerApiError.js";
4
5
  import { HandlerErrorDetail } from "./HandlerErrorDetail.js";
6
+ import { HandlerErrorMeta } from "./HandlerErrorMeta.js";
5
7
  export declare const HandlerErrorResponse: core.serialization.ObjectSchema<serializers.HandlerErrorResponse.Raw, HydraDB.HandlerErrorResponse>;
6
8
  export declare namespace HandlerErrorResponse {
7
9
  interface Raw {
10
+ data?: unknown | null;
8
11
  detail?: HandlerErrorDetail.Raw | null;
12
+ error?: HandlerApiError.Raw | null;
13
+ meta?: HandlerErrorMeta.Raw | null;
14
+ success?: boolean | null;
9
15
  }
10
16
  }
@@ -36,7 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.HandlerErrorResponse = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
+ const HandlerApiError_js_1 = require("./HandlerApiError.js");
39
40
  const HandlerErrorDetail_js_1 = require("./HandlerErrorDetail.js");
41
+ const HandlerErrorMeta_js_1 = require("./HandlerErrorMeta.js");
40
42
  exports.HandlerErrorResponse = core.serialization.object({
43
+ data: core.serialization.unknown().optional(),
41
44
  detail: HandlerErrorDetail_js_1.HandlerErrorDetail.optional(),
45
+ error: HandlerApiError_js_1.HandlerApiError.optional(),
46
+ meta: HandlerErrorMeta_js_1.HandlerErrorMeta.optional(),
47
+ success: core.serialization.boolean().optional(),
42
48
  });
@@ -5,6 +5,7 @@ import { HandlerDeprecationNotice } from "./HandlerDeprecationNotice.js";
5
5
  export declare const HandlerResponseMeta: core.serialization.ObjectSchema<serializers.HandlerResponseMeta.Raw, HydraDB.HandlerResponseMeta>;
6
6
  export declare namespace HandlerResponseMeta {
7
7
  interface Raw {
8
+ api_version?: string | null;
8
9
  collection?: string | null;
9
10
  database?: string | null;
10
11
  deprecation?: HandlerDeprecationNotice.Raw[] | null;
@@ -38,6 +38,7 @@ exports.HandlerResponseMeta = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
39
  const HandlerDeprecationNotice_js_1 = require("./HandlerDeprecationNotice.js");
40
40
  exports.HandlerResponseMeta = core.serialization.object({
41
+ apiVersion: core.serialization.property("api_version", core.serialization.string().optional()),
41
42
  collection: core.serialization.string().optional(),
42
43
  database: core.serialization.string().optional(),
43
44
  deprecation: core.serialization.list(HandlerDeprecationNotice_js_1.HandlerDeprecationNotice).optional(),
@@ -8,6 +8,5 @@ export declare namespace SearchGraphContext {
8
8
  chunk_id_to_group_ids?: Record<string, string[]> | null;
9
9
  chunk_relations?: SearchScoredPathResponse.Raw[] | null;
10
10
  query_paths?: SearchScoredPathResponse.Raw[] | null;
11
- synthesis_context?: string | null;
12
11
  }
13
12
  }
@@ -43,5 +43,4 @@ exports.SearchGraphContext = core.serialization.object({
43
43
  .optional()),
44
44
  chunkRelations: core.serialization.property("chunk_relations", core.serialization.list(SearchScoredPathResponse_js_1.SearchScoredPathResponse).optional()),
45
45
  queryPaths: core.serialization.property("query_paths", core.serialization.list(SearchScoredPathResponse_js_1.SearchScoredPathResponse).optional()),
46
- synthesisContext: core.serialization.property("synthesis_context", core.serialization.string().optional()),
47
46
  });
@@ -4,7 +4,6 @@ import type * as serializers from "../index.js";
4
4
  export declare const TenantsCollectionStats: core.serialization.ObjectSchema<serializers.TenantsCollectionStats.Raw, HydraDB.TenantsCollectionStats>;
5
5
  export declare namespace TenantsCollectionStats {
6
6
  interface Raw {
7
- dimensions?: number | null;
8
7
  row_count?: number | null;
9
8
  }
10
9
  }
@@ -37,6 +37,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.TenantsCollectionStats = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
39
  exports.TenantsCollectionStats = core.serialization.object({
40
- dimensions: core.serialization.number().optional(),
41
40
  rowCount: core.serialization.property("row_count", core.serialization.number().optional()),
42
41
  });
@@ -6,6 +6,7 @@ export declare const TenantsInfraV2: core.serialization.ObjectSchema<serializers
6
6
  export declare namespace TenantsInfraV2 {
7
7
  interface Raw {
8
8
  graph_status?: boolean | null;
9
+ ready_for_ingestion?: boolean | null;
9
10
  scheduler_status?: boolean | null;
10
11
  vectorstore_status?: TenantsVectorstoreStatusV2.Raw | null;
11
12
  }
@@ -39,6 +39,7 @@ const core = __importStar(require("../../core/index.js"));
39
39
  const TenantsVectorstoreStatusV2_js_1 = require("./TenantsVectorstoreStatusV2.js");
40
40
  exports.TenantsInfraV2 = core.serialization.object({
41
41
  graphStatus: core.serialization.property("graph_status", core.serialization.boolean().optional()),
42
+ readyForIngestion: core.serialization.property("ready_for_ingestion", core.serialization.boolean().optional()),
42
43
  schedulerStatus: core.serialization.property("scheduler_status", core.serialization.boolean().optional()),
43
44
  vectorstoreStatus: core.serialization.property("vectorstore_status", TenantsVectorstoreStatusV2_js_1.TenantsVectorstoreStatusV2.optional()),
44
45
  });
@@ -31,6 +31,7 @@ export * from "./HandlerEnvelopeWebhooksWebhookGetResponse.js";
31
31
  export * from "./HandlerEnvelopeWebhooksWebhookRegisterResponse.js";
32
32
  export * from "./HandlerEnvelopeWebhooksWebhookTestResponse.js";
33
33
  export * from "./HandlerErrorDetail.js";
34
+ export * from "./HandlerErrorMeta.js";
34
35
  export * from "./HandlerErrorResponse.js";
35
36
  export * from "./HandlerMetadataSchemaUpdateResponse.js";
36
37
  export * from "./HandlerResourceMapping.js";
@@ -47,6 +47,7 @@ __exportStar(require("./HandlerEnvelopeWebhooksWebhookGetResponse.js"), exports)
47
47
  __exportStar(require("./HandlerEnvelopeWebhooksWebhookRegisterResponse.js"), exports);
48
48
  __exportStar(require("./HandlerEnvelopeWebhooksWebhookTestResponse.js"), exports);
49
49
  __exportStar(require("./HandlerErrorDetail.js"), exports);
50
+ __exportStar(require("./HandlerErrorMeta.js"), exports);
50
51
  __exportStar(require("./HandlerErrorResponse.js"), exports);
51
52
  __exportStar(require("./HandlerMetadataSchemaUpdateResponse.js"), exports);
52
53
  __exportStar(require("./HandlerResourceMapping.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydradb/sdk",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "The official TypeScript SDK for the Hydra DB platform.",
5
5
  "author": "Nishkarsh Shrivastava <nishkarsh@hydradb.com>",
6
6
  "main": "./dist/index.js",