@cloudflare/workers-types 4.20231016.0 → 4.20231121.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 +224 -11
- package/2021-11-03/index.ts +224 -11
- package/2022-01-31/index.d.ts +224 -11
- package/2022-01-31/index.ts +224 -11
- package/2022-03-21/index.d.ts +234 -11
- package/2022-03-21/index.ts +234 -11
- package/2022-08-04/index.d.ts +234 -11
- package/2022-08-04/index.ts +234 -11
- package/2022-10-31/index.d.ts +234 -11
- package/2022-10-31/index.ts +234 -11
- package/2022-11-30/index.d.ts +234 -11
- package/2022-11-30/index.ts +234 -11
- package/2023-03-01/index.d.ts +234 -11
- package/2023-03-01/index.ts +234 -11
- package/2023-07-01/index.d.ts +234 -11
- package/2023-07-01/index.ts +234 -11
- package/experimental/index.d.ts +234 -11
- package/experimental/index.ts +234 -11
- package/index.d.ts +224 -11
- package/index.ts +224 -11
- package/oldest/index.d.ts +224 -11
- package/oldest/index.ts +224 -11
- package/package.json +1 -1
package/2022-11-30/index.d.ts
CHANGED
|
@@ -247,6 +247,8 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
247
247
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
248
248
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
249
249
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
250
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
251
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
250
252
|
}
|
|
251
253
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
252
254
|
type: Type,
|
|
@@ -361,6 +363,16 @@ declare abstract class PromiseRejectionEvent extends Event {
|
|
|
361
363
|
readonly reason: any;
|
|
362
364
|
}
|
|
363
365
|
declare abstract class Navigator {
|
|
366
|
+
sendBeacon(
|
|
367
|
+
url: string,
|
|
368
|
+
body?:
|
|
369
|
+
| ReadableStream
|
|
370
|
+
| string
|
|
371
|
+
| (ArrayBuffer | ArrayBufferView)
|
|
372
|
+
| Blob
|
|
373
|
+
| URLSearchParams
|
|
374
|
+
| FormData
|
|
375
|
+
): boolean;
|
|
364
376
|
readonly userAgent: string;
|
|
365
377
|
readonly gpu: gpuGPU;
|
|
366
378
|
}
|
|
@@ -1976,9 +1988,13 @@ declare interface gpuGPUDevice extends EventTarget {
|
|
|
1976
1988
|
createComputePipeline(
|
|
1977
1989
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1978
1990
|
): gpuGPUComputePipeline;
|
|
1991
|
+
createRenderPipeline(
|
|
1992
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1993
|
+
): gpuGPURenderPipeline;
|
|
1979
1994
|
createCommandEncoder(
|
|
1980
1995
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1981
1996
|
): gpuGPUCommandEncoder;
|
|
1997
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1982
1998
|
destroy(): void;
|
|
1983
1999
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1984
2000
|
pushErrorScope(filter: string): void;
|
|
@@ -2123,6 +2139,9 @@ declare interface gpuGPUCommandEncoder {
|
|
|
2123
2139
|
beginComputePass(
|
|
2124
2140
|
descriptor?: gpuGPUComputePassDescriptor
|
|
2125
2141
|
): gpuGPUComputePassEncoder;
|
|
2142
|
+
beginRenderPass(
|
|
2143
|
+
descriptor: gpuGPURenderPassDescriptor
|
|
2144
|
+
): gpuGPURenderPassEncoder;
|
|
2126
2145
|
copyBufferToBuffer(
|
|
2127
2146
|
source: gpuGPUBuffer,
|
|
2128
2147
|
sourceOffset: number | bigint,
|
|
@@ -2131,6 +2150,11 @@ declare interface gpuGPUCommandEncoder {
|
|
|
2131
2150
|
size: number | bigint
|
|
2132
2151
|
): void;
|
|
2133
2152
|
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2153
|
+
copyTextureToBuffer(
|
|
2154
|
+
source: gpuGPUImageCopyTexture,
|
|
2155
|
+
destination: gpuGPUImageCopyBuffer,
|
|
2156
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2157
|
+
): void;
|
|
2134
2158
|
}
|
|
2135
2159
|
declare interface gpuGPUCommandEncoderDescriptor {
|
|
2136
2160
|
label?: string;
|
|
@@ -2248,6 +2272,198 @@ declare interface gpuGPUCompilationMessage {
|
|
|
2248
2272
|
declare interface gpuGPUCompilationInfo {
|
|
2249
2273
|
get messages(): gpuGPUCompilationMessage[];
|
|
2250
2274
|
}
|
|
2275
|
+
declare abstract class gpuGPUTextureUsage {
|
|
2276
|
+
static readonly COPY_SRC: number;
|
|
2277
|
+
static readonly COPY_DST: number;
|
|
2278
|
+
static readonly TEXTURE_BINDING: number;
|
|
2279
|
+
static readonly STORAGE_BINDING: number;
|
|
2280
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2281
|
+
}
|
|
2282
|
+
declare interface gpuGPUTextureDescriptor {
|
|
2283
|
+
label: string;
|
|
2284
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2285
|
+
mipLevelCount?: number;
|
|
2286
|
+
sampleCount?: number;
|
|
2287
|
+
dimension?: string;
|
|
2288
|
+
format: string;
|
|
2289
|
+
usage: number;
|
|
2290
|
+
viewFormats?: string[];
|
|
2291
|
+
}
|
|
2292
|
+
declare interface gpuGPUExtent3DDict {
|
|
2293
|
+
width: number;
|
|
2294
|
+
height?: number;
|
|
2295
|
+
depthOrArrayLayers?: number;
|
|
2296
|
+
}
|
|
2297
|
+
declare interface gpuGPUTexture {
|
|
2298
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2299
|
+
destroy(): void;
|
|
2300
|
+
get width(): number;
|
|
2301
|
+
get height(): number;
|
|
2302
|
+
get depthOrArrayLayers(): number;
|
|
2303
|
+
get mipLevelCount(): number;
|
|
2304
|
+
get dimension(): string;
|
|
2305
|
+
get format(): string;
|
|
2306
|
+
get usage(): number;
|
|
2307
|
+
}
|
|
2308
|
+
declare interface gpuGPUTextureView {}
|
|
2309
|
+
declare interface gpuGPUTextureViewDescriptor {
|
|
2310
|
+
label: string;
|
|
2311
|
+
format: string;
|
|
2312
|
+
dimension: string;
|
|
2313
|
+
aspect?: string;
|
|
2314
|
+
baseMipLevel?: number;
|
|
2315
|
+
mipLevelCount: number;
|
|
2316
|
+
baseArrayLayer?: number;
|
|
2317
|
+
arrayLayerCount: number;
|
|
2318
|
+
}
|
|
2319
|
+
declare abstract class gpuGPUColorWrite {
|
|
2320
|
+
static readonly RED: number;
|
|
2321
|
+
static readonly GREEN: number;
|
|
2322
|
+
static readonly BLUE: number;
|
|
2323
|
+
static readonly ALPHA: number;
|
|
2324
|
+
static readonly ALL: number;
|
|
2325
|
+
}
|
|
2326
|
+
declare interface gpuGPURenderPipeline {}
|
|
2327
|
+
declare interface gpuGPURenderPipelineDescriptor {
|
|
2328
|
+
label?: string;
|
|
2329
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2330
|
+
vertex: gpuGPUVertexState;
|
|
2331
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2332
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2333
|
+
multisample?: gpuGPUMultisampleState;
|
|
2334
|
+
fragment?: gpuGPUFragmentState;
|
|
2335
|
+
}
|
|
2336
|
+
declare interface gpuGPUVertexState {
|
|
2337
|
+
module: gpuGPUShaderModule;
|
|
2338
|
+
entryPoint: string;
|
|
2339
|
+
constants?: Record<string, number>;
|
|
2340
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2341
|
+
}
|
|
2342
|
+
declare interface gpuGPUVertexBufferLayout {
|
|
2343
|
+
arrayStride: number | bigint;
|
|
2344
|
+
stepMode?: string;
|
|
2345
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2346
|
+
}
|
|
2347
|
+
declare interface gpuGPUVertexAttribute {
|
|
2348
|
+
format: string;
|
|
2349
|
+
offset: number | bigint;
|
|
2350
|
+
shaderLocation: number;
|
|
2351
|
+
}
|
|
2352
|
+
declare interface gpuGPUPrimitiveState {
|
|
2353
|
+
topology?: string;
|
|
2354
|
+
stripIndexFormat?: string;
|
|
2355
|
+
frontFace?: string;
|
|
2356
|
+
cullMode?: string;
|
|
2357
|
+
unclippedDepth?: boolean;
|
|
2358
|
+
}
|
|
2359
|
+
declare interface gpuGPUStencilFaceState {
|
|
2360
|
+
compare?: string;
|
|
2361
|
+
failOp?: string;
|
|
2362
|
+
depthFailOp?: string;
|
|
2363
|
+
passOp?: string;
|
|
2364
|
+
}
|
|
2365
|
+
declare interface gpuGPUDepthStencilState {
|
|
2366
|
+
format: string;
|
|
2367
|
+
depthWriteEnabled: boolean;
|
|
2368
|
+
depthCompare: string;
|
|
2369
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2370
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2371
|
+
stencilReadMask?: number;
|
|
2372
|
+
stencilWriteMask?: number;
|
|
2373
|
+
depthBias?: number;
|
|
2374
|
+
depthBiasSlopeScale?: number;
|
|
2375
|
+
depthBiasClamp?: number;
|
|
2376
|
+
}
|
|
2377
|
+
declare interface gpuGPUMultisampleState {
|
|
2378
|
+
count?: number;
|
|
2379
|
+
mask?: number;
|
|
2380
|
+
alphaToCoverageEnabled?: boolean;
|
|
2381
|
+
}
|
|
2382
|
+
declare interface gpuGPUFragmentState {
|
|
2383
|
+
module: gpuGPUShaderModule;
|
|
2384
|
+
entryPoint: string;
|
|
2385
|
+
constants?: Record<string, number>;
|
|
2386
|
+
targets: gpuGPUColorTargetState[];
|
|
2387
|
+
}
|
|
2388
|
+
declare interface gpuGPUColorTargetState {
|
|
2389
|
+
format: string;
|
|
2390
|
+
blend: gpuGPUBlendState;
|
|
2391
|
+
writeMask?: number;
|
|
2392
|
+
}
|
|
2393
|
+
declare interface gpuGPUBlendState {
|
|
2394
|
+
color: gpuGPUBlendComponent;
|
|
2395
|
+
alpha: gpuGPUBlendComponent;
|
|
2396
|
+
}
|
|
2397
|
+
declare interface gpuGPUBlendComponent {
|
|
2398
|
+
operation?: string;
|
|
2399
|
+
srcFactor?: string;
|
|
2400
|
+
dstFactor?: string;
|
|
2401
|
+
}
|
|
2402
|
+
declare interface gpuGPURenderPassEncoder {
|
|
2403
|
+
setPipeline(pipeline: gpuGPURenderPipeline): void;
|
|
2404
|
+
draw(
|
|
2405
|
+
vertexCount: number,
|
|
2406
|
+
instanceCount?: number,
|
|
2407
|
+
firstVertex?: number,
|
|
2408
|
+
firstInstance?: number
|
|
2409
|
+
): void;
|
|
2410
|
+
end(): void;
|
|
2411
|
+
}
|
|
2412
|
+
declare interface gpuGPURenderPassDescriptor {
|
|
2413
|
+
label?: string;
|
|
2414
|
+
colorAttachments: gpuGPURenderPassColorAttachment[];
|
|
2415
|
+
depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
|
|
2416
|
+
occlusionQuerySet?: gpuGPUQuerySet;
|
|
2417
|
+
timestampWrites?: gpuGPURenderPassTimestampWrite[];
|
|
2418
|
+
maxDrawCount?: number | bigint;
|
|
2419
|
+
}
|
|
2420
|
+
declare interface gpuGPURenderPassColorAttachment {
|
|
2421
|
+
view: gpuGPUTextureView;
|
|
2422
|
+
depthSlice?: number;
|
|
2423
|
+
resolveTarget?: gpuGPUTextureView;
|
|
2424
|
+
clearValue?: number[] | gpuGPUColorDict;
|
|
2425
|
+
loadOp: string;
|
|
2426
|
+
storeOp: string;
|
|
2427
|
+
}
|
|
2428
|
+
declare interface gpuGPUColorDict {
|
|
2429
|
+
r: number;
|
|
2430
|
+
g: number;
|
|
2431
|
+
b: number;
|
|
2432
|
+
a: number;
|
|
2433
|
+
}
|
|
2434
|
+
declare interface gpuGPURenderPassDepthStencilAttachment {
|
|
2435
|
+
view: gpuGPUTextureView;
|
|
2436
|
+
depthClearValue?: number;
|
|
2437
|
+
depthLoadOp?: string;
|
|
2438
|
+
depthStoreOp?: string;
|
|
2439
|
+
depthReadOnly?: boolean;
|
|
2440
|
+
stencilClearValue?: number;
|
|
2441
|
+
stencilLoadOp?: string;
|
|
2442
|
+
stencilStoreOp?: string;
|
|
2443
|
+
stencilReadOnly?: boolean;
|
|
2444
|
+
}
|
|
2445
|
+
declare interface gpuGPURenderPassTimestampWrite {
|
|
2446
|
+
querySet: gpuGPUQuerySet;
|
|
2447
|
+
queryIndex: number;
|
|
2448
|
+
location: string;
|
|
2449
|
+
}
|
|
2450
|
+
declare interface gpuGPUImageCopyTexture {
|
|
2451
|
+
texture: gpuGPUTexture;
|
|
2452
|
+
mipLevel?: number;
|
|
2453
|
+
origin?: number[] | gpuGPUOrigin3DDict;
|
|
2454
|
+
aspect?: string;
|
|
2455
|
+
}
|
|
2456
|
+
declare interface gpuGPUImageCopyBuffer {
|
|
2457
|
+
buffer: gpuGPUBuffer;
|
|
2458
|
+
offset?: number | bigint;
|
|
2459
|
+
bytesPerRow?: number;
|
|
2460
|
+
rowsPerImage?: number;
|
|
2461
|
+
}
|
|
2462
|
+
declare interface gpuGPUOrigin3DDict {
|
|
2463
|
+
x?: number;
|
|
2464
|
+
y?: number;
|
|
2465
|
+
z?: number;
|
|
2466
|
+
}
|
|
2251
2467
|
declare interface BasicImageTransformations {
|
|
2252
2468
|
/**
|
|
2253
2469
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3219,10 +3435,19 @@ declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
|
3219
3435
|
declare type CfProperties<HostMetadata = unknown> =
|
|
3220
3436
|
| IncomingRequestCfProperties<HostMetadata>
|
|
3221
3437
|
| RequestInitCfProperties;
|
|
3438
|
+
declare interface D1Meta {
|
|
3439
|
+
duration: number;
|
|
3440
|
+
size_after: number;
|
|
3441
|
+
rows_read: number;
|
|
3442
|
+
rows_written: number;
|
|
3443
|
+
last_row_id: number;
|
|
3444
|
+
changed_db: boolean;
|
|
3445
|
+
changes: number;
|
|
3446
|
+
}
|
|
3222
3447
|
declare interface D1Result<T = unknown> {
|
|
3223
3448
|
results: T[];
|
|
3224
3449
|
success: true;
|
|
3225
|
-
meta:
|
|
3450
|
+
meta: D1Meta & Record<string, unknown>;
|
|
3226
3451
|
error?: never;
|
|
3227
3452
|
}
|
|
3228
3453
|
declare interface D1ExecResult {
|
|
@@ -3466,7 +3691,8 @@ declare type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
|
|
|
3466
3691
|
declare interface VectorizeQueryOptions {
|
|
3467
3692
|
topK?: number;
|
|
3468
3693
|
namespace?: string;
|
|
3469
|
-
|
|
3694
|
+
returnValues?: boolean;
|
|
3695
|
+
returnMetadata?: boolean;
|
|
3470
3696
|
}
|
|
3471
3697
|
/**
|
|
3472
3698
|
* Information about the configuration of an index.
|
|
@@ -3504,20 +3730,17 @@ declare interface VectorizeVector {
|
|
|
3504
3730
|
values: VectorFloatArray | number[];
|
|
3505
3731
|
/** The namespace this vector belongs to. */
|
|
3506
3732
|
namespace?: string;
|
|
3507
|
-
/** Metadata associated with the
|
|
3733
|
+
/** Metadata associated with the vector. Includes the values of the other fields and potentially additional details. */
|
|
3508
3734
|
metadata?: Record<string, VectorizeVectorMetadata>;
|
|
3509
3735
|
}
|
|
3510
3736
|
/**
|
|
3511
3737
|
* Represents a matched vector for a query along with its score and (if specified) the matching vector information.
|
|
3512
3738
|
*/
|
|
3513
|
-
declare
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
/** Vector data for the match. Included only if the user specified they want it returned (via {@link VectorizeQueryOptions}). */
|
|
3519
|
-
vector?: VectorizeVector;
|
|
3520
|
-
}
|
|
3739
|
+
declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
3740
|
+
Omit<VectorizeVector, "values"> & {
|
|
3741
|
+
/** The score or rank for similarity, when returned as a result */
|
|
3742
|
+
score: number;
|
|
3743
|
+
};
|
|
3521
3744
|
/**
|
|
3522
3745
|
* A set of vector {@link VectorizeMatch} for a particular query.
|
|
3523
3746
|
*/
|
package/2022-11-30/index.ts
CHANGED
|
@@ -247,6 +247,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
247
247
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
248
248
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
249
249
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
250
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
251
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
250
252
|
}
|
|
251
253
|
export declare function addEventListener<
|
|
252
254
|
Type extends keyof WorkerGlobalScopeEventMap
|
|
@@ -363,6 +365,16 @@ export declare abstract class PromiseRejectionEvent extends Event {
|
|
|
363
365
|
readonly reason: any;
|
|
364
366
|
}
|
|
365
367
|
export declare abstract class Navigator {
|
|
368
|
+
sendBeacon(
|
|
369
|
+
url: string,
|
|
370
|
+
body?:
|
|
371
|
+
| ReadableStream
|
|
372
|
+
| string
|
|
373
|
+
| (ArrayBuffer | ArrayBufferView)
|
|
374
|
+
| Blob
|
|
375
|
+
| URLSearchParams
|
|
376
|
+
| FormData
|
|
377
|
+
): boolean;
|
|
366
378
|
readonly userAgent: string;
|
|
367
379
|
readonly gpu: gpuGPU;
|
|
368
380
|
}
|
|
@@ -1981,9 +1993,13 @@ export interface gpuGPUDevice extends EventTarget {
|
|
|
1981
1993
|
createComputePipeline(
|
|
1982
1994
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1983
1995
|
): gpuGPUComputePipeline;
|
|
1996
|
+
createRenderPipeline(
|
|
1997
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1998
|
+
): gpuGPURenderPipeline;
|
|
1984
1999
|
createCommandEncoder(
|
|
1985
2000
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1986
2001
|
): gpuGPUCommandEncoder;
|
|
2002
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1987
2003
|
destroy(): void;
|
|
1988
2004
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1989
2005
|
pushErrorScope(filter: string): void;
|
|
@@ -2128,6 +2144,9 @@ export interface gpuGPUCommandEncoder {
|
|
|
2128
2144
|
beginComputePass(
|
|
2129
2145
|
descriptor?: gpuGPUComputePassDescriptor
|
|
2130
2146
|
): gpuGPUComputePassEncoder;
|
|
2147
|
+
beginRenderPass(
|
|
2148
|
+
descriptor: gpuGPURenderPassDescriptor
|
|
2149
|
+
): gpuGPURenderPassEncoder;
|
|
2131
2150
|
copyBufferToBuffer(
|
|
2132
2151
|
source: gpuGPUBuffer,
|
|
2133
2152
|
sourceOffset: number | bigint,
|
|
@@ -2136,6 +2155,11 @@ export interface gpuGPUCommandEncoder {
|
|
|
2136
2155
|
size: number | bigint
|
|
2137
2156
|
): void;
|
|
2138
2157
|
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2158
|
+
copyTextureToBuffer(
|
|
2159
|
+
source: gpuGPUImageCopyTexture,
|
|
2160
|
+
destination: gpuGPUImageCopyBuffer,
|
|
2161
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2162
|
+
): void;
|
|
2139
2163
|
}
|
|
2140
2164
|
export interface gpuGPUCommandEncoderDescriptor {
|
|
2141
2165
|
label?: string;
|
|
@@ -2253,6 +2277,198 @@ export interface gpuGPUCompilationMessage {
|
|
|
2253
2277
|
export interface gpuGPUCompilationInfo {
|
|
2254
2278
|
get messages(): gpuGPUCompilationMessage[];
|
|
2255
2279
|
}
|
|
2280
|
+
export declare abstract class gpuGPUTextureUsage {
|
|
2281
|
+
static readonly COPY_SRC: number;
|
|
2282
|
+
static readonly COPY_DST: number;
|
|
2283
|
+
static readonly TEXTURE_BINDING: number;
|
|
2284
|
+
static readonly STORAGE_BINDING: number;
|
|
2285
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2286
|
+
}
|
|
2287
|
+
export interface gpuGPUTextureDescriptor {
|
|
2288
|
+
label: string;
|
|
2289
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2290
|
+
mipLevelCount?: number;
|
|
2291
|
+
sampleCount?: number;
|
|
2292
|
+
dimension?: string;
|
|
2293
|
+
format: string;
|
|
2294
|
+
usage: number;
|
|
2295
|
+
viewFormats?: string[];
|
|
2296
|
+
}
|
|
2297
|
+
export interface gpuGPUExtent3DDict {
|
|
2298
|
+
width: number;
|
|
2299
|
+
height?: number;
|
|
2300
|
+
depthOrArrayLayers?: number;
|
|
2301
|
+
}
|
|
2302
|
+
export interface gpuGPUTexture {
|
|
2303
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2304
|
+
destroy(): void;
|
|
2305
|
+
get width(): number;
|
|
2306
|
+
get height(): number;
|
|
2307
|
+
get depthOrArrayLayers(): number;
|
|
2308
|
+
get mipLevelCount(): number;
|
|
2309
|
+
get dimension(): string;
|
|
2310
|
+
get format(): string;
|
|
2311
|
+
get usage(): number;
|
|
2312
|
+
}
|
|
2313
|
+
export interface gpuGPUTextureView {}
|
|
2314
|
+
export interface gpuGPUTextureViewDescriptor {
|
|
2315
|
+
label: string;
|
|
2316
|
+
format: string;
|
|
2317
|
+
dimension: string;
|
|
2318
|
+
aspect?: string;
|
|
2319
|
+
baseMipLevel?: number;
|
|
2320
|
+
mipLevelCount: number;
|
|
2321
|
+
baseArrayLayer?: number;
|
|
2322
|
+
arrayLayerCount: number;
|
|
2323
|
+
}
|
|
2324
|
+
export declare abstract class gpuGPUColorWrite {
|
|
2325
|
+
static readonly RED: number;
|
|
2326
|
+
static readonly GREEN: number;
|
|
2327
|
+
static readonly BLUE: number;
|
|
2328
|
+
static readonly ALPHA: number;
|
|
2329
|
+
static readonly ALL: number;
|
|
2330
|
+
}
|
|
2331
|
+
export interface gpuGPURenderPipeline {}
|
|
2332
|
+
export interface gpuGPURenderPipelineDescriptor {
|
|
2333
|
+
label?: string;
|
|
2334
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2335
|
+
vertex: gpuGPUVertexState;
|
|
2336
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2337
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2338
|
+
multisample?: gpuGPUMultisampleState;
|
|
2339
|
+
fragment?: gpuGPUFragmentState;
|
|
2340
|
+
}
|
|
2341
|
+
export interface gpuGPUVertexState {
|
|
2342
|
+
module: gpuGPUShaderModule;
|
|
2343
|
+
entryPoint: string;
|
|
2344
|
+
constants?: Record<string, number>;
|
|
2345
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2346
|
+
}
|
|
2347
|
+
export interface gpuGPUVertexBufferLayout {
|
|
2348
|
+
arrayStride: number | bigint;
|
|
2349
|
+
stepMode?: string;
|
|
2350
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2351
|
+
}
|
|
2352
|
+
export interface gpuGPUVertexAttribute {
|
|
2353
|
+
format: string;
|
|
2354
|
+
offset: number | bigint;
|
|
2355
|
+
shaderLocation: number;
|
|
2356
|
+
}
|
|
2357
|
+
export interface gpuGPUPrimitiveState {
|
|
2358
|
+
topology?: string;
|
|
2359
|
+
stripIndexFormat?: string;
|
|
2360
|
+
frontFace?: string;
|
|
2361
|
+
cullMode?: string;
|
|
2362
|
+
unclippedDepth?: boolean;
|
|
2363
|
+
}
|
|
2364
|
+
export interface gpuGPUStencilFaceState {
|
|
2365
|
+
compare?: string;
|
|
2366
|
+
failOp?: string;
|
|
2367
|
+
depthFailOp?: string;
|
|
2368
|
+
passOp?: string;
|
|
2369
|
+
}
|
|
2370
|
+
export interface gpuGPUDepthStencilState {
|
|
2371
|
+
format: string;
|
|
2372
|
+
depthWriteEnabled: boolean;
|
|
2373
|
+
depthCompare: string;
|
|
2374
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2375
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2376
|
+
stencilReadMask?: number;
|
|
2377
|
+
stencilWriteMask?: number;
|
|
2378
|
+
depthBias?: number;
|
|
2379
|
+
depthBiasSlopeScale?: number;
|
|
2380
|
+
depthBiasClamp?: number;
|
|
2381
|
+
}
|
|
2382
|
+
export interface gpuGPUMultisampleState {
|
|
2383
|
+
count?: number;
|
|
2384
|
+
mask?: number;
|
|
2385
|
+
alphaToCoverageEnabled?: boolean;
|
|
2386
|
+
}
|
|
2387
|
+
export interface gpuGPUFragmentState {
|
|
2388
|
+
module: gpuGPUShaderModule;
|
|
2389
|
+
entryPoint: string;
|
|
2390
|
+
constants?: Record<string, number>;
|
|
2391
|
+
targets: gpuGPUColorTargetState[];
|
|
2392
|
+
}
|
|
2393
|
+
export interface gpuGPUColorTargetState {
|
|
2394
|
+
format: string;
|
|
2395
|
+
blend: gpuGPUBlendState;
|
|
2396
|
+
writeMask?: number;
|
|
2397
|
+
}
|
|
2398
|
+
export interface gpuGPUBlendState {
|
|
2399
|
+
color: gpuGPUBlendComponent;
|
|
2400
|
+
alpha: gpuGPUBlendComponent;
|
|
2401
|
+
}
|
|
2402
|
+
export interface gpuGPUBlendComponent {
|
|
2403
|
+
operation?: string;
|
|
2404
|
+
srcFactor?: string;
|
|
2405
|
+
dstFactor?: string;
|
|
2406
|
+
}
|
|
2407
|
+
export interface gpuGPURenderPassEncoder {
|
|
2408
|
+
setPipeline(pipeline: gpuGPURenderPipeline): void;
|
|
2409
|
+
draw(
|
|
2410
|
+
vertexCount: number,
|
|
2411
|
+
instanceCount?: number,
|
|
2412
|
+
firstVertex?: number,
|
|
2413
|
+
firstInstance?: number
|
|
2414
|
+
): void;
|
|
2415
|
+
end(): void;
|
|
2416
|
+
}
|
|
2417
|
+
export interface gpuGPURenderPassDescriptor {
|
|
2418
|
+
label?: string;
|
|
2419
|
+
colorAttachments: gpuGPURenderPassColorAttachment[];
|
|
2420
|
+
depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
|
|
2421
|
+
occlusionQuerySet?: gpuGPUQuerySet;
|
|
2422
|
+
timestampWrites?: gpuGPURenderPassTimestampWrite[];
|
|
2423
|
+
maxDrawCount?: number | bigint;
|
|
2424
|
+
}
|
|
2425
|
+
export interface gpuGPURenderPassColorAttachment {
|
|
2426
|
+
view: gpuGPUTextureView;
|
|
2427
|
+
depthSlice?: number;
|
|
2428
|
+
resolveTarget?: gpuGPUTextureView;
|
|
2429
|
+
clearValue?: number[] | gpuGPUColorDict;
|
|
2430
|
+
loadOp: string;
|
|
2431
|
+
storeOp: string;
|
|
2432
|
+
}
|
|
2433
|
+
export interface gpuGPUColorDict {
|
|
2434
|
+
r: number;
|
|
2435
|
+
g: number;
|
|
2436
|
+
b: number;
|
|
2437
|
+
a: number;
|
|
2438
|
+
}
|
|
2439
|
+
export interface gpuGPURenderPassDepthStencilAttachment {
|
|
2440
|
+
view: gpuGPUTextureView;
|
|
2441
|
+
depthClearValue?: number;
|
|
2442
|
+
depthLoadOp?: string;
|
|
2443
|
+
depthStoreOp?: string;
|
|
2444
|
+
depthReadOnly?: boolean;
|
|
2445
|
+
stencilClearValue?: number;
|
|
2446
|
+
stencilLoadOp?: string;
|
|
2447
|
+
stencilStoreOp?: string;
|
|
2448
|
+
stencilReadOnly?: boolean;
|
|
2449
|
+
}
|
|
2450
|
+
export interface gpuGPURenderPassTimestampWrite {
|
|
2451
|
+
querySet: gpuGPUQuerySet;
|
|
2452
|
+
queryIndex: number;
|
|
2453
|
+
location: string;
|
|
2454
|
+
}
|
|
2455
|
+
export interface gpuGPUImageCopyTexture {
|
|
2456
|
+
texture: gpuGPUTexture;
|
|
2457
|
+
mipLevel?: number;
|
|
2458
|
+
origin?: number[] | gpuGPUOrigin3DDict;
|
|
2459
|
+
aspect?: string;
|
|
2460
|
+
}
|
|
2461
|
+
export interface gpuGPUImageCopyBuffer {
|
|
2462
|
+
buffer: gpuGPUBuffer;
|
|
2463
|
+
offset?: number | bigint;
|
|
2464
|
+
bytesPerRow?: number;
|
|
2465
|
+
rowsPerImage?: number;
|
|
2466
|
+
}
|
|
2467
|
+
export interface gpuGPUOrigin3DDict {
|
|
2468
|
+
x?: number;
|
|
2469
|
+
y?: number;
|
|
2470
|
+
z?: number;
|
|
2471
|
+
}
|
|
2256
2472
|
export interface BasicImageTransformations {
|
|
2257
2473
|
/**
|
|
2258
2474
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3224,10 +3440,19 @@ export type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
|
3224
3440
|
export type CfProperties<HostMetadata = unknown> =
|
|
3225
3441
|
| IncomingRequestCfProperties<HostMetadata>
|
|
3226
3442
|
| RequestInitCfProperties;
|
|
3443
|
+
export interface D1Meta {
|
|
3444
|
+
duration: number;
|
|
3445
|
+
size_after: number;
|
|
3446
|
+
rows_read: number;
|
|
3447
|
+
rows_written: number;
|
|
3448
|
+
last_row_id: number;
|
|
3449
|
+
changed_db: boolean;
|
|
3450
|
+
changes: number;
|
|
3451
|
+
}
|
|
3227
3452
|
export interface D1Result<T = unknown> {
|
|
3228
3453
|
results: T[];
|
|
3229
3454
|
success: true;
|
|
3230
|
-
meta:
|
|
3455
|
+
meta: D1Meta & Record<string, unknown>;
|
|
3231
3456
|
error?: never;
|
|
3232
3457
|
}
|
|
3233
3458
|
export interface D1ExecResult {
|
|
@@ -3454,7 +3679,8 @@ export type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
|
|
|
3454
3679
|
export interface VectorizeQueryOptions {
|
|
3455
3680
|
topK?: number;
|
|
3456
3681
|
namespace?: string;
|
|
3457
|
-
|
|
3682
|
+
returnValues?: boolean;
|
|
3683
|
+
returnMetadata?: boolean;
|
|
3458
3684
|
}
|
|
3459
3685
|
/**
|
|
3460
3686
|
* Information about the configuration of an index.
|
|
@@ -3492,20 +3718,17 @@ export interface VectorizeVector {
|
|
|
3492
3718
|
values: VectorFloatArray | number[];
|
|
3493
3719
|
/** The namespace this vector belongs to. */
|
|
3494
3720
|
namespace?: string;
|
|
3495
|
-
/** Metadata associated with the
|
|
3721
|
+
/** Metadata associated with the vector. Includes the values of the other fields and potentially additional details. */
|
|
3496
3722
|
metadata?: Record<string, VectorizeVectorMetadata>;
|
|
3497
3723
|
}
|
|
3498
3724
|
/**
|
|
3499
3725
|
* Represents a matched vector for a query along with its score and (if specified) the matching vector information.
|
|
3500
3726
|
*/
|
|
3501
|
-
export
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
/** Vector data for the match. Included only if the user specified they want it returned (via {@link VectorizeQueryOptions}). */
|
|
3507
|
-
vector?: VectorizeVector;
|
|
3508
|
-
}
|
|
3727
|
+
export type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
3728
|
+
Omit<VectorizeVector, "values"> & {
|
|
3729
|
+
/** The score or rank for similarity, when returned as a result */
|
|
3730
|
+
score: number;
|
|
3731
|
+
};
|
|
3509
3732
|
/**
|
|
3510
3733
|
* A set of vector {@link VectorizeMatch} for a particular query.
|
|
3511
3734
|
*/
|