import type * as C from '@apollo/client'; import type { ComponentDocument, Data, OnSubscriptionDataParams, Variables, VariablesOf } from '@apollo-elements/core/types'; import { ApolloElement } from './apollo-element.js'; import { ApolloSubscriptionController } from '@apollo-elements/core/apollo-subscription-controller'; /** * `ApolloSubscription` * * 🚀 LitElement base class that updates with an Apollo GraphQL subscription. * * See [`ApolloSubscriptionInterface`](https://apolloelements.dev/api/core/interfaces/subscription) for more information on events * */ export declare class ApolloSubscription> extends ApolloElement { static readonly is = "apollo-subscription"; controller: ApolloSubscriptionController; /** @summary Flags an element that's ready and able to auto subscribe */ get canAutoSubscribe(): boolean; /** * @summary A GraphQL document containing a single subscription. */ subscription: ComponentDocument | null; /** * @summary If true, the element will not begin querying data until you manually call `subscribe` * @attr no-auto-subscribe */ noAutoSubscribe: boolean; /** * @summary Whether or not updates to the network status should trigger next on the observer of this subscription. */ notifyOnNetworkStatusChange?: boolean; /** * @summary Determines if your subscription should be unsubscribed and subscribed again. */ shouldResubscribe: boolean; /** * @summary If true, the query will be skipped entirely */ skip: boolean; /** * @summary Error policy for the subscription */ errorPolicy?: C.ErrorPolicy; /** * @summary Specifies the FetchPolicy to be used for this subscription. * @attr fetch-policy */ fetchPolicy?: C.FetchPolicy; /** * @summary The time interval (in milliseconds) on which this subscription should be refetched from the server. */ pollInterval?: number; /** * @summary Resets the observable and subscribes. */ subscribe(...args: Parameters): void; /** * @summary Cancels and clears the subscription */ cancel(): void; /** * Determines whether the element should attempt to subscribe automatically * Override to prevent subscribing unless your conditions are met */ shouldSubscribe(options?: Partial, Variables>>): boolean; /** * Callback for when data is updated */ onSubscriptionData?(result: OnSubscriptionDataParams>): void; /** * Callback for when error is updated */ onError?(error: Error): void; /** * Callback for when subscription completes. */ onSubscriptionComplete?(): void; }