@timothyw/pat-common 1.0.11 → 1.0.12
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/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 +2 -3
- package/dist/types/models/user-config.js +0 -23
- package/package.json +1 -1
- package/src/types/api/account/update-user-config-types.ts +1 -1
- package/src/types/models/user-config.ts +4 -30
- package/tsconfig.json +2 -2
|
@@ -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.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]
|
|
20
|
-
visible: z.ZodBoolean
|
|
18
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
+
type: z.ZodOptional<z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>>;
|
|
20
|
+
visible: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type
|
|
23
|
-
visible
|
|
22
|
+
type?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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?: "agenda" | "tasks" | "inbox" | "people" | "settings" | 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,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { UserId } from "../id-types";
|
|
3
2
|
declare const panelSchema: z.ZodObject<{
|
|
4
3
|
type: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
|
|
5
4
|
visible: z.ZodBoolean;
|
|
@@ -10,9 +9,8 @@ declare const panelSchema: z.ZodObject<{
|
|
|
10
9
|
type: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
11
10
|
visible: boolean;
|
|
12
11
|
}>;
|
|
13
|
-
export type Panel = z.infer<typeof panelSchema>;
|
|
14
12
|
export declare const userConfigSchema: z.ZodObject<{
|
|
15
|
-
_id: z.ZodEffects<z.ZodString, UserId, string>;
|
|
13
|
+
_id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
|
|
16
14
|
createdAt: z.ZodDate;
|
|
17
15
|
updatedAt: z.ZodDate;
|
|
18
16
|
name: z.ZodString;
|
|
@@ -102,5 +100,6 @@ export declare const userConfigSchema: z.ZodObject<{
|
|
|
102
100
|
messageId: string;
|
|
103
101
|
} | undefined;
|
|
104
102
|
}>;
|
|
103
|
+
export type Panel = z.infer<typeof panelSchema>;
|
|
105
104
|
export type UserConfig = z.infer<typeof userConfigSchema>;
|
|
106
105
|
export {};
|
|
@@ -8,10 +8,6 @@ const panelSchema = zod_1.z.object({
|
|
|
8
8
|
type: zod_1.z.enum(panels_1.PANEL_TYPES),
|
|
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
|
|
1
|
+
import { PANEL_TYPES } from "../panels";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { userIdSchema } from "../id-types";
|
|
4
4
|
|
|
5
5
|
const panelSchema = z.object({
|
|
6
6
|
type: z.enum(PANEL_TYPES),
|
|
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>;
|