orchid-orm-schema-to-zod 0.3.87 → 0.3.89
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.ts +3 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { JSONDiscriminatedUnion, Primitive, JSONTypeAny, ColumnTypeBase, JSONArray, JSONEnum, JSONInstanceOf, JSONLiteral, JSONMap, JSONSet, JSONNativeEnum, JSONTuple, JSONObject, UnknownKeysParam, JSONRecord, JSONRecordKeyType, JSONIntersection } from 'orchid-core';
|
|
1
|
+
import * as pqb from 'pqb';
|
|
3
2
|
import { ColumnsShape, ColumnType, EnumColumn, ArrayColumn, JSONColumn, VirtualColumn } from 'pqb';
|
|
3
|
+
import { JSONDiscriminatedUnion, Primitive, JSONTypeAny, ColumnTypeBase, JSONArray, JSONEnum, JSONInstanceOf, JSONLiteral, JSONMap, JSONSet, JSONNativeEnum, JSONTuple, JSONObject, UnknownKeysParam, JSONRecord, JSONRecordKeyType, JSONIntersection } from 'orchid-core';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { Buffer } from 'node:buffer';
|
|
6
6
|
|
|
@@ -57,7 +57,7 @@ type InstanceToZod<T extends {
|
|
|
57
57
|
declare const instanceToZod: <T extends {
|
|
58
58
|
shape: ColumnsShape;
|
|
59
59
|
}>({ shape, }: T) => InstanceToZod<T>;
|
|
60
|
-
declare const columnToZod: <T extends ColumnType<unknown,
|
|
60
|
+
declare const columnToZod: <T extends ColumnType<unknown, pqb.BaseOperators, unknown>>(column: T) => SchemaToZod<T, T["dataType"]>;
|
|
61
61
|
declare const interval: z.ZodObject<{
|
|
62
62
|
years: z.ZodOptional<z.ZodNumber>;
|
|
63
63
|
months: z.ZodOptional<z.ZodNumber>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orchid-orm-schema-to-zod",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.89",
|
|
4
4
|
"description": "Orchid-ORM columns schema to Zod converter",
|
|
5
5
|
"homepage": "https://orchid-orm.netlify.app/guide/columns-validation-methods.html",
|
|
6
6
|
"repository": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"license": "ISC",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"zod": "^3.21.4",
|
|
47
|
-
"orchid-core": "0.
|
|
48
|
-
"pqb": "0.
|
|
47
|
+
"orchid-core": "0.7.0",
|
|
48
|
+
"pqb": "0.15.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"test-utils": "0.0.2"
|