@deessejs/collections 0.0.4 → 0.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.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.number = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const field_1 = require("./field");
|
|
9
|
+
exports.number = (0, field_1.fieldType)({
|
|
10
|
+
schema: zod_1.default.number(),
|
|
11
|
+
dsl: {
|
|
12
|
+
kind: "number",
|
|
13
|
+
},
|
|
14
|
+
admin: {
|
|
15
|
+
component: undefined,
|
|
16
|
+
},
|
|
17
|
+
});
|
package/dist/fields/field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
import { Field, FieldConfig, FieldTypeConfig, FieldTypeFinal } from "./types";
|
|
3
3
|
export declare const fieldType: <TParams extends z.ZodType>(config: FieldTypeConfig<TParams>) => (params: z.infer<TParams>) => FieldTypeFinal<TParams>;
|
|
4
|
-
export declare const field: <TType extends
|
|
4
|
+
export declare const field: <TType extends FieldTypeFinal>(config: FieldConfig<TType>) => Field<TType>;
|
package/dist/fields/index.d.ts
CHANGED
package/dist/fields/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./field"), exports);
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./core"), exports);
|
package/dist/fields/types.d.ts
CHANGED
|
@@ -26,11 +26,11 @@ export type FieldPermissions = {
|
|
|
26
26
|
update: (ctx: any) => Promise<boolean>;
|
|
27
27
|
delete: (ctx: any) => Promise<boolean>;
|
|
28
28
|
};
|
|
29
|
-
export type FieldConfig<TType extends
|
|
29
|
+
export type FieldConfig<TType extends FieldTypeFinal> = {
|
|
30
30
|
type: TType;
|
|
31
31
|
permissions?: Partial<FieldPermissions>;
|
|
32
32
|
};
|
|
33
|
-
export type Field<TType extends
|
|
33
|
+
export type Field<TType extends FieldTypeFinal = FieldTypeFinal> = {
|
|
34
34
|
type: TType;
|
|
35
35
|
permissions: FieldPermissions;
|
|
36
36
|
};
|