@hiliosai/sdk 0.1.7 → 0.1.9
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/package.json +1 -1
- package/src/datasources/prisma.datasource.ts +6 -14
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -4,22 +4,14 @@ import type {AppContext} from '../types/context';
|
|
|
4
4
|
import {AbstractDatasource} from './base.datasource';
|
|
5
5
|
|
|
6
6
|
// Generic Prisma Client interface - will be provided by generated client
|
|
7
|
+
// Made very permissive to work with any generated Prisma client
|
|
7
8
|
interface PrismaClientLike {
|
|
8
9
|
$connect(): Promise<void>;
|
|
9
10
|
$disconnect(): Promise<void>;
|
|
10
|
-
$queryRaw
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$transaction<T>(
|
|
15
|
-
fn: (client: PrismaClientLike) => Promise<T>,
|
|
16
|
-
options?: {
|
|
17
|
-
maxWait?: number;
|
|
18
|
-
timeout?: number;
|
|
19
|
-
}
|
|
20
|
-
): Promise<T>;
|
|
21
|
-
$extends<T>(extension: T): PrismaClientLike & T;
|
|
22
|
-
[key: string]: unknown;
|
|
11
|
+
$queryRaw: any;
|
|
12
|
+
$transaction: any;
|
|
13
|
+
$extends: any;
|
|
14
|
+
[key: string]: any;
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
// Extension interfaces for common production patterns
|
|
@@ -266,7 +258,7 @@ export class PrismaDatasource<
|
|
|
266
258
|
): Promise<T> {
|
|
267
259
|
try {
|
|
268
260
|
return await this.client.$transaction(
|
|
269
|
-
(tx) => fn(tx as TPrismaClient),
|
|
261
|
+
(tx: any) => fn(tx as TPrismaClient),
|
|
270
262
|
options
|
|
271
263
|
);
|
|
272
264
|
} catch (error) {
|
package/src/index.ts
CHANGED