@timothyw/pat-common 1.0.23 → 1.0.24
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.
|
@@ -3,10 +3,23 @@ import { UserData } from "../../models";
|
|
|
3
3
|
export declare const updateUserRequestSchema: z.ZodObject<{
|
|
4
4
|
sandbox: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
5
5
|
discordId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
pushToken: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
pushToken?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
pushToken?: string | undefined;
|
|
12
|
+
}>, "many">>;
|
|
6
13
|
}, "strip", z.ZodTypeAny, {
|
|
7
14
|
discordId?: string | undefined;
|
|
15
|
+
devices?: {
|
|
16
|
+
pushToken?: string | undefined;
|
|
17
|
+
}[] | undefined;
|
|
8
18
|
}, {
|
|
9
19
|
discordId?: string | undefined;
|
|
20
|
+
devices?: {
|
|
21
|
+
pushToken?: string | undefined;
|
|
22
|
+
}[] | undefined;
|
|
10
23
|
}>>>;
|
|
11
24
|
name: z.ZodOptional<z.ZodString>;
|
|
12
25
|
timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
@@ -66,6 +79,9 @@ export declare const updateUserRequestSchema: z.ZodObject<{
|
|
|
66
79
|
}, "strict", z.ZodTypeAny, {
|
|
67
80
|
sandbox?: {
|
|
68
81
|
discordId?: string | undefined;
|
|
82
|
+
devices?: {
|
|
83
|
+
pushToken?: string | undefined;
|
|
84
|
+
}[] | undefined;
|
|
69
85
|
} | undefined;
|
|
70
86
|
name?: string | undefined;
|
|
71
87
|
timezone?: string | undefined;
|
|
@@ -85,6 +101,9 @@ export declare const updateUserRequestSchema: z.ZodObject<{
|
|
|
85
101
|
}, {
|
|
86
102
|
sandbox?: {
|
|
87
103
|
discordId?: string | undefined;
|
|
104
|
+
devices?: {
|
|
105
|
+
pushToken?: string | undefined;
|
|
106
|
+
}[] | undefined;
|
|
88
107
|
} | undefined;
|
|
89
108
|
name?: string | undefined;
|
|
90
109
|
timezone?: string | undefined;
|
|
@@ -16,9 +16,22 @@ export declare const userDataSchema: z.ZodObject<{
|
|
|
16
16
|
updatedAt: z.ZodDate;
|
|
17
17
|
sandbox: z.ZodOptional<z.ZodObject<{
|
|
18
18
|
discordId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
20
|
+
pushToken: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
pushToken: string;
|
|
23
|
+
}, {
|
|
24
|
+
pushToken: string;
|
|
25
|
+
}>, "many">;
|
|
19
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
devices: {
|
|
28
|
+
pushToken: string;
|
|
29
|
+
}[];
|
|
20
30
|
discordId?: string | undefined;
|
|
21
31
|
}, {
|
|
32
|
+
devices: {
|
|
33
|
+
pushToken: string;
|
|
34
|
+
}[];
|
|
22
35
|
discordId?: string | undefined;
|
|
23
36
|
}>>;
|
|
24
37
|
name: z.ZodString;
|
|
@@ -98,6 +111,9 @@ export declare const userDataSchema: z.ZodObject<{
|
|
|
98
111
|
}[];
|
|
99
112
|
};
|
|
100
113
|
sandbox?: {
|
|
114
|
+
devices: {
|
|
115
|
+
pushToken: string;
|
|
116
|
+
}[];
|
|
101
117
|
discordId?: string | undefined;
|
|
102
118
|
} | undefined;
|
|
103
119
|
}, {
|
|
@@ -120,6 +136,9 @@ export declare const userDataSchema: z.ZodObject<{
|
|
|
120
136
|
}[];
|
|
121
137
|
};
|
|
122
138
|
sandbox?: {
|
|
139
|
+
devices: {
|
|
140
|
+
pushToken: string;
|
|
141
|
+
}[];
|
|
123
142
|
discordId?: string | undefined;
|
|
124
143
|
} | undefined;
|
|
125
144
|
}>;
|
|
@@ -8,12 +8,16 @@ const moduleSchema = zod_1.z.object({
|
|
|
8
8
|
type: zod_1.z.nativeEnum(enums_1.ModuleType),
|
|
9
9
|
visible: zod_1.z.boolean()
|
|
10
10
|
});
|
|
11
|
+
const deviceSchema = zod_1.z.object({
|
|
12
|
+
pushToken: zod_1.z.string()
|
|
13
|
+
});
|
|
11
14
|
exports.userDataSchema = zod_1.z.object({
|
|
12
15
|
_id: id_types_1.userIdSchema,
|
|
13
16
|
createdAt: zod_1.z.date(),
|
|
14
17
|
updatedAt: zod_1.z.date(),
|
|
15
18
|
sandbox: zod_1.z.object({
|
|
16
|
-
discordId: zod_1.z.string().optional()
|
|
19
|
+
discordId: zod_1.z.string().optional(),
|
|
20
|
+
devices: zod_1.z.array(deviceSchema)
|
|
17
21
|
}).optional(),
|
|
18
22
|
name: zod_1.z.string().min(1),
|
|
19
23
|
timezone: zod_1.z.string().refine((tz) => {
|
package/package.json
CHANGED
|
@@ -7,13 +7,18 @@ const moduleSchema = z.object({
|
|
|
7
7
|
visible: z.boolean()
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
+
const deviceSchema = z.object({
|
|
11
|
+
pushToken: z.string()
|
|
12
|
+
});
|
|
13
|
+
|
|
10
14
|
export const userDataSchema = z.object({
|
|
11
15
|
_id: userIdSchema,
|
|
12
16
|
createdAt: z.date(),
|
|
13
17
|
updatedAt: z.date(),
|
|
14
18
|
|
|
15
19
|
sandbox: z.object({
|
|
16
|
-
discordId: z.string().optional()
|
|
20
|
+
discordId: z.string().optional(),
|
|
21
|
+
devices: z.array(deviceSchema)
|
|
17
22
|
}).optional(),
|
|
18
23
|
|
|
19
24
|
name: z.string().min(1),
|