@timothyw/pat-common 1.0.20 → 1.0.22

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 +1 @@
1
- export * from './panel-type';
1
+ export * from './module-type';
@@ -14,4 +14,4 @@ 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("./panel-type"), exports);
17
+ __exportStar(require("./module-type"), exports);
@@ -0,0 +1,8 @@
1
+ export declare enum ModuleType {
2
+ AGENDA = "agenda",
3
+ TASKS = "tasks",
4
+ INBOX = "inbox",
5
+ PEOPLE = "people",
6
+ SETTINGS = "settings",
7
+ DEV = "dev"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModuleType = void 0;
4
+ var ModuleType;
5
+ (function (ModuleType) {
6
+ ModuleType["AGENDA"] = "agenda";
7
+ ModuleType["TASKS"] = "tasks";
8
+ ModuleType["INBOX"] = "inbox";
9
+ ModuleType["PEOPLE"] = "people";
10
+ ModuleType["SETTINGS"] = "settings";
11
+ ModuleType["DEV"] = "dev";
12
+ })(ModuleType || (exports.ModuleType = ModuleType = {}));
@@ -11,14 +11,14 @@ export declare const updateUserRequestSchema: z.ZodObject<{
11
11
  name: z.ZodOptional<z.ZodString>;
12
12
  timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
13
13
  config: z.ZodOptional<z.ZodObject<{
14
- panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
- type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../..").PanelType>>;
14
+ modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../..").ModuleType>>;
16
16
  visible: z.ZodOptional<z.ZodBoolean>;
17
17
  }, "strip", z.ZodTypeAny, {
18
- type?: import("../../..").PanelType | undefined;
18
+ type?: import("../../..").ModuleType | undefined;
19
19
  visible?: boolean | undefined;
20
20
  }, {
21
- type?: import("../../..").PanelType | undefined;
21
+ type?: import("../../..").ModuleType | undefined;
22
22
  visible?: boolean | undefined;
23
23
  }>, "many">>;
24
24
  agenda: z.ZodOptional<z.ZodObject<{
@@ -46,8 +46,8 @@ export declare const updateUserRequestSchema: z.ZodObject<{
46
46
  people?: {
47
47
  propertyKeys?: string[] | undefined;
48
48
  } | undefined;
49
- panels?: {
50
- type?: import("../../..").PanelType | undefined;
49
+ modules?: {
50
+ type?: import("../../..").ModuleType | undefined;
51
51
  visible?: boolean | undefined;
52
52
  }[] | undefined;
53
53
  }, {
@@ -58,8 +58,8 @@ export declare const updateUserRequestSchema: z.ZodObject<{
58
58
  people?: {
59
59
  propertyKeys?: string[] | undefined;
60
60
  } | undefined;
61
- panels?: {
62
- type?: import("../../..").PanelType | undefined;
61
+ modules?: {
62
+ type?: import("../../..").ModuleType | undefined;
63
63
  visible?: boolean | undefined;
64
64
  }[] | undefined;
65
65
  }>>;
@@ -77,8 +77,8 @@ export declare const updateUserRequestSchema: z.ZodObject<{
77
77
  people?: {
78
78
  propertyKeys?: string[] | undefined;
79
79
  } | undefined;
80
- panels?: {
81
- type?: import("../../..").PanelType | undefined;
80
+ modules?: {
81
+ type?: import("../../..").ModuleType | undefined;
82
82
  visible?: boolean | undefined;
83
83
  }[] | undefined;
84
84
  } | undefined;
@@ -96,13 +96,13 @@ export declare const updateUserRequestSchema: z.ZodObject<{
96
96
  people?: {
97
97
  propertyKeys?: string[] | undefined;
98
98
  } | undefined;
99
- panels?: {
100
- type?: import("../../..").PanelType | undefined;
99
+ modules?: {
100
+ type?: import("../../..").ModuleType | undefined;
101
101
  visible?: boolean | undefined;
102
102
  }[] | undefined;
103
103
  } | undefined;
104
104
  }>;
105
105
  export type UpdateUserRequest = z.infer<typeof updateUserRequestSchema>;
106
- export interface UpdateUserConfigResponse {
106
+ export interface UpdateUserResponse {
107
107
  user: UserData;
108
108
  }
@@ -1,13 +1,13 @@
1
1
  import { z } from "zod";
2
- import { PanelType } from "../../enums";
3
- declare const panelSchema: z.ZodObject<{
4
- type: z.ZodNativeEnum<typeof PanelType>;
2
+ import { ModuleType } from "../../enums";
3
+ declare const moduleSchema: z.ZodObject<{
4
+ type: z.ZodNativeEnum<typeof ModuleType>;
5
5
  visible: z.ZodBoolean;
6
6
  }, "strip", z.ZodTypeAny, {
7
- type: PanelType;
7
+ type: ModuleType;
8
8
  visible: boolean;
9
9
  }, {
10
- type: PanelType;
10
+ type: ModuleType;
11
11
  visible: boolean;
12
12
  }>;
13
13
  export declare const userDataSchema: z.ZodObject<{
@@ -24,14 +24,14 @@ export declare const userDataSchema: z.ZodObject<{
24
24
  name: z.ZodString;
25
25
  timezone: z.ZodEffects<z.ZodString, string, string>;
26
26
  config: z.ZodObject<{
27
- panels: z.ZodArray<z.ZodObject<{
28
- type: z.ZodNativeEnum<typeof PanelType>;
27
+ modules: z.ZodArray<z.ZodObject<{
28
+ type: z.ZodNativeEnum<typeof ModuleType>;
29
29
  visible: z.ZodBoolean;
30
30
  }, "strip", z.ZodTypeAny, {
31
- type: PanelType;
31
+ type: ModuleType;
32
32
  visible: boolean;
33
33
  }, {
34
- type: PanelType;
34
+ type: ModuleType;
35
35
  visible: boolean;
36
36
  }>, "many">;
37
37
  agenda: z.ZodObject<{
@@ -59,8 +59,8 @@ export declare const userDataSchema: z.ZodObject<{
59
59
  people: {
60
60
  propertyKeys: string[];
61
61
  };
62
- panels: {
63
- type: PanelType;
62
+ modules: {
63
+ type: ModuleType;
64
64
  visible: boolean;
65
65
  }[];
66
66
  }, {
@@ -71,8 +71,8 @@ export declare const userDataSchema: z.ZodObject<{
71
71
  people: {
72
72
  propertyKeys: string[];
73
73
  };
74
- panels: {
75
- type: PanelType;
74
+ modules: {
75
+ type: ModuleType;
76
76
  visible: boolean;
77
77
  }[];
78
78
  }>;
@@ -92,8 +92,8 @@ export declare const userDataSchema: z.ZodObject<{
92
92
  people: {
93
93
  propertyKeys: string[];
94
94
  };
95
- panels: {
96
- type: PanelType;
95
+ modules: {
96
+ type: ModuleType;
97
97
  visible: boolean;
98
98
  }[];
99
99
  };
@@ -114,8 +114,8 @@ export declare const userDataSchema: z.ZodObject<{
114
114
  people: {
115
115
  propertyKeys: string[];
116
116
  };
117
- panels: {
118
- type: PanelType;
117
+ modules: {
118
+ type: ModuleType;
119
119
  visible: boolean;
120
120
  }[];
121
121
  };
@@ -123,6 +123,6 @@ export declare const userDataSchema: z.ZodObject<{
123
123
  discordId?: string | undefined;
124
124
  } | undefined;
125
125
  }>;
126
- export type Panel = z.infer<typeof panelSchema>;
126
+ export type Module = z.infer<typeof moduleSchema>;
127
127
  export type UserData = z.infer<typeof userDataSchema>;
128
128
  export {};
@@ -4,8 +4,8 @@ exports.userDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const id_types_1 = require("../id-types");
6
6
  const enums_1 = require("../../enums");
7
- const panelSchema = zod_1.z.object({
8
- type: zod_1.z.nativeEnum(enums_1.PanelType),
7
+ const moduleSchema = zod_1.z.object({
8
+ type: zod_1.z.nativeEnum(enums_1.ModuleType),
9
9
  visible: zod_1.z.boolean()
10
10
  });
11
11
  exports.userDataSchema = zod_1.z.object({
@@ -26,7 +26,7 @@ exports.userDataSchema = zod_1.z.object({
26
26
  }
27
27
  }, { message: "Invalid timezone" }),
28
28
  config: zod_1.z.object({
29
- panels: zod_1.z.array(panelSchema),
29
+ modules: zod_1.z.array(moduleSchema),
30
30
  agenda: zod_1.z.object({
31
31
  itemCategories: zod_1.z.array(zod_1.z.string()),
32
32
  itemTypes: zod_1.z.array(zod_1.z.string())
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.20",
5
+ "version": "1.0.22",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1 +1 @@
1
- export * from './panel-type';
1
+ export * from './module-type';
@@ -1,4 +1,4 @@
1
- export enum PanelType {
1
+ export enum ModuleType {
2
2
  AGENDA = 'agenda',
3
3
  TASKS = 'tasks',
4
4
  INBOX = 'inbox',
@@ -8,6 +8,6 @@ export const updateUserRequestSchema = userDataSchema
8
8
 
9
9
  export type UpdateUserRequest = z.infer<typeof updateUserRequestSchema>;
10
10
 
11
- export interface UpdateUserConfigResponse {
11
+ export interface UpdateUserResponse {
12
12
  user: UserData
13
13
  }
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  import { userIdSchema } from "../id-types";
3
- import { PanelType } from "../../enums";
3
+ import { ModuleType } from "../../enums";
4
4
 
5
- const panelSchema = z.object({
6
- type: z.nativeEnum(PanelType),
5
+ const moduleSchema = z.object({
6
+ type: z.nativeEnum(ModuleType),
7
7
  visible: z.boolean()
8
8
  });
9
9
 
@@ -27,7 +27,7 @@ export const userDataSchema = z.object({
27
27
  }, { message: "Invalid timezone" }),
28
28
 
29
29
  config: z.object({
30
- panels: z.array(panelSchema),
30
+ modules: z.array(moduleSchema),
31
31
  agenda: z.object({
32
32
  itemCategories: z.array(z.string()),
33
33
  itemTypes: z.array(z.string())
@@ -38,5 +38,5 @@ export const userDataSchema = z.object({
38
38
  })
39
39
  });
40
40
 
41
- export type Panel = z.infer<typeof panelSchema>;
41
+ export type Module = z.infer<typeof moduleSchema>;
42
42
  export type UserData = z.infer<typeof userDataSchema>;