@cloudflare/workers-types 4.20231025.0 → 4.20231218.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 +148 -20
- package/2021-11-03/index.ts +145 -21
- package/2022-01-31/index.d.ts +148 -20
- package/2022-01-31/index.ts +145 -21
- package/2022-03-21/index.d.ts +158 -20
- package/2022-03-21/index.ts +155 -21
- package/2022-08-04/index.d.ts +158 -20
- package/2022-08-04/index.ts +155 -21
- package/2022-10-31/index.d.ts +158 -20
- package/2022-10-31/index.ts +155 -21
- package/2022-11-30/index.d.ts +158 -20
- package/2022-11-30/index.ts +155 -21
- package/2023-03-01/index.d.ts +158 -20
- package/2023-03-01/index.ts +155 -21
- package/2023-07-01/index.d.ts +158 -20
- package/2023-07-01/index.ts +155 -21
- package/experimental/index.d.ts +158 -20
- package/experimental/index.ts +155 -21
- package/index.d.ts +148 -20
- package/index.ts +145 -21
- package/oldest/index.d.ts +148 -20
- package/oldest/index.ts +145 -21
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -375,7 +375,7 @@ declare interface DurableObject {
|
|
|
375
375
|
): void | Promise<void>;
|
|
376
376
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
377
377
|
}
|
|
378
|
-
declare interface DurableObjectStub extends
|
|
378
|
+
declare interface DurableObjectStub extends WorkerRpc {
|
|
379
379
|
readonly id: DurableObjectId;
|
|
380
380
|
readonly name?: string;
|
|
381
381
|
}
|
|
@@ -1433,6 +1433,7 @@ declare type R2Objects = {
|
|
|
1433
1433
|
truncated: false;
|
|
1434
1434
|
}
|
|
1435
1435
|
);
|
|
1436
|
+
declare abstract class WorkerRpc extends Fetcher {}
|
|
1436
1437
|
declare abstract class ScheduledEvent extends ExtendableEvent {
|
|
1437
1438
|
readonly scheduledTime: number;
|
|
1438
1439
|
readonly cron: string;
|
|
@@ -1704,6 +1705,11 @@ declare interface QueuingStrategyInit {
|
|
|
1704
1705
|
*/
|
|
1705
1706
|
highWaterMark: number;
|
|
1706
1707
|
}
|
|
1708
|
+
declare interface ScriptVersion {
|
|
1709
|
+
id?: string;
|
|
1710
|
+
tag?: string;
|
|
1711
|
+
message?: string;
|
|
1712
|
+
}
|
|
1707
1713
|
declare abstract class TailEvent extends ExtendableEvent {
|
|
1708
1714
|
readonly events: TraceItem[];
|
|
1709
1715
|
readonly traces: TraceItem[];
|
|
@@ -1725,6 +1731,7 @@ declare interface TraceItem {
|
|
|
1725
1731
|
readonly exceptions: TraceException[];
|
|
1726
1732
|
readonly diagnosticsChannelEvents: TraceDiagnosticChannelEvent[];
|
|
1727
1733
|
readonly scriptName: string | null;
|
|
1734
|
+
readonly scriptVersion?: ScriptVersion;
|
|
1728
1735
|
readonly dispatchNamespace?: string;
|
|
1729
1736
|
readonly scriptTags?: string[];
|
|
1730
1737
|
readonly outcome: string;
|
|
@@ -2130,6 +2137,9 @@ declare interface gpuGPUCommandEncoder {
|
|
|
2130
2137
|
beginComputePass(
|
|
2131
2138
|
descriptor?: gpuGPUComputePassDescriptor
|
|
2132
2139
|
): gpuGPUComputePassEncoder;
|
|
2140
|
+
beginRenderPass(
|
|
2141
|
+
descriptor: gpuGPURenderPassDescriptor
|
|
2142
|
+
): gpuGPURenderPassEncoder;
|
|
2133
2143
|
copyBufferToBuffer(
|
|
2134
2144
|
source: gpuGPUBuffer,
|
|
2135
2145
|
sourceOffset: number | bigint,
|
|
@@ -2138,6 +2148,26 @@ declare interface gpuGPUCommandEncoder {
|
|
|
2138
2148
|
size: number | bigint
|
|
2139
2149
|
): void;
|
|
2140
2150
|
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2151
|
+
copyTextureToBuffer(
|
|
2152
|
+
source: gpuGPUImageCopyTexture,
|
|
2153
|
+
destination: gpuGPUImageCopyBuffer,
|
|
2154
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2155
|
+
): void;
|
|
2156
|
+
copyBufferToTexture(
|
|
2157
|
+
source: gpuGPUImageCopyBuffer,
|
|
2158
|
+
destination: gpuGPUImageCopyTexture,
|
|
2159
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2160
|
+
): void;
|
|
2161
|
+
copyTextureToTexture(
|
|
2162
|
+
source: gpuGPUImageCopyTexture,
|
|
2163
|
+
destination: gpuGPUImageCopyTexture,
|
|
2164
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2165
|
+
): void;
|
|
2166
|
+
clearBuffer(
|
|
2167
|
+
buffer: gpuGPUBuffer,
|
|
2168
|
+
offset?: number | bigint,
|
|
2169
|
+
size?: number | bigint
|
|
2170
|
+
): void;
|
|
2141
2171
|
}
|
|
2142
2172
|
declare interface gpuGPUCommandEncoderDescriptor {
|
|
2143
2173
|
label?: string;
|
|
@@ -2158,16 +2188,16 @@ declare interface gpuGPUComputePassEncoder {
|
|
|
2158
2188
|
}
|
|
2159
2189
|
declare interface gpuGPUComputePassDescriptor {
|
|
2160
2190
|
label?: string;
|
|
2161
|
-
timestampWrites?:
|
|
2191
|
+
timestampWrites?: gpuGPUComputePassTimestampWrites;
|
|
2162
2192
|
}
|
|
2163
2193
|
declare interface gpuGPUQuerySet {}
|
|
2164
2194
|
declare interface gpuGPUQuerySetDescriptor {
|
|
2165
2195
|
label?: string;
|
|
2166
2196
|
}
|
|
2167
|
-
declare interface
|
|
2197
|
+
declare interface gpuGPUComputePassTimestampWrites {
|
|
2168
2198
|
querySet: gpuGPUQuerySet;
|
|
2169
|
-
|
|
2170
|
-
|
|
2199
|
+
beginningOfPassWriteIndex?: number;
|
|
2200
|
+
endOfPassWriteIndex?: number;
|
|
2171
2201
|
}
|
|
2172
2202
|
declare interface gpuGPUCommandBufferDescriptor {
|
|
2173
2203
|
label?: string;
|
|
@@ -2378,6 +2408,71 @@ declare interface gpuGPUBlendComponent {
|
|
|
2378
2408
|
srcFactor?: string;
|
|
2379
2409
|
dstFactor?: string;
|
|
2380
2410
|
}
|
|
2411
|
+
declare interface gpuGPURenderPassEncoder {
|
|
2412
|
+
setPipeline(pipeline: gpuGPURenderPipeline): void;
|
|
2413
|
+
draw(
|
|
2414
|
+
vertexCount: number,
|
|
2415
|
+
instanceCount?: number,
|
|
2416
|
+
firstVertex?: number,
|
|
2417
|
+
firstInstance?: number
|
|
2418
|
+
): void;
|
|
2419
|
+
end(): void;
|
|
2420
|
+
}
|
|
2421
|
+
declare interface gpuGPURenderPassDescriptor {
|
|
2422
|
+
label?: string;
|
|
2423
|
+
colorAttachments: gpuGPURenderPassColorAttachment[];
|
|
2424
|
+
depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
|
|
2425
|
+
occlusionQuerySet?: gpuGPUQuerySet;
|
|
2426
|
+
timestampWrites?: gpuGPURenderPassTimestampWrites;
|
|
2427
|
+
maxDrawCount?: number | bigint;
|
|
2428
|
+
}
|
|
2429
|
+
declare interface gpuGPURenderPassColorAttachment {
|
|
2430
|
+
view: gpuGPUTextureView;
|
|
2431
|
+
depthSlice?: number;
|
|
2432
|
+
resolveTarget?: gpuGPUTextureView;
|
|
2433
|
+
clearValue?: number[] | gpuGPUColorDict;
|
|
2434
|
+
loadOp: string;
|
|
2435
|
+
storeOp: string;
|
|
2436
|
+
}
|
|
2437
|
+
declare interface gpuGPUColorDict {
|
|
2438
|
+
r: number;
|
|
2439
|
+
g: number;
|
|
2440
|
+
b: number;
|
|
2441
|
+
a: number;
|
|
2442
|
+
}
|
|
2443
|
+
declare interface gpuGPURenderPassDepthStencilAttachment {
|
|
2444
|
+
view: gpuGPUTextureView;
|
|
2445
|
+
depthClearValue?: number;
|
|
2446
|
+
depthLoadOp?: string;
|
|
2447
|
+
depthStoreOp?: string;
|
|
2448
|
+
depthReadOnly?: boolean;
|
|
2449
|
+
stencilClearValue?: number;
|
|
2450
|
+
stencilLoadOp?: string;
|
|
2451
|
+
stencilStoreOp?: string;
|
|
2452
|
+
stencilReadOnly?: boolean;
|
|
2453
|
+
}
|
|
2454
|
+
declare interface gpuGPURenderPassTimestampWrites {
|
|
2455
|
+
querySet: gpuGPUQuerySet;
|
|
2456
|
+
beginningOfPassWriteIndex?: number;
|
|
2457
|
+
endOfPassWriteIndex?: number;
|
|
2458
|
+
}
|
|
2459
|
+
declare interface gpuGPUImageCopyTexture {
|
|
2460
|
+
texture: gpuGPUTexture;
|
|
2461
|
+
mipLevel?: number;
|
|
2462
|
+
origin?: number[] | gpuGPUOrigin3DDict;
|
|
2463
|
+
aspect?: string;
|
|
2464
|
+
}
|
|
2465
|
+
declare interface gpuGPUImageCopyBuffer {
|
|
2466
|
+
buffer: gpuGPUBuffer;
|
|
2467
|
+
offset?: number | bigint;
|
|
2468
|
+
bytesPerRow?: number;
|
|
2469
|
+
rowsPerImage?: number;
|
|
2470
|
+
}
|
|
2471
|
+
declare interface gpuGPUOrigin3DDict {
|
|
2472
|
+
x?: number;
|
|
2473
|
+
y?: number;
|
|
2474
|
+
z?: number;
|
|
2475
|
+
}
|
|
2381
2476
|
declare interface BasicImageTransformations {
|
|
2382
2477
|
/**
|
|
2383
2478
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3349,10 +3444,19 @@ declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
|
3349
3444
|
declare type CfProperties<HostMetadata = unknown> =
|
|
3350
3445
|
| IncomingRequestCfProperties<HostMetadata>
|
|
3351
3446
|
| RequestInitCfProperties;
|
|
3447
|
+
declare interface D1Meta {
|
|
3448
|
+
duration: number;
|
|
3449
|
+
size_after: number;
|
|
3450
|
+
rows_read: number;
|
|
3451
|
+
rows_written: number;
|
|
3452
|
+
last_row_id: number;
|
|
3453
|
+
changed_db: boolean;
|
|
3454
|
+
changes: number;
|
|
3455
|
+
}
|
|
3352
3456
|
declare interface D1Result<T = unknown> {
|
|
3353
3457
|
results: T[];
|
|
3354
3458
|
success: true;
|
|
3355
|
-
meta:
|
|
3459
|
+
meta: D1Meta & Record<string, unknown>;
|
|
3356
3460
|
error?: never;
|
|
3357
3461
|
}
|
|
3358
3462
|
declare interface D1ExecResult {
|
|
@@ -3575,19 +3679,44 @@ declare module "cloudflare:sockets" {
|
|
|
3575
3679
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
3576
3680
|
// https://opensource.org/licenses/Apache-2.0
|
|
3577
3681
|
/**
|
|
3578
|
-
*
|
|
3682
|
+
* Data types supported for holding vector metadata.
|
|
3579
3683
|
*/
|
|
3580
|
-
declare type
|
|
3684
|
+
declare type VectorizeVectorMetadataValue =
|
|
3581
3685
|
| string
|
|
3582
3686
|
| number
|
|
3583
3687
|
| boolean
|
|
3584
|
-
| string[]
|
|
3585
|
-
|
|
3688
|
+
| string[];
|
|
3689
|
+
/**
|
|
3690
|
+
* Additional information to associate with a vector.
|
|
3691
|
+
*/
|
|
3692
|
+
declare type VectorizeVectorMetadata =
|
|
3693
|
+
| VectorizeVectorMetadataValue
|
|
3694
|
+
| Record<string, VectorizeVectorMetadataValue>;
|
|
3586
3695
|
declare type VectorFloatArray = Float32Array | Float64Array;
|
|
3587
3696
|
declare interface VectorizeError {
|
|
3588
3697
|
code?: number;
|
|
3589
3698
|
error: string;
|
|
3590
3699
|
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Comparison logic/operation to use for metadata filtering.
|
|
3702
|
+
*
|
|
3703
|
+
* This list is expected to grow as support for more operations are released.
|
|
3704
|
+
*/
|
|
3705
|
+
declare type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
|
|
3706
|
+
/**
|
|
3707
|
+
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
3708
|
+
*/
|
|
3709
|
+
declare type VectorizeVectorMetadataFilter = {
|
|
3710
|
+
[field: string]:
|
|
3711
|
+
| Exclude<VectorizeVectorMetadataValue, string[]>
|
|
3712
|
+
| null
|
|
3713
|
+
| {
|
|
3714
|
+
[Op in VectorizeVectorMetadataFilterOp]?: Exclude<
|
|
3715
|
+
VectorizeVectorMetadataValue,
|
|
3716
|
+
string[]
|
|
3717
|
+
> | null;
|
|
3718
|
+
};
|
|
3719
|
+
};
|
|
3591
3720
|
/**
|
|
3592
3721
|
* Supported distance metrics for an index.
|
|
3593
3722
|
* Distance metrics determine how other "similar" vectors are determined.
|
|
@@ -3596,7 +3725,9 @@ declare type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
|
|
|
3596
3725
|
declare interface VectorizeQueryOptions {
|
|
3597
3726
|
topK?: number;
|
|
3598
3727
|
namespace?: string;
|
|
3599
|
-
|
|
3728
|
+
returnValues?: boolean;
|
|
3729
|
+
returnMetadata?: boolean;
|
|
3730
|
+
filter?: VectorizeVectorMetadataFilter;
|
|
3600
3731
|
}
|
|
3601
3732
|
/**
|
|
3602
3733
|
* Information about the configuration of an index.
|
|
@@ -3634,20 +3765,17 @@ declare interface VectorizeVector {
|
|
|
3634
3765
|
values: VectorFloatArray | number[];
|
|
3635
3766
|
/** The namespace this vector belongs to. */
|
|
3636
3767
|
namespace?: string;
|
|
3637
|
-
/** Metadata associated with the
|
|
3768
|
+
/** Metadata associated with the vector. Includes the values of the other fields and potentially additional details. */
|
|
3638
3769
|
metadata?: Record<string, VectorizeVectorMetadata>;
|
|
3639
3770
|
}
|
|
3640
3771
|
/**
|
|
3641
3772
|
* Represents a matched vector for a query along with its score and (if specified) the matching vector information.
|
|
3642
3773
|
*/
|
|
3643
|
-
declare
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
/** Vector data for the match. Included only if the user specified they want it returned (via {@link VectorizeQueryOptions}). */
|
|
3649
|
-
vector?: VectorizeVector;
|
|
3650
|
-
}
|
|
3774
|
+
declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
3775
|
+
Omit<VectorizeVector, "values"> & {
|
|
3776
|
+
/** The score or rank for similarity, when returned as a result */
|
|
3777
|
+
score: number;
|
|
3778
|
+
};
|
|
3651
3779
|
/**
|
|
3652
3780
|
* A set of vector {@link VectorizeMatch} for a particular query.
|
|
3653
3781
|
*/
|
package/2021-11-03/index.ts
CHANGED
|
@@ -377,7 +377,7 @@ export interface DurableObject {
|
|
|
377
377
|
): void | Promise<void>;
|
|
378
378
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
379
379
|
}
|
|
380
|
-
export interface DurableObjectStub extends
|
|
380
|
+
export interface DurableObjectStub extends WorkerRpc {
|
|
381
381
|
readonly id: DurableObjectId;
|
|
382
382
|
readonly name?: string;
|
|
383
383
|
}
|
|
@@ -1435,6 +1435,7 @@ export type R2Objects = {
|
|
|
1435
1435
|
truncated: false;
|
|
1436
1436
|
}
|
|
1437
1437
|
);
|
|
1438
|
+
export declare abstract class WorkerRpc extends Fetcher {}
|
|
1438
1439
|
export declare abstract class ScheduledEvent extends ExtendableEvent {
|
|
1439
1440
|
readonly scheduledTime: number;
|
|
1440
1441
|
readonly cron: string;
|
|
@@ -1709,6 +1710,11 @@ export interface QueuingStrategyInit {
|
|
|
1709
1710
|
*/
|
|
1710
1711
|
highWaterMark: number;
|
|
1711
1712
|
}
|
|
1713
|
+
export interface ScriptVersion {
|
|
1714
|
+
id?: string;
|
|
1715
|
+
tag?: string;
|
|
1716
|
+
message?: string;
|
|
1717
|
+
}
|
|
1712
1718
|
export declare abstract class TailEvent extends ExtendableEvent {
|
|
1713
1719
|
readonly events: TraceItem[];
|
|
1714
1720
|
readonly traces: TraceItem[];
|
|
@@ -1730,6 +1736,7 @@ export interface TraceItem {
|
|
|
1730
1736
|
readonly exceptions: TraceException[];
|
|
1731
1737
|
readonly diagnosticsChannelEvents: TraceDiagnosticChannelEvent[];
|
|
1732
1738
|
readonly scriptName: string | null;
|
|
1739
|
+
readonly scriptVersion?: ScriptVersion;
|
|
1733
1740
|
readonly dispatchNamespace?: string;
|
|
1734
1741
|
readonly scriptTags?: string[];
|
|
1735
1742
|
readonly outcome: string;
|
|
@@ -2135,6 +2142,9 @@ export interface gpuGPUCommandEncoder {
|
|
|
2135
2142
|
beginComputePass(
|
|
2136
2143
|
descriptor?: gpuGPUComputePassDescriptor
|
|
2137
2144
|
): gpuGPUComputePassEncoder;
|
|
2145
|
+
beginRenderPass(
|
|
2146
|
+
descriptor: gpuGPURenderPassDescriptor
|
|
2147
|
+
): gpuGPURenderPassEncoder;
|
|
2138
2148
|
copyBufferToBuffer(
|
|
2139
2149
|
source: gpuGPUBuffer,
|
|
2140
2150
|
sourceOffset: number | bigint,
|
|
@@ -2143,6 +2153,26 @@ export interface gpuGPUCommandEncoder {
|
|
|
2143
2153
|
size: number | bigint
|
|
2144
2154
|
): void;
|
|
2145
2155
|
finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
|
|
2156
|
+
copyTextureToBuffer(
|
|
2157
|
+
source: gpuGPUImageCopyTexture,
|
|
2158
|
+
destination: gpuGPUImageCopyBuffer,
|
|
2159
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2160
|
+
): void;
|
|
2161
|
+
copyBufferToTexture(
|
|
2162
|
+
source: gpuGPUImageCopyBuffer,
|
|
2163
|
+
destination: gpuGPUImageCopyTexture,
|
|
2164
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2165
|
+
): void;
|
|
2166
|
+
copyTextureToTexture(
|
|
2167
|
+
source: gpuGPUImageCopyTexture,
|
|
2168
|
+
destination: gpuGPUImageCopyTexture,
|
|
2169
|
+
copySize: Iterable<number> | gpuGPUExtent3DDict
|
|
2170
|
+
): void;
|
|
2171
|
+
clearBuffer(
|
|
2172
|
+
buffer: gpuGPUBuffer,
|
|
2173
|
+
offset?: number | bigint,
|
|
2174
|
+
size?: number | bigint
|
|
2175
|
+
): void;
|
|
2146
2176
|
}
|
|
2147
2177
|
export interface gpuGPUCommandEncoderDescriptor {
|
|
2148
2178
|
label?: string;
|
|
@@ -2163,16 +2193,16 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2163
2193
|
}
|
|
2164
2194
|
export interface gpuGPUComputePassDescriptor {
|
|
2165
2195
|
label?: string;
|
|
2166
|
-
timestampWrites?:
|
|
2196
|
+
timestampWrites?: gpuGPUComputePassTimestampWrites;
|
|
2167
2197
|
}
|
|
2168
2198
|
export interface gpuGPUQuerySet {}
|
|
2169
2199
|
export interface gpuGPUQuerySetDescriptor {
|
|
2170
2200
|
label?: string;
|
|
2171
2201
|
}
|
|
2172
|
-
export interface
|
|
2202
|
+
export interface gpuGPUComputePassTimestampWrites {
|
|
2173
2203
|
querySet: gpuGPUQuerySet;
|
|
2174
|
-
|
|
2175
|
-
|
|
2204
|
+
beginningOfPassWriteIndex?: number;
|
|
2205
|
+
endOfPassWriteIndex?: number;
|
|
2176
2206
|
}
|
|
2177
2207
|
export interface gpuGPUCommandBufferDescriptor {
|
|
2178
2208
|
label?: string;
|
|
@@ -2383,6 +2413,71 @@ export interface gpuGPUBlendComponent {
|
|
|
2383
2413
|
srcFactor?: string;
|
|
2384
2414
|
dstFactor?: string;
|
|
2385
2415
|
}
|
|
2416
|
+
export interface gpuGPURenderPassEncoder {
|
|
2417
|
+
setPipeline(pipeline: gpuGPURenderPipeline): void;
|
|
2418
|
+
draw(
|
|
2419
|
+
vertexCount: number,
|
|
2420
|
+
instanceCount?: number,
|
|
2421
|
+
firstVertex?: number,
|
|
2422
|
+
firstInstance?: number
|
|
2423
|
+
): void;
|
|
2424
|
+
end(): void;
|
|
2425
|
+
}
|
|
2426
|
+
export interface gpuGPURenderPassDescriptor {
|
|
2427
|
+
label?: string;
|
|
2428
|
+
colorAttachments: gpuGPURenderPassColorAttachment[];
|
|
2429
|
+
depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
|
|
2430
|
+
occlusionQuerySet?: gpuGPUQuerySet;
|
|
2431
|
+
timestampWrites?: gpuGPURenderPassTimestampWrites;
|
|
2432
|
+
maxDrawCount?: number | bigint;
|
|
2433
|
+
}
|
|
2434
|
+
export interface gpuGPURenderPassColorAttachment {
|
|
2435
|
+
view: gpuGPUTextureView;
|
|
2436
|
+
depthSlice?: number;
|
|
2437
|
+
resolveTarget?: gpuGPUTextureView;
|
|
2438
|
+
clearValue?: number[] | gpuGPUColorDict;
|
|
2439
|
+
loadOp: string;
|
|
2440
|
+
storeOp: string;
|
|
2441
|
+
}
|
|
2442
|
+
export interface gpuGPUColorDict {
|
|
2443
|
+
r: number;
|
|
2444
|
+
g: number;
|
|
2445
|
+
b: number;
|
|
2446
|
+
a: number;
|
|
2447
|
+
}
|
|
2448
|
+
export interface gpuGPURenderPassDepthStencilAttachment {
|
|
2449
|
+
view: gpuGPUTextureView;
|
|
2450
|
+
depthClearValue?: number;
|
|
2451
|
+
depthLoadOp?: string;
|
|
2452
|
+
depthStoreOp?: string;
|
|
2453
|
+
depthReadOnly?: boolean;
|
|
2454
|
+
stencilClearValue?: number;
|
|
2455
|
+
stencilLoadOp?: string;
|
|
2456
|
+
stencilStoreOp?: string;
|
|
2457
|
+
stencilReadOnly?: boolean;
|
|
2458
|
+
}
|
|
2459
|
+
export interface gpuGPURenderPassTimestampWrites {
|
|
2460
|
+
querySet: gpuGPUQuerySet;
|
|
2461
|
+
beginningOfPassWriteIndex?: number;
|
|
2462
|
+
endOfPassWriteIndex?: number;
|
|
2463
|
+
}
|
|
2464
|
+
export interface gpuGPUImageCopyTexture {
|
|
2465
|
+
texture: gpuGPUTexture;
|
|
2466
|
+
mipLevel?: number;
|
|
2467
|
+
origin?: number[] | gpuGPUOrigin3DDict;
|
|
2468
|
+
aspect?: string;
|
|
2469
|
+
}
|
|
2470
|
+
export interface gpuGPUImageCopyBuffer {
|
|
2471
|
+
buffer: gpuGPUBuffer;
|
|
2472
|
+
offset?: number | bigint;
|
|
2473
|
+
bytesPerRow?: number;
|
|
2474
|
+
rowsPerImage?: number;
|
|
2475
|
+
}
|
|
2476
|
+
export interface gpuGPUOrigin3DDict {
|
|
2477
|
+
x?: number;
|
|
2478
|
+
y?: number;
|
|
2479
|
+
z?: number;
|
|
2480
|
+
}
|
|
2386
2481
|
export interface BasicImageTransformations {
|
|
2387
2482
|
/**
|
|
2388
2483
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3354,10 +3449,19 @@ export type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
|
3354
3449
|
export type CfProperties<HostMetadata = unknown> =
|
|
3355
3450
|
| IncomingRequestCfProperties<HostMetadata>
|
|
3356
3451
|
| RequestInitCfProperties;
|
|
3452
|
+
export interface D1Meta {
|
|
3453
|
+
duration: number;
|
|
3454
|
+
size_after: number;
|
|
3455
|
+
rows_read: number;
|
|
3456
|
+
rows_written: number;
|
|
3457
|
+
last_row_id: number;
|
|
3458
|
+
changed_db: boolean;
|
|
3459
|
+
changes: number;
|
|
3460
|
+
}
|
|
3357
3461
|
export interface D1Result<T = unknown> {
|
|
3358
3462
|
results: T[];
|
|
3359
3463
|
success: true;
|
|
3360
|
-
meta:
|
|
3464
|
+
meta: D1Meta & Record<string, unknown>;
|
|
3361
3465
|
error?: never;
|
|
3362
3466
|
}
|
|
3363
3467
|
export interface D1ExecResult {
|
|
@@ -3562,20 +3666,41 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
3562
3666
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
3563
3667
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
3564
3668
|
// https://opensource.org/licenses/Apache-2.0
|
|
3669
|
+
/**
|
|
3670
|
+
* Data types supported for holding vector metadata.
|
|
3671
|
+
*/
|
|
3672
|
+
export type VectorizeVectorMetadataValue = string | number | boolean | string[];
|
|
3565
3673
|
/**
|
|
3566
3674
|
* Additional information to associate with a vector.
|
|
3567
3675
|
*/
|
|
3568
3676
|
export type VectorizeVectorMetadata =
|
|
3569
|
-
|
|
|
3570
|
-
|
|
|
3571
|
-
| boolean
|
|
3572
|
-
| string[]
|
|
3573
|
-
| Record<string, string | number | boolean | string[]>;
|
|
3677
|
+
| VectorizeVectorMetadataValue
|
|
3678
|
+
| Record<string, VectorizeVectorMetadataValue>;
|
|
3574
3679
|
export type VectorFloatArray = Float32Array | Float64Array;
|
|
3575
3680
|
export interface VectorizeError {
|
|
3576
3681
|
code?: number;
|
|
3577
3682
|
error: string;
|
|
3578
3683
|
}
|
|
3684
|
+
/**
|
|
3685
|
+
* Comparison logic/operation to use for metadata filtering.
|
|
3686
|
+
*
|
|
3687
|
+
* This list is expected to grow as support for more operations are released.
|
|
3688
|
+
*/
|
|
3689
|
+
export type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
|
|
3690
|
+
/**
|
|
3691
|
+
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
3692
|
+
*/
|
|
3693
|
+
export type VectorizeVectorMetadataFilter = {
|
|
3694
|
+
[field: string]:
|
|
3695
|
+
| Exclude<VectorizeVectorMetadataValue, string[]>
|
|
3696
|
+
| null
|
|
3697
|
+
| {
|
|
3698
|
+
[Op in VectorizeVectorMetadataFilterOp]?: Exclude<
|
|
3699
|
+
VectorizeVectorMetadataValue,
|
|
3700
|
+
string[]
|
|
3701
|
+
> | null;
|
|
3702
|
+
};
|
|
3703
|
+
};
|
|
3579
3704
|
/**
|
|
3580
3705
|
* Supported distance metrics for an index.
|
|
3581
3706
|
* Distance metrics determine how other "similar" vectors are determined.
|
|
@@ -3584,7 +3709,9 @@ export type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
|
|
|
3584
3709
|
export interface VectorizeQueryOptions {
|
|
3585
3710
|
topK?: number;
|
|
3586
3711
|
namespace?: string;
|
|
3587
|
-
|
|
3712
|
+
returnValues?: boolean;
|
|
3713
|
+
returnMetadata?: boolean;
|
|
3714
|
+
filter?: VectorizeVectorMetadataFilter;
|
|
3588
3715
|
}
|
|
3589
3716
|
/**
|
|
3590
3717
|
* Information about the configuration of an index.
|
|
@@ -3622,20 +3749,17 @@ export interface VectorizeVector {
|
|
|
3622
3749
|
values: VectorFloatArray | number[];
|
|
3623
3750
|
/** The namespace this vector belongs to. */
|
|
3624
3751
|
namespace?: string;
|
|
3625
|
-
/** Metadata associated with the
|
|
3752
|
+
/** Metadata associated with the vector. Includes the values of the other fields and potentially additional details. */
|
|
3626
3753
|
metadata?: Record<string, VectorizeVectorMetadata>;
|
|
3627
3754
|
}
|
|
3628
3755
|
/**
|
|
3629
3756
|
* Represents a matched vector for a query along with its score and (if specified) the matching vector information.
|
|
3630
3757
|
*/
|
|
3631
|
-
export
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
/** Vector data for the match. Included only if the user specified they want it returned (via {@link VectorizeQueryOptions}). */
|
|
3637
|
-
vector?: VectorizeVector;
|
|
3638
|
-
}
|
|
3758
|
+
export type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
3759
|
+
Omit<VectorizeVector, "values"> & {
|
|
3760
|
+
/** The score or rank for similarity, when returned as a result */
|
|
3761
|
+
score: number;
|
|
3762
|
+
};
|
|
3639
3763
|
/**
|
|
3640
3764
|
* A set of vector {@link VectorizeMatch} for a particular query.
|
|
3641
3765
|
*/
|