@delta-base/core 1.2.4 → 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 +49 -52
- 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 {
|
|
@@ -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<{
|
|
@@ -513,17 +514,17 @@ 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;
|
|
@@ -542,36 +543,36 @@ declare namespace EventStoreAPI {
|
|
|
542
543
|
includeCount?: boolean | undefined;
|
|
543
544
|
}, {
|
|
544
545
|
type?: string | string[] | undefined;
|
|
545
|
-
limit?:
|
|
546
|
-
offset?:
|
|
546
|
+
limit?: string | undefined;
|
|
547
|
+
offset?: string | undefined;
|
|
547
548
|
streamId?: 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, {
|
|
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;
|
|
@@ -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,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;
|
|
@@ -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
|
*/
|