@cloudflare/workers-types 4.20230914.0 → 4.20230922.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.
- package/2021-11-03/index.d.ts +299 -9
- package/2021-11-03/index.ts +299 -9
- package/2022-01-31/index.d.ts +299 -9
- package/2022-01-31/index.ts +299 -9
- package/2022-03-21/index.d.ts +309 -9
- package/2022-03-21/index.ts +309 -9
- package/2022-08-04/index.d.ts +309 -9
- package/2022-08-04/index.ts +309 -9
- package/2022-10-31/index.d.ts +309 -9
- package/2022-10-31/index.ts +309 -9
- package/2022-11-30/index.d.ts +309 -9
- package/2022-11-30/index.ts +309 -9
- package/2023-03-01/index.d.ts +309 -9
- package/2023-03-01/index.ts +309 -9
- package/2023-07-01/index.d.ts +309 -9
- package/2023-07-01/index.ts +309 -9
- package/experimental/index.d.ts +309 -9
- package/experimental/index.ts +309 -9
- package/index.d.ts +299 -9
- package/index.ts +299 -9
- package/oldest/index.d.ts +299 -9
- package/oldest/index.ts +299 -9
- package/package.json +1 -1
package/2023-03-01/index.d.ts
CHANGED
|
@@ -238,6 +238,14 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
238
238
|
FixedLengthStream: typeof FixedLengthStream;
|
|
239
239
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
240
240
|
HTMLRewriter: typeof HTMLRewriter;
|
|
241
|
+
GPUAdapter: typeof gpuGPUAdapter;
|
|
242
|
+
GPUOutOfMemoryError: typeof gpuGPUOutOfMemoryError;
|
|
243
|
+
GPUValidationError: typeof gpuGPUValidationError;
|
|
244
|
+
GPUInternalError: typeof gpuGPUInternalError;
|
|
245
|
+
GPUDeviceLostInfo: typeof gpuGPUDeviceLostInfo;
|
|
246
|
+
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
247
|
+
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
248
|
+
GPUMapMode: typeof gpuGPUMapMode;
|
|
241
249
|
}
|
|
242
250
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
243
251
|
type: Type,
|
|
@@ -353,6 +361,7 @@ declare abstract class PromiseRejectionEvent extends Event {
|
|
|
353
361
|
}
|
|
354
362
|
declare abstract class Navigator {
|
|
355
363
|
readonly userAgent: string;
|
|
364
|
+
readonly gpu: gpuGPU;
|
|
356
365
|
}
|
|
357
366
|
/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
|
|
358
367
|
declare interface Performance {
|
|
@@ -1923,6 +1932,305 @@ declare interface SocketAddress {
|
|
|
1923
1932
|
declare interface TlsOptions {
|
|
1924
1933
|
expectedServerHostname?: string;
|
|
1925
1934
|
}
|
|
1935
|
+
declare interface gpuGPU {
|
|
1936
|
+
requestAdapter(
|
|
1937
|
+
param1?: gpuGPURequestAdapterOptions
|
|
1938
|
+
): Promise<gpuGPUAdapter | null>;
|
|
1939
|
+
}
|
|
1940
|
+
declare abstract class gpuGPUAdapter {
|
|
1941
|
+
requestDevice(param1?: gpuGPUDeviceDescriptor): Promise<gpuGPUDevice>;
|
|
1942
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<gpuGPUAdapterInfo>;
|
|
1943
|
+
get features(): gpuGPUSupportedFeatures;
|
|
1944
|
+
get limits(): gpuGPUSupportedLimits;
|
|
1945
|
+
}
|
|
1946
|
+
declare interface gpuGPUDevice extends EventTarget {
|
|
1947
|
+
createBuffer(param1: gpuGPUBufferDescriptor): gpuGPUBuffer;
|
|
1948
|
+
createBindGroupLayout(
|
|
1949
|
+
descriptor: gpuGPUBindGroupLayoutDescriptor
|
|
1950
|
+
): gpuGPUBindGroupLayout;
|
|
1951
|
+
createBindGroup(descriptor: gpuGPUBindGroupDescriptor): gpuGPUBindGroup;
|
|
1952
|
+
createSampler(descriptor: gpuGPUSamplerDescriptor): gpuGPUSampler;
|
|
1953
|
+
createShaderModule(
|
|
1954
|
+
descriptor: gpuGPUShaderModuleDescriptor
|
|
1955
|
+
): gpuGPUShaderModule;
|
|
1956
|
+
createPipelineLayout(
|
|
1957
|
+
descriptor: gpuGPUPipelineLayoutDescriptor
|
|
1958
|
+
): gpuGPUPipelineLayout;
|
|
1959
|
+
createComputePipeline(
|
|
1960
|
+
descriptor: gpuGPUComputePipelineDescriptor
|
|
1961
|
+
): gpuGPUComputePipeline;
|
|
1962
|
+
createCommandEncoder(
|
|
1963
|
+
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1964
|
+
): gpuGPUCommandEncoder;
|
|
1965
|
+
destroy(): void;
|
|
1966
|
+
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1967
|
+
pushErrorScope(filter: string): void;
|
|
1968
|
+
popErrorScope(): Promise<gpuGPUError | null>;
|
|
1969
|
+
get queue(): gpuGPUQueue;
|
|
1970
|
+
get lost(): Promise<gpuGPUDeviceLostInfo>;
|
|
1971
|
+
get features(): gpuGPUSupportedFeatures;
|
|
1972
|
+
get limits(): gpuGPUSupportedLimits;
|
|
1973
|
+
}
|
|
1974
|
+
declare interface gpuGPUDeviceDescriptor {
|
|
1975
|
+
label?: string;
|
|
1976
|
+
requiredFeatures?: string[];
|
|
1977
|
+
requiredLimits?: Record<string, number | bigint>;
|
|
1978
|
+
defaultQueue?: gpuGPUQueueDescriptor;
|
|
1979
|
+
}
|
|
1980
|
+
declare interface gpuGPUBufferDescriptor {
|
|
1981
|
+
label: string;
|
|
1982
|
+
size: number | bigint;
|
|
1983
|
+
usage: number;
|
|
1984
|
+
mappedAtCreation: boolean;
|
|
1985
|
+
}
|
|
1986
|
+
declare interface gpuGPUQueueDescriptor {
|
|
1987
|
+
label?: string;
|
|
1988
|
+
}
|
|
1989
|
+
declare abstract class gpuGPUBufferUsage {
|
|
1990
|
+
static readonly MAP_READ: number;
|
|
1991
|
+
static readonly MAP_WRITE: number;
|
|
1992
|
+
static readonly COPY_SRC: number;
|
|
1993
|
+
static readonly COPY_DST: number;
|
|
1994
|
+
static readonly INDEX: number;
|
|
1995
|
+
static readonly VERTEX: number;
|
|
1996
|
+
static readonly UNIFORM: number;
|
|
1997
|
+
static readonly STORAGE: number;
|
|
1998
|
+
static readonly INDIRECT: number;
|
|
1999
|
+
static readonly QUERY_RESOLVE: number;
|
|
2000
|
+
}
|
|
2001
|
+
declare interface gpuGPUBuffer {
|
|
2002
|
+
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2003
|
+
unmap(): void;
|
|
2004
|
+
destroy(): void;
|
|
2005
|
+
mapAsync(
|
|
2006
|
+
mode: number,
|
|
2007
|
+
offset?: number | bigint,
|
|
2008
|
+
size?: number | bigint
|
|
2009
|
+
): Promise<void>;
|
|
2010
|
+
get size(): number | bigint;
|
|
2011
|
+
get usage(): number;
|
|
2012
|
+
get mapState(): string;
|
|
2013
|
+
}
|
|
2014
|
+
declare abstract class gpuGPUShaderStage {
|
|
2015
|
+
static readonly VERTEX: number;
|
|
2016
|
+
static readonly FRAGMENT: number;
|
|
2017
|
+
static readonly COMPUTE: number;
|
|
2018
|
+
}
|
|
2019
|
+
declare interface gpuGPUBindGroupLayoutDescriptor {
|
|
2020
|
+
label?: string;
|
|
2021
|
+
entries: gpuGPUBindGroupLayoutEntry[];
|
|
2022
|
+
}
|
|
2023
|
+
declare interface gpuGPUBindGroupLayoutEntry {
|
|
2024
|
+
binding: number;
|
|
2025
|
+
visibility: number;
|
|
2026
|
+
buffer?: gpuGPUBufferBindingLayout;
|
|
2027
|
+
sampler?: gpuGPUSamplerBindingLayout;
|
|
2028
|
+
texture?: gpuGPUTextureBindingLayout;
|
|
2029
|
+
storageTexture?: gpuGPUStorageTextureBindingLayout;
|
|
2030
|
+
}
|
|
2031
|
+
declare interface gpuGPUStorageTextureBindingLayout {
|
|
2032
|
+
access?: string;
|
|
2033
|
+
format: string;
|
|
2034
|
+
viewDimension?: string;
|
|
2035
|
+
}
|
|
2036
|
+
declare interface gpuGPUTextureBindingLayout {
|
|
2037
|
+
sampleType?: string;
|
|
2038
|
+
viewDimension?: string;
|
|
2039
|
+
multisampled?: boolean;
|
|
2040
|
+
}
|
|
2041
|
+
declare interface gpuGPUSamplerBindingLayout {
|
|
2042
|
+
type?: string;
|
|
2043
|
+
}
|
|
2044
|
+
declare interface gpuGPUBufferBindingLayout {
|
|
2045
|
+
type?: string;
|
|
2046
|
+
hasDynamicOffset?: boolean;
|
|
2047
|
+
minBindingSize?: number | bigint;
|
|
2048
|
+
}
|
|
2049
|
+
declare interface gpuGPUBindGroupLayout {}
|
|
2050
|
+
declare interface gpuGPUBindGroup {}
|
|
2051
|
+
declare interface gpuGPUBindGroupDescriptor {
|
|
2052
|
+
label?: string;
|
|
2053
|
+
layout: gpuGPUBindGroupLayout;
|
|
2054
|
+
entries: gpuGPUBindGroupEntry[];
|
|
2055
|
+
}
|
|
2056
|
+
declare interface gpuGPUBindGroupEntry {
|
|
2057
|
+
binding: number;
|
|
2058
|
+
resource: gpuGPUBufferBinding | gpuGPUSampler;
|
|
2059
|
+
}
|
|
2060
|
+
declare interface gpuGPUBufferBinding {
|
|
2061
|
+
buffer: gpuGPUBuffer;
|
|
2062
|
+
offset?: number | bigint;
|
|
2063
|
+
size?: number | bigint;
|
|
2064
|
+
}
|
|
2065
|
+
declare interface gpuGPUSampler {}
|
|
2066
|
+
declare interface gpuGPUSamplerDescriptor {
|
|
2067
|
+
label?: string;
|
|
2068
|
+
addressModeU?: string;
|
|
2069
|
+
addressModeV?: string;
|
|
2070
|
+
addressModeW?: string;
|
|
2071
|
+
magFilter?: string;
|
|
2072
|
+
minFilter?: string;
|
|
2073
|
+
mipmapFilter?: string;
|
|
2074
|
+
lodMinClamp?: number;
|
|
2075
|
+
lodMaxClamp?: number;
|
|
2076
|
+
compare: string;
|
|
2077
|
+
maxAnisotropy?: number;
|
|
2078
|
+
}
|
|
2079
|
+
declare interface gpuGPUShaderModule {
|
|
2080
|
+
getCompilationInfo(): Promise<gpuGPUCompilationInfo>;
|
|
2081
|
+
}
|
|
2082
|
+
declare interface gpuGPUShaderModuleDescriptor {
|
|
2083
|
+
label?: string;
|
|
2084
|
+
code: string;
|
|
2085
|
+
}
|
|
2086
|
+
declare interface gpuGPUPipelineLayout {}
|
|
2087
|
+
declare interface gpuGPUPipelineLayoutDescriptor {
|
|
2088
|
+
label?: string;
|
|
2089
|
+
bindGroupLayouts: gpuGPUBindGroupLayout[];
|
|
2090
|
+
}
|
|
2091
|
+
declare interface gpuGPUComputePipeline {
|
|
2092
|
+
getBindGroupLayout(index: number): gpuGPUBindGroupLayout;
|
|
2093
|
+
}
|
|
2094
|
+
declare interface gpuGPUComputePipelineDescriptor {
|
|
2095
|
+
label?: string;
|
|
2096
|
+
compute: gpuGPUProgrammableStage;
|
|
2097
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2098
|
+
}
|
|
2099
|
+
declare interface gpuGPUProgrammableStage {
|
|
2100
|
+
module: gpuGPUShaderModule;
|
|
2101
|
+
entryPoint: string;
|
|
2102
|
+
constants?: Record<string, number>;
|
|
2103
|
+
}
|
|
2104
|
+
declare interface gpuGPUCommandEncoder {
|
|
2105
|
+
get label(): string;
|
|
2106
|
+
beginComputePass(
|
|
2107
|
+
descriptor?: gpuGPUComputePassDescriptor
|
|
2108
|
+
): gpuGPUComputePassEncoder;
|
|
2109
|
+
copyBufferToBuffer(
|
|
2110
|
+
source: gpuGPUBuffer,
|
|
2111
|
+
sourceOffset: number | bigint,
|
|
2112
|
+
destination: gpuGPUBuffer,
|
|
2113
|
+
destinationOffset: number | bigint,
|
|
2114
|
+
size: number | bigint
|
|
2115
|
+
): void;
|
|
2116
|
+
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2117
|
+
}
|
|
2118
|
+
declare interface gpuGPUCommandEncoderDescriptor {
|
|
2119
|
+
label?: string;
|
|
2120
|
+
}
|
|
2121
|
+
declare interface gpuGPUComputePassEncoder {
|
|
2122
|
+
setPipeline(pipeline: gpuGPUComputePipeline): void;
|
|
2123
|
+
setBindGroup(
|
|
2124
|
+
index: number,
|
|
2125
|
+
bindGroup: gpuGPUBindGroup | null,
|
|
2126
|
+
dynamicOffsets?: Iterable<number>
|
|
2127
|
+
): void;
|
|
2128
|
+
dispatchWorkgroups(
|
|
2129
|
+
workgroupCountX: number,
|
|
2130
|
+
workgroupCountY?: number,
|
|
2131
|
+
workgroupCountZ?: number
|
|
2132
|
+
): void;
|
|
2133
|
+
end(): void;
|
|
2134
|
+
}
|
|
2135
|
+
declare interface gpuGPUComputePassDescriptor {
|
|
2136
|
+
label?: string;
|
|
2137
|
+
timestampWrites?: gpuGPUComputePassTimestampWrite[];
|
|
2138
|
+
}
|
|
2139
|
+
declare interface gpuGPUQuerySet {}
|
|
2140
|
+
declare interface gpuGPUQuerySetDescriptor {
|
|
2141
|
+
label?: string;
|
|
2142
|
+
}
|
|
2143
|
+
declare interface gpuGPUComputePassTimestampWrite {
|
|
2144
|
+
querySet: gpuGPUQuerySet;
|
|
2145
|
+
queryIndex: number;
|
|
2146
|
+
location: string;
|
|
2147
|
+
}
|
|
2148
|
+
declare interface gpuGPUCommandBufferDescriptor {
|
|
2149
|
+
label?: string;
|
|
2150
|
+
}
|
|
2151
|
+
declare interface gpuGPUCommandBuffer {}
|
|
2152
|
+
declare interface gpuGPUQueue {
|
|
2153
|
+
submit(commandBuffers: gpuGPUCommandBuffer[]): void;
|
|
2154
|
+
writeBuffer(
|
|
2155
|
+
buffer: gpuGPUBuffer,
|
|
2156
|
+
bufferOffset: number | bigint,
|
|
2157
|
+
data: ArrayBuffer | ArrayBufferView,
|
|
2158
|
+
dataOffset?: number | bigint,
|
|
2159
|
+
size?: number | bigint
|
|
2160
|
+
): void;
|
|
2161
|
+
}
|
|
2162
|
+
declare abstract class gpuGPUMapMode {
|
|
2163
|
+
static readonly READ: number;
|
|
2164
|
+
static readonly WRITE: number;
|
|
2165
|
+
}
|
|
2166
|
+
declare interface gpuGPURequestAdapterOptions {
|
|
2167
|
+
powerPreference: string;
|
|
2168
|
+
forceFallbackAdapter?: boolean;
|
|
2169
|
+
}
|
|
2170
|
+
declare interface gpuGPUAdapterInfo {
|
|
2171
|
+
get vendor(): string;
|
|
2172
|
+
get architecture(): string;
|
|
2173
|
+
get device(): string;
|
|
2174
|
+
get description(): string;
|
|
2175
|
+
}
|
|
2176
|
+
declare interface gpuGPUSupportedFeatures {
|
|
2177
|
+
has(name: string): boolean;
|
|
2178
|
+
keys(): string[];
|
|
2179
|
+
}
|
|
2180
|
+
declare interface gpuGPUSupportedLimits {
|
|
2181
|
+
get maxTextureDimension1D(): number;
|
|
2182
|
+
get maxTextureDimension2D(): number;
|
|
2183
|
+
get maxTextureDimension3D(): number;
|
|
2184
|
+
get maxTextureArrayLayers(): number;
|
|
2185
|
+
get maxBindGroups(): number;
|
|
2186
|
+
get maxBindingsPerBindGroup(): number;
|
|
2187
|
+
get maxDynamicUniformBuffersPerPipelineLayout(): number;
|
|
2188
|
+
get maxDynamicStorageBuffersPerPipelineLayout(): number;
|
|
2189
|
+
get maxSampledTexturesPerShaderStage(): number;
|
|
2190
|
+
get maxSamplersPerShaderStage(): number;
|
|
2191
|
+
get maxStorageBuffersPerShaderStage(): number;
|
|
2192
|
+
get maxStorageTexturesPerShaderStage(): number;
|
|
2193
|
+
get maxUniformBuffersPerShaderStage(): number;
|
|
2194
|
+
get maxUniformBufferBindingSize(): number | bigint;
|
|
2195
|
+
get maxStorageBufferBindingSize(): number | bigint;
|
|
2196
|
+
get minUniformBufferOffsetAlignment(): number;
|
|
2197
|
+
get minStorageBufferOffsetAlignment(): number;
|
|
2198
|
+
get maxVertexBuffers(): number;
|
|
2199
|
+
get maxBufferSize(): number | bigint;
|
|
2200
|
+
get maxVertexAttributes(): number;
|
|
2201
|
+
get maxVertexBufferArrayStride(): number;
|
|
2202
|
+
get maxInterStageShaderComponents(): number;
|
|
2203
|
+
get maxInterStageShaderVariables(): number;
|
|
2204
|
+
get maxColorAttachments(): number;
|
|
2205
|
+
get maxColorAttachmentBytesPerSample(): number;
|
|
2206
|
+
get maxComputeWorkgroupStorageSize(): number;
|
|
2207
|
+
get maxComputeInvocationsPerWorkgroup(): number;
|
|
2208
|
+
get maxComputeWorkgroupSizeX(): number;
|
|
2209
|
+
get maxComputeWorkgroupSizeY(): number;
|
|
2210
|
+
get maxComputeWorkgroupSizeZ(): number;
|
|
2211
|
+
get maxComputeWorkgroupsPerDimension(): number;
|
|
2212
|
+
}
|
|
2213
|
+
declare abstract class gpuGPUError {
|
|
2214
|
+
get message(): string;
|
|
2215
|
+
}
|
|
2216
|
+
declare abstract class gpuGPUOutOfMemoryError extends gpuGPUError {}
|
|
2217
|
+
declare abstract class gpuGPUInternalError extends gpuGPUError {}
|
|
2218
|
+
declare abstract class gpuGPUValidationError extends gpuGPUError {}
|
|
2219
|
+
declare abstract class gpuGPUDeviceLostInfo {
|
|
2220
|
+
get message(): string;
|
|
2221
|
+
get reason(): string;
|
|
2222
|
+
}
|
|
2223
|
+
declare interface gpuGPUCompilationMessage {
|
|
2224
|
+
get message(): string;
|
|
2225
|
+
get type(): string;
|
|
2226
|
+
get lineNum(): number;
|
|
2227
|
+
get linePos(): number;
|
|
2228
|
+
get offset(): number;
|
|
2229
|
+
get length(): number;
|
|
2230
|
+
}
|
|
2231
|
+
declare interface gpuGPUCompilationInfo {
|
|
2232
|
+
get messages(): gpuGPUCompilationMessage[];
|
|
2233
|
+
}
|
|
1926
2234
|
declare interface BasicImageTransformations {
|
|
1927
2235
|
/**
|
|
1928
2236
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3133,14 +3441,6 @@ declare interface VectorizeError {
|
|
|
3133
3441
|
code?: number;
|
|
3134
3442
|
error: string;
|
|
3135
3443
|
}
|
|
3136
|
-
/**
|
|
3137
|
-
* A pre-configured list of known models.
|
|
3138
|
-
* These can be supplied in place of configuring explicit dimensions.
|
|
3139
|
-
*/
|
|
3140
|
-
declare type VectorizePreset =
|
|
3141
|
-
| "openapi-text-embedding-ada-002"
|
|
3142
|
-
| "workers-ai/bge-small-en"
|
|
3143
|
-
| "cohere/embed-multilingual-v2.0";
|
|
3144
3444
|
/**
|
|
3145
3445
|
* Supported distance metrics for an index.
|
|
3146
3446
|
* Distance metrics determine how other "similar" vectors are determined.
|
|
@@ -3160,7 +3460,7 @@ declare type VectorizeIndexConfig =
|
|
|
3160
3460
|
metric: VectorizeDistanceMetric;
|
|
3161
3461
|
}
|
|
3162
3462
|
| {
|
|
3163
|
-
preset:
|
|
3463
|
+
preset: string; // keep this generic, as we'll be adding more presets in the future and this is only in a read capacity
|
|
3164
3464
|
};
|
|
3165
3465
|
/**
|
|
3166
3466
|
* Metadata about an existing index.
|
package/2023-03-01/index.ts
CHANGED
|
@@ -238,6 +238,14 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
238
238
|
FixedLengthStream: typeof FixedLengthStream;
|
|
239
239
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
240
240
|
HTMLRewriter: typeof HTMLRewriter;
|
|
241
|
+
GPUAdapter: typeof gpuGPUAdapter;
|
|
242
|
+
GPUOutOfMemoryError: typeof gpuGPUOutOfMemoryError;
|
|
243
|
+
GPUValidationError: typeof gpuGPUValidationError;
|
|
244
|
+
GPUInternalError: typeof gpuGPUInternalError;
|
|
245
|
+
GPUDeviceLostInfo: typeof gpuGPUDeviceLostInfo;
|
|
246
|
+
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
247
|
+
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
248
|
+
GPUMapMode: typeof gpuGPUMapMode;
|
|
241
249
|
}
|
|
242
250
|
export declare function addEventListener<
|
|
243
251
|
Type extends keyof WorkerGlobalScopeEventMap
|
|
@@ -355,6 +363,7 @@ export declare abstract class PromiseRejectionEvent extends Event {
|
|
|
355
363
|
}
|
|
356
364
|
export declare abstract class Navigator {
|
|
357
365
|
readonly userAgent: string;
|
|
366
|
+
readonly gpu: gpuGPU;
|
|
358
367
|
}
|
|
359
368
|
/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
|
|
360
369
|
export interface Performance {
|
|
@@ -1928,6 +1937,305 @@ export interface SocketAddress {
|
|
|
1928
1937
|
export interface TlsOptions {
|
|
1929
1938
|
expectedServerHostname?: string;
|
|
1930
1939
|
}
|
|
1940
|
+
export interface gpuGPU {
|
|
1941
|
+
requestAdapter(
|
|
1942
|
+
param1?: gpuGPURequestAdapterOptions
|
|
1943
|
+
): Promise<gpuGPUAdapter | null>;
|
|
1944
|
+
}
|
|
1945
|
+
export declare abstract class gpuGPUAdapter {
|
|
1946
|
+
requestDevice(param1?: gpuGPUDeviceDescriptor): Promise<gpuGPUDevice>;
|
|
1947
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<gpuGPUAdapterInfo>;
|
|
1948
|
+
get features(): gpuGPUSupportedFeatures;
|
|
1949
|
+
get limits(): gpuGPUSupportedLimits;
|
|
1950
|
+
}
|
|
1951
|
+
export interface gpuGPUDevice extends EventTarget {
|
|
1952
|
+
createBuffer(param1: gpuGPUBufferDescriptor): gpuGPUBuffer;
|
|
1953
|
+
createBindGroupLayout(
|
|
1954
|
+
descriptor: gpuGPUBindGroupLayoutDescriptor
|
|
1955
|
+
): gpuGPUBindGroupLayout;
|
|
1956
|
+
createBindGroup(descriptor: gpuGPUBindGroupDescriptor): gpuGPUBindGroup;
|
|
1957
|
+
createSampler(descriptor: gpuGPUSamplerDescriptor): gpuGPUSampler;
|
|
1958
|
+
createShaderModule(
|
|
1959
|
+
descriptor: gpuGPUShaderModuleDescriptor
|
|
1960
|
+
): gpuGPUShaderModule;
|
|
1961
|
+
createPipelineLayout(
|
|
1962
|
+
descriptor: gpuGPUPipelineLayoutDescriptor
|
|
1963
|
+
): gpuGPUPipelineLayout;
|
|
1964
|
+
createComputePipeline(
|
|
1965
|
+
descriptor: gpuGPUComputePipelineDescriptor
|
|
1966
|
+
): gpuGPUComputePipeline;
|
|
1967
|
+
createCommandEncoder(
|
|
1968
|
+
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1969
|
+
): gpuGPUCommandEncoder;
|
|
1970
|
+
destroy(): void;
|
|
1971
|
+
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1972
|
+
pushErrorScope(filter: string): void;
|
|
1973
|
+
popErrorScope(): Promise<gpuGPUError | null>;
|
|
1974
|
+
get queue(): gpuGPUQueue;
|
|
1975
|
+
get lost(): Promise<gpuGPUDeviceLostInfo>;
|
|
1976
|
+
get features(): gpuGPUSupportedFeatures;
|
|
1977
|
+
get limits(): gpuGPUSupportedLimits;
|
|
1978
|
+
}
|
|
1979
|
+
export interface gpuGPUDeviceDescriptor {
|
|
1980
|
+
label?: string;
|
|
1981
|
+
requiredFeatures?: string[];
|
|
1982
|
+
requiredLimits?: Record<string, number | bigint>;
|
|
1983
|
+
defaultQueue?: gpuGPUQueueDescriptor;
|
|
1984
|
+
}
|
|
1985
|
+
export interface gpuGPUBufferDescriptor {
|
|
1986
|
+
label: string;
|
|
1987
|
+
size: number | bigint;
|
|
1988
|
+
usage: number;
|
|
1989
|
+
mappedAtCreation: boolean;
|
|
1990
|
+
}
|
|
1991
|
+
export interface gpuGPUQueueDescriptor {
|
|
1992
|
+
label?: string;
|
|
1993
|
+
}
|
|
1994
|
+
export declare abstract class gpuGPUBufferUsage {
|
|
1995
|
+
static readonly MAP_READ: number;
|
|
1996
|
+
static readonly MAP_WRITE: number;
|
|
1997
|
+
static readonly COPY_SRC: number;
|
|
1998
|
+
static readonly COPY_DST: number;
|
|
1999
|
+
static readonly INDEX: number;
|
|
2000
|
+
static readonly VERTEX: number;
|
|
2001
|
+
static readonly UNIFORM: number;
|
|
2002
|
+
static readonly STORAGE: number;
|
|
2003
|
+
static readonly INDIRECT: number;
|
|
2004
|
+
static readonly QUERY_RESOLVE: number;
|
|
2005
|
+
}
|
|
2006
|
+
export interface gpuGPUBuffer {
|
|
2007
|
+
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2008
|
+
unmap(): void;
|
|
2009
|
+
destroy(): void;
|
|
2010
|
+
mapAsync(
|
|
2011
|
+
mode: number,
|
|
2012
|
+
offset?: number | bigint,
|
|
2013
|
+
size?: number | bigint
|
|
2014
|
+
): Promise<void>;
|
|
2015
|
+
get size(): number | bigint;
|
|
2016
|
+
get usage(): number;
|
|
2017
|
+
get mapState(): string;
|
|
2018
|
+
}
|
|
2019
|
+
export declare abstract class gpuGPUShaderStage {
|
|
2020
|
+
static readonly VERTEX: number;
|
|
2021
|
+
static readonly FRAGMENT: number;
|
|
2022
|
+
static readonly COMPUTE: number;
|
|
2023
|
+
}
|
|
2024
|
+
export interface gpuGPUBindGroupLayoutDescriptor {
|
|
2025
|
+
label?: string;
|
|
2026
|
+
entries: gpuGPUBindGroupLayoutEntry[];
|
|
2027
|
+
}
|
|
2028
|
+
export interface gpuGPUBindGroupLayoutEntry {
|
|
2029
|
+
binding: number;
|
|
2030
|
+
visibility: number;
|
|
2031
|
+
buffer?: gpuGPUBufferBindingLayout;
|
|
2032
|
+
sampler?: gpuGPUSamplerBindingLayout;
|
|
2033
|
+
texture?: gpuGPUTextureBindingLayout;
|
|
2034
|
+
storageTexture?: gpuGPUStorageTextureBindingLayout;
|
|
2035
|
+
}
|
|
2036
|
+
export interface gpuGPUStorageTextureBindingLayout {
|
|
2037
|
+
access?: string;
|
|
2038
|
+
format: string;
|
|
2039
|
+
viewDimension?: string;
|
|
2040
|
+
}
|
|
2041
|
+
export interface gpuGPUTextureBindingLayout {
|
|
2042
|
+
sampleType?: string;
|
|
2043
|
+
viewDimension?: string;
|
|
2044
|
+
multisampled?: boolean;
|
|
2045
|
+
}
|
|
2046
|
+
export interface gpuGPUSamplerBindingLayout {
|
|
2047
|
+
type?: string;
|
|
2048
|
+
}
|
|
2049
|
+
export interface gpuGPUBufferBindingLayout {
|
|
2050
|
+
type?: string;
|
|
2051
|
+
hasDynamicOffset?: boolean;
|
|
2052
|
+
minBindingSize?: number | bigint;
|
|
2053
|
+
}
|
|
2054
|
+
export interface gpuGPUBindGroupLayout {}
|
|
2055
|
+
export interface gpuGPUBindGroup {}
|
|
2056
|
+
export interface gpuGPUBindGroupDescriptor {
|
|
2057
|
+
label?: string;
|
|
2058
|
+
layout: gpuGPUBindGroupLayout;
|
|
2059
|
+
entries: gpuGPUBindGroupEntry[];
|
|
2060
|
+
}
|
|
2061
|
+
export interface gpuGPUBindGroupEntry {
|
|
2062
|
+
binding: number;
|
|
2063
|
+
resource: gpuGPUBufferBinding | gpuGPUSampler;
|
|
2064
|
+
}
|
|
2065
|
+
export interface gpuGPUBufferBinding {
|
|
2066
|
+
buffer: gpuGPUBuffer;
|
|
2067
|
+
offset?: number | bigint;
|
|
2068
|
+
size?: number | bigint;
|
|
2069
|
+
}
|
|
2070
|
+
export interface gpuGPUSampler {}
|
|
2071
|
+
export interface gpuGPUSamplerDescriptor {
|
|
2072
|
+
label?: string;
|
|
2073
|
+
addressModeU?: string;
|
|
2074
|
+
addressModeV?: string;
|
|
2075
|
+
addressModeW?: string;
|
|
2076
|
+
magFilter?: string;
|
|
2077
|
+
minFilter?: string;
|
|
2078
|
+
mipmapFilter?: string;
|
|
2079
|
+
lodMinClamp?: number;
|
|
2080
|
+
lodMaxClamp?: number;
|
|
2081
|
+
compare: string;
|
|
2082
|
+
maxAnisotropy?: number;
|
|
2083
|
+
}
|
|
2084
|
+
export interface gpuGPUShaderModule {
|
|
2085
|
+
getCompilationInfo(): Promise<gpuGPUCompilationInfo>;
|
|
2086
|
+
}
|
|
2087
|
+
export interface gpuGPUShaderModuleDescriptor {
|
|
2088
|
+
label?: string;
|
|
2089
|
+
code: string;
|
|
2090
|
+
}
|
|
2091
|
+
export interface gpuGPUPipelineLayout {}
|
|
2092
|
+
export interface gpuGPUPipelineLayoutDescriptor {
|
|
2093
|
+
label?: string;
|
|
2094
|
+
bindGroupLayouts: gpuGPUBindGroupLayout[];
|
|
2095
|
+
}
|
|
2096
|
+
export interface gpuGPUComputePipeline {
|
|
2097
|
+
getBindGroupLayout(index: number): gpuGPUBindGroupLayout;
|
|
2098
|
+
}
|
|
2099
|
+
export interface gpuGPUComputePipelineDescriptor {
|
|
2100
|
+
label?: string;
|
|
2101
|
+
compute: gpuGPUProgrammableStage;
|
|
2102
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2103
|
+
}
|
|
2104
|
+
export interface gpuGPUProgrammableStage {
|
|
2105
|
+
module: gpuGPUShaderModule;
|
|
2106
|
+
entryPoint: string;
|
|
2107
|
+
constants?: Record<string, number>;
|
|
2108
|
+
}
|
|
2109
|
+
export interface gpuGPUCommandEncoder {
|
|
2110
|
+
get label(): string;
|
|
2111
|
+
beginComputePass(
|
|
2112
|
+
descriptor?: gpuGPUComputePassDescriptor
|
|
2113
|
+
): gpuGPUComputePassEncoder;
|
|
2114
|
+
copyBufferToBuffer(
|
|
2115
|
+
source: gpuGPUBuffer,
|
|
2116
|
+
sourceOffset: number | bigint,
|
|
2117
|
+
destination: gpuGPUBuffer,
|
|
2118
|
+
destinationOffset: number | bigint,
|
|
2119
|
+
size: number | bigint
|
|
2120
|
+
): void;
|
|
2121
|
+
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2122
|
+
}
|
|
2123
|
+
export interface gpuGPUCommandEncoderDescriptor {
|
|
2124
|
+
label?: string;
|
|
2125
|
+
}
|
|
2126
|
+
export interface gpuGPUComputePassEncoder {
|
|
2127
|
+
setPipeline(pipeline: gpuGPUComputePipeline): void;
|
|
2128
|
+
setBindGroup(
|
|
2129
|
+
index: number,
|
|
2130
|
+
bindGroup: gpuGPUBindGroup | null,
|
|
2131
|
+
dynamicOffsets?: Iterable<number>
|
|
2132
|
+
): void;
|
|
2133
|
+
dispatchWorkgroups(
|
|
2134
|
+
workgroupCountX: number,
|
|
2135
|
+
workgroupCountY?: number,
|
|
2136
|
+
workgroupCountZ?: number
|
|
2137
|
+
): void;
|
|
2138
|
+
end(): void;
|
|
2139
|
+
}
|
|
2140
|
+
export interface gpuGPUComputePassDescriptor {
|
|
2141
|
+
label?: string;
|
|
2142
|
+
timestampWrites?: gpuGPUComputePassTimestampWrite[];
|
|
2143
|
+
}
|
|
2144
|
+
export interface gpuGPUQuerySet {}
|
|
2145
|
+
export interface gpuGPUQuerySetDescriptor {
|
|
2146
|
+
label?: string;
|
|
2147
|
+
}
|
|
2148
|
+
export interface gpuGPUComputePassTimestampWrite {
|
|
2149
|
+
querySet: gpuGPUQuerySet;
|
|
2150
|
+
queryIndex: number;
|
|
2151
|
+
location: string;
|
|
2152
|
+
}
|
|
2153
|
+
export interface gpuGPUCommandBufferDescriptor {
|
|
2154
|
+
label?: string;
|
|
2155
|
+
}
|
|
2156
|
+
export interface gpuGPUCommandBuffer {}
|
|
2157
|
+
export interface gpuGPUQueue {
|
|
2158
|
+
submit(commandBuffers: gpuGPUCommandBuffer[]): void;
|
|
2159
|
+
writeBuffer(
|
|
2160
|
+
buffer: gpuGPUBuffer,
|
|
2161
|
+
bufferOffset: number | bigint,
|
|
2162
|
+
data: ArrayBuffer | ArrayBufferView,
|
|
2163
|
+
dataOffset?: number | bigint,
|
|
2164
|
+
size?: number | bigint
|
|
2165
|
+
): void;
|
|
2166
|
+
}
|
|
2167
|
+
export declare abstract class gpuGPUMapMode {
|
|
2168
|
+
static readonly READ: number;
|
|
2169
|
+
static readonly WRITE: number;
|
|
2170
|
+
}
|
|
2171
|
+
export interface gpuGPURequestAdapterOptions {
|
|
2172
|
+
powerPreference: string;
|
|
2173
|
+
forceFallbackAdapter?: boolean;
|
|
2174
|
+
}
|
|
2175
|
+
export interface gpuGPUAdapterInfo {
|
|
2176
|
+
get vendor(): string;
|
|
2177
|
+
get architecture(): string;
|
|
2178
|
+
get device(): string;
|
|
2179
|
+
get description(): string;
|
|
2180
|
+
}
|
|
2181
|
+
export interface gpuGPUSupportedFeatures {
|
|
2182
|
+
has(name: string): boolean;
|
|
2183
|
+
keys(): string[];
|
|
2184
|
+
}
|
|
2185
|
+
export interface gpuGPUSupportedLimits {
|
|
2186
|
+
get maxTextureDimension1D(): number;
|
|
2187
|
+
get maxTextureDimension2D(): number;
|
|
2188
|
+
get maxTextureDimension3D(): number;
|
|
2189
|
+
get maxTextureArrayLayers(): number;
|
|
2190
|
+
get maxBindGroups(): number;
|
|
2191
|
+
get maxBindingsPerBindGroup(): number;
|
|
2192
|
+
get maxDynamicUniformBuffersPerPipelineLayout(): number;
|
|
2193
|
+
get maxDynamicStorageBuffersPerPipelineLayout(): number;
|
|
2194
|
+
get maxSampledTexturesPerShaderStage(): number;
|
|
2195
|
+
get maxSamplersPerShaderStage(): number;
|
|
2196
|
+
get maxStorageBuffersPerShaderStage(): number;
|
|
2197
|
+
get maxStorageTexturesPerShaderStage(): number;
|
|
2198
|
+
get maxUniformBuffersPerShaderStage(): number;
|
|
2199
|
+
get maxUniformBufferBindingSize(): number | bigint;
|
|
2200
|
+
get maxStorageBufferBindingSize(): number | bigint;
|
|
2201
|
+
get minUniformBufferOffsetAlignment(): number;
|
|
2202
|
+
get minStorageBufferOffsetAlignment(): number;
|
|
2203
|
+
get maxVertexBuffers(): number;
|
|
2204
|
+
get maxBufferSize(): number | bigint;
|
|
2205
|
+
get maxVertexAttributes(): number;
|
|
2206
|
+
get maxVertexBufferArrayStride(): number;
|
|
2207
|
+
get maxInterStageShaderComponents(): number;
|
|
2208
|
+
get maxInterStageShaderVariables(): number;
|
|
2209
|
+
get maxColorAttachments(): number;
|
|
2210
|
+
get maxColorAttachmentBytesPerSample(): number;
|
|
2211
|
+
get maxComputeWorkgroupStorageSize(): number;
|
|
2212
|
+
get maxComputeInvocationsPerWorkgroup(): number;
|
|
2213
|
+
get maxComputeWorkgroupSizeX(): number;
|
|
2214
|
+
get maxComputeWorkgroupSizeY(): number;
|
|
2215
|
+
get maxComputeWorkgroupSizeZ(): number;
|
|
2216
|
+
get maxComputeWorkgroupsPerDimension(): number;
|
|
2217
|
+
}
|
|
2218
|
+
export declare abstract class gpuGPUError {
|
|
2219
|
+
get message(): string;
|
|
2220
|
+
}
|
|
2221
|
+
export declare abstract class gpuGPUOutOfMemoryError extends gpuGPUError {}
|
|
2222
|
+
export declare abstract class gpuGPUInternalError extends gpuGPUError {}
|
|
2223
|
+
export declare abstract class gpuGPUValidationError extends gpuGPUError {}
|
|
2224
|
+
export declare abstract class gpuGPUDeviceLostInfo {
|
|
2225
|
+
get message(): string;
|
|
2226
|
+
get reason(): string;
|
|
2227
|
+
}
|
|
2228
|
+
export interface gpuGPUCompilationMessage {
|
|
2229
|
+
get message(): string;
|
|
2230
|
+
get type(): string;
|
|
2231
|
+
get lineNum(): number;
|
|
2232
|
+
get linePos(): number;
|
|
2233
|
+
get offset(): number;
|
|
2234
|
+
get length(): number;
|
|
2235
|
+
}
|
|
2236
|
+
export interface gpuGPUCompilationInfo {
|
|
2237
|
+
get messages(): gpuGPUCompilationMessage[];
|
|
2238
|
+
}
|
|
1931
2239
|
export interface BasicImageTransformations {
|
|
1932
2240
|
/**
|
|
1933
2241
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3121,14 +3429,6 @@ export interface VectorizeError {
|
|
|
3121
3429
|
code?: number;
|
|
3122
3430
|
error: string;
|
|
3123
3431
|
}
|
|
3124
|
-
/**
|
|
3125
|
-
* A pre-configured list of known models.
|
|
3126
|
-
* These can be supplied in place of configuring explicit dimensions.
|
|
3127
|
-
*/
|
|
3128
|
-
export type VectorizePreset =
|
|
3129
|
-
| "openapi-text-embedding-ada-002"
|
|
3130
|
-
| "workers-ai/bge-small-en"
|
|
3131
|
-
| "cohere/embed-multilingual-v2.0";
|
|
3132
3432
|
/**
|
|
3133
3433
|
* Supported distance metrics for an index.
|
|
3134
3434
|
* Distance metrics determine how other "similar" vectors are determined.
|
|
@@ -3148,7 +3448,7 @@ export type VectorizeIndexConfig =
|
|
|
3148
3448
|
metric: VectorizeDistanceMetric;
|
|
3149
3449
|
}
|
|
3150
3450
|
| {
|
|
3151
|
-
preset:
|
|
3451
|
+
preset: string; // keep this generic, as we'll be adding more presets in the future and this is only in a read capacity
|
|
3152
3452
|
};
|
|
3153
3453
|
/**
|
|
3154
3454
|
* Metadata about an existing index.
|