@cloudflare/workers-types 4.20240208.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
  }
@@ -3509,7 +3511,10 @@ declare abstract class D1PreparedStatement {
3509
3511
  first<T = Record<string, unknown>>(): Promise<T | null>;
3510
3512
  run(): Promise<D1Response>;
3511
3513
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3512
- 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[]>;
3513
3518
  }
3514
3519
  /**
3515
3520
  * An email message that can be sent from a Worker.
@@ -3624,7 +3629,7 @@ declare interface Hyperdrive {
3624
3629
  }
3625
3630
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3626
3631
  declare type EventContext<Env, P extends string, Data> = {
3627
- request: Request;
3632
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3628
3633
  functionPath: string;
3629
3634
  waitUntil: (promise: Promise<any>) => void;
3630
3635
  passThroughOnException: () => void;
@@ -3643,7 +3648,7 @@ declare type PagesFunction<
3643
3648
  Data extends Record<string, unknown> = Record<string, unknown>
3644
3649
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3645
3650
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3646
- request: Request;
3651
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3647
3652
  functionPath: string;
3648
3653
  waitUntil: (promise: Promise<any>) => void;
3649
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
  }
@@ -3514,7 +3516,10 @@ export declare abstract class D1PreparedStatement {
3514
3516
  first<T = Record<string, unknown>>(): Promise<T | null>;
3515
3517
  run(): Promise<D1Response>;
3516
3518
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3517
- 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[]>;
3518
3523
  }
3519
3524
  /**
3520
3525
  * An email message that can be sent from a Worker.
@@ -3622,7 +3627,7 @@ export interface Hyperdrive {
3622
3627
  }
3623
3628
  export type Params<P extends string = any> = Record<P, string | string[]>;
3624
3629
  export type EventContext<Env, P extends string, Data> = {
3625
- request: Request;
3630
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3626
3631
  functionPath: string;
3627
3632
  waitUntil: (promise: Promise<any>) => void;
3628
3633
  passThroughOnException: () => void;
@@ -3641,7 +3646,7 @@ export type PagesFunction<
3641
3646
  Data extends Record<string, unknown> = Record<string, unknown>
3642
3647
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3643
3648
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3644
- request: Request;
3649
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3645
3650
  functionPath: string;
3646
3651
  waitUntil: (promise: Promise<any>) => void;
3647
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
  }
@@ -3495,7 +3497,10 @@ declare abstract class D1PreparedStatement {
3495
3497
  first<T = Record<string, unknown>>(): Promise<T | null>;
3496
3498
  run(): Promise<D1Response>;
3497
3499
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3498
- 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[]>;
3499
3504
  }
3500
3505
  /**
3501
3506
  * An email message that can be sent from a Worker.
@@ -3610,7 +3615,7 @@ declare interface Hyperdrive {
3610
3615
  }
3611
3616
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3612
3617
  declare type EventContext<Env, P extends string, Data> = {
3613
- request: Request;
3618
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3614
3619
  functionPath: string;
3615
3620
  waitUntil: (promise: Promise<any>) => void;
3616
3621
  passThroughOnException: () => void;
@@ -3629,7 +3634,7 @@ declare type PagesFunction<
3629
3634
  Data extends Record<string, unknown> = Record<string, unknown>
3630
3635
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3631
3636
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3632
- request: Request;
3637
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3633
3638
  functionPath: string;
3634
3639
  waitUntil: (promise: Promise<any>) => void;
3635
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
  }
@@ -3500,7 +3502,10 @@ export declare abstract class D1PreparedStatement {
3500
3502
  first<T = Record<string, unknown>>(): Promise<T | null>;
3501
3503
  run(): Promise<D1Response>;
3502
3504
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3503
- 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[]>;
3504
3509
  }
3505
3510
  /**
3506
3511
  * An email message that can be sent from a Worker.
@@ -3608,7 +3613,7 @@ export interface Hyperdrive {
3608
3613
  }
3609
3614
  export type Params<P extends string = any> = Record<P, string | string[]>;
3610
3615
  export type EventContext<Env, P extends string, Data> = {
3611
- request: Request;
3616
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3612
3617
  functionPath: string;
3613
3618
  waitUntil: (promise: Promise<any>) => void;
3614
3619
  passThroughOnException: () => void;
@@ -3627,7 +3632,7 @@ export type PagesFunction<
3627
3632
  Data extends Record<string, unknown> = Record<string, unknown>
3628
3633
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3629
3634
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3630
- request: Request;
3635
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3631
3636
  functionPath: string;
3632
3637
  waitUntil: (promise: Promise<any>) => void;
3633
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
  }
@@ -3521,7 +3523,10 @@ declare abstract class D1PreparedStatement {
3521
3523
  first<T = Record<string, unknown>>(): Promise<T | null>;
3522
3524
  run(): Promise<D1Response>;
3523
3525
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3524
- 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[]>;
3525
3530
  }
3526
3531
  /**
3527
3532
  * An email message that can be sent from a Worker.
@@ -3636,7 +3641,7 @@ declare interface Hyperdrive {
3636
3641
  }
3637
3642
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3638
3643
  declare type EventContext<Env, P extends string, Data> = {
3639
- request: Request;
3644
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3640
3645
  functionPath: string;
3641
3646
  waitUntil: (promise: Promise<any>) => void;
3642
3647
  passThroughOnException: () => void;
@@ -3655,7 +3660,7 @@ declare type PagesFunction<
3655
3660
  Data extends Record<string, unknown> = Record<string, unknown>
3656
3661
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3657
3662
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3658
- request: Request;
3663
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3659
3664
  functionPath: string;
3660
3665
  waitUntil: (promise: Promise<any>) => void;
3661
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
  }
@@ -3526,7 +3528,10 @@ export declare abstract class D1PreparedStatement {
3526
3528
  first<T = Record<string, unknown>>(): Promise<T | null>;
3527
3529
  run(): Promise<D1Response>;
3528
3530
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3529
- 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[]>;
3530
3535
  }
3531
3536
  /**
3532
3537
  * An email message that can be sent from a Worker.
@@ -3634,7 +3639,7 @@ export interface Hyperdrive {
3634
3639
  }
3635
3640
  export type Params<P extends string = any> = Record<P, string | string[]>;
3636
3641
  export type EventContext<Env, P extends string, Data> = {
3637
- request: Request;
3642
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3638
3643
  functionPath: string;
3639
3644
  waitUntil: (promise: Promise<any>) => void;
3640
3645
  passThroughOnException: () => void;
@@ -3653,7 +3658,7 @@ export type PagesFunction<
3653
3658
  Data extends Record<string, unknown> = Record<string, unknown>
3654
3659
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3655
3660
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3656
- request: Request;
3661
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3657
3662
  functionPath: string;
3658
3663
  waitUntil: (promise: Promise<any>) => void;
3659
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
  }
@@ -3522,7 +3524,10 @@ declare abstract class D1PreparedStatement {
3522
3524
  first<T = Record<string, unknown>>(): Promise<T | null>;
3523
3525
  run(): Promise<D1Response>;
3524
3526
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3525
- 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[]>;
3526
3531
  }
3527
3532
  /**
3528
3533
  * An email message that can be sent from a Worker.
@@ -3637,7 +3642,7 @@ declare interface Hyperdrive {
3637
3642
  }
3638
3643
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3639
3644
  declare type EventContext<Env, P extends string, Data> = {
3640
- request: Request;
3645
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3641
3646
  functionPath: string;
3642
3647
  waitUntil: (promise: Promise<any>) => void;
3643
3648
  passThroughOnException: () => void;
@@ -3656,7 +3661,7 @@ declare type PagesFunction<
3656
3661
  Data extends Record<string, unknown> = Record<string, unknown>
3657
3662
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3658
3663
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3659
- request: Request;
3664
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3660
3665
  functionPath: string;
3661
3666
  waitUntil: (promise: Promise<any>) => void;
3662
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
  }
@@ -3527,7 +3529,10 @@ export declare abstract class D1PreparedStatement {
3527
3529
  first<T = Record<string, unknown>>(): Promise<T | null>;
3528
3530
  run(): Promise<D1Response>;
3529
3531
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3530
- 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[]>;
3531
3536
  }
3532
3537
  /**
3533
3538
  * An email message that can be sent from a Worker.
@@ -3635,7 +3640,7 @@ export interface Hyperdrive {
3635
3640
  }
3636
3641
  export type Params<P extends string = any> = Record<P, string | string[]>;
3637
3642
  export type EventContext<Env, P extends string, Data> = {
3638
- request: Request;
3643
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3639
3644
  functionPath: string;
3640
3645
  waitUntil: (promise: Promise<any>) => void;
3641
3646
  passThroughOnException: () => void;
@@ -3654,7 +3659,7 @@ export type PagesFunction<
3654
3659
  Data extends Record<string, unknown> = Record<string, unknown>
3655
3660
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3656
3661
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3657
- request: Request;
3662
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3658
3663
  functionPath: string;
3659
3664
  waitUntil: (promise: Promise<any>) => void;
3660
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
  }
@@ -3519,7 +3521,10 @@ declare abstract class D1PreparedStatement {
3519
3521
  first<T = Record<string, unknown>>(): Promise<T | null>;
3520
3522
  run(): Promise<D1Response>;
3521
3523
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3522
- 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[]>;
3523
3528
  }
3524
3529
  /**
3525
3530
  * An email message that can be sent from a Worker.
@@ -3634,7 +3639,7 @@ declare interface Hyperdrive {
3634
3639
  }
3635
3640
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3636
3641
  declare type EventContext<Env, P extends string, Data> = {
3637
- request: Request;
3642
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3638
3643
  functionPath: string;
3639
3644
  waitUntil: (promise: Promise<any>) => void;
3640
3645
  passThroughOnException: () => void;
@@ -3653,7 +3658,7 @@ declare type PagesFunction<
3653
3658
  Data extends Record<string, unknown> = Record<string, unknown>
3654
3659
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3655
3660
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3656
- request: Request;
3661
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3657
3662
  functionPath: string;
3658
3663
  waitUntil: (promise: Promise<any>) => void;
3659
3664
  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
  }
@@ -3524,7 +3526,10 @@ export declare abstract class D1PreparedStatement {
3524
3526
  first<T = Record<string, unknown>>(): Promise<T | null>;
3525
3527
  run(): Promise<D1Response>;
3526
3528
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3527
- raw<T = unknown[]>(): Promise<T[]>;
3529
+ raw<T = unknown[]>(options: {
3530
+ columnNames: true;
3531
+ }): Promise<[string[], ...T[]]>;
3532
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3528
3533
  }
3529
3534
  /**
3530
3535
  * An email message that can be sent from a Worker.
@@ -3632,7 +3637,7 @@ export interface Hyperdrive {
3632
3637
  }
3633
3638
  export type Params<P extends string = any> = Record<P, string | string[]>;
3634
3639
  export type EventContext<Env, P extends string, Data> = {
3635
- request: Request;
3640
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3636
3641
  functionPath: string;
3637
3642
  waitUntil: (promise: Promise<any>) => void;
3638
3643
  passThroughOnException: () => void;
@@ -3651,7 +3656,7 @@ export type PagesFunction<
3651
3656
  Data extends Record<string, unknown> = Record<string, unknown>
3652
3657
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3653
3658
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3654
- request: Request;
3659
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3655
3660
  functionPath: string;
3656
3661
  waitUntil: (promise: Promise<any>) => void;
3657
3662
  passThroughOnException: () => void;
@@ -396,7 +396,7 @@ declare interface DurableObject {
396
396
  ): void | Promise<void>;
397
397
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
398
398
  }
399
- declare interface DurableObjectStub extends WorkerRpc {
399
+ declare interface DurableObjectStub extends Fetcher {
400
400
  readonly id: DurableObjectId;
401
401
  readonly name?: string;
402
402
  }
@@ -1438,7 +1438,6 @@ declare type R2Objects = {
1438
1438
  truncated: false;
1439
1439
  }
1440
1440
  );
1441
- declare abstract class WorkerRpc extends Fetcher {}
1442
1441
  declare abstract class ScheduledEvent extends ExtendableEvent {
1443
1442
  readonly scheduledTime: number;
1444
1443
  readonly cron: string;
@@ -1579,6 +1578,9 @@ declare class ReadableStreamBYOBReader {
1579
1578
  view: T
1580
1579
  ): Promise<ReadableStreamReadResult<T>>;
1581
1580
  }
1581
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1582
+ min?: number;
1583
+ }
1582
1584
  declare interface ReadableStreamGetReaderOptions {
1583
1585
  mode: "byob";
1584
1586
  }
@@ -3522,7 +3524,10 @@ declare abstract class D1PreparedStatement {
3522
3524
  first<T = Record<string, unknown>>(): Promise<T | null>;
3523
3525
  run(): Promise<D1Response>;
3524
3526
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3525
- 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[]>;
3526
3531
  }
3527
3532
  /**
3528
3533
  * An email message that can be sent from a Worker.
@@ -3637,7 +3642,7 @@ declare interface Hyperdrive {
3637
3642
  }
3638
3643
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3639
3644
  declare type EventContext<Env, P extends string, Data> = {
3640
- request: Request;
3645
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3641
3646
  functionPath: string;
3642
3647
  waitUntil: (promise: Promise<any>) => void;
3643
3648
  passThroughOnException: () => void;
@@ -3656,7 +3661,7 @@ declare type PagesFunction<
3656
3661
  Data extends Record<string, unknown> = Record<string, unknown>
3657
3662
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3658
3663
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3659
- request: Request;
3664
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3660
3665
  functionPath: string;
3661
3666
  waitUntil: (promise: Promise<any>) => void;
3662
3667
  passThroughOnException: () => void;
@@ -398,7 +398,7 @@ export interface DurableObject {
398
398
  ): void | Promise<void>;
399
399
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
400
400
  }
401
- export interface DurableObjectStub extends WorkerRpc {
401
+ export interface DurableObjectStub extends Fetcher {
402
402
  readonly id: DurableObjectId;
403
403
  readonly name?: string;
404
404
  }
@@ -1440,7 +1440,6 @@ export type R2Objects = {
1440
1440
  truncated: false;
1441
1441
  }
1442
1442
  );
1443
- export declare abstract class WorkerRpc extends Fetcher {}
1444
1443
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1445
1444
  readonly scheduledTime: number;
1446
1445
  readonly cron: string;
@@ -1581,6 +1580,9 @@ export declare class ReadableStreamBYOBReader {
1581
1580
  view: T
1582
1581
  ): Promise<ReadableStreamReadResult<T>>;
1583
1582
  }
1583
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1584
+ min?: number;
1585
+ }
1584
1586
  export interface ReadableStreamGetReaderOptions {
1585
1587
  mode: "byob";
1586
1588
  }
@@ -3527,7 +3529,10 @@ export declare abstract class D1PreparedStatement {
3527
3529
  first<T = Record<string, unknown>>(): Promise<T | null>;
3528
3530
  run(): Promise<D1Response>;
3529
3531
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3530
- 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[]>;
3531
3536
  }
3532
3537
  /**
3533
3538
  * An email message that can be sent from a Worker.
@@ -3635,7 +3640,7 @@ export interface Hyperdrive {
3635
3640
  }
3636
3641
  export type Params<P extends string = any> = Record<P, string | string[]>;
3637
3642
  export type EventContext<Env, P extends string, Data> = {
3638
- request: Request;
3643
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3639
3644
  functionPath: string;
3640
3645
  waitUntil: (promise: Promise<any>) => void;
3641
3646
  passThroughOnException: () => void;
@@ -3654,7 +3659,7 @@ export type PagesFunction<
3654
3659
  Data extends Record<string, unknown> = Record<string, unknown>
3655
3660
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3656
3661
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3657
- request: Request;
3662
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3658
3663
  functionPath: string;
3659
3664
  waitUntil: (promise: Promise<any>) => void;
3660
3665
  passThroughOnException: () => void;
@@ -396,7 +396,7 @@ declare interface DurableObject {
396
396
  ): void | Promise<void>;
397
397
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
398
398
  }
399
- declare interface DurableObjectStub extends WorkerRpc {
399
+ declare interface DurableObjectStub extends Fetcher {
400
400
  readonly id: DurableObjectId;
401
401
  readonly name?: string;
402
402
  }
@@ -1439,7 +1439,6 @@ declare type R2Objects = {
1439
1439
  truncated: false;
1440
1440
  }
1441
1441
  );
1442
- declare abstract class WorkerRpc extends Fetcher {}
1443
1442
  declare abstract class ScheduledEvent extends ExtendableEvent {
1444
1443
  readonly scheduledTime: number;
1445
1444
  readonly cron: string;
@@ -1580,6 +1579,9 @@ declare class ReadableStreamBYOBReader {
1580
1579
  view: T
1581
1580
  ): Promise<ReadableStreamReadResult<T>>;
1582
1581
  }
1582
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1583
+ min?: number;
1584
+ }
1583
1585
  declare interface ReadableStreamGetReaderOptions {
1584
1586
  mode: "byob";
1585
1587
  }
@@ -3523,7 +3525,10 @@ declare abstract class D1PreparedStatement {
3523
3525
  first<T = Record<string, unknown>>(): Promise<T | null>;
3524
3526
  run(): Promise<D1Response>;
3525
3527
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3526
- raw<T = unknown[]>(): Promise<T[]>;
3528
+ raw<T = unknown[]>(options: {
3529
+ columnNames: true;
3530
+ }): Promise<[string[], ...T[]]>;
3531
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3527
3532
  }
3528
3533
  /**
3529
3534
  * An email message that can be sent from a Worker.
@@ -3638,7 +3643,7 @@ declare interface Hyperdrive {
3638
3643
  }
3639
3644
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3640
3645
  declare type EventContext<Env, P extends string, Data> = {
3641
- request: Request;
3646
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3642
3647
  functionPath: string;
3643
3648
  waitUntil: (promise: Promise<any>) => void;
3644
3649
  passThroughOnException: () => void;
@@ -3657,7 +3662,7 @@ declare type PagesFunction<
3657
3662
  Data extends Record<string, unknown> = Record<string, unknown>
3658
3663
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3659
3664
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3660
- request: Request;
3665
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3661
3666
  functionPath: string;
3662
3667
  waitUntil: (promise: Promise<any>) => void;
3663
3668
  passThroughOnException: () => void;
@@ -398,7 +398,7 @@ export interface DurableObject {
398
398
  ): void | Promise<void>;
399
399
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
400
400
  }
401
- export interface DurableObjectStub extends WorkerRpc {
401
+ export interface DurableObjectStub extends Fetcher {
402
402
  readonly id: DurableObjectId;
403
403
  readonly name?: string;
404
404
  }
@@ -1441,7 +1441,6 @@ export type R2Objects = {
1441
1441
  truncated: false;
1442
1442
  }
1443
1443
  );
1444
- export declare abstract class WorkerRpc extends Fetcher {}
1445
1444
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1446
1445
  readonly scheduledTime: number;
1447
1446
  readonly cron: string;
@@ -1582,6 +1581,9 @@ export declare class ReadableStreamBYOBReader {
1582
1581
  view: T
1583
1582
  ): Promise<ReadableStreamReadResult<T>>;
1584
1583
  }
1584
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1585
+ min?: number;
1586
+ }
1585
1587
  export interface ReadableStreamGetReaderOptions {
1586
1588
  mode: "byob";
1587
1589
  }
@@ -3528,7 +3530,10 @@ export declare abstract class D1PreparedStatement {
3528
3530
  first<T = Record<string, unknown>>(): Promise<T | null>;
3529
3531
  run(): Promise<D1Response>;
3530
3532
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3531
- raw<T = unknown[]>(): Promise<T[]>;
3533
+ raw<T = unknown[]>(options: {
3534
+ columnNames: true;
3535
+ }): Promise<[string[], ...T[]]>;
3536
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3532
3537
  }
3533
3538
  /**
3534
3539
  * An email message that can be sent from a Worker.
@@ -3636,7 +3641,7 @@ export interface Hyperdrive {
3636
3641
  }
3637
3642
  export type Params<P extends string = any> = Record<P, string | string[]>;
3638
3643
  export type EventContext<Env, P extends string, Data> = {
3639
- request: Request;
3644
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3640
3645
  functionPath: string;
3641
3646
  waitUntil: (promise: Promise<any>) => void;
3642
3647
  passThroughOnException: () => void;
@@ -3655,7 +3660,7 @@ export type PagesFunction<
3655
3660
  Data extends Record<string, unknown> = Record<string, unknown>
3656
3661
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3657
3662
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3658
- request: Request;
3663
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3659
3664
  functionPath: string;
3660
3665
  waitUntil: (promise: Promise<any>) => void;
3661
3666
  passThroughOnException: () => void;
@@ -396,7 +396,7 @@ declare interface DurableObject {
396
396
  ): void | Promise<void>;
397
397
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
398
398
  }
399
- declare interface DurableObjectStub extends WorkerRpc {
399
+ declare interface DurableObjectStub extends Fetcher {
400
400
  readonly id: DurableObjectId;
401
401
  readonly name?: string;
402
402
  }
@@ -1439,7 +1439,6 @@ declare type R2Objects = {
1439
1439
  truncated: false;
1440
1440
  }
1441
1441
  );
1442
- declare abstract class WorkerRpc extends Fetcher {}
1443
1442
  declare abstract class ScheduledEvent extends ExtendableEvent {
1444
1443
  readonly scheduledTime: number;
1445
1444
  readonly cron: string;
@@ -1580,6 +1579,9 @@ declare class ReadableStreamBYOBReader {
1580
1579
  view: T
1581
1580
  ): Promise<ReadableStreamReadResult<T>>;
1582
1581
  }
1582
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1583
+ min?: number;
1584
+ }
1583
1585
  declare interface ReadableStreamGetReaderOptions {
1584
1586
  mode: "byob";
1585
1587
  }
@@ -3523,7 +3525,10 @@ declare abstract class D1PreparedStatement {
3523
3525
  first<T = Record<string, unknown>>(): Promise<T | null>;
3524
3526
  run(): Promise<D1Response>;
3525
3527
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3526
- raw<T = unknown[]>(): Promise<T[]>;
3528
+ raw<T = unknown[]>(options: {
3529
+ columnNames: true;
3530
+ }): Promise<[string[], ...T[]]>;
3531
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3527
3532
  }
3528
3533
  /**
3529
3534
  * An email message that can be sent from a Worker.
@@ -3638,7 +3643,7 @@ declare interface Hyperdrive {
3638
3643
  }
3639
3644
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3640
3645
  declare type EventContext<Env, P extends string, Data> = {
3641
- request: Request;
3646
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3642
3647
  functionPath: string;
3643
3648
  waitUntil: (promise: Promise<any>) => void;
3644
3649
  passThroughOnException: () => void;
@@ -3657,7 +3662,7 @@ declare type PagesFunction<
3657
3662
  Data extends Record<string, unknown> = Record<string, unknown>
3658
3663
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3659
3664
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3660
- request: Request;
3665
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3661
3666
  functionPath: string;
3662
3667
  waitUntil: (promise: Promise<any>) => void;
3663
3668
  passThroughOnException: () => void;
@@ -398,7 +398,7 @@ export interface DurableObject {
398
398
  ): void | Promise<void>;
399
399
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
400
400
  }
401
- export interface DurableObjectStub extends WorkerRpc {
401
+ export interface DurableObjectStub extends Fetcher {
402
402
  readonly id: DurableObjectId;
403
403
  readonly name?: string;
404
404
  }
@@ -1441,7 +1441,6 @@ export type R2Objects = {
1441
1441
  truncated: false;
1442
1442
  }
1443
1443
  );
1444
- export declare abstract class WorkerRpc extends Fetcher {}
1445
1444
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1446
1445
  readonly scheduledTime: number;
1447
1446
  readonly cron: string;
@@ -1582,6 +1581,9 @@ export declare class ReadableStreamBYOBReader {
1582
1581
  view: T
1583
1582
  ): Promise<ReadableStreamReadResult<T>>;
1584
1583
  }
1584
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1585
+ min?: number;
1586
+ }
1585
1587
  export interface ReadableStreamGetReaderOptions {
1586
1588
  mode: "byob";
1587
1589
  }
@@ -3528,7 +3530,10 @@ export declare abstract class D1PreparedStatement {
3528
3530
  first<T = Record<string, unknown>>(): Promise<T | null>;
3529
3531
  run(): Promise<D1Response>;
3530
3532
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3531
- raw<T = unknown[]>(): Promise<T[]>;
3533
+ raw<T = unknown[]>(options: {
3534
+ columnNames: true;
3535
+ }): Promise<[string[], ...T[]]>;
3536
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3532
3537
  }
3533
3538
  /**
3534
3539
  * An email message that can be sent from a Worker.
@@ -3636,7 +3641,7 @@ export interface Hyperdrive {
3636
3641
  }
3637
3642
  export type Params<P extends string = any> = Record<P, string | string[]>;
3638
3643
  export type EventContext<Env, P extends string, Data> = {
3639
- request: Request;
3644
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3640
3645
  functionPath: string;
3641
3646
  waitUntil: (promise: Promise<any>) => void;
3642
3647
  passThroughOnException: () => void;
@@ -3655,7 +3660,7 @@ export type PagesFunction<
3655
3660
  Data extends Record<string, unknown> = Record<string, unknown>
3656
3661
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3657
3662
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3658
- request: Request;
3663
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3659
3664
  functionPath: string;
3660
3665
  waitUntil: (promise: Promise<any>) => void;
3661
3666
  passThroughOnException: () => void;
@@ -396,7 +396,7 @@ declare interface DurableObject {
396
396
  ): void | Promise<void>;
397
397
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
398
398
  }
399
- declare interface DurableObjectStub extends WorkerRpc {
399
+ declare interface DurableObjectStub extends Fetcher {
400
400
  readonly id: DurableObjectId;
401
401
  readonly name?: string;
402
402
  }
@@ -1144,6 +1144,7 @@ declare abstract class Fetcher {
1144
1144
  messages: ServiceBindingQueueMessage[]
1145
1145
  ): Promise<FetcherQueueResult>;
1146
1146
  scheduled(options?: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
1147
+ getRpcMethodForTestOnly(name: string): (() => any | Promise<any>) | null;
1147
1148
  }
1148
1149
  declare interface FetcherPutOptions {
1149
1150
  expiration?: number;
@@ -1479,7 +1480,6 @@ declare type R2Objects = {
1479
1480
  truncated: false;
1480
1481
  }
1481
1482
  );
1482
- declare abstract class WorkerRpc extends Fetcher {}
1483
1483
  declare abstract class ScheduledEvent extends ExtendableEvent {
1484
1484
  readonly scheduledTime: number;
1485
1485
  readonly cron: string;
@@ -1620,6 +1620,9 @@ declare class ReadableStreamBYOBReader {
1620
1620
  view: T
1621
1621
  ): Promise<ReadableStreamReadResult<T>>;
1622
1622
  }
1623
+ declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1624
+ min?: number;
1625
+ }
1623
1626
  declare interface ReadableStreamGetReaderOptions {
1624
1627
  mode: "byob";
1625
1628
  }
@@ -3580,7 +3583,10 @@ declare abstract class D1PreparedStatement {
3580
3583
  first<T = Record<string, unknown>>(): Promise<T | null>;
3581
3584
  run(): Promise<D1Response>;
3582
3585
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3583
- raw<T = unknown[]>(): Promise<T[]>;
3586
+ raw<T = unknown[]>(options: {
3587
+ columnNames: true;
3588
+ }): Promise<[string[], ...T[]]>;
3589
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3584
3590
  }
3585
3591
  /**
3586
3592
  * An email message that can be sent from a Worker.
@@ -3695,7 +3701,7 @@ declare interface Hyperdrive {
3695
3701
  }
3696
3702
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3697
3703
  declare type EventContext<Env, P extends string, Data> = {
3698
- request: Request;
3704
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3699
3705
  functionPath: string;
3700
3706
  waitUntil: (promise: Promise<any>) => void;
3701
3707
  passThroughOnException: () => void;
@@ -3714,7 +3720,7 @@ declare type PagesFunction<
3714
3720
  Data extends Record<string, unknown> = Record<string, unknown>
3715
3721
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3716
3722
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3717
- request: Request;
3723
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3718
3724
  functionPath: string;
3719
3725
  waitUntil: (promise: Promise<any>) => void;
3720
3726
  passThroughOnException: () => void;
@@ -398,7 +398,7 @@ export interface DurableObject {
398
398
  ): void | Promise<void>;
399
399
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
400
400
  }
401
- export interface DurableObjectStub extends WorkerRpc {
401
+ export interface DurableObjectStub extends Fetcher {
402
402
  readonly id: DurableObjectId;
403
403
  readonly name?: string;
404
404
  }
@@ -1146,6 +1146,7 @@ export declare abstract class Fetcher {
1146
1146
  messages: ServiceBindingQueueMessage[]
1147
1147
  ): Promise<FetcherQueueResult>;
1148
1148
  scheduled(options?: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
1149
+ getRpcMethodForTestOnly(name: string): (() => any | Promise<any>) | null;
1149
1150
  }
1150
1151
  export interface FetcherPutOptions {
1151
1152
  expiration?: number;
@@ -1481,7 +1482,6 @@ export type R2Objects = {
1481
1482
  truncated: false;
1482
1483
  }
1483
1484
  );
1484
- export declare abstract class WorkerRpc extends Fetcher {}
1485
1485
  export declare abstract class ScheduledEvent extends ExtendableEvent {
1486
1486
  readonly scheduledTime: number;
1487
1487
  readonly cron: string;
@@ -1622,6 +1622,9 @@ export declare class ReadableStreamBYOBReader {
1622
1622
  view: T
1623
1623
  ): Promise<ReadableStreamReadResult<T>>;
1624
1624
  }
1625
+ export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1626
+ min?: number;
1627
+ }
1625
1628
  export interface ReadableStreamGetReaderOptions {
1626
1629
  mode: "byob";
1627
1630
  }
@@ -3585,7 +3588,10 @@ export declare abstract class D1PreparedStatement {
3585
3588
  first<T = Record<string, unknown>>(): Promise<T | null>;
3586
3589
  run(): Promise<D1Response>;
3587
3590
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3588
- raw<T = unknown[]>(): Promise<T[]>;
3591
+ raw<T = unknown[]>(options: {
3592
+ columnNames: true;
3593
+ }): Promise<[string[], ...T[]]>;
3594
+ raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
3589
3595
  }
3590
3596
  /**
3591
3597
  * An email message that can be sent from a Worker.
@@ -3693,7 +3699,7 @@ export interface Hyperdrive {
3693
3699
  }
3694
3700
  export type Params<P extends string = any> = Record<P, string | string[]>;
3695
3701
  export type EventContext<Env, P extends string, Data> = {
3696
- request: Request;
3702
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3697
3703
  functionPath: string;
3698
3704
  waitUntil: (promise: Promise<any>) => void;
3699
3705
  passThroughOnException: () => void;
@@ -3712,7 +3718,7 @@ export type PagesFunction<
3712
3718
  Data extends Record<string, unknown> = Record<string, unknown>
3713
3719
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3714
3720
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3715
- request: Request;
3721
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3716
3722
  functionPath: string;
3717
3723
  waitUntil: (promise: Promise<any>) => void;
3718
3724
  passThroughOnException: () => void;
package/index.d.ts CHANGED
@@ -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
  }
@@ -3509,7 +3511,10 @@ declare abstract class D1PreparedStatement {
3509
3511
  first<T = Record<string, unknown>>(): Promise<T | null>;
3510
3512
  run(): Promise<D1Response>;
3511
3513
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3512
- 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[]>;
3513
3518
  }
3514
3519
  /**
3515
3520
  * An email message that can be sent from a Worker.
@@ -3624,7 +3629,7 @@ declare interface Hyperdrive {
3624
3629
  }
3625
3630
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3626
3631
  declare type EventContext<Env, P extends string, Data> = {
3627
- request: Request;
3632
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3628
3633
  functionPath: string;
3629
3634
  waitUntil: (promise: Promise<any>) => void;
3630
3635
  passThroughOnException: () => void;
@@ -3643,7 +3648,7 @@ declare type PagesFunction<
3643
3648
  Data extends Record<string, unknown> = Record<string, unknown>
3644
3649
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3645
3650
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3646
- request: Request;
3651
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3647
3652
  functionPath: string;
3648
3653
  waitUntil: (promise: Promise<any>) => void;
3649
3654
  passThroughOnException: () => void;
package/index.ts CHANGED
@@ -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
  }
@@ -3514,7 +3516,10 @@ export declare abstract class D1PreparedStatement {
3514
3516
  first<T = Record<string, unknown>>(): Promise<T | null>;
3515
3517
  run(): Promise<D1Response>;
3516
3518
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3517
- 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[]>;
3518
3523
  }
3519
3524
  /**
3520
3525
  * An email message that can be sent from a Worker.
@@ -3622,7 +3627,7 @@ export interface Hyperdrive {
3622
3627
  }
3623
3628
  export type Params<P extends string = any> = Record<P, string | string[]>;
3624
3629
  export type EventContext<Env, P extends string, Data> = {
3625
- request: Request;
3630
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3626
3631
  functionPath: string;
3627
3632
  waitUntil: (promise: Promise<any>) => void;
3628
3633
  passThroughOnException: () => void;
@@ -3641,7 +3646,7 @@ export type PagesFunction<
3641
3646
  Data extends Record<string, unknown> = Record<string, unknown>
3642
3647
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3643
3648
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3644
- request: Request;
3649
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3645
3650
  functionPath: string;
3646
3651
  waitUntil: (promise: Promise<any>) => void;
3647
3652
  passThroughOnException: () => void;
package/oldest/index.d.ts CHANGED
@@ -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
  }
@@ -3509,7 +3511,10 @@ declare abstract class D1PreparedStatement {
3509
3511
  first<T = Record<string, unknown>>(): Promise<T | null>;
3510
3512
  run(): Promise<D1Response>;
3511
3513
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3512
- 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[]>;
3513
3518
  }
3514
3519
  /**
3515
3520
  * An email message that can be sent from a Worker.
@@ -3624,7 +3629,7 @@ declare interface Hyperdrive {
3624
3629
  }
3625
3630
  declare type Params<P extends string = any> = Record<P, string | string[]>;
3626
3631
  declare type EventContext<Env, P extends string, Data> = {
3627
- request: Request;
3632
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3628
3633
  functionPath: string;
3629
3634
  waitUntil: (promise: Promise<any>) => void;
3630
3635
  passThroughOnException: () => void;
@@ -3643,7 +3648,7 @@ declare type PagesFunction<
3643
3648
  Data extends Record<string, unknown> = Record<string, unknown>
3644
3649
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3645
3650
  declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3646
- request: Request;
3651
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3647
3652
  functionPath: string;
3648
3653
  waitUntil: (promise: Promise<any>) => void;
3649
3654
  passThroughOnException: () => void;
package/oldest/index.ts CHANGED
@@ -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
  }
@@ -3514,7 +3516,10 @@ export declare abstract class D1PreparedStatement {
3514
3516
  first<T = Record<string, unknown>>(): Promise<T | null>;
3515
3517
  run(): Promise<D1Response>;
3516
3518
  all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
3517
- 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[]>;
3518
3523
  }
3519
3524
  /**
3520
3525
  * An email message that can be sent from a Worker.
@@ -3622,7 +3627,7 @@ export interface Hyperdrive {
3622
3627
  }
3623
3628
  export type Params<P extends string = any> = Record<P, string | string[]>;
3624
3629
  export type EventContext<Env, P extends string, Data> = {
3625
- request: Request;
3630
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3626
3631
  functionPath: string;
3627
3632
  waitUntil: (promise: Promise<any>) => void;
3628
3633
  passThroughOnException: () => void;
@@ -3641,7 +3646,7 @@ export type PagesFunction<
3641
3646
  Data extends Record<string, unknown> = Record<string, unknown>
3642
3647
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
3643
3648
  export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
3644
- request: Request;
3649
+ request: Request<unknown, IncomingRequestCfProperties<unknown>>;
3645
3650
  functionPath: string;
3646
3651
  waitUntil: (promise: Promise<any>) => void;
3647
3652
  passThroughOnException: () => void;
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20240208.0"
10
+ "version": "4.20240222.0"
11
11
  }