import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Supermemory from "../../../index.js"; export declare namespace ConnectorsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * Sync external sources such as Google Drive, Notion and GitHub into a namespace */ export declare class ConnectorsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: ConnectorsClient.Options); /** * List connectors across every namespace this key can read. Use it for admin views that span users or projects. * * @param {Supermemory.ListAllConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.InternalServerError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.listAll() */ listAll(request?: Supermemory.ListAllConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __listAll; /** * List the connectors that sync into this namespace. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {Supermemory.ListConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.InternalServerError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.list("user_alex") */ list(namespace: string, request?: Supermemory.ListConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Connect an external source to this namespace. OAuth providers return an authorization url to send the user to; providers that authenticate with config start syncing right away. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {Supermemory.CreateConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.PaymentRequiredError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.InternalServerError} * @throws {@link Supermemory.ServiceUnavailableError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.create("user_alex", { * body: { * provider: "notion" * } * }) */ create(namespace: string, request: Supermemory.CreateConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Read one connector. Add include=syncs to include its recent sync runs and the items that failed. include=picker needs an admin with write access, since the link changes what syncs. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {string} id - Connector identifier returned when the connector was created * @param {Supermemory.GetConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.NotFoundError} * @throws {@link Supermemory.InternalServerError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.get("user_alex", "PTzGiUYei7pgzg5buzZHgA") */ get(namespace: string, id: string, request?: Supermemory.GetConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Disconnect a connector and stop its webhooks. Its imported documents are deleted too unless deleteDocuments is false. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {string} id - Connector identifier returned when the connector was created * @param {Supermemory.DeleteConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.NotFoundError} * @throws {@link Supermemory.InternalServerError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.delete("user_alex", "PTzGiUYei7pgzg5buzZHgA") */ delete(namespace: string, id: string, request?: Supermemory.DeleteConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Change what a connector syncs. A new selection replaces the old one and starts a sync. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {string} id - Connector identifier returned when the connector was created * @param {Supermemory.UpdateConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.NotFoundError} * @throws {@link Supermemory.InternalServerError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.update("user_alex", "PTzGiUYei7pgzg5buzZHgA") */ update(namespace: string, id: string, request?: Supermemory.UpdateConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Start a sync now. Returns 409 while a sync for this connector is already running. * * @param {string} namespace - Namespace identifier. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope documents and memories. * @param {string} id - Connector identifier returned when the connector was created * @param {Supermemory.SyncConnectorsRequest} request * @param {ConnectorsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Supermemory.BadRequestError} * @throws {@link Supermemory.UnauthorizedError} * @throws {@link Supermemory.PaymentRequiredError} * @throws {@link Supermemory.ForbiddenError} * @throws {@link Supermemory.NotFoundError} * @throws {@link Supermemory.ConflictError} * @throws {@link Supermemory.InternalServerError} * @throws {@link Supermemory.ServiceUnavailableError} * @throws {@link errors.SupermemoryError} * @throws {@link errors.SupermemoryTimeoutError} * * @example * await client.connectors.sync("user_alex", "PTzGiUYei7pgzg5buzZHgA") */ sync(namespace: string, id: string, request?: Supermemory.SyncConnectorsRequest, requestOptions?: ConnectorsClient.RequestOptions): core.HttpResponsePromise; private __sync; } //# sourceMappingURL=Client.d.ts.map