import type { MastraWorker } from '@mastra/core/worker'; import type { IntegrationConnection } from '../../../capabilities/connection.js'; import type { IntegrationContext } from '../../base.js'; import { GitLabApiClient } from '../../gitlab/api.js'; import type { GitLabRuleOverrides } from '../../gitlab/default-rules.js'; import { GitLabIntegrationBase } from '../../gitlab/integration.js'; import type { GitLabStatusConnection } from '../../gitlab/integration.js'; import type { PlatformApiClientConfig } from '../api-client.js'; interface PlatformIntegrationConnection { id: string; integrationId: string; status: 'active' | 'needs_reauth'; accountLabel: string | null; } interface PlatformGitLabContext { id: string; label: string | null; api: GitLabApiClient; connection: IntegrationConnection; host: string; repositoryAccessToken: () => Promise; } export interface PlatformGitLabIntegrationConfig { rules?: GitLabRuleOverrides; clientConfig?: PlatformApiClientConfig; connectionId?: string; /** * Optional. Only a direct project webhook to `/web/gitlab/webhook` needs it; * a Platform-connected deployment receives events by polling instead. */ webhookSecret?: string; /** Defaults to `MASTRA_PLATFORM_GITLAB_POLLING_ENABLED`, and to true when that is unset. */ pollingEnabled?: boolean; /** Defaults to `MASTRA_PLATFORM_GITLAB_POLLING_INTERVAL_MS`, and to the worker's 20 s when unset. */ pollingIntervalMs?: number; } export declare class PlatformGitLabIntegration extends GitLabIntegrationBase { #private; constructor(config?: PlatformGitLabIntegrationConfig); listConnections(): Promise; statusConnections(): Promise; hasActiveConnections(): Promise; authFailureMessage(): string; protected get webhookSecret(): string | undefined; protected activeContexts(): Promise; protected contextById(connectionId: string): Promise; /** * The reconcile sweeps from the base class plus, when polling is on, the * Platform event poller. Polling replaces the direct project webhook: the * webhook route stays mounted for deployments that also configured a secret, * but nothing in Platform mode requires one. */ workers(ctx: IntegrationContext): MastraWorker[]; diagnostics(): Record; } export {}; //# sourceMappingURL=integration.d.ts.map