@timothyw/pat-common 1.0.88 → 1.0.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.
@@ -1,9 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { UserData } from "../../models";
3
3
  export declare const updateUserRequestSchema: z.ZodObject<{
4
- id: z.ZodOptional<z.ZodEffects<z.ZodString, import("../..").UserId, string>>;
5
- createdAt: z.ZodOptional<z.ZodDate>;
6
- updatedAt: z.ZodOptional<z.ZodDate>;
4
+ name: z.ZodOptional<z.ZodString>;
7
5
  sandbox: z.ZodOptional<z.ZodObject<{
8
6
  discordId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
7
  devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -24,7 +22,6 @@ export declare const updateUserRequestSchema: z.ZodObject<{
24
22
  pushToken?: string | undefined;
25
23
  }[] | undefined;
26
24
  }>>;
27
- name: z.ZodOptional<z.ZodString>;
28
25
  timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
29
26
  config: z.ZodOptional<z.ZodObject<{
30
27
  modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -80,9 +77,6 @@ export declare const updateUserRequestSchema: z.ZodObject<{
80
77
  }[] | undefined;
81
78
  }>>;
82
79
  }, "strict", z.ZodTypeAny, {
83
- id?: import("../..").UserId | undefined;
84
- createdAt?: Date | undefined;
85
- updatedAt?: Date | undefined;
86
80
  name?: string | undefined;
87
81
  sandbox?: {
88
82
  discordId?: string | undefined;
@@ -105,9 +99,6 @@ export declare const updateUserRequestSchema: z.ZodObject<{
105
99
  }[] | undefined;
106
100
  } | undefined;
107
101
  }, {
108
- id?: string | undefined;
109
- createdAt?: Date | undefined;
110
- updatedAt?: Date | undefined;
111
102
  name?: string | undefined;
112
103
  sandbox?: {
113
104
  discordId?: string | undefined;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateUserRequestSchema = void 0;
4
4
  const models_1 = require("../../models");
5
5
  exports.updateUserRequestSchema = models_1.userDataSchema
6
- // .omit({ _id: true, createdAt: true, updatedAt: true })
6
+ .omit({ _id: true, createdAt: true, updatedAt: true })
7
7
  .deepPartial()
8
8
  .strict();
@@ -1,6 +1,6 @@
1
1
  import { AuthId, UserId } from "../id-types";
2
2
  export interface AuthData {
3
- id: AuthId;
3
+ _id: AuthId;
4
4
  createdAt: Date;
5
5
  updatedAt: Date;
6
6
  userId: UserId;
@@ -13,7 +13,7 @@ export declare enum HabitEntryStatus {
13
13
  INCOMPLETE = "incomplete"
14
14
  }
15
15
  export interface HabitEntryData {
16
- id: HabitEntryId;
16
+ _id: HabitEntryId;
17
17
  habitId: HabitId;
18
18
  userId: UserId;
19
19
  date: DateOnlyString;
@@ -22,7 +22,7 @@ export interface HabitEntryData {
22
22
  updatedAt: Date;
23
23
  }
24
24
  export interface HabitData {
25
- id: HabitId;
25
+ _id: HabitId;
26
26
  userId: UserId;
27
27
  name: string;
28
28
  description?: string | null;
@@ -1,6 +1,6 @@
1
1
  import { ItemId, UserId } from "../id-types";
2
2
  export interface ItemData {
3
- id: ItemId;
3
+ _id: ItemId;
4
4
  userId: UserId;
5
5
  createdAt: Date;
6
6
  updatedAt: Date;
@@ -4,7 +4,7 @@ export interface PersonProperty {
4
4
  value: string;
5
5
  }
6
6
  export interface PersonNoteData {
7
- id: PersonNoteId;
7
+ _id: PersonNoteId;
8
8
  personId: PersonId;
9
9
  userId: UserId;
10
10
  content: string;
@@ -12,7 +12,7 @@ export interface PersonNoteData {
12
12
  updatedAt: Date;
13
13
  }
14
14
  export interface PersonData {
15
- id: PersonId;
15
+ _id: PersonId;
16
16
  userId: UserId;
17
17
  createdAt: Date;
18
18
  updatedAt: Date;
@@ -21,7 +21,7 @@ export interface PersonData {
21
21
  noteIds: PersonNoteId[];
22
22
  }
23
23
  export interface Person {
24
- id: PersonId;
24
+ _id: PersonId;
25
25
  userId: UserId;
26
26
  createdAt: Date;
27
27
  updatedAt: Date;
@@ -1,6 +1,6 @@
1
1
  import { TaskId, TaskListId, UserId } from "../id-types";
2
2
  export interface TaskData {
3
- id: TaskId;
3
+ _id: TaskId;
4
4
  userId: UserId;
5
5
  createdAt: Date;
6
6
  updatedAt: Date;
@@ -10,7 +10,7 @@ export interface TaskData {
10
10
  taskListId: TaskListId;
11
11
  }
12
12
  export interface TaskListData {
13
- id: TaskListId;
13
+ _id: TaskListId;
14
14
  userId: UserId;
15
15
  createdAt: Date;
16
16
  updatedAt: Date;
@@ -1,6 +1,6 @@
1
1
  import { ThoughtId, UserId } from "../id-types";
2
2
  export interface ThoughtData {
3
- id: ThoughtId;
3
+ _id: ThoughtId;
4
4
  userId: UserId;
5
5
  createdAt: Date;
6
6
  updatedAt: Date;
@@ -11,7 +11,7 @@ declare const moduleSchema: z.ZodObject<{
11
11
  visible: boolean;
12
12
  }>;
13
13
  export declare const userDataSchema: z.ZodObject<{
14
- id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
14
+ _id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
15
15
  createdAt: z.ZodDate;
16
16
  updatedAt: z.ZodDate;
17
17
  sandbox: z.ZodObject<{
@@ -90,7 +90,7 @@ export declare const userDataSchema: z.ZodObject<{
90
90
  }[];
91
91
  }>;
92
92
  }, "strip", z.ZodTypeAny, {
93
- id: string & {
93
+ _id: string & {
94
94
  readonly __brand: "UserId";
95
95
  };
96
96
  createdAt: Date;
@@ -117,7 +117,7 @@ export declare const userDataSchema: z.ZodObject<{
117
117
  }[];
118
118
  };
119
119
  }, {
120
- id: string;
120
+ _id: string;
121
121
  createdAt: Date;
122
122
  updatedAt: Date;
123
123
  name: string;
@@ -12,7 +12,7 @@ const deviceSchema = zod_1.z.object({
12
12
  pushToken: zod_1.z.string()
13
13
  });
14
14
  exports.userDataSchema = zod_1.z.object({
15
- id: id_types_1.userIdSchema,
15
+ _id: id_types_1.userIdSchema,
16
16
  createdAt: zod_1.z.date(),
17
17
  updatedAt: zod_1.z.date(),
18
18
  sandbox: zod_1.z.object({
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.88",
5
+ "version": "1.0.89",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { UserData, userDataSchema } from "../../models";
3
3
 
4
4
  export const updateUserRequestSchema = userDataSchema
5
- // .omit({ _id: true, createdAt: true, updatedAt: true })
5
+ .omit({ _id: true, createdAt: true, updatedAt: true })
6
6
  .deepPartial()
7
7
  .strict();
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { AuthId, UserId } from "../id-types";
2
2
 
3
3
  export interface AuthData {
4
- id: AuthId;
4
+ _id: AuthId;
5
5
  createdAt: Date;
6
6
  updatedAt: Date;
7
7
 
@@ -16,7 +16,7 @@ export enum HabitEntryStatus {
16
16
  }
17
17
 
18
18
  export interface HabitEntryData {
19
- id: HabitEntryId;
19
+ _id: HabitEntryId;
20
20
  habitId: HabitId;
21
21
  userId: UserId;
22
22
  date: DateOnlyString;
@@ -26,7 +26,7 @@ export interface HabitEntryData {
26
26
  }
27
27
 
28
28
  export interface HabitData {
29
- id: HabitId;
29
+ _id: HabitId;
30
30
  userId: UserId;
31
31
  name: string;
32
32
  description?: string | null;
@@ -1,7 +1,7 @@
1
1
  import { ItemId, UserId } from "../id-types";
2
2
 
3
3
  export interface ItemData {
4
- id: ItemId;
4
+ _id: ItemId;
5
5
  userId: UserId;
6
6
  createdAt: Date;
7
7
  updatedAt: Date;
@@ -6,7 +6,7 @@ export interface PersonProperty {
6
6
  }
7
7
 
8
8
  export interface PersonNoteData {
9
- id: PersonNoteId;
9
+ _id: PersonNoteId;
10
10
  personId: PersonId;
11
11
  userId: UserId;
12
12
  content: string;
@@ -15,7 +15,7 @@ export interface PersonNoteData {
15
15
  }
16
16
 
17
17
  export interface PersonData {
18
- id: PersonId;
18
+ _id: PersonId;
19
19
  userId: UserId;
20
20
  createdAt: Date;
21
21
  updatedAt: Date;
@@ -25,7 +25,7 @@ export interface PersonData {
25
25
  }
26
26
 
27
27
  export interface Person {
28
- id: PersonId;
28
+ _id: PersonId;
29
29
  userId: UserId;
30
30
  createdAt: Date;
31
31
  updatedAt: Date;
@@ -1,7 +1,7 @@
1
1
  import { TaskId, TaskListId, UserId } from "../id-types";
2
2
 
3
3
  export interface TaskData {
4
- id: TaskId;
4
+ _id: TaskId;
5
5
  userId: UserId;
6
6
  createdAt: Date;
7
7
  updatedAt: Date;
@@ -12,7 +12,7 @@ export interface TaskData {
12
12
  }
13
13
 
14
14
  export interface TaskListData {
15
- id: TaskListId;
15
+ _id: TaskListId;
16
16
  userId: UserId;
17
17
  createdAt: Date;
18
18
  updatedAt: Date;
@@ -1,7 +1,7 @@
1
1
  import { ThoughtId, UserId } from "../id-types";
2
2
 
3
3
  export interface ThoughtData {
4
- id: ThoughtId;
4
+ _id: ThoughtId;
5
5
  userId: UserId;
6
6
  createdAt: Date;
7
7
  updatedAt: Date;
@@ -12,7 +12,7 @@ const deviceSchema = z.object({
12
12
  });
13
13
 
14
14
  export const userDataSchema = z.object({
15
- id: userIdSchema,
15
+ _id: userIdSchema,
16
16
  createdAt: z.date(),
17
17
  updatedAt: z.date(),
18
18