@meetploy/types 1.9.0 → 1.9.1
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/db.d.ts +11 -11
- package/dist/index.d.ts +1 -1
- package/globals.d.ts +4 -4
- package/package.json +1 -1
package/dist/db.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface DBResultMeta {
|
|
2
2
|
duration: number;
|
|
3
3
|
rows_read: number;
|
|
4
4
|
rows_written: number;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface DBResult<T = unknown> {
|
|
7
7
|
results: T[];
|
|
8
8
|
success: boolean;
|
|
9
|
-
meta:
|
|
9
|
+
meta: DBResultMeta;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
12
|
-
bind: (...values: unknown[]) =>
|
|
13
|
-
run: <T = unknown>() => Promise<
|
|
14
|
-
all: <T = unknown>() => Promise<
|
|
11
|
+
export interface DBPreparedStatement {
|
|
12
|
+
bind: (...values: unknown[]) => DBPreparedStatement;
|
|
13
|
+
run: <T = unknown>() => Promise<DBResult<T>>;
|
|
14
|
+
all: <T = unknown>() => Promise<DBResult<T>>;
|
|
15
15
|
first: <T = unknown>(colName?: string) => Promise<T | null>;
|
|
16
16
|
raw: <T = unknown>(options?: {
|
|
17
17
|
columnNames?: boolean;
|
|
18
18
|
}) => Promise<T[][]>;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
21
|
-
prepare: (query: string) =>
|
|
20
|
+
export interface Database {
|
|
21
|
+
prepare: (query: string) => DBPreparedStatement;
|
|
22
22
|
dump: () => Promise<ArrayBuffer>;
|
|
23
|
-
exec: (query: string) => Promise<
|
|
24
|
-
batch: <T = unknown>(statements:
|
|
23
|
+
exec: (query: string) => Promise<DBResult>;
|
|
24
|
+
batch: <T = unknown>(statements: DBPreparedStatement[]) => Promise<DBResult<T>[]>;
|
|
25
25
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { Database, DBPreparedStatement, DBResult, DBResultMeta, } from "./db.js";
|
|
2
2
|
export type { QueueBinding, QueueBatchMessage, QueueMessageEvent, QueueSendOptions, QueueSendResult, QueueSendBatchResult, } from "./queue.js";
|
|
3
3
|
export type { WorkflowBinding, WorkflowContext, WorkflowExecution, WorkflowExecutionStatus, WorkflowHandler, WorkflowStep, WorkflowStepOptions, WorkflowTriggerResult, } from "./workflow.js";
|
|
4
4
|
export type { TimerHandler, ExecutionContext, FetchHandler, MessageHandler, Ploy, PloyHandler, WorkflowHandlers, } from "./ploy.js";
|
package/globals.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ declare global {
|
|
|
18
18
|
type Ploy = PloyHandler<PloyEnv>;
|
|
19
19
|
|
|
20
20
|
// --- Binding types ---
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
type
|
|
24
|
-
type
|
|
21
|
+
type Database = import("@meetploy/types").Database;
|
|
22
|
+
type DBPreparedStatement = import("@meetploy/types").DBPreparedStatement;
|
|
23
|
+
type DBResult<T = unknown> = import("@meetploy/types").DBResult<T>;
|
|
24
|
+
type DBResultMeta = import("@meetploy/types").DBResultMeta;
|
|
25
25
|
type CacheBinding = import("@meetploy/types").CacheBinding;
|
|
26
26
|
type QueueBinding = import("@meetploy/types").QueueBinding;
|
|
27
27
|
type StateBinding = import("@meetploy/types").StateBinding;
|