@eventualize/postgres-storage-adapter 1.0.0 → 2.1.0

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.
Files changed (31) hide show
  1. package/dist/EvDbPostgresPrismaClientFactory.d.ts +6 -1
  2. package/dist/EvDbPostgresPrismaClientFactory.js +12 -5
  3. package/dist/EvDbPostgresPrismaClientFactory.js.map +1 -1
  4. package/dist/generated/prisma/internal/class.js +6 -5
  5. package/dist/generated/prisma/internal/class.js.map +1 -1
  6. package/dist/generated/prisma/internal/prismaNamespace.d.ts +2 -2
  7. package/dist/generated/prisma/internal/prismaNamespace.js +4 -4
  8. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +6 -6
  9. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +8 -8
  10. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js.map +1 -1
  11. package/package.json +18 -4
  12. package/prisma/migrations/20251211113311_change_outbox_payload_to_json/migration.sql +0 -62
  13. package/prisma/migrations/migration_lock.toml +0 -3
  14. package/prisma/schema.prisma +0 -61
  15. package/prisma.config.d.ts +0 -3
  16. package/prisma.config.js +0 -14
  17. package/prisma.config.js.map +0 -1
  18. package/prisma.config.ts +0 -14
  19. package/src/EvDbPostgresPrismaClientFactory.ts +0 -12
  20. package/src/generated/prisma/browser.ts +0 -34
  21. package/src/generated/prisma/client.ts +0 -56
  22. package/src/generated/prisma/commonInputTypes.ts +0 -459
  23. package/src/generated/prisma/enums.ts +0 -15
  24. package/src/generated/prisma/internal/class.ts +0 -210
  25. package/src/generated/prisma/internal/prismaNamespace.ts +0 -1029
  26. package/src/generated/prisma/internal/prismaNamespaceBrowser.ts +0 -169
  27. package/src/generated/prisma/models/events.ts +0 -1339
  28. package/src/generated/prisma/models/outbox.ts +0 -1420
  29. package/src/generated/prisma/models/snapshot.ts +0 -1246
  30. package/src/generated/prisma/models.ts +0 -14
  31. package/tsconfig.json +0 -19
@@ -1,210 +0,0 @@
1
-
2
- /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
- /* eslint-disable */
4
- // biome-ignore-all lint: generated file
5
- // @ts-nocheck
6
- /*
7
- * WARNING: This is an internal file that is subject to change!
8
- *
9
- * 🛑 Under no circumstances should you import this file directly! 🛑
10
- *
11
- * Please import the `PrismaClient` class from the `client.ts` file instead.
12
- */
13
-
14
- import * as runtime from "@prisma/client/runtime/client"
15
- import type * as Prisma from "./prismaNamespace.js"
16
-
17
-
18
- const config: runtime.GetPrismaClientConfig = {
19
- "previewFeatures": [],
20
- "clientVersion": "7.1.0",
21
- "engineVersion": "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba",
22
- "activeProvider": "postgresql",
23
- "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\n/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.\nmodel events {\n id String @db.Uuid\n stream_type String @db.VarChar(150)\n stream_id String @db.VarChar(150)\n offset BigInt\n event_type String @db.VarChar(150)\n telemetry_context Json? @db.Json\n captured_by String @db.VarChar(150)\n captured_at DateTime @db.Timestamptz(6)\n stored_at DateTime @default(now()) @db.Timestamptz(6)\n payload Json @db.Json\n\n @@id([stream_type, stream_id, offset])\n @@index([stream_type, stream_id, offset], map: \"ix_event_7ae7ea3b165349e09b3fe6d66a69fd72\")\n @@index([stored_at], map: \"ix_event_stored_at_7ae7ea3b165349e09b3fe6d66a69fd72\")\n}\n\n/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.\nmodel outbox {\n id String @db.Uuid\n stream_type String @db.VarChar(150)\n stream_id String @db.VarChar(150)\n offset BigInt\n event_type String @db.VarChar(150)\n channel String @db.VarChar(150)\n message_type String @db.VarChar(150)\n serialize_type String @db.VarChar(150)\n telemetry_context Bytes?\n captured_by String @db.VarChar(150)\n captured_at DateTime @db.Timestamptz(6)\n stored_at DateTime @default(now()) @db.Timestamptz(6)\n payload Json @db.Json\n\n @@id([captured_at, stream_type, stream_id, offset, channel, message_type])\n @@index([stream_type, stream_id, offset, channel, message_type], map: \"ix_outbox_7ae7ea3b165349e09b3fe6d66a69fd72\")\n @@index([stored_at, channel, message_type, offset], map: \"ix_storedat_outbox_captured_at_7ae7ea3b165349e09b3fe6d66a69fd72\")\n}\n\n/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.\nmodel snapshot {\n id String @db.Uuid\n stream_type String @db.VarChar(150)\n stream_id String @db.VarChar(150)\n view_name String @db.VarChar(150)\n offset BigInt\n state Json @db.Json\n stored_at DateTime @default(now()) @db.Timestamptz(6)\n\n @@id([stream_type, stream_id, view_name, offset])\n @@index([stream_type, stream_id, view_name, stored_at], map: \"ix_snapshot_earlier_stored_at_7ae7ea3b165349e09b3fe6d66a69fd72\")\n}\n",
24
- "runtimeDataModel": {
25
- "models": {},
26
- "enums": {},
27
- "types": {}
28
- }
29
- }
30
-
31
- config.runtimeDataModel = JSON.parse("{\"models\":{\"events\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"offset\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"event_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"telemetry_context\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"captured_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"captured_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"stored_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":null},\"outbox\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"offset\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"event_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"channel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"message_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serialize_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"telemetry_context\",\"kind\":\"scalar\",\"type\":\"Bytes\"},{\"name\":\"captured_by\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"captured_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"stored_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":null},\"snapshot\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stream_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"view_name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"offset\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"stored_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
32
-
33
- async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
34
- const { Buffer } = await import('node:buffer')
35
- const wasmArray = Buffer.from(wasmBase64, 'base64')
36
- return new WebAssembly.Module(wasmArray)
37
- }
38
-
39
- config.compilerWasm = {
40
- getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
41
-
42
- getQueryCompilerWasmModule: async () => {
43
- const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs")
44
- return await decodeBase64AsWasm(wasm)
45
- }
46
- }
47
-
48
-
49
-
50
- export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
51
- 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
52
-
53
- export interface PrismaClientConstructor {
54
- /**
55
- * ## Prisma Client
56
- *
57
- * Type-safe database client for TypeScript
58
- * @example
59
- * ```
60
- * const prisma = new PrismaClient()
61
- * // Fetch zero or more Events
62
- * const events = await prisma.events.findMany()
63
- * ```
64
- *
65
- * Read more in our [docs](https://pris.ly/d/client).
66
- */
67
-
68
- new <
69
- Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
70
- LogOpts extends LogOptions<Options> = LogOptions<Options>,
71
- OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
72
- ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
73
- >(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
74
- }
75
-
76
- /**
77
- * ## Prisma Client
78
- *
79
- * Type-safe database client for TypeScript
80
- * @example
81
- * ```
82
- * const prisma = new PrismaClient()
83
- * // Fetch zero or more Events
84
- * const events = await prisma.events.findMany()
85
- * ```
86
- *
87
- * Read more in our [docs](https://pris.ly/d/client).
88
- */
89
-
90
- export interface PrismaClient<
91
- in LogOpts extends Prisma.LogLevel = never,
92
- in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
93
- in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
94
- > {
95
- [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
96
-
97
- $on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
98
-
99
- /**
100
- * Connect with the database
101
- */
102
- $connect(): runtime.Types.Utils.JsPromise<void>;
103
-
104
- /**
105
- * Disconnect from the database
106
- */
107
- $disconnect(): runtime.Types.Utils.JsPromise<void>;
108
-
109
- /**
110
- * Executes a prepared raw query and returns the number of affected rows.
111
- * @example
112
- * ```
113
- * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
114
- * ```
115
- *
116
- * Read more in our [docs](https://pris.ly/d/raw-queries).
117
- */
118
- $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
119
-
120
- /**
121
- * Executes a raw query and returns the number of affected rows.
122
- * Susceptible to SQL injections, see documentation.
123
- * @example
124
- * ```
125
- * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
126
- * ```
127
- *
128
- * Read more in our [docs](https://pris.ly/d/raw-queries).
129
- */
130
- $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
131
-
132
- /**
133
- * Performs a prepared raw query and returns the `SELECT` data.
134
- * @example
135
- * ```
136
- * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
137
- * ```
138
- *
139
- * Read more in our [docs](https://pris.ly/d/raw-queries).
140
- */
141
- $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
142
-
143
- /**
144
- * Performs a raw query and returns the `SELECT` data.
145
- * Susceptible to SQL injections, see documentation.
146
- * @example
147
- * ```
148
- * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
149
- * ```
150
- *
151
- * Read more in our [docs](https://pris.ly/d/raw-queries).
152
- */
153
- $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
154
-
155
-
156
- /**
157
- * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
158
- * @example
159
- * ```
160
- * const [george, bob, alice] = await prisma.$transaction([
161
- * prisma.user.create({ data: { name: 'George' } }),
162
- * prisma.user.create({ data: { name: 'Bob' } }),
163
- * prisma.user.create({ data: { name: 'Alice' } }),
164
- * ])
165
- * ```
166
- *
167
- * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
168
- */
169
- $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
170
-
171
- $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
172
-
173
- $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
174
- extArgs: ExtArgs
175
- }>>
176
-
177
- /**
178
- * `prisma.events`: Exposes CRUD operations for the **events** model.
179
- * Example usage:
180
- * ```ts
181
- * // Fetch zero or more Events
182
- * const events = await prisma.events.findMany()
183
- * ```
184
- */
185
- get events(): Prisma.eventsDelegate<ExtArgs, { omit: OmitOpts }>;
186
-
187
- /**
188
- * `prisma.outbox`: Exposes CRUD operations for the **outbox** model.
189
- * Example usage:
190
- * ```ts
191
- * // Fetch zero or more Outboxes
192
- * const outboxes = await prisma.outbox.findMany()
193
- * ```
194
- */
195
- get outbox(): Prisma.outboxDelegate<ExtArgs, { omit: OmitOpts }>;
196
-
197
- /**
198
- * `prisma.snapshot`: Exposes CRUD operations for the **snapshot** model.
199
- * Example usage:
200
- * ```ts
201
- * // Fetch zero or more Snapshots
202
- * const snapshots = await prisma.snapshot.findMany()
203
- * ```
204
- */
205
- get snapshot(): Prisma.snapshotDelegate<ExtArgs, { omit: OmitOpts }>;
206
- }
207
-
208
- export function getPrismaClientClass(): PrismaClientConstructor {
209
- return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
210
- }