@chainfuse/types 4.0.3 → 4.0.5
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 +115 -9
- package/dist/ai-tools/index.js +8 -4
- package/dist/ai-tools/workers-ai/catalog.d.ts +51 -0
- package/dist/ai-tools/workers-ai/catalog.js +62 -0
- package/dist/zod-4/index.d.ts +22 -22
- package/dist/zod-4/index.js +39 -38
- package/dist/zod-mini/index.d.ts +27 -27
- package/dist/zod-mini/index.js +43 -42
- package/package.json +3 -3
package/dist/ai-tools/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as zm from 'zod/mini';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
2
3
|
import type { ZodCoordinate } from '../zod-mini/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: zm.infer<typeof ZodCoordinate>;
|
|
7
|
+
lon: zm.infer<typeof ZodCoordinate>;
|
|
7
8
|
}
|
|
8
9
|
export declare namespace AiModels {
|
|
9
10
|
namespace LanguageModels {
|
|
@@ -76,7 +77,7 @@ export declare namespace AiModels {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
export declare const ZodLanguageModelValues:
|
|
80
|
+
export declare const ZodLanguageModelValues: zm.ZodMiniEnum<{
|
|
80
81
|
"workersai:@cf/openai/gpt-oss-120b": "workersai:@cf/openai/gpt-oss-120b";
|
|
81
82
|
"workersai:@cf/qwen/qwen1.5-0.5b-chat": "workersai:@cf/qwen/qwen1.5-0.5b-chat";
|
|
82
83
|
"workersai:@cf/google/gemma-2b-it-lora": "workersai:@cf/google/gemma-2b-it-lora";
|
|
@@ -109,6 +110,7 @@ export declare const ZodLanguageModelValues: z.ZodMiniEnum<{
|
|
|
109
110
|
"workersai:@cf/deepseek-ai/deepseek-math-7b-instruct": "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct";
|
|
110
111
|
"workersai:@cf/tiiuae/falcon-7b-instruct": "workersai:@cf/tiiuae/falcon-7b-instruct";
|
|
111
112
|
"workersai:@hf/nousresearch/hermes-2-pro-mistral-7b": "workersai:@hf/nousresearch/hermes-2-pro-mistral-7b";
|
|
113
|
+
"workersai:@cf/aisingapore/gemma-sea-lion-v4-27b-it": "workersai:@cf/aisingapore/gemma-sea-lion-v4-27b-it";
|
|
112
114
|
"workersai:@cf/meta/llama-3.1-8b-instruct-awq": "workersai:@cf/meta/llama-3.1-8b-instruct-awq";
|
|
113
115
|
"workersai:@hf/thebloke/zephyr-7b-beta-awq": "workersai:@hf/thebloke/zephyr-7b-beta-awq";
|
|
114
116
|
"workersai:@cf/google/gemma-7b-it-lora": "workersai:@cf/google/gemma-7b-it-lora";
|
|
@@ -151,8 +153,84 @@ export declare const ZodLanguageModelValues: z.ZodMiniEnum<{
|
|
|
151
153
|
"openai:o1": AiModels.LanguageModels.OpenAi.o1;
|
|
152
154
|
"openai:o3": AiModels.LanguageModels.OpenAi.o3;
|
|
153
155
|
}>;
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
+
export declare const ZodLanguageModelValues4: z4.ZodEnum<{
|
|
157
|
+
"workersai:@cf/openai/gpt-oss-120b": "workersai:@cf/openai/gpt-oss-120b";
|
|
158
|
+
"workersai:@cf/qwen/qwen1.5-0.5b-chat": "workersai:@cf/qwen/qwen1.5-0.5b-chat";
|
|
159
|
+
"workersai:@cf/google/gemma-2b-it-lora": "workersai:@cf/google/gemma-2b-it-lora";
|
|
160
|
+
"workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
|
|
161
|
+
"workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
|
|
162
|
+
"workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
|
|
163
|
+
"workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
|
|
164
|
+
"workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
|
|
165
|
+
"workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
|
|
166
|
+
"workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
|
|
167
|
+
"workersai:@cf/mistral/mistral-7b-instruct-v0.1": "workersai:@cf/mistral/mistral-7b-instruct-v0.1";
|
|
168
|
+
"workersai:@cf/mistral/mistral-7b-instruct-v0.2-lora": "workersai:@cf/mistral/mistral-7b-instruct-v0.2-lora";
|
|
169
|
+
"workersai:@cf/tinyllama/tinyllama-1.1b-chat-v1.0": "workersai:@cf/tinyllama/tinyllama-1.1b-chat-v1.0";
|
|
170
|
+
"workersai:@hf/mistral/mistral-7b-instruct-v0.2": "workersai:@hf/mistral/mistral-7b-instruct-v0.2";
|
|
171
|
+
"workersai:@cf/fblgit/una-cybertron-7b-v2-bf16": "workersai:@cf/fblgit/una-cybertron-7b-v2-bf16";
|
|
172
|
+
"workersai:@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": "workersai:@cf/deepseek-ai/deepseek-r1-distill-qwen-32b";
|
|
173
|
+
"workersai:@cf/thebloke/discolm-german-7b-v1-awq": "workersai:@cf/thebloke/discolm-german-7b-v1-awq";
|
|
174
|
+
"workersai:@cf/meta/llama-2-7b-chat-int8": "workersai:@cf/meta/llama-2-7b-chat-int8";
|
|
175
|
+
"workersai:@cf/meta/llama-3.1-8b-instruct-fp8": "workersai:@cf/meta/llama-3.1-8b-instruct-fp8";
|
|
176
|
+
"workersai:@hf/thebloke/mistral-7b-instruct-v0.1-awq": "workersai:@hf/thebloke/mistral-7b-instruct-v0.1-awq";
|
|
177
|
+
"workersai:@cf/qwen/qwen1.5-7b-chat-awq": "workersai:@cf/qwen/qwen1.5-7b-chat-awq";
|
|
178
|
+
"workersai:@cf/meta/llama-3.2-1b-instruct": "workersai:@cf/meta/llama-3.2-1b-instruct";
|
|
179
|
+
"workersai:@hf/thebloke/llama-2-13b-chat-awq": "workersai:@hf/thebloke/llama-2-13b-chat-awq";
|
|
180
|
+
"workersai:@hf/thebloke/deepseek-coder-6.7b-base-awq": "workersai:@hf/thebloke/deepseek-coder-6.7b-base-awq";
|
|
181
|
+
"workersai:@cf/meta-llama/llama-2-7b-chat-hf-lora": "workersai:@cf/meta-llama/llama-2-7b-chat-hf-lora";
|
|
182
|
+
"workersai:@cf/meta/llama-3.3-70b-instruct-fp8-fast": "workersai:@cf/meta/llama-3.3-70b-instruct-fp8-fast";
|
|
183
|
+
"workersai:@hf/thebloke/openhermes-2.5-mistral-7b-awq": "workersai:@hf/thebloke/openhermes-2.5-mistral-7b-awq";
|
|
184
|
+
"workersai:@hf/thebloke/deepseek-coder-6.7b-instruct-awq": "workersai:@hf/thebloke/deepseek-coder-6.7b-instruct-awq";
|
|
185
|
+
"workersai:@cf/qwen/qwen2.5-coder-32b-instruct": "workersai:@cf/qwen/qwen2.5-coder-32b-instruct";
|
|
186
|
+
"workersai:@cf/deepseek-ai/deepseek-math-7b-instruct": "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct";
|
|
187
|
+
"workersai:@cf/tiiuae/falcon-7b-instruct": "workersai:@cf/tiiuae/falcon-7b-instruct";
|
|
188
|
+
"workersai:@hf/nousresearch/hermes-2-pro-mistral-7b": "workersai:@hf/nousresearch/hermes-2-pro-mistral-7b";
|
|
189
|
+
"workersai:@cf/aisingapore/gemma-sea-lion-v4-27b-it": "workersai:@cf/aisingapore/gemma-sea-lion-v4-27b-it";
|
|
190
|
+
"workersai:@cf/meta/llama-3.1-8b-instruct-awq": "workersai:@cf/meta/llama-3.1-8b-instruct-awq";
|
|
191
|
+
"workersai:@hf/thebloke/zephyr-7b-beta-awq": "workersai:@hf/thebloke/zephyr-7b-beta-awq";
|
|
192
|
+
"workersai:@cf/google/gemma-7b-it-lora": "workersai:@cf/google/gemma-7b-it-lora";
|
|
193
|
+
"workersai:@cf/qwen/qwen1.5-1.8b-chat": "workersai:@cf/qwen/qwen1.5-1.8b-chat";
|
|
194
|
+
"workersai:@cf/mistralai/mistral-small-3.1-24b-instruct": "workersai:@cf/mistralai/mistral-small-3.1-24b-instruct";
|
|
195
|
+
"workersai:@cf/meta/llama-3-8b-instruct-awq": "workersai:@cf/meta/llama-3-8b-instruct-awq";
|
|
196
|
+
"workersai:@cf/meta/llama-3.2-11b-vision-instruct": "workersai:@cf/meta/llama-3.2-11b-vision-instruct";
|
|
197
|
+
"workersai:@cf/defog/sqlcoder-7b-2": "workersai:@cf/defog/sqlcoder-7b-2";
|
|
198
|
+
"workersai:@cf/microsoft/phi-2": "workersai:@cf/microsoft/phi-2";
|
|
199
|
+
"workersai:@cf/openai/gpt-oss-20b": "workersai:@cf/openai/gpt-oss-20b";
|
|
200
|
+
"workersai:@hf/google/gemma-7b-it": "workersai:@hf/google/gemma-7b-it";
|
|
201
|
+
"workersai:@cf/qwen/qwen1.5-14b-chat-awq": "workersai:@cf/qwen/qwen1.5-14b-chat-awq";
|
|
202
|
+
"workersai:@cf/openchat/openchat-3.5-0106": "workersai:@cf/openchat/openchat-3.5-0106";
|
|
203
|
+
"workersai:@cf/meta/llama-4-scout-17b-16e-instruct": "workersai:@cf/meta/llama-4-scout-17b-16e-instruct";
|
|
204
|
+
"workersai:@cf/google/gemma-3-12b-it": "workersai:@cf/google/gemma-3-12b-it";
|
|
205
|
+
"workersai:@cf/qwen/qwq-32b": "workersai:@cf/qwen/qwq-32b";
|
|
206
|
+
"azure:gpt-4.1-nano": AiModels.LanguageModels.Azure.gpt41_nano;
|
|
207
|
+
"azure:gpt-4o-mini": AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
208
|
+
"azure:gpt-4.1-mini": AiModels.LanguageModels.Azure.gpt41_mini;
|
|
209
|
+
"azure:o1-mini": AiModels.LanguageModels.Azure.o1_mini;
|
|
210
|
+
"azure:o3-mini": AiModels.LanguageModels.Azure.o3_mini;
|
|
211
|
+
"azure:o4-mini": AiModels.LanguageModels.Azure.o4_mini;
|
|
212
|
+
"azure:gpt-4o": AiModels.LanguageModels.Azure.gpt4o;
|
|
213
|
+
"azure:gpt-4.1": AiModels.LanguageModels.Azure.gpt41;
|
|
214
|
+
"azure:o1": AiModels.LanguageModels.Azure.o1;
|
|
215
|
+
"azure:o3": AiModels.LanguageModels.Azure.o3;
|
|
216
|
+
"anthropic:claude-4-sonnet-latest": AiModels.LanguageModels.Anthropic.sonnet;
|
|
217
|
+
"anthropic:claude-4-opus-latest": AiModels.LanguageModels.Anthropic.haiku;
|
|
218
|
+
"google.generative-ai:gemini-2.0-flash-lite": AiModels.LanguageModels.GoogleGenerativeAi.gemini_flash_lite;
|
|
219
|
+
"google.generative-ai:gemini-2.5-flash-preview": AiModels.LanguageModels.GoogleGenerativeAi.gemini_flash;
|
|
220
|
+
"google.generative-ai:gemini-2.5-pro-preview": AiModels.LanguageModels.GoogleGenerativeAi.gemini_pro;
|
|
221
|
+
"openai:gpt-4.1-nano": AiModels.LanguageModels.OpenAi.gpt41_nano;
|
|
222
|
+
"openai:gpt-4o-mini": AiModels.LanguageModels.OpenAi.gpt4o_mini;
|
|
223
|
+
"openai:gpt-4.1-mini": AiModels.LanguageModels.OpenAi.gpt41_mini;
|
|
224
|
+
"openai:o1-mini": AiModels.LanguageModels.OpenAi.o1_mini;
|
|
225
|
+
"openai:o3-mini": AiModels.LanguageModels.OpenAi.o3_mini;
|
|
226
|
+
"openai:o4-mini": AiModels.LanguageModels.OpenAi.o4_mini;
|
|
227
|
+
"openai:gpt-4o": AiModels.LanguageModels.OpenAi.gpt4o;
|
|
228
|
+
"openai:gpt-4.1": AiModels.LanguageModels.OpenAi.gpt41;
|
|
229
|
+
"openai:o1": AiModels.LanguageModels.OpenAi.o1;
|
|
230
|
+
"openai:o3": AiModels.LanguageModels.OpenAi.o3;
|
|
231
|
+
}>;
|
|
232
|
+
export type LanguageModelValues = zm.infer<typeof ZodLanguageModelValues>;
|
|
233
|
+
export declare const ZodImageModelValues: zm.ZodMiniEnum<{
|
|
156
234
|
"workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting": "workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting";
|
|
157
235
|
"workersai:@cf/black-forest-labs/flux-1-schnell": "workersai:@cf/black-forest-labs/flux-1-schnell";
|
|
158
236
|
"workersai:@cf/bytedance/stable-diffusion-xl-lightning": "workersai:@cf/bytedance/stable-diffusion-xl-lightning";
|
|
@@ -166,9 +244,37 @@ export declare const ZodImageModelValues: z.ZodMiniEnum<{
|
|
|
166
244
|
"google.generative-ai:imagen-3.0-fast-generate-001": AiModels.ImageModels.GoogleGenerativeAi.imagen_fast;
|
|
167
245
|
"openai:dall-e-3": AiModels.ImageModels.OpenAi.dalle3;
|
|
168
246
|
}>;
|
|
169
|
-
export
|
|
170
|
-
|
|
247
|
+
export declare const ZodImageModelValues4: z4.ZodEnum<{
|
|
248
|
+
"workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting": "workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting";
|
|
249
|
+
"workersai:@cf/black-forest-labs/flux-1-schnell": "workersai:@cf/black-forest-labs/flux-1-schnell";
|
|
250
|
+
"workersai:@cf/bytedance/stable-diffusion-xl-lightning": "workersai:@cf/bytedance/stable-diffusion-xl-lightning";
|
|
251
|
+
"workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
|
|
252
|
+
"workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
|
|
253
|
+
"workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
|
|
254
|
+
"workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
|
|
255
|
+
"workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
|
|
256
|
+
"azure:dall-e-3": AiModels.ImageModels.Azure.dalle3;
|
|
257
|
+
"google.generative-ai:imagen-3.0-generate-002": AiModels.ImageModels.GoogleGenerativeAi.imagen;
|
|
258
|
+
"google.generative-ai:imagen-3.0-fast-generate-001": AiModels.ImageModels.GoogleGenerativeAi.imagen_fast;
|
|
259
|
+
"openai:dall-e-3": AiModels.ImageModels.OpenAi.dalle3;
|
|
260
|
+
}>;
|
|
261
|
+
export type ImageModelValues = zm.infer<typeof ZodImageModelValues>;
|
|
262
|
+
export declare const ZodTextEmbeddingModelValues: zm.ZodMiniEnum<{
|
|
263
|
+
"workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
|
|
264
|
+
"workersai:@cf/pfnet/plamo-embedding-1b": "workersai:@cf/pfnet/plamo-embedding-1b";
|
|
265
|
+
"workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
|
|
266
|
+
"workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
|
|
267
|
+
"workersai:@cf/google/embeddinggemma-300m": "workersai:@cf/google/embeddinggemma-300m";
|
|
268
|
+
"workersai:@cf/baai/bge-large-en-v1.5": "workersai:@cf/baai/bge-large-en-v1.5";
|
|
269
|
+
"azure:text-embedding-3-large": AiModels.TextEmbeddingModels.Azure.te3_large;
|
|
270
|
+
"azure:text-embedding-3-small": AiModels.TextEmbeddingModels.Azure.te3_small;
|
|
271
|
+
"google.generative-ai:text-embedding-004": AiModels.TextEmbeddingModels.GoogleGenerativeAi.te4;
|
|
272
|
+
"openai:text-embedding-3-large": AiModels.TextEmbeddingModels.OpenAi.te3_large;
|
|
273
|
+
"openai:text-embedding-3-small": AiModels.TextEmbeddingModels.OpenAi.te3_small;
|
|
274
|
+
}>;
|
|
275
|
+
export declare const ZodTextEmbeddingModelValues4: z4.ZodEnum<{
|
|
171
276
|
"workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
|
|
277
|
+
"workersai:@cf/pfnet/plamo-embedding-1b": "workersai:@cf/pfnet/plamo-embedding-1b";
|
|
172
278
|
"workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
|
|
173
279
|
"workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
|
|
174
280
|
"workersai:@cf/google/embeddinggemma-300m": "workersai:@cf/google/embeddinggemma-300m";
|
|
@@ -179,7 +285,7 @@ export declare const ZodTextEmbeddingModelValues: z.ZodMiniEnum<{
|
|
|
179
285
|
"openai:text-embedding-3-large": AiModels.TextEmbeddingModels.OpenAi.te3_large;
|
|
180
286
|
"openai:text-embedding-3-small": AiModels.TextEmbeddingModels.OpenAi.te3_small;
|
|
181
287
|
}>;
|
|
182
|
-
export type TextEmbeddingModelValues =
|
|
288
|
+
export type TextEmbeddingModelValues = zm.infer<typeof ZodTextEmbeddingModelValues>;
|
|
183
289
|
export declare const default_mc_generic: LanguageModelValues;
|
|
184
290
|
export declare const default_mc_summary: LanguageModelValues;
|
|
185
291
|
export declare const default_mc_extraction: LanguageModelValues;
|
package/dist/ai-tools/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as zm from 'zod/mini';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
2
3
|
import { enabledCloudflareLlmEmbeddingProviders, enabledCloudflareLlmFunctionProviders, enabledCloudflareLlmImageProviders, enabledCloudflareLlmProviders } from './workers-ai/index.js';
|
|
3
4
|
export var AiModels;
|
|
4
5
|
(function (AiModels) {
|
|
@@ -91,17 +92,20 @@ const ZodLanguageModelValuesRaw = Object.entries(AiModels.LanguageModels).reduce
|
|
|
91
92
|
acc.push(value);
|
|
92
93
|
return acc;
|
|
93
94
|
}, []);
|
|
94
|
-
export const ZodLanguageModelValues =
|
|
95
|
+
export const ZodLanguageModelValues = zm.enum(Object.values(Object.assign({}, ...ZodLanguageModelValuesRaw)));
|
|
96
|
+
export const ZodLanguageModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodLanguageModelValuesRaw)));
|
|
95
97
|
const ZodImageModelValuesRaw = Object.entries(AiModels.ImageModels).reduce((acc, [, value]) => {
|
|
96
98
|
acc.push(value);
|
|
97
99
|
return acc;
|
|
98
100
|
}, []);
|
|
99
|
-
export const ZodImageModelValues =
|
|
101
|
+
export const ZodImageModelValues = zm.enum(Object.values(Object.assign({}, ...ZodImageModelValuesRaw)));
|
|
102
|
+
export const ZodImageModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodImageModelValuesRaw)));
|
|
100
103
|
const ZodTextEmbeddingModelValuesRaw = Object.entries(AiModels.TextEmbeddingModels).reduce((acc, [, value]) => {
|
|
101
104
|
acc.push(value);
|
|
102
105
|
return acc;
|
|
103
106
|
}, []);
|
|
104
|
-
export const ZodTextEmbeddingModelValues =
|
|
107
|
+
export const ZodTextEmbeddingModelValues = zm.enum(Object.values(Object.assign({}, ...ZodTextEmbeddingModelValuesRaw)));
|
|
108
|
+
export const ZodTextEmbeddingModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodTextEmbeddingModelValuesRaw)));
|
|
105
109
|
export const default_mc_generic = AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
106
110
|
export const default_mc_summary = AiModels.LanguageModels.Azure.gpt4o;
|
|
107
111
|
export const default_mc_extraction = AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
@@ -518,6 +518,25 @@ export declare const workersAiCatalog: {
|
|
|
518
518
|
readonly function_calling: true;
|
|
519
519
|
readonly info: "https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B";
|
|
520
520
|
};
|
|
521
|
+
}, {
|
|
522
|
+
readonly id: "41ca173f-72d5-4420-8915-49e835d2676e";
|
|
523
|
+
readonly source: 1;
|
|
524
|
+
readonly name: "@cf/aisingapore/gemma-sea-lion-v4-27b-it";
|
|
525
|
+
readonly description: "SEA-LION stands for Southeast Asian Languages In One Network, which is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.";
|
|
526
|
+
readonly created_at: "2025-09-23 19:27:30.468";
|
|
527
|
+
readonly tags: readonly [];
|
|
528
|
+
readonly properties: {
|
|
529
|
+
readonly context_window: 128000;
|
|
530
|
+
readonly price: readonly [{
|
|
531
|
+
readonly unit: "per M input tokens";
|
|
532
|
+
readonly price: 0.35;
|
|
533
|
+
readonly currency: "USD";
|
|
534
|
+
}, {
|
|
535
|
+
readonly unit: "per M output tokens";
|
|
536
|
+
readonly price: 0.56;
|
|
537
|
+
readonly currency: "USD";
|
|
538
|
+
}];
|
|
539
|
+
};
|
|
521
540
|
}, {
|
|
522
541
|
readonly id: "3dcb4f2d-26a8-412b-b6e3-2a368beff66b";
|
|
523
542
|
readonly source: 1;
|
|
@@ -805,6 +824,20 @@ export declare const workersAiCatalog: {
|
|
|
805
824
|
readonly currency: "USD";
|
|
806
825
|
}];
|
|
807
826
|
};
|
|
827
|
+
}, {
|
|
828
|
+
readonly id: "bc2b61f6-7eb3-4cdf-94f5-ffc128bd6aa4";
|
|
829
|
+
readonly source: 1;
|
|
830
|
+
readonly name: "@cf/pfnet/plamo-embedding-1b";
|
|
831
|
+
readonly description: "PLaMo-Embedding-1B is a Japanese text embedding model developed by Preferred Networks, Inc.\n\nIt can convert Japanese text input into numerical vectors and can be used for a wide range of applications, including information retrieval, text classification, and clustering.";
|
|
832
|
+
readonly created_at: "2025-09-24 18:42:05.576";
|
|
833
|
+
readonly tags: readonly [];
|
|
834
|
+
readonly properties: {
|
|
835
|
+
readonly price: readonly [{
|
|
836
|
+
readonly unit: "per M input tokens";
|
|
837
|
+
readonly price: 0.019;
|
|
838
|
+
readonly currency: "USD";
|
|
839
|
+
}];
|
|
840
|
+
};
|
|
808
841
|
}, {
|
|
809
842
|
readonly id: "57fbd08a-a4c4-411c-910d-b9459ff36c20";
|
|
810
843
|
readonly source: 1;
|
|
@@ -1209,6 +1242,24 @@ export declare const workersAiCatalog: {
|
|
|
1209
1242
|
readonly languages: "english, chinese, french, spanish, arabic, russian, german, japanese, portuguese, hindi";
|
|
1210
1243
|
readonly terms: "https://github.com/facebookresearch/fairseq/blob/main/LICENSE";
|
|
1211
1244
|
};
|
|
1245
|
+
}, {
|
|
1246
|
+
readonly id: "60920ed4-cf72-449a-a0f3-a38456b78262";
|
|
1247
|
+
readonly source: 1;
|
|
1248
|
+
readonly name: "@cf/ai4bharat/indictrans2-en-indic-1B";
|
|
1249
|
+
readonly description: "IndicTrans2 is the first open-source transformer-based multilingual NMT model that supports high-quality translations across all the 22 scheduled Indic languages";
|
|
1250
|
+
readonly created_at: "2025-09-23 18:19:17.382";
|
|
1251
|
+
readonly tags: readonly [];
|
|
1252
|
+
readonly properties: {
|
|
1253
|
+
readonly price: readonly [{
|
|
1254
|
+
readonly unit: "per M input tokens";
|
|
1255
|
+
readonly price: 0.34;
|
|
1256
|
+
readonly currency: "USD";
|
|
1257
|
+
}, {
|
|
1258
|
+
readonly unit: "per M output tokens";
|
|
1259
|
+
readonly price: 0.34;
|
|
1260
|
+
readonly currency: "USD";
|
|
1261
|
+
}];
|
|
1262
|
+
};
|
|
1212
1263
|
}];
|
|
1213
1264
|
};
|
|
1214
1265
|
readonly Summarization: {
|
|
@@ -588,6 +588,29 @@ export const workersAiCatalog = {
|
|
|
588
588
|
info: 'https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B',
|
|
589
589
|
},
|
|
590
590
|
},
|
|
591
|
+
{
|
|
592
|
+
id: '41ca173f-72d5-4420-8915-49e835d2676e',
|
|
593
|
+
source: 1,
|
|
594
|
+
name: '@cf/aisingapore/gemma-sea-lion-v4-27b-it',
|
|
595
|
+
description: 'SEA-LION stands for Southeast Asian Languages In One Network, which is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.',
|
|
596
|
+
created_at: '2025-09-23 19:27:30.468',
|
|
597
|
+
tags: [],
|
|
598
|
+
properties: {
|
|
599
|
+
context_window: 128000,
|
|
600
|
+
price: [
|
|
601
|
+
{
|
|
602
|
+
unit: 'per M input tokens',
|
|
603
|
+
price: 0.35,
|
|
604
|
+
currency: 'USD',
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
unit: 'per M output tokens',
|
|
608
|
+
price: 0.56,
|
|
609
|
+
currency: 'USD',
|
|
610
|
+
},
|
|
611
|
+
],
|
|
612
|
+
},
|
|
613
|
+
},
|
|
591
614
|
{
|
|
592
615
|
id: '3dcb4f2d-26a8-412b-b6e3-2a368beff66b',
|
|
593
616
|
source: 1,
|
|
@@ -919,6 +942,23 @@ export const workersAiCatalog = {
|
|
|
919
942
|
],
|
|
920
943
|
},
|
|
921
944
|
},
|
|
945
|
+
{
|
|
946
|
+
id: 'bc2b61f6-7eb3-4cdf-94f5-ffc128bd6aa4',
|
|
947
|
+
source: 1,
|
|
948
|
+
name: '@cf/pfnet/plamo-embedding-1b',
|
|
949
|
+
description: 'PLaMo-Embedding-1B is a Japanese text embedding model developed by Preferred Networks, Inc.\n\nIt can convert Japanese text input into numerical vectors and can be used for a wide range of applications, including information retrieval, text classification, and clustering.',
|
|
950
|
+
created_at: '2025-09-24 18:42:05.576',
|
|
951
|
+
tags: [],
|
|
952
|
+
properties: {
|
|
953
|
+
price: [
|
|
954
|
+
{
|
|
955
|
+
unit: 'per M input tokens',
|
|
956
|
+
price: 0.019,
|
|
957
|
+
currency: 'USD',
|
|
958
|
+
},
|
|
959
|
+
],
|
|
960
|
+
},
|
|
961
|
+
},
|
|
922
962
|
{
|
|
923
963
|
id: '57fbd08a-a4c4-411c-910d-b9459ff36c20',
|
|
924
964
|
source: 1,
|
|
@@ -1396,6 +1436,28 @@ export const workersAiCatalog = {
|
|
|
1396
1436
|
terms: 'https://github.com/facebookresearch/fairseq/blob/main/LICENSE',
|
|
1397
1437
|
},
|
|
1398
1438
|
},
|
|
1439
|
+
{
|
|
1440
|
+
id: '60920ed4-cf72-449a-a0f3-a38456b78262',
|
|
1441
|
+
source: 1,
|
|
1442
|
+
name: '@cf/ai4bharat/indictrans2-en-indic-1B',
|
|
1443
|
+
description: 'IndicTrans2 is the first open-source transformer-based multilingual NMT model that supports high-quality translations across all the 22 scheduled Indic languages',
|
|
1444
|
+
created_at: '2025-09-23 18:19:17.382',
|
|
1445
|
+
tags: [],
|
|
1446
|
+
properties: {
|
|
1447
|
+
price: [
|
|
1448
|
+
{
|
|
1449
|
+
unit: 'per M input tokens',
|
|
1450
|
+
price: 0.34,
|
|
1451
|
+
currency: 'USD',
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
unit: 'per M output tokens',
|
|
1455
|
+
price: 0.34,
|
|
1456
|
+
currency: 'USD',
|
|
1457
|
+
},
|
|
1458
|
+
],
|
|
1459
|
+
},
|
|
1460
|
+
},
|
|
1399
1461
|
],
|
|
1400
1462
|
},
|
|
1401
1463
|
Summarization: {
|
package/dist/zod-4/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export type JSON =
|
|
4
|
-
export declare const WorkflowId:
|
|
5
|
-
export declare const DoId:
|
|
6
|
-
export declare const ZodCoordinate:
|
|
7
|
-
export declare const ZodBlob:
|
|
8
|
-
export declare const ZodBlobExport:
|
|
9
|
-
export declare const PrefixedUuidRaw:
|
|
10
|
-
export declare const PrefixedUuid7Raw:
|
|
11
|
-
export declare const PrefixedUuid:
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
3
|
+
export type JSON = z4.infer<z4.ZodJSONSchema>;
|
|
4
|
+
export declare const WorkflowId: z4.ZodString;
|
|
5
|
+
export declare const DoId: z4.ZodCustomStringFormat<"hex">;
|
|
6
|
+
export declare const ZodCoordinate: z4.ZodString;
|
|
7
|
+
export declare const ZodBlob: z4.ZodUnion<readonly [z4.ZodPipe<z4.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z4.ZodTransform<Uint8Array<ArrayBuffer>, Buffer<ArrayBufferLike>>>, z4.ZodPipe<z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z4.ZodTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z4.ZodPipe<z4.ZodUnion<readonly [z4.ZodPipe<z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodTransform<ArrayBuffer | SharedArrayBuffer, ArrayBuffer>>, z4.ZodPipe<z4.ZodCustom<SharedArrayBuffer, SharedArrayBuffer>, z4.ZodTransform<ArrayBuffer | SharedArrayBuffer, SharedArrayBuffer>>]>, z4.ZodTransform<Uint8Array<ArrayBuffer | SharedArrayBuffer>, ArrayBuffer | SharedArrayBuffer>>, z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>;
|
|
8
|
+
export declare const ZodBlobExport: z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>;
|
|
9
|
+
export declare const PrefixedUuidRaw: z4.ZodString;
|
|
10
|
+
export declare const PrefixedUuid7Raw: z4.ZodString;
|
|
11
|
+
export declare const PrefixedUuid: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
|
|
12
12
|
type: "dataspace" | "tenant" | "user";
|
|
13
13
|
value: string;
|
|
14
14
|
preview: boolean;
|
|
15
15
|
}, string>>;
|
|
16
|
-
export declare const PrefixedUuid7:
|
|
16
|
+
export declare const PrefixedUuid7: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
|
|
17
17
|
type: "dataspace" | "tenant" | "user";
|
|
18
18
|
value: string;
|
|
19
19
|
preview: boolean;
|
|
20
20
|
}, string>>;
|
|
21
|
-
export declare const ZodUuid:
|
|
22
|
-
export declare const ZodUuid4:
|
|
23
|
-
export declare const ZodUuid7:
|
|
24
|
-
export declare const Zod4FakeUuidExport:
|
|
25
|
-
utf8:
|
|
26
|
-
hex:
|
|
27
|
-
base64:
|
|
28
|
-
base64url:
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
export declare const ZodSuruId:
|
|
21
|
+
export declare const ZodUuid: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
22
|
+
export declare const ZodUuid4: z4.ZodUnion<readonly [z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
23
|
+
export declare const ZodUuid7: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
24
|
+
export declare const Zod4FakeUuidExport: z4.ZodObject<{
|
|
25
|
+
utf8: z4.ZodUUID;
|
|
26
|
+
hex: z4.ZodCustomStringFormat<"hex">;
|
|
27
|
+
base64: z4.ZodBase64;
|
|
28
|
+
base64url: z4.ZodBase64URL;
|
|
29
|
+
}, z4.z.core.$strip>;
|
|
30
|
+
export declare const ZodSuruId: z4.ZodUnion<readonly [z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
|
package/dist/zod-4/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
2
3
|
import { hexUuid4Regex, hexUuid7Regex, hexUuidRegex, prefixedUuid7Regex, prefixedUuidRegex } from '../zod-mini/index.js';
|
|
3
|
-
export const WorkflowId =
|
|
4
|
+
export const WorkflowId = z4
|
|
4
5
|
.string()
|
|
5
6
|
.trim()
|
|
6
7
|
.max(64)
|
|
@@ -8,31 +9,31 @@ export const WorkflowId = z
|
|
|
8
9
|
* @link https://developers.cloudflare.com/workflows/reference/limits/
|
|
9
10
|
*/
|
|
10
11
|
.regex(/^[a-zA-Z0-9_][a-zA-Z0-9-_]*$/);
|
|
11
|
-
export const DoId =
|
|
12
|
-
export const ZodCoordinate =
|
|
12
|
+
export const DoId = z4.hex().trim().length(64).toLowerCase();
|
|
13
|
+
export const ZodCoordinate = z4
|
|
13
14
|
.string()
|
|
14
15
|
.trim()
|
|
15
16
|
.min(3)
|
|
16
17
|
.regex(new RegExp(/^-?\d+\.\d+$/i));
|
|
17
|
-
export const ZodBlob =
|
|
18
|
+
export const ZodBlob = z4.union([
|
|
18
19
|
// Literal `node:buffer` type
|
|
19
|
-
|
|
20
|
+
z4.instanceof(Buffer).transform((b) => new Uint8Array(b)),
|
|
20
21
|
// Uint8Array
|
|
21
|
-
|
|
22
|
+
z4.instanceof(Uint8Array).transform((ui8a) => ui8a),
|
|
22
23
|
// ArrayBuffer
|
|
23
|
-
|
|
24
|
+
z4
|
|
24
25
|
.union([
|
|
25
26
|
// Each one has to be manually specified
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
z4.instanceof(ArrayBuffer).transform((ab) => ab),
|
|
28
|
+
z4.instanceof(SharedArrayBuffer).transform((sab) => sab),
|
|
28
29
|
])
|
|
29
30
|
.transform((abl) => new Uint8Array(abl)),
|
|
30
31
|
// D0Blob
|
|
31
|
-
|
|
32
|
+
z4.tuple([z4.int().min(0).max(255)], z4.int().min(0).max(255)).transform((arr) => new Uint8Array(arr)),
|
|
32
33
|
]);
|
|
33
|
-
export const ZodBlobExport =
|
|
34
|
-
export const PrefixedUuidRaw =
|
|
35
|
-
export const PrefixedUuid7Raw =
|
|
34
|
+
export const ZodBlobExport = z4.tuple([z4.int().min(0).max(255)], z4.int().min(0).max(255)).transform((arr) => new Uint8Array(arr));
|
|
35
|
+
export const PrefixedUuidRaw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
|
|
36
|
+
export const PrefixedUuid7Raw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuid7Regex);
|
|
36
37
|
export const PrefixedUuid = PrefixedUuidRaw.transform((value) => {
|
|
37
38
|
let type;
|
|
38
39
|
if (value.startsWith('d_')) {
|
|
@@ -65,41 +66,41 @@ export const PrefixedUuid7 = PrefixedUuid7Raw.transform((value) => {
|
|
|
65
66
|
}
|
|
66
67
|
return { type, value, preview: value.endsWith('_p') };
|
|
67
68
|
});
|
|
68
|
-
export const ZodUuid =
|
|
69
|
+
export const ZodUuid = z4.union([
|
|
69
70
|
PrefixedUuidRaw,
|
|
70
71
|
// utf-8
|
|
71
|
-
|
|
72
|
+
z4.uuid().trim().toLowerCase(),
|
|
72
73
|
// hex
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
z4.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
|
|
75
|
+
z4.base64().trim().nonempty(),
|
|
76
|
+
z4.base64url().trim().nonempty(),
|
|
76
77
|
]);
|
|
77
|
-
export const ZodUuid4 =
|
|
78
|
+
export const ZodUuid4 = z4.union([
|
|
78
79
|
// utf-8
|
|
79
|
-
|
|
80
|
+
z4.uuidv4().trim().toLowerCase(),
|
|
80
81
|
// hex
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
z4.hex().trim().toLowerCase().length(32).regex(hexUuid4Regex),
|
|
83
|
+
z4.base64().trim().nonempty(),
|
|
84
|
+
z4.base64url().trim().nonempty(),
|
|
84
85
|
]);
|
|
85
|
-
export const ZodUuid7 =
|
|
86
|
+
export const ZodUuid7 = z4.union([
|
|
86
87
|
PrefixedUuid7Raw,
|
|
87
88
|
// utf-8
|
|
88
|
-
|
|
89
|
+
z4.uuidv7().trim().toLowerCase(),
|
|
89
90
|
// hex
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
z4.hex().trim().toLowerCase().length(32).regex(hexUuid7Regex),
|
|
92
|
+
z4.base64().trim().nonempty(),
|
|
93
|
+
z4.base64url().trim().nonempty(),
|
|
93
94
|
]);
|
|
94
|
-
export const Zod4FakeUuidExport =
|
|
95
|
-
utf8:
|
|
96
|
-
hex:
|
|
97
|
-
base64:
|
|
98
|
-
base64url:
|
|
95
|
+
export const Zod4FakeUuidExport = z4.object({
|
|
96
|
+
utf8: z4.uuid().trim().toLowerCase(),
|
|
97
|
+
hex: z4.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
|
|
98
|
+
base64: z4.base64().trim().nonempty(),
|
|
99
|
+
base64url: z4.base64url().trim().nonempty(),
|
|
99
100
|
});
|
|
100
|
-
export const ZodSuruId =
|
|
101
|
+
export const ZodSuruId = z4.union([
|
|
101
102
|
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
z4.hex().trim().toLowerCase().length(96),
|
|
104
|
+
z4.base64().trim().max(64),
|
|
105
|
+
z4.base64url().trim().max(64),
|
|
105
106
|
]);
|
package/dist/zod-mini/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
export type ZodPick<O extends ZodMiniObject> = Partial<Record<keyof output<O>, boolean>>;
|
|
4
|
-
export type ZodPickedKeys<P extends ZodPick<O>, O extends ZodMiniObject> = Extract<{
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
import * as zm from 'zod/mini';
|
|
3
|
+
export type ZodPick<O extends zm.ZodMiniObject> = Partial<Record<keyof zm.output<O>, boolean>>;
|
|
4
|
+
export type ZodPickedKeys<P extends ZodPick<O>, O extends zm.ZodMiniObject> = Extract<{
|
|
5
5
|
[K in keyof P]: P[K] extends true ? K : never;
|
|
6
|
-
}[keyof P], keyof output<O>>;
|
|
7
|
-
export type ZodPartial<T extends ZodMiniObject> = ZodMiniObject<{
|
|
8
|
-
[k in keyof T['shape']]: ZodMiniOptional<T['shape'][k]>;
|
|
6
|
+
}[keyof P], keyof zm.output<O>>;
|
|
7
|
+
export type ZodPartial<T extends zm.ZodMiniObject> = zm.ZodMiniObject<{
|
|
8
|
+
[k in keyof T['shape']]: zm.ZodMiniOptional<T['shape'][k]>;
|
|
9
9
|
}, T['_zod']['config']>;
|
|
10
|
-
export type JSON =
|
|
11
|
-
export declare const WorkflowId:
|
|
12
|
-
export declare const DoId:
|
|
13
|
-
export declare const ZodCoordinate:
|
|
14
|
-
export declare const ZodBlob:
|
|
15
|
-
export declare const ZodBlobExport:
|
|
10
|
+
export type JSON = zm.infer<zm.ZodMiniJSONSchema>;
|
|
11
|
+
export declare const WorkflowId: zm.ZodMiniString<string>;
|
|
12
|
+
export declare const DoId: zm.ZodMiniCustomStringFormat<"hex">;
|
|
13
|
+
export declare const ZodCoordinate: zm.ZodMiniString<string>;
|
|
14
|
+
export declare const ZodBlob: zm.ZodMiniUnion<readonly [zm.ZodMiniPipe<zm.ZodMiniCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Buffer<ArrayBufferLike>>>, zm.ZodMiniPipe<zm.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, zm.ZodMiniPipe<zm.ZodMiniUnion<readonly [zm.ZodMiniPipe<zm.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, zm.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniCustom<SharedArrayBuffer, SharedArrayBuffer>, zm.ZodMiniTransform<ArrayBufferLike, SharedArrayBuffer>>]>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, zm.ZodMiniPipe<zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>;
|
|
15
|
+
export declare const ZodBlobExport: zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>;
|
|
16
16
|
export declare const prefixedUuidRegex: RegExp;
|
|
17
17
|
export declare const hexUuidRegex: RegExp;
|
|
18
18
|
export declare const hexUuid4Regex: RegExp;
|
|
19
19
|
export declare const prefixedUuid7Regex: RegExp;
|
|
20
20
|
export declare const hexUuid7Regex: RegExp;
|
|
21
|
-
export declare const PrefixedUuidRaw:
|
|
22
|
-
export declare const PrefixedUuid7Raw:
|
|
23
|
-
export declare const PrefixedUuid:
|
|
21
|
+
export declare const PrefixedUuidRaw: zm.ZodMiniString<string>;
|
|
22
|
+
export declare const PrefixedUuid7Raw: zm.ZodMiniString<string>;
|
|
23
|
+
export declare const PrefixedUuid: zm.ZodMiniPipe<zm.ZodMiniString<string>, zm.ZodMiniTransform<{
|
|
24
24
|
type: "dataspace" | "tenant" | "user";
|
|
25
25
|
value: string;
|
|
26
26
|
preview: boolean;
|
|
27
27
|
}, string>>;
|
|
28
|
-
export declare const PrefixedUuid7:
|
|
28
|
+
export declare const PrefixedUuid7: zm.ZodMiniPipe<zm.ZodMiniString<string>, zm.ZodMiniTransform<{
|
|
29
29
|
type: "dataspace" | "tenant" | "user";
|
|
30
30
|
value: string;
|
|
31
31
|
preview: boolean;
|
|
32
32
|
}, string>>;
|
|
33
|
-
export declare const ZodUuid:
|
|
34
|
-
export declare const ZodUuid4:
|
|
35
|
-
export declare const ZodUuid7:
|
|
36
|
-
export declare const Zod4FakeUuidExport: ZodMiniObject<{
|
|
37
|
-
utf8:
|
|
38
|
-
hex:
|
|
39
|
-
base64:
|
|
40
|
-
base64url:
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
export declare const ZodSuruId:
|
|
33
|
+
export declare const ZodUuid: zm.ZodMiniUnion<readonly [zm.ZodMiniString<string>, zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
|
|
34
|
+
export declare const ZodUuid4: zm.ZodMiniUnion<readonly [zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
|
|
35
|
+
export declare const ZodUuid7: zm.ZodMiniUnion<readonly [zm.ZodMiniString<string>, zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
|
|
36
|
+
export declare const Zod4FakeUuidExport: zm.ZodMiniObject<{
|
|
37
|
+
utf8: zm.ZodMiniUUID;
|
|
38
|
+
hex: zm.ZodMiniCustomStringFormat<"hex">;
|
|
39
|
+
base64: zm.ZodMiniBase64;
|
|
40
|
+
base64url: zm.ZodMiniBase64URL;
|
|
41
|
+
}, zm.z.core.$strip>;
|
|
42
|
+
export declare const ZodSuruId: zm.ZodMiniUnion<readonly [zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniUnion<readonly [zm.ZodMiniPipe<zm.ZodMiniCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Buffer<ArrayBufferLike>>>, zm.ZodMiniPipe<zm.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, zm.ZodMiniPipe<zm.ZodMiniUnion<readonly [zm.ZodMiniPipe<zm.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, zm.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniCustom<SharedArrayBuffer, SharedArrayBuffer>, zm.ZodMiniTransform<ArrayBufferLike, SharedArrayBuffer>>]>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, zm.ZodMiniPipe<zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>, zm.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
|
package/dist/zod-mini/index.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
2
|
+
import * as zm from 'zod/mini';
|
|
3
|
+
export const WorkflowId = zm.string().check(zm.trim(), zm.maxLength(64),
|
|
3
4
|
/**
|
|
4
5
|
* @link https://developers.cloudflare.com/workflows/reference/limits/
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
export const DoId =
|
|
8
|
-
export const ZodCoordinate =
|
|
9
|
-
export const ZodBlob =
|
|
7
|
+
zm.regex(/^[a-zA-Z0-9_][a-zA-Z0-9-_]*$/));
|
|
8
|
+
export const DoId = zm.hex().check(zm.trim(), zm.length(64), zm.toLowerCase());
|
|
9
|
+
export const ZodCoordinate = zm.string().check(zm.trim(), zm.minLength(3), zm.regex(new RegExp(/^-?\d+\.\d+$/i)));
|
|
10
|
+
export const ZodBlob = zm.union([
|
|
10
11
|
// Literal `node:buffer` type
|
|
11
|
-
|
|
12
|
+
zm.pipe(zm.instanceof(Buffer), zm.transform((b) => new Uint8Array(b))),
|
|
12
13
|
// Uint8Array
|
|
13
|
-
|
|
14
|
+
zm.pipe(zm.instanceof(Uint8Array), zm.transform((ui8a) => ui8a)),
|
|
14
15
|
// ArrayBuffer
|
|
15
|
-
|
|
16
|
+
zm.pipe(zm.union([
|
|
16
17
|
// Each one has to be manually specified
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]),
|
|
18
|
+
zm.pipe(zm.instanceof(ArrayBuffer), zm.transform((ab) => ab)),
|
|
19
|
+
zm.pipe(zm.instanceof(SharedArrayBuffer), zm.transform((sab) => sab)),
|
|
20
|
+
]), zm.transform((abl) => new Uint8Array(abl))),
|
|
20
21
|
// D0Blob
|
|
21
|
-
|
|
22
|
+
zm.pipe(zm.tuple([zm.int().check(zm.minimum(0), zm.maximum(255))], zm.int().check(zm.minimum(0), zm.maximum(255))), zm.transform((arr) => new Uint8Array(arr))),
|
|
22
23
|
]);
|
|
23
|
-
export const ZodBlobExport =
|
|
24
|
+
export const ZodBlobExport = zm.tuple([zm.int().check(zm.minimum(0), zm.maximum(255))], zm.int().check(zm.minimum(0), zm.maximum(255)));
|
|
24
25
|
export const prefixedUuidRegex = /^((d|t|u)_)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(_p)?$/i;
|
|
25
26
|
export const hexUuidRegex = /^[0-9a-f]{8}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
26
27
|
export const hexUuid4Regex = /^[0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
27
28
|
export const prefixedUuid7Regex = /^((d|t|u)_)?[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}(_p)?$/i;
|
|
28
29
|
export const hexUuid7Regex = /^[0-9a-f]{8}[0-9a-f]{4}7[0-9a-f]{3}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
29
|
-
export const PrefixedUuidRaw =
|
|
30
|
-
export const PrefixedUuid7Raw =
|
|
31
|
-
export const PrefixedUuid =
|
|
30
|
+
export const PrefixedUuidRaw = zm.string().check(zm.trim(), zm.toLowerCase(), zm.minLength(38), zm.maxLength(40), zm.regex(prefixedUuidRegex));
|
|
31
|
+
export const PrefixedUuid7Raw = zm.string().check(zm.trim(), zm.toLowerCase(), zm.minLength(38), zm.maxLength(40), zm.regex(prefixedUuid7Regex));
|
|
32
|
+
export const PrefixedUuid = zm.pipe(PrefixedUuidRaw, zm.transform((value) => {
|
|
32
33
|
let type;
|
|
33
34
|
if (value.startsWith('d_')) {
|
|
34
35
|
type = 'dataspace';
|
|
@@ -44,7 +45,7 @@ export const PrefixedUuid = z.pipe(PrefixedUuidRaw, z.transform((value) => {
|
|
|
44
45
|
}
|
|
45
46
|
return { type, value, preview: value.endsWith('_p') };
|
|
46
47
|
}));
|
|
47
|
-
export const PrefixedUuid7 =
|
|
48
|
+
export const PrefixedUuid7 = zm.pipe(PrefixedUuid7Raw, zm.transform((value) => {
|
|
48
49
|
let type;
|
|
49
50
|
if (value.startsWith('d_')) {
|
|
50
51
|
type = 'dataspace';
|
|
@@ -60,42 +61,42 @@ export const PrefixedUuid7 = z.pipe(PrefixedUuid7Raw, z.transform((value) => {
|
|
|
60
61
|
}
|
|
61
62
|
return { type, value, preview: value.endsWith('_p') };
|
|
62
63
|
}));
|
|
63
|
-
export const ZodUuid =
|
|
64
|
+
export const ZodUuid = zm.union([
|
|
64
65
|
PrefixedUuidRaw,
|
|
65
66
|
// utf-8
|
|
66
|
-
|
|
67
|
+
zm.uuid().check(zm.trim(), zm.toLowerCase()),
|
|
67
68
|
// hex
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuidRegex)),
|
|
70
|
+
zm.base64().check(zm.trim(), zm.minLength(1)),
|
|
71
|
+
zm.base64url().check(zm.trim(), zm.minLength(1)),
|
|
71
72
|
]);
|
|
72
|
-
export const ZodUuid4 =
|
|
73
|
+
export const ZodUuid4 = zm.union([
|
|
73
74
|
// utf-8
|
|
74
|
-
|
|
75
|
+
zm.uuidv4().check(zm.trim(), zm.toLowerCase()),
|
|
75
76
|
// hex
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuid4Regex)),
|
|
78
|
+
zm.base64().check(zm.trim(), zm.minLength(1)),
|
|
79
|
+
zm.base64url().check(zm.trim(), zm.minLength(1)),
|
|
79
80
|
]);
|
|
80
|
-
export const ZodUuid7 =
|
|
81
|
+
export const ZodUuid7 = zm.union([
|
|
81
82
|
PrefixedUuid7Raw,
|
|
82
83
|
// utf-8
|
|
83
|
-
|
|
84
|
+
zm.uuidv7().check(zm.trim(), zm.toLowerCase()),
|
|
84
85
|
// hex
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuid7Regex)),
|
|
87
|
+
zm.base64().check(zm.trim(), zm.minLength(1)),
|
|
88
|
+
zm.base64url().check(zm.trim(), zm.minLength(1)),
|
|
88
89
|
]);
|
|
89
|
-
export const Zod4FakeUuidExport =
|
|
90
|
-
utf8:
|
|
91
|
-
hex:
|
|
92
|
-
base64:
|
|
93
|
-
base64url:
|
|
90
|
+
export const Zod4FakeUuidExport = zm.object({
|
|
91
|
+
utf8: zm.uuid().check(zm.trim(), zm.toLowerCase()),
|
|
92
|
+
hex: zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuidRegex)),
|
|
93
|
+
base64: zm.base64().check(zm.trim(), zm.minLength(1)),
|
|
94
|
+
base64url: zm.base64url().check(zm.trim(), zm.minLength(1)),
|
|
94
95
|
});
|
|
95
|
-
export const ZodSuruId =
|
|
96
|
+
export const ZodSuruId = zm.union([
|
|
96
97
|
//
|
|
97
|
-
|
|
98
|
+
zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(96)),
|
|
98
99
|
ZodBlob,
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
zm.base64().check(zm.trim(), zm.maxLength(64)),
|
|
101
|
+
zm.base64url().check(zm.trim(), zm.maxLength(64)),
|
|
101
102
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"zod": "^4.1.11"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@cloudflare/workers-types": "^4.
|
|
105
|
+
"@cloudflare/workers-types": "^4.20250927.0",
|
|
106
106
|
"@types/validator": "^13.15.3"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "297c797d07aad14a577f57dd5cae557ee9b25c2d"
|
|
109
109
|
}
|