@chainfuse/types 2.10.1 → 2.10.3

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.
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import type { EnumOrEnumLike } from '../index.js';
3
+ import type { ZodCoordinate } from '../zod/index.js';
3
4
  import { type CloudflareFunctionModelsEnum, type CloudflareModelsEnum } from './workers-ai/index.js';
4
- export * from './azure/index.js';
5
- export * from './workers-ai/index.js';
6
5
  export interface Coordinate {
7
- lat: string;
8
- lon: string;
6
+ lat: z.infer<typeof ZodCoordinate>;
7
+ lon: z.infer<typeof ZodCoordinate>;
9
8
  }
10
9
  export declare namespace AiModels {
11
10
  namespace LanguageModels {
@@ -1,7 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  import { enabledCloudflareLlmEmbeddingProviders, enabledCloudflareLlmFunctionProviders, enabledCloudflareLlmImageProviders, enabledCloudflareLlmProviders } from './workers-ai/index.js';
3
- export * from './azure/index.js';
4
- export * from './workers-ai/index.js';
5
3
  export var AiModels;
6
4
  (function (AiModels) {
7
5
  let LanguageModels;
@@ -1,6 +1,4 @@
1
1
  import type { Buffer } from 'node:buffer';
2
- export * from './tenants/index.js';
3
- export * from './users/index.js';
4
2
  export type PrefixedUuid = `${'t_' | 'd_' | 'u_'}${UuidExport['utf8']}${'' | '_p'}`;
5
3
  export interface UuidExport {
6
4
  utf8: ReturnType<typeof crypto.randomUUID>;
package/dist/d1/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from './tenants/index.js';
2
- export * from './users/index.js';
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- import { z } from 'zod';
2
- export * from './ai-tools/index.js';
3
- export * from './d0/index.js';
4
- export * from './d1/index.js';
5
- export * from './discourse/index.js';
6
1
  export type EnumOrEnumLike<T> = T extends Record<string, infer V> ? V : T extends Readonly<Record<string, infer V>> ? V : never;
7
2
  export type NamespaceEnumObject<T> = {
8
3
  [K in keyof T as EnumOrEnumLike<T[K]> extends never ? never : K]?: T[K] extends Record<any, any> ? T[K][keyof T[K]] : never;
@@ -74,11 +69,4 @@ export declare enum DOLocations {
74
69
  'Africa' = "afr",
75
70
  'Middle East' = "me"
76
71
  }
77
- /**
78
- * @link https://zod.dev/?id=json-type
79
- */
80
- declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
81
- type Json = z.infer<typeof literalSchema> | {
82
- [key: string]: Json;
83
- } | Json[];
84
- export declare const jsonSchema: z.ZodType<Json>;
72
+ export {};
package/dist/index.js CHANGED
@@ -1,8 +1,3 @@
1
- import { z } from 'zod';
2
- export * from './ai-tools/index.js';
3
- export * from './d0/index.js';
4
- export * from './d1/index.js';
5
- export * from './discourse/index.js';
6
1
  /**
7
2
  * @link https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction
8
3
  */
@@ -26,8 +21,3 @@ export var DOLocations;
26
21
  DOLocations["Africa"] = "afr";
27
22
  DOLocations["Middle East"] = "me";
28
23
  })(DOLocations || (DOLocations = {}));
29
- /**
30
- * @link https://zod.dev/?id=json-type
31
- */
32
- const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
33
- export const jsonSchema = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]));
@@ -1,3 +1,2 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ZodUuidExportInput: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodEffects<z.ZodString, string, string>, z.ZodString, z.ZodString]>;
3
- export declare const ZodCoordinate: z.ZodString;
package/dist/wf/index.js CHANGED
@@ -18,8 +18,3 @@ export const ZodUuidExportInput = z.union([
18
18
  z.string().trim().nonempty().base64(),
19
19
  z.string().trim().nonempty().base64url(),
20
20
  ]);
21
- export const ZodCoordinate = z
22
- .string()
23
- .trim()
24
- .min(3)
25
- .regex(new RegExp(/^-?\d+\.\d+$/i));
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * @link https://zod.dev/?id=json-type
4
+ */
5
+ declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
6
+ type Json = z.infer<typeof literalSchema> | {
7
+ [key: string]: Json;
8
+ } | Json[];
9
+ export declare const jsonSchema: z.ZodType<Json>;
10
+ export declare const ZodCoordinate: z.ZodString;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * @link https://zod.dev/?id=json-type
4
+ */
5
+ const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
6
+ export const jsonSchema = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]));
7
+ export const ZodCoordinate = z
8
+ .string()
9
+ .trim()
10
+ .min(3)
11
+ .regex(new RegExp(/^-?\d+\.\d+$/i));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/types",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "description": "",
5
5
  "author": "ChainFuse",
6
6
  "homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
@@ -47,11 +47,19 @@
47
47
  "import": "./dist/ai-tools/index.js",
48
48
  "types": "./dist/ai-tools/index.d.ts"
49
49
  },
50
- "./ai-tools/catalog/azure": {
50
+ "./ai-tools/azure": {
51
+ "import": "./dist/ai-tools/azure/index.js",
52
+ "types": "./dist/ai-tools/azure/index.d.ts"
53
+ },
54
+ "./ai-tools/azure/catalog": {
51
55
  "import": "./dist/ai-tools/azure/catalog.js",
52
56
  "types": "./dist/ai-tools/azure/catalog.d.ts"
53
57
  },
54
- "./ai-tools/catalog/workers-ai": {
58
+ "./ai-tools/workers-ai": {
59
+ "import": "./dist/ai-tools/workers-ai/index.js",
60
+ "types": "./dist/ai-tools/workers-ai/index.d.ts"
61
+ },
62
+ "./ai-tools/workers-ai/catalog": {
55
63
  "import": "./dist/ai-tools/workers-ai/catalog.js",
56
64
  "types": "./dist/ai-tools/workers-ai/catalog.d.ts"
57
65
  },
@@ -71,10 +79,6 @@
71
79
  "import": "./dist/d1/users/index.js",
72
80
  "types": "./dist/d1/users/index.d.ts"
73
81
  },
74
- "./discourse": {
75
- "import": "./dist/discourse/index.js",
76
- "types": "./dist/discourse/index.d.ts"
77
- },
78
82
  "./discourse/post": {
79
83
  "import": "./dist/discourse/post/index.js",
80
84
  "types": "./dist/discourse/post/index.d.ts"
@@ -86,6 +90,10 @@
86
90
  "./wf": {
87
91
  "import": "./dist/wf/index.js",
88
92
  "types": "./dist/wf/index.d.ts"
93
+ },
94
+ "./zod": {
95
+ "import": "./dist/zod/index.js",
96
+ "types": "./dist/zod/index.d.ts"
89
97
  }
90
98
  },
91
99
  "prettier": "@demosjarco/prettier-config",
@@ -94,8 +102,8 @@
94
102
  "zod": "^3.24.3"
95
103
  },
96
104
  "devDependencies": {
97
- "@cloudflare/workers-types": "^4.20250417.0",
105
+ "@cloudflare/workers-types": "^4.20250422.0",
98
106
  "@types/validator": "^13.15.0"
99
107
  },
100
- "gitHead": "ed937523841735fb5d944dfe1a5bc8d396a601c5"
108
+ "gitHead": "98d1970d468f91261928a84b86f655ba30f15ccd"
101
109
  }
@@ -1,2 +0,0 @@
1
- export * from './post/index.js';
2
- export * from './topic/index.js';
@@ -1,2 +0,0 @@
1
- export * from './post/index.js';
2
- export * from './topic/index.js';