@delta-base/core 1.2.3 → 1.2.4
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.ts +42 -42
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -271,25 +271,25 @@ declare namespace EventStoreAPI {
|
|
|
271
271
|
createdAt: z.ZodString;
|
|
272
272
|
}, "strip", z.ZodTypeAny, {
|
|
273
273
|
type: string;
|
|
274
|
-
createdAt: string;
|
|
275
274
|
data: Record<string, unknown>;
|
|
276
|
-
|
|
277
|
-
streamPosition: number;
|
|
275
|
+
createdAt: string;
|
|
278
276
|
globalPosition: number;
|
|
277
|
+
streamPosition: number;
|
|
279
278
|
streamId: string;
|
|
280
279
|
schemaVersion: string;
|
|
281
280
|
transactionId: string;
|
|
281
|
+
eventId: string;
|
|
282
282
|
metadata?: Record<string, unknown> | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
type: string;
|
|
285
|
-
createdAt: string;
|
|
286
285
|
data: Record<string, unknown>;
|
|
287
|
-
|
|
288
|
-
streamPosition: number;
|
|
286
|
+
createdAt: string;
|
|
289
287
|
globalPosition: number;
|
|
288
|
+
streamPosition: number;
|
|
290
289
|
streamId: string;
|
|
291
290
|
schemaVersion: string;
|
|
292
291
|
transactionId: string;
|
|
292
|
+
eventId: string;
|
|
293
293
|
metadata?: Record<string, unknown> | undefined;
|
|
294
294
|
}>;
|
|
295
295
|
export const AppendEventsRequestSchema: z.ZodObject<{
|
|
@@ -457,53 +457,53 @@ declare namespace EventStoreAPI {
|
|
|
457
457
|
createdAt: z.ZodString;
|
|
458
458
|
}, "strip", z.ZodTypeAny, {
|
|
459
459
|
type: string;
|
|
460
|
-
createdAt: string;
|
|
461
460
|
data: Record<string, unknown>;
|
|
462
|
-
|
|
463
|
-
streamPosition: number;
|
|
461
|
+
createdAt: string;
|
|
464
462
|
globalPosition: number;
|
|
463
|
+
streamPosition: number;
|
|
465
464
|
streamId: string;
|
|
466
465
|
schemaVersion: string;
|
|
467
466
|
transactionId: string;
|
|
467
|
+
eventId: string;
|
|
468
468
|
metadata?: Record<string, unknown> | undefined;
|
|
469
469
|
}, {
|
|
470
470
|
type: string;
|
|
471
|
-
createdAt: string;
|
|
472
471
|
data: Record<string, unknown>;
|
|
473
|
-
|
|
474
|
-
streamPosition: number;
|
|
472
|
+
createdAt: string;
|
|
475
473
|
globalPosition: number;
|
|
474
|
+
streamPosition: number;
|
|
476
475
|
streamId: string;
|
|
477
476
|
schemaVersion: string;
|
|
478
477
|
transactionId: string;
|
|
478
|
+
eventId: string;
|
|
479
479
|
metadata?: Record<string, unknown> | undefined;
|
|
480
480
|
}>, "many">;
|
|
481
481
|
currentStreamVersion: z.ZodNumber;
|
|
482
482
|
}, "strip", z.ZodTypeAny, {
|
|
483
483
|
events: {
|
|
484
484
|
type: string;
|
|
485
|
-
createdAt: string;
|
|
486
485
|
data: Record<string, unknown>;
|
|
487
|
-
|
|
488
|
-
streamPosition: number;
|
|
486
|
+
createdAt: string;
|
|
489
487
|
globalPosition: number;
|
|
488
|
+
streamPosition: number;
|
|
490
489
|
streamId: string;
|
|
491
490
|
schemaVersion: string;
|
|
492
491
|
transactionId: string;
|
|
492
|
+
eventId: string;
|
|
493
493
|
metadata?: Record<string, unknown> | undefined;
|
|
494
494
|
}[];
|
|
495
495
|
currentStreamVersion: number;
|
|
496
496
|
}, {
|
|
497
497
|
events: {
|
|
498
498
|
type: string;
|
|
499
|
-
createdAt: string;
|
|
500
499
|
data: Record<string, unknown>;
|
|
501
|
-
|
|
502
|
-
streamPosition: number;
|
|
500
|
+
createdAt: string;
|
|
503
501
|
globalPosition: number;
|
|
502
|
+
streamPosition: number;
|
|
504
503
|
streamId: string;
|
|
505
504
|
schemaVersion: string;
|
|
506
505
|
transactionId: string;
|
|
506
|
+
eventId: string;
|
|
507
507
|
metadata?: Record<string, unknown> | undefined;
|
|
508
508
|
}[];
|
|
509
509
|
currentStreamVersion: number;
|
|
@@ -528,32 +528,32 @@ declare namespace EventStoreAPI {
|
|
|
528
528
|
type?: string | string[] | undefined;
|
|
529
529
|
limit?: number | undefined;
|
|
530
530
|
offset?: number | undefined;
|
|
531
|
-
eventId?: string | undefined;
|
|
532
531
|
streamId?: string | undefined;
|
|
533
532
|
transactionId?: string | undefined;
|
|
534
533
|
phase?: number | undefined;
|
|
534
|
+
eventId?: string | undefined;
|
|
535
535
|
fromPosition?: number | undefined;
|
|
536
536
|
toPosition?: number | undefined;
|
|
537
537
|
fromDate?: string | undefined;
|
|
538
538
|
toDate?: string | undefined;
|
|
539
539
|
includeArchived?: boolean | undefined;
|
|
540
|
-
sortBy?: "createdAt" | "
|
|
540
|
+
sortBy?: "createdAt" | "globalPosition" | "streamPosition" | undefined;
|
|
541
541
|
sortDirection?: "asc" | "desc" | undefined;
|
|
542
542
|
includeCount?: boolean | undefined;
|
|
543
543
|
}, {
|
|
544
544
|
type?: string | string[] | undefined;
|
|
545
545
|
limit?: number | undefined;
|
|
546
546
|
offset?: number | undefined;
|
|
547
|
-
eventId?: string | undefined;
|
|
548
547
|
streamId?: string | undefined;
|
|
549
548
|
transactionId?: string | undefined;
|
|
550
549
|
phase?: number | undefined;
|
|
550
|
+
eventId?: string | undefined;
|
|
551
551
|
fromPosition?: number | undefined;
|
|
552
552
|
toPosition?: number | undefined;
|
|
553
553
|
fromDate?: string | undefined;
|
|
554
554
|
toDate?: string | undefined;
|
|
555
555
|
includeArchived?: boolean | undefined;
|
|
556
|
-
sortBy?: "createdAt" | "
|
|
556
|
+
sortBy?: "createdAt" | "globalPosition" | "streamPosition" | undefined;
|
|
557
557
|
sortDirection?: "asc" | "desc" | undefined;
|
|
558
558
|
includeCount?: boolean | undefined;
|
|
559
559
|
}>;
|
|
@@ -633,25 +633,25 @@ declare namespace EventStoreAPI {
|
|
|
633
633
|
createdAt: z.ZodString;
|
|
634
634
|
}, "strip", z.ZodTypeAny, {
|
|
635
635
|
type: string;
|
|
636
|
-
createdAt: string;
|
|
637
636
|
data: Record<string, unknown>;
|
|
638
|
-
|
|
639
|
-
streamPosition: number;
|
|
637
|
+
createdAt: string;
|
|
640
638
|
globalPosition: number;
|
|
639
|
+
streamPosition: number;
|
|
641
640
|
streamId: string;
|
|
642
641
|
schemaVersion: string;
|
|
643
642
|
transactionId: string;
|
|
643
|
+
eventId: string;
|
|
644
644
|
metadata?: Record<string, unknown> | undefined;
|
|
645
645
|
}, {
|
|
646
646
|
type: string;
|
|
647
|
-
createdAt: string;
|
|
648
647
|
data: Record<string, unknown>;
|
|
649
|
-
|
|
650
|
-
streamPosition: number;
|
|
648
|
+
createdAt: string;
|
|
651
649
|
globalPosition: number;
|
|
650
|
+
streamPosition: number;
|
|
652
651
|
streamId: string;
|
|
653
652
|
schemaVersion: string;
|
|
654
653
|
transactionId: string;
|
|
654
|
+
eventId: string;
|
|
655
655
|
metadata?: Record<string, unknown> | undefined;
|
|
656
656
|
}>, "many">;
|
|
657
657
|
pagination: z.ZodObject<{
|
|
@@ -673,14 +673,14 @@ declare namespace EventStoreAPI {
|
|
|
673
673
|
}, "strip", z.ZodTypeAny, {
|
|
674
674
|
events: {
|
|
675
675
|
type: string;
|
|
676
|
-
createdAt: string;
|
|
677
676
|
data: Record<string, unknown>;
|
|
678
|
-
|
|
679
|
-
streamPosition: number;
|
|
677
|
+
createdAt: string;
|
|
680
678
|
globalPosition: number;
|
|
679
|
+
streamPosition: number;
|
|
681
680
|
streamId: string;
|
|
682
681
|
schemaVersion: string;
|
|
683
682
|
transactionId: string;
|
|
683
|
+
eventId: string;
|
|
684
684
|
metadata?: Record<string, unknown> | undefined;
|
|
685
685
|
}[];
|
|
686
686
|
pagination: {
|
|
@@ -692,14 +692,14 @@ declare namespace EventStoreAPI {
|
|
|
692
692
|
}, {
|
|
693
693
|
events: {
|
|
694
694
|
type: string;
|
|
695
|
-
createdAt: string;
|
|
696
695
|
data: Record<string, unknown>;
|
|
697
|
-
|
|
698
|
-
streamPosition: number;
|
|
696
|
+
createdAt: string;
|
|
699
697
|
globalPosition: number;
|
|
698
|
+
streamPosition: number;
|
|
700
699
|
streamId: string;
|
|
701
700
|
schemaVersion: string;
|
|
702
701
|
transactionId: string;
|
|
702
|
+
eventId: string;
|
|
703
703
|
metadata?: Record<string, unknown> | undefined;
|
|
704
704
|
}[];
|
|
705
705
|
pagination: {
|
|
@@ -858,15 +858,15 @@ declare namespace EventBusAPI {
|
|
|
858
858
|
namespace: z.ZodString;
|
|
859
859
|
id: z.ZodString;
|
|
860
860
|
}>, "strip", z.ZodTypeAny, {
|
|
861
|
-
namespace: string;
|
|
862
861
|
id: string;
|
|
862
|
+
namespace: string;
|
|
863
863
|
retryPolicy?: {
|
|
864
864
|
maxAttempts: number;
|
|
865
865
|
backoffMinutes: number;
|
|
866
866
|
} | undefined;
|
|
867
867
|
}, {
|
|
868
|
-
namespace: string;
|
|
869
868
|
id: string;
|
|
869
|
+
namespace: string;
|
|
870
870
|
retryPolicy?: {
|
|
871
871
|
maxAttempts: number;
|
|
872
872
|
backoffMinutes: number;
|
|
@@ -875,8 +875,8 @@ declare namespace EventBusAPI {
|
|
|
875
875
|
}, "strip", z.ZodTypeAny, {
|
|
876
876
|
type: "durable_object";
|
|
877
877
|
config: {
|
|
878
|
-
namespace: string;
|
|
879
878
|
id: string;
|
|
879
|
+
namespace: string;
|
|
880
880
|
retryPolicy?: {
|
|
881
881
|
maxAttempts: number;
|
|
882
882
|
backoffMinutes: number;
|
|
@@ -885,8 +885,8 @@ declare namespace EventBusAPI {
|
|
|
885
885
|
}, {
|
|
886
886
|
type: "durable_object";
|
|
887
887
|
config: {
|
|
888
|
-
namespace: string;
|
|
889
888
|
id: string;
|
|
889
|
+
namespace: string;
|
|
890
890
|
retryPolicy?: {
|
|
891
891
|
maxAttempts: number;
|
|
892
892
|
backoffMinutes: number;
|
|
@@ -1103,8 +1103,8 @@ declare namespace EventBusAPI {
|
|
|
1103
1103
|
subscriber: {
|
|
1104
1104
|
type: "durable_object";
|
|
1105
1105
|
config: {
|
|
1106
|
-
namespace: string;
|
|
1107
1106
|
id: string;
|
|
1107
|
+
namespace: string;
|
|
1108
1108
|
retryPolicy?: {
|
|
1109
1109
|
maxAttempts: number;
|
|
1110
1110
|
backoffMinutes: number;
|
|
@@ -1158,8 +1158,8 @@ declare namespace EventBusAPI {
|
|
|
1158
1158
|
subscriber: {
|
|
1159
1159
|
type: "durable_object";
|
|
1160
1160
|
config: {
|
|
1161
|
-
namespace: string;
|
|
1162
1161
|
id: string;
|
|
1162
|
+
namespace: string;
|
|
1163
1163
|
retryPolicy?: {
|
|
1164
1164
|
maxAttempts: number;
|
|
1165
1165
|
backoffMinutes: number;
|
|
@@ -1629,10 +1629,9 @@ type Event<EventType extends string = string, EventData extends DefaultRecord =
|
|
|
1629
1629
|
type EventTypeOf<T extends Event> = T['type'];
|
|
1630
1630
|
type EventDataOf<T extends Event> = T['data'];
|
|
1631
1631
|
type EventMetaDataOf<T extends Event> = T['metadata'];
|
|
1632
|
-
type ReadEvent<EventType extends Event = Event
|
|
1632
|
+
type ReadEvent<EventType extends Event = Event> = {
|
|
1633
1633
|
type: EventTypeOf<EventType>;
|
|
1634
1634
|
data: EventDataOf<EventType>;
|
|
1635
|
-
metadata?: EventMetaDataType;
|
|
1636
1635
|
streamId: string;
|
|
1637
1636
|
streamPosition: number;
|
|
1638
1637
|
globalPosition: number;
|
|
@@ -1640,6 +1639,7 @@ type ReadEvent<EventType extends Event = Event, EventMetaDataType extends EventM
|
|
|
1640
1639
|
schemaVersion: string;
|
|
1641
1640
|
transactionId: string;
|
|
1642
1641
|
createdAt: string;
|
|
1642
|
+
metadata?: EventMetaDataOf<EventType>;
|
|
1643
1643
|
};
|
|
1644
1644
|
type ExpectedStreamVersion<VersionType = DefaultStreamVersionType> = ExpectedStreamVersionWithValue<VersionType> | ExpectedStreamVersionGeneral;
|
|
1645
1645
|
type ExpectedStreamVersionWithValue<VersionType = DefaultStreamVersionType> = Flavour<VersionType, 'StreamVersion'>;
|