@workers-community/workers-types 4.20250812.0 → 4.20250816.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 +12 -5
  2. package/index.ts +12 -5
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -522,14 +522,14 @@ interface DurableObjectNamespace<
522
522
  ): DurableObjectId;
523
523
  idFromName(name: string): DurableObjectId;
524
524
  idFromString(id: string): DurableObjectId;
525
- getByName(
526
- name: string,
527
- options?: DurableObjectNamespaceGetDurableObjectOptions,
528
- ): DurableObjectStub;
529
525
  get(
530
526
  id: DurableObjectId,
531
527
  options?: DurableObjectNamespaceGetDurableObjectOptions,
532
528
  ): DurableObjectStub<T>;
529
+ getByName(
530
+ name: string,
531
+ options?: DurableObjectNamespaceGetDurableObjectOptions,
532
+ ): DurableObjectStub<T>;
533
533
  jurisdiction(
534
534
  jurisdiction: DurableObjectJurisdiction,
535
535
  ): DurableObjectNamespace<T>;
@@ -6009,6 +6009,12 @@ type GatewayOptions = {
6009
6009
  requestTimeoutMs?: number;
6010
6010
  retries?: GatewayRetries;
6011
6011
  };
6012
+ type UniversalGatewayOptions = Exclude<GatewayOptions, "id"> & {
6013
+ /**
6014
+ ** @deprecated
6015
+ */
6016
+ id?: string;
6017
+ };
6012
6018
  type AiGatewayPatchLog = {
6013
6019
  score?: number | null;
6014
6020
  feedback?: -1 | 1 | null;
@@ -6102,7 +6108,7 @@ declare abstract class AiGateway {
6102
6108
  run(
6103
6109
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
6104
6110
  options?: {
6105
- gateway?: GatewayOptions;
6111
+ gateway?: UniversalGatewayOptions;
6106
6112
  extraHeaders?: object;
6107
6113
  },
6108
6114
  ): Promise<Response>;
@@ -6133,6 +6139,7 @@ type AutoRagSearchRequest = {
6133
6139
  };
6134
6140
  type AutoRagAiSearchRequest = AutoRagSearchRequest & {
6135
6141
  stream?: boolean;
6142
+ system_prompt?: string;
6136
6143
  };
6137
6144
  type AutoRagAiSearchRequestStreaming = Omit<
6138
6145
  AutoRagAiSearchRequest,
package/index.ts CHANGED
@@ -527,14 +527,14 @@ export interface DurableObjectNamespace<
527
527
  ): DurableObjectId;
528
528
  idFromName(name: string): DurableObjectId;
529
529
  idFromString(id: string): DurableObjectId;
530
- getByName(
531
- name: string,
532
- options?: DurableObjectNamespaceGetDurableObjectOptions,
533
- ): DurableObjectStub;
534
530
  get(
535
531
  id: DurableObjectId,
536
532
  options?: DurableObjectNamespaceGetDurableObjectOptions,
537
533
  ): DurableObjectStub<T>;
534
+ getByName(
535
+ name: string,
536
+ options?: DurableObjectNamespaceGetDurableObjectOptions,
537
+ ): DurableObjectStub<T>;
538
538
  jurisdiction(
539
539
  jurisdiction: DurableObjectJurisdiction,
540
540
  ): DurableObjectNamespace<T>;
@@ -6024,6 +6024,12 @@ export type GatewayOptions = {
6024
6024
  requestTimeoutMs?: number;
6025
6025
  retries?: GatewayRetries;
6026
6026
  };
6027
+ export type UniversalGatewayOptions = Exclude<GatewayOptions, "id"> & {
6028
+ /**
6029
+ ** @deprecated
6030
+ */
6031
+ id?: string;
6032
+ };
6027
6033
  export type AiGatewayPatchLog = {
6028
6034
  score?: number | null;
6029
6035
  feedback?: -1 | 1 | null;
@@ -6117,7 +6123,7 @@ export declare abstract class AiGateway {
6117
6123
  run(
6118
6124
  data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[],
6119
6125
  options?: {
6120
- gateway?: GatewayOptions;
6126
+ gateway?: UniversalGatewayOptions;
6121
6127
  extraHeaders?: object;
6122
6128
  },
6123
6129
  ): Promise<Response>;
@@ -6148,6 +6154,7 @@ export type AutoRagSearchRequest = {
6148
6154
  };
6149
6155
  export type AutoRagAiSearchRequest = AutoRagSearchRequest & {
6150
6156
  stream?: boolean;
6157
+ system_prompt?: string;
6151
6158
  };
6152
6159
  export type AutoRagAiSearchRequestStreaming = Omit<
6153
6160
  AutoRagAiSearchRequest,
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.20250812.0",
10
+ "version": "4.20250816.0",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./index.d.ts",