import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import type { CallContext, CallOptions } from "nice-grpc-common"; import { Empty } from "./google/protobuf/empty"; import { Guid } from "./protobuf-net/bcl"; export declare const protobufPackage = "Cratis.Chronicle.Contracts.Observation"; export declare enum FailureKind { FAILURE_KIND_Unknown = 0, Handling = 1, Timeout = 2, FAILURE_KIND_Disconnected = 3, UNRECOGNIZED = -1 } export declare function failureKindFromJSON(object: any): FailureKind; export declare function failureKindToJSON(object: FailureKind): string; export declare enum ObserverOwner { None = 0, Client = 1, Kernel = 2, UNRECOGNIZED = -1 } export declare function observerOwnerFromJSON(object: any): ObserverOwner; export declare function observerOwnerToJSON(object: ObserverOwner): string; export declare enum ObserverRunningState { OBSERVER_RUNNING_STATE_Unknown = 0, Active = 1, Suspended = 2, Replaying = 3, OBSERVER_RUNNING_STATE_Disconnected = 4, Quarantined = 5, UNRECOGNIZED = -1 } export declare function observerRunningStateFromJSON(object: any): ObserverRunningState; export declare function observerRunningStateToJSON(object: ObserverRunningState): string; export declare enum ObserverType { OBSERVER_TYPE_Unknown = 0, Reactor = 1, Projection = 2, Reducer = 3, External = 4, UNRECOGNIZED = -1 } export declare function observerTypeFromJSON(object: any): ObserverType; export declare function observerTypeToJSON(object: ObserverType): string; export declare enum PartitionRecoveryOutcome { Started = 0, PartitionNotFound = 1, ObserverQuarantined = 2, PartitionQuarantined = 3, UNRECOGNIZED = -1 } export declare function partitionRecoveryOutcomeFromJSON(object: any): PartitionRecoveryOutcome; export declare function partitionRecoveryOutcomeToJSON(object: PartitionRecoveryOutcome): string; export interface AllObserversRequest { EventStore: string; Namespace: string; } export interface ClearFailedPartitions { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; } export interface ClearObserverQuarantine { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; } export interface ConnectedClient { ConnectionId: string; Version: string; LastSeen: SerializableDateTimeOffset | undefined; IsRunningWithDebugger: boolean; SiloAddress: string; ProcessId: number; ProcessPath: string; MachineName: string; ClientType: string; } export interface EventType { Id: string; Generation: number; Tombstone: boolean; } export interface FailedPartition { Id: Guid | undefined; ObserverId: string; Partition: string; Attempts: FailedPartitionAttempt[]; IsResolved: boolean; IsQuarantined: boolean; } export interface FailedPartitionAttempt { Occurred: SerializableDateTimeOffset | undefined; SequenceNumber: bigint; Messages: string[]; StackTrace: string; Kind: FailureKind; } export interface GetConnectedClientsForObserverRequest { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; } export interface GetFailedPartitionsRequest { EventStore: string; Namespace: string; ObserverId: string; } export interface GetObserverInformationRequest { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; } export interface GetReplayableObserversForEventTypesRequest { EventStore: string; Namespace: string; EventTypes: EventType[]; } export interface IEnumerableConnectedClient { items: ConnectedClient[]; } export interface IEnumerableFailedPartition { items: FailedPartition[]; } export interface IEnumerableObserverInformation { items: ObserverInformation[]; } export interface ObserverInformation { Id: string; EventSequenceId: string; Type: ObserverType; Owner: ObserverOwner; EventTypes: EventType[]; NextEventSequenceNumber: bigint; LastHandledEventSequenceNumber: bigint; RunningState: ObserverRunningState; IsSubscribed: boolean; IsReplayable: boolean; TailEventSequenceNumber: bigint; HandledEventCount: bigint; } export interface Replay { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; } export interface ReplayPartition { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; Partition: string; } export interface ReplayResponse { JobId: string; } export interface RetryPartition { EventStore: string; Namespace: string; ObserverId: string; EventSequenceId: string; Partition: string; } export interface RetryPartitionResponse { Outcome: PartitionRecoveryOutcome; } export interface SerializableDateTimeOffset { Value: string; } export interface WaitForObserverCompletionRequest { EventStore: string; Namespace: string; EventSequenceId: string; TailEventSequenceNumber: bigint; } export interface WaitForObserverCompletionResponse { IsSuccess: boolean; FailedPartitions: FailedPartition[]; } export declare const AllObserversRequest: MessageFns; export declare const ClearFailedPartitions: MessageFns; export declare const ClearObserverQuarantine: MessageFns; export declare const ConnectedClient: MessageFns; export declare const EventType: MessageFns; export declare const FailedPartition: MessageFns; export declare const FailedPartitionAttempt: MessageFns; export declare const GetConnectedClientsForObserverRequest: MessageFns; export declare const GetFailedPartitionsRequest: MessageFns; export declare const GetObserverInformationRequest: MessageFns; export declare const GetReplayableObserversForEventTypesRequest: MessageFns; export declare const IEnumerableConnectedClient: MessageFns; export declare const IEnumerableFailedPartition: MessageFns; export declare const IEnumerableObserverInformation: MessageFns; export declare const ObserverInformation: MessageFns; export declare const Replay: MessageFns; export declare const ReplayPartition: MessageFns; export declare const ReplayResponse: MessageFns; export declare const RetryPartition: MessageFns; export declare const RetryPartitionResponse: MessageFns; export declare const SerializableDateTimeOffset: MessageFns; export declare const WaitForObserverCompletionRequest: MessageFns; export declare const WaitForObserverCompletionResponse: MessageFns; export type FailedPartitionsDefinition = typeof FailedPartitionsDefinition; export declare const FailedPartitionsDefinition: { readonly name: "FailedPartitions"; readonly fullName: "Cratis.Chronicle.Contracts.Observation.FailedPartitions"; readonly methods: { readonly getFailedPartitions: { readonly name: "GetFailedPartitions"; readonly requestType: typeof GetFailedPartitionsRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableFailedPartition; readonly responseStream: false; readonly options: {}; }; readonly observeFailedPartitions: { readonly name: "ObserveFailedPartitions"; readonly requestType: typeof GetFailedPartitionsRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableFailedPartition; readonly responseStream: true; readonly options: {}; }; }; }; export interface FailedPartitionsServiceImplementation { getFailedPartitions(request: GetFailedPartitionsRequest, context: CallContext & CallContextExt): Promise>; observeFailedPartitions(request: GetFailedPartitionsRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult>; } export interface FailedPartitionsClient { getFailedPartitions(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; observeFailedPartitions(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; } export type ObserversDefinition = typeof ObserversDefinition; export declare const ObserversDefinition: { readonly name: "Observers"; readonly fullName: "Cratis.Chronicle.Contracts.Observation.Observers"; readonly methods: { readonly clearFailedPartitions: { readonly name: "ClearFailedPartitions"; readonly requestType: typeof ClearFailedPartitions; readonly requestStream: false; readonly responseType: typeof Empty; readonly responseStream: false; readonly options: {}; }; readonly clearObserverQuarantine: { readonly name: "ClearObserverQuarantine"; readonly requestType: typeof ClearObserverQuarantine; readonly requestStream: false; readonly responseType: typeof Empty; readonly responseStream: false; readonly options: {}; }; readonly getConnectedClientsForObserver: { readonly name: "GetConnectedClientsForObserver"; readonly requestType: typeof GetConnectedClientsForObserverRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableConnectedClient; readonly responseStream: false; readonly options: {}; }; readonly getObserverInformation: { readonly name: "GetObserverInformation"; readonly requestType: typeof GetObserverInformationRequest; readonly requestStream: false; readonly responseType: typeof ObserverInformation; readonly responseStream: false; readonly options: {}; }; readonly getObservers: { readonly name: "GetObservers"; readonly requestType: typeof AllObserversRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableObserverInformation; readonly responseStream: false; readonly options: {}; }; readonly getReplayableObserversForEventTypes: { readonly name: "GetReplayableObserversForEventTypes"; readonly requestType: typeof GetReplayableObserversForEventTypesRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableObserverInformation; readonly responseStream: false; readonly options: {}; }; readonly observeObservers: { readonly name: "ObserveObservers"; readonly requestType: typeof AllObserversRequest; readonly requestStream: false; readonly responseType: typeof IEnumerableObserverInformation; readonly responseStream: true; readonly options: {}; }; readonly replay: { readonly name: "Replay"; readonly requestType: typeof Replay; readonly requestStream: false; readonly responseType: typeof ReplayResponse; readonly responseStream: false; readonly options: {}; }; readonly replayPartition: { readonly name: "ReplayPartition"; readonly requestType: typeof ReplayPartition; readonly requestStream: false; readonly responseType: typeof Empty; readonly responseStream: false; readonly options: {}; }; readonly retryPartition: { readonly name: "RetryPartition"; readonly requestType: typeof RetryPartition; readonly requestStream: false; readonly responseType: typeof RetryPartitionResponse; readonly responseStream: false; readonly options: {}; }; readonly waitForCompletion: { readonly name: "WaitForCompletion"; readonly requestType: typeof WaitForObserverCompletionRequest; readonly requestStream: false; readonly responseType: typeof WaitForObserverCompletionResponse; readonly responseStream: false; readonly options: {}; }; }; }; export interface ObserversServiceImplementation { clearFailedPartitions(request: ClearFailedPartitions, context: CallContext & CallContextExt): Promise>; clearObserverQuarantine(request: ClearObserverQuarantine, context: CallContext & CallContextExt): Promise>; getConnectedClientsForObserver(request: GetConnectedClientsForObserverRequest, context: CallContext & CallContextExt): Promise>; getObserverInformation(request: GetObserverInformationRequest, context: CallContext & CallContextExt): Promise>; getObservers(request: AllObserversRequest, context: CallContext & CallContextExt): Promise>; getReplayableObserversForEventTypes(request: GetReplayableObserversForEventTypesRequest, context: CallContext & CallContextExt): Promise>; observeObservers(request: AllObserversRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult>; replay(request: Replay, context: CallContext & CallContextExt): Promise>; replayPartition(request: ReplayPartition, context: CallContext & CallContextExt): Promise>; retryPartition(request: RetryPartition, context: CallContext & CallContextExt): Promise>; waitForCompletion(request: WaitForObserverCompletionRequest, context: CallContext & CallContextExt): Promise>; } export interface ObserversClient { clearFailedPartitions(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; clearObserverQuarantine(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; getConnectedClientsForObserver(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; getObserverInformation(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; getObservers(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; getReplayableObserversForEventTypes(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; observeObservers(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; replay(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; replayPartition(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; retryPartition(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; waitForCompletion(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined; export type DeepPartial = T extends bigint ? string | number | bigint : T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export type ServerStreamingMethodResult = { [Symbol.asyncIterator](): AsyncIterator; }; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {}; //# sourceMappingURL=observation.d.ts.map