@timothyw/pat-common 1.0.12 → 1.0.13

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,7 @@
1
+ export declare enum PanelType {
2
+ AGENDA = "agenda",
3
+ TASKS = "tasks",
4
+ INBOX = "inbox",
5
+ PEOPLE = "people",
6
+ SETTINGS = "settings"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PanelType = void 0;
4
+ var PanelType;
5
+ (function (PanelType) {
6
+ PanelType["AGENDA"] = "agenda";
7
+ PanelType["TASKS"] = "tasks";
8
+ PanelType["INBOX"] = "inbox";
9
+ PanelType["PEOPLE"] = "people";
10
+ PanelType["SETTINGS"] = "settings";
11
+ })(PanelType || (exports.PanelType = PanelType = {}));
@@ -16,13 +16,13 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
16
16
  }>>>;
17
17
  iosApp: z.ZodOptional<z.ZodObject<{
18
18
  panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
- type: z.ZodOptional<z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>>;
19
+ type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../../enums/panel-type").PanelType>>;
20
20
  visible: z.ZodOptional<z.ZodBoolean>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
22
+ type?: import("../../../enums/panel-type").PanelType | undefined;
23
23
  visible?: boolean | undefined;
24
24
  }, {
25
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
25
+ type?: import("../../../enums/panel-type").PanelType | undefined;
26
26
  visible?: boolean | undefined;
27
27
  }>, "many">>;
28
28
  itemCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -30,7 +30,7 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
30
30
  propertyKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  panels?: {
33
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
33
+ type?: import("../../../enums/panel-type").PanelType | undefined;
34
34
  visible?: boolean | undefined;
35
35
  }[] | undefined;
36
36
  itemCategories?: string[] | undefined;
@@ -38,7 +38,7 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
38
38
  propertyKeys?: string[] | undefined;
39
39
  }, {
40
40
  panels?: {
41
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
41
+ type?: import("../../../enums/panel-type").PanelType | undefined;
42
42
  visible?: boolean | undefined;
43
43
  }[] | undefined;
44
44
  itemCategories?: string[] | undefined;
@@ -55,7 +55,7 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
55
55
  } | undefined;
56
56
  iosApp?: {
57
57
  panels?: {
58
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
58
+ type?: import("../../../enums/panel-type").PanelType | undefined;
59
59
  visible?: boolean | undefined;
60
60
  }[] | undefined;
61
61
  itemCategories?: string[] | undefined;
@@ -72,7 +72,7 @@ export declare const updateUserConfigRequestSchema: z.ZodObject<{
72
72
  } | undefined;
73
73
  iosApp?: {
74
74
  panels?: {
75
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
75
+ type?: import("../../../enums/panel-type").PanelType | undefined;
76
76
  visible?: boolean | undefined;
77
77
  }[] | undefined;
78
78
  itemCategories?: string[] | undefined;
@@ -1,12 +1,13 @@
1
1
  import { z } from "zod";
2
+ import { PanelType } from "../../enums/panel-type";
2
3
  declare const panelSchema: z.ZodObject<{
3
- type: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
4
+ type: z.ZodNativeEnum<typeof PanelType>;
4
5
  visible: z.ZodBoolean;
5
6
  }, "strip", z.ZodTypeAny, {
6
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
7
+ type: PanelType;
7
8
  visible: boolean;
8
9
  }, {
9
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
10
+ type: PanelType;
10
11
  visible: boolean;
11
12
  }>;
12
13
  export declare const userConfigSchema: z.ZodObject<{
@@ -28,13 +29,13 @@ export declare const userConfigSchema: z.ZodObject<{
28
29
  }>>;
29
30
  iosApp: z.ZodObject<{
30
31
  panels: z.ZodArray<z.ZodObject<{
31
- type: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
32
+ type: z.ZodNativeEnum<typeof PanelType>;
32
33
  visible: z.ZodBoolean;
33
34
  }, "strip", z.ZodTypeAny, {
34
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
35
+ type: PanelType;
35
36
  visible: boolean;
36
37
  }, {
37
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
38
+ type: PanelType;
38
39
  visible: boolean;
39
40
  }>, "many">;
40
41
  itemCategories: z.ZodArray<z.ZodString, "many">;
@@ -42,7 +43,7 @@ export declare const userConfigSchema: z.ZodObject<{
42
43
  propertyKeys: z.ZodArray<z.ZodString, "many">;
43
44
  }, "strip", z.ZodTypeAny, {
44
45
  panels: {
45
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
46
+ type: PanelType;
46
47
  visible: boolean;
47
48
  }[];
48
49
  itemCategories: string[];
@@ -50,7 +51,7 @@ export declare const userConfigSchema: z.ZodObject<{
50
51
  propertyKeys: string[];
51
52
  }, {
52
53
  panels: {
53
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
54
+ type: PanelType;
54
55
  visible: boolean;
55
56
  }[];
56
57
  itemCategories: string[];
@@ -67,7 +68,7 @@ export declare const userConfigSchema: z.ZodObject<{
67
68
  timezone: string;
68
69
  iosApp: {
69
70
  panels: {
70
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
71
+ type: PanelType;
71
72
  visible: boolean;
72
73
  }[];
73
74
  itemCategories: string[];
@@ -87,7 +88,7 @@ export declare const userConfigSchema: z.ZodObject<{
87
88
  timezone: string;
88
89
  iosApp: {
89
90
  panels: {
90
- type: "agenda" | "tasks" | "inbox" | "people" | "settings";
91
+ type: PanelType;
91
92
  visible: boolean;
92
93
  }[];
93
94
  itemCategories: string[];
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.userConfigSchema = void 0;
4
- const panels_1 = require("../panels");
5
4
  const zod_1 = require("zod");
6
5
  const id_types_1 = require("../id-types");
6
+ const panel_type_1 = require("../../enums/panel-type");
7
7
  const panelSchema = zod_1.z.object({
8
- type: zod_1.z.enum(panels_1.PANEL_TYPES),
8
+ type: zod_1.z.nativeEnum(panel_type_1.PanelType),
9
9
  visible: zod_1.z.boolean()
10
10
  });
11
11
  exports.userConfigSchema = 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.12",
5
+ "version": "1.0.13",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -0,0 +1,7 @@
1
+ export enum PanelType {
2
+ AGENDA = 'agenda',
3
+ TASKS = 'tasks',
4
+ INBOX = 'inbox',
5
+ PEOPLE = 'people',
6
+ SETTINGS = 'settings'
7
+ }
@@ -1,9 +1,9 @@
1
- import { PANEL_TYPES } from "../panels";
2
1
  import { z } from "zod";
3
2
  import { userIdSchema } from "../id-types";
3
+ import { PanelType } from "../../enums/panel-type";
4
4
 
5
5
  const panelSchema = z.object({
6
- type: z.enum(PANEL_TYPES),
6
+ type: z.nativeEnum(PanelType),
7
7
  visible: z.boolean()
8
8
  });
9
9