@timothyw/pat-common 1.0.24 → 1.0.25

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,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { UserData } from "../../models";
3
3
  export declare const updateUserRequestSchema: z.ZodObject<{
4
- sandbox: z.ZodOptional<z.ZodOptional<z.ZodObject<{
4
+ sandbox: z.ZodOptional<z.ZodObject<{
5
5
  discordId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
6
6
  devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
7
  pushToken: z.ZodOptional<z.ZodString>;
@@ -20,7 +20,7 @@ export declare const updateUserRequestSchema: z.ZodObject<{
20
20
  devices?: {
21
21
  pushToken?: string | undefined;
22
22
  }[] | undefined;
23
- }>>>;
23
+ }>>;
24
24
  name: z.ZodOptional<z.ZodString>;
25
25
  timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
26
26
  config: z.ZodOptional<z.ZodObject<{
@@ -14,7 +14,7 @@ export declare const userDataSchema: z.ZodObject<{
14
14
  _id: z.ZodEffects<z.ZodString, import("../id-types").UserId, string>;
15
15
  createdAt: z.ZodDate;
16
16
  updatedAt: z.ZodDate;
17
- sandbox: z.ZodOptional<z.ZodObject<{
17
+ sandbox: z.ZodObject<{
18
18
  discordId: z.ZodOptional<z.ZodString>;
19
19
  devices: z.ZodArray<z.ZodObject<{
20
20
  pushToken: z.ZodString;
@@ -33,7 +33,7 @@ export declare const userDataSchema: z.ZodObject<{
33
33
  pushToken: string;
34
34
  }[];
35
35
  discordId?: string | undefined;
36
- }>>;
36
+ }>;
37
37
  name: z.ZodString;
38
38
  timezone: z.ZodEffects<z.ZodString, string, string>;
39
39
  config: z.ZodObject<{
@@ -95,6 +95,12 @@ export declare const userDataSchema: z.ZodObject<{
95
95
  };
96
96
  createdAt: Date;
97
97
  updatedAt: Date;
98
+ sandbox: {
99
+ devices: {
100
+ pushToken: string;
101
+ }[];
102
+ discordId?: string | undefined;
103
+ };
98
104
  name: string;
99
105
  timezone: string;
100
106
  config: {
@@ -110,16 +116,16 @@ export declare const userDataSchema: z.ZodObject<{
110
116
  visible: boolean;
111
117
  }[];
112
118
  };
113
- sandbox?: {
114
- devices: {
115
- pushToken: string;
116
- }[];
117
- discordId?: string | undefined;
118
- } | undefined;
119
119
  }, {
120
120
  _id: string;
121
121
  createdAt: Date;
122
122
  updatedAt: Date;
123
+ sandbox: {
124
+ devices: {
125
+ pushToken: string;
126
+ }[];
127
+ discordId?: string | undefined;
128
+ };
123
129
  name: string;
124
130
  timezone: string;
125
131
  config: {
@@ -135,12 +141,6 @@ export declare const userDataSchema: z.ZodObject<{
135
141
  visible: boolean;
136
142
  }[];
137
143
  };
138
- sandbox?: {
139
- devices: {
140
- pushToken: string;
141
- }[];
142
- discordId?: string | undefined;
143
- } | undefined;
144
144
  }>;
145
145
  export type Module = z.infer<typeof moduleSchema>;
146
146
  export type UserData = z.infer<typeof userDataSchema>;
@@ -18,7 +18,7 @@ exports.userDataSchema = zod_1.z.object({
18
18
  sandbox: zod_1.z.object({
19
19
  discordId: zod_1.z.string().optional(),
20
20
  devices: zod_1.z.array(deviceSchema)
21
- }).optional(),
21
+ }),
22
22
  name: zod_1.z.string().min(1),
23
23
  timezone: zod_1.z.string().refine((tz) => {
24
24
  try {
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.24",
5
+ "version": "1.0.25",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -19,7 +19,7 @@ export const userDataSchema = z.object({
19
19
  sandbox: z.object({
20
20
  discordId: z.string().optional(),
21
21
  devices: z.array(deviceSchema)
22
- }).optional(),
22
+ }),
23
23
 
24
24
  name: z.string().min(1),
25
25
  timezone: z.string().refine((tz: string) => {