@delta-base/core 1.2.3 → 1.2.5
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 +91 -94
- package/dist/index.js +1 -9
- package/package.json +4 -8
package/dist/index.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ declare namespace ManagementAPI {
|
|
|
157
157
|
eventBusDatabaseSize: number;
|
|
158
158
|
totalSize: number;
|
|
159
159
|
}>;
|
|
160
|
-
const EventStoreDetailsResponseSchema: z.ZodObject<
|
|
160
|
+
const EventStoreDetailsResponseSchema: z.ZodObject<{
|
|
161
161
|
eventStoreId: z.ZodString;
|
|
162
162
|
eventStoreName: z.ZodString;
|
|
163
163
|
eventStoreDurableObjectId: z.ZodString;
|
|
@@ -174,7 +174,7 @@ declare namespace ManagementAPI {
|
|
|
174
174
|
maxStreamSizeBytes?: number | undefined;
|
|
175
175
|
}>>;
|
|
176
176
|
created: z.ZodString;
|
|
177
|
-
}
|
|
177
|
+
} & {
|
|
178
178
|
streams: z.ZodOptional<z.ZodObject<{
|
|
179
179
|
count: z.ZodNumber;
|
|
180
180
|
totalEvents: z.ZodNumber;
|
|
@@ -198,7 +198,7 @@ declare namespace ManagementAPI {
|
|
|
198
198
|
eventBusDatabaseSize: number;
|
|
199
199
|
totalSize: number;
|
|
200
200
|
}>>;
|
|
201
|
-
}
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
202
|
eventStoreId: string;
|
|
203
203
|
created: string;
|
|
204
204
|
eventStoreName: string;
|
|
@@ -255,6 +255,7 @@ declare namespace ManagementAPI {
|
|
|
255
255
|
const routes: OpenAPIHono<{
|
|
256
256
|
Bindings: Env;
|
|
257
257
|
}, {}, "/">;
|
|
258
|
+
type ManagementAPIType = typeof routes;
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
declare namespace EventStoreAPI {
|
|
@@ -271,25 +272,25 @@ declare namespace EventStoreAPI {
|
|
|
271
272
|
createdAt: z.ZodString;
|
|
272
273
|
}, "strip", z.ZodTypeAny, {
|
|
273
274
|
type: string;
|
|
274
|
-
createdAt: string;
|
|
275
275
|
data: Record<string, unknown>;
|
|
276
|
-
|
|
277
|
-
streamPosition: number;
|
|
276
|
+
createdAt: string;
|
|
278
277
|
globalPosition: number;
|
|
278
|
+
streamPosition: number;
|
|
279
279
|
streamId: string;
|
|
280
280
|
schemaVersion: string;
|
|
281
281
|
transactionId: string;
|
|
282
|
+
eventId: string;
|
|
282
283
|
metadata?: Record<string, unknown> | undefined;
|
|
283
284
|
}, {
|
|
284
285
|
type: string;
|
|
285
|
-
createdAt: string;
|
|
286
286
|
data: Record<string, unknown>;
|
|
287
|
-
|
|
288
|
-
streamPosition: number;
|
|
287
|
+
createdAt: string;
|
|
289
288
|
globalPosition: number;
|
|
289
|
+
streamPosition: number;
|
|
290
290
|
streamId: string;
|
|
291
291
|
schemaVersion: string;
|
|
292
292
|
transactionId: string;
|
|
293
|
+
eventId: string;
|
|
293
294
|
metadata?: Record<string, unknown> | undefined;
|
|
294
295
|
}>;
|
|
295
296
|
export const AppendEventsRequestSchema: z.ZodObject<{
|
|
@@ -437,11 +438,11 @@ declare namespace EventStoreAPI {
|
|
|
437
438
|
}[];
|
|
438
439
|
}>]>;
|
|
439
440
|
export const ReadStreamOptionsSchema: z.ZodObject<{
|
|
440
|
-
expectedStreamVersion: z.ZodOptional<z.ZodNumber
|
|
441
|
+
expectedStreamVersion: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
441
442
|
}, "strip", z.ZodTypeAny, {
|
|
442
443
|
expectedStreamVersion?: number | undefined;
|
|
443
444
|
}, {
|
|
444
|
-
expectedStreamVersion?:
|
|
445
|
+
expectedStreamVersion?: string | undefined;
|
|
445
446
|
}>;
|
|
446
447
|
export const ReadStreamResponseSchema: z.ZodObject<{
|
|
447
448
|
events: z.ZodArray<z.ZodObject<{
|
|
@@ -457,53 +458,53 @@ declare namespace EventStoreAPI {
|
|
|
457
458
|
createdAt: z.ZodString;
|
|
458
459
|
}, "strip", z.ZodTypeAny, {
|
|
459
460
|
type: string;
|
|
460
|
-
createdAt: string;
|
|
461
461
|
data: Record<string, unknown>;
|
|
462
|
-
|
|
463
|
-
streamPosition: number;
|
|
462
|
+
createdAt: string;
|
|
464
463
|
globalPosition: number;
|
|
464
|
+
streamPosition: number;
|
|
465
465
|
streamId: string;
|
|
466
466
|
schemaVersion: string;
|
|
467
467
|
transactionId: string;
|
|
468
|
+
eventId: string;
|
|
468
469
|
metadata?: Record<string, unknown> | undefined;
|
|
469
470
|
}, {
|
|
470
471
|
type: string;
|
|
471
|
-
createdAt: string;
|
|
472
472
|
data: Record<string, unknown>;
|
|
473
|
-
|
|
474
|
-
streamPosition: number;
|
|
473
|
+
createdAt: string;
|
|
475
474
|
globalPosition: number;
|
|
475
|
+
streamPosition: number;
|
|
476
476
|
streamId: string;
|
|
477
477
|
schemaVersion: string;
|
|
478
478
|
transactionId: string;
|
|
479
|
+
eventId: string;
|
|
479
480
|
metadata?: Record<string, unknown> | undefined;
|
|
480
481
|
}>, "many">;
|
|
481
482
|
currentStreamVersion: z.ZodNumber;
|
|
482
483
|
}, "strip", z.ZodTypeAny, {
|
|
483
484
|
events: {
|
|
484
485
|
type: string;
|
|
485
|
-
createdAt: string;
|
|
486
486
|
data: Record<string, unknown>;
|
|
487
|
-
|
|
488
|
-
streamPosition: number;
|
|
487
|
+
createdAt: string;
|
|
489
488
|
globalPosition: number;
|
|
489
|
+
streamPosition: number;
|
|
490
490
|
streamId: string;
|
|
491
491
|
schemaVersion: string;
|
|
492
492
|
transactionId: string;
|
|
493
|
+
eventId: string;
|
|
493
494
|
metadata?: Record<string, unknown> | undefined;
|
|
494
495
|
}[];
|
|
495
496
|
currentStreamVersion: number;
|
|
496
497
|
}, {
|
|
497
498
|
events: {
|
|
498
499
|
type: string;
|
|
499
|
-
createdAt: string;
|
|
500
500
|
data: Record<string, unknown>;
|
|
501
|
-
|
|
502
|
-
streamPosition: number;
|
|
501
|
+
createdAt: string;
|
|
503
502
|
globalPosition: number;
|
|
503
|
+
streamPosition: number;
|
|
504
504
|
streamId: string;
|
|
505
505
|
schemaVersion: string;
|
|
506
506
|
transactionId: string;
|
|
507
|
+
eventId: string;
|
|
507
508
|
metadata?: Record<string, unknown> | undefined;
|
|
508
509
|
}[];
|
|
509
510
|
currentStreamVersion: number;
|
|
@@ -513,65 +514,65 @@ declare namespace EventStoreAPI {
|
|
|
513
514
|
type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
514
515
|
eventId: z.ZodOptional<z.ZodString>;
|
|
515
516
|
transactionId: z.ZodOptional<z.ZodString>;
|
|
516
|
-
fromPosition: z.ZodOptional<z.ZodNumber
|
|
517
|
-
toPosition: z.ZodOptional<z.ZodNumber
|
|
517
|
+
fromPosition: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
518
|
+
toPosition: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
518
519
|
fromDate: z.ZodOptional<z.ZodString>;
|
|
519
520
|
toDate: z.ZodOptional<z.ZodString>;
|
|
520
|
-
phase: z.ZodOptional<z.ZodNumber
|
|
521
|
-
includeArchived: z.ZodOptional<z.ZodBoolean
|
|
522
|
-
limit: z.ZodOptional<z.ZodNumber
|
|
523
|
-
offset: z.ZodOptional<z.ZodNumber
|
|
521
|
+
phase: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
522
|
+
includeArchived: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, boolean, string>, z.ZodBoolean>>;
|
|
523
|
+
limit: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
524
|
+
offset: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
524
525
|
sortBy: z.ZodOptional<z.ZodEnum<["globalPosition", "createdAt", "streamPosition"]>>;
|
|
525
526
|
sortDirection: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
526
|
-
includeCount: z.ZodOptional<z.ZodBoolean
|
|
527
|
+
includeCount: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, boolean, string>, z.ZodBoolean>>;
|
|
527
528
|
}, "strip", z.ZodTypeAny, {
|
|
528
529
|
type?: string | string[] | undefined;
|
|
529
530
|
limit?: number | undefined;
|
|
530
531
|
offset?: number | undefined;
|
|
531
|
-
eventId?: string | undefined;
|
|
532
532
|
streamId?: string | undefined;
|
|
533
533
|
transactionId?: string | undefined;
|
|
534
534
|
phase?: number | undefined;
|
|
535
|
+
eventId?: string | undefined;
|
|
535
536
|
fromPosition?: number | undefined;
|
|
536
537
|
toPosition?: number | undefined;
|
|
537
538
|
fromDate?: string | undefined;
|
|
538
539
|
toDate?: string | undefined;
|
|
539
540
|
includeArchived?: boolean | undefined;
|
|
540
|
-
sortBy?: "createdAt" | "
|
|
541
|
+
sortBy?: "createdAt" | "globalPosition" | "streamPosition" | undefined;
|
|
541
542
|
sortDirection?: "asc" | "desc" | undefined;
|
|
542
543
|
includeCount?: boolean | undefined;
|
|
543
544
|
}, {
|
|
544
545
|
type?: string | string[] | undefined;
|
|
545
|
-
limit?:
|
|
546
|
-
offset?:
|
|
547
|
-
eventId?: string | undefined;
|
|
546
|
+
limit?: string | undefined;
|
|
547
|
+
offset?: string | undefined;
|
|
548
548
|
streamId?: string | undefined;
|
|
549
549
|
transactionId?: string | undefined;
|
|
550
|
-
phase?:
|
|
551
|
-
|
|
552
|
-
|
|
550
|
+
phase?: string | undefined;
|
|
551
|
+
eventId?: string | undefined;
|
|
552
|
+
fromPosition?: string | undefined;
|
|
553
|
+
toPosition?: string | undefined;
|
|
553
554
|
fromDate?: string | undefined;
|
|
554
555
|
toDate?: string | undefined;
|
|
555
|
-
includeArchived?:
|
|
556
|
-
sortBy?: "createdAt" | "
|
|
556
|
+
includeArchived?: string | undefined;
|
|
557
|
+
sortBy?: "createdAt" | "globalPosition" | "streamPosition" | undefined;
|
|
557
558
|
sortDirection?: "asc" | "desc" | undefined;
|
|
558
|
-
includeCount?:
|
|
559
|
+
includeCount?: string | undefined;
|
|
559
560
|
}>;
|
|
560
561
|
export const QueryStreamsParamsSchema: z.ZodObject<{
|
|
561
562
|
streamId: z.ZodOptional<z.ZodString>;
|
|
562
563
|
streamType: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
563
564
|
streamIdPattern: z.ZodOptional<z.ZodString>;
|
|
564
|
-
minPosition: z.ZodOptional<z.ZodNumber
|
|
565
|
-
maxPosition: z.ZodOptional<z.ZodNumber
|
|
565
|
+
minPosition: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
566
|
+
maxPosition: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
566
567
|
fromDate: z.ZodOptional<z.ZodString>;
|
|
567
568
|
toDate: z.ZodOptional<z.ZodString>;
|
|
568
|
-
includeArchived: z.ZodOptional<z.ZodBoolean
|
|
569
|
-
includeMetadata: z.ZodOptional<z.ZodBoolean
|
|
570
|
-
limit: z.ZodOptional<z.ZodNumber
|
|
571
|
-
offset: z.ZodOptional<z.ZodNumber
|
|
569
|
+
includeArchived: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, boolean, string>, z.ZodBoolean>>;
|
|
570
|
+
includeMetadata: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, boolean, string>, z.ZodBoolean>>;
|
|
571
|
+
limit: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
572
|
+
offset: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
572
573
|
sortBy: z.ZodOptional<z.ZodEnum<["streamPosition", "createdAt", "updatedAt", "streamId"]>>;
|
|
573
574
|
sortDirection: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
574
|
-
includeCount: z.ZodOptional<z.ZodBoolean
|
|
575
|
+
includeCount: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, boolean, string>, z.ZodBoolean>>;
|
|
575
576
|
}, "strip", z.ZodTypeAny, {
|
|
576
577
|
limit?: number | undefined;
|
|
577
578
|
offset?: number | undefined;
|
|
@@ -588,20 +589,20 @@ declare namespace EventStoreAPI {
|
|
|
588
589
|
maxPosition?: number | undefined;
|
|
589
590
|
includeMetadata?: boolean | undefined;
|
|
590
591
|
}, {
|
|
591
|
-
limit?:
|
|
592
|
-
offset?:
|
|
592
|
+
limit?: string | undefined;
|
|
593
|
+
offset?: string | undefined;
|
|
593
594
|
streamId?: string | undefined;
|
|
594
595
|
fromDate?: string | undefined;
|
|
595
596
|
toDate?: string | undefined;
|
|
596
|
-
includeArchived?:
|
|
597
|
+
includeArchived?: string | undefined;
|
|
597
598
|
sortBy?: "createdAt" | "updatedAt" | "streamPosition" | "streamId" | undefined;
|
|
598
599
|
sortDirection?: "asc" | "desc" | undefined;
|
|
599
|
-
includeCount?:
|
|
600
|
+
includeCount?: string | undefined;
|
|
600
601
|
streamType?: string | string[] | undefined;
|
|
601
602
|
streamIdPattern?: string | undefined;
|
|
602
|
-
minPosition?:
|
|
603
|
-
maxPosition?:
|
|
604
|
-
includeMetadata?:
|
|
603
|
+
minPosition?: string | undefined;
|
|
604
|
+
maxPosition?: string | undefined;
|
|
605
|
+
includeMetadata?: string | undefined;
|
|
605
606
|
}>;
|
|
606
607
|
const PaginationSchema: z.ZodObject<{
|
|
607
608
|
limit: z.ZodNumber;
|
|
@@ -633,25 +634,25 @@ declare namespace EventStoreAPI {
|
|
|
633
634
|
createdAt: z.ZodString;
|
|
634
635
|
}, "strip", z.ZodTypeAny, {
|
|
635
636
|
type: string;
|
|
636
|
-
createdAt: string;
|
|
637
637
|
data: Record<string, unknown>;
|
|
638
|
-
|
|
639
|
-
streamPosition: number;
|
|
638
|
+
createdAt: string;
|
|
640
639
|
globalPosition: number;
|
|
640
|
+
streamPosition: number;
|
|
641
641
|
streamId: string;
|
|
642
642
|
schemaVersion: string;
|
|
643
643
|
transactionId: string;
|
|
644
|
+
eventId: string;
|
|
644
645
|
metadata?: Record<string, unknown> | undefined;
|
|
645
646
|
}, {
|
|
646
647
|
type: string;
|
|
647
|
-
createdAt: string;
|
|
648
648
|
data: Record<string, unknown>;
|
|
649
|
-
|
|
650
|
-
streamPosition: number;
|
|
649
|
+
createdAt: string;
|
|
651
650
|
globalPosition: number;
|
|
651
|
+
streamPosition: number;
|
|
652
652
|
streamId: string;
|
|
653
653
|
schemaVersion: string;
|
|
654
654
|
transactionId: string;
|
|
655
|
+
eventId: string;
|
|
655
656
|
metadata?: Record<string, unknown> | undefined;
|
|
656
657
|
}>, "many">;
|
|
657
658
|
pagination: z.ZodObject<{
|
|
@@ -673,14 +674,14 @@ declare namespace EventStoreAPI {
|
|
|
673
674
|
}, "strip", z.ZodTypeAny, {
|
|
674
675
|
events: {
|
|
675
676
|
type: string;
|
|
676
|
-
createdAt: string;
|
|
677
677
|
data: Record<string, unknown>;
|
|
678
|
-
|
|
679
|
-
streamPosition: number;
|
|
678
|
+
createdAt: string;
|
|
680
679
|
globalPosition: number;
|
|
680
|
+
streamPosition: number;
|
|
681
681
|
streamId: string;
|
|
682
682
|
schemaVersion: string;
|
|
683
683
|
transactionId: string;
|
|
684
|
+
eventId: string;
|
|
684
685
|
metadata?: Record<string, unknown> | undefined;
|
|
685
686
|
}[];
|
|
686
687
|
pagination: {
|
|
@@ -692,14 +693,14 @@ declare namespace EventStoreAPI {
|
|
|
692
693
|
}, {
|
|
693
694
|
events: {
|
|
694
695
|
type: string;
|
|
695
|
-
createdAt: string;
|
|
696
696
|
data: Record<string, unknown>;
|
|
697
|
-
|
|
698
|
-
streamPosition: number;
|
|
697
|
+
createdAt: string;
|
|
699
698
|
globalPosition: number;
|
|
699
|
+
streamPosition: number;
|
|
700
700
|
streamId: string;
|
|
701
701
|
schemaVersion: string;
|
|
702
702
|
transactionId: string;
|
|
703
|
+
eventId: string;
|
|
703
704
|
metadata?: Record<string, unknown> | undefined;
|
|
704
705
|
}[];
|
|
705
706
|
pagination: {
|
|
@@ -843,7 +844,7 @@ declare namespace EventBusAPI {
|
|
|
843
844
|
subscriberId: z.ZodOptional<z.ZodString>;
|
|
844
845
|
subscriber: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
845
846
|
type: z.ZodLiteral<"durable_object">;
|
|
846
|
-
config: z.ZodObject<
|
|
847
|
+
config: z.ZodObject<{
|
|
847
848
|
retryPolicy: z.ZodOptional<z.ZodObject<{
|
|
848
849
|
maxAttempts: z.ZodNumber;
|
|
849
850
|
backoffMinutes: z.ZodNumber;
|
|
@@ -854,19 +855,19 @@ declare namespace EventBusAPI {
|
|
|
854
855
|
maxAttempts: number;
|
|
855
856
|
backoffMinutes: number;
|
|
856
857
|
}>>;
|
|
857
|
-
}
|
|
858
|
+
} & {
|
|
858
859
|
namespace: z.ZodString;
|
|
859
860
|
id: z.ZodString;
|
|
860
|
-
}
|
|
861
|
-
namespace: string;
|
|
861
|
+
}, "strip", z.ZodTypeAny, {
|
|
862
862
|
id: string;
|
|
863
|
+
namespace: string;
|
|
863
864
|
retryPolicy?: {
|
|
864
865
|
maxAttempts: number;
|
|
865
866
|
backoffMinutes: number;
|
|
866
867
|
} | undefined;
|
|
867
868
|
}, {
|
|
868
|
-
namespace: string;
|
|
869
869
|
id: string;
|
|
870
|
+
namespace: string;
|
|
870
871
|
retryPolicy?: {
|
|
871
872
|
maxAttempts: number;
|
|
872
873
|
backoffMinutes: number;
|
|
@@ -875,8 +876,8 @@ declare namespace EventBusAPI {
|
|
|
875
876
|
}, "strip", z.ZodTypeAny, {
|
|
876
877
|
type: "durable_object";
|
|
877
878
|
config: {
|
|
878
|
-
namespace: string;
|
|
879
879
|
id: string;
|
|
880
|
+
namespace: string;
|
|
880
881
|
retryPolicy?: {
|
|
881
882
|
maxAttempts: number;
|
|
882
883
|
backoffMinutes: number;
|
|
@@ -885,8 +886,8 @@ declare namespace EventBusAPI {
|
|
|
885
886
|
}, {
|
|
886
887
|
type: "durable_object";
|
|
887
888
|
config: {
|
|
888
|
-
namespace: string;
|
|
889
889
|
id: string;
|
|
890
|
+
namespace: string;
|
|
890
891
|
retryPolicy?: {
|
|
891
892
|
maxAttempts: number;
|
|
892
893
|
backoffMinutes: number;
|
|
@@ -894,7 +895,7 @@ declare namespace EventBusAPI {
|
|
|
894
895
|
};
|
|
895
896
|
}>, z.ZodObject<{
|
|
896
897
|
type: z.ZodLiteral<"webhook">;
|
|
897
|
-
config: z.ZodObject<
|
|
898
|
+
config: z.ZodObject<{
|
|
898
899
|
retryPolicy: z.ZodOptional<z.ZodObject<{
|
|
899
900
|
maxAttempts: z.ZodNumber;
|
|
900
901
|
backoffMinutes: z.ZodNumber;
|
|
@@ -905,11 +906,11 @@ declare namespace EventBusAPI {
|
|
|
905
906
|
maxAttempts: number;
|
|
906
907
|
backoffMinutes: number;
|
|
907
908
|
}>>;
|
|
908
|
-
}
|
|
909
|
+
} & {
|
|
909
910
|
url: z.ZodString;
|
|
910
911
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
911
912
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
912
|
-
}
|
|
913
|
+
}, "strip", z.ZodTypeAny, {
|
|
913
914
|
url: string;
|
|
914
915
|
headers?: Record<string, string> | undefined;
|
|
915
916
|
retryPolicy?: {
|
|
@@ -950,7 +951,7 @@ declare namespace EventBusAPI {
|
|
|
950
951
|
};
|
|
951
952
|
}>, z.ZodObject<{
|
|
952
953
|
type: z.ZodLiteral<"queue">;
|
|
953
|
-
config: z.ZodObject<
|
|
954
|
+
config: z.ZodObject<{
|
|
954
955
|
retryPolicy: z.ZodOptional<z.ZodObject<{
|
|
955
956
|
maxAttempts: z.ZodNumber;
|
|
956
957
|
backoffMinutes: z.ZodNumber;
|
|
@@ -961,11 +962,11 @@ declare namespace EventBusAPI {
|
|
|
961
962
|
maxAttempts: number;
|
|
962
963
|
backoffMinutes: number;
|
|
963
964
|
}>>;
|
|
964
|
-
}
|
|
965
|
+
} & {
|
|
965
966
|
queueName: z.ZodString;
|
|
966
967
|
region: z.ZodOptional<z.ZodString>;
|
|
967
968
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
968
|
-
}
|
|
969
|
+
}, "strip", z.ZodTypeAny, {
|
|
969
970
|
queueName: string;
|
|
970
971
|
retryPolicy?: {
|
|
971
972
|
maxAttempts: number;
|
|
@@ -1006,7 +1007,7 @@ declare namespace EventBusAPI {
|
|
|
1006
1007
|
};
|
|
1007
1008
|
}>, z.ZodObject<{
|
|
1008
1009
|
type: z.ZodLiteral<"cloudflare_workflow">;
|
|
1009
|
-
config: z.ZodObject<
|
|
1010
|
+
config: z.ZodObject<{
|
|
1010
1011
|
retryPolicy: z.ZodOptional<z.ZodObject<{
|
|
1011
1012
|
maxAttempts: z.ZodNumber;
|
|
1012
1013
|
backoffMinutes: z.ZodNumber;
|
|
@@ -1017,9 +1018,9 @@ declare namespace EventBusAPI {
|
|
|
1017
1018
|
maxAttempts: number;
|
|
1018
1019
|
backoffMinutes: number;
|
|
1019
1020
|
}>>;
|
|
1020
|
-
}
|
|
1021
|
+
} & {
|
|
1021
1022
|
bindingName: z.ZodString;
|
|
1022
|
-
}
|
|
1023
|
+
}, "strip", z.ZodTypeAny, {
|
|
1023
1024
|
bindingName: string;
|
|
1024
1025
|
retryPolicy?: {
|
|
1025
1026
|
maxAttempts: number;
|
|
@@ -1052,7 +1053,7 @@ declare namespace EventBusAPI {
|
|
|
1052
1053
|
};
|
|
1053
1054
|
}>, z.ZodObject<{
|
|
1054
1055
|
type: z.ZodLiteral<"websocket">;
|
|
1055
|
-
config: z.ZodObject<
|
|
1056
|
+
config: z.ZodObject<{
|
|
1056
1057
|
retryPolicy: z.ZodOptional<z.ZodObject<{
|
|
1057
1058
|
maxAttempts: z.ZodNumber;
|
|
1058
1059
|
backoffMinutes: z.ZodNumber;
|
|
@@ -1063,9 +1064,9 @@ declare namespace EventBusAPI {
|
|
|
1063
1064
|
maxAttempts: number;
|
|
1064
1065
|
backoffMinutes: number;
|
|
1065
1066
|
}>>;
|
|
1066
|
-
}
|
|
1067
|
+
} & {
|
|
1067
1068
|
managerId: z.ZodString;
|
|
1068
|
-
}
|
|
1069
|
+
}, "strip", z.ZodTypeAny, {
|
|
1069
1070
|
managerId: string;
|
|
1070
1071
|
retryPolicy?: {
|
|
1071
1072
|
maxAttempts: number;
|
|
@@ -1103,8 +1104,8 @@ declare namespace EventBusAPI {
|
|
|
1103
1104
|
subscriber: {
|
|
1104
1105
|
type: "durable_object";
|
|
1105
1106
|
config: {
|
|
1106
|
-
namespace: string;
|
|
1107
1107
|
id: string;
|
|
1108
|
+
namespace: string;
|
|
1108
1109
|
retryPolicy?: {
|
|
1109
1110
|
maxAttempts: number;
|
|
1110
1111
|
backoffMinutes: number;
|
|
@@ -1158,8 +1159,8 @@ declare namespace EventBusAPI {
|
|
|
1158
1159
|
subscriber: {
|
|
1159
1160
|
type: "durable_object";
|
|
1160
1161
|
config: {
|
|
1161
|
-
namespace: string;
|
|
1162
1162
|
id: string;
|
|
1163
|
+
namespace: string;
|
|
1163
1164
|
retryPolicy?: {
|
|
1164
1165
|
maxAttempts: number;
|
|
1165
1166
|
backoffMinutes: number;
|
|
@@ -1629,10 +1630,9 @@ type Event<EventType extends string = string, EventData extends DefaultRecord =
|
|
|
1629
1630
|
type EventTypeOf<T extends Event> = T['type'];
|
|
1630
1631
|
type EventDataOf<T extends Event> = T['data'];
|
|
1631
1632
|
type EventMetaDataOf<T extends Event> = T['metadata'];
|
|
1632
|
-
type ReadEvent<EventType extends Event = Event
|
|
1633
|
+
type ReadEvent<EventType extends Event = Event> = {
|
|
1633
1634
|
type: EventTypeOf<EventType>;
|
|
1634
1635
|
data: EventDataOf<EventType>;
|
|
1635
|
-
metadata?: EventMetaDataType;
|
|
1636
1636
|
streamId: string;
|
|
1637
1637
|
streamPosition: number;
|
|
1638
1638
|
globalPosition: number;
|
|
@@ -1640,6 +1640,7 @@ type ReadEvent<EventType extends Event = Event, EventMetaDataType extends EventM
|
|
|
1640
1640
|
schemaVersion: string;
|
|
1641
1641
|
transactionId: string;
|
|
1642
1642
|
createdAt: string;
|
|
1643
|
+
metadata?: EventMetaDataOf<EventType>;
|
|
1643
1644
|
};
|
|
1644
1645
|
type ExpectedStreamVersion<VersionType = DefaultStreamVersionType> = ExpectedStreamVersionWithValue<VersionType> | ExpectedStreamVersionGeneral;
|
|
1645
1646
|
type ExpectedStreamVersionWithValue<VersionType = DefaultStreamVersionType> = Flavour<VersionType, 'StreamVersion'>;
|
|
@@ -2051,10 +2052,6 @@ declare class EventStoreManagerDurableObject extends DurableObject<Env> {
|
|
|
2051
2052
|
private handleStorageStats;
|
|
2052
2053
|
private handleRunArchive;
|
|
2053
2054
|
private handleArchiveStatus;
|
|
2054
|
-
/**
|
|
2055
|
-
* Helper method to get or create event store stats table
|
|
2056
|
-
*/
|
|
2057
|
-
private initEventStoreStats;
|
|
2058
2055
|
/**
|
|
2059
2056
|
* Update stats for a specific event store
|
|
2060
2057
|
*/
|