@delta-base/core 1.2.4 → 1.2.6
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 +87 -90
- 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,22 +272,22 @@ declare namespace EventStoreAPI {
|
|
|
271
272
|
createdAt: z.ZodString;
|
|
272
273
|
}, "strip", z.ZodTypeAny, {
|
|
273
274
|
type: string;
|
|
275
|
+
streamId: string;
|
|
274
276
|
data: Record<string, unknown>;
|
|
275
277
|
createdAt: string;
|
|
276
278
|
globalPosition: number;
|
|
277
279
|
streamPosition: number;
|
|
278
|
-
streamId: string;
|
|
279
280
|
schemaVersion: string;
|
|
280
281
|
transactionId: string;
|
|
281
282
|
eventId: string;
|
|
282
283
|
metadata?: Record<string, unknown> | undefined;
|
|
283
284
|
}, {
|
|
284
285
|
type: string;
|
|
286
|
+
streamId: string;
|
|
285
287
|
data: Record<string, unknown>;
|
|
286
288
|
createdAt: string;
|
|
287
289
|
globalPosition: number;
|
|
288
290
|
streamPosition: number;
|
|
289
|
-
streamId: string;
|
|
290
291
|
schemaVersion: string;
|
|
291
292
|
transactionId: string;
|
|
292
293
|
eventId: string;
|
|
@@ -352,14 +353,14 @@ declare namespace EventStoreAPI {
|
|
|
352
353
|
expectedVersion: z.ZodNumber;
|
|
353
354
|
}, "strip", z.ZodTypeAny, {
|
|
354
355
|
error: "Version conflict";
|
|
355
|
-
details: string;
|
|
356
356
|
currentVersion: number;
|
|
357
357
|
expectedVersion: number;
|
|
358
|
+
details: string;
|
|
358
359
|
}, {
|
|
359
360
|
error: "Version conflict";
|
|
360
|
-
details: string;
|
|
361
361
|
currentVersion: number;
|
|
362
362
|
expectedVersion: number;
|
|
363
|
+
details: string;
|
|
363
364
|
}>;
|
|
364
365
|
export const ValidationErrorSchema: z.ZodObject<{
|
|
365
366
|
error: z.ZodLiteral<"Invalid request body">;
|
|
@@ -398,14 +399,14 @@ declare namespace EventStoreAPI {
|
|
|
398
399
|
expectedVersion: z.ZodNumber;
|
|
399
400
|
}, "strip", z.ZodTypeAny, {
|
|
400
401
|
error: "Version conflict";
|
|
401
|
-
details: string;
|
|
402
402
|
currentVersion: number;
|
|
403
403
|
expectedVersion: number;
|
|
404
|
+
details: string;
|
|
404
405
|
}, {
|
|
405
406
|
error: "Version conflict";
|
|
406
|
-
details: string;
|
|
407
407
|
currentVersion: number;
|
|
408
408
|
expectedVersion: number;
|
|
409
|
+
details: string;
|
|
409
410
|
}>, z.ZodObject<{
|
|
410
411
|
error: z.ZodLiteral<"Invalid request body">;
|
|
411
412
|
details: z.ZodArray<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,22 +458,22 @@ declare namespace EventStoreAPI {
|
|
|
457
458
|
createdAt: z.ZodString;
|
|
458
459
|
}, "strip", z.ZodTypeAny, {
|
|
459
460
|
type: string;
|
|
461
|
+
streamId: string;
|
|
460
462
|
data: Record<string, unknown>;
|
|
461
463
|
createdAt: string;
|
|
462
464
|
globalPosition: number;
|
|
463
465
|
streamPosition: number;
|
|
464
|
-
streamId: string;
|
|
465
466
|
schemaVersion: string;
|
|
466
467
|
transactionId: string;
|
|
467
468
|
eventId: string;
|
|
468
469
|
metadata?: Record<string, unknown> | undefined;
|
|
469
470
|
}, {
|
|
470
471
|
type: string;
|
|
472
|
+
streamId: string;
|
|
471
473
|
data: Record<string, unknown>;
|
|
472
474
|
createdAt: string;
|
|
473
475
|
globalPosition: number;
|
|
474
476
|
streamPosition: number;
|
|
475
|
-
streamId: string;
|
|
476
477
|
schemaVersion: string;
|
|
477
478
|
transactionId: string;
|
|
478
479
|
eventId: string;
|
|
@@ -482,11 +483,11 @@ declare namespace EventStoreAPI {
|
|
|
482
483
|
}, "strip", z.ZodTypeAny, {
|
|
483
484
|
events: {
|
|
484
485
|
type: string;
|
|
486
|
+
streamId: string;
|
|
485
487
|
data: Record<string, unknown>;
|
|
486
488
|
createdAt: string;
|
|
487
489
|
globalPosition: number;
|
|
488
490
|
streamPosition: number;
|
|
489
|
-
streamId: string;
|
|
490
491
|
schemaVersion: string;
|
|
491
492
|
transactionId: string;
|
|
492
493
|
eventId: string;
|
|
@@ -496,11 +497,11 @@ declare namespace EventStoreAPI {
|
|
|
496
497
|
}, {
|
|
497
498
|
events: {
|
|
498
499
|
type: string;
|
|
500
|
+
streamId: string;
|
|
499
501
|
data: Record<string, unknown>;
|
|
500
502
|
createdAt: string;
|
|
501
503
|
globalPosition: number;
|
|
502
504
|
streamPosition: number;
|
|
503
|
-
streamId: string;
|
|
504
505
|
schemaVersion: string;
|
|
505
506
|
transactionId: string;
|
|
506
507
|
eventId: string;
|
|
@@ -513,22 +514,22 @@ 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;
|
|
530
|
+
streamId?: string | undefined;
|
|
529
531
|
limit?: number | undefined;
|
|
530
532
|
offset?: number | undefined;
|
|
531
|
-
streamId?: string | undefined;
|
|
532
533
|
transactionId?: string | undefined;
|
|
533
534
|
phase?: number | undefined;
|
|
534
535
|
eventId?: string | undefined;
|
|
@@ -542,44 +543,44 @@ declare namespace EventStoreAPI {
|
|
|
542
543
|
includeCount?: boolean | undefined;
|
|
543
544
|
}, {
|
|
544
545
|
type?: string | string[] | undefined;
|
|
545
|
-
limit?: number | undefined;
|
|
546
|
-
offset?: number | undefined;
|
|
547
546
|
streamId?: string | undefined;
|
|
547
|
+
limit?: string | undefined;
|
|
548
|
+
offset?: string | undefined;
|
|
548
549
|
transactionId?: string | undefined;
|
|
549
|
-
phase?:
|
|
550
|
+
phase?: string | undefined;
|
|
550
551
|
eventId?: string | undefined;
|
|
551
|
-
fromPosition?:
|
|
552
|
-
toPosition?:
|
|
552
|
+
fromPosition?: string | undefined;
|
|
553
|
+
toPosition?: string | undefined;
|
|
553
554
|
fromDate?: string | undefined;
|
|
554
555
|
toDate?: string | undefined;
|
|
555
|
-
includeArchived?:
|
|
556
|
+
includeArchived?: string | undefined;
|
|
556
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, {
|
|
577
|
+
streamId?: string | undefined;
|
|
576
578
|
limit?: number | undefined;
|
|
577
579
|
offset?: number | undefined;
|
|
578
|
-
streamId?: string | undefined;
|
|
579
580
|
fromDate?: string | undefined;
|
|
580
581
|
toDate?: string | undefined;
|
|
581
582
|
includeArchived?: boolean | undefined;
|
|
582
|
-
sortBy?: "
|
|
583
|
+
sortBy?: "streamId" | "createdAt" | "updatedAt" | "streamPosition" | undefined;
|
|
583
584
|
sortDirection?: "asc" | "desc" | undefined;
|
|
584
585
|
includeCount?: boolean | undefined;
|
|
585
586
|
streamType?: string | string[] | undefined;
|
|
@@ -588,20 +589,20 @@ declare namespace EventStoreAPI {
|
|
|
588
589
|
maxPosition?: number | undefined;
|
|
589
590
|
includeMetadata?: boolean | undefined;
|
|
590
591
|
}, {
|
|
591
|
-
limit?: number | undefined;
|
|
592
|
-
offset?: number | undefined;
|
|
593
592
|
streamId?: string | undefined;
|
|
593
|
+
limit?: string | undefined;
|
|
594
|
+
offset?: string | undefined;
|
|
594
595
|
fromDate?: string | undefined;
|
|
595
596
|
toDate?: string | undefined;
|
|
596
|
-
includeArchived?:
|
|
597
|
-
sortBy?: "
|
|
597
|
+
includeArchived?: string | undefined;
|
|
598
|
+
sortBy?: "streamId" | "createdAt" | "updatedAt" | "streamPosition" | 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,22 +634,22 @@ declare namespace EventStoreAPI {
|
|
|
633
634
|
createdAt: z.ZodString;
|
|
634
635
|
}, "strip", z.ZodTypeAny, {
|
|
635
636
|
type: string;
|
|
637
|
+
streamId: string;
|
|
636
638
|
data: Record<string, unknown>;
|
|
637
639
|
createdAt: string;
|
|
638
640
|
globalPosition: number;
|
|
639
641
|
streamPosition: number;
|
|
640
|
-
streamId: string;
|
|
641
642
|
schemaVersion: string;
|
|
642
643
|
transactionId: string;
|
|
643
644
|
eventId: string;
|
|
644
645
|
metadata?: Record<string, unknown> | undefined;
|
|
645
646
|
}, {
|
|
646
647
|
type: string;
|
|
648
|
+
streamId: string;
|
|
647
649
|
data: Record<string, unknown>;
|
|
648
650
|
createdAt: string;
|
|
649
651
|
globalPosition: number;
|
|
650
652
|
streamPosition: number;
|
|
651
|
-
streamId: string;
|
|
652
653
|
schemaVersion: string;
|
|
653
654
|
transactionId: string;
|
|
654
655
|
eventId: string;
|
|
@@ -673,11 +674,11 @@ declare namespace EventStoreAPI {
|
|
|
673
674
|
}, "strip", z.ZodTypeAny, {
|
|
674
675
|
events: {
|
|
675
676
|
type: string;
|
|
677
|
+
streamId: string;
|
|
676
678
|
data: Record<string, unknown>;
|
|
677
679
|
createdAt: string;
|
|
678
680
|
globalPosition: number;
|
|
679
681
|
streamPosition: number;
|
|
680
|
-
streamId: string;
|
|
681
682
|
schemaVersion: string;
|
|
682
683
|
transactionId: string;
|
|
683
684
|
eventId: string;
|
|
@@ -692,11 +693,11 @@ declare namespace EventStoreAPI {
|
|
|
692
693
|
}, {
|
|
693
694
|
events: {
|
|
694
695
|
type: string;
|
|
696
|
+
streamId: string;
|
|
695
697
|
data: Record<string, unknown>;
|
|
696
698
|
createdAt: string;
|
|
697
699
|
globalPosition: number;
|
|
698
700
|
streamPosition: number;
|
|
699
|
-
streamId: string;
|
|
700
701
|
schemaVersion: string;
|
|
701
702
|
transactionId: string;
|
|
702
703
|
eventId: string;
|
|
@@ -719,19 +720,19 @@ declare namespace EventStoreAPI {
|
|
|
719
720
|
createdAt: z.ZodString;
|
|
720
721
|
updatedAt: z.ZodString;
|
|
721
722
|
}, "strip", z.ZodTypeAny, {
|
|
723
|
+
streamId: string;
|
|
722
724
|
createdAt: string;
|
|
723
725
|
updatedAt: string;
|
|
724
726
|
streamPosition: number;
|
|
725
|
-
streamId: string;
|
|
726
727
|
streamType: string;
|
|
727
728
|
isArchived: boolean;
|
|
728
729
|
lastArchivedPosition: number;
|
|
729
730
|
streamMetadata?: Record<string, unknown> | undefined;
|
|
730
731
|
}, {
|
|
732
|
+
streamId: string;
|
|
731
733
|
createdAt: string;
|
|
732
734
|
updatedAt: string;
|
|
733
735
|
streamPosition: number;
|
|
734
|
-
streamId: string;
|
|
735
736
|
streamType: string;
|
|
736
737
|
isArchived: boolean;
|
|
737
738
|
lastArchivedPosition: number;
|
|
@@ -748,19 +749,19 @@ declare namespace EventStoreAPI {
|
|
|
748
749
|
createdAt: z.ZodString;
|
|
749
750
|
updatedAt: z.ZodString;
|
|
750
751
|
}, "strip", z.ZodTypeAny, {
|
|
752
|
+
streamId: string;
|
|
751
753
|
createdAt: string;
|
|
752
754
|
updatedAt: string;
|
|
753
755
|
streamPosition: number;
|
|
754
|
-
streamId: string;
|
|
755
756
|
streamType: string;
|
|
756
757
|
isArchived: boolean;
|
|
757
758
|
lastArchivedPosition: number;
|
|
758
759
|
streamMetadata?: Record<string, unknown> | undefined;
|
|
759
760
|
}, {
|
|
761
|
+
streamId: string;
|
|
760
762
|
createdAt: string;
|
|
761
763
|
updatedAt: string;
|
|
762
764
|
streamPosition: number;
|
|
763
|
-
streamId: string;
|
|
764
765
|
streamType: string;
|
|
765
766
|
isArchived: boolean;
|
|
766
767
|
lastArchivedPosition: number;
|
|
@@ -790,10 +791,10 @@ declare namespace EventStoreAPI {
|
|
|
790
791
|
total?: number | undefined;
|
|
791
792
|
};
|
|
792
793
|
streams: {
|
|
794
|
+
streamId: string;
|
|
793
795
|
createdAt: string;
|
|
794
796
|
updatedAt: string;
|
|
795
797
|
streamPosition: number;
|
|
796
|
-
streamId: string;
|
|
797
798
|
streamType: string;
|
|
798
799
|
isArchived: boolean;
|
|
799
800
|
lastArchivedPosition: number;
|
|
@@ -807,10 +808,10 @@ declare namespace EventStoreAPI {
|
|
|
807
808
|
total?: number | undefined;
|
|
808
809
|
};
|
|
809
810
|
streams: {
|
|
811
|
+
streamId: string;
|
|
810
812
|
createdAt: string;
|
|
811
813
|
updatedAt: string;
|
|
812
814
|
streamPosition: number;
|
|
813
|
-
streamId: string;
|
|
814
815
|
streamType: string;
|
|
815
816
|
isArchived: boolean;
|
|
816
817
|
lastArchivedPosition: number;
|
|
@@ -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,10 +855,10 @@ 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
|
+
}, "strip", z.ZodTypeAny, {
|
|
861
862
|
id: string;
|
|
862
863
|
namespace: string;
|
|
863
864
|
retryPolicy?: {
|
|
@@ -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,52 +906,52 @@ 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;
|
|
916
|
+
timeoutMs?: number | undefined;
|
|
915
917
|
retryPolicy?: {
|
|
916
918
|
maxAttempts: number;
|
|
917
919
|
backoffMinutes: number;
|
|
918
920
|
} | undefined;
|
|
919
|
-
timeoutMs?: number | undefined;
|
|
920
921
|
}, {
|
|
921
922
|
url: string;
|
|
922
923
|
headers?: Record<string, string> | undefined;
|
|
924
|
+
timeoutMs?: number | undefined;
|
|
923
925
|
retryPolicy?: {
|
|
924
926
|
maxAttempts: number;
|
|
925
927
|
backoffMinutes: number;
|
|
926
928
|
} | undefined;
|
|
927
|
-
timeoutMs?: number | undefined;
|
|
928
929
|
}>;
|
|
929
930
|
}, "strip", z.ZodTypeAny, {
|
|
930
931
|
type: "webhook";
|
|
931
932
|
config: {
|
|
932
933
|
url: string;
|
|
933
934
|
headers?: Record<string, string> | undefined;
|
|
935
|
+
timeoutMs?: number | undefined;
|
|
934
936
|
retryPolicy?: {
|
|
935
937
|
maxAttempts: number;
|
|
936
938
|
backoffMinutes: number;
|
|
937
939
|
} | undefined;
|
|
938
|
-
timeoutMs?: number | undefined;
|
|
939
940
|
};
|
|
940
941
|
}, {
|
|
941
942
|
type: "webhook";
|
|
942
943
|
config: {
|
|
943
944
|
url: string;
|
|
944
945
|
headers?: Record<string, string> | undefined;
|
|
946
|
+
timeoutMs?: number | undefined;
|
|
945
947
|
retryPolicy?: {
|
|
946
948
|
maxAttempts: number;
|
|
947
949
|
backoffMinutes: number;
|
|
948
950
|
} | undefined;
|
|
949
|
-
timeoutMs?: number | undefined;
|
|
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;
|
|
@@ -1115,11 +1116,11 @@ declare namespace EventBusAPI {
|
|
|
1115
1116
|
config: {
|
|
1116
1117
|
url: string;
|
|
1117
1118
|
headers?: Record<string, string> | undefined;
|
|
1119
|
+
timeoutMs?: number | undefined;
|
|
1118
1120
|
retryPolicy?: {
|
|
1119
1121
|
maxAttempts: number;
|
|
1120
1122
|
backoffMinutes: number;
|
|
1121
1123
|
} | undefined;
|
|
1122
|
-
timeoutMs?: number | undefined;
|
|
1123
1124
|
};
|
|
1124
1125
|
} | {
|
|
1125
1126
|
type: "queue";
|
|
@@ -1170,11 +1171,11 @@ declare namespace EventBusAPI {
|
|
|
1170
1171
|
config: {
|
|
1171
1172
|
url: string;
|
|
1172
1173
|
headers?: Record<string, string> | undefined;
|
|
1174
|
+
timeoutMs?: number | undefined;
|
|
1173
1175
|
retryPolicy?: {
|
|
1174
1176
|
maxAttempts: number;
|
|
1175
1177
|
backoffMinutes: number;
|
|
1176
1178
|
} | undefined;
|
|
1177
|
-
timeoutMs?: number | undefined;
|
|
1178
1179
|
};
|
|
1179
1180
|
} | {
|
|
1180
1181
|
type: "queue";
|
|
@@ -1238,12 +1239,12 @@ declare namespace EventBusAPI {
|
|
|
1238
1239
|
}, "strip", z.ZodTypeAny, {
|
|
1239
1240
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1240
1241
|
eventStoreId: string;
|
|
1242
|
+
subscriptionId: string;
|
|
1241
1243
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1242
1244
|
eventFilter: string;
|
|
1243
1245
|
subscriberId: string;
|
|
1244
1246
|
createdAt: string;
|
|
1245
1247
|
updatedAt: string;
|
|
1246
|
-
subscriptionId: string;
|
|
1247
1248
|
statusDetails?: {
|
|
1248
1249
|
lastError?: string | undefined;
|
|
1249
1250
|
retryCount?: number | undefined;
|
|
@@ -1254,12 +1255,12 @@ declare namespace EventBusAPI {
|
|
|
1254
1255
|
}, {
|
|
1255
1256
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1256
1257
|
eventStoreId: string;
|
|
1258
|
+
subscriptionId: string;
|
|
1257
1259
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1258
1260
|
eventFilter: string;
|
|
1259
1261
|
subscriberId: string;
|
|
1260
1262
|
createdAt: string;
|
|
1261
1263
|
updatedAt: string;
|
|
1262
|
-
subscriptionId: string;
|
|
1263
1264
|
statusDetails?: {
|
|
1264
1265
|
lastError?: string | undefined;
|
|
1265
1266
|
retryCount?: number | undefined;
|
|
@@ -1298,12 +1299,12 @@ declare namespace EventBusAPI {
|
|
|
1298
1299
|
}, "strip", z.ZodTypeAny, {
|
|
1299
1300
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1300
1301
|
eventStoreId: string;
|
|
1302
|
+
subscriptionId: string;
|
|
1301
1303
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1302
1304
|
eventFilter: string;
|
|
1303
1305
|
subscriberId: string;
|
|
1304
1306
|
createdAt: string;
|
|
1305
1307
|
updatedAt: string;
|
|
1306
|
-
subscriptionId: string;
|
|
1307
1308
|
statusDetails?: {
|
|
1308
1309
|
lastError?: string | undefined;
|
|
1309
1310
|
retryCount?: number | undefined;
|
|
@@ -1314,12 +1315,12 @@ declare namespace EventBusAPI {
|
|
|
1314
1315
|
}, {
|
|
1315
1316
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1316
1317
|
eventStoreId: string;
|
|
1318
|
+
subscriptionId: string;
|
|
1317
1319
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1318
1320
|
eventFilter: string;
|
|
1319
1321
|
subscriberId: string;
|
|
1320
1322
|
createdAt: string;
|
|
1321
1323
|
updatedAt: string;
|
|
1322
|
-
subscriptionId: string;
|
|
1323
1324
|
statusDetails?: {
|
|
1324
1325
|
lastError?: string | undefined;
|
|
1325
1326
|
retryCount?: number | undefined;
|
|
@@ -1334,12 +1335,12 @@ declare namespace EventBusAPI {
|
|
|
1334
1335
|
subscriptions: {
|
|
1335
1336
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1336
1337
|
eventStoreId: string;
|
|
1338
|
+
subscriptionId: string;
|
|
1337
1339
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1338
1340
|
eventFilter: string;
|
|
1339
1341
|
subscriberId: string;
|
|
1340
1342
|
createdAt: string;
|
|
1341
1343
|
updatedAt: string;
|
|
1342
|
-
subscriptionId: string;
|
|
1343
1344
|
statusDetails?: {
|
|
1344
1345
|
lastError?: string | undefined;
|
|
1345
1346
|
retryCount?: number | undefined;
|
|
@@ -1353,12 +1354,12 @@ declare namespace EventBusAPI {
|
|
|
1353
1354
|
subscriptions: {
|
|
1354
1355
|
status: "ACTIVE" | "SUSPENDED" | "ERROR" | "INITIALIZING" | "DELETED";
|
|
1355
1356
|
eventStoreId: string;
|
|
1357
|
+
subscriptionId: string;
|
|
1356
1358
|
subscriberType: "websocket" | "durable_object" | "webhook" | "queue" | "cloudflare_workflow";
|
|
1357
1359
|
eventFilter: string;
|
|
1358
1360
|
subscriberId: string;
|
|
1359
1361
|
createdAt: string;
|
|
1360
1362
|
updatedAt: string;
|
|
1361
|
-
subscriptionId: string;
|
|
1362
1363
|
statusDetails?: {
|
|
1363
1364
|
lastError?: string | undefined;
|
|
1364
1365
|
retryCount?: number | undefined;
|
|
@@ -1432,6 +1433,7 @@ declare namespace WebSocketsAPI {
|
|
|
1432
1433
|
totalCount: z.ZodNumber;
|
|
1433
1434
|
eventStoreId: z.ZodString;
|
|
1434
1435
|
}, "strip", z.ZodTypeAny, {
|
|
1436
|
+
eventStoreId: string;
|
|
1435
1437
|
connections: {
|
|
1436
1438
|
clientId: string;
|
|
1437
1439
|
connectionId: string;
|
|
@@ -1441,8 +1443,8 @@ declare namespace WebSocketsAPI {
|
|
|
1441
1443
|
userAgent?: string | undefined;
|
|
1442
1444
|
}[];
|
|
1443
1445
|
totalCount: number;
|
|
1444
|
-
eventStoreId: string;
|
|
1445
1446
|
}, {
|
|
1447
|
+
eventStoreId: string;
|
|
1446
1448
|
connections: {
|
|
1447
1449
|
clientId: string;
|
|
1448
1450
|
connectionId: string;
|
|
@@ -1452,7 +1454,6 @@ declare namespace WebSocketsAPI {
|
|
|
1452
1454
|
userAgent?: string | undefined;
|
|
1453
1455
|
}[];
|
|
1454
1456
|
totalCount: number;
|
|
1455
|
-
eventStoreId: string;
|
|
1456
1457
|
}>;
|
|
1457
1458
|
const ErrorResponseSchema: z.ZodObject<{
|
|
1458
1459
|
error: z.ZodString;
|
|
@@ -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
|
*/
|