/**
 * Well-known OAuth providers. The `string` tail keeps the union open for
 * custom providers without requiring a library change.
 */
type ProviderName = "google" | "microsoft_365" | "slack" | "hubspot" | "xero" | "notion" | "linear" | "monday" | "github" | "atlassian" | string;
/** A single OAuth scope string (e.g. "https://www.googleapis.com/auth/gmail.send"). */
type Scope = string;
/**
 * Normalised token payload returned by a Provider after code exchange or
 * token refresh. `raw` carries the full unparsed vendor response for
 * debugging; consumers should not rely on its shape.
 */
type TokenResponse = {
    accessToken: string;
    refreshToken?: string;
    /** Absolute expiry time derived from `expires_in` at exchange time. */
    expiresAt?: Date;
    scopes: Scope[];
    tokenType?: string;
    raw?: Record<string, unknown>;
};
/**
 * A persisted, live connection between one operator and one provider.
 *
 * Stored by a ConnectionStore implementation. Retrieved and refreshed by
 * ConnectionManager before each use.
 */
type Connection = {
    id: string;
    providerId: ProviderName;
    /** The human or agent principal that owns this connection. */
    operatorId: string;
    accessToken: string;
    refreshToken?: string;
    expiresAt?: Date;
    scopes: Scope[];
    connectedAt: Date;
    lastUsedAt?: Date;
    /** Arbitrary provider-specific data (e.g. user email, workspace name). */
    metadata?: Record<string, unknown>;
};
/**
 * Returned by ConnectionManager.connect() — the data the caller needs to
 * redirect the user to the provider's authorization page and later match
 * the callback.
 */
type ConnectionStartResult = {
    authorizationUrl: string;
    /** CSRF token the caller must round-trip through the OAuth state param. */
    state: string;
    providerId: ProviderName;
};
/**
 * Current status of an operator's connection to a provider.
 * Discriminated by `connected`.
 */
type ConnectionStatus = {
    connected: true;
    connection: Connection;
    /** Seconds until the access token expires. Undefined if no expiry set. */
    expiresIn?: number;
} | {
    connected: false;
};
/**
 * The persisted shape of a Connection row in the database.
 *
 * accessToken and refreshToken are replaced by their AES-256-GCM encrypted
 * equivalents. ConnectionCrypto handles translation between Connection ↔
 * EncryptedConnectionRow. Consumers should never interact with this type
 * directly — it is the internal persistence layer shape.
 */
type EncryptedConnectionRow = {
    id: string;
    operatorId: string;
    providerId: string;
    encryptedAccessToken: string;
    accessTokenIv: string;
    accessTokenTag: string;
    encryptedRefreshToken: string | null;
    refreshTokenIv: string | null;
    refreshTokenTag: string | null;
    expiresAt: Date | null;
    scopes: string[];
    connectedAt: Date;
    lastUsedAt: Date | null;
    metadata: Record<string, unknown> | null;
    updatedAt: Date;
};
/**
 * Structural type for the subset of a generated PrismaClient that
 * PrismaConnectionStore requires. Consumers pass their own PrismaClient
 * (which must include the Connection model from schema.prisma.example).
 *
 * TypeScript will verify structural compatibility at the call site — no
 * need to import this type explicitly unless you are wiring the store.
 */
interface ConnectionPrismaClient {
    connection: {
        upsert(args: {
            where: {
                operatorId_providerId: {
                    operatorId: string;
                    providerId: string;
                };
            };
            create: EncryptedConnectionRow;
            update: Partial<EncryptedConnectionRow>;
        }): Promise<EncryptedConnectionRow>;
        findUnique(args: {
            where: {
                operatorId_providerId: {
                    operatorId: string;
                    providerId: string;
                };
            };
        }): Promise<EncryptedConnectionRow | null>;
        findMany(args: {
            where: {
                operatorId: string;
            };
        }): Promise<EncryptedConnectionRow[]>;
        delete(args: {
            where: {
                operatorId_providerId: {
                    operatorId: string;
                    providerId: string;
                };
            };
        }): Promise<EncryptedConnectionRow>;
        update(args: {
            where: {
                operatorId_providerId: {
                    operatorId: string;
                    providerId: string;
                };
            };
            data: Partial<EncryptedConnectionRow>;
        }): Promise<EncryptedConnectionRow>;
    };
}

/**
 * Knows how to perform every OAuth operation for one vendor.
 *
 * Implement this interface once per provider. Register with ConnectionManager.
 * The same provider instance is reused across all operators — it is stateless.
 *
 * Batch 3 adds: MicrosoftProvider, SlackProvider, HubSpotProvider,
 * XeroProvider, NotionProvider, GitHubProvider, LinearProvider,
 * AtlassianProvider.
 */
interface Provider {
    readonly id: ProviderName;
    readonly displayName: string;
    /** Used by "Connect your tools" UI to show vendor logos. */
    readonly iconUrl?: string;
    /**
     * Scopes included when the caller does not pass an explicit scope list.
     * Usually the minimum needed for basic identity (email + profile).
     */
    readonly defaultScopes: Scope[];
    /**
     * Constructs the vendor authorization URL the user must visit.
     *
     * `state` is a CSRF token generated by the caller; providers MUST include
     * it as the `state` query parameter and consumers MUST verify it on return.
     */
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    /**
     * Exchanges a one-time authorization code for tokens.
     *
     * Called from the OAuth callback route after the user authorizes. The
     * returned TokenResponse is immediately persisted by ConnectionManager.
     *
     * @throws {OAuthExchangeError} when the vendor rejects the code.
     */
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    /**
     * Uses a refresh token to obtain a new access token.
     *
     * ConnectionManager calls this automatically when the stored token is
     * within 5 minutes of expiry.
     *
     * @throws {TokenRefreshError} when the vendor rejects the refresh token.
     */
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    /**
     * Revokes the access token at the vendor's end.
     *
     * Optional — not all vendors expose a revocation endpoint. If absent,
     * ConnectionManager skips revocation and only deletes the local record.
     */
    revokeAccess?(accessToken: string): Promise<void>;
    /**
     * Fetches the authenticated user's identity from the vendor.
     *
     * Used to populate Connection.metadata (email, name, workspace) after a
     * successful exchange. Optional — providers that do not expose a userinfo
     * endpoint omit this method.
     */
    fetchUserInfo?(accessToken: string): Promise<Record<string, unknown>>;
}
/**
 * Persists and retrieves Connection records.
 *
 * The reference implementation (MemoryConnectionStore) uses a nested Map and
 * is suitable for tests and ephemeral processes. Batch 2 replaces it with a
 * PrismaConnectionStore that persists to the agent-kit database schema and
 * adds AES-256-GCM encryption of token fields at rest.
 */
interface ConnectionStore {
    save(connection: Connection): Promise<void>;
    get(operatorId: string, providerId: ProviderName): Promise<Connection | null>;
    list(operatorId: string): Promise<Connection[]>;
    delete(operatorId: string, providerId: ProviderName): Promise<void>;
    updateTokens(operatorId: string, providerId: ProviderName, accessToken: string, refreshToken?: string, expiresAt?: Date): Promise<void>;
}
/** Full configuration required to instantiate a ConnectionManager. */
interface ConnectionManagerConfig {
    store: ConnectionStore;
    /** Keyed by providerId. Every registered provider must have a credential entry. */
    providers: Map<ProviderName, Provider>;
    credentials: Map<ProviderName, {
        clientId: string;
        clientSecret: string;
    }>;
    /**
     * Fallback redirect URI used when the caller does not supply one per-call.
     * Typically `https://<app>/auth/callback`.
     */
    defaultRedirectUri: string;
}

/** Thrown when getAccessToken is called for an operator with no connection. */
declare class NoConnectionError extends Error {
    constructor(operatorId: string, providerId: ProviderName);
}
/** Thrown when a provider ID is not registered in the ConnectionManager. */
declare class ProviderNotRegisteredError extends Error {
    constructor(providerId: ProviderName);
}
/** Thrown when the vendor rejects an authorization code exchange. */
declare class OAuthExchangeError extends Error {
    constructor(providerId: ProviderName, cause: unknown);
}
/** Thrown when a token refresh request is rejected by the vendor. */
declare class TokenRefreshError extends Error {
    constructor(providerId: ProviderName, cause: unknown);
}
declare class ConnectionManager {
    private readonly store;
    private readonly providers;
    private readonly credentials;
    private readonly defaultRedirectUri;
    constructor(config: ConnectionManagerConfig);
    /**
     * Step 1 of the OAuth flow: build an authorization URL the user must visit.
     *
     * Returns the URL, a CSRF state token, and the providerId. The caller is
     * responsible for storing `state` (e.g. in a session or signed cookie) and
     * verifying it on the callback before calling completeConnection().
     */
    connect(operatorId: string, providerId: ProviderName, options?: {
        scopes?: Scope[];
        redirectUri?: string;
        state?: string;
    }): Promise<ConnectionStartResult>;
    /**
     * Step 2 of the OAuth flow: exchange the authorization code for tokens and
     * persist the resulting Connection.
     *
     * Call this from your OAuth callback route after verifying the `state`
     * parameter matches what was stored during connect().
     *
     * @throws {OAuthExchangeError} when the vendor rejects the code.
     */
    completeConnection(operatorId: string, providerId: ProviderName, code: string, redirectUri?: string): Promise<Connection>;
    /**
     * Returns a valid access token for the operator's connection to the given
     * provider. Transparently refreshes if the token is within 5 minutes of
     * expiry.
     *
     * @throws {NoConnectionError} when no connection exists.
     * @throws {TokenRefreshError} when refresh fails.
     */
    getAccessToken(operatorId: string, providerId: ProviderName): Promise<string>;
    /**
     * Non-throwing status check. Safe to call in middleware or UI layers that
     * need to know whether a connection exists without handling exceptions.
     */
    getConnectionStatus(operatorId: string, providerId: ProviderName): Promise<ConnectionStatus>;
    /**
     * Revokes the access token at the vendor's end (if the provider supports it)
     * and deletes the Connection record from the store.
     */
    disconnect(operatorId: string, providerId: ProviderName): Promise<void>;
    /** Returns all active connections for the given operator. */
    listConnections(operatorId: string): Promise<Connection[]>;
    /**
     * Refreshes the connection's access token if it is within REFRESH_BUFFER_MS
     * of expiry. Returns the (possibly refreshed) Connection.
     *
     * No-ops if the connection has no expiry or if it is not yet near expiry.
     *
     * @throws {TokenRefreshError} when the refresh request fails.
     */
    refreshIfNeeded(connection: Connection): Promise<Connection>;
    private requireProvider;
    private requireCredentials;
}

declare class MemoryConnectionStore implements ConnectionStore {
    private readonly store;
    save(connection: Connection): Promise<void>;
    get(operatorId: string, providerId: ProviderName): Promise<Connection | null>;
    list(operatorId: string): Promise<Connection[]>;
    delete(operatorId: string, providerId: ProviderName): Promise<void>;
    updateTokens(operatorId: string, providerId: ProviderName, accessToken: string, refreshToken?: string, expiresAt?: Date): Promise<void>;
    /**
     * Returns the total number of stored connections across all operators.
     * Useful for test assertions.
     */
    size(): number;
    /** Clears all stored connections. Useful for test teardown. */
    clear(): void;
}

interface ConnectionCryptoConfig {
    /** 32+ character secret. Derive from env via scrypt — never store raw in DB. */
    encryptionKey: string;
}
declare class ConnectionCrypto {
    private readonly derivedKey;
    constructor(config: ConnectionCryptoConfig);
    encryptToken(plaintext: string): {
        ciphertext: string;
        iv: string;
        tag: string;
    };
    decryptToken(encrypted: {
        ciphertext: string;
        iv: string;
        tag: string;
    }): string;
    encryptConnection(connection: Connection): EncryptedConnectionRow;
    decryptConnection(row: EncryptedConnectionRow): Connection;
}

declare class PrismaConnectionStore implements ConnectionStore {
    private readonly prisma;
    private readonly crypto;
    constructor(prisma: ConnectionPrismaClient, crypto: ConnectionCrypto);
    save(connection: Connection): Promise<void>;
    get(operatorId: string, providerId: ProviderName): Promise<Connection | null>;
    list(operatorId: string): Promise<Connection[]>;
    delete(operatorId: string, providerId: ProviderName): Promise<void>;
    updateTokens(operatorId: string, providerId: ProviderName, accessToken: string, refreshToken?: string, expiresAt?: Date): Promise<void>;
}

/**
 * Common Google OAuth scope URLs. Import the ones you need and compose a
 * custom list, or pass `provider.defaultScopes` for identity-only access.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "google", {
 *   scopes: [GoogleScopes.GMAIL_SEND, GoogleScopes.CALENDAR_EVENTS],
 * });
 * ```
 */
declare const GoogleScopes: {
    readonly CALENDAR_READ: "https://www.googleapis.com/auth/calendar.readonly";
    readonly CALENDAR_FULL: "https://www.googleapis.com/auth/calendar";
    readonly CALENDAR_EVENTS: "https://www.googleapis.com/auth/calendar.events";
    readonly GMAIL_READ: "https://www.googleapis.com/auth/gmail.readonly";
    readonly GMAIL_SEND: "https://www.googleapis.com/auth/gmail.send";
    readonly GMAIL_COMPOSE: "https://www.googleapis.com/auth/gmail.compose";
    readonly DRIVE_READ: "https://www.googleapis.com/auth/drive.readonly";
    readonly DRIVE_FULL: "https://www.googleapis.com/auth/drive";
    readonly SHEETS: "https://www.googleapis.com/auth/spreadsheets";
    readonly DOCS: "https://www.googleapis.com/auth/documents";
    readonly TASKS: "https://www.googleapis.com/auth/tasks";
};
declare class GoogleProvider implements Provider {
    readonly id: "google";
    readonly displayName = "Google Workspace";
    readonly iconUrl = "https://www.google.com/favicon.ico";
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Common Microsoft Graph OAuth scope strings.
 *
 * Microsoft Graph scopes use the full URL form:
 *   https://graph.microsoft.com/<Permission>
 *
 * Always include `OFFLINE_ACCESS` if you need a refresh_token.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "microsoft_365", {
 *   scopes: [
 *     MicrosoftGraphScopes.MAIL_READ,
 *     MicrosoftGraphScopes.CALENDARS_READWRITE,
 *     MicrosoftGraphScopes.OFFLINE_ACCESS,
 *   ],
 * });
 * ```
 */
declare const MicrosoftGraphScopes: {
    readonly USER_READ: "https://graph.microsoft.com/User.Read";
    readonly MAIL_READ: "https://graph.microsoft.com/Mail.Read";
    readonly MAIL_SEND: "https://graph.microsoft.com/Mail.Send";
    readonly MAIL_READWRITE: "https://graph.microsoft.com/Mail.ReadWrite";
    readonly CALENDARS_READ: "https://graph.microsoft.com/Calendars.Read";
    readonly CALENDARS_READWRITE: "https://graph.microsoft.com/Calendars.ReadWrite";
    readonly FILES_READ: "https://graph.microsoft.com/Files.Read";
    readonly FILES_READWRITE: "https://graph.microsoft.com/Files.ReadWrite";
    readonly CONTACTS_READ: "https://graph.microsoft.com/Contacts.Read";
    readonly PRESENCE_READ: "https://graph.microsoft.com/Presence.Read";
    readonly TEAMS_READ: "https://graph.microsoft.com/Team.ReadBasic.All";
    readonly CHAT_READ: "https://graph.microsoft.com/Chat.Read";
    /**
     * Required for refresh tokens. Microsoft does not issue refresh_tokens
     * unless "offline_access" is explicitly included in the scope list.
     * This is a plain string (not a Graph URL) — include it verbatim.
     */
    readonly OFFLINE_ACCESS: "offline_access";
};
/**
 * Microsoft 365 / Microsoft Graph OAuth 2.0 provider.
 *
 * Supports Outlook, OneDrive, Calendar, Teams, and any other service
 * accessible via Microsoft Graph.
 *
 * ### Tenant configuration
 *
 * Pass `tenantId` to the constructor. The default is `"common"`, which
 * accepts both personal Microsoft accounts and any M365 org. Change to
 * `"organizations"`, `"consumers"`, or a specific tenant GUID if needed.
 *
 * ```ts
 * // Multi-tenant SaaS (default)
 * new MicrosoftGraphProvider()
 *
 * // Specific org only
 * new MicrosoftGraphProvider({ tenantId: "aaaabbbb-1234-..." })
 *
 * // Personal Microsoft accounts only
 * new MicrosoftGraphProvider({ tenantId: "consumers" })
 * ```
 */
declare class MicrosoftGraphProvider implements Provider {
    readonly id: "microsoft_365";
    readonly displayName = "Microsoft 365";
    readonly iconUrl = "https://outlook.live.com/favicon.ico";
    /**
     * Minimum scopes for identity access. Includes `offline_access` so a
     * refresh_token is always issued. Consumers compose additional scopes
     * from `MicrosoftGraphScopes` as needed.
     */
    readonly defaultScopes: Scope[];
    private readonly tenantId;
    constructor(options?: {
        tenantId?: string;
    });
    private get authUrl();
    private get tokenUrl();
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(_accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Common Slack OAuth bot scope strings.
 *
 * These are the scopes passed to the `scope` query parameter (bot scopes).
 * For user scopes, Slack uses a separate `user_scope` parameter — see
 * the implementation notes above.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "slack", {
 *   scopes: [SlackScopes.CHAT_WRITE, SlackScopes.CHANNELS_READ],
 * });
 * ```
 */
declare const SlackScopes: {
    readonly CHAT_WRITE: "chat:write";
    readonly CHAT_WRITE_PUBLIC: "chat:write.public";
    readonly CHANNELS_READ: "channels:read";
    readonly CHANNELS_HISTORY: "channels:history";
    readonly GROUPS_READ: "groups:read";
    readonly GROUPS_HISTORY: "groups:history";
    readonly IM_READ: "im:read";
    readonly IM_HISTORY: "im:history";
    readonly USERS_READ: "users:read";
    readonly USERS_READ_EMAIL: "users:read.email";
    readonly TEAM_READ: "team:read";
    readonly FILES_READ: "files:read";
    readonly FILES_WRITE: "files:write";
};
/**
 * Slack OAuth v2 provider.
 *
 * Supports posting messages, reading channels, accessing DMs, and any other
 * operation available via Slack's Web API.
 *
 * ### Token rotation
 *
 * By default, Slack issues non-expiring tokens. The refresh flow will throw
 * unless Token Rotation is enabled in your Slack app's OAuth & Permissions
 * settings. When rotation is enabled, tokens expire after 12 hours and
 * ConnectionManager refreshes them automatically.
 *
 * ### Bot vs User tokens
 *
 * Pass bot scopes to `connect()`. The `access_token` in the exchange response
 * is the bot token. If you need a user token, inspect `connection.metadata.raw`
 * for the `authed_user.access_token` field.
 */
declare class SlackProvider implements Provider {
    readonly id: "slack";
    readonly displayName = "Slack";
    readonly iconUrl = "https://slack.com/favicon.ico";
    /**
     * Slack has no equivalent of Google's identity scopes for the bot flow.
     * Leave empty — callers must explicitly provide the scopes they need.
     * The most minimal working set is typically `["chat:write", "channels:read"]`.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Common HubSpot CRM OAuth scope strings.
 *
 * Use individual constants to compose a custom scope list, or pass one of the
 * pre-grouped `HUBSPOT_SCOPES` arrays for the most common access patterns.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "hubspot", {
 *   scopes: [HubSpotScopes.CONTACTS_READ, HubSpotScopes.DEALS_READ, HubSpotScopes.OAUTH],
 * });
 * ```
 */
declare const HubSpotScopes: {
    readonly CONTACTS_READ: "crm.objects.contacts.read";
    readonly CONTACTS_WRITE: "crm.objects.contacts.write";
    readonly DEALS_READ: "crm.objects.deals.read";
    readonly DEALS_WRITE: "crm.objects.deals.write";
    readonly COMPANIES_READ: "crm.objects.companies.read";
    readonly COMPANIES_WRITE: "crm.objects.companies.write";
    /**
     * Required for the OAuth authorization flow. Always include this scope.
     * HubSpot uses it to grant the token exchange itself.
     */
    readonly OAUTH: "oauth";
};
/**
 * Pre-composed HubSpot scope arrays for common access patterns.
 *
 * Pass one of these arrays to `manager.connect()` as the `scopes` option:
 *
 * ```ts
 * await manager.connect(operatorId, "hubspot", {
 *   scopes: HUBSPOT_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare const HUBSPOT_SCOPES: {
    /** Read-only access to contacts, deals, and companies. */
    readonly READ_ONLY: Scope[];
    /** Read and write access to contacts, deals, and companies. */
    readonly READ_WRITE: Scope[];
    /**
     * Full CRM access — read/write contacts, deals, and companies.
     * Extend with additional HubSpotScopes constants as your app adds more
     * object types (tickets, line items, etc.).
     */
    readonly FULL_CRM: Scope[];
};
/**
 * HubSpot CRM OAuth 2.0 provider.
 *
 * Supports read and write access to HubSpot CRM objects: contacts, deals,
 * companies, and any other object accessible via the HubSpot CRM API.
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, HubSpotProvider, HUBSPOT_SCOPES, PrismaConnectionStore } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["hubspot", new HubSpotProvider()]]),
 *   credentials: new Map([
 *     ["hubspot", {
 *       clientId: process.env.HUBSPOT_CLIENT_ID!,
 *       clientSecret: process.env.HUBSPOT_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "hubspot", {
 *   scopes: HUBSPOT_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare class HubSpotProvider implements Provider {
    readonly id: "hubspot";
    readonly displayName = "HubSpot";
    readonly iconUrl = "https://www.hubspot.com/favicon.ico";
    /**
     * Minimum default scope — includes `oauth` which HubSpot requires for the
     * authorization flow itself. Callers should pass additional CRM scopes via
     * the `scopes` option on `connect()`. Use `HUBSPOT_SCOPES.READ_ONLY` or
     * `HUBSPOT_SCOPES.READ_WRITE` as a starting point.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(_accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Xero OAuth 2.0 scope strings.
 *
 * Always include `OFFLINE_ACCESS` when you need token refresh. Without it,
 * Xero issues access-only tokens that cannot be refreshed.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "xero", {
 *   scopes: XERO_SCOPES.FULL_ACCOUNTING,
 * });
 * ```
 */
declare const XeroScopes: {
    readonly OPENID: "openid";
    readonly PROFILE: "profile";
    readonly EMAIL: "email";
    /**
     * Required for refresh tokens. Without this scope, Xero issues a
     * short-lived access token with no ability to refresh.
     */
    readonly OFFLINE_ACCESS: "offline_access";
    /** Read/write access to invoices, credit notes, bank transactions, etc. */
    readonly ACCOUNTING_TRANSACTIONS: "accounting.transactions";
    /** Read/write access to organisation settings, tax rates, accounts. */
    readonly ACCOUNTING_SETTINGS: "accounting.settings";
    /** Read/write access to contacts (customers, suppliers). */
    readonly ACCOUNTING_CONTACTS: "accounting.contacts";
    /** Read/write access to files and attachments. */
    readonly ACCOUNTING_ATTACHMENTS: "accounting.attachments";
    /** Read-only access to financial reports (P&L, balance sheet, etc.). */
    readonly ACCOUNTING_REPORTS_READ: "accounting.reports.read";
};
/**
 * Pre-composed Xero scope arrays for common access patterns.
 *
 * ```ts
 * await manager.connect(operatorId, "xero", {
 *   scopes: XERO_SCOPES.FULL_ACCOUNTING,
 * });
 * ```
 */
declare const XERO_SCOPES: {
    /** Identity only — openid, profile, email. No accounting access. */
    readonly IDENTITY_ONLY: Scope[];
    /**
     * Read-only accounting — identity + offline access + read-only financial
     * reports. Use when your app only needs to pull report data without
     * creating or modifying accounting records.
     */
    readonly READ_ONLY_ACCOUNTING: Scope[];
    /**
     * Full accounting access — identity + offline access + all accounting
     * scopes (transactions, settings, contacts, attachments, reports).
     */
    readonly FULL_ACCOUNTING: Scope[];
};
/**
 * Xero OAuth 2.0 provider.
 *
 * Supports read and write access to Xero accounting data: invoices, contacts,
 * bank transactions, reports, and all other resources accessible via the
 * Xero Accounting API.
 *
 * ### Refresh token rotation
 *
 * Xero rotates refresh tokens on every use. Each call to `refreshAccessToken`
 * invalidates the old refresh token and returns a new one. ConnectionManager
 * writes the new refresh token back to the store automatically — you do not
 * need to handle this manually.
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, XeroProvider, XERO_SCOPES } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["xero", new XeroProvider()]]),
 *   credentials: new Map([
 *     ["xero", {
 *       clientId: process.env.XERO_CLIENT_ID!,
 *       clientSecret: process.env.XERO_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "xero", {
 *   scopes: XERO_SCOPES.FULL_ACCOUNTING,
 * });
 * ```
 */
declare class XeroProvider implements Provider {
    readonly id: "xero";
    readonly displayName = "Xero";
    readonly iconUrl = "https://www.xero.com/favicon.ico";
    /**
     * Minimum identity scopes. Does not include `offline_access` — callers
     * that need refresh tokens must explicitly include `XeroScopes.OFFLINE_ACCESS`
     * or use one of the `XERO_SCOPES` groupings that already includes it.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Notion OAuth 2.0 provider.
 *
 * Enables access to Notion pages, databases, and workspace content that the
 * authorizing user explicitly shares during the OAuth flow.
 *
 * ### No refresh tokens
 *
 * Notion access tokens do not expire. `expiresAt` is always `undefined` for
 * Notion connections and ConnectionManager will never attempt to refresh them.
 * If a user revokes the integration from Notion, the stored token becomes
 * invalid and the next API call will fail with a 401 — handle this by
 * catching the error and prompting the user to reconnect.
 *
 * ### Scope
 *
 * Notion does not use granular scopes. The user selects pages/databases to
 * share during the authorization flow. Pass an empty scope list (or omit it)
 * when calling `connect()`:
 *
 * ```ts
 * await manager.connect(operatorId, "notion");
 * // scopes defaults to [] — correct for Notion
 * ```
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, NotionProvider } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["notion", new NotionProvider()]]),
 *   credentials: new Map([
 *     ["notion", {
 *       clientId: process.env.NOTION_CLIENT_ID!,
 *       clientSecret: process.env.NOTION_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "notion");
 * ```
 */
declare class NotionProvider implements Provider {
    readonly id: "notion";
    readonly displayName = "Notion";
    readonly iconUrl = "https://www.notion.so/favicon.ico";
    /**
     * Notion does not use OAuth scopes — access is workspace-level and
     * controlled by the user during the authorization flow. defaultScopes
     * is empty.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(_params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(_accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Common GitHub OAuth scope strings.
 *
 * Use individual constants to compose a custom scope list, or pass one of the
 * pre-grouped `GITHUB_SCOPES` arrays for the most common access patterns.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "github", {
 *   scopes: [GitHubScopes.REPO, GitHubScopes.USER_EMAIL],
 * });
 * ```
 */
declare const GitHubScopes: {
    /** Full control of private repositories (includes read access to all repos). */
    readonly REPO: "repo";
    /** Read/write access to public repositories only. */
    readonly PUBLIC_REPO: "public_repo";
    /** Read all user profile data. */
    readonly READ_USER: "read:user";
    /** Access user email addresses (read-only). */
    readonly USER_EMAIL: "user:email";
    /** Read-only access to organisation and team membership. */
    readonly READ_ORG: "read:org";
    /** Access notifications. */
    readonly NOTIFICATIONS: "notifications";
    /** Upload packages to GitHub Packages. */
    readonly WRITE_PACKAGES: "write:packages";
    /** Download packages from GitHub Packages. */
    readonly READ_PACKAGES: "read:packages";
};
/**
 * Pre-composed GitHub scope arrays for common access patterns.
 *
 * ```ts
 * await manager.connect(operatorId, "github", {
 *   scopes: GITHUB_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare const GITHUB_SCOPES: {
    /** Identity + read-only access to public repositories. */
    readonly READ_ONLY: Scope[];
    /** Full repository access + email. Covers most development integrations. */
    readonly READ_WRITE: Scope[];
    /**
     * Full development workflow — repository access, org membership, notifications,
     * and GitHub Packages read/write.
     */
    readonly FULL_DEV: Scope[];
};
/**
 * GitHub OAuth 2.0 provider.
 *
 * Enables access to repositories, organisations, notifications, and GitHub
 * Packages. Works with both classic OAuth Apps and GitHub Apps (with expiring
 * user tokens). Classic OAuth App tokens do not expire — `expiresAt` will be
 * `undefined` for those connections.
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, GitHubProvider, GITHUB_SCOPES } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["github", new GitHubProvider()]]),
 *   credentials: new Map([
 *     ["github", {
 *       clientId: process.env.GITHUB_CLIENT_ID!,
 *       clientSecret: process.env.GITHUB_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "github", {
 *   scopes: GITHUB_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare class GitHubProvider implements Provider {
    readonly id: "github";
    readonly displayName = "GitHub";
    readonly iconUrl = "https://github.com/favicon.ico";
    /**
     * Minimum identity scopes. Consumers that need repository access should pass
     * one of the `GITHUB_SCOPES` groupings or compose a custom scope list.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(_accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Linear OAuth 2.0 scope strings.
 *
 * Use individual constants to compose a custom scope list, or pass one of the
 * pre-grouped `LINEAR_SCOPES` arrays for the most common access patterns.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "linear", {
 *   scopes: [LinearScopes.READ, LinearScopes.ISSUES_CREATE],
 * });
 * ```
 */
declare const LinearScopes: {
    /** Read-only access to all Linear data (issues, projects, teams, etc.). */
    readonly READ: "read";
    /** Write access to all Linear data. */
    readonly WRITE: "write";
    /** Create issues without full write access. */
    readonly ISSUES_CREATE: "issues:create";
    /** Create comments without full write access. */
    readonly COMMENTS_CREATE: "comments:create";
    /** Full admin access including organisation settings and member management. */
    readonly ADMIN: "admin";
};
/**
 * Pre-composed Linear scope arrays for common access patterns.
 *
 * ```ts
 * await manager.connect(operatorId, "linear", {
 *   scopes: LINEAR_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare const LINEAR_SCOPES: {
    /** Read-only access to all Linear data. */
    readonly READ_ONLY: Scope[];
    /** Read and write access to all Linear data. */
    readonly READ_WRITE: Scope[];
    /**
     * Full admin access — read/write all data plus organisation settings and
     * member management. Use with caution; most integrations only need READ_WRITE.
     */
    readonly ADMIN: Scope[];
};
/**
 * Linear OAuth 2.0 provider.
 *
 * Enables access to Linear issues, projects, teams, cycles, and all other
 * resources accessible via the Linear API.
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, LinearProvider, LINEAR_SCOPES } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["linear", new LinearProvider()]]),
 *   credentials: new Map([
 *     ["linear", {
 *       clientId: process.env.LINEAR_CLIENT_ID!,
 *       clientSecret: process.env.LINEAR_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "linear", {
 *   scopes: LINEAR_SCOPES.READ_WRITE,
 * });
 * ```
 */
declare class LinearProvider implements Provider {
    readonly id: "linear";
    readonly displayName = "Linear";
    readonly iconUrl = "https://linear.app/favicon.ico";
    /** Minimum read-only scope. Use `LINEAR_SCOPES.READ_WRITE` for most integrations. */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

/**
 * Atlassian OAuth 2.0 scope strings for Jira and Confluence.
 *
 * Always include `OFFLINE_ACCESS` when you need token refresh. Without it,
 * Atlassian issues an access-only token that cannot be refreshed.
 *
 * @example
 * ```ts
 * const manager = new ConnectionManager({ ... });
 * await manager.connect(operatorId, "atlassian", {
 *   scopes: ATLASSIAN_SCOPES.JIRA_FULL,
 * });
 * ```
 */
declare const AtlassianScopes: {
    /**
     * Read the authenticated user's identity via the /me endpoint. Required for
     * `fetchUserInfo` to work.
     */
    readonly READ_ME: "read:me";
    /** Read Jira issues, projects, boards, sprints, and work items. */
    readonly READ_JIRA_WORK: "read:jira-work";
    /** Create and update Jira issues, comments, and work items. */
    readonly WRITE_JIRA_WORK: "write:jira-work";
    /** Read all Confluence pages, blog posts, and space content. */
    readonly READ_CONFLUENCE_CONTENT: "read:confluence-content.all";
    /** Create and update Confluence pages and blog posts. */
    readonly WRITE_CONFLUENCE_CONTENT: "write:confluence-content";
    /**
     * Required for refresh tokens. Without this scope, Atlassian issues a
     * short-lived access token with no ability to refresh.
     */
    readonly OFFLINE_ACCESS: "offline_access";
};
/**
 * Pre-composed Atlassian scope arrays for common access patterns.
 *
 * ```ts
 * await manager.connect(operatorId, "atlassian", {
 *   scopes: ATLASSIAN_SCOPES.JIRA_FULL,
 * });
 * ```
 */
declare const ATLASSIAN_SCOPES: {
    /**
     * Read-only Jira access — identity, read Jira work items, and token refresh.
     */
    readonly JIRA_READ_ONLY: Scope[];
    /**
     * Full Jira access — identity, read/write Jira work items, and token refresh.
     */
    readonly JIRA_FULL: Scope[];
    /**
     * Full Confluence access — identity, read/write all Confluence content, and
     * token refresh.
     */
    readonly CONFLUENCE_FULL: Scope[];
    /**
     * Combined Jira + Confluence full access — all scopes above. Use when your
     * integration needs to work across both products.
     */
    readonly FULL_ALL: Scope[];
};
/**
 * Atlassian OAuth 2.0 (3LO) provider.
 *
 * Enables access to Jira and Confluence through the Atlassian Cloud API. A
 * single OAuth connection covers both products — scope selection determines
 * which products and operations are accessible.
 *
 * ### offline_access required for refresh
 *
 * Always include `AtlassianScopes.OFFLINE_ACCESS` (or use one of the
 * `ATLASSIAN_SCOPES` groupings that already includes it) when you need token
 * refresh. Without it, Atlassian issues access-only tokens that expire after
 * 1 hour and cannot be refreshed.
 *
 * ### Quick start
 *
 * ```ts
 * import { ConnectionManager, AtlassianProvider, ATLASSIAN_SCOPES } from "@sentinel-ai-solutions/agent-kit/connections";
 *
 * const manager = new ConnectionManager({
 *   store,
 *   providers: new Map([["atlassian", new AtlassianProvider()]]),
 *   credentials: new Map([
 *     ["atlassian", {
 *       clientId: process.env.ATLASSIAN_CLIENT_ID!,
 *       clientSecret: process.env.ATLASSIAN_CLIENT_SECRET!,
 *     }],
 *   ]),
 *   defaultRedirectUri: "https://myapp.com/auth/callback",
 * });
 *
 * const { authorizationUrl } = await manager.connect(operatorId, "atlassian", {
 *   scopes: ATLASSIAN_SCOPES.JIRA_FULL,
 * });
 * ```
 */
declare class AtlassianProvider implements Provider {
    readonly id: "atlassian";
    readonly displayName = "Atlassian";
    readonly iconUrl = "https://www.atlassian.com/favicon.ico";
    /**
     * Minimum identity scopes including offline_access for token refresh.
     * Callers that need Jira or Confluence access should pass one of the
     * `ATLASSIAN_SCOPES` groupings.
     */
    readonly defaultScopes: Scope[];
    buildAuthorizationUrl(params: {
        clientId: string;
        redirectUri: string;
        scopes: Scope[];
        state: string;
        operatorId?: string;
    }): string;
    exchangeCode(params: {
        clientId: string;
        clientSecret: string;
        code: string;
        redirectUri: string;
    }): Promise<TokenResponse>;
    refreshAccessToken(params: {
        clientId: string;
        clientSecret: string;
        refreshToken: string;
    }): Promise<TokenResponse>;
    revokeAccess(_accessToken: string): Promise<void>;
    fetchUserInfo(accessToken: string): Promise<Record<string, unknown>>;
    private parseTokenResponse;
}

declare const index_ATLASSIAN_SCOPES: typeof ATLASSIAN_SCOPES;
type index_AtlassianProvider = AtlassianProvider;
declare const index_AtlassianProvider: typeof AtlassianProvider;
declare const index_AtlassianScopes: typeof AtlassianScopes;
type index_Connection = Connection;
type index_ConnectionCrypto = ConnectionCrypto;
declare const index_ConnectionCrypto: typeof ConnectionCrypto;
type index_ConnectionCryptoConfig = ConnectionCryptoConfig;
type index_ConnectionManager = ConnectionManager;
declare const index_ConnectionManager: typeof ConnectionManager;
type index_ConnectionManagerConfig = ConnectionManagerConfig;
type index_ConnectionPrismaClient = ConnectionPrismaClient;
type index_ConnectionStartResult = ConnectionStartResult;
type index_ConnectionStatus = ConnectionStatus;
type index_ConnectionStore = ConnectionStore;
type index_EncryptedConnectionRow = EncryptedConnectionRow;
declare const index_GITHUB_SCOPES: typeof GITHUB_SCOPES;
type index_GitHubProvider = GitHubProvider;
declare const index_GitHubProvider: typeof GitHubProvider;
declare const index_GitHubScopes: typeof GitHubScopes;
type index_GoogleProvider = GoogleProvider;
declare const index_GoogleProvider: typeof GoogleProvider;
declare const index_GoogleScopes: typeof GoogleScopes;
declare const index_HUBSPOT_SCOPES: typeof HUBSPOT_SCOPES;
type index_HubSpotProvider = HubSpotProvider;
declare const index_HubSpotProvider: typeof HubSpotProvider;
declare const index_HubSpotScopes: typeof HubSpotScopes;
declare const index_LINEAR_SCOPES: typeof LINEAR_SCOPES;
type index_LinearProvider = LinearProvider;
declare const index_LinearProvider: typeof LinearProvider;
declare const index_LinearScopes: typeof LinearScopes;
type index_MemoryConnectionStore = MemoryConnectionStore;
declare const index_MemoryConnectionStore: typeof MemoryConnectionStore;
type index_MicrosoftGraphProvider = MicrosoftGraphProvider;
declare const index_MicrosoftGraphProvider: typeof MicrosoftGraphProvider;
declare const index_MicrosoftGraphScopes: typeof MicrosoftGraphScopes;
type index_NoConnectionError = NoConnectionError;
declare const index_NoConnectionError: typeof NoConnectionError;
type index_NotionProvider = NotionProvider;
declare const index_NotionProvider: typeof NotionProvider;
type index_OAuthExchangeError = OAuthExchangeError;
declare const index_OAuthExchangeError: typeof OAuthExchangeError;
type index_PrismaConnectionStore = PrismaConnectionStore;
declare const index_PrismaConnectionStore: typeof PrismaConnectionStore;
type index_Provider = Provider;
type index_ProviderName = ProviderName;
type index_ProviderNotRegisteredError = ProviderNotRegisteredError;
declare const index_ProviderNotRegisteredError: typeof ProviderNotRegisteredError;
type index_Scope = Scope;
type index_SlackProvider = SlackProvider;
declare const index_SlackProvider: typeof SlackProvider;
declare const index_SlackScopes: typeof SlackScopes;
type index_TokenRefreshError = TokenRefreshError;
declare const index_TokenRefreshError: typeof TokenRefreshError;
type index_TokenResponse = TokenResponse;
declare const index_XERO_SCOPES: typeof XERO_SCOPES;
type index_XeroProvider = XeroProvider;
declare const index_XeroProvider: typeof XeroProvider;
declare const index_XeroScopes: typeof XeroScopes;
declare namespace index {
  export { index_ATLASSIAN_SCOPES as ATLASSIAN_SCOPES, index_AtlassianProvider as AtlassianProvider, index_AtlassianScopes as AtlassianScopes, type index_Connection as Connection, index_ConnectionCrypto as ConnectionCrypto, type index_ConnectionCryptoConfig as ConnectionCryptoConfig, index_ConnectionManager as ConnectionManager, type index_ConnectionManagerConfig as ConnectionManagerConfig, type index_ConnectionPrismaClient as ConnectionPrismaClient, type index_ConnectionStartResult as ConnectionStartResult, type index_ConnectionStatus as ConnectionStatus, type index_ConnectionStore as ConnectionStore, type index_EncryptedConnectionRow as EncryptedConnectionRow, index_GITHUB_SCOPES as GITHUB_SCOPES, index_GitHubProvider as GitHubProvider, index_GitHubScopes as GitHubScopes, index_GoogleProvider as GoogleProvider, index_GoogleScopes as GoogleScopes, index_HUBSPOT_SCOPES as HUBSPOT_SCOPES, index_HubSpotProvider as HubSpotProvider, index_HubSpotScopes as HubSpotScopes, index_LINEAR_SCOPES as LINEAR_SCOPES, index_LinearProvider as LinearProvider, index_LinearScopes as LinearScopes, index_MemoryConnectionStore as MemoryConnectionStore, index_MicrosoftGraphProvider as MicrosoftGraphProvider, index_MicrosoftGraphScopes as MicrosoftGraphScopes, index_NoConnectionError as NoConnectionError, index_NotionProvider as NotionProvider, index_OAuthExchangeError as OAuthExchangeError, index_PrismaConnectionStore as PrismaConnectionStore, type index_Provider as Provider, type index_ProviderName as ProviderName, index_ProviderNotRegisteredError as ProviderNotRegisteredError, type index_Scope as Scope, index_SlackProvider as SlackProvider, index_SlackScopes as SlackScopes, index_TokenRefreshError as TokenRefreshError, type index_TokenResponse as TokenResponse, index_XERO_SCOPES as XERO_SCOPES, index_XeroProvider as XeroProvider, index_XeroScopes as XeroScopes };
}

export { ATLASSIAN_SCOPES as A, type TokenResponse as B, type Connection as C, XeroProvider as D, type EncryptedConnectionRow as E, XeroScopes as F, GITHUB_SCOPES as G, HUBSPOT_SCOPES as H, index as I, LINEAR_SCOPES as L, MemoryConnectionStore as M, NoConnectionError as N, OAuthExchangeError as O, PrismaConnectionStore as P, type Scope as S, TokenRefreshError as T, XERO_SCOPES as X, AtlassianProvider as a, AtlassianScopes as b, ConnectionCrypto as c, type ConnectionCryptoConfig as d, ConnectionManager as e, type ConnectionManagerConfig as f, type ConnectionPrismaClient as g, type ConnectionStartResult as h, type ConnectionStatus as i, type ConnectionStore as j, GitHubProvider as k, GitHubScopes as l, GoogleProvider as m, GoogleScopes as n, HubSpotProvider as o, HubSpotScopes as p, LinearProvider as q, LinearScopes as r, MicrosoftGraphProvider as s, MicrosoftGraphScopes as t, NotionProvider as u, type Provider as v, type ProviderName as w, ProviderNotRegisteredError as x, SlackProvider as y, SlackScopes as z };
