@timothyw/pat-common 1.0.64 → 1.0.66
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,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { PersonNoteId } from "../../id-types";
|
|
2
3
|
export declare const createPersonRequestSchema: z.ZodObject<{
|
|
3
4
|
name: z.ZodString;
|
|
4
5
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -11,27 +12,17 @@ export declare const createPersonRequestSchema: z.ZodObject<{
|
|
|
11
12
|
value: string;
|
|
12
13
|
key: string;
|
|
13
14
|
}>, "many">>;
|
|
14
|
-
notes: z.ZodOptional<z.ZodArray<z.
|
|
15
|
-
content: z.ZodString;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
content: string;
|
|
18
|
-
}, {
|
|
19
|
-
content: string;
|
|
20
|
-
}>, "many">>;
|
|
15
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PersonNoteId, string>, "many">>;
|
|
21
16
|
}, "strip", z.ZodTypeAny, {
|
|
22
17
|
name: string;
|
|
23
|
-
notes?:
|
|
24
|
-
content: string;
|
|
25
|
-
}[] | undefined;
|
|
18
|
+
notes?: PersonNoteId[] | undefined;
|
|
26
19
|
properties?: {
|
|
27
20
|
value: string;
|
|
28
21
|
key: string;
|
|
29
22
|
}[] | undefined;
|
|
30
23
|
}, {
|
|
31
24
|
name: string;
|
|
32
|
-
notes?:
|
|
33
|
-
content: string;
|
|
34
|
-
}[] | undefined;
|
|
25
|
+
notes?: string[] | undefined;
|
|
35
26
|
properties?: {
|
|
36
27
|
value: string;
|
|
37
28
|
key: string;
|
|
@@ -46,10 +37,6 @@ export interface CreatePersonResponse {
|
|
|
46
37
|
key: string;
|
|
47
38
|
value: string;
|
|
48
39
|
}>;
|
|
49
|
-
notes: Array<
|
|
50
|
-
content: string;
|
|
51
|
-
createdAt: string;
|
|
52
|
-
updatedAt: string;
|
|
53
|
-
}>;
|
|
40
|
+
notes: Array<PersonNoteId>;
|
|
54
41
|
};
|
|
55
42
|
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPersonRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../../id-types");
|
|
5
6
|
exports.createPersonRequestSchema = zod_1.z.object({
|
|
6
7
|
name: zod_1.z.string().min(1),
|
|
7
8
|
properties: zod_1.z.array(zod_1.z.object({
|
|
8
9
|
key: zod_1.z.string().min(1),
|
|
9
10
|
value: zod_1.z.string().min(1)
|
|
10
11
|
})).optional(),
|
|
11
|
-
notes: zod_1.z.array(
|
|
12
|
-
content: zod_1.z.string().min(1)
|
|
13
|
-
})).optional()
|
|
12
|
+
notes: zod_1.z.array(id_types_1.personNoteIdSchema).optional()
|
|
14
13
|
});
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { PersonNoteId, personNoteIdSchema } from "../../id-types";
|
|
2
3
|
|
|
3
4
|
export const createPersonRequestSchema = z.object({
|
|
4
5
|
name: z.string().min(1),
|
|
@@ -6,9 +7,7 @@ export const createPersonRequestSchema = z.object({
|
|
|
6
7
|
key: z.string().min(1),
|
|
7
8
|
value: z.string().min(1)
|
|
8
9
|
})).optional(),
|
|
9
|
-
notes: z.array(
|
|
10
|
-
content: z.string().min(1)
|
|
11
|
-
})).optional()
|
|
10
|
+
notes: z.array(personNoteIdSchema).optional()
|
|
12
11
|
});
|
|
13
12
|
|
|
14
13
|
export type CreatePersonRequest = z.infer<typeof createPersonRequestSchema>;
|
|
@@ -21,10 +20,6 @@ export interface CreatePersonResponse {
|
|
|
21
20
|
key: string;
|
|
22
21
|
value: string;
|
|
23
22
|
}>;
|
|
24
|
-
notes: Array<
|
|
25
|
-
content: string;
|
|
26
|
-
createdAt: string;
|
|
27
|
-
updatedAt: string;
|
|
28
|
-
}>;
|
|
23
|
+
notes: Array<PersonNoteId>;
|
|
29
24
|
};
|
|
30
25
|
}
|