@squidcloud/client
Version:
A typescript implementation of the Squid client
33 lines (32 loc) • 1.26 kB
TypeScript
import { ConnectorId } from './public-types';
/**
* ConnectorClient manages app-level (integration-less) connectors attached to an application.
*
* Unlike integrations, these connectors carry no per-connector configuration record — attaching one
* simply adds it to the application's `appConnectors` list and (re)deploys its bundle. Any configuration
* the connector needs is provided out of band (e.g. via application secrets).
* @category Platform
*/
export declare class ConnectorClient {
private readonly rpcManager;
private readonly iacBaseUrl;
/**
* Lists the connectors explicitly attached to the application.
*
* @returns A promise that resolves with the list of attached connector ids.
*/
list(): Promise<Array<ConnectorId>>;
/**
* Attaches a connector to the application. Idempotent — attaching an already-attached connector is a
* no-op on the platform side.
*
* @param connectorId - The id of the connector to attach.
*/
connect(connectorId: ConnectorId): Promise<void>;
/**
* Detaches a connector from the application.
*
* @param connectorId - The id of the connector to detach.
*/
disconnect(connectorId: ConnectorId): Promise<void>;
}