import { ApolloLink, Observable, FetchResult, Operation } from '@apollo/client/core'; export interface SSELinkOptions { /** SSE endpoint URL */ url: string; /** Optional headers to include with requests */ headers?: Record; /** Enable debug logging */ debug?: boolean; } /** * SSE Link for GraphQL Yoga subscriptions * * GraphQL Yoga uses Server-Sent Events (SSE) for subscriptions over HTTP. * This is more compatible with serverless and edge deployments than WebSockets. * * SSE Format: * - event: next\ndata: {...}\n\n - Subscription data * - event: complete\n\n - Subscription ended * - event: error\ndata: {...}\n\n - Error occurred * * @example * ```ts * import { SSELink } from '@burdenoff/fe-libs/shared/graphql/links/sse-link'; * * const sseLink = new SSELink({ * url: 'https://gw-wspace.local.burdenoff.com/workspaces/graphql/stream', * headers: { * authorization: `Bearer ${token}`, * }, * }); * ``` */ export declare class SSELink extends ApolloLink { private url; private headers; private debug; constructor(options: SSELinkOptions); /** * Update headers (useful for token refresh) */ setHeaders(headers: Record): void; /** * Update the authorization header */ setAuthToken(token: string | null): void; request(operation: Operation): Observable; } //# sourceMappingURL=sse-link.d.ts.map