@event-driven-io/emmett-postgresql 0.43.0-beta.16 → 0.43.0-beta.18
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/README.md +1 -1
- package/dist/index.cjs +642 -436
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -33
- package/dist/index.d.ts +54 -33
- package/dist/index.js +644 -440
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _$_event_driven_io_dumbo0 from "@event-driven-io/dumbo";
|
|
|
2
2
|
import { AnyConnection, DatabaseTransaction, Dumbo, MigrationStyle, QueryResultRow, RunSQLMigrationsResult, SQL, SQLExecutor, SQLMigration } from "@event-driven-io/dumbo";
|
|
3
3
|
import * as _$_event_driven_io_emmett0 from "@event-driven-io/emmett";
|
|
4
4
|
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";
|
|
5
|
-
import { PgClient, PgClientConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
|
|
5
|
+
import { PgClient, PgClientConnection, PgConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
|
|
6
6
|
import pg from "pg";
|
|
7
7
|
import { PongoClient, PongoDBCollectionOptions, PongoDocument, PongoFilter, WithId } from "@event-driven-io/pongo";
|
|
8
8
|
|
|
@@ -304,6 +304,41 @@ declare const expectSQL: {
|
|
|
304
304
|
};
|
|
305
305
|
};
|
|
306
306
|
//#endregion
|
|
307
|
+
//#region src/eventStore/schema/readMessagesBatch.d.ts
|
|
308
|
+
declare const PostgreSQLEventStoreCheckpoint: {
|
|
309
|
+
default: {
|
|
310
|
+
transactionId: bigint;
|
|
311
|
+
globalPosition: bigint;
|
|
312
|
+
};
|
|
313
|
+
parse: (checkPoint: ProcessorCheckpoint | undefined | null) => PostgreSQLEventStoreCheckpoint;
|
|
314
|
+
toProcessorCheckpoint: (checkPoint: PostgreSQLEventStoreCheckpoint) => ProcessorCheckpoint;
|
|
315
|
+
};
|
|
316
|
+
type PostgreSQLEventStoreCheckpoint = {
|
|
317
|
+
transactionId: bigint;
|
|
318
|
+
globalPosition: bigint;
|
|
319
|
+
};
|
|
320
|
+
type ReadMessagesBatchOptions = {
|
|
321
|
+
after: PostgreSQLEventStoreCheckpoint;
|
|
322
|
+
batchSize: number;
|
|
323
|
+
} | {
|
|
324
|
+
from: PostgreSQLEventStoreCheckpoint;
|
|
325
|
+
batchSize: number;
|
|
326
|
+
} | {
|
|
327
|
+
to: PostgreSQLEventStoreCheckpoint;
|
|
328
|
+
batchSize: number;
|
|
329
|
+
} | {
|
|
330
|
+
from: PostgreSQLEventStoreCheckpoint;
|
|
331
|
+
to: PostgreSQLEventStoreCheckpoint;
|
|
332
|
+
};
|
|
333
|
+
type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
|
|
334
|
+
currentCheckpoint: PostgreSQLEventStoreCheckpoint;
|
|
335
|
+
messages: RecordedMessage<MessageType, MessageMetadataType>[];
|
|
336
|
+
areMessagesLeft: boolean;
|
|
337
|
+
};
|
|
338
|
+
declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
|
|
339
|
+
partition?: string;
|
|
340
|
+
}) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
|
|
341
|
+
//#endregion
|
|
307
342
|
//#region src/eventStore/schema/appendToStream.d.ts
|
|
308
343
|
declare const appendToStreamSQL: SQL;
|
|
309
344
|
type CallAppendToStreamParams = {
|
|
@@ -322,18 +357,27 @@ declare const callAppendToStream: (params: CallAppendToStreamParams) => SQL;
|
|
|
322
357
|
type AppendToStreamResult = {
|
|
323
358
|
success: true;
|
|
324
359
|
nextStreamPosition: bigint;
|
|
325
|
-
|
|
326
|
-
transactionId: string;
|
|
360
|
+
checkpoints: PostgreSQLEventStoreCheckpoint[];
|
|
327
361
|
} | {
|
|
328
362
|
success: false;
|
|
329
363
|
};
|
|
330
364
|
type AppendToStreamBeforeCommitHook = (messages: RecordedMessage[], context: {
|
|
331
365
|
transaction: PgTransaction;
|
|
332
366
|
}) => Promise<void>;
|
|
333
|
-
declare const appendToStream: (
|
|
367
|
+
declare const appendToStream: (connection: PgConnection, streamName: string, streamType: string, messages: Message[], options?: AppendToStreamOptions & {
|
|
334
368
|
partition?: string;
|
|
335
369
|
beforeCommitHook?: AppendToStreamBeforeCommitHook;
|
|
336
370
|
}) => Promise<AppendToStreamResult>;
|
|
371
|
+
type AppendToStreamSqlResult = {
|
|
372
|
+
success: boolean;
|
|
373
|
+
next_stream_position: string | null;
|
|
374
|
+
global_positions: string[] | null;
|
|
375
|
+
transaction_id: string | null | undefined;
|
|
376
|
+
};
|
|
377
|
+
declare const appentToStreamRaw: (execute: SQLExecutor, streamId: string, streamType: string, messages: RecordedMessage[], options?: {
|
|
378
|
+
expectedStreamVersion: bigint | null;
|
|
379
|
+
partition?: string;
|
|
380
|
+
}) => Promise<AppendToStreamSqlResult>;
|
|
337
381
|
//#endregion
|
|
338
382
|
//#region src/eventStore/schema/migrations/index.d.ts
|
|
339
383
|
declare const currentPostgreSQLEventStoreSchemaVersion = "0.43.0";
|
|
@@ -405,36 +449,13 @@ type CallDeactivateProjectionParams = {
|
|
|
405
449
|
};
|
|
406
450
|
declare const callDeactivateProjection: (params: CallDeactivateProjectionParams) => SQL;
|
|
407
451
|
//#endregion
|
|
408
|
-
//#region src/eventStore/schema/
|
|
409
|
-
type
|
|
410
|
-
|
|
452
|
+
//#region src/eventStore/schema/readLastMessageCheckpoint.d.ts
|
|
453
|
+
type ReadLastMessageCheckpointResult = {
|
|
454
|
+
currentCheckpoint: PostgreSQLEventStoreCheckpoint | null;
|
|
411
455
|
};
|
|
412
|
-
declare const
|
|
456
|
+
declare const readLastMessageCheckpoint: (execute: SQLExecutor, options?: {
|
|
413
457
|
partition?: string;
|
|
414
|
-
}) => Promise<
|
|
415
|
-
//#endregion
|
|
416
|
-
//#region src/eventStore/schema/readMessagesBatch.d.ts
|
|
417
|
-
type ReadMessagesBatchOptions = {
|
|
418
|
-
after: bigint;
|
|
419
|
-
batchSize: number;
|
|
420
|
-
} | {
|
|
421
|
-
from: bigint;
|
|
422
|
-
batchSize: number;
|
|
423
|
-
} | {
|
|
424
|
-
to: bigint;
|
|
425
|
-
batchSize: number;
|
|
426
|
-
} | {
|
|
427
|
-
from: bigint;
|
|
428
|
-
to: bigint;
|
|
429
|
-
};
|
|
430
|
-
type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
|
|
431
|
-
currentGlobalPosition: bigint;
|
|
432
|
-
messages: RecordedMessage<MessageType, MessageMetadataType>[];
|
|
433
|
-
areMessagesLeft: boolean;
|
|
434
|
-
};
|
|
435
|
-
declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
|
|
436
|
-
partition?: string;
|
|
437
|
-
}) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
|
|
458
|
+
}) => Promise<ReadLastMessageCheckpointResult>;
|
|
438
459
|
//#endregion
|
|
439
460
|
//#region src/eventStore/schema/readProcessorCheckpoint.d.ts
|
|
440
461
|
type ReadProcessorCheckpointResult = {
|
|
@@ -759,5 +780,5 @@ declare const rebuildPostgreSQLProjections: <EventType extends AnyEvent = AnyEve
|
|
|
759
780
|
projections: (ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext> | PostgreSQLProjectionDefinition<EventType>)[];
|
|
760
781
|
} | ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>)) => PostgreSQLEventStoreConsumer<EventType>;
|
|
761
782
|
//#endregion
|
|
762
|
-
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,
|
|
783
|
+
export { AppendToStreamBeforeCommitHook, CreateEventStoreSchemaOptions, DefaultPostgreSQLEventStoreProcessorBatchSize, DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs, DefaultPostgreSQLProcessorLockPolicy, EventStoreSchemaMigrationOptions, type LockAcquisitionPolicy, PongoAssertOptions, PongoDocumentEvolve, PongoMultiStreamProjectionOptions, PongoProjectionHandlerContext, PongoProjectionOptions, PongoSingleStreamProjectionOptions, PongoWithNotNullDocumentEvolve, PongoWithNullableDocumentEvolve, PostgreSQLCheckpointer, PostgreSQLEventStoreCheckpoint, 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, ReadLastMessageCheckpointResult, ReadMessagesBatchOptions, ReadMessagesBatchResult, ReadProcessorCheckpointResult, ReadProjectionInfoResult, StoreProcessorCheckpointResult, activateProjection, activateProjectionSQL, addDefaultPartitionSQL, addModuleForAllTenantsSQL, addModuleSQL, addPartitionSQL, addTablePartitions, addTenantForAllModulesSQL, addTenantSQL, appendToStream, appendToStreamSQL, appentToStreamRaw, assertSQLQueryResultMatches, callActivateProjection, callAppendToStream, callDeactivateProjection, callRegisterProjection, callReleaseProcessorLock, callStoreProcessorCheckpoint, callTryAcquireProcessorLock, callTryAcquireProjectionLock, createEventStoreSchema, currentPostgreSQLEventStoreSchemaVersion, deactivateProjection, deactivateProjectionSQL, defaultPostgreSQLOptions, documentDoesNotExist, documentExists, documentMatchingExists, documentsAreTheSame, documentsMatchingHaveCount, eventInStream, eventStoreSchemaMigrations, eventsInStream, expectPongoDocuments, expectSQL, getPostgreSQLEventStore, handleProjections, messagesTableSQL, newEventsInStream, pastEventStoreSchemaMigrations, pongoMultiStreamProjection, pongoProjection, pongoSingleStreamProjection, postgreSQLCheckpointer, postgreSQLEventStoreConsumer, postgreSQLEventStoreMessageBatchPuller, postgreSQLProcessorLock, postgreSQLProjection, postgreSQLProjectionLock, postgreSQLProjector, postgreSQLRawBatchSQLProjection, postgreSQLRawSQLProjection, postgreSQLReactor, postgreSQLWorkflowProcessor, processorsTableSQL, projectionsTableSQL, readLastMessageCheckpoint, readMessagesBatch, readProcessorCheckpoint, readProjectionInfo, readStream, rebuildPostgreSQLProjections, registerProjection, registerProjectionSQL, releaseProcessorLockSQL, sanitizeNameSQL, schemaMigration, schemaSQL, storeProcessorCheckpoint, storeSubscriptionCheckpointSQL, streamExists, streamsTableSQL, toProcessorLockKey, toProjectionLockKey, transactionToPostgreSQLProjectionHandlerContext, tryAcquireProcessorLockSQL, tryAcquireProjectionLockSQL, zipPostgreSQLEventStoreMessageBatchPullerStartFrom };
|
|
763
784
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyCommand, AnyEvent, AnyMessage, AnyReadEventMetadata, AnyRecordedMess
|
|
|
3
3
|
import * as _$_event_driven_io_dumbo0 from "@event-driven-io/dumbo";
|
|
4
4
|
import { AnyConnection, DatabaseTransaction, Dumbo, MigrationStyle, QueryResultRow, RunSQLMigrationsResult, SQL, SQLExecutor, SQLMigration } from "@event-driven-io/dumbo";
|
|
5
5
|
import { PongoClient, PongoDBCollectionOptions, PongoDocument, PongoFilter, WithId } from "@event-driven-io/pongo";
|
|
6
|
-
import { PgClient, PgClientConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
|
|
6
|
+
import { PgClient, PgClientConnection, PgConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
|
|
7
7
|
import pg from "pg";
|
|
8
8
|
|
|
9
9
|
//#region src/eventStore/consumers/messageBatchProcessing/index.d.ts
|
|
@@ -304,6 +304,41 @@ declare const expectSQL: {
|
|
|
304
304
|
};
|
|
305
305
|
};
|
|
306
306
|
//#endregion
|
|
307
|
+
//#region src/eventStore/schema/readMessagesBatch.d.ts
|
|
308
|
+
declare const PostgreSQLEventStoreCheckpoint: {
|
|
309
|
+
default: {
|
|
310
|
+
transactionId: bigint;
|
|
311
|
+
globalPosition: bigint;
|
|
312
|
+
};
|
|
313
|
+
parse: (checkPoint: ProcessorCheckpoint | undefined | null) => PostgreSQLEventStoreCheckpoint;
|
|
314
|
+
toProcessorCheckpoint: (checkPoint: PostgreSQLEventStoreCheckpoint) => ProcessorCheckpoint;
|
|
315
|
+
};
|
|
316
|
+
type PostgreSQLEventStoreCheckpoint = {
|
|
317
|
+
transactionId: bigint;
|
|
318
|
+
globalPosition: bigint;
|
|
319
|
+
};
|
|
320
|
+
type ReadMessagesBatchOptions = {
|
|
321
|
+
after: PostgreSQLEventStoreCheckpoint;
|
|
322
|
+
batchSize: number;
|
|
323
|
+
} | {
|
|
324
|
+
from: PostgreSQLEventStoreCheckpoint;
|
|
325
|
+
batchSize: number;
|
|
326
|
+
} | {
|
|
327
|
+
to: PostgreSQLEventStoreCheckpoint;
|
|
328
|
+
batchSize: number;
|
|
329
|
+
} | {
|
|
330
|
+
from: PostgreSQLEventStoreCheckpoint;
|
|
331
|
+
to: PostgreSQLEventStoreCheckpoint;
|
|
332
|
+
};
|
|
333
|
+
type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
|
|
334
|
+
currentCheckpoint: PostgreSQLEventStoreCheckpoint;
|
|
335
|
+
messages: RecordedMessage<MessageType, MessageMetadataType>[];
|
|
336
|
+
areMessagesLeft: boolean;
|
|
337
|
+
};
|
|
338
|
+
declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
|
|
339
|
+
partition?: string;
|
|
340
|
+
}) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
|
|
341
|
+
//#endregion
|
|
307
342
|
//#region src/eventStore/schema/appendToStream.d.ts
|
|
308
343
|
declare const appendToStreamSQL: SQL;
|
|
309
344
|
type CallAppendToStreamParams = {
|
|
@@ -322,18 +357,27 @@ declare const callAppendToStream: (params: CallAppendToStreamParams) => SQL;
|
|
|
322
357
|
type AppendToStreamResult = {
|
|
323
358
|
success: true;
|
|
324
359
|
nextStreamPosition: bigint;
|
|
325
|
-
|
|
326
|
-
transactionId: string;
|
|
360
|
+
checkpoints: PostgreSQLEventStoreCheckpoint[];
|
|
327
361
|
} | {
|
|
328
362
|
success: false;
|
|
329
363
|
};
|
|
330
364
|
type AppendToStreamBeforeCommitHook = (messages: RecordedMessage[], context: {
|
|
331
365
|
transaction: PgTransaction;
|
|
332
366
|
}) => Promise<void>;
|
|
333
|
-
declare const appendToStream: (
|
|
367
|
+
declare const appendToStream: (connection: PgConnection, streamName: string, streamType: string, messages: Message[], options?: AppendToStreamOptions & {
|
|
334
368
|
partition?: string;
|
|
335
369
|
beforeCommitHook?: AppendToStreamBeforeCommitHook;
|
|
336
370
|
}) => Promise<AppendToStreamResult>;
|
|
371
|
+
type AppendToStreamSqlResult = {
|
|
372
|
+
success: boolean;
|
|
373
|
+
next_stream_position: string | null;
|
|
374
|
+
global_positions: string[] | null;
|
|
375
|
+
transaction_id: string | null | undefined;
|
|
376
|
+
};
|
|
377
|
+
declare const appentToStreamRaw: (execute: SQLExecutor, streamId: string, streamType: string, messages: RecordedMessage[], options?: {
|
|
378
|
+
expectedStreamVersion: bigint | null;
|
|
379
|
+
partition?: string;
|
|
380
|
+
}) => Promise<AppendToStreamSqlResult>;
|
|
337
381
|
//#endregion
|
|
338
382
|
//#region src/eventStore/schema/migrations/index.d.ts
|
|
339
383
|
declare const currentPostgreSQLEventStoreSchemaVersion = "0.43.0";
|
|
@@ -405,36 +449,13 @@ type CallDeactivateProjectionParams = {
|
|
|
405
449
|
};
|
|
406
450
|
declare const callDeactivateProjection: (params: CallDeactivateProjectionParams) => SQL;
|
|
407
451
|
//#endregion
|
|
408
|
-
//#region src/eventStore/schema/
|
|
409
|
-
type
|
|
410
|
-
|
|
452
|
+
//#region src/eventStore/schema/readLastMessageCheckpoint.d.ts
|
|
453
|
+
type ReadLastMessageCheckpointResult = {
|
|
454
|
+
currentCheckpoint: PostgreSQLEventStoreCheckpoint | null;
|
|
411
455
|
};
|
|
412
|
-
declare const
|
|
456
|
+
declare const readLastMessageCheckpoint: (execute: SQLExecutor, options?: {
|
|
413
457
|
partition?: string;
|
|
414
|
-
}) => Promise<
|
|
415
|
-
//#endregion
|
|
416
|
-
//#region src/eventStore/schema/readMessagesBatch.d.ts
|
|
417
|
-
type ReadMessagesBatchOptions = {
|
|
418
|
-
after: bigint;
|
|
419
|
-
batchSize: number;
|
|
420
|
-
} | {
|
|
421
|
-
from: bigint;
|
|
422
|
-
batchSize: number;
|
|
423
|
-
} | {
|
|
424
|
-
to: bigint;
|
|
425
|
-
batchSize: number;
|
|
426
|
-
} | {
|
|
427
|
-
from: bigint;
|
|
428
|
-
to: bigint;
|
|
429
|
-
};
|
|
430
|
-
type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
|
|
431
|
-
currentGlobalPosition: bigint;
|
|
432
|
-
messages: RecordedMessage<MessageType, MessageMetadataType>[];
|
|
433
|
-
areMessagesLeft: boolean;
|
|
434
|
-
};
|
|
435
|
-
declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
|
|
436
|
-
partition?: string;
|
|
437
|
-
}) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
|
|
458
|
+
}) => Promise<ReadLastMessageCheckpointResult>;
|
|
438
459
|
//#endregion
|
|
439
460
|
//#region src/eventStore/schema/readProcessorCheckpoint.d.ts
|
|
440
461
|
type ReadProcessorCheckpointResult = {
|
|
@@ -759,5 +780,5 @@ declare const rebuildPostgreSQLProjections: <EventType extends AnyEvent = AnyEve
|
|
|
759
780
|
projections: (ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext> | PostgreSQLProjectionDefinition<EventType>)[];
|
|
760
781
|
} | ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>)) => PostgreSQLEventStoreConsumer<EventType>;
|
|
761
782
|
//#endregion
|
|
762
|
-
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,
|
|
783
|
+
export { AppendToStreamBeforeCommitHook, CreateEventStoreSchemaOptions, DefaultPostgreSQLEventStoreProcessorBatchSize, DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs, DefaultPostgreSQLProcessorLockPolicy, EventStoreSchemaMigrationOptions, type LockAcquisitionPolicy, PongoAssertOptions, PongoDocumentEvolve, PongoMultiStreamProjectionOptions, PongoProjectionHandlerContext, PongoProjectionOptions, PongoSingleStreamProjectionOptions, PongoWithNotNullDocumentEvolve, PongoWithNullableDocumentEvolve, PostgreSQLCheckpointer, PostgreSQLEventStoreCheckpoint, 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, ReadLastMessageCheckpointResult, ReadMessagesBatchOptions, ReadMessagesBatchResult, ReadProcessorCheckpointResult, ReadProjectionInfoResult, StoreProcessorCheckpointResult, activateProjection, activateProjectionSQL, addDefaultPartitionSQL, addModuleForAllTenantsSQL, addModuleSQL, addPartitionSQL, addTablePartitions, addTenantForAllModulesSQL, addTenantSQL, appendToStream, appendToStreamSQL, appentToStreamRaw, assertSQLQueryResultMatches, callActivateProjection, callAppendToStream, callDeactivateProjection, callRegisterProjection, callReleaseProcessorLock, callStoreProcessorCheckpoint, callTryAcquireProcessorLock, callTryAcquireProjectionLock, createEventStoreSchema, currentPostgreSQLEventStoreSchemaVersion, deactivateProjection, deactivateProjectionSQL, defaultPostgreSQLOptions, documentDoesNotExist, documentExists, documentMatchingExists, documentsAreTheSame, documentsMatchingHaveCount, eventInStream, eventStoreSchemaMigrations, eventsInStream, expectPongoDocuments, expectSQL, getPostgreSQLEventStore, handleProjections, messagesTableSQL, newEventsInStream, pastEventStoreSchemaMigrations, pongoMultiStreamProjection, pongoProjection, pongoSingleStreamProjection, postgreSQLCheckpointer, postgreSQLEventStoreConsumer, postgreSQLEventStoreMessageBatchPuller, postgreSQLProcessorLock, postgreSQLProjection, postgreSQLProjectionLock, postgreSQLProjector, postgreSQLRawBatchSQLProjection, postgreSQLRawSQLProjection, postgreSQLReactor, postgreSQLWorkflowProcessor, processorsTableSQL, projectionsTableSQL, readLastMessageCheckpoint, readMessagesBatch, readProcessorCheckpoint, readProjectionInfo, readStream, rebuildPostgreSQLProjections, registerProjection, registerProjectionSQL, releaseProcessorLockSQL, sanitizeNameSQL, schemaMigration, schemaSQL, storeProcessorCheckpoint, storeSubscriptionCheckpointSQL, streamExists, streamsTableSQL, toProcessorLockKey, toProjectionLockKey, transactionToPostgreSQLProjectionHandlerContext, tryAcquireProcessorLockSQL, tryAcquireProjectionLockSQL, zipPostgreSQLEventStoreMessageBatchPullerStartFrom };
|
|
763
784
|
//# sourceMappingURL=index.d.ts.map
|