@nyig/models 0.2.17 → 0.2.18

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/index.d.mts CHANGED
@@ -2073,7 +2073,7 @@ declare const zUser: z.ZodObject<{
2073
2073
  name: z.ZodString;
2074
2074
  username: z.ZodOptional<z.ZodString>;
2075
2075
  password: z.ZodOptional<z.ZodString>;
2076
- roles: z.ZodArray<z.ZodNumber, "many">;
2076
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2077
2077
  email: z.ZodOptional<z.ZodString>;
2078
2078
  address: z.ZodOptional<z.ZodString>;
2079
2079
  country: z.ZodOptional<z.ZodString>;
@@ -2081,9 +2081,9 @@ declare const zUser: z.ZodObject<{
2081
2081
  birthDate: z.ZodOptional<z.ZodString>;
2082
2082
  }, "strip", z.ZodTypeAny, {
2083
2083
  name: string;
2084
- roles: number[];
2085
2084
  username?: string | undefined;
2086
2085
  password?: string | undefined;
2086
+ roles?: number[] | undefined;
2087
2087
  email?: string | undefined;
2088
2088
  address?: string | undefined;
2089
2089
  country?: string | undefined;
@@ -2091,9 +2091,9 @@ declare const zUser: z.ZodObject<{
2091
2091
  birthDate?: string | undefined;
2092
2092
  }, {
2093
2093
  name: string;
2094
- roles: number[];
2095
2094
  username?: string | undefined;
2096
2095
  password?: string | undefined;
2096
+ roles?: number[] | undefined;
2097
2097
  email?: string | undefined;
2098
2098
  address?: string | undefined;
2099
2099
  country?: string | undefined;
@@ -2106,7 +2106,7 @@ declare const zMUser: z.ZodObject<{
2106
2106
  name: z.ZodString;
2107
2107
  username: z.ZodOptional<z.ZodString>;
2108
2108
  password: z.ZodOptional<z.ZodString>;
2109
- roles: z.ZodArray<z.ZodNumber, "many">;
2109
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2110
2110
  country: z.ZodOptional<z.ZodString>;
2111
2111
  phoneNumber: z.ZodOptional<z.ZodString>;
2112
2112
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2116,11 +2116,11 @@ declare const zMUser: z.ZodObject<{
2116
2116
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2117
2117
  _id: Types.ObjectId;
2118
2118
  name: string;
2119
- roles: number[];
2120
2119
  email?: string | undefined;
2121
2120
  address?: string | undefined;
2122
2121
  username?: string | undefined;
2123
2122
  password?: string | undefined;
2123
+ roles?: number[] | undefined;
2124
2124
  country?: string | undefined;
2125
2125
  phoneNumber?: string | undefined;
2126
2126
  birthDate?: string | undefined;
@@ -2129,11 +2129,11 @@ declare const zMUser: z.ZodObject<{
2129
2129
  }, {
2130
2130
  _id: Types.ObjectId;
2131
2131
  name: string;
2132
- roles: number[];
2133
2132
  email?: string | undefined;
2134
2133
  address?: string | undefined;
2135
2134
  username?: string | undefined;
2136
2135
  password?: string | undefined;
2136
+ roles?: number[] | undefined;
2137
2137
  country?: string | undefined;
2138
2138
  phoneNumber?: string | undefined;
2139
2139
  birthDate?: string | undefined;
@@ -2146,7 +2146,7 @@ declare const zStudent: z.ZodObject<{
2146
2146
  name: z.ZodString;
2147
2147
  username: z.ZodOptional<z.ZodString>;
2148
2148
  password: z.ZodOptional<z.ZodString>;
2149
- roles: z.ZodArray<z.ZodNumber, "many">;
2149
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2150
2150
  country: z.ZodOptional<z.ZodString>;
2151
2151
  phoneNumber: z.ZodOptional<z.ZodString>;
2152
2152
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2155,11 +2155,11 @@ declare const zStudent: z.ZodObject<{
2155
2155
  }, "strip", z.ZodTypeAny, {
2156
2156
  rank: GoRank;
2157
2157
  name: string;
2158
- roles: number[];
2159
2158
  email?: string | undefined;
2160
2159
  address?: string | undefined;
2161
2160
  username?: string | undefined;
2162
2161
  password?: string | undefined;
2162
+ roles?: number[] | undefined;
2163
2163
  country?: string | undefined;
2164
2164
  phoneNumber?: string | undefined;
2165
2165
  birthDate?: string | undefined;
@@ -2167,11 +2167,11 @@ declare const zStudent: z.ZodObject<{
2167
2167
  }, {
2168
2168
  rank: GoRank;
2169
2169
  name: string;
2170
- roles: number[];
2171
2170
  email?: string | undefined;
2172
2171
  address?: string | undefined;
2173
2172
  username?: string | undefined;
2174
2173
  password?: string | undefined;
2174
+ roles?: number[] | undefined;
2175
2175
  country?: string | undefined;
2176
2176
  phoneNumber?: string | undefined;
2177
2177
  birthDate?: string | undefined;
@@ -2184,7 +2184,7 @@ declare const zMStudent: z.ZodObject<{
2184
2184
  name: z.ZodString;
2185
2185
  username: z.ZodOptional<z.ZodString>;
2186
2186
  password: z.ZodOptional<z.ZodString>;
2187
- roles: z.ZodArray<z.ZodNumber, "many">;
2187
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2188
2188
  country: z.ZodOptional<z.ZodString>;
2189
2189
  phoneNumber: z.ZodOptional<z.ZodString>;
2190
2190
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2196,11 +2196,11 @@ declare const zMStudent: z.ZodObject<{
2196
2196
  rank: GoRank;
2197
2197
  _id: Types.ObjectId;
2198
2198
  name: string;
2199
- roles: number[];
2200
2199
  email?: string | undefined;
2201
2200
  address?: string | undefined;
2202
2201
  username?: string | undefined;
2203
2202
  password?: string | undefined;
2203
+ roles?: number[] | undefined;
2204
2204
  country?: string | undefined;
2205
2205
  phoneNumber?: string | undefined;
2206
2206
  birthDate?: string | undefined;
@@ -2211,11 +2211,11 @@ declare const zMStudent: z.ZodObject<{
2211
2211
  rank: GoRank;
2212
2212
  _id: Types.ObjectId;
2213
2213
  name: string;
2214
- roles: number[];
2215
2214
  email?: string | undefined;
2216
2215
  address?: string | undefined;
2217
2216
  username?: string | undefined;
2218
2217
  password?: string | undefined;
2218
+ roles?: number[] | undefined;
2219
2219
  country?: string | undefined;
2220
2220
  phoneNumber?: string | undefined;
2221
2221
  birthDate?: string | undefined;
@@ -2229,7 +2229,7 @@ declare const zTeacher: z.ZodObject<{
2229
2229
  name: z.ZodString;
2230
2230
  username: z.ZodOptional<z.ZodString>;
2231
2231
  password: z.ZodOptional<z.ZodString>;
2232
- roles: z.ZodArray<z.ZodNumber, "many">;
2232
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2233
2233
  country: z.ZodOptional<z.ZodString>;
2234
2234
  phoneNumber: z.ZodOptional<z.ZodString>;
2235
2235
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2241,11 +2241,11 @@ declare const zTeacher: z.ZodObject<{
2241
2241
  }, "strip", z.ZodTypeAny, {
2242
2242
  rank: GoRank;
2243
2243
  name: string;
2244
- roles: number[];
2245
2244
  email?: string | undefined;
2246
2245
  address?: string | undefined;
2247
2246
  username?: string | undefined;
2248
2247
  password?: string | undefined;
2248
+ roles?: number[] | undefined;
2249
2249
  country?: string | undefined;
2250
2250
  phoneNumber?: string | undefined;
2251
2251
  birthDate?: string | undefined;
@@ -2256,11 +2256,11 @@ declare const zTeacher: z.ZodObject<{
2256
2256
  }, {
2257
2257
  rank: GoRank;
2258
2258
  name: string;
2259
- roles: number[];
2260
2259
  email?: string | undefined;
2261
2260
  address?: string | undefined;
2262
2261
  username?: string | undefined;
2263
2262
  password?: string | undefined;
2263
+ roles?: number[] | undefined;
2264
2264
  country?: string | undefined;
2265
2265
  phoneNumber?: string | undefined;
2266
2266
  birthDate?: string | undefined;
@@ -2278,7 +2278,7 @@ declare const zMTeacher: z.ZodObject<{
2278
2278
  bio: z.ZodOptional<z.ZodString>;
2279
2279
  username: z.ZodOptional<z.ZodString>;
2280
2280
  password: z.ZodOptional<z.ZodString>;
2281
- roles: z.ZodArray<z.ZodNumber, "many">;
2281
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2282
2282
  country: z.ZodOptional<z.ZodString>;
2283
2283
  phoneNumber: z.ZodOptional<z.ZodString>;
2284
2284
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2291,13 +2291,13 @@ declare const zMTeacher: z.ZodObject<{
2291
2291
  rank: GoRank;
2292
2292
  _id: Types.ObjectId;
2293
2293
  name: string;
2294
- roles: number[];
2295
2294
  email?: string | undefined;
2296
2295
  address?: string | undefined;
2297
2296
  title?: string | undefined;
2298
2297
  bio?: string | undefined;
2299
2298
  username?: string | undefined;
2300
2299
  password?: string | undefined;
2300
+ roles?: number[] | undefined;
2301
2301
  country?: string | undefined;
2302
2302
  phoneNumber?: string | undefined;
2303
2303
  birthDate?: string | undefined;
@@ -2309,13 +2309,13 @@ declare const zMTeacher: z.ZodObject<{
2309
2309
  rank: GoRank;
2310
2310
  _id: Types.ObjectId;
2311
2311
  name: string;
2312
- roles: number[];
2313
2312
  email?: string | undefined;
2314
2313
  address?: string | undefined;
2315
2314
  title?: string | undefined;
2316
2315
  bio?: string | undefined;
2317
2316
  username?: string | undefined;
2318
2317
  password?: string | undefined;
2318
+ roles?: number[] | undefined;
2319
2319
  country?: string | undefined;
2320
2320
  phoneNumber?: string | undefined;
2321
2321
  birthDate?: string | undefined;
package/index.d.ts CHANGED
@@ -2073,7 +2073,7 @@ declare const zUser: z.ZodObject<{
2073
2073
  name: z.ZodString;
2074
2074
  username: z.ZodOptional<z.ZodString>;
2075
2075
  password: z.ZodOptional<z.ZodString>;
2076
- roles: z.ZodArray<z.ZodNumber, "many">;
2076
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2077
2077
  email: z.ZodOptional<z.ZodString>;
2078
2078
  address: z.ZodOptional<z.ZodString>;
2079
2079
  country: z.ZodOptional<z.ZodString>;
@@ -2081,9 +2081,9 @@ declare const zUser: z.ZodObject<{
2081
2081
  birthDate: z.ZodOptional<z.ZodString>;
2082
2082
  }, "strip", z.ZodTypeAny, {
2083
2083
  name: string;
2084
- roles: number[];
2085
2084
  username?: string | undefined;
2086
2085
  password?: string | undefined;
2086
+ roles?: number[] | undefined;
2087
2087
  email?: string | undefined;
2088
2088
  address?: string | undefined;
2089
2089
  country?: string | undefined;
@@ -2091,9 +2091,9 @@ declare const zUser: z.ZodObject<{
2091
2091
  birthDate?: string | undefined;
2092
2092
  }, {
2093
2093
  name: string;
2094
- roles: number[];
2095
2094
  username?: string | undefined;
2096
2095
  password?: string | undefined;
2096
+ roles?: number[] | undefined;
2097
2097
  email?: string | undefined;
2098
2098
  address?: string | undefined;
2099
2099
  country?: string | undefined;
@@ -2106,7 +2106,7 @@ declare const zMUser: z.ZodObject<{
2106
2106
  name: z.ZodString;
2107
2107
  username: z.ZodOptional<z.ZodString>;
2108
2108
  password: z.ZodOptional<z.ZodString>;
2109
- roles: z.ZodArray<z.ZodNumber, "many">;
2109
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2110
2110
  country: z.ZodOptional<z.ZodString>;
2111
2111
  phoneNumber: z.ZodOptional<z.ZodString>;
2112
2112
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2116,11 +2116,11 @@ declare const zMUser: z.ZodObject<{
2116
2116
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2117
2117
  _id: Types.ObjectId;
2118
2118
  name: string;
2119
- roles: number[];
2120
2119
  email?: string | undefined;
2121
2120
  address?: string | undefined;
2122
2121
  username?: string | undefined;
2123
2122
  password?: string | undefined;
2123
+ roles?: number[] | undefined;
2124
2124
  country?: string | undefined;
2125
2125
  phoneNumber?: string | undefined;
2126
2126
  birthDate?: string | undefined;
@@ -2129,11 +2129,11 @@ declare const zMUser: z.ZodObject<{
2129
2129
  }, {
2130
2130
  _id: Types.ObjectId;
2131
2131
  name: string;
2132
- roles: number[];
2133
2132
  email?: string | undefined;
2134
2133
  address?: string | undefined;
2135
2134
  username?: string | undefined;
2136
2135
  password?: string | undefined;
2136
+ roles?: number[] | undefined;
2137
2137
  country?: string | undefined;
2138
2138
  phoneNumber?: string | undefined;
2139
2139
  birthDate?: string | undefined;
@@ -2146,7 +2146,7 @@ declare const zStudent: z.ZodObject<{
2146
2146
  name: z.ZodString;
2147
2147
  username: z.ZodOptional<z.ZodString>;
2148
2148
  password: z.ZodOptional<z.ZodString>;
2149
- roles: z.ZodArray<z.ZodNumber, "many">;
2149
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2150
2150
  country: z.ZodOptional<z.ZodString>;
2151
2151
  phoneNumber: z.ZodOptional<z.ZodString>;
2152
2152
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2155,11 +2155,11 @@ declare const zStudent: z.ZodObject<{
2155
2155
  }, "strip", z.ZodTypeAny, {
2156
2156
  rank: GoRank;
2157
2157
  name: string;
2158
- roles: number[];
2159
2158
  email?: string | undefined;
2160
2159
  address?: string | undefined;
2161
2160
  username?: string | undefined;
2162
2161
  password?: string | undefined;
2162
+ roles?: number[] | undefined;
2163
2163
  country?: string | undefined;
2164
2164
  phoneNumber?: string | undefined;
2165
2165
  birthDate?: string | undefined;
@@ -2167,11 +2167,11 @@ declare const zStudent: z.ZodObject<{
2167
2167
  }, {
2168
2168
  rank: GoRank;
2169
2169
  name: string;
2170
- roles: number[];
2171
2170
  email?: string | undefined;
2172
2171
  address?: string | undefined;
2173
2172
  username?: string | undefined;
2174
2173
  password?: string | undefined;
2174
+ roles?: number[] | undefined;
2175
2175
  country?: string | undefined;
2176
2176
  phoneNumber?: string | undefined;
2177
2177
  birthDate?: string | undefined;
@@ -2184,7 +2184,7 @@ declare const zMStudent: z.ZodObject<{
2184
2184
  name: z.ZodString;
2185
2185
  username: z.ZodOptional<z.ZodString>;
2186
2186
  password: z.ZodOptional<z.ZodString>;
2187
- roles: z.ZodArray<z.ZodNumber, "many">;
2187
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2188
2188
  country: z.ZodOptional<z.ZodString>;
2189
2189
  phoneNumber: z.ZodOptional<z.ZodString>;
2190
2190
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2196,11 +2196,11 @@ declare const zMStudent: z.ZodObject<{
2196
2196
  rank: GoRank;
2197
2197
  _id: Types.ObjectId;
2198
2198
  name: string;
2199
- roles: number[];
2200
2199
  email?: string | undefined;
2201
2200
  address?: string | undefined;
2202
2201
  username?: string | undefined;
2203
2202
  password?: string | undefined;
2203
+ roles?: number[] | undefined;
2204
2204
  country?: string | undefined;
2205
2205
  phoneNumber?: string | undefined;
2206
2206
  birthDate?: string | undefined;
@@ -2211,11 +2211,11 @@ declare const zMStudent: z.ZodObject<{
2211
2211
  rank: GoRank;
2212
2212
  _id: Types.ObjectId;
2213
2213
  name: string;
2214
- roles: number[];
2215
2214
  email?: string | undefined;
2216
2215
  address?: string | undefined;
2217
2216
  username?: string | undefined;
2218
2217
  password?: string | undefined;
2218
+ roles?: number[] | undefined;
2219
2219
  country?: string | undefined;
2220
2220
  phoneNumber?: string | undefined;
2221
2221
  birthDate?: string | undefined;
@@ -2229,7 +2229,7 @@ declare const zTeacher: z.ZodObject<{
2229
2229
  name: z.ZodString;
2230
2230
  username: z.ZodOptional<z.ZodString>;
2231
2231
  password: z.ZodOptional<z.ZodString>;
2232
- roles: z.ZodArray<z.ZodNumber, "many">;
2232
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2233
2233
  country: z.ZodOptional<z.ZodString>;
2234
2234
  phoneNumber: z.ZodOptional<z.ZodString>;
2235
2235
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2241,11 +2241,11 @@ declare const zTeacher: z.ZodObject<{
2241
2241
  }, "strip", z.ZodTypeAny, {
2242
2242
  rank: GoRank;
2243
2243
  name: string;
2244
- roles: number[];
2245
2244
  email?: string | undefined;
2246
2245
  address?: string | undefined;
2247
2246
  username?: string | undefined;
2248
2247
  password?: string | undefined;
2248
+ roles?: number[] | undefined;
2249
2249
  country?: string | undefined;
2250
2250
  phoneNumber?: string | undefined;
2251
2251
  birthDate?: string | undefined;
@@ -2256,11 +2256,11 @@ declare const zTeacher: z.ZodObject<{
2256
2256
  }, {
2257
2257
  rank: GoRank;
2258
2258
  name: string;
2259
- roles: number[];
2260
2259
  email?: string | undefined;
2261
2260
  address?: string | undefined;
2262
2261
  username?: string | undefined;
2263
2262
  password?: string | undefined;
2263
+ roles?: number[] | undefined;
2264
2264
  country?: string | undefined;
2265
2265
  phoneNumber?: string | undefined;
2266
2266
  birthDate?: string | undefined;
@@ -2278,7 +2278,7 @@ declare const zMTeacher: z.ZodObject<{
2278
2278
  bio: z.ZodOptional<z.ZodString>;
2279
2279
  username: z.ZodOptional<z.ZodString>;
2280
2280
  password: z.ZodOptional<z.ZodString>;
2281
- roles: z.ZodArray<z.ZodNumber, "many">;
2281
+ roles: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2282
2282
  country: z.ZodOptional<z.ZodString>;
2283
2283
  phoneNumber: z.ZodOptional<z.ZodString>;
2284
2284
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2291,13 +2291,13 @@ declare const zMTeacher: z.ZodObject<{
2291
2291
  rank: GoRank;
2292
2292
  _id: Types.ObjectId;
2293
2293
  name: string;
2294
- roles: number[];
2295
2294
  email?: string | undefined;
2296
2295
  address?: string | undefined;
2297
2296
  title?: string | undefined;
2298
2297
  bio?: string | undefined;
2299
2298
  username?: string | undefined;
2300
2299
  password?: string | undefined;
2300
+ roles?: number[] | undefined;
2301
2301
  country?: string | undefined;
2302
2302
  phoneNumber?: string | undefined;
2303
2303
  birthDate?: string | undefined;
@@ -2309,13 +2309,13 @@ declare const zMTeacher: z.ZodObject<{
2309
2309
  rank: GoRank;
2310
2310
  _id: Types.ObjectId;
2311
2311
  name: string;
2312
- roles: number[];
2313
2312
  email?: string | undefined;
2314
2313
  address?: string | undefined;
2315
2314
  title?: string | undefined;
2316
2315
  bio?: string | undefined;
2317
2316
  username?: string | undefined;
2318
2317
  password?: string | undefined;
2318
+ roles?: number[] | undefined;
2319
2319
  country?: string | undefined;
2320
2320
  phoneNumber?: string | undefined;
2321
2321
  birthDate?: string | undefined;
package/index.js CHANGED
@@ -673,7 +673,7 @@ var zUser = import_zod25.z.object({
673
673
  name: import_zod25.z.string().min(2).max(100),
674
674
  username: import_zod25.z.string().optional(),
675
675
  password: import_zod25.z.string().optional(),
676
- roles: import_zod25.z.array(import_zod25.z.number().int()),
676
+ roles: import_zod25.z.array(import_zod25.z.number().int()).optional(),
677
677
  email: import_zod25.z.string().email().max(100).optional(),
678
678
  address: import_zod25.z.string().optional(),
679
679
  country: import_zod25.z.string().length(2, {
package/index.mjs CHANGED
@@ -587,7 +587,7 @@ var zUser = z25.object({
587
587
  name: z25.string().min(2).max(100),
588
588
  username: z25.string().optional(),
589
589
  password: z25.string().optional(),
590
- roles: z25.array(z25.number().int()),
590
+ roles: z25.array(z25.number().int()).optional(),
591
591
  email: z25.string().email().max(100).optional(),
592
592
  address: z25.string().optional(),
593
593
  country: z25.string().length(2, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",