@chainfuse/types 2.10.2 → 2.10.4
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/dist/ai-tools/index.d.ts +10 -10
- package/dist/ai-tools/index.js +7 -8
- package/dist/d1/index.d.ts +0 -2
- package/dist/d1/index.js +1 -2
- package/dist/index.d.ts +1 -13
- package/dist/index.js +0 -10
- package/dist/wf/index.d.ts +0 -1
- package/dist/wf/index.js +0 -5
- package/dist/zod/index.d.ts +11 -0
- package/dist/zod/index.js +11 -0
- package/package.json +17 -9
- package/dist/discourse/index.d.ts +0 -2
- package/dist/discourse/index.js +0 -2
package/dist/ai-tools/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { EnumOrEnumLike } from '../index.js';
|
|
3
|
+
import type { ZodCoordinate } from '../zod/index.js';
|
|
3
4
|
import { type CloudflareFunctionModelsEnum, type CloudflareModelsEnum } from './workers-ai/index.js';
|
|
4
5
|
export interface Coordinate {
|
|
5
|
-
lat:
|
|
6
|
-
lon:
|
|
6
|
+
lat: z.infer<typeof ZodCoordinate>;
|
|
7
|
+
lon: z.infer<typeof ZodCoordinate>;
|
|
7
8
|
}
|
|
8
9
|
export declare namespace AiModels {
|
|
9
10
|
namespace LanguageModels {
|
|
@@ -19,15 +20,16 @@ export declare namespace AiModels {
|
|
|
19
20
|
}
|
|
20
21
|
const Cloudflare: Readonly<CloudflareModelsEnum<"Text Generation">>;
|
|
21
22
|
const CloudflareFunctions: Readonly<CloudflareFunctionModelsEnum>;
|
|
23
|
+
/**
|
|
24
|
+
* @link https://ai.google.dev/gemini-api/docs/models
|
|
25
|
+
*/
|
|
22
26
|
enum GoogleGenerativeAi {
|
|
23
27
|
gemini_flash_lite = "google.generative-ai:gemini-2.0-flash-lite",
|
|
24
28
|
gemini_flash_lite_search = "google.generative-ai:gemini-2.0-flash-lite:search",
|
|
25
|
-
gemini_flash = "google.generative-ai:gemini-2.
|
|
26
|
-
gemini_flash_search = "google.generative-ai:gemini-2.
|
|
27
|
-
gemini_pro = "google.generative-ai:gemini-2.
|
|
28
|
-
gemini_pro_search = "google.generative-ai:gemini-2.
|
|
29
|
-
gemini_flash_think = "google.generative-ai:gemini-2.0-flash-thinking-exp",
|
|
30
|
-
gemini_flash_think_search = "google.generative-ai:gemini-2.0-flash-thinking-exp:search"
|
|
29
|
+
gemini_flash = "google.generative-ai:gemini-2.5-flash-preview",
|
|
30
|
+
gemini_flash_search = "google.generative-ai:gemini-2.5-flash-preview:search",
|
|
31
|
+
gemini_pro = "google.generative-ai:gemini-2.5-pro-preview",
|
|
32
|
+
gemini_pro_search = "google.generative-ai:gemini-2.5-pro-preview:search"
|
|
31
33
|
}
|
|
32
34
|
enum OpenAi {
|
|
33
35
|
gpt3 = "openai:gpt-3.5-turbo",
|
|
@@ -82,5 +84,3 @@ export declare const default_mc_sentiment: LanguageModelValues;
|
|
|
82
84
|
export declare const default_mc_safety: LanguageModelValues;
|
|
83
85
|
export declare const default_mc_image: ImageModelValues;
|
|
84
86
|
export declare const default_mc_embedding: TextEmbeddingModelValues;
|
|
85
|
-
export * from './azure/index.js';
|
|
86
|
-
export * from './workers-ai/index.js';
|
package/dist/ai-tools/index.js
CHANGED
|
@@ -20,16 +20,17 @@ export var AiModels;
|
|
|
20
20
|
// export const CloudflareClassification = Object.freeze(Object.fromEntries(enabledCloudflareLlmClassificationProviders.map((model) => [model, `workersai:${model}`])) as unknown as CloudflareModelsEnum<'Text Classification'>);
|
|
21
21
|
LanguageModels.Cloudflare = Object.freeze(Object.fromEntries(enabledCloudflareLlmProviders.map((model) => [model, `workersai:${model}`])));
|
|
22
22
|
LanguageModels.CloudflareFunctions = Object.freeze(Object.fromEntries(enabledCloudflareLlmFunctionProviders.map((model) => [model, `workersai:${model}`])));
|
|
23
|
+
/**
|
|
24
|
+
* @link https://ai.google.dev/gemini-api/docs/models
|
|
25
|
+
*/
|
|
23
26
|
let GoogleGenerativeAi;
|
|
24
27
|
(function (GoogleGenerativeAi) {
|
|
25
28
|
GoogleGenerativeAi["gemini_flash_lite"] = "google.generative-ai:gemini-2.0-flash-lite";
|
|
26
29
|
GoogleGenerativeAi["gemini_flash_lite_search"] = "google.generative-ai:gemini-2.0-flash-lite:search";
|
|
27
|
-
GoogleGenerativeAi["gemini_flash"] = "google.generative-ai:gemini-2.
|
|
28
|
-
GoogleGenerativeAi["gemini_flash_search"] = "google.generative-ai:gemini-2.
|
|
29
|
-
GoogleGenerativeAi["gemini_pro"] = "google.generative-ai:gemini-2.
|
|
30
|
-
GoogleGenerativeAi["gemini_pro_search"] = "google.generative-ai:gemini-2.
|
|
31
|
-
GoogleGenerativeAi["gemini_flash_think"] = "google.generative-ai:gemini-2.0-flash-thinking-exp";
|
|
32
|
-
GoogleGenerativeAi["gemini_flash_think_search"] = "google.generative-ai:gemini-2.0-flash-thinking-exp:search";
|
|
30
|
+
GoogleGenerativeAi["gemini_flash"] = "google.generative-ai:gemini-2.5-flash-preview";
|
|
31
|
+
GoogleGenerativeAi["gemini_flash_search"] = "google.generative-ai:gemini-2.5-flash-preview:search";
|
|
32
|
+
GoogleGenerativeAi["gemini_pro"] = "google.generative-ai:gemini-2.5-pro-preview";
|
|
33
|
+
GoogleGenerativeAi["gemini_pro_search"] = "google.generative-ai:gemini-2.5-pro-preview:search";
|
|
33
34
|
})(GoogleGenerativeAi = LanguageModels.GoogleGenerativeAi || (LanguageModels.GoogleGenerativeAi = {}));
|
|
34
35
|
let OpenAi;
|
|
35
36
|
(function (OpenAi) {
|
|
@@ -102,5 +103,3 @@ export const default_mc_sentiment = AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
|
102
103
|
export const default_mc_safety = AiModels.LanguageModels.Cloudflare['@hf/thebloke/llamaguard-7b-awq'];
|
|
103
104
|
export const default_mc_image = AiModels.ImageModels.Cloudflare['@cf/stabilityai/stable-diffusion-xl-base-1.0'];
|
|
104
105
|
export const default_mc_embedding = AiModels.TextEmbeddingModels.Cloudflare['@cf/baai/bge-large-en-v1.5'];
|
|
105
|
-
export * from './azure/index.js';
|
|
106
|
-
export * from './workers-ai/index.js';
|
package/dist/d1/index.d.ts
CHANGED
|
@@ -13,5 +13,3 @@ export type ISODateString = `${number}-${number}-${number}T${number}:${number}:$
|
|
|
13
13
|
* Supports any format supported by `cron-parser` library @link https://www.npmjs.com/package/cron-parser#supported-format
|
|
14
14
|
*/
|
|
15
15
|
export type CronString = `${string | number} ${string | number} ${string | number} ${string | number} ${string | number}` | `${string | number} ${string | number} ${string | number} ${string | number} ${string | number} ${string | number}`;
|
|
16
|
-
export * from './tenants/index.js';
|
|
17
|
-
export * from './users/index.js';
|
package/dist/d1/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './users/index.js';
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
export type EnumOrEnumLike<T> = T extends Record<string, infer V> ? V : T extends Readonly<Record<string, infer V>> ? V : never;
|
|
3
2
|
export type NamespaceEnumObject<T> = {
|
|
4
3
|
[K in keyof T as EnumOrEnumLike<T[K]> extends never ? never : K]?: T[K] extends Record<any, any> ? T[K][keyof T[K]] : never;
|
|
@@ -70,15 +69,4 @@ export declare enum DOLocations {
|
|
|
70
69
|
'Africa' = "afr",
|
|
71
70
|
'Middle East' = "me"
|
|
72
71
|
}
|
|
73
|
-
|
|
74
|
-
* @link https://zod.dev/?id=json-type
|
|
75
|
-
*/
|
|
76
|
-
declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
77
|
-
type Json = z.infer<typeof literalSchema> | {
|
|
78
|
-
[key: string]: Json;
|
|
79
|
-
} | Json[];
|
|
80
|
-
export declare const jsonSchema: z.ZodType<Json>;
|
|
81
|
-
export * from './ai-tools/index.js';
|
|
82
|
-
export * from './d0/index.js';
|
|
83
|
-
export * from './d1/index.js';
|
|
84
|
-
export * from './discourse/index.js';
|
|
72
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
/**
|
|
3
2
|
* @link https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction
|
|
4
3
|
*/
|
|
@@ -22,12 +21,3 @@ export var DOLocations;
|
|
|
22
21
|
DOLocations["Africa"] = "afr";
|
|
23
22
|
DOLocations["Middle East"] = "me";
|
|
24
23
|
})(DOLocations || (DOLocations = {}));
|
|
25
|
-
/**
|
|
26
|
-
* @link https://zod.dev/?id=json-type
|
|
27
|
-
*/
|
|
28
|
-
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
29
|
-
export const jsonSchema = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]));
|
|
30
|
-
export * from './ai-tools/index.js';
|
|
31
|
-
export * from './d0/index.js';
|
|
32
|
-
export * from './d1/index.js';
|
|
33
|
-
export * from './discourse/index.js';
|
package/dist/wf/index.d.ts
CHANGED
package/dist/wf/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @link https://zod.dev/?id=json-type
|
|
4
|
+
*/
|
|
5
|
+
declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
6
|
+
type Json = z.infer<typeof literalSchema> | {
|
|
7
|
+
[key: string]: Json;
|
|
8
|
+
} | Json[];
|
|
9
|
+
export declare const jsonSchema: z.ZodType<Json>;
|
|
10
|
+
export declare const ZodCoordinate: z.ZodString;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @link https://zod.dev/?id=json-type
|
|
4
|
+
*/
|
|
5
|
+
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
6
|
+
export const jsonSchema = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]));
|
|
7
|
+
export const ZodCoordinate = z
|
|
8
|
+
.string()
|
|
9
|
+
.trim()
|
|
10
|
+
.min(3)
|
|
11
|
+
.regex(new RegExp(/^-?\d+\.\d+$/i));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -47,11 +47,19 @@
|
|
|
47
47
|
"import": "./dist/ai-tools/index.js",
|
|
48
48
|
"types": "./dist/ai-tools/index.d.ts"
|
|
49
49
|
},
|
|
50
|
-
"./ai-tools/
|
|
50
|
+
"./ai-tools/azure": {
|
|
51
|
+
"import": "./dist/ai-tools/azure/index.js",
|
|
52
|
+
"types": "./dist/ai-tools/azure/index.d.ts"
|
|
53
|
+
},
|
|
54
|
+
"./ai-tools/azure/catalog": {
|
|
51
55
|
"import": "./dist/ai-tools/azure/catalog.js",
|
|
52
56
|
"types": "./dist/ai-tools/azure/catalog.d.ts"
|
|
53
57
|
},
|
|
54
|
-
"./ai-tools/
|
|
58
|
+
"./ai-tools/workers-ai": {
|
|
59
|
+
"import": "./dist/ai-tools/workers-ai/index.js",
|
|
60
|
+
"types": "./dist/ai-tools/workers-ai/index.d.ts"
|
|
61
|
+
},
|
|
62
|
+
"./ai-tools/workers-ai/catalog": {
|
|
55
63
|
"import": "./dist/ai-tools/workers-ai/catalog.js",
|
|
56
64
|
"types": "./dist/ai-tools/workers-ai/catalog.d.ts"
|
|
57
65
|
},
|
|
@@ -71,10 +79,6 @@
|
|
|
71
79
|
"import": "./dist/d1/users/index.js",
|
|
72
80
|
"types": "./dist/d1/users/index.d.ts"
|
|
73
81
|
},
|
|
74
|
-
"./discourse": {
|
|
75
|
-
"import": "./dist/discourse/index.js",
|
|
76
|
-
"types": "./dist/discourse/index.d.ts"
|
|
77
|
-
},
|
|
78
82
|
"./discourse/post": {
|
|
79
83
|
"import": "./dist/discourse/post/index.js",
|
|
80
84
|
"types": "./dist/discourse/post/index.d.ts"
|
|
@@ -86,6 +90,10 @@
|
|
|
86
90
|
"./wf": {
|
|
87
91
|
"import": "./dist/wf/index.js",
|
|
88
92
|
"types": "./dist/wf/index.d.ts"
|
|
93
|
+
},
|
|
94
|
+
"./zod": {
|
|
95
|
+
"import": "./dist/zod/index.js",
|
|
96
|
+
"types": "./dist/zod/index.d.ts"
|
|
89
97
|
}
|
|
90
98
|
},
|
|
91
99
|
"prettier": "@demosjarco/prettier-config",
|
|
@@ -94,8 +102,8 @@
|
|
|
94
102
|
"zod": "^3.24.3"
|
|
95
103
|
},
|
|
96
104
|
"devDependencies": {
|
|
97
|
-
"@cloudflare/workers-types": "^4.
|
|
105
|
+
"@cloudflare/workers-types": "^4.20250423.0",
|
|
98
106
|
"@types/validator": "^13.15.0"
|
|
99
107
|
},
|
|
100
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "f9b0e6a8fb3f328c94929ca88590de730ffff860"
|
|
101
109
|
}
|
package/dist/discourse/index.js
DELETED