@cloudflare/workers-types 4.20241018.0 → 4.20241106.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.
@@ -612,7 +612,6 @@ interface DurableObjectStorage {
612
612
  getCurrentBookmark(): Promise<string>;
613
613
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
614
614
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
615
- waitForBookmark(bookmark: string): Promise<void>;
616
615
  }
617
616
  interface DurableObjectListOptions {
618
617
  start?: string;
@@ -2770,7 +2769,7 @@ declare abstract class SqlStorageCursor<
2770
2769
  toArray(): T[];
2771
2770
  one(): T;
2772
2771
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2773
- get columnNames(): string[];
2772
+ columnNames: string[];
2774
2773
  get rowsRead(): number;
2775
2774
  get rowsWritten(): number;
2776
2775
  [Symbol.iterator](): IterableIterator<T>;
@@ -5382,7 +5381,7 @@ interface VectorizeIndexDetails {
5382
5381
  */
5383
5382
  interface VectorizeIndexInfo {
5384
5383
  /** The number of records containing vectors within the index. */
5385
- vectorsCount: number;
5384
+ vectorCount: number;
5386
5385
  /** Number of dimensions the index has been configured for. */
5387
5386
  dimensions: number;
5388
5387
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5507,6 +5506,16 @@ declare abstract class Vectorize {
5507
5506
  vector: VectorFloatArray | number[],
5508
5507
  options?: VectorizeQueryOptions,
5509
5508
  ): Promise<VectorizeMatches>;
5509
+ /**
5510
+ * Use the provided vector-id to perform a similarity search across the index.
5511
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5512
+ * @param options Configuration options to massage the returned data.
5513
+ * @returns A promise that resolves with matched and scored vectors.
5514
+ */
5515
+ public queryById(
5516
+ vectorId: string,
5517
+ options?: VectorizeQueryOptions,
5518
+ ): Promise<VectorizeMatches>;
5510
5519
  /**
5511
5520
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5512
5521
  * @param vectors List of vectors that will be inserted.
@@ -5597,21 +5606,23 @@ declare abstract class Workflow {
5597
5606
  * @param id Id for the instance of this Workflow
5598
5607
  * @returns A promise that resolves with a handle for the Instance
5599
5608
  */
5600
- public get(id: string): Promise<Instance>;
5609
+ public get(id: string): Promise<WorkflowInstance>;
5601
5610
  /**
5602
5611
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5603
- * @param options optional fields to customize the instance creation
5612
+ * @param options Options when creating an instance including id and params
5604
5613
  * @returns A promise that resolves with a handle for the Instance
5605
5614
  */
5606
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5615
+ public create(
5616
+ options?: WorkflowInstanceCreateOptions,
5617
+ ): Promise<WorkflowInstance>;
5607
5618
  }
5608
5619
  interface WorkflowInstanceCreateOptions {
5609
5620
  /**
5610
- * Name to create the instance of this Workflow with - it should always be unique
5621
+ * An id for your Workflow instance. Must be unique within the Workflow.
5611
5622
  */
5612
- name?: string;
5623
+ id?: string;
5613
5624
  /**
5614
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5625
+ * The event payload the Workflow instance is triggered with
5615
5626
  */
5616
5627
  params?: unknown;
5617
5628
  }
@@ -5633,7 +5644,7 @@ interface WorkflowError {
5633
5644
  code?: number;
5634
5645
  message: string;
5635
5646
  }
5636
- declare abstract class Instance {
5647
+ declare abstract class WorkflowInstance {
5637
5648
  public id: string;
5638
5649
  /**
5639
5650
  * Pause the instance.
@@ -5644,9 +5655,9 @@ declare abstract class Instance {
5644
5655
  */
5645
5656
  public resume(): Promise<void>;
5646
5657
  /**
5647
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5658
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5648
5659
  */
5649
- public abort(): Promise<void>;
5660
+ public terminate(): Promise<void>;
5650
5661
  /**
5651
5662
  * Restart the instance.
5652
5663
  */
@@ -617,7 +617,6 @@ export interface DurableObjectStorage {
617
617
  getCurrentBookmark(): Promise<string>;
618
618
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
619
619
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
620
- waitForBookmark(bookmark: string): Promise<void>;
621
620
  }
622
621
  export interface DurableObjectListOptions {
623
622
  start?: string;
@@ -2781,7 +2780,7 @@ export declare abstract class SqlStorageCursor<
2781
2780
  toArray(): T[];
2782
2781
  one(): T;
2783
2782
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2784
- get columnNames(): string[];
2783
+ columnNames: string[];
2785
2784
  get rowsRead(): number;
2786
2785
  get rowsWritten(): number;
2787
2786
  [Symbol.iterator](): IterableIterator<T>;
@@ -5294,7 +5293,7 @@ export interface VectorizeIndexDetails {
5294
5293
  */
5295
5294
  export interface VectorizeIndexInfo {
5296
5295
  /** The number of records containing vectors within the index. */
5297
- vectorsCount: number;
5296
+ vectorCount: number;
5298
5297
  /** Number of dimensions the index has been configured for. */
5299
5298
  dimensions: number;
5300
5299
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5419,6 +5418,16 @@ export declare abstract class Vectorize {
5419
5418
  vector: VectorFloatArray | number[],
5420
5419
  options?: VectorizeQueryOptions,
5421
5420
  ): Promise<VectorizeMatches>;
5421
+ /**
5422
+ * Use the provided vector-id to perform a similarity search across the index.
5423
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5424
+ * @param options Configuration options to massage the returned data.
5425
+ * @returns A promise that resolves with matched and scored vectors.
5426
+ */
5427
+ public queryById(
5428
+ vectorId: string,
5429
+ options?: VectorizeQueryOptions,
5430
+ ): Promise<VectorizeMatches>;
5422
5431
  /**
5423
5432
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5424
5433
  * @param vectors List of vectors that will be inserted.
@@ -5500,21 +5509,23 @@ export declare abstract class Workflow {
5500
5509
  * @param id Id for the instance of this Workflow
5501
5510
  * @returns A promise that resolves with a handle for the Instance
5502
5511
  */
5503
- public get(id: string): Promise<Instance>;
5512
+ public get(id: string): Promise<WorkflowInstance>;
5504
5513
  /**
5505
5514
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5506
- * @param options optional fields to customize the instance creation
5515
+ * @param options Options when creating an instance including id and params
5507
5516
  * @returns A promise that resolves with a handle for the Instance
5508
5517
  */
5509
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5518
+ public create(
5519
+ options?: WorkflowInstanceCreateOptions,
5520
+ ): Promise<WorkflowInstance>;
5510
5521
  }
5511
5522
  export interface WorkflowInstanceCreateOptions {
5512
5523
  /**
5513
- * Name to create the instance of this Workflow with - it should always be unique
5524
+ * An id for your Workflow instance. Must be unique within the Workflow.
5514
5525
  */
5515
- name?: string;
5526
+ id?: string;
5516
5527
  /**
5517
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5528
+ * The event payload the Workflow instance is triggered with
5518
5529
  */
5519
5530
  params?: unknown;
5520
5531
  }
@@ -5536,7 +5547,7 @@ export interface WorkflowError {
5536
5547
  code?: number;
5537
5548
  message: string;
5538
5549
  }
5539
- export declare abstract class Instance {
5550
+ export declare abstract class WorkflowInstance {
5540
5551
  public id: string;
5541
5552
  /**
5542
5553
  * Pause the instance.
@@ -5547,9 +5558,9 @@ export declare abstract class Instance {
5547
5558
  */
5548
5559
  public resume(): Promise<void>;
5549
5560
  /**
5550
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5561
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5551
5562
  */
5552
- public abort(): Promise<void>;
5563
+ public terminate(): Promise<void>;
5553
5564
  /**
5554
5565
  * Restart the instance.
5555
5566
  */
@@ -612,7 +612,6 @@ interface DurableObjectStorage {
612
612
  getCurrentBookmark(): Promise<string>;
613
613
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
614
614
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
615
- waitForBookmark(bookmark: string): Promise<void>;
616
615
  }
617
616
  interface DurableObjectListOptions {
618
617
  start?: string;
@@ -2796,7 +2795,7 @@ declare abstract class SqlStorageCursor<
2796
2795
  toArray(): T[];
2797
2796
  one(): T;
2798
2797
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2799
- get columnNames(): string[];
2798
+ columnNames: string[];
2800
2799
  get rowsRead(): number;
2801
2800
  get rowsWritten(): number;
2802
2801
  [Symbol.iterator](): IterableIterator<T>;
@@ -5408,7 +5407,7 @@ interface VectorizeIndexDetails {
5408
5407
  */
5409
5408
  interface VectorizeIndexInfo {
5410
5409
  /** The number of records containing vectors within the index. */
5411
- vectorsCount: number;
5410
+ vectorCount: number;
5412
5411
  /** Number of dimensions the index has been configured for. */
5413
5412
  dimensions: number;
5414
5413
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5533,6 +5532,16 @@ declare abstract class Vectorize {
5533
5532
  vector: VectorFloatArray | number[],
5534
5533
  options?: VectorizeQueryOptions,
5535
5534
  ): Promise<VectorizeMatches>;
5535
+ /**
5536
+ * Use the provided vector-id to perform a similarity search across the index.
5537
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5538
+ * @param options Configuration options to massage the returned data.
5539
+ * @returns A promise that resolves with matched and scored vectors.
5540
+ */
5541
+ public queryById(
5542
+ vectorId: string,
5543
+ options?: VectorizeQueryOptions,
5544
+ ): Promise<VectorizeMatches>;
5536
5545
  /**
5537
5546
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5538
5547
  * @param vectors List of vectors that will be inserted.
@@ -5623,21 +5632,23 @@ declare abstract class Workflow {
5623
5632
  * @param id Id for the instance of this Workflow
5624
5633
  * @returns A promise that resolves with a handle for the Instance
5625
5634
  */
5626
- public get(id: string): Promise<Instance>;
5635
+ public get(id: string): Promise<WorkflowInstance>;
5627
5636
  /**
5628
5637
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5629
- * @param options optional fields to customize the instance creation
5638
+ * @param options Options when creating an instance including id and params
5630
5639
  * @returns A promise that resolves with a handle for the Instance
5631
5640
  */
5632
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5641
+ public create(
5642
+ options?: WorkflowInstanceCreateOptions,
5643
+ ): Promise<WorkflowInstance>;
5633
5644
  }
5634
5645
  interface WorkflowInstanceCreateOptions {
5635
5646
  /**
5636
- * Name to create the instance of this Workflow with - it should always be unique
5647
+ * An id for your Workflow instance. Must be unique within the Workflow.
5637
5648
  */
5638
- name?: string;
5649
+ id?: string;
5639
5650
  /**
5640
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5651
+ * The event payload the Workflow instance is triggered with
5641
5652
  */
5642
5653
  params?: unknown;
5643
5654
  }
@@ -5659,7 +5670,7 @@ interface WorkflowError {
5659
5670
  code?: number;
5660
5671
  message: string;
5661
5672
  }
5662
- declare abstract class Instance {
5673
+ declare abstract class WorkflowInstance {
5663
5674
  public id: string;
5664
5675
  /**
5665
5676
  * Pause the instance.
@@ -5670,9 +5681,9 @@ declare abstract class Instance {
5670
5681
  */
5671
5682
  public resume(): Promise<void>;
5672
5683
  /**
5673
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5684
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5674
5685
  */
5675
- public abort(): Promise<void>;
5686
+ public terminate(): Promise<void>;
5676
5687
  /**
5677
5688
  * Restart the instance.
5678
5689
  */
@@ -617,7 +617,6 @@ export interface DurableObjectStorage {
617
617
  getCurrentBookmark(): Promise<string>;
618
618
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
619
619
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
620
- waitForBookmark(bookmark: string): Promise<void>;
621
620
  }
622
621
  export interface DurableObjectListOptions {
623
622
  start?: string;
@@ -2807,7 +2806,7 @@ export declare abstract class SqlStorageCursor<
2807
2806
  toArray(): T[];
2808
2807
  one(): T;
2809
2808
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2810
- get columnNames(): string[];
2809
+ columnNames: string[];
2811
2810
  get rowsRead(): number;
2812
2811
  get rowsWritten(): number;
2813
2812
  [Symbol.iterator](): IterableIterator<T>;
@@ -5320,7 +5319,7 @@ export interface VectorizeIndexDetails {
5320
5319
  */
5321
5320
  export interface VectorizeIndexInfo {
5322
5321
  /** The number of records containing vectors within the index. */
5323
- vectorsCount: number;
5322
+ vectorCount: number;
5324
5323
  /** Number of dimensions the index has been configured for. */
5325
5324
  dimensions: number;
5326
5325
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5445,6 +5444,16 @@ export declare abstract class Vectorize {
5445
5444
  vector: VectorFloatArray | number[],
5446
5445
  options?: VectorizeQueryOptions,
5447
5446
  ): Promise<VectorizeMatches>;
5447
+ /**
5448
+ * Use the provided vector-id to perform a similarity search across the index.
5449
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5450
+ * @param options Configuration options to massage the returned data.
5451
+ * @returns A promise that resolves with matched and scored vectors.
5452
+ */
5453
+ public queryById(
5454
+ vectorId: string,
5455
+ options?: VectorizeQueryOptions,
5456
+ ): Promise<VectorizeMatches>;
5448
5457
  /**
5449
5458
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5450
5459
  * @param vectors List of vectors that will be inserted.
@@ -5526,21 +5535,23 @@ export declare abstract class Workflow {
5526
5535
  * @param id Id for the instance of this Workflow
5527
5536
  * @returns A promise that resolves with a handle for the Instance
5528
5537
  */
5529
- public get(id: string): Promise<Instance>;
5538
+ public get(id: string): Promise<WorkflowInstance>;
5530
5539
  /**
5531
5540
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5532
- * @param options optional fields to customize the instance creation
5541
+ * @param options Options when creating an instance including id and params
5533
5542
  * @returns A promise that resolves with a handle for the Instance
5534
5543
  */
5535
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5544
+ public create(
5545
+ options?: WorkflowInstanceCreateOptions,
5546
+ ): Promise<WorkflowInstance>;
5536
5547
  }
5537
5548
  export interface WorkflowInstanceCreateOptions {
5538
5549
  /**
5539
- * Name to create the instance of this Workflow with - it should always be unique
5550
+ * An id for your Workflow instance. Must be unique within the Workflow.
5540
5551
  */
5541
- name?: string;
5552
+ id?: string;
5542
5553
  /**
5543
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5554
+ * The event payload the Workflow instance is triggered with
5544
5555
  */
5545
5556
  params?: unknown;
5546
5557
  }
@@ -5562,7 +5573,7 @@ export interface WorkflowError {
5562
5573
  code?: number;
5563
5574
  message: string;
5564
5575
  }
5565
- export declare abstract class Instance {
5576
+ export declare abstract class WorkflowInstance {
5566
5577
  public id: string;
5567
5578
  /**
5568
5579
  * Pause the instance.
@@ -5573,9 +5584,9 @@ export declare abstract class Instance {
5573
5584
  */
5574
5585
  public resume(): Promise<void>;
5575
5586
  /**
5576
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5587
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5577
5588
  */
5578
- public abort(): Promise<void>;
5589
+ public terminate(): Promise<void>;
5579
5590
  /**
5580
5591
  * Restart the instance.
5581
5592
  */
@@ -629,7 +629,6 @@ interface DurableObjectStorage {
629
629
  getCurrentBookmark(): Promise<string>;
630
630
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
631
631
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
632
- waitForBookmark(bookmark: string): Promise<void>;
633
632
  }
634
633
  interface DurableObjectListOptions {
635
634
  start?: string;
@@ -2813,7 +2812,7 @@ declare abstract class SqlStorageCursor<
2813
2812
  toArray(): T[];
2814
2813
  one(): T;
2815
2814
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2816
- get columnNames(): string[];
2815
+ columnNames: string[];
2817
2816
  get rowsRead(): number;
2818
2817
  get rowsWritten(): number;
2819
2818
  [Symbol.iterator](): IterableIterator<T>;
@@ -5432,7 +5431,7 @@ interface VectorizeIndexDetails {
5432
5431
  */
5433
5432
  interface VectorizeIndexInfo {
5434
5433
  /** The number of records containing vectors within the index. */
5435
- vectorsCount: number;
5434
+ vectorCount: number;
5436
5435
  /** Number of dimensions the index has been configured for. */
5437
5436
  dimensions: number;
5438
5437
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5557,6 +5556,16 @@ declare abstract class Vectorize {
5557
5556
  vector: VectorFloatArray | number[],
5558
5557
  options?: VectorizeQueryOptions,
5559
5558
  ): Promise<VectorizeMatches>;
5559
+ /**
5560
+ * Use the provided vector-id to perform a similarity search across the index.
5561
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5562
+ * @param options Configuration options to massage the returned data.
5563
+ * @returns A promise that resolves with matched and scored vectors.
5564
+ */
5565
+ public queryById(
5566
+ vectorId: string,
5567
+ options?: VectorizeQueryOptions,
5568
+ ): Promise<VectorizeMatches>;
5560
5569
  /**
5561
5570
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5562
5571
  * @param vectors List of vectors that will be inserted.
@@ -5647,21 +5656,23 @@ declare abstract class Workflow {
5647
5656
  * @param id Id for the instance of this Workflow
5648
5657
  * @returns A promise that resolves with a handle for the Instance
5649
5658
  */
5650
- public get(id: string): Promise<Instance>;
5659
+ public get(id: string): Promise<WorkflowInstance>;
5651
5660
  /**
5652
5661
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5653
- * @param options optional fields to customize the instance creation
5662
+ * @param options Options when creating an instance including id and params
5654
5663
  * @returns A promise that resolves with a handle for the Instance
5655
5664
  */
5656
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5665
+ public create(
5666
+ options?: WorkflowInstanceCreateOptions,
5667
+ ): Promise<WorkflowInstance>;
5657
5668
  }
5658
5669
  interface WorkflowInstanceCreateOptions {
5659
5670
  /**
5660
- * Name to create the instance of this Workflow with - it should always be unique
5671
+ * An id for your Workflow instance. Must be unique within the Workflow.
5661
5672
  */
5662
- name?: string;
5673
+ id?: string;
5663
5674
  /**
5664
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5675
+ * The event payload the Workflow instance is triggered with
5665
5676
  */
5666
5677
  params?: unknown;
5667
5678
  }
@@ -5683,7 +5694,7 @@ interface WorkflowError {
5683
5694
  code?: number;
5684
5695
  message: string;
5685
5696
  }
5686
- declare abstract class Instance {
5697
+ declare abstract class WorkflowInstance {
5687
5698
  public id: string;
5688
5699
  /**
5689
5700
  * Pause the instance.
@@ -5694,9 +5705,9 @@ declare abstract class Instance {
5694
5705
  */
5695
5706
  public resume(): Promise<void>;
5696
5707
  /**
5697
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5708
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5698
5709
  */
5699
- public abort(): Promise<void>;
5710
+ public terminate(): Promise<void>;
5700
5711
  /**
5701
5712
  * Restart the instance.
5702
5713
  */
@@ -634,7 +634,6 @@ export interface DurableObjectStorage {
634
634
  getCurrentBookmark(): Promise<string>;
635
635
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
636
636
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
637
- waitForBookmark(bookmark: string): Promise<void>;
638
637
  }
639
638
  export interface DurableObjectListOptions {
640
639
  start?: string;
@@ -2824,7 +2823,7 @@ export declare abstract class SqlStorageCursor<
2824
2823
  toArray(): T[];
2825
2824
  one(): T;
2826
2825
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2827
- get columnNames(): string[];
2826
+ columnNames: string[];
2828
2827
  get rowsRead(): number;
2829
2828
  get rowsWritten(): number;
2830
2829
  [Symbol.iterator](): IterableIterator<T>;
@@ -5344,7 +5343,7 @@ export interface VectorizeIndexDetails {
5344
5343
  */
5345
5344
  export interface VectorizeIndexInfo {
5346
5345
  /** The number of records containing vectors within the index. */
5347
- vectorsCount: number;
5346
+ vectorCount: number;
5348
5347
  /** Number of dimensions the index has been configured for. */
5349
5348
  dimensions: number;
5350
5349
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5469,6 +5468,16 @@ export declare abstract class Vectorize {
5469
5468
  vector: VectorFloatArray | number[],
5470
5469
  options?: VectorizeQueryOptions,
5471
5470
  ): Promise<VectorizeMatches>;
5471
+ /**
5472
+ * Use the provided vector-id to perform a similarity search across the index.
5473
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5474
+ * @param options Configuration options to massage the returned data.
5475
+ * @returns A promise that resolves with matched and scored vectors.
5476
+ */
5477
+ public queryById(
5478
+ vectorId: string,
5479
+ options?: VectorizeQueryOptions,
5480
+ ): Promise<VectorizeMatches>;
5472
5481
  /**
5473
5482
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5474
5483
  * @param vectors List of vectors that will be inserted.
@@ -5550,21 +5559,23 @@ export declare abstract class Workflow {
5550
5559
  * @param id Id for the instance of this Workflow
5551
5560
  * @returns A promise that resolves with a handle for the Instance
5552
5561
  */
5553
- public get(id: string): Promise<Instance>;
5562
+ public get(id: string): Promise<WorkflowInstance>;
5554
5563
  /**
5555
5564
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5556
- * @param options optional fields to customize the instance creation
5565
+ * @param options Options when creating an instance including id and params
5557
5566
  * @returns A promise that resolves with a handle for the Instance
5558
5567
  */
5559
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5568
+ public create(
5569
+ options?: WorkflowInstanceCreateOptions,
5570
+ ): Promise<WorkflowInstance>;
5560
5571
  }
5561
5572
  export interface WorkflowInstanceCreateOptions {
5562
5573
  /**
5563
- * Name to create the instance of this Workflow with - it should always be unique
5574
+ * An id for your Workflow instance. Must be unique within the Workflow.
5564
5575
  */
5565
- name?: string;
5576
+ id?: string;
5566
5577
  /**
5567
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5578
+ * The event payload the Workflow instance is triggered with
5568
5579
  */
5569
5580
  params?: unknown;
5570
5581
  }
@@ -5586,7 +5597,7 @@ export interface WorkflowError {
5586
5597
  code?: number;
5587
5598
  message: string;
5588
5599
  }
5589
- export declare abstract class Instance {
5600
+ export declare abstract class WorkflowInstance {
5590
5601
  public id: string;
5591
5602
  /**
5592
5603
  * Pause the instance.
@@ -5597,9 +5608,9 @@ export declare abstract class Instance {
5597
5608
  */
5598
5609
  public resume(): Promise<void>;
5599
5610
  /**
5600
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5611
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5601
5612
  */
5602
- public abort(): Promise<void>;
5613
+ public terminate(): Promise<void>;
5603
5614
  /**
5604
5615
  * Restart the instance.
5605
5616
  */
@@ -629,7 +629,6 @@ interface DurableObjectStorage {
629
629
  getCurrentBookmark(): Promise<string>;
630
630
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
631
631
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
632
- waitForBookmark(bookmark: string): Promise<void>;
633
632
  }
634
633
  interface DurableObjectListOptions {
635
634
  start?: string;
@@ -2814,7 +2813,7 @@ declare abstract class SqlStorageCursor<
2814
2813
  toArray(): T[];
2815
2814
  one(): T;
2816
2815
  raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
2817
- get columnNames(): string[];
2816
+ columnNames: string[];
2818
2817
  get rowsRead(): number;
2819
2818
  get rowsWritten(): number;
2820
2819
  [Symbol.iterator](): IterableIterator<T>;
@@ -5433,7 +5432,7 @@ interface VectorizeIndexDetails {
5433
5432
  */
5434
5433
  interface VectorizeIndexInfo {
5435
5434
  /** The number of records containing vectors within the index. */
5436
- vectorsCount: number;
5435
+ vectorCount: number;
5437
5436
  /** Number of dimensions the index has been configured for. */
5438
5437
  dimensions: number;
5439
5438
  /** ISO 8601 datetime of the last processed mutation on in the index. All changes before this mutation will be reflected in the index state. */
@@ -5558,6 +5557,16 @@ declare abstract class Vectorize {
5558
5557
  vector: VectorFloatArray | number[],
5559
5558
  options?: VectorizeQueryOptions,
5560
5559
  ): Promise<VectorizeMatches>;
5560
+ /**
5561
+ * Use the provided vector-id to perform a similarity search across the index.
5562
+ * @param vectorId Id for a vector in the index against which the index should be queried.
5563
+ * @param options Configuration options to massage the returned data.
5564
+ * @returns A promise that resolves with matched and scored vectors.
5565
+ */
5566
+ public queryById(
5567
+ vectorId: string,
5568
+ options?: VectorizeQueryOptions,
5569
+ ): Promise<VectorizeMatches>;
5561
5570
  /**
5562
5571
  * Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.
5563
5572
  * @param vectors List of vectors that will be inserted.
@@ -5648,21 +5657,23 @@ declare abstract class Workflow {
5648
5657
  * @param id Id for the instance of this Workflow
5649
5658
  * @returns A promise that resolves with a handle for the Instance
5650
5659
  */
5651
- public get(id: string): Promise<Instance>;
5660
+ public get(id: string): Promise<WorkflowInstance>;
5652
5661
  /**
5653
5662
  * Create a new instance and return a handle to it. If a provided id exists, an error will be thrown.
5654
- * @param options optional fields to customize the instance creation
5663
+ * @param options Options when creating an instance including id and params
5655
5664
  * @returns A promise that resolves with a handle for the Instance
5656
5665
  */
5657
- public create(options?: WorkflowInstanceCreateOptions): Promise<Instance>;
5666
+ public create(
5667
+ options?: WorkflowInstanceCreateOptions,
5668
+ ): Promise<WorkflowInstance>;
5658
5669
  }
5659
5670
  interface WorkflowInstanceCreateOptions {
5660
5671
  /**
5661
- * Name to create the instance of this Workflow with - it should always be unique
5672
+ * An id for your Workflow instance. Must be unique within the Workflow.
5662
5673
  */
5663
- name?: string;
5674
+ id?: string;
5664
5675
  /**
5665
- * The payload to send over to this instance, this is optional since you might need to pass params into the instance
5676
+ * The event payload the Workflow instance is triggered with
5666
5677
  */
5667
5678
  params?: unknown;
5668
5679
  }
@@ -5684,7 +5695,7 @@ interface WorkflowError {
5684
5695
  code?: number;
5685
5696
  message: string;
5686
5697
  }
5687
- declare abstract class Instance {
5698
+ declare abstract class WorkflowInstance {
5688
5699
  public id: string;
5689
5700
  /**
5690
5701
  * Pause the instance.
@@ -5695,9 +5706,9 @@ declare abstract class Instance {
5695
5706
  */
5696
5707
  public resume(): Promise<void>;
5697
5708
  /**
5698
- * Abort the instance. If it is errored, terminated or complete, an error will be thrown.
5709
+ * Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
5699
5710
  */
5700
- public abort(): Promise<void>;
5711
+ public terminate(): Promise<void>;
5701
5712
  /**
5702
5713
  * Restart the instance.
5703
5714
  */