@cloudflare/workers-types 4.20240129.0 → 4.20240222.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.
@@ -375,7 +375,7 @@ declare interface DurableObject {
375
375
  ): void | Promise<void>;
376
376
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
377
377
  }
378
- declare interface DurableObjectStub extends WorkerRpc {
378
+ declare interface DurableObjectStub extends Fetcher {
379
379
  readonly id: DurableObjectId;
380
380
  readonly name?: string;
381
381
  }
@@ -1436,7 +1436,6 @@ declare type R2Objects = {
1436
1436
  truncated: false;
1437
1437
  }
1438
1438
  );
1439
- declare abstract class WorkerRpc extends Fetcher {}
1440
1439
  declare abstract class ScheduledEvent extends ExtendableEvent {
1441
1440
  readonly scheduledTime: number;
1442
1441
  readonly cron: string;
@@ -1577,6 +1576,9 @@ declare class ReadableStreamBYOBReader {
1577
1576
  view: T
1578
1577
  ): Promise<ReadableStreamReadResult<T>>;
1579
1578
  }
1579
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1580
+ min?: number;
1581
+ }
1580
1582
  declare interface ReadableStreamGetReaderOptions {
1581
1583
  mode: "byob";
1582
1584
  }
@@ -3485,12 +3487,14 @@ declare interface D1Meta {
3485
3487
  changed_db: boolean;
3486
3488
  changes: number;
3487
3489
  }
3488
- declare interface D1Result<T = unknown> {
3489
- results: T[];
3490
+ declare interface D1Response {
3490
3491
  success: true;
3491
3492
  meta: D1Meta & Record<string, unknown>;
3492
3493
  error?: never;
3493
3494
  }
3495
+ declare type D1Result<T = unknown> = D1Response & {
3496
+ results: T[];
3497
+ };
3494
3498
  declare interface D1ExecResult {
3495
3499
  count: number;
3496
3500
  duration: number;
@@ -3505,9 +3509,12 @@ declare abstract class D1PreparedStatement {
3505
3509
  bind(...values: unknown[]): D1PreparedStatement;
3506
3510
  first<T = unknown>(colName: string): Promise<T | null>;
3507
3511
  first<T = Record<string, unknown>>(): Promise<T | null>;
3508
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3512
+ run(): Promise<D1Response>;
3509
3513
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3510
- raw<T = unknown[]>(): Promise<T[]>;
3514
+ raw<T = unknown[]>(options: {
3515
+ columnNames: true;
3516
+ }): Promise<[string[], ...T[]]>;
3517
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3511
3518
  }
3512
3519
  /**
3513
3520
  * An email message that can be sent from a Worker.
@@ -3622,7 +3629,7 @@ declare interface Hyperdrive {
3622
3629
  }
3623
3630
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3624
3631
  declare type EventContext<Env, P extends string, Data> = {
3625
- request: Request;
3632
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3626
3633
  functionPath: string;
3627
3634
  waitUntil: (promise: Promise<any>) => void;
3628
3635
  passThroughOnException: () => void;
@@ -3641,7 +3648,7 @@ declare type PagesFunction<
3641
3648
  Data extends Record<string, unknown> = Record<string, unknown>
3642
3649
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3643
3650
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3644
- request: Request;
3651
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3645
3652
  functionPath: string;
3646
3653
  waitUntil: (promise: Promise<any>) => void;
3647
3654
  passThroughOnException: () => void;
@@ -377,7 +377,7 @@ export interface DurableObject {
377
377
  ): void | Promise<void>;
378
378
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
379
379
  }
380
- export interface DurableObjectStub extends WorkerRpc {
380
+ export interface DurableObjectStub extends Fetcher {
381
381
  readonly id: DurableObjectId;
382
382
  readonly name?: string;
383
383
  }
@@ -1438,7 +1438,6 @@ export type R2Objects = {
1438
1438
  truncated: false;
1439
1439
  }
1440
1440
  );
1441
- export declare abstract class WorkerRpc extends Fetcher {}
1442
1441
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1443
1442
  readonly scheduledTime: number;
1444
1443
  readonly cron: string;
@@ -1579,6 +1578,9 @@ export declare class ReadableStreamBYOBReader {
1579
1578
  view: T
1580
1579
  ): Promise<ReadableStreamReadResult<T>>;
1581
1580
  }
1581
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1582
+ min?: number;
1583
+ }
1582
1584
  export interface ReadableStreamGetReaderOptions {
1583
1585
  mode: "byob";
1584
1586
  }
@@ -3490,12 +3492,14 @@ export interface D1Meta {
3490
3492
  changed_db: boolean;
3491
3493
  changes: number;
3492
3494
  }
3493
- export interface D1Result<T = unknown> {
3494
- results: T[];
3495
+ export interface D1Response {
3495
3496
  success: true;
3496
3497
  meta: D1Meta & Record<string, unknown>;
3497
3498
  error?: never;
3498
3499
  }
3500
+ export type D1Result<T = unknown> = D1Response & {
3501
+ results: T[];
3502
+ };
3499
3503
  export interface D1ExecResult {
3500
3504
  count: number;
3501
3505
  duration: number;
@@ -3510,9 +3514,12 @@ export declare abstract class D1PreparedStatement {
3510
3514
  bind(...values: unknown[]): D1PreparedStatement;
3511
3515
  first<T = unknown>(colName: string): Promise<T | null>;
3512
3516
  first<T = Record<string, unknown>>(): Promise<T | null>;
3513
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3517
+ run(): Promise<D1Response>;
3514
3518
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3515
- raw<T = unknown[]>(): Promise<T[]>;
3519
+ raw<T = unknown[]>(options: {
3520
+ columnNames: true;
3521
+ }): Promise<[string[], ...T[]]>;
3522
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3516
3523
  }
3517
3524
  /**
3518
3525
  * An email message that can be sent from a Worker.
@@ -3620,7 +3627,7 @@ export interface Hyperdrive {
3620
3627
  }
3621
3628
  export type Params<P extends string = any> = Record<P, string | string[]>;
3622
3629
  export type EventContext<Env, P extends string, Data> = {
3623
- request: Request;
3630
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3624
3631
  functionPath: string;
3625
3632
  waitUntil: (promise: Promise<any>) => void;
3626
3633
  passThroughOnException: () => void;
@@ -3639,7 +3646,7 @@ export type PagesFunction<
3639
3646
  Data extends Record<string, unknown> = Record<string, unknown>
3640
3647
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3641
3648
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3642
- request: Request;
3649
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3643
3650
  functionPath: string;
3644
3651
  waitUntil: (promise: Promise<any>) => void;
3645
3652
  passThroughOnException: () => void;
@@ -375,7 +375,7 @@ declare interface DurableObject {
375
375
  ): void | Promise<void>;
376
376
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
377
377
  }
378
- declare interface DurableObjectStub extends WorkerRpc {
378
+ declare interface DurableObjectStub extends Fetcher {
379
379
  readonly id: DurableObjectId;
380
380
  readonly name?: string;
381
381
  }
@@ -1416,7 +1416,6 @@ declare type R2Objects = {
1416
1416
  truncated: false;
1417
1417
  }
1418
1418
  );
1419
- declare abstract class WorkerRpc extends Fetcher {}
1420
1419
  declare abstract class ScheduledEvent extends ExtendableEvent {
1421
1420
  readonly scheduledTime: number;
1422
1421
  readonly cron: string;
@@ -1557,6 +1556,9 @@ declare class ReadableStreamBYOBReader {
1557
1556
  view: T
1558
1557
  ): Promise<ReadableStreamReadResult<T>>;
1559
1558
  }
1559
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1560
+ min?: number;
1561
+ }
1560
1562
  declare interface ReadableStreamGetReaderOptions {
1561
1563
  mode: "byob";
1562
1564
  }
@@ -3471,12 +3473,14 @@ declare interface D1Meta {
3471
3473
  changed_db: boolean;
3472
3474
  changes: number;
3473
3475
  }
3474
- declare interface D1Result<T = unknown> {
3475
- results: T[];
3476
+ declare interface D1Response {
3476
3477
  success: true;
3477
3478
  meta: D1Meta & Record<string, unknown>;
3478
3479
  error?: never;
3479
3480
  }
3481
+ declare type D1Result<T = unknown> = D1Response & {
3482
+ results: T[];
3483
+ };
3480
3484
  declare interface D1ExecResult {
3481
3485
  count: number;
3482
3486
  duration: number;
@@ -3491,9 +3495,12 @@ declare abstract class D1PreparedStatement {
3491
3495
  bind(...values: unknown[]): D1PreparedStatement;
3492
3496
  first<T = unknown>(colName: string): Promise<T | null>;
3493
3497
  first<T = Record<string, unknown>>(): Promise<T | null>;
3494
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3498
+ run(): Promise<D1Response>;
3495
3499
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3496
- raw<T = unknown[]>(): Promise<T[]>;
3500
+ raw<T = unknown[]>(options: {
3501
+ columnNames: true;
3502
+ }): Promise<[string[], ...T[]]>;
3503
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3497
3504
  }
3498
3505
  /**
3499
3506
  * An email message that can be sent from a Worker.
@@ -3608,7 +3615,7 @@ declare interface Hyperdrive {
3608
3615
  }
3609
3616
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3610
3617
  declare type EventContext<Env, P extends string, Data> = {
3611
- request: Request;
3618
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3612
3619
  functionPath: string;
3613
3620
  waitUntil: (promise: Promise<any>) => void;
3614
3621
  passThroughOnException: () => void;
@@ -3627,7 +3634,7 @@ declare type PagesFunction<
3627
3634
  Data extends Record<string, unknown> = Record<string, unknown>
3628
3635
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3629
3636
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3630
- request: Request;
3637
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3631
3638
  functionPath: string;
3632
3639
  waitUntil: (promise: Promise<any>) => void;
3633
3640
  passThroughOnException: () => void;
@@ -377,7 +377,7 @@ export interface DurableObject {
377
377
  ): void | Promise<void>;
378
378
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
379
379
  }
380
- export interface DurableObjectStub extends WorkerRpc {
380
+ export interface DurableObjectStub extends Fetcher {
381
381
  readonly id: DurableObjectId;
382
382
  readonly name?: string;
383
383
  }
@@ -1418,7 +1418,6 @@ export type R2Objects = {
1418
1418
  truncated: false;
1419
1419
  }
1420
1420
  );
1421
- export declare abstract class WorkerRpc extends Fetcher {}
1422
1421
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1423
1422
  readonly scheduledTime: number;
1424
1423
  readonly cron: string;
@@ -1559,6 +1558,9 @@ export declare class ReadableStreamBYOBReader {
1559
1558
  view: T
1560
1559
  ): Promise<ReadableStreamReadResult<T>>;
1561
1560
  }
1561
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1562
+ min?: number;
1563
+ }
1562
1564
  export interface ReadableStreamGetReaderOptions {
1563
1565
  mode: "byob";
1564
1566
  }
@@ -3476,12 +3478,14 @@ export interface D1Meta {
3476
3478
  changed_db: boolean;
3477
3479
  changes: number;
3478
3480
  }
3479
- export interface D1Result<T = unknown> {
3480
- results: T[];
3481
+ export interface D1Response {
3481
3482
  success: true;
3482
3483
  meta: D1Meta & Record<string, unknown>;
3483
3484
  error?: never;
3484
3485
  }
3486
+ export type D1Result<T = unknown> = D1Response & {
3487
+ results: T[];
3488
+ };
3485
3489
  export interface D1ExecResult {
3486
3490
  count: number;
3487
3491
  duration: number;
@@ -3496,9 +3500,12 @@ export declare abstract class D1PreparedStatement {
3496
3500
  bind(...values: unknown[]): D1PreparedStatement;
3497
3501
  first<T = unknown>(colName: string): Promise<T | null>;
3498
3502
  first<T = Record<string, unknown>>(): Promise<T | null>;
3499
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3503
+ run(): Promise<D1Response>;
3500
3504
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3501
- raw<T = unknown[]>(): Promise<T[]>;
3505
+ raw<T = unknown[]>(options: {
3506
+ columnNames: true;
3507
+ }): Promise<[string[], ...T[]]>;
3508
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3502
3509
  }
3503
3510
  /**
3504
3511
  * An email message that can be sent from a Worker.
@@ -3606,7 +3613,7 @@ export interface Hyperdrive {
3606
3613
  }
3607
3614
  export type Params<P extends string = any> = Record<P, string | string[]>;
3608
3615
  export type EventContext<Env, P extends string, Data> = {
3609
- request: Request;
3616
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3610
3617
  functionPath: string;
3611
3618
  waitUntil: (promise: Promise<any>) => void;
3612
3619
  passThroughOnException: () => void;
@@ -3625,7 +3632,7 @@ export type PagesFunction<
3625
3632
  Data extends Record<string, unknown> = Record<string, unknown>
3626
3633
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3627
3634
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3628
- request: Request;
3635
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3629
3636
  functionPath: string;
3630
3637
  waitUntil: (promise: Promise<any>) => void;
3631
3638
  passThroughOnException: () => void;
@@ -392,7 +392,7 @@ declare interface DurableObject {
392
392
  ): void | Promise<void>;
393
393
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
394
394
  }
395
- declare interface DurableObjectStub extends WorkerRpc {
395
+ declare interface DurableObjectStub extends Fetcher {
396
396
  readonly id: DurableObjectId;
397
397
  readonly name?: string;
398
398
  }
@@ -1433,7 +1433,6 @@ declare type R2Objects = {
1433
1433
  truncated: false;
1434
1434
  }
1435
1435
  );
1436
- declare abstract class WorkerRpc extends Fetcher {}
1437
1436
  declare abstract class ScheduledEvent extends ExtendableEvent {
1438
1437
  readonly scheduledTime: number;
1439
1438
  readonly cron: string;
@@ -1574,6 +1573,9 @@ declare class ReadableStreamBYOBReader {
1574
1573
  view: T
1575
1574
  ): Promise<ReadableStreamReadResult<T>>;
1576
1575
  }
1576
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1577
+ min?: number;
1578
+ }
1577
1579
  declare interface ReadableStreamGetReaderOptions {
1578
1580
  mode: "byob";
1579
1581
  }
@@ -3497,12 +3499,14 @@ declare interface D1Meta {
3497
3499
  changed_db: boolean;
3498
3500
  changes: number;
3499
3501
  }
3500
- declare interface D1Result<T = unknown> {
3501
- results: T[];
3502
+ declare interface D1Response {
3502
3503
  success: true;
3503
3504
  meta: D1Meta & Record<string, unknown>;
3504
3505
  error?: never;
3505
3506
  }
3507
+ declare type D1Result<T = unknown> = D1Response & {
3508
+ results: T[];
3509
+ };
3506
3510
  declare interface D1ExecResult {
3507
3511
  count: number;
3508
3512
  duration: number;
@@ -3517,9 +3521,12 @@ declare abstract class D1PreparedStatement {
3517
3521
  bind(...values: unknown[]): D1PreparedStatement;
3518
3522
  first<T = unknown>(colName: string): Promise<T | null>;
3519
3523
  first<T = Record<string, unknown>>(): Promise<T | null>;
3520
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3524
+ run(): Promise<D1Response>;
3521
3525
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3522
- raw<T = unknown[]>(): Promise<T[]>;
3526
+ raw<T = unknown[]>(options: {
3527
+ columnNames: true;
3528
+ }): Promise<[string[], ...T[]]>;
3529
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3523
3530
  }
3524
3531
  /**
3525
3532
  * An email message that can be sent from a Worker.
@@ -3634,7 +3641,7 @@ declare interface Hyperdrive {
3634
3641
  }
3635
3642
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3636
3643
  declare type EventContext<Env, P extends string, Data> = {
3637
- request: Request;
3644
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3638
3645
  functionPath: string;
3639
3646
  waitUntil: (promise: Promise<any>) => void;
3640
3647
  passThroughOnException: () => void;
@@ -3653,7 +3660,7 @@ declare type PagesFunction<
3653
3660
  Data extends Record<string, unknown> = Record<string, unknown>
3654
3661
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3655
3662
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3656
- request: Request;
3663
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3657
3664
  functionPath: string;
3658
3665
  waitUntil: (promise: Promise<any>) => void;
3659
3666
  passThroughOnException: () => void;
@@ -394,7 +394,7 @@ export interface DurableObject {
394
394
  ): void | Promise<void>;
395
395
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
396
396
  }
397
- export interface DurableObjectStub extends WorkerRpc {
397
+ export interface DurableObjectStub extends Fetcher {
398
398
  readonly id: DurableObjectId;
399
399
  readonly name?: string;
400
400
  }
@@ -1435,7 +1435,6 @@ export type R2Objects = {
1435
1435
  truncated: false;
1436
1436
  }
1437
1437
  );
1438
- export declare abstract class WorkerRpc extends Fetcher {}
1439
1438
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1440
1439
  readonly scheduledTime: number;
1441
1440
  readonly cron: string;
@@ -1576,6 +1575,9 @@ export declare class ReadableStreamBYOBReader {
1576
1575
  view: T
1577
1576
  ): Promise<ReadableStreamReadResult<T>>;
1578
1577
  }
1578
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1579
+ min?: number;
1580
+ }
1579
1581
  export interface ReadableStreamGetReaderOptions {
1580
1582
  mode: "byob";
1581
1583
  }
@@ -3502,12 +3504,14 @@ export interface D1Meta {
3502
3504
  changed_db: boolean;
3503
3505
  changes: number;
3504
3506
  }
3505
- export interface D1Result<T = unknown> {
3506
- results: T[];
3507
+ export interface D1Response {
3507
3508
  success: true;
3508
3509
  meta: D1Meta & Record<string, unknown>;
3509
3510
  error?: never;
3510
3511
  }
3512
+ export type D1Result<T = unknown> = D1Response & {
3513
+ results: T[];
3514
+ };
3511
3515
  export interface D1ExecResult {
3512
3516
  count: number;
3513
3517
  duration: number;
@@ -3522,9 +3526,12 @@ export declare abstract class D1PreparedStatement {
3522
3526
  bind(...values: unknown[]): D1PreparedStatement;
3523
3527
  first<T = unknown>(colName: string): Promise<T | null>;
3524
3528
  first<T = Record<string, unknown>>(): Promise<T | null>;
3525
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3529
+ run(): Promise<D1Response>;
3526
3530
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3527
- raw<T = unknown[]>(): Promise<T[]>;
3531
+ raw<T = unknown[]>(options: {
3532
+ columnNames: true;
3533
+ }): Promise<[string[], ...T[]]>;
3534
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3528
3535
  }
3529
3536
  /**
3530
3537
  * An email message that can be sent from a Worker.
@@ -3632,7 +3639,7 @@ export interface Hyperdrive {
3632
3639
  }
3633
3640
  export type Params<P extends string = any> = Record<P, string | string[]>;
3634
3641
  export type EventContext<Env, P extends string, Data> = {
3635
- request: Request;
3642
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3636
3643
  functionPath: string;
3637
3644
  waitUntil: (promise: Promise<any>) => void;
3638
3645
  passThroughOnException: () => void;
@@ -3651,7 +3658,7 @@ export type PagesFunction<
3651
3658
  Data extends Record<string, unknown> = Record<string, unknown>
3652
3659
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3653
3660
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3654
- request: Request;
3661
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3655
3662
  functionPath: string;
3656
3663
  waitUntil: (promise: Promise<any>) => void;
3657
3664
  passThroughOnException: () => void;
@@ -392,7 +392,7 @@ declare interface DurableObject {
392
392
  ): void | Promise<void>;
393
393
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
394
394
  }
395
- declare interface DurableObjectStub extends WorkerRpc {
395
+ declare interface DurableObjectStub extends Fetcher {
396
396
  readonly id: DurableObjectId;
397
397
  readonly name?: string;
398
398
  }
@@ -1434,7 +1434,6 @@ declare type R2Objects = {
1434
1434
  truncated: false;
1435
1435
  }
1436
1436
  );
1437
- declare abstract class WorkerRpc extends Fetcher {}
1438
1437
  declare abstract class ScheduledEvent extends ExtendableEvent {
1439
1438
  readonly scheduledTime: number;
1440
1439
  readonly cron: string;
@@ -1575,6 +1574,9 @@ declare class ReadableStreamBYOBReader {
1575
1574
  view: T
1576
1575
  ): Promise<ReadableStreamReadResult<T>>;
1577
1576
  }
1577
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1578
+ min?: number;
1579
+ }
1578
1580
  declare interface ReadableStreamGetReaderOptions {
1579
1581
  mode: "byob";
1580
1582
  }
@@ -3498,12 +3500,14 @@ declare interface D1Meta {
3498
3500
  changed_db: boolean;
3499
3501
  changes: number;
3500
3502
  }
3501
- declare interface D1Result<T = unknown> {
3502
- results: T[];
3503
+ declare interface D1Response {
3503
3504
  success: true;
3504
3505
  meta: D1Meta & Record<string, unknown>;
3505
3506
  error?: never;
3506
3507
  }
3508
+ declare type D1Result<T = unknown> = D1Response & {
3509
+ results: T[];
3510
+ };
3507
3511
  declare interface D1ExecResult {
3508
3512
  count: number;
3509
3513
  duration: number;
@@ -3518,9 +3522,12 @@ declare abstract class D1PreparedStatement {
3518
3522
  bind(...values: unknown[]): D1PreparedStatement;
3519
3523
  first<T = unknown>(colName: string): Promise<T | null>;
3520
3524
  first<T = Record<string, unknown>>(): Promise<T | null>;
3521
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3525
+ run(): Promise<D1Response>;
3522
3526
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3523
- raw<T = unknown[]>(): Promise<T[]>;
3527
+ raw<T = unknown[]>(options: {
3528
+ columnNames: true;
3529
+ }): Promise<[string[], ...T[]]>;
3530
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3524
3531
  }
3525
3532
  /**
3526
3533
  * An email message that can be sent from a Worker.
@@ -3635,7 +3642,7 @@ declare interface Hyperdrive {
3635
3642
  }
3636
3643
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3637
3644
  declare type EventContext<Env, P extends string, Data> = {
3638
- request: Request;
3645
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3639
3646
  functionPath: string;
3640
3647
  waitUntil: (promise: Promise<any>) => void;
3641
3648
  passThroughOnException: () => void;
@@ -3654,7 +3661,7 @@ declare type PagesFunction<
3654
3661
  Data extends Record<string, unknown> = Record<string, unknown>
3655
3662
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3656
3663
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3657
- request: Request;
3664
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3658
3665
  functionPath: string;
3659
3666
  waitUntil: (promise: Promise<any>) => void;
3660
3667
  passThroughOnException: () => void;
@@ -394,7 +394,7 @@ export interface DurableObject {
394
394
  ): void | Promise<void>;
395
395
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
396
396
  }
397
- export interface DurableObjectStub extends WorkerRpc {
397
+ export interface DurableObjectStub extends Fetcher {
398
398
  readonly id: DurableObjectId;
399
399
  readonly name?: string;
400
400
  }
@@ -1436,7 +1436,6 @@ export type R2Objects = {
1436
1436
  truncated: false;
1437
1437
  }
1438
1438
  );
1439
- export declare abstract class WorkerRpc extends Fetcher {}
1440
1439
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1441
1440
  readonly scheduledTime: number;
1442
1441
  readonly cron: string;
@@ -1577,6 +1576,9 @@ export declare class ReadableStreamBYOBReader {
1577
1576
  view: T
1578
1577
  ): Promise<ReadableStreamReadResult<T>>;
1579
1578
  }
1579
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1580
+ min?: number;
1581
+ }
1580
1582
  export interface ReadableStreamGetReaderOptions {
1581
1583
  mode: "byob";
1582
1584
  }
@@ -3503,12 +3505,14 @@ export interface D1Meta {
3503
3505
  changed_db: boolean;
3504
3506
  changes: number;
3505
3507
  }
3506
- export interface D1Result<T = unknown> {
3507
- results: T[];
3508
+ export interface D1Response {
3508
3509
  success: true;
3509
3510
  meta: D1Meta & Record<string, unknown>;
3510
3511
  error?: never;
3511
3512
  }
3513
+ export type D1Result<T = unknown> = D1Response & {
3514
+ results: T[];
3515
+ };
3512
3516
  export interface D1ExecResult {
3513
3517
  count: number;
3514
3518
  duration: number;
@@ -3523,9 +3527,12 @@ export declare abstract class D1PreparedStatement {
3523
3527
  bind(...values: unknown[]): D1PreparedStatement;
3524
3528
  first<T = unknown>(colName: string): Promise<T | null>;
3525
3529
  first<T = Record<string, unknown>>(): Promise<T | null>;
3526
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3530
+ run(): Promise<D1Response>;
3527
3531
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3528
- raw<T = unknown[]>(): Promise<T[]>;
3532
+ raw<T = unknown[]>(options: {
3533
+ columnNames: true;
3534
+ }): Promise<[string[], ...T[]]>;
3535
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3529
3536
  }
3530
3537
  /**
3531
3538
  * An email message that can be sent from a Worker.
@@ -3633,7 +3640,7 @@ export interface Hyperdrive {
3633
3640
  }
3634
3641
  export type Params<P extends string = any> = Record<P, string | string[]>;
3635
3642
  export type EventContext<Env, P extends string, Data> = {
3636
- request: Request;
3643
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3637
3644
  functionPath: string;
3638
3645
  waitUntil: (promise: Promise<any>) => void;
3639
3646
  passThroughOnException: () => void;
@@ -3652,7 +3659,7 @@ export type PagesFunction<
3652
3659
  Data extends Record<string, unknown> = Record<string, unknown>
3653
3660
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3654
3661
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3655
- request: Request;
3662
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3656
3663
  functionPath: string;
3657
3664
  waitUntil: (promise: Promise<any>) => void;
3658
3665
  passThroughOnException: () => void;
@@ -392,7 +392,7 @@ declare interface DurableObject {
392
392
  ): void | Promise<void>;
393
393
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
394
394
  }
395
- declare interface DurableObjectStub extends WorkerRpc {
395
+ declare interface DurableObjectStub extends Fetcher {
396
396
  readonly id: DurableObjectId;
397
397
  readonly name?: string;
398
398
  }
@@ -1434,7 +1434,6 @@ declare type R2Objects = {
1434
1434
  truncated: false;
1435
1435
  }
1436
1436
  );
1437
- declare abstract class WorkerRpc extends Fetcher {}
1438
1437
  declare abstract class ScheduledEvent extends ExtendableEvent {
1439
1438
  readonly scheduledTime: number;
1440
1439
  readonly cron: string;
@@ -1575,6 +1574,9 @@ declare class ReadableStreamBYOBReader {
1575
1574
  view: T
1576
1575
  ): Promise<ReadableStreamReadResult<T>>;
1577
1576
  }
1577
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1578
+ min?: number;
1579
+ }
1578
1580
  declare interface ReadableStreamGetReaderOptions {
1579
1581
  mode: "byob";
1580
1582
  }
@@ -3495,12 +3497,14 @@ declare interface D1Meta {
3495
3497
  changed_db: boolean;
3496
3498
  changes: number;
3497
3499
  }
3498
- declare interface D1Result<T = unknown> {
3499
- results: T[];
3500
+ declare interface D1Response {
3500
3501
  success: true;
3501
3502
  meta: D1Meta & Record<string, unknown>;
3502
3503
  error?: never;
3503
3504
  }
3505
+ declare type D1Result<T = unknown> = D1Response & {
3506
+ results: T[];
3507
+ };
3504
3508
  declare interface D1ExecResult {
3505
3509
  count: number;
3506
3510
  duration: number;
@@ -3515,9 +3519,12 @@ declare abstract class D1PreparedStatement {
3515
3519
  bind(...values: unknown[]): D1PreparedStatement;
3516
3520
  first<T = unknown>(colName: string): Promise<T | null>;
3517
3521
  first<T = Record<string, unknown>>(): Promise<T | null>;
3518
- run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3522
+ run(): Promise<D1Response>;
3519
3523
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3520
- raw<T = unknown[]>(): Promise<T[]>;
3524
+ raw<T = unknown[]>(options: {
3525
+ columnNames: true;
3526
+ }): Promise<[string[], ...T[]]>;
3527
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3521
3528
  }
3522
3529
  /**
3523
3530
  * An email message that can be sent from a Worker.
@@ -3632,7 +3639,7 @@ declare interface Hyperdrive {
3632
3639
  }
3633
3640
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3634
3641
  declare type EventContext<Env, P extends string, Data> = {
3635
- request: Request;
3642
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3636
3643
  functionPath: string;
3637
3644
  waitUntil: (promise: Promise<any>) => void;
3638
3645
  passThroughOnException: () => void;
@@ -3651,7 +3658,7 @@ declare type PagesFunction<
3651
3658
  Data extends Record<string, unknown> = Record<string, unknown>
3652
3659
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3653
3660
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3654
- request: Request;
3661
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3655
3662
  functionPath: string;
3656
3663
  waitUntil: (promise: Promise<any>) => void;
3657
3664
  passThroughOnException: () => void;