@delta-base/core 1.7.1 → 1.7.2

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 CHANGED
@@ -5,7 +5,7 @@ import * as hono_utils_http_status from 'hono/utils/http-status';
5
5
  import { z, OpenAPIHono } from '@hono/zod-openapi';
6
6
  import { DurableObject } from 'cloudflare:workers';
7
7
  import * as _delta_base_toolkit from '@delta-base/toolkit';
8
- import { Event, AppendToStreamOptions, AppendCondition, ReadEvent, ReadStreamOptions, ReadByQueryOptions, ReadByQueryResult } from '@delta-base/toolkit';
8
+ import { Event, AppendToStreamOptions, ReadEvent, AppendCondition, ReadStreamOptions, ReadByQueryOptions, ReadByQueryResult } from '@delta-base/toolkit';
9
9
 
10
10
  declare namespace EventBusAPI {
11
11
  const SubscriberTypeEnum: z.ZodEnum<{
@@ -1639,6 +1639,19 @@ declare namespace EventStoreAPI {
1639
1639
  success: z.ZodBoolean;
1640
1640
  nextExpectedStreamVersion: z.ZodNumber;
1641
1641
  eventsWritten: z.ZodNumber;
1642
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
1643
+ streamId: z.ZodString;
1644
+ streamPosition: z.ZodNumber;
1645
+ globalPosition: z.ZodNumber;
1646
+ eventId: z.ZodString;
1647
+ type: z.ZodString;
1648
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1649
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1650
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1651
+ schemaVersion: z.ZodString;
1652
+ transactionId: z.ZodString;
1653
+ createdAt: z.ZodString;
1654
+ }, z.core.$strip>>>;
1642
1655
  }, z.core.$strip>;
1643
1656
  export const VersionConflictErrorSchema: z.ZodObject<{
1644
1657
  error: z.ZodLiteral<"Version conflict">;
@@ -1886,6 +1899,23 @@ declare namespace EventStoreAPI {
1886
1899
  success: boolean;
1887
1900
  nextExpectedStreamVersion: number;
1888
1901
  eventsWritten: number;
1902
+ events?: {
1903
+ streamId: string;
1904
+ streamPosition: number;
1905
+ globalPosition: number;
1906
+ eventId: string;
1907
+ type: string;
1908
+ data: {
1909
+ [x: string]: hono_utils_types.JSONValue;
1910
+ };
1911
+ schemaVersion: string;
1912
+ transactionId: string;
1913
+ createdAt: string;
1914
+ metadata?: {
1915
+ [x: string]: hono_utils_types.JSONValue;
1916
+ } | undefined;
1917
+ tags?: string[] | undefined;
1918
+ }[] | undefined;
1889
1919
  };
1890
1920
  outputFormat: "json";
1891
1921
  status: 200;
@@ -4239,6 +4269,7 @@ declare class EventStoreDurableObject extends DurableObject<Env> {
4239
4269
  appendToStream(streamId: string, events: Event[], options?: AppendToStreamOptions<number>): Promise<{
4240
4270
  nextExpectedStreamVersion: number;
4241
4271
  lastGlobalPosition: number;
4272
+ events: ReadEvent[];
4242
4273
  }>;
4243
4274
  /**
4244
4275
  * Appends events without a stream using the DCB append condition
@@ -5175,6 +5206,23 @@ declare const routes: hono_hono_base.HonoBase<{
5175
5206
  success: boolean;
5176
5207
  nextExpectedStreamVersion: number;
5177
5208
  eventsWritten: number;
5209
+ events?: {
5210
+ streamId: string;
5211
+ streamPosition: number;
5212
+ globalPosition: number;
5213
+ eventId: string;
5214
+ type: string;
5215
+ data: {
5216
+ [x: string]: hono_utils_types.JSONValue;
5217
+ };
5218
+ schemaVersion: string;
5219
+ transactionId: string;
5220
+ createdAt: string;
5221
+ metadata?: {
5222
+ [x: string]: hono_utils_types.JSONValue;
5223
+ } | undefined;
5224
+ tags?: string[] | undefined;
5225
+ }[] | undefined;
5178
5226
  };
5179
5227
  outputFormat: "json";
5180
5228
  status: 200;