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