@chainfuse/types 4.0.4 → 4.0.6

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.
@@ -110,6 +110,7 @@ export declare const ZodLanguageModelValues: zm.ZodMiniEnum<{
110
110
  "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct": "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct";
111
111
  "workersai:@cf/tiiuae/falcon-7b-instruct": "workersai:@cf/tiiuae/falcon-7b-instruct";
112
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";
113
114
  "workersai:@cf/meta/llama-3.1-8b-instruct-awq": "workersai:@cf/meta/llama-3.1-8b-instruct-awq";
114
115
  "workersai:@hf/thebloke/zephyr-7b-beta-awq": "workersai:@hf/thebloke/zephyr-7b-beta-awq";
115
116
  "workersai:@cf/google/gemma-7b-it-lora": "workersai:@cf/google/gemma-7b-it-lora";
@@ -185,6 +186,7 @@ export declare const ZodLanguageModelValues4: z4.ZodEnum<{
185
186
  "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct": "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct";
186
187
  "workersai:@cf/tiiuae/falcon-7b-instruct": "workersai:@cf/tiiuae/falcon-7b-instruct";
187
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";
188
190
  "workersai:@cf/meta/llama-3.1-8b-instruct-awq": "workersai:@cf/meta/llama-3.1-8b-instruct-awq";
189
191
  "workersai:@hf/thebloke/zephyr-7b-beta-awq": "workersai:@hf/thebloke/zephyr-7b-beta-awq";
190
192
  "workersai:@cf/google/gemma-7b-it-lora": "workersai:@cf/google/gemma-7b-it-lora";
@@ -259,6 +261,7 @@ export declare const ZodImageModelValues4: z4.ZodEnum<{
259
261
  export type ImageModelValues = zm.infer<typeof ZodImageModelValues>;
260
262
  export declare const ZodTextEmbeddingModelValues: zm.ZodMiniEnum<{
261
263
  "workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
264
+ "workersai:@cf/pfnet/plamo-embedding-1b": "workersai:@cf/pfnet/plamo-embedding-1b";
262
265
  "workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
263
266
  "workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
264
267
  "workersai:@cf/google/embeddinggemma-300m": "workersai:@cf/google/embeddinggemma-300m";
@@ -271,6 +274,7 @@ export declare const ZodTextEmbeddingModelValues: zm.ZodMiniEnum<{
271
274
  }>;
272
275
  export declare const ZodTextEmbeddingModelValues4: z4.ZodEnum<{
273
276
  "workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
277
+ "workersai:@cf/pfnet/plamo-embedding-1b": "workersai:@cf/pfnet/plamo-embedding-1b";
274
278
  "workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
275
279
  "workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
276
280
  "workersai:@cf/google/embeddinggemma-300m": "workersai:@cf/google/embeddinggemma-300m";
@@ -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: {
@@ -1,29 +1,29 @@
1
- import * as z from 'zod/v4';
2
- export type JSON = z.infer<z.ZodJSONSchema>;
3
- export declare const WorkflowId: z.ZodString;
4
- export declare const DoId: z.ZodCustomStringFormat<"hex">;
5
- export declare const ZodCoordinate: z.ZodString;
6
- export declare const ZodBlob: z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodTransform<Uint8Array<ArrayBuffer>, Buffer<ArrayBufferLike>>>, z.ZodPipe<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodTransform<ArrayBuffer | SharedArrayBuffer, ArrayBuffer>>, z.ZodPipe<z.ZodCustom<SharedArrayBuffer, SharedArrayBuffer>, z.ZodTransform<ArrayBuffer | SharedArrayBuffer, SharedArrayBuffer>>]>, z.ZodTransform<Uint8Array<ArrayBuffer | SharedArrayBuffer>, ArrayBuffer | SharedArrayBuffer>>, z.ZodPipe<z.ZodTuple<[z.ZodInt], z.ZodInt>, z.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>;
7
- export declare const ZodBlobExport: z.ZodPipe<z.ZodTuple<[z.ZodInt], z.ZodInt>, z.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>;
8
- export declare const PrefixedUuidRaw: z.ZodString;
9
- export declare const PrefixedUuid7Raw: z.ZodString;
10
- export declare const PrefixedUuid: z.ZodPipe<z.ZodString, z.ZodTransform<{
1
+ import * as z4 from 'zod/v4';
2
+ export type JSON = z4.infer<z4.ZodJSONSchema>;
3
+ export declare const WorkflowId: z4.ZodString;
4
+ export declare const DoId: z4.ZodCustomStringFormat<"hex">;
5
+ export declare const ZodCoordinate: z4.ZodString;
6
+ export declare const ZodBlob: z4.ZodUnion<readonly [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[]]>>]>;
7
+ export declare const ZodBlobExport: z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>;
8
+ export declare const PrefixedUuidRaw: z4.ZodString;
9
+ export declare const PrefixedUuid7Raw: z4.ZodString;
10
+ export declare const PrefixedUuid: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
11
11
  type: "dataspace" | "tenant" | "user";
12
12
  value: string;
13
13
  preview: boolean;
14
14
  }, string>>;
15
- export declare const PrefixedUuid7: z.ZodPipe<z.ZodString, z.ZodTransform<{
15
+ export declare const PrefixedUuid7: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
16
16
  type: "dataspace" | "tenant" | "user";
17
17
  value: string;
18
18
  preview: boolean;
19
19
  }, string>>;
20
- export declare const ZodUuid: z.ZodUnion<readonly [z.ZodString, z.ZodUUID, z.ZodCustomStringFormat<"hex">, z.ZodBase64, z.ZodBase64URL]>;
21
- export declare const ZodUuid4: z.ZodUnion<readonly [z.ZodUUID, z.ZodCustomStringFormat<"hex">, z.ZodBase64, z.ZodBase64URL]>;
22
- export declare const ZodUuid7: z.ZodUnion<readonly [z.ZodString, z.ZodUUID, z.ZodCustomStringFormat<"hex">, z.ZodBase64, z.ZodBase64URL]>;
23
- export declare const Zod4FakeUuidExport: z.ZodObject<{
24
- utf8: z.ZodUUID;
25
- hex: z.ZodCustomStringFormat<"hex">;
26
- base64: z.ZodBase64;
27
- base64url: z.ZodBase64URL;
28
- }, z.core.$strip>;
29
- export declare const ZodSuruId: z.ZodUnion<readonly [z.ZodCustomStringFormat<"hex">, z.ZodBase64, z.ZodBase64URL]>;
20
+ export declare const ZodUuid: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
21
+ export declare const ZodUuid4: z4.ZodUnion<readonly [z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
22
+ export declare const ZodUuid7: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
23
+ export declare const Zod4FakeUuidExport: z4.ZodObject<{
24
+ utf8: z4.ZodUUID;
25
+ hex: z4.ZodCustomStringFormat<"hex">;
26
+ base64: z4.ZodBase64;
27
+ base64url: z4.ZodBase64URL;
28
+ }, z4.z.core.$strip>;
29
+ export declare const ZodSuruId: z4.ZodUnion<readonly [z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
@@ -1,6 +1,6 @@
1
- import * as z from 'zod/v4';
1
+ import * as z4 from 'zod/v4';
2
2
  import { hexUuid4Regex, hexUuid7Regex, hexUuidRegex, prefixedUuid7Regex, prefixedUuidRegex } from '../zod-mini/index.js';
3
- export const WorkflowId = z
3
+ export const WorkflowId = z4
4
4
  .string()
5
5
  .trim()
6
6
  .max(64)
@@ -8,31 +8,29 @@ export const WorkflowId = z
8
8
  * @link https://developers.cloudflare.com/workflows/reference/limits/
9
9
  */
10
10
  .regex(/^[a-zA-Z0-9_][a-zA-Z0-9-_]*$/);
11
- export const DoId = z.hex().trim().length(64).toLowerCase();
12
- export const ZodCoordinate = z
11
+ export const DoId = z4.hex().trim().length(64).toLowerCase();
12
+ export const ZodCoordinate = z4
13
13
  .string()
14
14
  .trim()
15
15
  .min(3)
16
16
  .regex(new RegExp(/^-?\d+\.\d+$/i));
17
- export const ZodBlob = z.union([
18
- // Literal `node:buffer` type
19
- z.instanceof(Buffer).transform((b) => new Uint8Array(b)),
17
+ export const ZodBlob = z4.union([
20
18
  // Uint8Array
21
- z.instanceof(Uint8Array).transform((ui8a) => ui8a),
19
+ z4.instanceof(Uint8Array).transform((ui8a) => ui8a),
22
20
  // ArrayBuffer
23
- z
21
+ z4
24
22
  .union([
25
23
  // Each one has to be manually specified
26
- z.instanceof(ArrayBuffer).transform((ab) => ab),
27
- z.instanceof(SharedArrayBuffer).transform((sab) => sab),
24
+ z4.instanceof(ArrayBuffer).transform((ab) => ab),
25
+ z4.instanceof(SharedArrayBuffer).transform((sab) => sab),
28
26
  ])
29
27
  .transform((abl) => new Uint8Array(abl)),
30
28
  // D0Blob
31
- z.tuple([z.int().min(0).max(255)], z.int().min(0).max(255)).transform((arr) => new Uint8Array(arr)),
29
+ z4.tuple([z4.int().min(0).max(255)], z4.int().min(0).max(255)).transform((arr) => new Uint8Array(arr)),
32
30
  ]);
33
- export const ZodBlobExport = z.tuple([z.int().min(0).max(255)], z.int().min(0).max(255)).transform((arr) => new Uint8Array(arr));
34
- export const PrefixedUuidRaw = z.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
35
- export const PrefixedUuid7Raw = z.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuid7Regex);
31
+ export const ZodBlobExport = z4.tuple([z4.int().min(0).max(255)], z4.int().min(0).max(255)).transform((arr) => new Uint8Array(arr));
32
+ export const PrefixedUuidRaw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
33
+ export const PrefixedUuid7Raw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuid7Regex);
36
34
  export const PrefixedUuid = PrefixedUuidRaw.transform((value) => {
37
35
  let type;
38
36
  if (value.startsWith('d_')) {
@@ -65,41 +63,41 @@ export const PrefixedUuid7 = PrefixedUuid7Raw.transform((value) => {
65
63
  }
66
64
  return { type, value, preview: value.endsWith('_p') };
67
65
  });
68
- export const ZodUuid = z.union([
66
+ export const ZodUuid = z4.union([
69
67
  PrefixedUuidRaw,
70
68
  // utf-8
71
- z.uuid().trim().toLowerCase(),
69
+ z4.uuid().trim().toLowerCase(),
72
70
  // hex
73
- z.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
74
- z.base64().trim().nonempty(),
75
- z.base64url().trim().nonempty(),
71
+ z4.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
72
+ z4.base64().trim().nonempty(),
73
+ z4.base64url().trim().nonempty(),
76
74
  ]);
77
- export const ZodUuid4 = z.union([
75
+ export const ZodUuid4 = z4.union([
78
76
  // utf-8
79
- z.uuidv4().trim().toLowerCase(),
77
+ z4.uuidv4().trim().toLowerCase(),
80
78
  // hex
81
- z.hex().trim().toLowerCase().length(32).regex(hexUuid4Regex),
82
- z.base64().trim().nonempty(),
83
- z.base64url().trim().nonempty(),
79
+ z4.hex().trim().toLowerCase().length(32).regex(hexUuid4Regex),
80
+ z4.base64().trim().nonempty(),
81
+ z4.base64url().trim().nonempty(),
84
82
  ]);
85
- export const ZodUuid7 = z.union([
83
+ export const ZodUuid7 = z4.union([
86
84
  PrefixedUuid7Raw,
87
85
  // utf-8
88
- z.uuidv7().trim().toLowerCase(),
86
+ z4.uuidv7().trim().toLowerCase(),
89
87
  // hex
90
- z.hex().trim().toLowerCase().length(32).regex(hexUuid7Regex),
91
- z.base64().trim().nonempty(),
92
- z.base64url().trim().nonempty(),
88
+ z4.hex().trim().toLowerCase().length(32).regex(hexUuid7Regex),
89
+ z4.base64().trim().nonempty(),
90
+ z4.base64url().trim().nonempty(),
93
91
  ]);
94
- export const Zod4FakeUuidExport = z.object({
95
- utf8: z.uuid().trim().toLowerCase(),
96
- hex: z.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
97
- base64: z.base64().trim().nonempty(),
98
- base64url: z.base64url().trim().nonempty(),
92
+ export const Zod4FakeUuidExport = z4.object({
93
+ utf8: z4.uuid().trim().toLowerCase(),
94
+ hex: z4.hex().trim().toLowerCase().length(32).regex(hexUuidRegex),
95
+ base64: z4.base64().trim().nonempty(),
96
+ base64url: z4.base64url().trim().nonempty(),
99
97
  });
100
- export const ZodSuruId = z.union([
98
+ export const ZodSuruId = z4.union([
101
99
  //
102
- z.hex().trim().toLowerCase().length(96),
103
- z.base64().trim().max(64),
104
- z.base64url().trim().max(64),
100
+ z4.hex().trim().toLowerCase().length(96),
101
+ z4.base64().trim().max(64),
102
+ z4.base64url().trim().max(64),
105
103
  ]);
@@ -1,42 +1,41 @@
1
- import type { output, infer as zInfer, ZodMiniJSONSchema, ZodMiniObject, ZodMiniOptional } from 'zod/mini';
2
- import * as z from 'zod/mini';
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 * as zm from 'zod/mini';
2
+ export type ZodPick<O extends zm.ZodMiniObject> = Partial<Record<keyof zm.output<O>, boolean>>;
3
+ export type ZodPickedKeys<P extends ZodPick<O>, O extends zm.ZodMiniObject> = Extract<{
5
4
  [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]>;
5
+ }[keyof P], keyof zm.output<O>>;
6
+ export type ZodPartial<T extends zm.ZodMiniObject> = zm.ZodMiniObject<{
7
+ [k in keyof T['shape']]: zm.ZodMiniOptional<T['shape'][k]>;
9
8
  }, T['_zod']['config']>;
10
- export type JSON = zInfer<ZodMiniJSONSchema>;
11
- export declare const WorkflowId: z.ZodMiniString<string>;
12
- export declare const DoId: z.ZodMiniCustomStringFormat<"hex">;
13
- export declare const ZodCoordinate: z.ZodMiniString<string>;
14
- export declare const ZodBlob: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Buffer<ArrayBufferLike>>>, z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniPipe<z.ZodMiniCustom<SharedArrayBuffer, SharedArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, SharedArrayBuffer>>]>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>;
15
- export declare const ZodBlobExport: z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>;
9
+ export type JSON = zm.infer<zm.ZodMiniJSONSchema>;
10
+ export declare const WorkflowId: zm.ZodMiniString<string>;
11
+ export declare const DoId: zm.ZodMiniCustomStringFormat<"hex">;
12
+ export declare const ZodCoordinate: zm.ZodMiniString<string>;
13
+ export declare const ZodBlob: zm.ZodMiniUnion<readonly [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[]]>>]>;
14
+ export declare const ZodBlobExport: zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>;
16
15
  export declare const prefixedUuidRegex: RegExp;
17
16
  export declare const hexUuidRegex: RegExp;
18
17
  export declare const hexUuid4Regex: RegExp;
19
18
  export declare const prefixedUuid7Regex: RegExp;
20
19
  export declare const hexUuid7Regex: RegExp;
21
- export declare const PrefixedUuidRaw: z.ZodMiniString<string>;
22
- export declare const PrefixedUuid7Raw: z.ZodMiniString<string>;
23
- export declare const PrefixedUuid: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<{
20
+ export declare const PrefixedUuidRaw: zm.ZodMiniString<string>;
21
+ export declare const PrefixedUuid7Raw: zm.ZodMiniString<string>;
22
+ export declare const PrefixedUuid: zm.ZodMiniPipe<zm.ZodMiniString<string>, zm.ZodMiniTransform<{
24
23
  type: "dataspace" | "tenant" | "user";
25
24
  value: string;
26
25
  preview: boolean;
27
26
  }, string>>;
28
- export declare const PrefixedUuid7: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<{
27
+ export declare const PrefixedUuid7: zm.ZodMiniPipe<zm.ZodMiniString<string>, zm.ZodMiniTransform<{
29
28
  type: "dataspace" | "tenant" | "user";
30
29
  value: string;
31
30
  preview: boolean;
32
31
  }, string>>;
33
- export declare const ZodUuid: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniUUID, z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniBase64, z.ZodMiniBase64URL]>;
34
- export declare const ZodUuid4: z.ZodMiniUnion<readonly [z.ZodMiniUUID, z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniBase64, z.ZodMiniBase64URL]>;
35
- export declare const ZodUuid7: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniUUID, z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniBase64, z.ZodMiniBase64URL]>;
36
- export declare const Zod4FakeUuidExport: ZodMiniObject<{
37
- utf8: z.ZodMiniUUID;
38
- hex: z.ZodMiniCustomStringFormat<"hex">;
39
- base64: z.ZodMiniBase64;
40
- base64url: z.ZodMiniBase64URL;
41
- }, z.core.$strip>;
42
- export declare const ZodSuruId: z.ZodMiniUnion<readonly [z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Buffer<ArrayBufferLike>>>, z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniPipe<z.ZodMiniCustom<SharedArrayBuffer, SharedArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, SharedArrayBuffer>>]>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniBase64, z.ZodMiniBase64URL]>;
32
+ export declare const ZodUuid: zm.ZodMiniUnion<readonly [zm.ZodMiniString<string>, zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
33
+ export declare const ZodUuid4: zm.ZodMiniUnion<readonly [zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
34
+ export declare const ZodUuid7: zm.ZodMiniUnion<readonly [zm.ZodMiniString<string>, zm.ZodMiniUUID, zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
35
+ export declare const Zod4FakeUuidExport: zm.ZodMiniObject<{
36
+ utf8: zm.ZodMiniUUID;
37
+ hex: zm.ZodMiniCustomStringFormat<"hex">;
38
+ base64: zm.ZodMiniBase64;
39
+ base64url: zm.ZodMiniBase64URL;
40
+ }, zm.z.core.$strip>;
41
+ export declare const ZodSuruId: zm.ZodMiniUnion<readonly [zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniUnion<readonly [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]>;
@@ -1,34 +1,32 @@
1
- import * as z from 'zod/mini';
2
- export const WorkflowId = z.string().check(z.trim(), z.maxLength(64),
1
+ import * as zm from 'zod/mini';
2
+ export const WorkflowId = zm.string().check(zm.trim(), zm.maxLength(64),
3
3
  /**
4
4
  * @link https://developers.cloudflare.com/workflows/reference/limits/
5
5
  */
6
- z.regex(/^[a-zA-Z0-9_][a-zA-Z0-9-_]*$/));
7
- export const DoId = z.hex().check(z.trim(), z.length(64), z.toLowerCase());
8
- export const ZodCoordinate = z.string().check(z.trim(), z.minLength(3), z.regex(new RegExp(/^-?\d+\.\d+$/i)));
9
- export const ZodBlob = z.union([
10
- // Literal `node:buffer` type
11
- z.pipe(z.instanceof(Buffer), z.transform((b) => new Uint8Array(b))),
6
+ zm.regex(/^[a-zA-Z0-9_][a-zA-Z0-9-_]*$/));
7
+ export const DoId = zm.hex().check(zm.trim(), zm.length(64), zm.toLowerCase());
8
+ export const ZodCoordinate = zm.string().check(zm.trim(), zm.minLength(3), zm.regex(new RegExp(/^-?\d+\.\d+$/i)));
9
+ export const ZodBlob = zm.union([
12
10
  // Uint8Array
13
- z.pipe(z.instanceof(Uint8Array), z.transform((ui8a) => ui8a)),
11
+ zm.pipe(zm.instanceof(Uint8Array), zm.transform((ui8a) => ui8a)),
14
12
  // ArrayBuffer
15
- z.pipe(z.union([
13
+ zm.pipe(zm.union([
16
14
  // Each one has to be manually specified
17
- z.pipe(z.instanceof(ArrayBuffer), z.transform((ab) => ab)),
18
- z.pipe(z.instanceof(SharedArrayBuffer), z.transform((sab) => sab)),
19
- ]), z.transform((abl) => new Uint8Array(abl))),
15
+ zm.pipe(zm.instanceof(ArrayBuffer), zm.transform((ab) => ab)),
16
+ zm.pipe(zm.instanceof(SharedArrayBuffer), zm.transform((sab) => sab)),
17
+ ]), zm.transform((abl) => new Uint8Array(abl))),
20
18
  // D0Blob
21
- z.pipe(z.tuple([z.int().check(z.minimum(0), z.maximum(255))], z.int().check(z.minimum(0), z.maximum(255))), z.transform((arr) => new Uint8Array(arr))),
19
+ 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
20
  ]);
23
- export const ZodBlobExport = z.tuple([z.int().check(z.minimum(0), z.maximum(255))], z.int().check(z.minimum(0), z.maximum(255)));
21
+ export const ZodBlobExport = zm.tuple([zm.int().check(zm.minimum(0), zm.maximum(255))], zm.int().check(zm.minimum(0), zm.maximum(255)));
24
22
  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
23
  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
24
  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
25
  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
26
  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 = z.string().check(z.trim(), z.toLowerCase(), z.minLength(38), z.maxLength(40), z.regex(prefixedUuidRegex));
30
- export const PrefixedUuid7Raw = z.string().check(z.trim(), z.toLowerCase(), z.minLength(38), z.maxLength(40), z.regex(prefixedUuid7Regex));
31
- export const PrefixedUuid = z.pipe(PrefixedUuidRaw, z.transform((value) => {
27
+ export const PrefixedUuidRaw = zm.string().check(zm.trim(), zm.toLowerCase(), zm.minLength(38), zm.maxLength(40), zm.regex(prefixedUuidRegex));
28
+ export const PrefixedUuid7Raw = zm.string().check(zm.trim(), zm.toLowerCase(), zm.minLength(38), zm.maxLength(40), zm.regex(prefixedUuid7Regex));
29
+ export const PrefixedUuid = zm.pipe(PrefixedUuidRaw, zm.transform((value) => {
32
30
  let type;
33
31
  if (value.startsWith('d_')) {
34
32
  type = 'dataspace';
@@ -44,7 +42,7 @@ export const PrefixedUuid = z.pipe(PrefixedUuidRaw, z.transform((value) => {
44
42
  }
45
43
  return { type, value, preview: value.endsWith('_p') };
46
44
  }));
47
- export const PrefixedUuid7 = z.pipe(PrefixedUuid7Raw, z.transform((value) => {
45
+ export const PrefixedUuid7 = zm.pipe(PrefixedUuid7Raw, zm.transform((value) => {
48
46
  let type;
49
47
  if (value.startsWith('d_')) {
50
48
  type = 'dataspace';
@@ -60,42 +58,42 @@ export const PrefixedUuid7 = z.pipe(PrefixedUuid7Raw, z.transform((value) => {
60
58
  }
61
59
  return { type, value, preview: value.endsWith('_p') };
62
60
  }));
63
- export const ZodUuid = z.union([
61
+ export const ZodUuid = zm.union([
64
62
  PrefixedUuidRaw,
65
63
  // utf-8
66
- z.uuid().check(z.trim(), z.toLowerCase()),
64
+ zm.uuid().check(zm.trim(), zm.toLowerCase()),
67
65
  // hex
68
- z.hex().check(z.trim(), z.toLowerCase(), z.length(32), z.regex(hexUuidRegex)),
69
- z.base64().check(z.trim(), z.minLength(1)),
70
- z.base64url().check(z.trim(), z.minLength(1)),
66
+ zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuidRegex)),
67
+ zm.base64().check(zm.trim(), zm.minLength(1)),
68
+ zm.base64url().check(zm.trim(), zm.minLength(1)),
71
69
  ]);
72
- export const ZodUuid4 = z.union([
70
+ export const ZodUuid4 = zm.union([
73
71
  // utf-8
74
- z.uuidv4().check(z.trim(), z.toLowerCase()),
72
+ zm.uuidv4().check(zm.trim(), zm.toLowerCase()),
75
73
  // hex
76
- z.hex().check(z.trim(), z.toLowerCase(), z.length(32), z.regex(hexUuid4Regex)),
77
- z.base64().check(z.trim(), z.minLength(1)),
78
- z.base64url().check(z.trim(), z.minLength(1)),
74
+ zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuid4Regex)),
75
+ zm.base64().check(zm.trim(), zm.minLength(1)),
76
+ zm.base64url().check(zm.trim(), zm.minLength(1)),
79
77
  ]);
80
- export const ZodUuid7 = z.union([
78
+ export const ZodUuid7 = zm.union([
81
79
  PrefixedUuid7Raw,
82
80
  // utf-8
83
- z.uuidv7().check(z.trim(), z.toLowerCase()),
81
+ zm.uuidv7().check(zm.trim(), zm.toLowerCase()),
84
82
  // hex
85
- z.hex().check(z.trim(), z.toLowerCase(), z.length(32), z.regex(hexUuid7Regex)),
86
- z.base64().check(z.trim(), z.minLength(1)),
87
- z.base64url().check(z.trim(), z.minLength(1)),
83
+ zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuid7Regex)),
84
+ zm.base64().check(zm.trim(), zm.minLength(1)),
85
+ zm.base64url().check(zm.trim(), zm.minLength(1)),
88
86
  ]);
89
- export const Zod4FakeUuidExport = z.object({
90
- utf8: z.uuid().check(z.trim(), z.toLowerCase()),
91
- hex: z.hex().check(z.trim(), z.toLowerCase(), z.length(32), z.regex(hexUuidRegex)),
92
- base64: z.base64().check(z.trim(), z.minLength(1)),
93
- base64url: z.base64url().check(z.trim(), z.minLength(1)),
87
+ export const Zod4FakeUuidExport = zm.object({
88
+ utf8: zm.uuid().check(zm.trim(), zm.toLowerCase()),
89
+ hex: zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(32), zm.regex(hexUuidRegex)),
90
+ base64: zm.base64().check(zm.trim(), zm.minLength(1)),
91
+ base64url: zm.base64url().check(zm.trim(), zm.minLength(1)),
94
92
  });
95
- export const ZodSuruId = z.union([
93
+ export const ZodSuruId = zm.union([
96
94
  //
97
- z.hex().check(z.trim(), z.toLowerCase(), z.length(96)),
95
+ zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(96)),
98
96
  ZodBlob,
99
- z.base64().check(z.trim(), z.maxLength(64)),
100
- z.base64url().check(z.trim(), z.maxLength(64)),
97
+ zm.base64().check(zm.trim(), zm.maxLength(64)),
98
+ zm.base64url().check(zm.trim(), zm.maxLength(64)),
101
99
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/types",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
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.20250924.0",
105
+ "@cloudflare/workers-types": "^4.20250927.0",
106
106
  "@types/validator": "^13.15.3"
107
107
  },
108
- "gitHead": "6a6c57df6f9dbfe763ab4cd7f02038b2b47bd57b"
108
+ "gitHead": "c98a7fbd95832c83c81943f61eda16d82f980251"
109
109
  }