@composio/json-schema-to-zod 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ZodTypeAny, z } from 'zod';
2
2
  import { JSONSchema7 } from 'json-schema';
3
3
 
4
- declare const SerializableSchema: z.ZodTypeAny;
5
- type Serializable = z.infer<typeof SerializableSchema>;
4
+ type Serializable = {
5
+ [key: string]: Serializable;
6
+ } | Serializable[] | string | number | boolean | null;
6
7
  type JsonSchema = JsonSchemaObject | boolean;
7
8
  type JsonSchemaObject = JSONSchema7;
8
9
  type ParserSelector = (schema: JsonSchemaObject, refs: Refs) => ZodTypeAny;
@@ -21,6 +22,6 @@ type Refs = JsonSchemaToZodOptions & {
21
22
  }>;
22
23
  };
23
24
 
24
- declare const jsonSchemaToZod: <T extends z.ZodTypeAny = z.ZodTypeAny>(schema: JsonSchema, options?: JsonSchemaToZodOptions) => T;
25
+ declare const jsonSchemaToZod: (schema: JsonSchema, options?: JsonSchemaToZodOptions) => z.ZodType;
25
26
 
26
- export { type JsonSchema, type JsonSchemaObject, type JsonSchemaToZodOptions, type ParserOverride, type ParserSelector, type Refs, type Serializable, SerializableSchema, jsonSchemaToZod };
27
+ export { type JsonSchema, type JsonSchemaObject, type JsonSchemaToZodOptions, type ParserOverride, type ParserSelector, type Refs, type Serializable, jsonSchemaToZod };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ZodTypeAny, z } from 'zod';
2
2
  import { JSONSchema7 } from 'json-schema';
3
3
 
4
- declare const SerializableSchema: z.ZodTypeAny;
5
- type Serializable = z.infer<typeof SerializableSchema>;
4
+ type Serializable = {
5
+ [key: string]: Serializable;
6
+ } | Serializable[] | string | number | boolean | null;
6
7
  type JsonSchema = JsonSchemaObject | boolean;
7
8
  type JsonSchemaObject = JSONSchema7;
8
9
  type ParserSelector = (schema: JsonSchemaObject, refs: Refs) => ZodTypeAny;
@@ -21,6 +22,6 @@ type Refs = JsonSchemaToZodOptions & {
21
22
  }>;
22
23
  };
23
24
 
24
- declare const jsonSchemaToZod: <T extends z.ZodTypeAny = z.ZodTypeAny>(schema: JsonSchema, options?: JsonSchemaToZodOptions) => T;
25
+ declare const jsonSchemaToZod: (schema: JsonSchema, options?: JsonSchemaToZodOptions) => z.ZodType;
25
26
 
26
- export { type JsonSchema, type JsonSchemaObject, type JsonSchemaToZodOptions, type ParserOverride, type ParserSelector, type Refs, type Serializable, SerializableSchema, jsonSchemaToZod };
27
+ export { type JsonSchema, type JsonSchemaObject, type JsonSchemaToZodOptions, type ParserOverride, type ParserSelector, type Refs, type Serializable, jsonSchemaToZod };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/json-schema-to-zod",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -29,6 +29,7 @@
29
29
  "license": "ISC",
30
30
  "packageManager": "pnpm@10.8.0",
31
31
  "devDependencies": {
32
+ "@types/node": "^24.0.1",
32
33
  "tsup": "^8.4.0",
33
34
  "typescript": "^5.8.3",
34
35
  "vitest": "^3.1.4"