@timothyw/pat-common 1.0.21 → 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.
- package/dist/enums/index.d.ts +1 -1
- package/dist/enums/index.js +1 -1
- package/dist/enums/module-type.d.ts +8 -0
- package/dist/enums/module-type.js +12 -0
- package/dist/types/api/account/update-user-types.d.ts +12 -12
- package/dist/types/models/user-data.d.ts +18 -18
- package/dist/types/models/user-data.js +3 -3
- package/package.json +1 -1
- package/src/enums/index.ts +1 -1
- package/src/enums/{panel-type.ts → module-type.ts} +1 -1
- package/src/types/models/user-data.ts +5 -5
package/dist/enums/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './module-type';
|
package/dist/enums/index.js
CHANGED
|
@@ -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("./
|
|
17
|
+
__exportStar(require("./module-type"), exports);
|
|
@@ -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
|
-
|
|
15
|
-
type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../..").
|
|
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("../../..").
|
|
18
|
+
type?: import("../../..").ModuleType | undefined;
|
|
19
19
|
visible?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
|
-
type?: import("../../..").
|
|
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
|
-
|
|
50
|
-
type?: import("../../..").
|
|
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
|
-
|
|
62
|
-
type?: import("../../..").
|
|
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
|
-
|
|
81
|
-
type?: import("../../..").
|
|
80
|
+
modules?: {
|
|
81
|
+
type?: import("../../..").ModuleType | undefined;
|
|
82
82
|
visible?: boolean | undefined;
|
|
83
83
|
}[] | undefined;
|
|
84
84
|
} | undefined;
|
|
@@ -96,8 +96,8 @@ export declare const updateUserRequestSchema: z.ZodObject<{
|
|
|
96
96
|
people?: {
|
|
97
97
|
propertyKeys?: string[] | undefined;
|
|
98
98
|
} | undefined;
|
|
99
|
-
|
|
100
|
-
type?: import("../../..").
|
|
99
|
+
modules?: {
|
|
100
|
+
type?: import("../../..").ModuleType | undefined;
|
|
101
101
|
visible?: boolean | undefined;
|
|
102
102
|
}[] | undefined;
|
|
103
103
|
} | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
declare const
|
|
4
|
-
type: z.ZodNativeEnum<typeof
|
|
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:
|
|
7
|
+
type: ModuleType;
|
|
8
8
|
visible: boolean;
|
|
9
9
|
}, {
|
|
10
|
-
type:
|
|
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
|
-
|
|
28
|
-
type: z.ZodNativeEnum<typeof
|
|
27
|
+
modules: z.ZodArray<z.ZodObject<{
|
|
28
|
+
type: z.ZodNativeEnum<typeof ModuleType>;
|
|
29
29
|
visible: z.ZodBoolean;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
type:
|
|
31
|
+
type: ModuleType;
|
|
32
32
|
visible: boolean;
|
|
33
33
|
}, {
|
|
34
|
-
type:
|
|
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
|
-
|
|
63
|
-
type:
|
|
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
|
-
|
|
75
|
-
type:
|
|
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
|
-
|
|
96
|
-
type:
|
|
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
|
-
|
|
118
|
-
type:
|
|
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
|
|
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
|
|
8
|
-
type: zod_1.z.nativeEnum(enums_1.
|
|
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
|
-
|
|
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
package/src/enums/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './module-type';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { userIdSchema } from "../id-types";
|
|
3
|
-
import {
|
|
3
|
+
import { ModuleType } from "../../enums";
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
type: z.nativeEnum(
|
|
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
|
-
|
|
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
|
|
41
|
+
export type Module = z.infer<typeof moduleSchema>;
|
|
42
42
|
export type UserData = z.infer<typeof userDataSchema>;
|