@workers-community/workers-types 4.20250606.0 → 4.20250610.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.
Files changed (3) hide show
  1. package/index.d.ts +13 -2
  2. package/index.ts +13 -2
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -530,7 +530,7 @@ interface DurableObjectNamespace<
530
530
  jurisdiction: DurableObjectJurisdiction,
531
531
  ): DurableObjectNamespace<T>;
532
532
  }
533
- type DurableObjectJurisdiction = "eu" | "fedramp";
533
+ type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high";
534
534
  interface DurableObjectNamespaceNewUniqueIdOptions {
535
535
  jurisdiction?: DurableObjectJurisdiction;
536
536
  }
@@ -4276,7 +4276,7 @@ type AiModelListType = Record<string, any>;
4276
4276
  declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
4277
4277
  aiGatewayLogId: string | null;
4278
4278
  gateway(gatewayId: string): AiGateway;
4279
- autorag(autoragId: string): AutoRAG;
4279
+ autorag(autoragId?: string): AutoRAG;
4280
4280
  run<Name extends keyof AiModelList, Options extends AiOptions>(
4281
4281
  model: Name,
4282
4282
  inputs: AiModelList[Name]["inputs"],
@@ -4428,6 +4428,7 @@ declare abstract class AiGateway {
4428
4428
  interface AutoRAGInternalError extends Error {}
4429
4429
  interface AutoRAGNotFoundError extends Error {}
4430
4430
  interface AutoRAGUnauthorizedError extends Error {}
4431
+ interface AutoRAGNameNotSetError extends Error {}
4431
4432
  type ComparisonFilter = {
4432
4433
  key: string;
4433
4434
  type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
@@ -4472,10 +4473,20 @@ type AutoRagSearchResponse = {
4472
4473
  has_more: boolean;
4473
4474
  next_page: string | null;
4474
4475
  };
4476
+ type AutoRagListResponse = {
4477
+ id: string;
4478
+ enable: boolean;
4479
+ type: string;
4480
+ source: string;
4481
+ vectorize_name: string;
4482
+ paused: boolean;
4483
+ status: string;
4484
+ }[];
4475
4485
  type AutoRagAiSearchResponse = AutoRagSearchResponse & {
4476
4486
  response: string;
4477
4487
  };
4478
4488
  declare abstract class AutoRAG {
4489
+ list(): Promise<AutoRagListResponse>;
4479
4490
  search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
4480
4491
  aiSearch(params: AutoRagAiSearchRequestStreaming): Promise<Response>;
4481
4492
  aiSearch(params: AutoRagAiSearchRequest): Promise<AutoRagAiSearchResponse>;
package/index.ts CHANGED
@@ -535,7 +535,7 @@ export interface DurableObjectNamespace<
535
535
  jurisdiction: DurableObjectJurisdiction,
536
536
  ): DurableObjectNamespace<T>;
537
537
  }
538
- export type DurableObjectJurisdiction = "eu" | "fedramp";
538
+ export type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high";
539
539
  export interface DurableObjectNamespaceNewUniqueIdOptions {
540
540
  jurisdiction?: DurableObjectJurisdiction;
541
541
  }
@@ -4292,7 +4292,7 @@ export declare abstract class Ai<
4292
4292
  > {
4293
4293
  aiGatewayLogId: string | null;
4294
4294
  gateway(gatewayId: string): AiGateway;
4295
- autorag(autoragId: string): AutoRAG;
4295
+ autorag(autoragId?: string): AutoRAG;
4296
4296
  run<Name extends keyof AiModelList, Options extends AiOptions>(
4297
4297
  model: Name,
4298
4298
  inputs: AiModelList[Name]["inputs"],
@@ -4444,6 +4444,7 @@ export declare abstract class AiGateway {
4444
4444
  export interface AutoRAGInternalError extends Error {}
4445
4445
  export interface AutoRAGNotFoundError extends Error {}
4446
4446
  export interface AutoRAGUnauthorizedError extends Error {}
4447
+ export interface AutoRAGNameNotSetError extends Error {}
4447
4448
  export type ComparisonFilter = {
4448
4449
  key: string;
4449
4450
  type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
@@ -4488,10 +4489,20 @@ export type AutoRagSearchResponse = {
4488
4489
  has_more: boolean;
4489
4490
  next_page: string | null;
4490
4491
  };
4492
+ export type AutoRagListResponse = {
4493
+ id: string;
4494
+ enable: boolean;
4495
+ type: string;
4496
+ source: string;
4497
+ vectorize_name: string;
4498
+ paused: boolean;
4499
+ status: string;
4500
+ }[];
4491
4501
  export type AutoRagAiSearchResponse = AutoRagSearchResponse & {
4492
4502
  response: string;
4493
4503
  };
4494
4504
  export declare abstract class AutoRAG {
4505
+ list(): Promise<AutoRagListResponse>;
4495
4506
  search(params: AutoRagSearchRequest): Promise<AutoRagSearchResponse>;
4496
4507
  aiSearch(params: AutoRagAiSearchRequestStreaming): Promise<Response>;
4497
4508
  aiSearch(params: AutoRagAiSearchRequest): Promise<AutoRagAiSearchResponse>;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "author": "Workers Community",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20250606.0",
10
+ "version": "4.20250610.0",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./index.d.ts",