@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 CHANGED
@@ -1,25 +1,25 @@
1
- export interface D1ResultMeta {
1
+ export interface DBResultMeta {
2
2
  duration: number;
3
3
  rows_read: number;
4
4
  rows_written: number;
5
5
  }
6
- export interface D1Result<T = unknown> {
6
+ export interface DBResult<T = unknown> {
7
7
  results: T[];
8
8
  success: boolean;
9
- meta: D1ResultMeta;
9
+ meta: DBResultMeta;
10
10
  }
11
- export interface D1PreparedStatement {
12
- bind: (...values: unknown[]) => D1PreparedStatement;
13
- run: <T = unknown>() => Promise<D1Result<T>>;
14
- all: <T = unknown>() => Promise<D1Result<T>>;
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 D1Database {
21
- prepare: (query: string) => D1PreparedStatement;
20
+ export interface Database {
21
+ prepare: (query: string) => DBPreparedStatement;
22
22
  dump: () => Promise<ArrayBuffer>;
23
- exec: (query: string) => Promise<D1Result>;
24
- batch: <T = unknown>(statements: D1PreparedStatement[]) => Promise<D1Result<T>[]>;
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 { D1Database, D1PreparedStatement, D1Result, D1ResultMeta, } from "./db.js";
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 D1Database = import("@meetploy/types").D1Database;
22
- type D1PreparedStatement = import("@meetploy/types").D1PreparedStatement;
23
- type D1Result<T = unknown> = import("@meetploy/types").D1Result<T>;
24
- type D1ResultMeta = import("@meetploy/types").D1ResultMeta;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetploy/types",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",