@timothyw/pat-common 1.0.11 → 1.0.12

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.
@@ -5,79 +5,79 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
5
5
  timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
6
  discordID: z.ZodOptional<z.ZodOptional<z.ZodString>>;
7
7
  itemListTracking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
8
- channelId: z.ZodString;
9
- messageId: z.ZodString;
8
+ channelId: z.ZodOptional<z.ZodString>;
9
+ messageId: z.ZodOptional<z.ZodString>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- channelId: string;
12
- messageId: string;
11
+ channelId?: string | undefined;
12
+ messageId?: string | undefined;
13
13
  }, {
14
- channelId: string;
15
- messageId: string;
14
+ channelId?: string | undefined;
15
+ messageId?: string | undefined;
16
16
  }>>>;
17
17
  iosApp: z.ZodOptional<z.ZodObject<{
18
- panels: z.ZodArray<z.ZodObject<{
19
- type: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
20
- visible: z.ZodBoolean;
18
+ panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ type: z.ZodOptional<z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>>;
20
+ visible: z.ZodOptional<z.ZodBoolean>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
23
- visible: boolean;
22
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
23
+ visible?: boolean | undefined;
24
24
  }, {
25
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
26
- visible: boolean;
27
- }>, "many">;
28
- itemCategories: z.ZodArray<z.ZodString, "many">;
29
- itemTypes: z.ZodArray<z.ZodString, "many">;
30
- propertyKeys: z.ZodArray<z.ZodString, "many">;
25
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
26
+ visible?: boolean | undefined;
27
+ }>, "many">>;
28
+ itemCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
29
+ itemTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
30
+ propertyKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
31
31
  }, "strip", z.ZodTypeAny, {
32
- panels: {
33
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
34
- visible: boolean;
35
- }[];
36
- itemCategories: string[];
37
- itemTypes: string[];
38
- propertyKeys: string[];
32
+ panels?: {
33
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
34
+ visible?: boolean | undefined;
35
+ }[] | undefined;
36
+ itemCategories?: string[] | undefined;
37
+ itemTypes?: string[] | undefined;
38
+ propertyKeys?: string[] | undefined;
39
39
  }, {
40
- panels: {
41
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
42
- visible: boolean;
43
- }[];
44
- itemCategories: string[];
45
- itemTypes: string[];
46
- propertyKeys: string[];
40
+ panels?: {
41
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
42
+ visible?: boolean | undefined;
43
+ }[] | undefined;
44
+ itemCategories?: string[] | undefined;
45
+ itemTypes?: string[] | undefined;
46
+ propertyKeys?: string[] | undefined;
47
47
  }>>;
48
48
  }, "strict", z.ZodTypeAny, {
49
49
  name?: string | undefined;
50
50
  timezone?: string | undefined;
51
51
  discordID?: string | undefined;
52
52
  itemListTracking?: {
53
- channelId: string;
54
- messageId: string;
53
+ channelId?: string | undefined;
54
+ messageId?: string | undefined;
55
55
  } | undefined;
56
56
  iosApp?: {
57
- panels: {
58
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
59
- visible: boolean;
60
- }[];
61
- itemCategories: string[];
62
- itemTypes: string[];
63
- propertyKeys: string[];
57
+ panels?: {
58
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
59
+ visible?: boolean | undefined;
60
+ }[] | undefined;
61
+ itemCategories?: string[] | undefined;
62
+ itemTypes?: string[] | undefined;
63
+ propertyKeys?: string[] | undefined;
64
64
  } | undefined;
65
65
  }, {
66
66
  name?: string | undefined;
67
67
  timezone?: string | undefined;
68
68
  discordID?: string | undefined;
69
69
  itemListTracking?: {
70
- channelId: string;
71
- messageId: string;
70
+ channelId?: string | undefined;
71
+ messageId?: string | undefined;
72
72
  } | undefined;
73
73
  iosApp?: {
74
- panels: {
75
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
76
- visible: boolean;
77
- }[];
78
- itemCategories: string[];
79
- itemTypes: string[];
80
- propertyKeys: string[];
74
+ panels?: {
75
+ type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
76
+ visible?: boolean | undefined;
77
+ }[] | undefined;
78
+ itemCategories?: string[] | undefined;
79
+ itemTypes?: string[] | undefined;
80
+ propertyKeys?: string[] | undefined;
81
81
  } | undefined;
82
82
  }>;
83
83
  export type UpdateUserConfigRequest = z.infer<typeof updateUserConfigRequestSchema>;
@@ -4,5 +4,5 @@ exports.updateUserConfigRequestSchema = void 0;
4
4
  const models_1 = require("../../models");
5
5
  exports.updateUserConfigRequestSchema = models_1.userConfigSchema
6
6
  .omit({ _id: true, createdAt: true, updatedAt: true })
7
- .partial()
7
+ .deepPartial()
8
8
  .strict();
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { UserId } from "../id-types";
3
2
  declare const panelSchema: z.ZodObject<{
4
3
  type: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
5
4
  visible: z.ZodBoolean;
@@ -10,9 +9,8 @@ declare const panelSchema: z.ZodObject<{
10
9
  type: "agenda" | "tasks" | "inbox" | "people" | "settings";
11
10
  visible: boolean;
12
11
  }>;
13
- export type Panel = z.infer<typeof panelSchema>;
14
12
  export declare const userConfigSchema: z.ZodObject<{
15
- _id: z.ZodEffects<z.ZodString, UserId, string>;
13
+ _id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
16
14
  createdAt: z.ZodDate;
17
15
  updatedAt: z.ZodDate;
18
16
  name: z.ZodString;
@@ -102,5 +100,6 @@ export declare const userConfigSchema: z.ZodObject<{
102
100
  messageId: string;
103
101
  } | undefined;
104
102
  }>;
103
+ export type Panel = z.infer<typeof panelSchema>;
105
104
  export type UserConfig = z.infer<typeof userConfigSchema>;
106
105
  export {};
@@ -8,10 +8,6 @@ const panelSchema = zod_1.z.object({
8
8
  type: zod_1.z.enum(panels_1.PANEL_TYPES),
9
9
  visible: zod_1.z.boolean()
10
10
  });
11
- // export interface Panel {
12
- // type: PanelType;
13
- // visible: boolean;
14
- // }
15
11
  exports.userConfigSchema = zod_1.z.object({
16
12
  _id: id_types_1.userIdSchema,
17
13
  createdAt: zod_1.z.date(),
@@ -38,22 +34,3 @@ exports.userConfigSchema = zod_1.z.object({
38
34
  propertyKeys: zod_1.z.array(zod_1.z.string())
39
35
  })
40
36
  });
41
- // export interface UserConfig {
42
- // _id: UserId;
43
- // createdAt: Date;
44
- // updatedAt: Date;
45
- //
46
- // name: string;
47
- // timezone: string;
48
- // discordID?: string;
49
- // itemListTracking?: {
50
- // channelId: string;
51
- // messageId: string;
52
- // };
53
- // iosApp: {
54
- // panels: Panel[];
55
- // itemCategories: string[];
56
- // itemTypes: string[];
57
- // propertyKeys: string[];
58
- // };
59
- // }
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.11",
5
+ "version": "1.0.12",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -3,7 +3,7 @@ import { UserConfig, userConfigSchema } from "../../models";
3
3
 
4
4
  export const updateUserConfigRequestSchema = userConfigSchema
5
5
  .omit({ _id: true, createdAt: true, updatedAt: true })
6
- .partial()
6
+ .deepPartial()
7
7
  .strict();
8
8
 
9
9
  export type UpdateUserConfigRequest = z.infer<typeof updateUserConfigRequestSchema>;
@@ -1,19 +1,12 @@
1
- import { PANEL_TYPES, PanelType } from "../panels";
1
+ import { PANEL_TYPES } from "../panels";
2
2
  import { z } from "zod";
3
- import { AuthId, UserId, userIdSchema } from "../id-types";
3
+ import { userIdSchema } from "../id-types";
4
4
 
5
5
  const panelSchema = z.object({
6
6
  type: z.enum(PANEL_TYPES),
7
7
  visible: z.boolean()
8
8
  });
9
9
 
10
- export type Panel = z.infer<typeof panelSchema>;
11
-
12
- // export interface Panel {
13
- // type: PanelType;
14
- // visible: boolean;
15
- // }
16
-
17
10
  export const userConfigSchema = z.object({
18
11
  _id: userIdSchema,
19
12
  createdAt: z.date(),
@@ -40,24 +33,5 @@ export const userConfigSchema = z.object({
40
33
  })
41
34
  });
42
35
 
43
- export type UserConfig = z.infer<typeof userConfigSchema>;
44
-
45
- // export interface UserConfig {
46
- // _id: UserId;
47
- // createdAt: Date;
48
- // updatedAt: Date;
49
- //
50
- // name: string;
51
- // timezone: string;
52
- // discordID?: string;
53
- // itemListTracking?: {
54
- // channelId: string;
55
- // messageId: string;
56
- // };
57
- // iosApp: {
58
- // panels: Panel[];
59
- // itemCategories: string[];
60
- // itemTypes: string[];
61
- // propertyKeys: string[];
62
- // };
63
- // }
36
+ export type Panel = z.infer<typeof panelSchema>;
37
+ export type UserConfig = z.infer<typeof userConfigSchema>;
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "es2016",
4
- "module": "commonjs",
3
+ "target": "ES2020",
4
+ "module": "CommonJS",
5
5
  "esModuleInterop": true,
6
6
  "forceConsistentCasingInFileNames": true,
7
7
  "strict": true,