@timothyw/pat-common 1.0.76 → 1.0.78

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,12 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { PersonNoteId } from "../../id-types";
3
2
  import { PersonNoteData } from "../../models";
4
3
  export declare const createPersonNoteRequestSchema: z.ZodObject<{
5
- personId: z.ZodEffects<z.ZodString, PersonNoteId, string>;
4
+ personId: z.ZodEffects<z.ZodString, import("../../id-types").PersonId, string>;
6
5
  content: z.ZodString;
7
6
  }, "strip", z.ZodTypeAny, {
8
7
  personId: string & {
9
- readonly __brand: "PersonNoteId";
8
+ readonly __brand: "PersonId";
10
9
  };
11
10
  content: string;
12
11
  }, {
@@ -4,6 +4,6 @@ exports.createPersonNoteRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const id_types_1 = require("../../id-types");
6
6
  exports.createPersonNoteRequestSchema = zod_1.z.object({
7
- personId: id_types_1.personNoteIdSchema,
7
+ personId: id_types_1.personIdSchema,
8
8
  content: zod_1.z.string().min(1)
9
9
  });
@@ -13,7 +13,8 @@ export declare enum HabitEntryStatus {
13
13
  }
14
14
  export interface HabitEntryData {
15
15
  _id: HabitEntryId;
16
- habitId: string;
16
+ habitId: HabitId;
17
+ userId: UserId;
17
18
  date: DateOnlyString;
18
19
  status: HabitEntryStatus;
19
20
  createdAt: Date;
@@ -5,6 +5,8 @@ export interface PersonProperty {
5
5
  }
6
6
  export interface PersonNoteData {
7
7
  _id: PersonNoteId;
8
+ personId: PersonId;
9
+ userId: UserId;
8
10
  content: string;
9
11
  createdAt: Date;
10
12
  updatedAt: Date;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.76",
5
+ "version": "1.0.78",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { PersonNoteId, personNoteIdSchema } from "../../id-types";
2
+ import { personIdSchema, PersonNoteId, personNoteIdSchema } from "../../id-types";
3
3
  import { PersonNoteData } from "../../models";
4
4
 
5
5
  export const createPersonNoteRequestSchema = z.object({
6
- personId: personNoteIdSchema,
6
+ personId: personIdSchema,
7
7
  content: z.string().min(1)
8
8
  });
9
9
 
@@ -16,7 +16,8 @@ export enum HabitEntryStatus {
16
16
 
17
17
  export interface HabitEntryData {
18
18
  _id: HabitEntryId;
19
- habitId: string;
19
+ habitId: HabitId;
20
+ userId: UserId;
20
21
  date: DateOnlyString;
21
22
  status: HabitEntryStatus;
22
23
  createdAt: Date;
@@ -7,6 +7,8 @@ export interface PersonProperty {
7
7
 
8
8
  export interface PersonNoteData {
9
9
  _id: PersonNoteId;
10
+ personId: PersonId;
11
+ userId: UserId;
10
12
  content: string;
11
13
  createdAt: Date;
12
14
  updatedAt: Date;