@timothyw/pat-common 1.0.12 → 1.0.16

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 @@
1
+ export * from './panel-type';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./panel-type"), exports);
@@ -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 = {}));
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './enums';
1
2
  export * from './types';
package/dist/index.js CHANGED
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./enums"), exports);
17
18
  __exportStar(require("./types"), exports);
@@ -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("../../..").PanelType>>;
20
20
  visible: z.ZodOptional<z.ZodBoolean>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
22
+ type?: import("../../..").PanelType | undefined;
23
23
  visible?: boolean | undefined;
24
24
  }, {
25
- type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | undefined;
25
+ type?: import("../../..").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("../../..").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("../../..").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("../../..").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("../../..").PanelType | undefined;
76
76
  visible?: boolean | undefined;
77
77
  }[] | undefined;
78
78
  itemCategories?: string[] | undefined;
@@ -2,4 +2,3 @@ export * from './api';
2
2
  export * from './models';
3
3
  export * from './auth-tokens';
4
4
  export * from './id-types';
5
- export * from './panels';
@@ -18,4 +18,3 @@ __exportStar(require("./api"), exports);
18
18
  __exportStar(require("./models"), exports);
19
19
  __exportStar(require("./auth-tokens"), exports);
20
20
  __exportStar(require("./id-types"), exports);
21
- __exportStar(require("./panels"), exports);
@@ -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.16",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -0,0 +1 @@
1
+ export * from './panel-type';
@@ -0,0 +1,7 @@
1
+ export enum PanelType {
2
+ AGENDA = 'agenda',
3
+ TASKS = 'tasks',
4
+ INBOX = 'inbox',
5
+ PEOPLE = 'people',
6
+ SETTINGS = 'settings'
7
+ }
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './enums'
1
2
  export * from './types'
@@ -1,5 +1,4 @@
1
1
  export * from './api'
2
2
  export * from './models'
3
3
  export * from './auth-tokens'
4
- export * from './id-types'
5
- export * from './panels'
4
+ export * from './id-types'
@@ -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
 
@@ -1,3 +0,0 @@
1
- export const PANEL_TYPES = ['agenda', 'tasks', 'inbox', 'people', 'settings'] as const;
2
-
3
- export type PanelType = (typeof PANEL_TYPES)[number];