import { Identifiable } from '../model/base/Identifiable.mjs'; /** * * Events that a subscription observes. */ export type EntitySubscriptionEvent> = typeof EntitySubscriptionEvent.Connected | typeof EntitySubscriptionEvent.Reconnected | typeof EntitySubscriptionEvent.ClosedByClient | EntitySubscriptionEvent.UnexpectedError | EntitySubscriptionEvent.ConnectionError | EntitySubscriptionEvent.EntityNotification | EntitySubscriptionEvent.EntityError; export declare namespace EntitySubscriptionEvent { const Connected: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.Connected'; }; const Reconnected: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.Reconnected'; }; const ClosedByClient: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.ClosedByClient'; }; /** * * A general unexpected error. */ class UnexpectedError { /** * A general unexpected error. * / */ message: string; readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.UnexpectedError'; constructor(partial: Partial & Pick); } namespace ConnectionError { const MissedPing: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.ConnectionError.MissedPing'; }; const ClosedByServer: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.ConnectionError.ClosedByServer'; }; const ConnectionLost: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.ConnectionError.ConnectionLost'; }; } /** * * There was an error in the connection with the backend. */ type ConnectionError = typeof ConnectionError.MissedPing | typeof ConnectionError.ClosedByServer | typeof ConnectionError.ConnectionLost; /** * * A change has been made to an entity that matches the configured filters. * @param entity the updated entity. */ class EntityNotification> { entity: E; readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.EntityNotification'; constructor(partial: Partial> & Pick, "entity">); } namespace EntityError { const DeserializationError: { readonly $ktClass: 'com.icure.cardinal.sdk.subscription.EntitySubscriptionEvent.EntityError.DeserializationError'; }; } /** * * The backend has notified the subscription of a change to an entity, but the entity can't be used by the client. */ type EntityError = typeof EntityError.DeserializationError; }