@cloudflare/workers-types 0.20230512.0 → 0.20230518.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.
@@ -3026,12 +3026,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3026
3026
  // Key Identifier of the JWK
3027
3027
  readonly kid: string;
3028
3028
  }
3029
+ declare module "cloudflare:sockets" {
3030
+ function _connect(
3031
+ address: string | SocketAddress,
3032
+ options?: SocketOptions
3033
+ ): Socket;
3034
+ export { _connect as connect };
3035
+ }
3029
3036
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3037
+ declare interface DynamicDispatchLimits {
3038
+ /**
3039
+ * Limit CPU time in milliseconds.
3040
+ */
3041
+ cpuMs?: number;
3042
+ /**
3043
+ * Limit number of subrequests.
3044
+ */
3045
+ subRequests?: number;
3046
+ }
3047
+ declare interface DynamicDispatchOptions {
3048
+ /**
3049
+ * Limit resources of invoked Worker script.
3050
+ */
3051
+ limits?: DynamicDispatchLimits;
3052
+ /**
3053
+ * Arguments for outbound Worker script, if configured.
3054
+ */
3055
+ outbound?: {
3056
+ [key: string]: any;
3057
+ };
3058
+ }
3030
3059
  declare interface DispatchNamespace {
3031
3060
  /**
3032
3061
  * @param name Name of the Worker script.
3062
+ * @param args Arguments to Worker script.
3063
+ * @param options Options for Dynamic Dispatch invocation.
3033
3064
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3034
3065
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3035
3066
  */
3036
- get(name: string): Fetcher;
3067
+ get(
3068
+ name: string,
3069
+ args?: {
3070
+ [key: string]: any;
3071
+ },
3072
+ options?: DynamicDispatchOptions
3073
+ ): Fetcher;
3037
3074
  }
@@ -3022,11 +3022,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3022
3022
  readonly kid: string;
3023
3023
  }
3024
3024
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3025
+ export interface DynamicDispatchLimits {
3026
+ /**
3027
+ * Limit CPU time in milliseconds.
3028
+ */
3029
+ cpuMs?: number;
3030
+ /**
3031
+ * Limit number of subrequests.
3032
+ */
3033
+ subRequests?: number;
3034
+ }
3035
+ export interface DynamicDispatchOptions {
3036
+ /**
3037
+ * Limit resources of invoked Worker script.
3038
+ */
3039
+ limits?: DynamicDispatchLimits;
3040
+ /**
3041
+ * Arguments for outbound Worker script, if configured.
3042
+ */
3043
+ outbound?: {
3044
+ [key: string]: any;
3045
+ };
3046
+ }
3025
3047
  export interface DispatchNamespace {
3026
3048
  /**
3027
3049
  * @param name Name of the Worker script.
3050
+ * @param args Arguments to Worker script.
3051
+ * @param options Options for Dynamic Dispatch invocation.
3028
3052
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3029
3053
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3030
3054
  */
3031
- get(name: string): Fetcher;
3055
+ get(
3056
+ name: string,
3057
+ args?: {
3058
+ [key: string]: any;
3059
+ },
3060
+ options?: DynamicDispatchOptions
3061
+ ): Fetcher;
3032
3062
  }
@@ -3012,12 +3012,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3012
3012
  // Key Identifier of the JWK
3013
3013
  readonly kid: string;
3014
3014
  }
3015
+ declare module "cloudflare:sockets" {
3016
+ function _connect(
3017
+ address: string | SocketAddress,
3018
+ options?: SocketOptions
3019
+ ): Socket;
3020
+ export { _connect as connect };
3021
+ }
3015
3022
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3023
+ declare interface DynamicDispatchLimits {
3024
+ /**
3025
+ * Limit CPU time in milliseconds.
3026
+ */
3027
+ cpuMs?: number;
3028
+ /**
3029
+ * Limit number of subrequests.
3030
+ */
3031
+ subRequests?: number;
3032
+ }
3033
+ declare interface DynamicDispatchOptions {
3034
+ /**
3035
+ * Limit resources of invoked Worker script.
3036
+ */
3037
+ limits?: DynamicDispatchLimits;
3038
+ /**
3039
+ * Arguments for outbound Worker script, if configured.
3040
+ */
3041
+ outbound?: {
3042
+ [key: string]: any;
3043
+ };
3044
+ }
3016
3045
  declare interface DispatchNamespace {
3017
3046
  /**
3018
3047
  * @param name Name of the Worker script.
3048
+ * @param args Arguments to Worker script.
3049
+ * @param options Options for Dynamic Dispatch invocation.
3019
3050
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3020
3051
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3021
3052
  */
3022
- get(name: string): Fetcher;
3053
+ get(
3054
+ name: string,
3055
+ args?: {
3056
+ [key: string]: any;
3057
+ },
3058
+ options?: DynamicDispatchOptions
3059
+ ): Fetcher;
3023
3060
  }
@@ -3008,11 +3008,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3008
3008
  readonly kid: string;
3009
3009
  }
3010
3010
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3011
+ export interface DynamicDispatchLimits {
3012
+ /**
3013
+ * Limit CPU time in milliseconds.
3014
+ */
3015
+ cpuMs?: number;
3016
+ /**
3017
+ * Limit number of subrequests.
3018
+ */
3019
+ subRequests?: number;
3020
+ }
3021
+ export interface DynamicDispatchOptions {
3022
+ /**
3023
+ * Limit resources of invoked Worker script.
3024
+ */
3025
+ limits?: DynamicDispatchLimits;
3026
+ /**
3027
+ * Arguments for outbound Worker script, if configured.
3028
+ */
3029
+ outbound?: {
3030
+ [key: string]: any;
3031
+ };
3032
+ }
3011
3033
  export interface DispatchNamespace {
3012
3034
  /**
3013
3035
  * @param name Name of the Worker script.
3036
+ * @param args Arguments to Worker script.
3037
+ * @param options Options for Dynamic Dispatch invocation.
3014
3038
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3015
3039
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3016
3040
  */
3017
- get(name: string): Fetcher;
3041
+ get(
3042
+ name: string,
3043
+ args?: {
3044
+ [key: string]: any;
3045
+ },
3046
+ options?: DynamicDispatchOptions
3047
+ ): Fetcher;
3018
3048
  }
@@ -3018,12 +3018,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3018
3018
  // Key Identifier of the JWK
3019
3019
  readonly kid: string;
3020
3020
  }
3021
+ declare module "cloudflare:sockets" {
3022
+ function _connect(
3023
+ address: string | SocketAddress,
3024
+ options?: SocketOptions
3025
+ ): Socket;
3026
+ export { _connect as connect };
3027
+ }
3021
3028
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3029
+ declare interface DynamicDispatchLimits {
3030
+ /**
3031
+ * Limit CPU time in milliseconds.
3032
+ */
3033
+ cpuMs?: number;
3034
+ /**
3035
+ * Limit number of subrequests.
3036
+ */
3037
+ subRequests?: number;
3038
+ }
3039
+ declare interface DynamicDispatchOptions {
3040
+ /**
3041
+ * Limit resources of invoked Worker script.
3042
+ */
3043
+ limits?: DynamicDispatchLimits;
3044
+ /**
3045
+ * Arguments for outbound Worker script, if configured.
3046
+ */
3047
+ outbound?: {
3048
+ [key: string]: any;
3049
+ };
3050
+ }
3022
3051
  declare interface DispatchNamespace {
3023
3052
  /**
3024
3053
  * @param name Name of the Worker script.
3054
+ * @param args Arguments to Worker script.
3055
+ * @param options Options for Dynamic Dispatch invocation.
3025
3056
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3026
3057
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3027
3058
  */
3028
- get(name: string): Fetcher;
3059
+ get(
3060
+ name: string,
3061
+ args?: {
3062
+ [key: string]: any;
3063
+ },
3064
+ options?: DynamicDispatchOptions
3065
+ ): Fetcher;
3029
3066
  }
@@ -3014,11 +3014,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3014
3014
  readonly kid: string;
3015
3015
  }
3016
3016
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3017
+ export interface DynamicDispatchLimits {
3018
+ /**
3019
+ * Limit CPU time in milliseconds.
3020
+ */
3021
+ cpuMs?: number;
3022
+ /**
3023
+ * Limit number of subrequests.
3024
+ */
3025
+ subRequests?: number;
3026
+ }
3027
+ export interface DynamicDispatchOptions {
3028
+ /**
3029
+ * Limit resources of invoked Worker script.
3030
+ */
3031
+ limits?: DynamicDispatchLimits;
3032
+ /**
3033
+ * Arguments for outbound Worker script, if configured.
3034
+ */
3035
+ outbound?: {
3036
+ [key: string]: any;
3037
+ };
3038
+ }
3017
3039
  export interface DispatchNamespace {
3018
3040
  /**
3019
3041
  * @param name Name of the Worker script.
3042
+ * @param args Arguments to Worker script.
3043
+ * @param options Options for Dynamic Dispatch invocation.
3020
3044
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3021
3045
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3022
3046
  */
3023
- get(name: string): Fetcher;
3047
+ get(
3048
+ name: string,
3049
+ args?: {
3050
+ [key: string]: any;
3051
+ },
3052
+ options?: DynamicDispatchOptions
3053
+ ): Fetcher;
3024
3054
  }
@@ -3019,12 +3019,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3019
3019
  // Key Identifier of the JWK
3020
3020
  readonly kid: string;
3021
3021
  }
3022
+ declare module "cloudflare:sockets" {
3023
+ function _connect(
3024
+ address: string | SocketAddress,
3025
+ options?: SocketOptions
3026
+ ): Socket;
3027
+ export { _connect as connect };
3028
+ }
3022
3029
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3030
+ declare interface DynamicDispatchLimits {
3031
+ /**
3032
+ * Limit CPU time in milliseconds.
3033
+ */
3034
+ cpuMs?: number;
3035
+ /**
3036
+ * Limit number of subrequests.
3037
+ */
3038
+ subRequests?: number;
3039
+ }
3040
+ declare interface DynamicDispatchOptions {
3041
+ /**
3042
+ * Limit resources of invoked Worker script.
3043
+ */
3044
+ limits?: DynamicDispatchLimits;
3045
+ /**
3046
+ * Arguments for outbound Worker script, if configured.
3047
+ */
3048
+ outbound?: {
3049
+ [key: string]: any;
3050
+ };
3051
+ }
3023
3052
  declare interface DispatchNamespace {
3024
3053
  /**
3025
3054
  * @param name Name of the Worker script.
3055
+ * @param args Arguments to Worker script.
3056
+ * @param options Options for Dynamic Dispatch invocation.
3026
3057
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3027
3058
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3028
3059
  */
3029
- get(name: string): Fetcher;
3060
+ get(
3061
+ name: string,
3062
+ args?: {
3063
+ [key: string]: any;
3064
+ },
3065
+ options?: DynamicDispatchOptions
3066
+ ): Fetcher;
3030
3067
  }
@@ -3015,11 +3015,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3015
3015
  readonly kid: string;
3016
3016
  }
3017
3017
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3018
+ export interface DynamicDispatchLimits {
3019
+ /**
3020
+ * Limit CPU time in milliseconds.
3021
+ */
3022
+ cpuMs?: number;
3023
+ /**
3024
+ * Limit number of subrequests.
3025
+ */
3026
+ subRequests?: number;
3027
+ }
3028
+ export interface DynamicDispatchOptions {
3029
+ /**
3030
+ * Limit resources of invoked Worker script.
3031
+ */
3032
+ limits?: DynamicDispatchLimits;
3033
+ /**
3034
+ * Arguments for outbound Worker script, if configured.
3035
+ */
3036
+ outbound?: {
3037
+ [key: string]: any;
3038
+ };
3039
+ }
3018
3040
  export interface DispatchNamespace {
3019
3041
  /**
3020
3042
  * @param name Name of the Worker script.
3043
+ * @param args Arguments to Worker script.
3044
+ * @param options Options for Dynamic Dispatch invocation.
3021
3045
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3022
3046
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3023
3047
  */
3024
- get(name: string): Fetcher;
3048
+ get(
3049
+ name: string,
3050
+ args?: {
3051
+ [key: string]: any;
3052
+ },
3053
+ options?: DynamicDispatchOptions
3054
+ ): Fetcher;
3025
3055
  }
@@ -3016,12 +3016,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3016
3016
  // Key Identifier of the JWK
3017
3017
  readonly kid: string;
3018
3018
  }
3019
+ declare module "cloudflare:sockets" {
3020
+ function _connect(
3021
+ address: string | SocketAddress,
3022
+ options?: SocketOptions
3023
+ ): Socket;
3024
+ export { _connect as connect };
3025
+ }
3019
3026
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3027
+ declare interface DynamicDispatchLimits {
3028
+ /**
3029
+ * Limit CPU time in milliseconds.
3030
+ */
3031
+ cpuMs?: number;
3032
+ /**
3033
+ * Limit number of subrequests.
3034
+ */
3035
+ subRequests?: number;
3036
+ }
3037
+ declare interface DynamicDispatchOptions {
3038
+ /**
3039
+ * Limit resources of invoked Worker script.
3040
+ */
3041
+ limits?: DynamicDispatchLimits;
3042
+ /**
3043
+ * Arguments for outbound Worker script, if configured.
3044
+ */
3045
+ outbound?: {
3046
+ [key: string]: any;
3047
+ };
3048
+ }
3020
3049
  declare interface DispatchNamespace {
3021
3050
  /**
3022
3051
  * @param name Name of the Worker script.
3052
+ * @param args Arguments to Worker script.
3053
+ * @param options Options for Dynamic Dispatch invocation.
3023
3054
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3024
3055
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3025
3056
  */
3026
- get(name: string): Fetcher;
3057
+ get(
3058
+ name: string,
3059
+ args?: {
3060
+ [key: string]: any;
3061
+ },
3062
+ options?: DynamicDispatchOptions
3063
+ ): Fetcher;
3027
3064
  }
@@ -3012,11 +3012,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3012
3012
  readonly kid: string;
3013
3013
  }
3014
3014
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3015
+ export interface DynamicDispatchLimits {
3016
+ /**
3017
+ * Limit CPU time in milliseconds.
3018
+ */
3019
+ cpuMs?: number;
3020
+ /**
3021
+ * Limit number of subrequests.
3022
+ */
3023
+ subRequests?: number;
3024
+ }
3025
+ export interface DynamicDispatchOptions {
3026
+ /**
3027
+ * Limit resources of invoked Worker script.
3028
+ */
3029
+ limits?: DynamicDispatchLimits;
3030
+ /**
3031
+ * Arguments for outbound Worker script, if configured.
3032
+ */
3033
+ outbound?: {
3034
+ [key: string]: any;
3035
+ };
3036
+ }
3015
3037
  export interface DispatchNamespace {
3016
3038
  /**
3017
3039
  * @param name Name of the Worker script.
3040
+ * @param args Arguments to Worker script.
3041
+ * @param options Options for Dynamic Dispatch invocation.
3018
3042
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3019
3043
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3020
3044
  */
3021
- get(name: string): Fetcher;
3045
+ get(
3046
+ name: string,
3047
+ args?: {
3048
+ [key: string]: any;
3049
+ },
3050
+ options?: DynamicDispatchOptions
3051
+ ): Fetcher;
3022
3052
  }
@@ -3019,12 +3019,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3019
3019
  // Key Identifier of the JWK
3020
3020
  readonly kid: string;
3021
3021
  }
3022
+ declare module "cloudflare:sockets" {
3023
+ function _connect(
3024
+ address: string | SocketAddress,
3025
+ options?: SocketOptions
3026
+ ): Socket;
3027
+ export { _connect as connect };
3028
+ }
3022
3029
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3030
+ declare interface DynamicDispatchLimits {
3031
+ /**
3032
+ * Limit CPU time in milliseconds.
3033
+ */
3034
+ cpuMs?: number;
3035
+ /**
3036
+ * Limit number of subrequests.
3037
+ */
3038
+ subRequests?: number;
3039
+ }
3040
+ declare interface DynamicDispatchOptions {
3041
+ /**
3042
+ * Limit resources of invoked Worker script.
3043
+ */
3044
+ limits?: DynamicDispatchLimits;
3045
+ /**
3046
+ * Arguments for outbound Worker script, if configured.
3047
+ */
3048
+ outbound?: {
3049
+ [key: string]: any;
3050
+ };
3051
+ }
3023
3052
  declare interface DispatchNamespace {
3024
3053
  /**
3025
3054
  * @param name Name of the Worker script.
3055
+ * @param args Arguments to Worker script.
3056
+ * @param options Options for Dynamic Dispatch invocation.
3026
3057
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3027
3058
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3028
3059
  */
3029
- get(name: string): Fetcher;
3060
+ get(
3061
+ name: string,
3062
+ args?: {
3063
+ [key: string]: any;
3064
+ },
3065
+ options?: DynamicDispatchOptions
3066
+ ): Fetcher;
3030
3067
  }
@@ -3015,11 +3015,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3015
3015
  readonly kid: string;
3016
3016
  }
3017
3017
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3018
+ export interface DynamicDispatchLimits {
3019
+ /**
3020
+ * Limit CPU time in milliseconds.
3021
+ */
3022
+ cpuMs?: number;
3023
+ /**
3024
+ * Limit number of subrequests.
3025
+ */
3026
+ subRequests?: number;
3027
+ }
3028
+ export interface DynamicDispatchOptions {
3029
+ /**
3030
+ * Limit resources of invoked Worker script.
3031
+ */
3032
+ limits?: DynamicDispatchLimits;
3033
+ /**
3034
+ * Arguments for outbound Worker script, if configured.
3035
+ */
3036
+ outbound?: {
3037
+ [key: string]: any;
3038
+ };
3039
+ }
3018
3040
  export interface DispatchNamespace {
3019
3041
  /**
3020
3042
  * @param name Name of the Worker script.
3043
+ * @param args Arguments to Worker script.
3044
+ * @param options Options for Dynamic Dispatch invocation.
3021
3045
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3022
3046
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3023
3047
  */
3024
- get(name: string): Fetcher;
3048
+ get(
3049
+ name: string,
3050
+ args?: {
3051
+ [key: string]: any;
3052
+ },
3053
+ options?: DynamicDispatchOptions
3054
+ ): Fetcher;
3025
3055
  }
@@ -1894,8 +1894,6 @@ declare interface SqlStorage {
1894
1894
  exec(query: string, ...bindings: any[]): SqlStorageCursor;
1895
1895
  prepare(query: string): SqlStorageStatement;
1896
1896
  get databaseSize(): number;
1897
- get voluntarySizeLimit(): number;
1898
- set voluntarySizeLimit(value: number);
1899
1897
  Cursor: typeof SqlStorageCursor;
1900
1898
  Statement: typeof SqlStorageStatement;
1901
1899
  }
@@ -3058,12 +3056,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3058
3056
  // Key Identifier of the JWK
3059
3057
  readonly kid: string;
3060
3058
  }
3059
+ declare module "cloudflare:sockets" {
3060
+ function _connect(
3061
+ address: string | SocketAddress,
3062
+ options?: SocketOptions
3063
+ ): Socket;
3064
+ export { _connect as connect };
3065
+ }
3061
3066
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3067
+ declare interface DynamicDispatchLimits {
3068
+ /**
3069
+ * Limit CPU time in milliseconds.
3070
+ */
3071
+ cpuMs?: number;
3072
+ /**
3073
+ * Limit number of subrequests.
3074
+ */
3075
+ subRequests?: number;
3076
+ }
3077
+ declare interface DynamicDispatchOptions {
3078
+ /**
3079
+ * Limit resources of invoked Worker script.
3080
+ */
3081
+ limits?: DynamicDispatchLimits;
3082
+ /**
3083
+ * Arguments for outbound Worker script, if configured.
3084
+ */
3085
+ outbound?: {
3086
+ [key: string]: any;
3087
+ };
3088
+ }
3062
3089
  declare interface DispatchNamespace {
3063
3090
  /**
3064
3091
  * @param name Name of the Worker script.
3092
+ * @param args Arguments to Worker script.
3093
+ * @param options Options for Dynamic Dispatch invocation.
3065
3094
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3066
3095
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3067
3096
  */
3068
- get(name: string): Fetcher;
3097
+ get(
3098
+ name: string,
3099
+ args?: {
3100
+ [key: string]: any;
3101
+ },
3102
+ options?: DynamicDispatchOptions
3103
+ ): Fetcher;
3069
3104
  }
@@ -1899,8 +1899,6 @@ export interface SqlStorage {
1899
1899
  exec(query: string, ...bindings: any[]): SqlStorageCursor;
1900
1900
  prepare(query: string): SqlStorageStatement;
1901
1901
  get databaseSize(): number;
1902
- get voluntarySizeLimit(): number;
1903
- set voluntarySizeLimit(value: number);
1904
1902
  Cursor: typeof SqlStorageCursor;
1905
1903
  Statement: typeof SqlStorageStatement;
1906
1904
  }
@@ -3054,11 +3052,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3054
3052
  readonly kid: string;
3055
3053
  }
3056
3054
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3055
+ export interface DynamicDispatchLimits {
3056
+ /**
3057
+ * Limit CPU time in milliseconds.
3058
+ */
3059
+ cpuMs?: number;
3060
+ /**
3061
+ * Limit number of subrequests.
3062
+ */
3063
+ subRequests?: number;
3064
+ }
3065
+ export interface DynamicDispatchOptions {
3066
+ /**
3067
+ * Limit resources of invoked Worker script.
3068
+ */
3069
+ limits?: DynamicDispatchLimits;
3070
+ /**
3071
+ * Arguments for outbound Worker script, if configured.
3072
+ */
3073
+ outbound?: {
3074
+ [key: string]: any;
3075
+ };
3076
+ }
3057
3077
  export interface DispatchNamespace {
3058
3078
  /**
3059
3079
  * @param name Name of the Worker script.
3080
+ * @param args Arguments to Worker script.
3081
+ * @param options Options for Dynamic Dispatch invocation.
3060
3082
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3061
3083
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3062
3084
  */
3063
- get(name: string): Fetcher;
3085
+ get(
3086
+ name: string,
3087
+ args?: {
3088
+ [key: string]: any;
3089
+ },
3090
+ options?: DynamicDispatchOptions
3091
+ ): Fetcher;
3064
3092
  }
package/index.d.ts CHANGED
@@ -3026,12 +3026,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3026
3026
  // Key Identifier of the JWK
3027
3027
  readonly kid: string;
3028
3028
  }
3029
+ declare module "cloudflare:sockets" {
3030
+ function _connect(
3031
+ address: string | SocketAddress,
3032
+ options?: SocketOptions
3033
+ ): Socket;
3034
+ export { _connect as connect };
3035
+ }
3029
3036
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3037
+ declare interface DynamicDispatchLimits {
3038
+ /**
3039
+ * Limit CPU time in milliseconds.
3040
+ */
3041
+ cpuMs?: number;
3042
+ /**
3043
+ * Limit number of subrequests.
3044
+ */
3045
+ subRequests?: number;
3046
+ }
3047
+ declare interface DynamicDispatchOptions {
3048
+ /**
3049
+ * Limit resources of invoked Worker script.
3050
+ */
3051
+ limits?: DynamicDispatchLimits;
3052
+ /**
3053
+ * Arguments for outbound Worker script, if configured.
3054
+ */
3055
+ outbound?: {
3056
+ [key: string]: any;
3057
+ };
3058
+ }
3030
3059
  declare interface DispatchNamespace {
3031
3060
  /**
3032
3061
  * @param name Name of the Worker script.
3062
+ * @param args Arguments to Worker script.
3063
+ * @param options Options for Dynamic Dispatch invocation.
3033
3064
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3034
3065
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3035
3066
  */
3036
- get(name: string): Fetcher;
3067
+ get(
3068
+ name: string,
3069
+ args?: {
3070
+ [key: string]: any;
3071
+ },
3072
+ options?: DynamicDispatchOptions
3073
+ ): Fetcher;
3037
3074
  }
package/index.ts CHANGED
@@ -3022,11 +3022,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3022
3022
  readonly kid: string;
3023
3023
  }
3024
3024
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3025
+ export interface DynamicDispatchLimits {
3026
+ /**
3027
+ * Limit CPU time in milliseconds.
3028
+ */
3029
+ cpuMs?: number;
3030
+ /**
3031
+ * Limit number of subrequests.
3032
+ */
3033
+ subRequests?: number;
3034
+ }
3035
+ export interface DynamicDispatchOptions {
3036
+ /**
3037
+ * Limit resources of invoked Worker script.
3038
+ */
3039
+ limits?: DynamicDispatchLimits;
3040
+ /**
3041
+ * Arguments for outbound Worker script, if configured.
3042
+ */
3043
+ outbound?: {
3044
+ [key: string]: any;
3045
+ };
3046
+ }
3025
3047
  export interface DispatchNamespace {
3026
3048
  /**
3027
3049
  * @param name Name of the Worker script.
3050
+ * @param args Arguments to Worker script.
3051
+ * @param options Options for Dynamic Dispatch invocation.
3028
3052
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3029
3053
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3030
3054
  */
3031
- get(name: string): Fetcher;
3055
+ get(
3056
+ name: string,
3057
+ args?: {
3058
+ [key: string]: any;
3059
+ },
3060
+ options?: DynamicDispatchOptions
3061
+ ): Fetcher;
3032
3062
  }
package/oldest/index.d.ts CHANGED
@@ -3026,12 +3026,49 @@ declare interface JsonWebKeyWithKid extends JsonWebKey {
3026
3026
  // Key Identifier of the JWK
3027
3027
  readonly kid: string;
3028
3028
  }
3029
+ declare module "cloudflare:sockets" {
3030
+ function _connect(
3031
+ address: string | SocketAddress,
3032
+ options?: SocketOptions
3033
+ ): Socket;
3034
+ export { _connect as connect };
3035
+ }
3029
3036
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3037
+ declare interface DynamicDispatchLimits {
3038
+ /**
3039
+ * Limit CPU time in milliseconds.
3040
+ */
3041
+ cpuMs?: number;
3042
+ /**
3043
+ * Limit number of subrequests.
3044
+ */
3045
+ subRequests?: number;
3046
+ }
3047
+ declare interface DynamicDispatchOptions {
3048
+ /**
3049
+ * Limit resources of invoked Worker script.
3050
+ */
3051
+ limits?: DynamicDispatchLimits;
3052
+ /**
3053
+ * Arguments for outbound Worker script, if configured.
3054
+ */
3055
+ outbound?: {
3056
+ [key: string]: any;
3057
+ };
3058
+ }
3030
3059
  declare interface DispatchNamespace {
3031
3060
  /**
3032
3061
  * @param name Name of the Worker script.
3062
+ * @param args Arguments to Worker script.
3063
+ * @param options Options for Dynamic Dispatch invocation.
3033
3064
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3034
3065
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3035
3066
  */
3036
- get(name: string): Fetcher;
3067
+ get(
3068
+ name: string,
3069
+ args?: {
3070
+ [key: string]: any;
3071
+ },
3072
+ options?: DynamicDispatchOptions
3073
+ ): Fetcher;
3037
3074
  }
package/oldest/index.ts CHANGED
@@ -3022,11 +3022,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
3022
3022
  readonly kid: string;
3023
3023
  }
3024
3024
  // https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/
3025
+ export interface DynamicDispatchLimits {
3026
+ /**
3027
+ * Limit CPU time in milliseconds.
3028
+ */
3029
+ cpuMs?: number;
3030
+ /**
3031
+ * Limit number of subrequests.
3032
+ */
3033
+ subRequests?: number;
3034
+ }
3035
+ export interface DynamicDispatchOptions {
3036
+ /**
3037
+ * Limit resources of invoked Worker script.
3038
+ */
3039
+ limits?: DynamicDispatchLimits;
3040
+ /**
3041
+ * Arguments for outbound Worker script, if configured.
3042
+ */
3043
+ outbound?: {
3044
+ [key: string]: any;
3045
+ };
3046
+ }
3025
3047
  export interface DispatchNamespace {
3026
3048
  /**
3027
3049
  * @param name Name of the Worker script.
3050
+ * @param args Arguments to Worker script.
3051
+ * @param options Options for Dynamic Dispatch invocation.
3028
3052
  * @returns A Fetcher object that allows you to send requests to the Worker script.
3029
3053
  * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown.
3030
3054
  */
3031
- get(name: string): Fetcher;
3055
+ get(
3056
+ name: string,
3057
+ args?: {
3058
+ [key: string]: any;
3059
+ },
3060
+ options?: DynamicDispatchOptions
3061
+ ): Fetcher;
3032
3062
  }
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": "0.20230512.0"
10
+ "version": "0.20230518.0"
11
11
  }