import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as HydraDB from "../../../index.js"; export declare namespace ConnectorsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class ConnectorsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: ConnectorsClient.Options); /** * 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. * * @param {HydraDB.HandlerDiscoverPreviewReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.BadGatewayError} * * @example * await client.connectors.discoverPreview({ * credentials: { * "api_token": "xoxb-..." * }, * provider: "slack" * }) */ discoverPreview(request: HydraDB.HandlerDiscoverPreviewReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __discoverPreview; /** * List all connectors for the authenticated org, optionally filtered by provider. * * @param {HydraDB.ListConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.list({ * provider: "slack" * }) */ list(request?: HydraDB.ListConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Create a connector for a provider and store its credentials. * * @param {HydraDB.HandlerConnectorCreateReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.InternalServerError} * @throws {@link HydraDB.ServiceUnavailableError} * * @example * await client.connectors.create({ * provider: "slack" * }) */ create(request: HydraDB.HandlerConnectorCreateReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Fetch a single connector by ID. * * @param {HydraDB.GetConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.get({ * id: "HydraDoc1234" * }) */ get(request: HydraDB.GetConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Delete a connector, its resources, and stored credentials. * * @param {HydraDB.DeleteConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.delete({ * id: "HydraDoc1234" * }) */ delete(request: HydraDB.DeleteConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Update a connector's mutable settings. `sync_interval_seconds` sets the cadence at which the scheduler starts incremental syncs: the allowed range is provider-aware and returned in the response; values outside it are rejected rather than clamped; 0 resets to the provider default; changing it re-anchors the next sync so a shorter cadence takes effect immediately. `credentials` reconnects the connector in place: send the provider's full credential set (what create accepts); supplied keys replace their stored values, other stored keys survive, the bundle is re-validated against the provider's credential schema, and a pending needs-reauth flag is cleared — the connector keeps its id, resources, and sync cursors. `custom_instructions` replaces the free-text steering applied when this connector's documents are ingested (an explicit empty string clears it); the change applies from the next sync cycle and does not re-process already-ingested documents. When several fields are supplied together they are validated up front and applied atomically: an invalid value rejects the whole request with nothing changed. * * @param {HydraDB.HandlerConnectorUpdateReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.update({ * id: "HydraDoc1234" * }) */ update(request: HydraDB.HandlerConnectorUpdateReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Save the selected resources for a connector and trigger initial sync/backfill. * * @param {HydraDB.HandlerConfigureReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.configure({ * id: "HydraDoc1234", * resources: [{ * additionalMetadata: { * "author": "ada", * "doc_version": 3 * }, * collection: "team_docs", * database: "acme_corp", * metadata: { * "department": "finance", * "priority": 7 * }, * name: "general", * resourceId: "C0123456789", * resourceType: "channel" * }] * }) */ configure(request: HydraDB.HandlerConfigureReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __configure; /** * Internal endpoint. It is not callable with a customer API key and always returns 403 for external callers. Persists a rotated refresh_token for OAuth-bundle connectors: providers that rotate the refresh token on each exchange invalidate the previously stored one, so the new token must be written back or the next sync fails with invalid_grant. Only refresh_token is merged onto the current stored credential bundle and re-encrypted under the connector's identity context; credentials are never returned. It has no automated caller and is disabled by default: until an operator enables it, every call returns 500. * * @param {HydraDB.PatchConnectorsIdCredentialsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.ForbiddenError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * @throws {@link HydraDB.ServiceUnavailableError} * * @example * await client.connectors.rotateAConnectorsStoredOAuthRefreshTokenInternalUseOnly({ * id: "HydraDoc1234", * body: { * "key": "value" * } * }) */ rotateAConnectorsStoredOAuthRefreshTokenInternalUseOnly(request: HydraDB.PatchConnectorsIdCredentialsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __rotateAConnectorsStoredOAuthRefreshTokenInternalUseOnly; /** * 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. * * @param {HydraDB.DiscoverConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * @throws {@link HydraDB.BadGatewayError} * @throws {@link HydraDB.ServiceUnavailableError} * * @example * await client.connectors.discover({ * id: "HydraDoc1234" * }) */ discover(request: HydraDB.DiscoverConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __discover; /** * Stop scheduling syncs and backfills for a connector until it is resumed. A sync already running is allowed to finish. Cursors are preserved, so resuming continues from where each resource left off. * * @param {HydraDB.PauseConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.ConflictError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.pause({ * id: "HydraDoc1234" * }) */ pause(request: HydraDB.PauseConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __pause; /** * List the configured resources for a connector. * * @param {HydraDB.ListResourcesConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.listResources({ * id: "HydraDoc1234" * }) */ listResources(request: HydraDB.ListResourcesConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __listResources; /** * Add a resource mapping to a connector. * * @param {HydraDB.HandlerResourceCreateReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.createResource({ * id: "HydraDoc1234", * resourceId: "C0123456789" * }) */ createResource(request: HydraDB.HandlerResourceCreateReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __createResource; /** * Remove a resource mapping from a connector. * * @param {HydraDB.DeleteResourceConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.deleteResource({ * id: "HydraDoc1234", * resourceId: "C0123456789" * }) */ deleteResource(request: HydraDB.DeleteResourceConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __deleteResource; /** * Updates per-resource settings. `acl` sets the customer-declared ACL for one connector resource (PRO-1684): the rule is normalized (emails prefixed, __public__ dominates, explicit-empty becomes __private__), persisted on the resource, and applied to enforcement immediately via the resource's ACL row, every already-indexed document of the resource is governed by it on the next query, with no re-sync. For providers with provider-derived ACL capture enabled, the provider's own ACL takes precedence again at the next sync; the rule is the standing fallback. `custom_instructions` sets the resource-level ingestion-instructions override (max 4000 characters): when set it replaces the connector-level custom_instructions for documents synced from this resource, an explicit empty string clears the override back to inheriting the connector's value, and changes apply from the next sync cycle. At least one field must be supplied; omitted fields are left unchanged. * * @param {HydraDB.UpdateResourceAclConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.updateResourceAcl({ * id: "HydraDoc1234", * resourceId: "C0123456789", * body: { * "key": "value" * } * }) */ updateResourceAcl(request: HydraDB.UpdateResourceAclConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise>; private __updateResourceAcl; /** * Return a paused connector to the schedule and make it due immediately. Each resource continues from its committed cursor, so data created during the pause is collected on the next cycle rather than skipped. * * @param {HydraDB.ResumeConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.ConflictError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.resume({ * id: "HydraDoc1234" * }) */ resume(request: HydraDB.ResumeConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __resume; /** * Report whether a connector is working, in one call: a rollup status (healthy, degraded, failed, checking) plus per-resource detail. `degraded` means the connector is scheduled but not fully working: at least one configured resource is failing, or the latest sync cycle failed after the resources reported (in which case `error` carries the failure and `retryable` says whether waiting can fix it). `failed` means only the user can fix it: a rejected credential, a blocked connector, or a terminal cycle failure. * * @param {HydraDB.StatusConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.connectors.status({ * id: "HydraDoc1234" * }) */ status(request: HydraDB.StatusConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __status; /** * Start a manual sync workflow for a connector. * * @param {HydraDB.SyncConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.ConflictError} * @throws {@link HydraDB.InternalServerError} * @throws {@link HydraDB.ServiceUnavailableError} * * @example * await client.connectors.sync({ * id: "HydraDoc1234" * }) */ sync(request: HydraDB.SyncConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __sync; /** * List metadata and field names for credentials already used by connectors in the current workspace. * * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.connectors.listConnectorCredentials() */ listConnectorCredentials(requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __listConnectorCredentials; /** * Update fields on the credential currently used by a connector. Owner-only human action. * * @param {HydraDB.HandlerVaultCredentialUpdateReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * * @example * await client.connectors.updateConnectorCredentials({ * id: "HydraDoc1234", * credentials: { * "api_token": "xoxb-..." * } * }) */ updateConnectorCredentials(request: HydraDB.HandlerVaultCredentialUpdateReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __updateConnectorCredentials; /** * Reveal one field from the credential currently used by a connector in the workspace. The response must never be cached. * * @param {HydraDB.HandlerVaultCredentialRevealReq} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.NotFoundError} * * @example * await client.connectors.revealAConnectorCredentialValue({ * id: "HydraDoc1234", * field: "field" * }) */ revealAConnectorCredentialValue(request: HydraDB.HandlerVaultCredentialRevealReq, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __revealAConnectorCredentialValue; }