@timothyw/pat-common 1.0.11 → 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.
- package/dist/enums/panel-type.d.ts +7 -0
- package/dist/enums/panel-type.js +11 -0
- package/dist/types/api/account/update-user-config-types.d.ts +49 -49
- package/dist/types/api/account/update-user-config-types.js +1 -1
- package/dist/types/models/user-config.d.ts +13 -13
- package/dist/types/models/user-config.js +2 -25
- package/package.json +1 -1
- package/src/enums/panel-type.ts +7 -0
- package/src/types/api/account/update-user-config-types.ts +1 -1
- package/src/types/models/user-config.ts +5 -31
- package/tsconfig.json +2 -2
|
@@ -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 = {}));
|
|
@@ -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
|
|
12
|
-
messageId
|
|
11
|
+
channelId?: string | undefined;
|
|
12
|
+
messageId?: string | undefined;
|
|
13
13
|
}, {
|
|
14
|
-
channelId
|
|
15
|
-
messageId
|
|
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.
|
|
20
|
-
visible: z.ZodBoolean
|
|
18
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../../enums/panel-type").PanelType>>;
|
|
20
|
+
visible: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type
|
|
23
|
-
visible
|
|
22
|
+
type?: import("../../../enums/panel-type").PanelType | undefined;
|
|
23
|
+
visible?: boolean | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
type
|
|
26
|
-
visible
|
|
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?: import("../../../enums/panel-type").PanelType | 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
|
|
34
|
-
visible
|
|
35
|
-
}[];
|
|
36
|
-
itemCategories
|
|
37
|
-
itemTypes
|
|
38
|
-
propertyKeys
|
|
32
|
+
panels?: {
|
|
33
|
+
type?: import("../../../enums/panel-type").PanelType | 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
|
|
42
|
-
visible
|
|
43
|
-
}[];
|
|
44
|
-
itemCategories
|
|
45
|
-
itemTypes
|
|
46
|
-
propertyKeys
|
|
40
|
+
panels?: {
|
|
41
|
+
type?: import("../../../enums/panel-type").PanelType | 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
|
|
54
|
-
messageId
|
|
53
|
+
channelId?: string | undefined;
|
|
54
|
+
messageId?: string | undefined;
|
|
55
55
|
} | undefined;
|
|
56
56
|
iosApp?: {
|
|
57
|
-
panels
|
|
58
|
-
type
|
|
59
|
-
visible
|
|
60
|
-
}[];
|
|
61
|
-
itemCategories
|
|
62
|
-
itemTypes
|
|
63
|
-
propertyKeys
|
|
57
|
+
panels?: {
|
|
58
|
+
type?: import("../../../enums/panel-type").PanelType | 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
|
|
71
|
-
messageId
|
|
70
|
+
channelId?: string | undefined;
|
|
71
|
+
messageId?: string | undefined;
|
|
72
72
|
} | undefined;
|
|
73
73
|
iosApp?: {
|
|
74
|
-
panels
|
|
75
|
-
type
|
|
76
|
-
visible
|
|
77
|
-
}[];
|
|
78
|
-
itemCategories
|
|
79
|
-
itemTypes
|
|
80
|
-
propertyKeys
|
|
74
|
+
panels?: {
|
|
75
|
+
type?: import("../../../enums/panel-type").PanelType | 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>;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { PanelType } from "../../enums/panel-type";
|
|
3
3
|
declare const panelSchema: z.ZodObject<{
|
|
4
|
-
type: z.
|
|
4
|
+
type: z.ZodNativeEnum<typeof PanelType>;
|
|
5
5
|
visible: z.ZodBoolean;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type:
|
|
7
|
+
type: PanelType;
|
|
8
8
|
visible: boolean;
|
|
9
9
|
}, {
|
|
10
|
-
type:
|
|
10
|
+
type: PanelType;
|
|
11
11
|
visible: boolean;
|
|
12
12
|
}>;
|
|
13
|
-
export type Panel = z.infer<typeof panelSchema>;
|
|
14
13
|
export declare const userConfigSchema: z.ZodObject<{
|
|
15
|
-
_id: z.ZodEffects<z.ZodString, UserId, string>;
|
|
14
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
16
15
|
createdAt: z.ZodDate;
|
|
17
16
|
updatedAt: z.ZodDate;
|
|
18
17
|
name: z.ZodString;
|
|
@@ -30,13 +29,13 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
30
29
|
}>>;
|
|
31
30
|
iosApp: z.ZodObject<{
|
|
32
31
|
panels: z.ZodArray<z.ZodObject<{
|
|
33
|
-
type: z.
|
|
32
|
+
type: z.ZodNativeEnum<typeof PanelType>;
|
|
34
33
|
visible: z.ZodBoolean;
|
|
35
34
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
type:
|
|
35
|
+
type: PanelType;
|
|
37
36
|
visible: boolean;
|
|
38
37
|
}, {
|
|
39
|
-
type:
|
|
38
|
+
type: PanelType;
|
|
40
39
|
visible: boolean;
|
|
41
40
|
}>, "many">;
|
|
42
41
|
itemCategories: z.ZodArray<z.ZodString, "many">;
|
|
@@ -44,7 +43,7 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
44
43
|
propertyKeys: z.ZodArray<z.ZodString, "many">;
|
|
45
44
|
}, "strip", z.ZodTypeAny, {
|
|
46
45
|
panels: {
|
|
47
|
-
type:
|
|
46
|
+
type: PanelType;
|
|
48
47
|
visible: boolean;
|
|
49
48
|
}[];
|
|
50
49
|
itemCategories: string[];
|
|
@@ -52,7 +51,7 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
52
51
|
propertyKeys: string[];
|
|
53
52
|
}, {
|
|
54
53
|
panels: {
|
|
55
|
-
type:
|
|
54
|
+
type: PanelType;
|
|
56
55
|
visible: boolean;
|
|
57
56
|
}[];
|
|
58
57
|
itemCategories: string[];
|
|
@@ -69,7 +68,7 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
69
68
|
timezone: string;
|
|
70
69
|
iosApp: {
|
|
71
70
|
panels: {
|
|
72
|
-
type:
|
|
71
|
+
type: PanelType;
|
|
73
72
|
visible: boolean;
|
|
74
73
|
}[];
|
|
75
74
|
itemCategories: string[];
|
|
@@ -89,7 +88,7 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
89
88
|
timezone: string;
|
|
90
89
|
iosApp: {
|
|
91
90
|
panels: {
|
|
92
|
-
type:
|
|
91
|
+
type: PanelType;
|
|
93
92
|
visible: boolean;
|
|
94
93
|
}[];
|
|
95
94
|
itemCategories: string[];
|
|
@@ -102,5 +101,6 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
102
101
|
messageId: string;
|
|
103
102
|
} | undefined;
|
|
104
103
|
}>;
|
|
104
|
+
export type Panel = z.infer<typeof panelSchema>;
|
|
105
105
|
export type UserConfig = z.infer<typeof userConfigSchema>;
|
|
106
106
|
export {};
|
|
@@ -1,17 +1,13 @@
|
|
|
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.
|
|
8
|
+
type: zod_1.z.nativeEnum(panel_type_1.PanelType),
|
|
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
|
@@ -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
|
-
.
|
|
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";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
2
|
+
import { userIdSchema } from "../id-types";
|
|
3
|
+
import { PanelType } from "../../enums/panel-type";
|
|
4
4
|
|
|
5
5
|
const panelSchema = z.object({
|
|
6
|
-
type: z.
|
|
6
|
+
type: z.nativeEnum(PanelType),
|
|
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
|
|
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>;
|