@event-driven-io/emmett-postgresql 0.43.0-beta.12 → 0.43.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,214 +1,251 @@
1
- import { SQLExecutor, Dumbo, QueryResultRow, SQL, RunSQLMigrationsResult, SQLMigration, DatabaseTransaction, AnyConnection, MigrationStyle } from '@event-driven-io/dumbo';
2
- import * as _event_driven_io_emmett from '@event-driven-io/emmett';
3
- import { ProcessorCheckpoint, Message, BatchRecordedMessageHandlerWithoutContext, ReadEventMetadataWithGlobalPosition, EmmettError, ProjectionHandlingType, ProjectionRegistration, ProjectionDefinition, AnyReadEventMetadata, DefaultRecord, Event, ReadEvent, CanHandle, EventStoreReadSchemaOptions, JSONSerializationOptions, TruncateProjection, ThenThrows, RecordedMessage, AppendToStreamOptions, RecordedMessageMetadata, RecordedMessageMetadataWithGlobalPosition, ReadStreamOptions, ReadStreamResult, StreamExistsResult, ProjectionHandler, ProjectionInitOptions, EventStore, EventStoreSessionFactory, AppendToStreamResultWithGlobalPosition, AnyMessage, Checkpointer, ReactorOptions, MessageProcessor, AnyEvent, AnyCommand, AnyRecordedMessageMetadata, WorkflowProcessorContext, WorkflowProcessorOptions, ProjectorOptions, BatchRecordedMessageHandlerWithContext, SingleRecordedMessageHandlerWithContext, MessageConsumerOptions, MessageConsumer } from '@event-driven-io/emmett';
4
- import { PgPoolOptions, PgTransaction, PgPool, PgClient, PgDriverType, PgPoolClientConnection, PgClientConnection } from '@event-driven-io/dumbo/pg';
5
- import pg from 'pg';
6
- import { PongoDocument, PongoDBCollectionOptions, PongoClient, WithId, PongoFilter } from '@event-driven-io/pongo';
1
+ import { AnyConnection, DatabaseTransaction, Dumbo, MigrationStyle, QueryResultRow, RunSQLMigrationsResult, SQL, SQLExecutor, SQLMigration } from "@event-driven-io/dumbo";
2
+ import * as _$_event_driven_io_emmett0 from "@event-driven-io/emmett";
3
+ import { AnyCommand, AnyEvent, AnyMessage, AnyReadEventMetadata, AnyRecordedMessageMetadata, AppendToStreamOptions, AppendToStreamResultWithGlobalPosition, AsyncAwaiter, BatchRecordedMessageHandlerWithContext, BatchRecordedMessageHandlerWithoutContext, CanHandle, Checkpointer, DefaultRecord, EmmettError, Event, EventStore, EventStoreReadSchemaOptions, EventStoreSessionFactory, JSONSerializationOptions, Message, MessageConsumer, MessageConsumerOptions, MessageProcessor, ProcessorCheckpoint, ProjectionDefinition, ProjectionHandler, ProjectionHandlingType, ProjectionInitOptions, ProjectionRegistration, ProjectorOptions, ReactorOptions, ReadEvent, ReadEventMetadataWithGlobalPosition, ReadStreamOptions, ReadStreamResult, RecordedMessage, RecordedMessageMetadata, RecordedMessageMetadataWithGlobalPosition, SingleRecordedMessageHandlerWithContext, StreamExistsResult, ThenThrows, TruncateProjection, WorkflowProcessorContext, WorkflowProcessorOptions } from "@event-driven-io/emmett";
4
+ import { PgClient, PgClientConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
5
+ import pg from "pg";
6
+ import { PongoClient, PongoDBCollectionOptions, PongoDocument, PongoFilter, WithId } from "@event-driven-io/pongo";
7
7
 
8
+ //#region src/eventStore/consumers/messageBatchProcessing/index.d.ts
8
9
  declare const DefaultPostgreSQLEventStoreProcessorBatchSize = 100;
9
10
  declare const DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs = 50;
10
11
  type PostgreSQLEventStoreMessagesBatchHandlerResult = void | {
11
- type: 'STOP';
12
- reason?: string;
13
- error?: EmmettError;
12
+ type: 'STOP';
13
+ reason?: string;
14
+ error?: EmmettError;
14
15
  };
15
16
  type PostgreSQLEventStoreMessageBatchPullerOptions<MessageType extends Message = Message> = {
16
- executor: SQLExecutor;
17
- pullingFrequencyInMs: number;
18
- batchSize: number;
19
- eachBatch: BatchRecordedMessageHandlerWithoutContext<MessageType, ReadEventMetadataWithGlobalPosition>;
20
- stopWhen?: {
21
- noMessagesLeft?: boolean;
22
- };
23
- signal: AbortSignal;
17
+ executor: SQLExecutor;
18
+ pullingFrequencyInMs: number;
19
+ batchSize: number;
20
+ eachBatch: BatchRecordedMessageHandlerWithoutContext<MessageType, ReadEventMetadataWithGlobalPosition>;
21
+ stopWhen?: {
22
+ noMessagesLeft?: boolean;
23
+ };
24
+ signal: AbortSignal;
24
25
  };
25
26
  type PostgreSQLEventStoreMessageBatchPullerStartFrom = {
26
- lastCheckpoint: ProcessorCheckpoint;
27
+ lastCheckpoint: ProcessorCheckpoint;
27
28
  } | 'BEGINNING' | 'END';
28
29
  type PostgreSQLEventStoreMessageBatchPullerStartOptions = {
29
- startFrom: PostgreSQLEventStoreMessageBatchPullerStartFrom;
30
- signal?: AbortSignal;
30
+ startFrom: PostgreSQLEventStoreMessageBatchPullerStartFrom;
31
+ signal?: AbortSignal;
32
+ started?: AsyncAwaiter<void>;
31
33
  };
32
34
  type PostgreSQLEventStoreMessageBatchPuller = {
33
- isRunning: boolean;
34
- start(options: PostgreSQLEventStoreMessageBatchPullerStartOptions): Promise<void>;
35
- stop(): Promise<void>;
36
- };
37
- declare const postgreSQLEventStoreMessageBatchPuller: <MessageType extends Message = Message>({ executor, batchSize, eachBatch, pullingFrequencyInMs, stopWhen, signal, }: PostgreSQLEventStoreMessageBatchPullerOptions<MessageType>) => PostgreSQLEventStoreMessageBatchPuller;
35
+ isRunning: boolean;
36
+ start(options: PostgreSQLEventStoreMessageBatchPullerStartOptions): Promise<void>;
37
+ stop(): Promise<void>;
38
+ };
39
+ declare const postgreSQLEventStoreMessageBatchPuller: <MessageType extends Message = Message>({
40
+ executor,
41
+ batchSize,
42
+ eachBatch,
43
+ pullingFrequencyInMs,
44
+ stopWhen,
45
+ signal
46
+ }: PostgreSQLEventStoreMessageBatchPullerOptions<MessageType>) => PostgreSQLEventStoreMessageBatchPuller;
38
47
  declare const zipPostgreSQLEventStoreMessageBatchPullerStartFrom: (options: (PostgreSQLEventStoreMessageBatchPullerStartFrom | undefined)[]) => PostgreSQLEventStoreMessageBatchPullerStartFrom;
39
-
48
+ //#endregion
49
+ //#region src/eventStore/projections/locks/tryAcquireProcessorLock.d.ts
40
50
  type TryAcquireProcessorLockOptions = {
41
- processorId: string;
51
+ processorId: string;
52
+ version: number;
53
+ partition: string;
54
+ processorInstanceId: string;
55
+ projection?: {
56
+ name: string;
57
+ handlingType: ProjectionHandlingType;
58
+ kind: string;
42
59
  version: number;
43
- partition: string;
44
- processorInstanceId: string;
45
- projection?: {
46
- name: string;
47
- handlingType: ProjectionHandlingType;
48
- kind: string;
49
- version: number;
50
- };
51
- lockKey: string | bigint;
52
- lockTimeoutSeconds?: number;
60
+ };
61
+ lockKey: string | bigint;
62
+ lockTimeoutSeconds?: number;
53
63
  };
54
64
  type LockAcquisitionPolicy = {
55
- type: 'fail';
65
+ type: 'fail';
56
66
  } | {
57
- type: 'skip';
67
+ type: 'skip';
58
68
  } | {
59
- type: 'retry';
60
- retries: number;
61
- minTimeout?: number;
62
- maxTimeout?: number;
69
+ type: 'retry';
70
+ retries: number;
71
+ minTimeout?: number;
72
+ maxTimeout?: number;
63
73
  };
64
-
74
+ //#endregion
75
+ //#region src/eventStore/projections/locks/postgreSQLProcessorLock.d.ts
65
76
  type PostgreSQLProcessorLockOptions = {
66
- processorId: string;
77
+ processorId: string;
78
+ version: number;
79
+ partition: string;
80
+ processorInstanceId: string;
81
+ projection?: {
82
+ name: string;
83
+ handlingType: ProjectionHandlingType;
84
+ kind: string;
67
85
  version: number;
68
- partition: string;
69
- processorInstanceId: string;
70
- projection?: {
71
- name: string;
72
- handlingType: ProjectionHandlingType;
73
- kind: string;
74
- version: number;
75
- };
76
- lockKey?: string | bigint;
77
- lockTimeoutSeconds?: number;
78
- lockAcquisitionPolicy?: LockAcquisitionPolicy;
86
+ };
87
+ lockKey?: string | bigint;
88
+ lockTimeoutSeconds?: number;
89
+ lockAcquisitionPolicy?: LockAcquisitionPolicy;
79
90
  };
80
91
  type PostgreSQLProcessorLockContext = {
81
- execute: SQLExecutor;
92
+ execute: SQLExecutor;
82
93
  };
83
94
  type PostgreSQLProcessorLock = {
84
- tryAcquire: (options: PostgreSQLProcessorLockContext) => Promise<boolean>;
85
- release: (options: PostgreSQLProcessorLockContext) => Promise<void>;
95
+ tryAcquire: (options: PostgreSQLProcessorLockContext) => Promise<boolean>;
96
+ release: (options: PostgreSQLProcessorLockContext) => Promise<void>;
86
97
  };
87
98
  declare const DefaultPostgreSQLProcessorLockPolicy: LockAcquisitionPolicy;
88
99
  declare const postgreSQLProcessorLock: (options: PostgreSQLProcessorLockOptions) => PostgreSQLProcessorLock;
89
- declare const toProcessorLockKey: ({ projection, processorId, partition, version, }: Pick<TryAcquireProcessorLockOptions, "projection" | "processorId" | "version" | "partition">) => string;
90
-
100
+ declare const toProcessorLockKey: ({
101
+ projection,
102
+ processorId,
103
+ partition,
104
+ version
105
+ }: Pick<TryAcquireProcessorLockOptions, "projection" | "processorId" | "version" | "partition">) => string;
106
+ //#endregion
107
+ //#region src/eventStore/projections/locks/tryAcquireProjectionLock.d.ts
91
108
  type TryAcquireProjectionLockOptions = {
92
- projectionName: string;
93
- partition: string;
94
- version: number;
95
- lockKey: string | bigint;
109
+ projectionName: string;
110
+ partition: string;
111
+ version: number;
112
+ lockKey: string | bigint;
96
113
  };
97
-
114
+ //#endregion
115
+ //#region src/eventStore/projections/locks/postgreSQLProjectionLock.d.ts
98
116
  type PostgreSQLProjectionLockOptions = {
99
- projectionName: string;
100
- partition: string;
101
- version: number;
102
- lockKey?: string | bigint;
117
+ projectionName: string;
118
+ partition: string;
119
+ version: number;
120
+ lockKey?: string | bigint;
103
121
  };
104
122
  type PostgreSQLProjectionLockContext = {
105
- execute: SQLExecutor;
123
+ execute: SQLExecutor;
106
124
  };
107
125
  type PostgreSQLProjectionLock = {
108
- tryAcquire: (options: PostgreSQLProjectionLockContext) => Promise<boolean>;
109
- release: (options: PostgreSQLProjectionLockContext) => void;
126
+ tryAcquire: (options: PostgreSQLProjectionLockContext) => Promise<boolean>;
127
+ release: (options: PostgreSQLProjectionLockContext) => void;
110
128
  };
111
129
  declare const postgreSQLProjectionLock: (options: PostgreSQLProjectionLockOptions) => PostgreSQLProjectionLock;
112
- declare const toProjectionLockKey: ({ projectionName, partition, version, }: Pick<TryAcquireProjectionLockOptions, "projectionName" | "partition" | "version">) => string;
113
-
130
+ declare const toProjectionLockKey: ({
131
+ projectionName,
132
+ partition,
133
+ version
134
+ }: Pick<TryAcquireProjectionLockOptions, "projectionName" | "partition" | "version">) => string;
135
+ //#endregion
136
+ //#region src/eventStore/projections/management/projectionManagement.d.ts
114
137
  declare const registerProjection: <ReadEventMetadataType extends AnyReadEventMetadata = AnyReadEventMetadata, ProjectionHandlerContext extends DefaultRecord = DefaultRecord>(execute: SQLExecutor, options: {
115
- partition: string;
116
- status: "active" | "inactive";
117
- registration: ProjectionRegistration<ProjectionHandlingType, ReadEventMetadataType, ProjectionHandlerContext>;
138
+ partition: string;
139
+ status: "active" | "inactive";
140
+ registration: ProjectionRegistration<ProjectionHandlingType, ReadEventMetadataType, ProjectionHandlerContext>;
118
141
  }) => Promise<{
119
- registered: boolean;
142
+ registered: boolean;
120
143
  }>;
121
144
  declare const activateProjection: (execute: SQLExecutor, options: {
122
- name: string;
123
- partition: string;
124
- version: number;
145
+ name: string;
146
+ partition: string;
147
+ version: number;
125
148
  }) => Promise<{
126
- activated: boolean;
149
+ activated: boolean;
127
150
  }>;
128
151
  declare const deactivateProjection: (execute: SQLExecutor, options: {
129
- name: string;
130
- partition: string;
131
- version: number;
152
+ name: string;
153
+ partition: string;
154
+ version: number;
132
155
  }) => Promise<{
133
- deactivated: boolean;
156
+ deactivated: boolean;
134
157
  }>;
135
158
  type ProjectionRegistrationWithMandatoryData = ProjectionRegistration<ProjectionHandlingType> & {
136
- projection: Required<Pick<ProjectionDefinition, 'kind' | 'version' | 'name'>>;
159
+ projection: Required<Pick<ProjectionDefinition, 'kind' | 'version' | 'name'>>;
137
160
  };
138
161
  type ReadProjectionInfoResult = {
139
- partition: string;
140
- status: 'active' | 'inactive';
141
- registration: ProjectionRegistrationWithMandatoryData;
142
- createdAt: Date;
143
- lastUpdated: Date;
144
- };
145
- declare const readProjectionInfo: (execute: SQLExecutor, { name, partition, version, }: {
146
- name: string;
147
- partition: string;
148
- version: number;
162
+ partition: string;
163
+ status: 'active' | 'inactive';
164
+ registration: ProjectionRegistrationWithMandatoryData;
165
+ createdAt: Date;
166
+ lastUpdated: Date;
167
+ };
168
+ declare const readProjectionInfo: (execute: SQLExecutor, {
169
+ name,
170
+ partition,
171
+ version
172
+ }: {
173
+ name: string;
174
+ partition: string;
175
+ version: number;
149
176
  }) => Promise<ReadProjectionInfoResult | null>;
150
-
177
+ //#endregion
178
+ //#region src/eventStore/projections/pongo/pongoProjections.d.ts
151
179
  type PongoProjectionHandlerContext = PostgreSQLProjectionHandlerContext & {
152
- pongo: PongoClient;
180
+ pongo: PongoClient;
153
181
  };
154
182
  type PongoWithNotNullDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ((document: Document, event: ReadEvent<EventType, EventMetaDataType>) => Document | null) | ((document: Document, event: ReadEvent<EventType>) => Promise<Document | null>);
155
183
  type PongoWithNullableDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ((document: Document | null, event: ReadEvent<EventType, EventMetaDataType>) => Document | null) | ((document: Document | null, event: ReadEvent<EventType>) => Promise<Document | null>);
156
184
  type PongoDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType> | PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
157
185
  type PongoProjectionOptions<EventType extends Event, EventPayloadType extends Event = EventType> = {
158
- name: string;
159
- kind?: string;
160
- version?: number;
161
- handle: (events: ReadEvent<EventType, PostgresReadEventMetadata>[], context: PongoProjectionHandlerContext) => Promise<void>;
162
- canHandle: CanHandle<EventType>;
163
- truncate?: TruncateProjection<PongoProjectionHandlerContext>;
164
- init?: (context: PongoProjectionHandlerContext) => void | Promise<void>;
165
- eventsOptions?: {
166
- schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
167
- };
186
+ name: string;
187
+ kind?: string;
188
+ version?: number;
189
+ handle: (events: ReadEvent<EventType, PostgresReadEventMetadata>[], context: PongoProjectionHandlerContext) => Promise<void>;
190
+ canHandle: CanHandle<EventType>;
191
+ truncate?: TruncateProjection<PongoProjectionHandlerContext>;
192
+ init?: (context: PongoProjectionHandlerContext) => void | Promise<void>;
193
+ eventsOptions?: {
194
+ schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
195
+ };
168
196
  } & JSONSerializationOptions;
169
- declare const pongoProjection: <EventType extends Event, EventPayloadType extends Event = EventType>({ name, kind, version, truncate, handle, canHandle, eventsOptions, }: PongoProjectionOptions<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
197
+ declare const pongoProjection: <EventType extends Event, EventPayloadType extends Event = EventType>({
198
+ name,
199
+ kind,
200
+ version,
201
+ truncate,
202
+ handle,
203
+ canHandle,
204
+ eventsOptions
205
+ }: PongoProjectionOptions<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
170
206
  type PongoMultiStreamProjectionOptions<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType, DocumentPayload extends PongoDocument = Document> = {
171
- kind?: string;
172
- canHandle: CanHandle<EventType>;
173
- version?: number;
174
- collectionName: string;
175
- collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
176
- eventsOptions?: {
177
- schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
178
- };
179
- getDocumentId: (event: ReadEvent<EventType>) => string;
207
+ kind?: string;
208
+ canHandle: CanHandle<EventType>;
209
+ version?: number;
210
+ collectionName: string;
211
+ collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
212
+ eventsOptions?: {
213
+ schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
214
+ };
215
+ getDocumentId: (event: ReadEvent<EventType>) => string;
180
216
  } & ({
181
- evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
217
+ evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
182
218
  } | {
183
- evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
184
- initialState: () => Document;
219
+ evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
220
+ initialState: () => Document;
185
221
  }) & JSONSerializationOptions;
186
222
  declare const pongoMultiStreamProjection: <Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType>(options: PongoMultiStreamProjectionOptions<Document, EventType, EventMetaDataType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
187
223
  type PongoSingleStreamProjectionOptions<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType, DocumentPayload extends PongoDocument = Document> = {
188
- canHandle: CanHandle<EventType>;
189
- getDocumentId?: (event: ReadEvent<EventType>) => string;
190
- version?: number;
191
- collectionName: string;
192
- collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
193
- eventsOptions?: {
194
- schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
195
- };
224
+ canHandle: CanHandle<EventType>;
225
+ getDocumentId?: (event: ReadEvent<EventType>) => string;
226
+ version?: number;
227
+ collectionName: string;
228
+ collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
229
+ eventsOptions?: {
230
+ schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
231
+ };
196
232
  } & ({
197
- evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
233
+ evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
198
234
  } | {
199
- evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
200
- initialState: () => Document;
235
+ evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
236
+ initialState: () => Document;
201
237
  }) & JSONSerializationOptions;
202
238
  declare const pongoSingleStreamProjection: <Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType>(options: PongoSingleStreamProjectionOptions<Document, EventType, EventMetaDataType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
203
-
239
+ //#endregion
240
+ //#region src/eventStore/projections/pongo/pongoProjectionSpec.d.ts
204
241
  type PongoAssertOptions = {
205
- inCollection: string;
206
- inDatabase?: string;
242
+ inCollection: string;
243
+ inDatabase?: string;
207
244
  };
208
245
  type FilterOrId<Doc extends PongoDocument | WithId<PongoDocument>> = {
209
- withId: string;
246
+ withId: string;
210
247
  } | {
211
- matchingFilter: PongoFilter<Doc>;
248
+ matchingFilter: PongoFilter<Doc>;
212
249
  };
213
250
  declare const documentExists: <Doc extends PongoDocument | WithId<PongoDocument>>(document: Doc, options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
214
251
  declare const documentsAreTheSame: <Doc extends PongoDocument | WithId<PongoDocument>>(documents: Doc[], options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
@@ -216,259 +253,273 @@ declare const documentsMatchingHaveCount: <Doc extends PongoDocument | WithId<Po
216
253
  declare const documentMatchingExists: <Doc extends PongoDocument | WithId<PongoDocument>>(options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
217
254
  declare const documentDoesNotExist: <Doc extends PongoDocument | WithId<PongoDocument>>(options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
218
255
  declare const expectPongoDocuments: {
219
- fromCollection: <Doc extends PongoDocument | WithId<PongoDocument>>(collectionName: string) => {
220
- withId: (id: string) => {
221
- toBeEqual: (document: Doc) => PostgreSQLProjectionAssert;
222
- toExist: () => PostgreSQLProjectionAssert;
223
- notToExist: () => PostgreSQLProjectionAssert;
224
- };
225
- matching: <Doc_1 extends PongoDocument | WithId<PongoDocument>>(filter: PongoFilter<Doc_1>) => {
226
- toBeTheSame: (documents: Doc_1[]) => PostgreSQLProjectionAssert;
227
- toHaveCount: (expectedCount: number) => PostgreSQLProjectionAssert;
228
- toExist: () => PostgreSQLProjectionAssert;
229
- notToExist: () => PostgreSQLProjectionAssert;
230
- };
256
+ fromCollection: <Doc extends PongoDocument | WithId<PongoDocument>>(collectionName: string) => {
257
+ withId: (id: string) => {
258
+ toBeEqual: (document: Doc) => PostgreSQLProjectionAssert;
259
+ toExist: () => PostgreSQLProjectionAssert;
260
+ notToExist: () => PostgreSQLProjectionAssert;
261
+ };
262
+ matching: <Doc_1 extends PongoDocument | WithId<PongoDocument>>(filter: PongoFilter<Doc_1>) => {
263
+ toBeTheSame: (documents: Doc_1[]) => PostgreSQLProjectionAssert;
264
+ toHaveCount: (expectedCount: number) => PostgreSQLProjectionAssert;
265
+ toExist: () => PostgreSQLProjectionAssert;
266
+ notToExist: () => PostgreSQLProjectionAssert;
231
267
  };
268
+ };
232
269
  };
233
-
270
+ //#endregion
271
+ //#region src/eventStore/projections/postgresProjectionSpec.d.ts
234
272
  type PostgreSQLProjectionSpecEvent<EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = EventType & {
235
- metadata?: Partial<EventMetaDataType>;
273
+ metadata?: Partial<EventMetaDataType>;
236
274
  };
237
275
  type PostgreSQLProjectionSpecWhenOptions = {
238
- numberOfTimes: number;
276
+ numberOfTimes: number;
277
+ };
278
+ type PostgreSQLProjectionSpec<EventType extends Event> = (givenEvents: PostgreSQLProjectionSpecEvent<EventType>[]) => {
279
+ when: (events: PostgreSQLProjectionSpecEvent<EventType>[], options?: PostgreSQLProjectionSpecWhenOptions) => {
280
+ then: (assert: PostgreSQLProjectionAssert, message?: string) => Promise<void>;
281
+ thenThrows: <ErrorType extends Error = Error>(...args: Parameters<ThenThrows<ErrorType>>) => Promise<void>;
282
+ };
239
283
  };
240
284
  type PostgreSQLProjectionAssert = (options: {
241
- pool: Dumbo;
242
- connectionString: string;
285
+ pool: Dumbo;
286
+ connectionString: string;
243
287
  }) => Promise<void | boolean>;
244
288
  type PostgreSQLProjectionSpecOptions<EventType extends Event> = {
245
- projection: PostgreSQLProjectionDefinition<EventType>;
289
+ projection: PostgreSQLProjectionDefinition<EventType>;
246
290
  } & PgPoolOptions;
247
- type PostgreSQLProjectionSpec<EventType extends Event> = (givenEvents: PostgreSQLProjectionSpecEvent<EventType>[]) => {
248
- when: (events: PostgreSQLProjectionSpecEvent<EventType>[], options?: PostgreSQLProjectionSpecWhenOptions) => {
249
- then: (assert: PostgreSQLProjectionAssert, message?: string) => Promise<void>;
250
- thenThrows: <ErrorType extends Error = Error>(...args: Parameters<ThenThrows<ErrorType>>) => Promise<void>;
251
- };
252
- };
253
291
  declare const PostgreSQLProjectionSpec: {
254
- for: <EventType extends Event>(options: PostgreSQLProjectionSpecOptions<EventType>) => PostgreSQLProjectionSpec<EventType>;
292
+ for: <EventType extends Event>(options: PostgreSQLProjectionSpecOptions<EventType>) => PostgreSQLProjectionSpec<EventType>;
255
293
  };
256
294
  declare const eventInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata>(streamName: string, event: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>;
257
295
  declare const eventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata>(streamName: string, events: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[]) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[];
258
- declare const newEventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = _event_driven_io_emmett.RecordedMessageMetadataWithGlobalPosition>(streamName: string, events: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[]) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[];
296
+ declare const newEventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = _$_event_driven_io_emmett0.RecordedMessageMetadataWithGlobalPosition>(streamName: string, events: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[]) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[];
259
297
  declare const assertSQLQueryResultMatches: <T extends QueryResultRow>(sql: SQL, rows: T[]) => PostgreSQLProjectionAssert;
260
298
  declare const expectSQL: {
261
- query: (sql: SQL) => {
262
- resultRows: {
263
- toBeTheSame: <T extends QueryResultRow>(rows: T[]) => PostgreSQLProjectionAssert;
264
- };
299
+ query: (sql: SQL) => {
300
+ resultRows: {
301
+ toBeTheSame: <T extends QueryResultRow>(rows: T[]) => PostgreSQLProjectionAssert;
265
302
  };
303
+ };
266
304
  };
267
-
305
+ //#endregion
306
+ //#region src/eventStore/schema/typing.d.ts
268
307
  declare const emmettPrefix = "emt";
269
308
  declare const globalTag = "global";
270
309
  declare const defaultTag = "emt:default";
271
310
  declare const unknownTag = "emt:unknown";
272
311
  declare const globalNames: {
273
- module: string;
274
- tenant: string;
312
+ module: string;
313
+ tenant: string;
275
314
  };
276
315
  declare const streamsTable: {
277
- name: string;
278
- columns: {
279
- partition: {
280
- name: string;
281
- };
282
- isArchived: {
283
- name: string;
284
- };
316
+ name: string;
317
+ columns: {
318
+ partition: {
319
+ name: string;
285
320
  };
321
+ isArchived: {
322
+ name: string;
323
+ };
324
+ };
286
325
  };
287
326
  declare const messagesTable: {
288
- name: string;
289
- columns: {
290
- partition: {
291
- name: string;
292
- };
293
- isArchived: {
294
- name: string;
295
- };
327
+ name: string;
328
+ columns: {
329
+ partition: {
330
+ name: string;
331
+ };
332
+ isArchived: {
333
+ name: string;
296
334
  };
335
+ };
297
336
  };
298
337
  declare const processorsTable: {
299
- name: string;
338
+ name: string;
300
339
  };
301
340
  declare const projectionsTable: {
302
- name: string;
341
+ name: string;
303
342
  };
304
-
343
+ //#endregion
344
+ //#region src/eventStore/schema/appendToStream.d.ts
305
345
  declare const appendToStreamSQL: SQL;
306
346
  type CallAppendToStreamParams = {
307
- messageIds: string[];
308
- messagesData: DefaultRecord[];
309
- messagesMetadata: DefaultRecord[];
310
- schemaVersions: string[];
311
- messageTypes: string[];
312
- messageKinds: string[];
313
- streamId: string;
314
- streamType: string;
315
- expectedStreamPosition: bigint | null;
316
- partition: string;
347
+ messageIds: string[];
348
+ messagesData: DefaultRecord[];
349
+ messagesMetadata: DefaultRecord[];
350
+ schemaVersions: string[];
351
+ messageTypes: string[];
352
+ messageKinds: string[];
353
+ streamId: string;
354
+ streamType: string;
355
+ expectedStreamPosition: bigint | null;
356
+ partition: string;
317
357
  };
318
358
  declare const callAppendToStream: (params: CallAppendToStreamParams) => SQL;
319
359
  type AppendToStreamResult = {
320
- success: true;
321
- nextStreamPosition: bigint;
322
- globalPositions: bigint[];
323
- transactionId: string;
360
+ success: true;
361
+ nextStreamPosition: bigint;
362
+ globalPositions: bigint[];
363
+ transactionId: string;
324
364
  } | {
325
- success: false;
365
+ success: false;
326
366
  };
327
367
  type AppendToStreamBeforeCommitHook = (messages: RecordedMessage[], context: {
328
- transaction: PgTransaction;
368
+ transaction: PgTransaction;
329
369
  }) => Promise<void>;
330
370
  declare const appendToStream: (pool: PgPool, streamName: string, streamType: string, messages: Message[], options?: AppendToStreamOptions & {
331
- partition?: string;
332
- beforeCommitHook?: AppendToStreamBeforeCommitHook;
371
+ partition?: string;
372
+ beforeCommitHook?: AppendToStreamBeforeCommitHook;
333
373
  }) => Promise<AppendToStreamResult>;
334
-
374
+ //#endregion
375
+ //#region src/eventStore/schema/migrations/0_43_0/index.d.ts
335
376
  declare const cleanupLegacySubscriptionTables: (connectionString: string) => Promise<void>;
336
-
377
+ //#endregion
378
+ //#region src/eventStore/schema/processors/processorsLocks.d.ts
337
379
  declare const tryAcquireProcessorLockSQL: SQL;
338
380
  declare const releaseProcessorLockSQL: SQL;
339
381
  type CallTryAcquireProcessorLockParams = {
340
- lockKey: string;
341
- processorId: string;
342
- version: number;
343
- partition: string;
344
- processorInstanceId: string;
345
- projectionName: string | null;
346
- projectionType: 'i' | 'a' | null;
347
- projectionKind: string | null;
348
- lockTimeoutSeconds: number;
382
+ lockKey: string;
383
+ processorId: string;
384
+ version: number;
385
+ partition: string;
386
+ processorInstanceId: string;
387
+ projectionName: string | null;
388
+ projectionType: 'i' | 'a' | null;
389
+ projectionKind: string | null;
390
+ lockTimeoutSeconds: number;
349
391
  };
350
392
  declare const callTryAcquireProcessorLock: (params: CallTryAcquireProcessorLockParams) => SQL;
351
393
  type CallReleaseProcessorLockParams = {
352
- lockKey: string;
353
- processorId: string;
354
- partition: string;
355
- version: number;
356
- processorInstanceId: string;
357
- projectionName: string | null;
394
+ lockKey: string;
395
+ processorId: string;
396
+ partition: string;
397
+ version: number;
398
+ processorInstanceId: string;
399
+ projectionName: string | null;
358
400
  };
359
401
  declare const callReleaseProcessorLock: (params: CallReleaseProcessorLockParams) => SQL;
360
-
402
+ //#endregion
403
+ //#region src/eventStore/schema/projections/projectionsLocks.d.ts
361
404
  declare const tryAcquireProjectionLockSQL: SQL;
362
405
  type CallTryAcquireProjectionLockParams = {
363
- lockKey: string;
364
- partition: string;
365
- name: string;
366
- version: number;
406
+ lockKey: string;
407
+ partition: string;
408
+ name: string;
409
+ version: number;
367
410
  };
368
411
  declare const callTryAcquireProjectionLock: (params: CallTryAcquireProjectionLockParams) => SQL;
369
-
412
+ //#endregion
413
+ //#region src/eventStore/schema/projections/registerProjection.d.ts
370
414
  declare const registerProjectionSQL: SQL;
371
415
  declare const activateProjectionSQL: SQL;
372
416
  declare const deactivateProjectionSQL: SQL;
373
417
  type CallRegisterProjectionParams = {
374
- lockKey: string;
375
- name: string;
376
- partition: string;
377
- version: number;
378
- type: 'i' | 'a';
379
- kind: string;
380
- status: string;
381
- definition: string;
418
+ lockKey: string;
419
+ name: string;
420
+ partition: string;
421
+ version: number;
422
+ type: 'i' | 'a';
423
+ kind: string;
424
+ status: string;
425
+ definition: string;
382
426
  };
383
427
  declare const callRegisterProjection: (params: CallRegisterProjectionParams) => SQL;
384
428
  type CallActivateProjectionParams = {
385
- lockKey: string;
386
- name: string;
387
- partition: string;
388
- version: number;
429
+ lockKey: string;
430
+ name: string;
431
+ partition: string;
432
+ version: number;
389
433
  };
390
434
  declare const callActivateProjection: (params: CallActivateProjectionParams) => SQL;
391
435
  type CallDeactivateProjectionParams = {
392
- lockKey: string;
393
- name: string;
394
- partition: string;
395
- version: number;
436
+ lockKey: string;
437
+ name: string;
438
+ partition: string;
439
+ version: number;
396
440
  };
397
441
  declare const callDeactivateProjection: (params: CallDeactivateProjectionParams) => SQL;
398
-
442
+ //#endregion
443
+ //#region src/eventStore/schema/readLastMessageGlobalPosition.d.ts
399
444
  type ReadLastMessageGlobalPositionResult = {
400
- currentGlobalPosition: bigint | null;
445
+ currentGlobalPosition: bigint | null;
401
446
  };
402
447
  declare const readLastMessageGlobalPosition: (execute: SQLExecutor, options?: {
403
- partition?: string;
448
+ partition?: string;
404
449
  }) => Promise<ReadLastMessageGlobalPositionResult>;
405
-
450
+ //#endregion
451
+ //#region src/eventStore/schema/readMessagesBatch.d.ts
406
452
  type ReadMessagesBatchOptions = {
407
- after: bigint;
408
- batchSize: number;
453
+ after: bigint;
454
+ batchSize: number;
409
455
  } | {
410
- from: bigint;
411
- batchSize: number;
456
+ from: bigint;
457
+ batchSize: number;
412
458
  } | {
413
- to: bigint;
414
- batchSize: number;
459
+ to: bigint;
460
+ batchSize: number;
415
461
  } | {
416
- from: bigint;
417
- to: bigint;
462
+ from: bigint;
463
+ to: bigint;
418
464
  };
419
465
  type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
420
- currentGlobalPosition: bigint;
421
- messages: RecordedMessage<MessageType, MessageMetadataType>[];
422
- areMessagesLeft: boolean;
466
+ currentGlobalPosition: bigint;
467
+ messages: RecordedMessage<MessageType, MessageMetadataType>[];
468
+ areMessagesLeft: boolean;
423
469
  };
424
470
  declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
425
- partition?: string;
471
+ partition?: string;
426
472
  }) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
427
-
473
+ //#endregion
474
+ //#region src/eventStore/schema/readProcessorCheckpoint.d.ts
428
475
  type ReadProcessorCheckpointResult = {
429
- lastProcessedCheckpoint: ProcessorCheckpoint | null;
476
+ lastProcessedCheckpoint: ProcessorCheckpoint | null;
430
477
  };
431
478
  declare const readProcessorCheckpoint: (execute: SQLExecutor, options: {
432
- processorId: string;
433
- partition?: string;
434
- version?: number;
479
+ processorId: string;
480
+ partition?: string;
481
+ version?: number;
435
482
  }) => Promise<ReadProcessorCheckpointResult>;
436
-
483
+ //#endregion
484
+ //#region src/eventStore/schema/readStream.d.ts
437
485
  declare const readStream: <EventType extends Event, EventPayloadType extends Event = EventType>(execute: SQLExecutor, streamId: string, options?: ReadStreamOptions<EventType, EventPayloadType> & {
438
- partition?: string;
486
+ partition?: string;
439
487
  }) => Promise<ReadStreamResult<EventType, ReadEventMetadataWithGlobalPosition>>;
440
-
488
+ //#endregion
489
+ //#region src/eventStore/schema/storeProcessorCheckpoint.d.ts
441
490
  declare const storeSubscriptionCheckpointSQL: SQL;
442
491
  type CallStoreProcessorCheckpointParams = {
443
- processorId: string;
444
- version: number;
445
- position: string | null;
446
- checkPosition: string | null;
447
- partition: string;
448
- processorInstanceId: string;
492
+ processorId: string;
493
+ version: number;
494
+ position: string | null;
495
+ checkPosition: string | null;
496
+ partition: string;
497
+ processorInstanceId: string;
449
498
  };
450
499
  declare const callStoreProcessorCheckpoint: (params: CallStoreProcessorCheckpointParams) => SQL;
451
500
  type StoreProcessorCheckpointResult = {
452
- success: true;
453
- newCheckpoint: ProcessorCheckpoint | null;
501
+ success: true;
502
+ newCheckpoint: ProcessorCheckpoint | null;
454
503
  } | {
455
- success: false;
456
- reason: 'IGNORED' | 'MISMATCH' | 'CURRENT_AHEAD';
504
+ success: false;
505
+ reason: 'IGNORED' | 'MISMATCH' | 'CURRENT_AHEAD';
457
506
  };
458
507
  declare const storeProcessorCheckpoint: (execute: SQLExecutor, options: {
459
- processorId: string;
460
- version: number | undefined;
461
- newCheckpoint: ProcessorCheckpoint | null;
462
- lastProcessedCheckpoint: ProcessorCheckpoint | null;
463
- partition?: string;
464
- processorInstanceId?: string;
508
+ processorId: string;
509
+ version: number | undefined;
510
+ newCheckpoint: ProcessorCheckpoint | null;
511
+ lastProcessedCheckpoint: ProcessorCheckpoint | null;
512
+ partition?: string;
513
+ processorInstanceId?: string;
465
514
  }) => Promise<StoreProcessorCheckpointResult>;
466
-
515
+ //#endregion
516
+ //#region src/eventStore/schema/streamExists.d.ts
467
517
  type PostgresStreamExistsOptions = {
468
- partition: string;
518
+ partition: string;
469
519
  };
470
520
  declare const streamExists: (execute: SQLExecutor, streamId: string, options?: PostgresStreamExistsOptions) => Promise<StreamExistsResult>;
471
-
521
+ //#endregion
522
+ //#region src/eventStore/schema/tables.d.ts
472
523
  declare const streamsTableSQL: SQL;
473
524
  declare const messagesTableSQL: SQL;
474
525
  declare const processorsTableSQL: SQL;
@@ -481,225 +532,229 @@ declare const addTenantSQL: SQL;
481
532
  declare const addModuleForAllTenantsSQL: SQL;
482
533
  declare const addTenantForAllModulesSQL: SQL;
483
534
  declare const addDefaultPartitionSQL: SQL;
484
-
535
+ //#endregion
536
+ //#region src/eventStore/schema/index.d.ts
485
537
  declare const schemaSQL: SQL[];
486
538
  declare const schemaMigration: SQLMigration;
487
539
  declare const eventStoreSchemaMigrations: SQLMigration[];
488
540
  type CreateEventStoreSchemaOptions = {
489
- dryRun?: boolean | undefined;
490
- ignoreMigrationHashMismatch?: boolean | undefined;
491
- migrationTimeoutMs?: number | undefined;
541
+ dryRun?: boolean | undefined;
542
+ ignoreMigrationHashMismatch?: boolean | undefined;
543
+ migrationTimeoutMs?: number | undefined;
492
544
  } & JSONSerializationOptions;
493
545
  type EventStoreSchemaMigrationOptions = {
494
- migrationOptions?: CreateEventStoreSchemaOptions;
546
+ migrationOptions?: CreateEventStoreSchemaOptions;
495
547
  };
496
548
  declare const createEventStoreSchema: (connectionString: string, pool: PgPool, hooks?: PostgresEventStoreOptions["hooks"], options?: CreateEventStoreSchemaOptions) => Promise<RunSQLMigrationsResult>;
497
-
549
+ //#endregion
550
+ //#region src/eventStore/projections/postgreSQLProjection.d.ts
498
551
  type PostgreSQLProjectionHandlerContext = {
499
- execute: SQLExecutor;
500
- connection: {
501
- connectionString: string;
502
- client: PgClient;
503
- transaction: PgTransaction;
504
- pool: Dumbo;
505
- };
552
+ execute: SQLExecutor;
553
+ connection: {
554
+ connectionString: string;
555
+ client: PgClient;
556
+ transaction: PgTransaction;
557
+ pool: Dumbo;
558
+ };
506
559
  } & EventStoreSchemaMigrationOptions;
507
560
  declare const transactionToPostgreSQLProjectionHandlerContext: (connectionString: string, pool: Dumbo, transaction: PgTransaction | DatabaseTransaction<AnyConnection>) => Promise<PostgreSQLProjectionHandlerContext>;
508
561
  type PostgreSQLProjectionHandler<EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ProjectionHandler<EventType, EventMetaDataType, PostgreSQLProjectionHandlerContext>;
509
562
  type PostgreSQLProjectionDefinition<EventType extends Event = Event, EventPayloadType extends Event = EventType> = ProjectionDefinition<EventType, PostgresReadEventMetadata, PostgreSQLProjectionHandlerContext, EventPayloadType>;
510
563
  type PostgreSQLProjectionHandlerOptions<EventType extends Event = Event> = {
511
- events: ReadEvent<EventType, PostgresReadEventMetadata>[];
512
- projections: PostgreSQLProjectionDefinition<EventType>[];
513
- partition?: string;
564
+ events: ReadEvent<EventType, PostgresReadEventMetadata>[];
565
+ projections: PostgreSQLProjectionDefinition<EventType>[];
566
+ partition?: string;
514
567
  } & PostgreSQLProjectionHandlerContext;
515
568
  declare const handleProjections: <EventType extends Event = Event>(options: PostgreSQLProjectionHandlerOptions<EventType>) => Promise<void>;
516
569
  declare const postgreSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(definition: PostgreSQLProjectionDefinition<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
517
570
  type PostgreSQLRawBatchSQLProjection<EventType extends Event, EventPayloadType extends Event = EventType> = {
518
- name: string;
519
- kind?: string;
520
- version?: number;
521
- evolve: (events: EventType[], context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[];
522
- canHandle: CanHandle<EventType>;
523
- init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
524
- eventsOptions?: {
525
- schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
526
- };
571
+ name: string;
572
+ kind?: string;
573
+ version?: number;
574
+ evolve: (events: EventType[], context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[];
575
+ canHandle: CanHandle<EventType>;
576
+ init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
577
+ eventsOptions?: {
578
+ schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
579
+ };
527
580
  } & JSONSerializationOptions;
528
581
  declare const postgreSQLRawBatchSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(options: PostgreSQLRawBatchSQLProjection<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
529
582
  type PostgreSQLRawSQLProjection<EventType extends Event, EventPayloadType extends Event = EventType> = {
530
- name: string;
531
- kind?: string;
532
- version?: number;
533
- evolve: (events: EventType, context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[] | Promise<SQL> | SQL;
534
- canHandle: CanHandle<EventType>;
535
- init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
536
- eventsOptions?: {
537
- schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
538
- };
583
+ name: string;
584
+ kind?: string;
585
+ version?: number;
586
+ evolve: (events: EventType, context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[] | Promise<SQL> | SQL;
587
+ canHandle: CanHandle<EventType>;
588
+ init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
589
+ eventsOptions?: {
590
+ schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
591
+ };
539
592
  } & JSONSerializationOptions;
540
593
  declare const postgreSQLRawSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(options: PostgreSQLRawSQLProjection<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
541
-
594
+ //#endregion
595
+ //#region src/eventStore/postgreSQLEventStore.d.ts
542
596
  interface PostgresEventStore extends EventStore<PostgresReadEventMetadata>, EventStoreSessionFactory<PostgresEventStore> {
543
- appendToStream<EventType extends Event, EventPayloadType extends Event = EventType>(streamName: string, events: EventType[], options?: AppendToStreamOptions<EventType, EventPayloadType>): Promise<AppendToStreamResultWithGlobalPosition>;
544
- consumer<ConsumerEventType extends Event = Event>(options?: PostgreSQLEventStoreConsumerConfig<ConsumerEventType>): PostgreSQLEventStoreConsumer<ConsumerEventType>;
545
- close(): Promise<void>;
546
- streamExists(streamName: string, options?: PostgresStreamExistsOptions): Promise<StreamExistsResult>;
547
- schema: {
548
- sql(): string;
549
- print(): void;
550
- migrate(options?: CreateEventStoreSchemaOptions): Promise<RunSQLMigrationsResult>;
551
- dangerous: {
552
- truncate(options?: {
553
- resetSequences?: boolean;
554
- truncateProjections?: boolean;
555
- }): Promise<void>;
556
- };
597
+ appendToStream<EventType extends Event, EventPayloadType extends Event = EventType>(streamName: string, events: EventType[], options?: AppendToStreamOptions<EventType, EventPayloadType>): Promise<AppendToStreamResultWithGlobalPosition>;
598
+ consumer<ConsumerEventType extends Event = Event>(options?: PostgreSQLEventStoreConsumerConfig<ConsumerEventType>): PostgreSQLEventStoreConsumer<ConsumerEventType>;
599
+ close(): Promise<void>;
600
+ streamExists(streamName: string, options?: PostgresStreamExistsOptions): Promise<StreamExistsResult>;
601
+ schema: {
602
+ sql(): string;
603
+ print(): void;
604
+ migrate(options?: CreateEventStoreSchemaOptions): Promise<RunSQLMigrationsResult>;
605
+ dangerous: {
606
+ truncate(options?: {
607
+ resetSequences?: boolean;
608
+ truncateProjections?: boolean;
609
+ }): Promise<void>;
557
610
  };
611
+ };
558
612
  }
559
613
  type PostgresReadEventMetadata = ReadEventMetadataWithGlobalPosition;
560
614
  type PostgresReadEvent<EventType extends Event = Event> = ReadEvent<EventType, PostgresReadEventMetadata>;
561
615
  type PostgresEventStorePooledOptions = {
562
- connector?: PgDriverType;
563
- connectionString?: string;
564
- database?: string;
565
- pooled: true;
566
- pool: pg.Pool;
616
+ connector?: PgDriverType;
617
+ connectionString?: string;
618
+ database?: string;
619
+ pooled: true;
620
+ pool: pg.Pool;
567
621
  } | {
568
- connector?: PgDriverType;
569
- connectionString?: string;
570
- database?: string;
571
- pool: pg.Pool;
622
+ connector?: PgDriverType;
623
+ connectionString?: string;
624
+ database?: string;
625
+ pool: pg.Pool;
572
626
  } | {
573
- connector?: PgDriverType;
574
- connectionString?: string;
575
- database?: string;
576
- pooled: true;
627
+ connector?: PgDriverType;
628
+ connectionString?: string;
629
+ database?: string;
630
+ pooled: true;
577
631
  } | {
578
- connector?: PgDriverType;
579
- connectionString?: string;
580
- database?: string;
632
+ connector?: PgDriverType;
633
+ connectionString?: string;
634
+ database?: string;
581
635
  };
582
636
  type PostgresEventStoreNotPooledOptions = {
583
- connector?: PgDriverType;
584
- connectionString?: string;
585
- database?: string;
586
- pooled: false;
587
- client: pg.Client;
637
+ connector?: PgDriverType;
638
+ connectionString?: string;
639
+ database?: string;
640
+ pooled: false;
641
+ client: pg.Client;
588
642
  } | {
589
- connector?: PgDriverType;
590
- connectionString?: string;
591
- database?: string;
592
- client: pg.Client;
643
+ connector?: PgDriverType;
644
+ connectionString?: string;
645
+ database?: string;
646
+ client: pg.Client;
593
647
  } | {
594
- connector?: PgDriverType;
595
- connectionString?: string;
596
- database?: string;
597
- pooled: false;
648
+ connector?: PgDriverType;
649
+ connectionString?: string;
650
+ database?: string;
651
+ pooled: false;
598
652
  } | {
599
- connector?: PgDriverType;
600
- connectionString?: string;
601
- database?: string;
602
- connection: PgPoolClientConnection | PgClientConnection;
603
- pooled?: false;
653
+ connector?: PgDriverType;
654
+ connectionString?: string;
655
+ database?: string;
656
+ connection: PgPoolClientConnection | PgClientConnection;
657
+ pooled?: false;
604
658
  } | {
605
- connector?: PgDriverType;
606
- connectionString?: string;
607
- database?: string;
608
- dumbo: PgPool;
609
- pooled?: false;
659
+ connector?: PgDriverType;
660
+ connectionString?: string;
661
+ database?: string;
662
+ dumbo: PgPool;
663
+ pooled?: false;
610
664
  };
611
665
  type PostgresEventStoreConnectionOptions = PostgresEventStorePooledOptions | PostgresEventStoreNotPooledOptions;
612
666
  type PostgresEventStoreOptions = {
613
- projections?: ProjectionRegistration<'inline', PostgresReadEventMetadata, PostgreSQLProjectionHandlerContext>[];
614
- schema?: {
615
- autoMigration?: MigrationStyle;
616
- };
617
- connectionOptions?: PostgresEventStoreConnectionOptions;
618
- hooks?: {
619
- /**
620
- * This hook will be called **BEFORE** event store schema is created
621
- */
622
- onBeforeSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
623
- /**
624
- * This hook will be called **AFTER** event store schema was created but before transaction commits
625
- */
626
- onAfterSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
627
- };
667
+ projections?: ProjectionRegistration<'inline', PostgresReadEventMetadata, PostgreSQLProjectionHandlerContext>[];
668
+ schema?: {
669
+ autoMigration?: MigrationStyle;
670
+ };
671
+ connectionOptions?: PostgresEventStoreConnectionOptions;
672
+ hooks?: {
673
+ /**
674
+ * This hook will be called **BEFORE** event store schema is created
675
+ */
676
+ onBeforeSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
677
+ /**
678
+ * This hook will be called **AFTER** event store schema was created but before transaction commits
679
+ */
680
+ onAfterSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
681
+ };
628
682
  } & JSONSerializationOptions;
629
683
  declare const defaultPostgreSQLOptions: PostgresEventStoreOptions;
630
684
  declare const PostgreSQLEventStoreDefaultStreamVersion = 0n;
631
685
  declare const getPostgreSQLEventStore: (connectionString: string, options?: PostgresEventStoreOptions) => PostgresEventStore;
632
-
686
+ //#endregion
687
+ //#region src/eventStore/consumers/postgreSQLProcessor.d.ts
633
688
  type PostgreSQLProcessorHandlerContext = {
634
- partition: string;
635
- execute: SQLExecutor;
636
- connection: {
637
- connectionString: string;
638
- client: PgClient;
639
- transaction: PgTransaction;
640
- pool: Dumbo;
641
- messageStore: PostgresEventStore;
642
- };
689
+ partition: string;
690
+ execute: SQLExecutor;
691
+ connection: {
692
+ connectionString: string;
693
+ client: PgClient;
694
+ transaction: PgTransaction;
695
+ pool: Dumbo;
696
+ messageStore: PostgresEventStore;
697
+ };
643
698
  } & EventStoreSchemaMigrationOptions;
644
699
  type PostgreSQLProcessor<MessageType extends Message = AnyMessage> = MessageProcessor<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
645
700
  type PostgreSQLProcessorEachMessageHandler<MessageType extends Message = Message> = SingleRecordedMessageHandlerWithContext<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
646
701
  type PostgreSQLProcessorEachBatchHandler<MessageType extends Message = Message> = BatchRecordedMessageHandlerWithContext<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
647
702
  type PostgreSQLProcessorStartFrom = PostgreSQLEventStoreMessageBatchPullerStartFrom | 'CURRENT';
648
703
  type PostgreSQLProcessorPooledOptions = {
649
- connector?: PgDriverType;
650
- database?: string;
651
- pooled: true;
652
- pool: pg.Pool;
704
+ connector?: PgDriverType;
705
+ database?: string;
706
+ pooled: true;
707
+ pool: pg.Pool;
653
708
  } | {
654
- connector?: PgDriverType;
655
- database?: string;
656
- pool: pg.Pool;
709
+ connector?: PgDriverType;
710
+ database?: string;
711
+ pool: pg.Pool;
657
712
  } | {
658
- connector?: PgDriverType;
659
- database?: string;
660
- pooled: true;
713
+ connector?: PgDriverType;
714
+ database?: string;
715
+ pooled: true;
661
716
  } | {
662
- connector?: PgDriverType;
663
- database?: string;
717
+ connector?: PgDriverType;
718
+ database?: string;
664
719
  };
665
720
  type PostgreSQLProcessorNotPooledOptions = {
666
- connector?: PgDriverType;
667
- database?: string;
668
- pooled: false;
669
- client: pg.Client;
721
+ connector?: PgDriverType;
722
+ database?: string;
723
+ pooled: false;
724
+ client: pg.Client;
670
725
  } | {
671
- connector?: PgDriverType;
672
- database?: string;
673
- client: pg.Client;
726
+ connector?: PgDriverType;
727
+ database?: string;
728
+ client: pg.Client;
674
729
  } | {
675
- connector?: PgDriverType;
676
- database?: string;
677
- pooled: false;
730
+ connector?: PgDriverType;
731
+ database?: string;
732
+ pooled: false;
678
733
  } | {
679
- connector?: PgDriverType;
680
- database?: string;
681
- connection: PgPoolClientConnection | PgClientConnection;
682
- pooled?: false;
734
+ connector?: PgDriverType;
735
+ database?: string;
736
+ connection: PgPoolClientConnection | PgClientConnection;
737
+ pooled?: false;
683
738
  } | {
684
- connector?: PgDriverType;
685
- database?: string;
686
- dumbo: PgPool;
687
- pooled?: false;
739
+ connector?: PgDriverType;
740
+ database?: string;
741
+ dumbo: PgPool;
742
+ pooled?: false;
688
743
  };
689
744
  type PostgreSQLProcessorConnectionOptions = {
690
- connectionString: string;
745
+ connectionString: string;
691
746
  } & (PostgreSQLProcessorPooledOptions | PostgreSQLProcessorNotPooledOptions);
692
747
  type PostgreSQLCheckpointer<MessageType extends AnyMessage = AnyMessage> = Checkpointer<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
693
748
  declare const postgreSQLCheckpointer: <MessageType extends Message = Message>() => PostgreSQLCheckpointer<MessageType>;
694
749
  type PostgreSQLConnectionOptions = {
695
- connectionOptions?: PostgreSQLProcessorConnectionOptions;
750
+ connectionOptions?: PostgreSQLProcessorConnectionOptions;
696
751
  } & JSONSerializationOptions;
697
752
  type PostgreSQLProcessorOptionsBase = PostgreSQLConnectionOptions & {
698
- lock?: {
699
- acquisitionPolicy?: LockAcquisitionPolicy;
700
- timeoutSeconds?: number;
701
- };
702
- partition?: string;
753
+ lock?: {
754
+ acquisitionPolicy?: LockAcquisitionPolicy;
755
+ timeoutSeconds?: number;
756
+ };
757
+ partition?: string;
703
758
  };
704
759
  type PostgreSQLReactorOptions<MessageType extends Message = Message, MessagePayloadType extends AnyMessage = MessageType> = ReactorOptions<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext, MessagePayloadType> & PostgreSQLProcessorOptionsBase;
705
760
  type PostgreSQLProjectorOptions<EventType extends AnyEvent = AnyEvent, EventPayloadType extends Event = EventType> = ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext, EventPayloadType> & PostgreSQLProcessorOptionsBase & EventStoreSchemaMigrationOptions;
@@ -707,35 +762,38 @@ type PostgreSQLWorkflowProcessorOptions<Input extends AnyEvent | AnyCommand, Sta
707
762
  declare const postgreSQLProjector: <EventType extends Event = Event, EventPayloadType extends Event = EventType>(options: PostgreSQLProjectorOptions<EventType, EventPayloadType>) => PostgreSQLProcessor<EventType>;
708
763
  declare const postgreSQLWorkflowProcessor: <Input extends AnyEvent | AnyCommand, State, Output extends AnyEvent | AnyCommand, MetaDataType extends AnyRecordedMessageMetadata = AnyRecordedMessageMetadata, HandlerContext extends PostgreSQLProcessorHandlerContext & WorkflowProcessorContext = PostgreSQLProcessorHandlerContext & WorkflowProcessorContext, StoredMessage extends AnyEvent | AnyCommand = Output>(options: PostgreSQLWorkflowProcessorOptions<Input, State, Output, MetaDataType, HandlerContext, StoredMessage>) => PostgreSQLProcessor<Input | Output>;
709
764
  declare const postgreSQLReactor: <MessageType extends Message = Message, MessagePayloadType extends AnyMessage = MessageType>(options: PostgreSQLReactorOptions<MessageType, MessagePayloadType>) => PostgreSQLProcessor<MessageType>;
710
-
765
+ //#endregion
766
+ //#region src/eventStore/consumers/postgreSQLEventStoreConsumer.d.ts
711
767
  type PostgreSQLEventStoreConsumerConfig<ConsumerMessageType extends Message = any> = MessageConsumerOptions<ConsumerMessageType> & {
712
- stopWhen?: {
713
- noMessagesLeft?: boolean;
714
- };
715
- pulling?: {
716
- batchSize?: number;
717
- pullingFrequencyInMs?: number;
718
- };
768
+ stopWhen?: {
769
+ noMessagesLeft?: boolean;
770
+ };
771
+ pulling?: {
772
+ batchSize?: number;
773
+ pullingFrequencyInMs?: number;
774
+ };
719
775
  } & JSONSerializationOptions;
720
776
  type PostgreSQLEventStoreConsumerOptions<ConsumerMessageType extends Message = Message> = PostgreSQLEventStoreConsumerConfig<ConsumerMessageType> & {
721
- connectionString: string;
722
- pool?: Dumbo;
777
+ connectionString: string;
778
+ pool?: Dumbo;
723
779
  };
724
780
  type PostgreSQLEventStoreConsumer<ConsumerMessageType extends AnyMessage = any> = MessageConsumer<ConsumerMessageType> & Readonly<{
725
- reactor: <MessageType extends AnyMessage = ConsumerMessageType>(options: PostgreSQLReactorOptions<MessageType>) => PostgreSQLProcessor<MessageType>;
726
- workflowProcessor: <Input extends AnyEvent | AnyCommand, State, Output extends AnyEvent | AnyCommand, MetaDataType extends AnyRecordedMessageMetadata = AnyRecordedMessageMetadata, HandlerContext extends PostgreSQLProcessorHandlerContext & WorkflowProcessorContext = PostgreSQLProcessorHandlerContext & WorkflowProcessorContext, StoredMessage extends AnyEvent | AnyCommand = Output>(options: PostgreSQLWorkflowProcessorOptions<Input, State, Output, MetaDataType, HandlerContext, StoredMessage>) => PostgreSQLProcessor<Input | Output>;
781
+ reactor: <MessageType extends AnyMessage = ConsumerMessageType>(options: PostgreSQLReactorOptions<MessageType>) => PostgreSQLProcessor<MessageType>;
782
+ workflowProcessor: <Input extends AnyEvent | AnyCommand, State, Output extends AnyEvent | AnyCommand, MetaDataType extends AnyRecordedMessageMetadata = AnyRecordedMessageMetadata, HandlerContext extends PostgreSQLProcessorHandlerContext & WorkflowProcessorContext = PostgreSQLProcessorHandlerContext & WorkflowProcessorContext, StoredMessage extends AnyEvent | AnyCommand = Output>(options: PostgreSQLWorkflowProcessorOptions<Input, State, Output, MetaDataType, HandlerContext, StoredMessage>) => PostgreSQLProcessor<Input | Output>;
727
783
  }> & (AnyEvent extends ConsumerMessageType ? Readonly<{
728
- projector: <EventType extends AnyEvent = ConsumerMessageType & AnyEvent>(options: PostgreSQLProjectorOptions<EventType>) => PostgreSQLProcessor<EventType>;
784
+ projector: <EventType extends AnyEvent = ConsumerMessageType & AnyEvent>(options: PostgreSQLProjectorOptions<EventType>) => PostgreSQLProcessor<EventType>;
729
785
  }> : object);
730
786
  declare const postgreSQLEventStoreConsumer: <ConsumerMessageType extends Message = AnyMessage>(options: PostgreSQLEventStoreConsumerOptions<ConsumerMessageType>) => PostgreSQLEventStoreConsumer<ConsumerMessageType>;
731
-
787
+ //#endregion
788
+ //#region src/eventStore/consumers/rebuildPostgreSQLProjections.d.ts
732
789
  declare const rebuildPostgreSQLProjections: <EventType extends AnyEvent = AnyEvent>(options: Omit<PostgreSQLEventStoreConsumerOptions<EventType>, "stopWhen" | "processors"> & {
733
- lock?: {
734
- acquisitionPolicy?: LockAcquisitionPolicy;
735
- timeoutSeconds?: number;
736
- };
790
+ lock?: {
791
+ acquisitionPolicy?: LockAcquisitionPolicy;
792
+ timeoutSeconds?: number;
793
+ };
737
794
  } & ({
738
- projections: (ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext> | PostgreSQLProjectionDefinition<EventType>)[];
795
+ projections: (ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext> | PostgreSQLProjectionDefinition<EventType>)[];
739
796
  } | ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>)) => PostgreSQLEventStoreConsumer<EventType>;
740
-
741
- export { type AppendToStreamBeforeCommitHook, type CreateEventStoreSchemaOptions, DefaultPostgreSQLEventStoreProcessorBatchSize, DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs, DefaultPostgreSQLProcessorLockPolicy, type EventStoreSchemaMigrationOptions, type LockAcquisitionPolicy, type PongoAssertOptions, type PongoDocumentEvolve, type PongoMultiStreamProjectionOptions, type PongoProjectionHandlerContext, type PongoProjectionOptions, type PongoSingleStreamProjectionOptions, type PongoWithNotNullDocumentEvolve, type PongoWithNullableDocumentEvolve, type PostgreSQLCheckpointer, type PostgreSQLEventStoreConsumer, type PostgreSQLEventStoreConsumerConfig, type PostgreSQLEventStoreConsumerOptions, PostgreSQLEventStoreDefaultStreamVersion, type PostgreSQLEventStoreMessageBatchPuller, type PostgreSQLEventStoreMessageBatchPullerOptions, type PostgreSQLEventStoreMessageBatchPullerStartFrom, type PostgreSQLEventStoreMessageBatchPullerStartOptions, type PostgreSQLEventStoreMessagesBatchHandlerResult, type PostgreSQLProcessor, type PostgreSQLProcessorConnectionOptions, type PostgreSQLProcessorEachBatchHandler, type PostgreSQLProcessorEachMessageHandler, type PostgreSQLProcessorHandlerContext, type PostgreSQLProcessorLock, type PostgreSQLProcessorLockContext, type PostgreSQLProcessorLockOptions, type PostgreSQLProcessorStartFrom, type PostgreSQLProjectionAssert, type PostgreSQLProjectionDefinition, type PostgreSQLProjectionHandler, type PostgreSQLProjectionHandlerContext, type PostgreSQLProjectionHandlerOptions, type PostgreSQLProjectionLock, type PostgreSQLProjectionLockContext, type PostgreSQLProjectionLockOptions, PostgreSQLProjectionSpec, type PostgreSQLProjectionSpecEvent, type PostgreSQLProjectionSpecOptions, type PostgreSQLProjectionSpecWhenOptions, type PostgreSQLProjectorOptions, type PostgreSQLRawBatchSQLProjection, type PostgreSQLRawSQLProjection, type PostgreSQLReactorOptions, type PostgreSQLWorkflowProcessorOptions, type PostgresEventStore, type PostgresEventStoreConnectionOptions, type PostgresEventStoreOptions, type PostgresReadEvent, type PostgresReadEventMetadata, type PostgresStreamExistsOptions, type ReadLastMessageGlobalPositionResult, type ReadMessagesBatchOptions, type ReadMessagesBatchResult, type ReadProcessorCheckpointResult, type ReadProjectionInfoResult, type StoreProcessorCheckpointResult, activateProjection, activateProjectionSQL, addDefaultPartitionSQL, addModuleForAllTenantsSQL, addModuleSQL, addPartitionSQL, addTablePartitions, addTenantForAllModulesSQL, addTenantSQL, appendToStream, appendToStreamSQL, assertSQLQueryResultMatches, callActivateProjection, callAppendToStream, callDeactivateProjection, callRegisterProjection, callReleaseProcessorLock, callStoreProcessorCheckpoint, callTryAcquireProcessorLock, callTryAcquireProjectionLock, cleanupLegacySubscriptionTables, createEventStoreSchema, deactivateProjection, deactivateProjectionSQL, defaultPostgreSQLOptions, defaultTag, documentDoesNotExist, documentExists, documentMatchingExists, documentsAreTheSame, documentsMatchingHaveCount, emmettPrefix, eventInStream, eventStoreSchemaMigrations, eventsInStream, expectPongoDocuments, expectSQL, getPostgreSQLEventStore, globalNames, globalTag, handleProjections, messagesTable, messagesTableSQL, newEventsInStream, pongoMultiStreamProjection, pongoProjection, pongoSingleStreamProjection, postgreSQLCheckpointer, postgreSQLEventStoreConsumer, postgreSQLEventStoreMessageBatchPuller, postgreSQLProcessorLock, postgreSQLProjection, postgreSQLProjectionLock, postgreSQLProjector, postgreSQLRawBatchSQLProjection, postgreSQLRawSQLProjection, postgreSQLReactor, postgreSQLWorkflowProcessor, processorsTable, processorsTableSQL, projectionsTable, projectionsTableSQL, readLastMessageGlobalPosition, readMessagesBatch, readProcessorCheckpoint, readProjectionInfo, readStream, rebuildPostgreSQLProjections, registerProjection, registerProjectionSQL, releaseProcessorLockSQL, sanitizeNameSQL, schemaMigration, schemaSQL, storeProcessorCheckpoint, storeSubscriptionCheckpointSQL, streamExists, streamsTable, streamsTableSQL, toProcessorLockKey, toProjectionLockKey, transactionToPostgreSQLProjectionHandlerContext, tryAcquireProcessorLockSQL, tryAcquireProjectionLockSQL, unknownTag, zipPostgreSQLEventStoreMessageBatchPullerStartFrom };
797
+ //#endregion
798
+ export { AppendToStreamBeforeCommitHook, CreateEventStoreSchemaOptions, DefaultPostgreSQLEventStoreProcessorBatchSize, DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs, DefaultPostgreSQLProcessorLockPolicy, EventStoreSchemaMigrationOptions, type LockAcquisitionPolicy, PongoAssertOptions, PongoDocumentEvolve, PongoMultiStreamProjectionOptions, PongoProjectionHandlerContext, PongoProjectionOptions, PongoSingleStreamProjectionOptions, PongoWithNotNullDocumentEvolve, PongoWithNullableDocumentEvolve, PostgreSQLCheckpointer, PostgreSQLEventStoreConsumer, PostgreSQLEventStoreConsumerConfig, PostgreSQLEventStoreConsumerOptions, PostgreSQLEventStoreDefaultStreamVersion, PostgreSQLEventStoreMessageBatchPuller, PostgreSQLEventStoreMessageBatchPullerOptions, PostgreSQLEventStoreMessageBatchPullerStartFrom, PostgreSQLEventStoreMessageBatchPullerStartOptions, PostgreSQLEventStoreMessagesBatchHandlerResult, PostgreSQLProcessor, PostgreSQLProcessorConnectionOptions, PostgreSQLProcessorEachBatchHandler, PostgreSQLProcessorEachMessageHandler, PostgreSQLProcessorHandlerContext, PostgreSQLProcessorLock, PostgreSQLProcessorLockContext, PostgreSQLProcessorLockOptions, PostgreSQLProcessorStartFrom, PostgreSQLProjectionAssert, PostgreSQLProjectionDefinition, PostgreSQLProjectionHandler, PostgreSQLProjectionHandlerContext, PostgreSQLProjectionHandlerOptions, PostgreSQLProjectionLock, PostgreSQLProjectionLockContext, PostgreSQLProjectionLockOptions, PostgreSQLProjectionSpec, PostgreSQLProjectionSpecEvent, PostgreSQLProjectionSpecOptions, PostgreSQLProjectionSpecWhenOptions, PostgreSQLProjectorOptions, PostgreSQLRawBatchSQLProjection, PostgreSQLRawSQLProjection, PostgreSQLReactorOptions, PostgreSQLWorkflowProcessorOptions, PostgresEventStore, PostgresEventStoreConnectionOptions, PostgresEventStoreOptions, PostgresReadEvent, PostgresReadEventMetadata, PostgresStreamExistsOptions, ReadLastMessageGlobalPositionResult, ReadMessagesBatchOptions, ReadMessagesBatchResult, ReadProcessorCheckpointResult, ReadProjectionInfoResult, StoreProcessorCheckpointResult, activateProjection, activateProjectionSQL, addDefaultPartitionSQL, addModuleForAllTenantsSQL, addModuleSQL, addPartitionSQL, addTablePartitions, addTenantForAllModulesSQL, addTenantSQL, appendToStream, appendToStreamSQL, assertSQLQueryResultMatches, callActivateProjection, callAppendToStream, callDeactivateProjection, callRegisterProjection, callReleaseProcessorLock, callStoreProcessorCheckpoint, callTryAcquireProcessorLock, callTryAcquireProjectionLock, cleanupLegacySubscriptionTables, createEventStoreSchema, deactivateProjection, deactivateProjectionSQL, defaultPostgreSQLOptions, defaultTag, documentDoesNotExist, documentExists, documentMatchingExists, documentsAreTheSame, documentsMatchingHaveCount, emmettPrefix, eventInStream, eventStoreSchemaMigrations, eventsInStream, expectPongoDocuments, expectSQL, getPostgreSQLEventStore, globalNames, globalTag, handleProjections, messagesTable, messagesTableSQL, newEventsInStream, pongoMultiStreamProjection, pongoProjection, pongoSingleStreamProjection, postgreSQLCheckpointer, postgreSQLEventStoreConsumer, postgreSQLEventStoreMessageBatchPuller, postgreSQLProcessorLock, postgreSQLProjection, postgreSQLProjectionLock, postgreSQLProjector, postgreSQLRawBatchSQLProjection, postgreSQLRawSQLProjection, postgreSQLReactor, postgreSQLWorkflowProcessor, processorsTable, processorsTableSQL, projectionsTable, projectionsTableSQL, readLastMessageGlobalPosition, readMessagesBatch, readProcessorCheckpoint, readProjectionInfo, readStream, rebuildPostgreSQLProjections, registerProjection, registerProjectionSQL, releaseProcessorLockSQL, sanitizeNameSQL, schemaMigration, schemaSQL, storeProcessorCheckpoint, storeSubscriptionCheckpointSQL, streamExists, streamsTable, streamsTableSQL, toProcessorLockKey, toProjectionLockKey, transactionToPostgreSQLProjectionHandlerContext, tryAcquireProcessorLockSQL, tryAcquireProjectionLockSQL, unknownTag, zipPostgreSQLEventStoreMessageBatchPullerStartFrom };
799
+ //# sourceMappingURL=index.d.cts.map