@chainfuse/types 2.10.29 → 2.11.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.
- package/dist/ai-tools/workers-ai/catalog.d.ts +1 -1
- package/dist/ai-tools/workers-ai/catalog.js +1 -1
- package/dist/d0/index.d.ts +0 -21
- package/dist/d0/index.js +1 -79
- package/dist/zod/index.d.ts +57 -5
- package/dist/zod/index.js +196 -3
- package/package.json +2 -6
|
@@ -11,6 +11,7 @@ export declare const workersAiCatalog: {
|
|
|
11
11
|
readonly created_at: "2025-08-05 10:27:29.131";
|
|
12
12
|
readonly tags: readonly [];
|
|
13
13
|
readonly properties: {
|
|
14
|
+
readonly async_queue: true;
|
|
14
15
|
readonly context_window: 128000;
|
|
15
16
|
readonly price: readonly [{
|
|
16
17
|
readonly unit: "per M input tokens";
|
|
@@ -1014,7 +1015,6 @@ export declare const workersAiCatalog: {
|
|
|
1014
1015
|
readonly created_at: "2024-02-27 17:40:38.881";
|
|
1015
1016
|
readonly tags: readonly [];
|
|
1016
1017
|
readonly properties: {
|
|
1017
|
-
readonly beta: true;
|
|
1018
1018
|
readonly info: "https://huggingface.co/Lykon/DreamShaper";
|
|
1019
1019
|
};
|
|
1020
1020
|
}, {
|
|
@@ -12,6 +12,7 @@ export const workersAiCatalog = {
|
|
|
12
12
|
created_at: '2025-08-05 10:27:29.131',
|
|
13
13
|
tags: [],
|
|
14
14
|
properties: {
|
|
15
|
+
async_queue: true,
|
|
15
16
|
context_window: 128000,
|
|
16
17
|
price: [
|
|
17
18
|
{
|
|
@@ -1167,7 +1168,6 @@ export const workersAiCatalog = {
|
|
|
1167
1168
|
created_at: '2024-02-27 17:40:38.881',
|
|
1168
1169
|
tags: [],
|
|
1169
1170
|
properties: {
|
|
1170
|
-
beta: true,
|
|
1171
1171
|
info: 'https://huggingface.co/Lykon/DreamShaper',
|
|
1172
1172
|
},
|
|
1173
1173
|
},
|
package/dist/d0/index.d.ts
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
import { z as z3 } from 'zod/v3';
|
|
2
|
-
import { z as z4 } from 'zod/v4';
|
|
3
1
|
export type D0Blob = [number, ...number[]];
|
|
4
|
-
export declare const PrefixedUuidRaw: z4.ZodString;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
*/
|
|
8
|
-
export declare const PrefixedUuid3: z3.ZodEffects<z3.ZodString, {
|
|
9
|
-
type: "dataspace" | "tenant" | "user";
|
|
10
|
-
value: string;
|
|
11
|
-
preview: boolean;
|
|
12
|
-
}, string>;
|
|
13
|
-
export declare const PrefixedUuid: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
|
|
14
|
-
type: "dataspace" | "tenant" | "user";
|
|
15
|
-
value: string;
|
|
16
|
-
preview: boolean;
|
|
17
|
-
}, string>>;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated
|
|
20
|
-
*/
|
|
21
|
-
export declare const ZodUuid3: z3.ZodUnion<[z3.ZodString, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodString, z3.ZodString]>;
|
|
22
|
-
export declare const ZodUuid: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodString, z4.ZodBase64, z4.ZodBase64URL]>;
|
package/dist/d0/index.js
CHANGED
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { z as z4 } from 'zod/v4';
|
|
3
|
-
const prefixedUuidRegex = /^((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;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
const PrefixedUuidRaw3 = z3.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
|
|
8
|
-
export const PrefixedUuidRaw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
export const PrefixedUuid3 = PrefixedUuidRaw3.transform((value) => {
|
|
13
|
-
let type;
|
|
14
|
-
if (value.startsWith('d_')) {
|
|
15
|
-
type = 'dataspace';
|
|
16
|
-
}
|
|
17
|
-
else if (value.startsWith('t_')) {
|
|
18
|
-
type = 'tenant';
|
|
19
|
-
}
|
|
20
|
-
else if (value.startsWith('u_')) {
|
|
21
|
-
type = 'user';
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error('Invalid UUID prefix');
|
|
25
|
-
}
|
|
26
|
-
return { type, value, preview: value.endsWith('_p') };
|
|
27
|
-
});
|
|
28
|
-
export const PrefixedUuid = PrefixedUuidRaw.transform((value) => {
|
|
29
|
-
let type;
|
|
30
|
-
if (value.startsWith('d_')) {
|
|
31
|
-
type = 'dataspace';
|
|
32
|
-
}
|
|
33
|
-
else if (value.startsWith('t_')) {
|
|
34
|
-
type = 'tenant';
|
|
35
|
-
}
|
|
36
|
-
else if (value.startsWith('u_')) {
|
|
37
|
-
type = 'user';
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
throw new Error('Invalid UUID prefix');
|
|
41
|
-
}
|
|
42
|
-
return { type, value, preview: value.endsWith('_p') };
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated
|
|
46
|
-
*/
|
|
47
|
-
export const ZodUuid3 = z3.union([
|
|
48
|
-
PrefixedUuidRaw3,
|
|
49
|
-
// utf-8
|
|
50
|
-
z3
|
|
51
|
-
.string()
|
|
52
|
-
.trim()
|
|
53
|
-
.toLowerCase()
|
|
54
|
-
.uuid()
|
|
55
|
-
.refine((value) => import('validator/es/lib/isUUID').then(({ default: isUUID }) => isUUID(value, 7)).catch(() => import('validator').then(({ default: validator }) => validator.isUUID(value, 7)))),
|
|
56
|
-
// hex
|
|
57
|
-
z3
|
|
58
|
-
.string()
|
|
59
|
-
.trim()
|
|
60
|
-
.toLowerCase()
|
|
61
|
-
.length(32)
|
|
62
|
-
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
63
|
-
z3.string().trim().nonempty().base64(),
|
|
64
|
-
z3.string().trim().nonempty().base64url(),
|
|
65
|
-
]);
|
|
66
|
-
export const ZodUuid = z4.union([
|
|
67
|
-
PrefixedUuidRaw,
|
|
68
|
-
// utf-8
|
|
69
|
-
z4.uuidv7().trim().toLowerCase(),
|
|
70
|
-
// hex
|
|
71
|
-
z4
|
|
72
|
-
.string()
|
|
73
|
-
.trim()
|
|
74
|
-
.toLowerCase()
|
|
75
|
-
.length(32)
|
|
76
|
-
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
77
|
-
z4.base64().trim().nonempty(),
|
|
78
|
-
z4.base64url().trim().nonempty(),
|
|
79
|
-
]);
|
|
1
|
+
export {};
|
package/dist/zod/index.d.ts
CHANGED
|
@@ -1,11 +1,63 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
1
|
+
import { z as z4 } from 'zod';
|
|
2
|
+
import { z as z3 } from 'zod/v3';
|
|
2
3
|
/**
|
|
3
4
|
* @link https://zod.dev/?id=json-type
|
|
4
5
|
*/
|
|
5
|
-
declare const literalSchema:
|
|
6
|
-
export type JSON =
|
|
6
|
+
declare const literalSchema: z3.ZodUnion<[z3.ZodString, z3.ZodNumber, z3.ZodBoolean, z3.ZodNull]>;
|
|
7
|
+
export type JSON = z3.infer<typeof literalSchema> | {
|
|
7
8
|
[key: string]: JSON;
|
|
8
9
|
} | JSON[];
|
|
9
|
-
export declare const jsonSchema:
|
|
10
|
-
export declare const ZodCoordinate:
|
|
10
|
+
export declare const jsonSchema: z3.ZodType<JSON>;
|
|
11
|
+
export declare const ZodCoordinate: z4.ZodString;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare const Prefixed3UuidRaw: z3.ZodString;
|
|
16
|
+
export declare const PrefixedUuidRaw: z4.ZodString;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
20
|
+
export declare const Prefixed3Uuid7Raw: z3.ZodString;
|
|
21
|
+
export declare const PrefixedUuid7Raw: z4.ZodString;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
25
|
+
export declare const Prefixed3Uuid: z3.ZodEffects<z3.ZodString, {
|
|
26
|
+
type: "dataspace" | "tenant" | "user";
|
|
27
|
+
value: string;
|
|
28
|
+
preview: boolean;
|
|
29
|
+
}, string>;
|
|
30
|
+
export declare const PrefixedUuid: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
|
|
31
|
+
type: "dataspace" | "tenant" | "user";
|
|
32
|
+
value: string;
|
|
33
|
+
preview: boolean;
|
|
34
|
+
}, string>>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated
|
|
37
|
+
*/
|
|
38
|
+
export declare const Prefixed3Uuid7: z3.ZodEffects<z3.ZodString, {
|
|
39
|
+
type: "dataspace" | "tenant" | "user";
|
|
40
|
+
value: string;
|
|
41
|
+
preview: boolean;
|
|
42
|
+
}, string>;
|
|
43
|
+
export declare const PrefixedUuid7: z4.ZodPipe<z4.ZodString, z4.ZodTransform<{
|
|
44
|
+
type: "dataspace" | "tenant" | "user";
|
|
45
|
+
value: string;
|
|
46
|
+
preview: boolean;
|
|
47
|
+
}, string>>;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated
|
|
50
|
+
*/
|
|
51
|
+
export declare const Zod3Uuid: z3.ZodUnion<[z3.ZodString, z3.ZodString, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodString, z3.ZodString]>;
|
|
52
|
+
export declare const ZodUuid: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodString, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated
|
|
55
|
+
*/
|
|
56
|
+
export declare const Zod3Uuid4: z3.ZodUnion<[z3.ZodEffects<z3.ZodString, string, string>, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodString, z3.ZodString]>;
|
|
57
|
+
export declare const ZodUuid4: z4.ZodUnion<readonly [z4.ZodUUID, z4.ZodString, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
*/
|
|
61
|
+
export declare const Zod3Uuid7: z3.ZodUnion<[z3.ZodString, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodEffects<z3.ZodString, string, string>, z3.ZodString, z3.ZodString]>;
|
|
62
|
+
export declare const ZodUuid7: z4.ZodUnion<readonly [z4.ZodString, z4.ZodUUID, z4.ZodString, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
11
63
|
export {};
|
package/dist/zod/index.js
CHANGED
|
@@ -1,11 +1,204 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
1
|
+
import { z as z4 } from 'zod';
|
|
2
|
+
import { z as z3 } from 'zod/v3';
|
|
2
3
|
/**
|
|
3
4
|
* @link https://zod.dev/?id=json-type
|
|
4
5
|
*/
|
|
5
|
-
const literalSchema =
|
|
6
|
-
export const jsonSchema =
|
|
6
|
+
const literalSchema = z3.union([z3.string(), z3.number(), z3.boolean(), z3.null()]);
|
|
7
|
+
export const jsonSchema = z3.lazy(() => z3.union([literalSchema, z3.array(jsonSchema), z3.record(jsonSchema)]));
|
|
7
8
|
export const ZodCoordinate = await import('zod/v4').then(({ z }) => z
|
|
8
9
|
.string()
|
|
9
10
|
.trim()
|
|
10
11
|
.min(3)
|
|
11
12
|
.regex(new RegExp(/^-?\d+\.\d+$/i)));
|
|
13
|
+
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;
|
|
14
|
+
const hexUuidRegex = /^[0-9a-f]{8}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
15
|
+
const hexUuid4Regex = /^[0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
16
|
+
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;
|
|
17
|
+
const hexUuid7Regex = /^[0-9a-f]{8}[0-9a-f]{4}7[0-9a-f]{3}[0-9a-f]{4}[0-9a-f]{12}$/i;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated
|
|
20
|
+
*/
|
|
21
|
+
export const Prefixed3UuidRaw = z3.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
|
|
22
|
+
export const PrefixedUuidRaw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuidRegex);
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
26
|
+
export const Prefixed3Uuid7Raw = z3.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuid7Regex);
|
|
27
|
+
export const PrefixedUuid7Raw = z4.string().trim().toLowerCase().min(38).max(40).regex(prefixedUuid7Regex);
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
*/
|
|
31
|
+
export const Prefixed3Uuid = Prefixed3UuidRaw.transform((value) => {
|
|
32
|
+
let type;
|
|
33
|
+
if (value.startsWith('d_')) {
|
|
34
|
+
type = 'dataspace';
|
|
35
|
+
}
|
|
36
|
+
else if (value.startsWith('t_')) {
|
|
37
|
+
type = 'tenant';
|
|
38
|
+
}
|
|
39
|
+
else if (value.startsWith('u_')) {
|
|
40
|
+
type = 'user';
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new Error('Invalid UUID prefix');
|
|
44
|
+
}
|
|
45
|
+
return { type, value, preview: value.endsWith('_p') };
|
|
46
|
+
});
|
|
47
|
+
export const PrefixedUuid = PrefixedUuidRaw.transform((value) => {
|
|
48
|
+
let type;
|
|
49
|
+
if (value.startsWith('d_')) {
|
|
50
|
+
type = 'dataspace';
|
|
51
|
+
}
|
|
52
|
+
else if (value.startsWith('t_')) {
|
|
53
|
+
type = 'tenant';
|
|
54
|
+
}
|
|
55
|
+
else if (value.startsWith('u_')) {
|
|
56
|
+
type = 'user';
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error('Invalid UUID prefix');
|
|
60
|
+
}
|
|
61
|
+
return { type, value, preview: value.endsWith('_p') };
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated
|
|
65
|
+
*/
|
|
66
|
+
export const Prefixed3Uuid7 = Prefixed3Uuid7Raw.transform((value) => {
|
|
67
|
+
let type;
|
|
68
|
+
if (value.startsWith('d_')) {
|
|
69
|
+
type = 'dataspace';
|
|
70
|
+
}
|
|
71
|
+
else if (value.startsWith('t_')) {
|
|
72
|
+
type = 'tenant';
|
|
73
|
+
}
|
|
74
|
+
else if (value.startsWith('u_')) {
|
|
75
|
+
type = 'user';
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
throw new Error('Invalid UUID prefix');
|
|
79
|
+
}
|
|
80
|
+
return { type, value, preview: value.endsWith('_p') };
|
|
81
|
+
});
|
|
82
|
+
export const PrefixedUuid7 = PrefixedUuid7Raw.transform((value) => {
|
|
83
|
+
let type;
|
|
84
|
+
if (value.startsWith('d_')) {
|
|
85
|
+
type = 'dataspace';
|
|
86
|
+
}
|
|
87
|
+
else if (value.startsWith('t_')) {
|
|
88
|
+
type = 'tenant';
|
|
89
|
+
}
|
|
90
|
+
else if (value.startsWith('u_')) {
|
|
91
|
+
type = 'user';
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
throw new Error('Invalid UUID prefix');
|
|
95
|
+
}
|
|
96
|
+
return { type, value, preview: value.endsWith('_p') };
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated
|
|
100
|
+
*/
|
|
101
|
+
export const Zod3Uuid = z3.union([
|
|
102
|
+
Prefixed3UuidRaw,
|
|
103
|
+
// utf-8
|
|
104
|
+
z3.string().trim().toLowerCase().uuid(),
|
|
105
|
+
// hex
|
|
106
|
+
z3
|
|
107
|
+
.string()
|
|
108
|
+
.trim()
|
|
109
|
+
.toLowerCase()
|
|
110
|
+
.length(32)
|
|
111
|
+
.regex(hexUuidRegex)
|
|
112
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
113
|
+
z3.string().trim().nonempty().base64(),
|
|
114
|
+
z3.string().trim().nonempty().base64url(),
|
|
115
|
+
]);
|
|
116
|
+
export const ZodUuid = z4.union([
|
|
117
|
+
PrefixedUuidRaw,
|
|
118
|
+
// utf-8
|
|
119
|
+
z4.uuid().trim().toLowerCase(),
|
|
120
|
+
// hex
|
|
121
|
+
z4
|
|
122
|
+
.string()
|
|
123
|
+
.trim()
|
|
124
|
+
.toLowerCase()
|
|
125
|
+
.length(32)
|
|
126
|
+
.regex(hexUuidRegex)
|
|
127
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
128
|
+
z4.base64().trim().nonempty(),
|
|
129
|
+
z4.base64url().trim().nonempty(),
|
|
130
|
+
]);
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated
|
|
133
|
+
*/
|
|
134
|
+
export const Zod3Uuid4 = z3.union([
|
|
135
|
+
// utf-8
|
|
136
|
+
z3
|
|
137
|
+
.string()
|
|
138
|
+
.trim()
|
|
139
|
+
.toLowerCase()
|
|
140
|
+
.uuid()
|
|
141
|
+
.refine((value) => import('validator/es/lib/isUUID').then(({ default: isUUID }) => isUUID(value, 4)).catch(() => import('validator').then(({ default: validator }) => validator.isUUID(value, 4)))),
|
|
142
|
+
// hex
|
|
143
|
+
z3
|
|
144
|
+
.string()
|
|
145
|
+
.trim()
|
|
146
|
+
.toLowerCase()
|
|
147
|
+
.length(32)
|
|
148
|
+
.regex(hexUuid4Regex)
|
|
149
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
150
|
+
z3.string().trim().nonempty().base64(),
|
|
151
|
+
z3.string().trim().nonempty().base64url(),
|
|
152
|
+
]);
|
|
153
|
+
export const ZodUuid4 = z4.union([
|
|
154
|
+
// utf-8
|
|
155
|
+
z4.uuidv4().trim().toLowerCase(),
|
|
156
|
+
// hex
|
|
157
|
+
z4
|
|
158
|
+
.string()
|
|
159
|
+
.trim()
|
|
160
|
+
.toLowerCase()
|
|
161
|
+
.length(32)
|
|
162
|
+
.regex(hexUuid4Regex)
|
|
163
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
164
|
+
z4.base64().trim().nonempty(),
|
|
165
|
+
z4.base64url().trim().nonempty(),
|
|
166
|
+
]);
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated
|
|
169
|
+
*/
|
|
170
|
+
export const Zod3Uuid7 = z3.union([
|
|
171
|
+
Prefixed3Uuid7Raw,
|
|
172
|
+
// utf-8
|
|
173
|
+
z3
|
|
174
|
+
.string()
|
|
175
|
+
.trim()
|
|
176
|
+
.toLowerCase()
|
|
177
|
+
.uuid()
|
|
178
|
+
.refine((value) => import('validator/es/lib/isUUID').then(({ default: isUUID }) => isUUID(value, 7)).catch(() => import('validator').then(({ default: validator }) => validator.isUUID(value, 7)))),
|
|
179
|
+
// hex
|
|
180
|
+
z3
|
|
181
|
+
.string()
|
|
182
|
+
.trim()
|
|
183
|
+
.toLowerCase()
|
|
184
|
+
.length(32)
|
|
185
|
+
.regex(hexUuid7Regex)
|
|
186
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
187
|
+
z3.string().trim().nonempty().base64(),
|
|
188
|
+
z3.string().trim().nonempty().base64url(),
|
|
189
|
+
]);
|
|
190
|
+
export const ZodUuid7 = z4.union([
|
|
191
|
+
PrefixedUuid7Raw,
|
|
192
|
+
// utf-8
|
|
193
|
+
z4.uuidv7().trim().toLowerCase(),
|
|
194
|
+
// hex
|
|
195
|
+
z4
|
|
196
|
+
.string()
|
|
197
|
+
.trim()
|
|
198
|
+
.toLowerCase()
|
|
199
|
+
.length(32)
|
|
200
|
+
.regex(hexUuid7Regex)
|
|
201
|
+
.refine((value) => import('validator/es/lib/isHexadecimal').then(({ default: isHexadecimal }) => isHexadecimal(value)).catch(() => import('validator').then(({ default: validator }) => validator.isHexadecimal(value)))),
|
|
202
|
+
z4.base64().trim().nonempty(),
|
|
203
|
+
z4.base64url().trim().nonempty(),
|
|
204
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -87,10 +87,6 @@
|
|
|
87
87
|
"import": "./dist/discourse/topic/index.js",
|
|
88
88
|
"types": "./dist/discourse/topic/index.d.ts"
|
|
89
89
|
},
|
|
90
|
-
"./wf": {
|
|
91
|
-
"import": "./dist/wf/index.js",
|
|
92
|
-
"types": "./dist/wf/index.d.ts"
|
|
93
|
-
},
|
|
94
90
|
"./zod": {
|
|
95
91
|
"import": "./dist/zod/index.js",
|
|
96
92
|
"types": "./dist/zod/index.d.ts"
|
|
@@ -105,5 +101,5 @@
|
|
|
105
101
|
"@cloudflare/workers-types": "^4.20250807.0",
|
|
106
102
|
"@types/validator": "^13.15.2"
|
|
107
103
|
},
|
|
108
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "2da7381e517cfdbd6b2750e2fc1a59f3b36edc4d"
|
|
109
105
|
}
|