Membrane SDK - v0.29.2
    Preparing search index...

    Class ConnectionAccessor

    Index

    Constructors

    Properties

    connectionSelector: string

    Accessors

    Methods

    • Parameters

      • query: { includeSecrets?: boolean } = ...

      Returns Promise<
          {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          },
      >

    • Parameters

      • data: {
            type?: "connector" | "mcp";
            name?: string;
            meta?: Record<string, any>;
            authOptionKey?: string;
            key?: string | null;
            integrationId?: string;
            integrationUuid?: string;
            integrationKey?: string;
            connectorId?: string;
            connectorUuid?: string;
            connectorKey?: string;
            connectorVersion?: string;
            externalAppId?: string;
            externalAppUuid?: string;
            credentials?: unknown;
            connectorParameters?: unknown;
            input?: unknown;
            intent?: string;
        }
        • Optionaltype?: "connector" | "mcp"
        • Optionalname?: string
        • Optionalmeta?: Record<string, any>
        • OptionalauthOptionKey?: string
        • Optionalkey?: string | null

          Stable, human-readable key for addressing this connection. Must be unique per tenant (workspace + tenantId scope). Mirrors the key field on the connection response so PATCH/PUT bodies look the same shape as what GET /connections/:id returns.

        • OptionalintegrationId?: string
        • OptionalintegrationUuid?: string
        • OptionalintegrationKey?: string
        • OptionalconnectorId?: string
        • OptionalconnectorUuid?: string
        • OptionalconnectorKey?: string
        • OptionalconnectorVersion?: string
        • OptionalexternalAppId?: string
        • OptionalexternalAppUuid?: string
        • Optionalcredentials?: unknown
        • OptionalconnectorParameters?: unknown
        • Optionalinput?: unknown
        • Optionalintent?: string

      Returns Promise<
          {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          },
      >

    • Parameters

      • data: {
            type?: "connector" | "mcp";
            name?: string;
            meta?: Record<string, any>;
            authOptionKey?: string;
            key?: string | null;
            integrationId?: string;
            integrationUuid?: string;
            integrationKey?: string;
            connectorId?: string;
            connectorUuid?: string;
            connectorKey?: string;
            connectorVersion?: string;
            externalAppId?: string;
            externalAppUuid?: string;
            credentials?: unknown;
            connectorParameters?: unknown;
            input?: unknown;
            intent?: string;
        }
        • Optionaltype?: "connector" | "mcp"
        • Optionalname?: string
        • Optionalmeta?: Record<string, any>
        • OptionalauthOptionKey?: string
        • Optionalkey?: string | null

          Stable, human-readable key for addressing this connection. Must be unique per tenant (workspace + tenantId scope). Mirrors the key field on the connection response so PATCH/PUT bodies look the same shape as what GET /connections/:id returns.

        • OptionalintegrationId?: string
        • OptionalintegrationUuid?: string
        • OptionalintegrationKey?: string
        • OptionalconnectorId?: string
        • OptionalconnectorUuid?: string
        • OptionalconnectorKey?: string
        • OptionalconnectorVersion?: string
        • OptionalexternalAppId?: string
        • OptionalexternalAppUuid?: string
        • Optionalcredentials?: unknown
        • OptionalconnectorParameters?: unknown
        • Optionalinput?: unknown
        • Optionalintent?: string

      Returns Promise<
          {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          },
      >

    • Returns Promise<void>

    • Returns Promise<
          {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          },
      >

    • Parameters

      • path: string
      • data: any = null

      Returns Promise<any>

    • Reconnects an existing connection programmatically.

      Parameters

      • __namedParameters: {
            parameters?: any;
            authOptionKey?: string;
            connectorParameters?: any;
            onPopupClosed?: () => void;
        } = {}

      Returns Promise<
          | {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          }
          | null,
      >

      Use client.connect({ connectionId }) instead

    • Opens the reconnect UI for this connection.

      Parameters

      Returns Promise<
          | {
              user?: {
                  id: string;
                  name: string;
                  meta?: Record<string, any>;
                  internalId: string;
                  fields?: Record<string, any>;
                  credentials?: any;
                  lastActiveAt?: string;
                  isTest?: boolean;
                  isBillable?: boolean;
                  isActive?: boolean;
                  aiCreditsRolling30DayLimit?: number | null;
                  createdAt?: string;
                  archivedAt?: string;
              };
              integration?: {
                  logoUri: string;
                  connectorId?: string;
                  connectorVersion?: string;
                  oAuthCallbackUri?: string;
                  parameters?: any;
                  archivedAt?: string;
                  hasMissingParameters?: boolean;
                  hasDocumentation?: boolean;
                  hasOperations?: boolean;
                  operationsCount?: number;
                  hasData?: boolean;
                  dataCollectionsCount?: number;
                  hasEvents?: boolean;
                  eventsCount?: number;
                  hasGlobalWebhooks?: boolean;
                  hasUdm?: boolean;
                  isTest?: boolean;
                  externalAppId?: string;
                  appUuid?: string;
                  isDeactivated?: boolean;
                  authType?: | "proxy"
                  | "integration-app-token"
                  | "membrane-token"
                  | "oauth2"
                  | "oauth1"
                  | "client-credentials";
                  optionsConfig?: Record<
                      string,
                      { disabled?: boolean; parameters?: Record<string, any> },
                  >;
                  id: string;
                  uuid?: string;
                  key?: string;
                  description?: string;
                  meta?: Record<string, any>;
                  name: string;
                  state?:
                      | BUILDING
                      | CLIENT_ACTION_REQUIRED
                      | CONFIGURATION_ERROR
                      | SETUP_FAILED
                      | READY
                      | DISCONNECTING;
                  errors?: ErrorDataSchema[];
                  revision?: string;
                  createdAt?: string;
                  updatedAt?: string;
                  isReadOnly?: boolean;
              };
              connectorParameters?: unknown;
              input?: unknown;
              type?: "connector"
              | "mcp";
              name: string;
              key?: string;
              isTest?: boolean;
              connected?: boolean;
              disconnected?: boolean;
              isDefunct?: boolean;
              state?:
                  | BUILDING
                  | CLIENT_ACTION_REQUIRED
                  | CONFIGURATION_ERROR
                  | SETUP_FAILED
                  | READY
                  | DISCONNECTING;
              errors?: ErrorDataSchema[];
              requestError?: ErrorDataSchema;
              error?: ErrorDataSchema;
              integrationId?: string;
              connectorId?: string;
              externalAppId?: string;
              connectorVersion?: string;
              authOptionKey?: string;
              createdAt: string;
              updatedAt: string;
              lastActiveAt?: string;
              nextCredentialsRefreshAt?: string;
              nextRetryTimestamp?: string;
              retryAttempts?: number;
              canTest?: boolean;
              canRefreshCredentials?: boolean;
              archivedAt?: string;
              isDeactivated?: boolean;
              meta?: Record<string, any>;
              buildingAgentSessionId?: string;
              clientAction?: {
                  type: "connect" | "provide-input";
                  description: string;
                  uiUrl?: string;
                  agentInstructions?: string;
                  handoffAgentInstructions?: string;
                  reason?: "provide-input" | "authenticate" | "reauthenticate";
              };
              id: string;
              userId: string;
              tenantId?: string;
          }
          | null,
      >

      Use client.ui.connect({ connectionId }) instead

    • Returns Promise<void>

    • Parameters

      • Optionalsubpath: string
      • Optionalquery: Record<string, any>

      Returns string