@nyig/models 0.2.15 → 0.2.17

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.
Files changed (5) hide show
  1. package/index.d.mts +30 -150
  2. package/index.d.ts +30 -150
  3. package/index.js +35 -31
  4. package/index.mjs +35 -31
  5. package/package.json +1 -1
package/index.d.mts CHANGED
@@ -393,11 +393,11 @@ declare const zCourse: z.ZodObject<{
393
393
  /**
394
394
  * Camp tuition for half-day option
395
395
  */
396
- halfCampTuition: z.ZodNumber;
396
+ halfCampTuition: z.ZodOptional<z.ZodNumber>;
397
397
  /**
398
398
  * Camp tuition for full-day option
399
399
  */
400
- fullCampTuition: z.ZodNumber;
400
+ fullCampTuition: z.ZodOptional<z.ZodNumber>;
401
401
  }, "strip", z.ZodTypeAny, {
402
402
  price: number;
403
403
  name: string;
@@ -405,9 +405,9 @@ declare const zCourse: z.ZodObject<{
405
405
  duration: number;
406
406
  nyigSchool: NYIGSchool;
407
407
  recLevel: string;
408
- halfCampTuition: number;
409
- fullCampTuition: number;
410
408
  description?: string | undefined;
409
+ halfCampTuition?: number | undefined;
410
+ fullCampTuition?: number | undefined;
411
411
  }, {
412
412
  price: number;
413
413
  name: string;
@@ -415,9 +415,9 @@ declare const zCourse: z.ZodObject<{
415
415
  duration: number;
416
416
  nyigSchool: NYIGSchool;
417
417
  recLevel: string;
418
- halfCampTuition: number;
419
- fullCampTuition: number;
420
418
  description?: string | undefined;
419
+ halfCampTuition?: number | undefined;
420
+ fullCampTuition?: number | undefined;
421
421
  }>;
422
422
  declare const zMCourse: z.ZodObject<{
423
423
  price: z.ZodNumber;
@@ -427,8 +427,8 @@ declare const zMCourse: z.ZodObject<{
427
427
  description: z.ZodOptional<z.ZodString>;
428
428
  nyigSchool: z.ZodNativeEnum<typeof NYIGSchool>;
429
429
  recLevel: z.ZodString;
430
- halfCampTuition: z.ZodNumber;
431
- fullCampTuition: z.ZodNumber;
430
+ halfCampTuition: z.ZodOptional<z.ZodNumber>;
431
+ fullCampTuition: z.ZodOptional<z.ZodNumber>;
432
432
  _id: z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>;
433
433
  createdAt: z.ZodOptional<z.ZodDate>;
434
434
  updatedAt: z.ZodOptional<z.ZodDate>;
@@ -440,9 +440,9 @@ declare const zMCourse: z.ZodObject<{
440
440
  duration: number;
441
441
  nyigSchool: NYIGSchool;
442
442
  recLevel: string;
443
- halfCampTuition: number;
444
- fullCampTuition: number;
445
443
  description?: string | undefined;
444
+ halfCampTuition?: number | undefined;
445
+ fullCampTuition?: number | undefined;
446
446
  createdAt?: Date | undefined;
447
447
  updatedAt?: Date | undefined;
448
448
  }, {
@@ -453,9 +453,9 @@ declare const zMCourse: z.ZodObject<{
453
453
  duration: number;
454
454
  nyigSchool: NYIGSchool;
455
455
  recLevel: string;
456
- halfCampTuition: number;
457
- fullCampTuition: number;
458
456
  description?: string | undefined;
457
+ halfCampTuition?: number | undefined;
458
+ fullCampTuition?: number | undefined;
459
459
  createdAt?: Date | undefined;
460
460
  updatedAt?: Date | undefined;
461
461
  }>;
@@ -2073,19 +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.ZodOptional<z.ZodObject<{
2077
- user: z.ZodNumber;
2078
- admin: z.ZodNumber;
2079
- superadmin: z.ZodNumber;
2080
- }, "strip", z.ZodTypeAny, {
2081
- user: number;
2082
- admin: number;
2083
- superadmin: number;
2084
- }, {
2085
- user: number;
2086
- admin: number;
2087
- superadmin: number;
2088
- }>>;
2076
+ roles: z.ZodArray<z.ZodNumber, "many">;
2089
2077
  email: z.ZodOptional<z.ZodString>;
2090
2078
  address: z.ZodOptional<z.ZodString>;
2091
2079
  country: z.ZodOptional<z.ZodString>;
@@ -2093,13 +2081,9 @@ declare const zUser: z.ZodObject<{
2093
2081
  birthDate: z.ZodOptional<z.ZodString>;
2094
2082
  }, "strip", z.ZodTypeAny, {
2095
2083
  name: string;
2084
+ roles: number[];
2096
2085
  username?: string | undefined;
2097
2086
  password?: string | undefined;
2098
- roles?: {
2099
- user: number;
2100
- admin: number;
2101
- superadmin: number;
2102
- } | undefined;
2103
2087
  email?: string | undefined;
2104
2088
  address?: string | undefined;
2105
2089
  country?: string | undefined;
@@ -2107,13 +2091,9 @@ declare const zUser: z.ZodObject<{
2107
2091
  birthDate?: string | undefined;
2108
2092
  }, {
2109
2093
  name: string;
2094
+ roles: number[];
2110
2095
  username?: string | undefined;
2111
2096
  password?: string | undefined;
2112
- roles?: {
2113
- user: number;
2114
- admin: number;
2115
- superadmin: number;
2116
- } | undefined;
2117
2097
  email?: string | undefined;
2118
2098
  address?: string | undefined;
2119
2099
  country?: string | undefined;
@@ -2126,19 +2106,7 @@ declare const zMUser: z.ZodObject<{
2126
2106
  name: z.ZodString;
2127
2107
  username: z.ZodOptional<z.ZodString>;
2128
2108
  password: z.ZodOptional<z.ZodString>;
2129
- roles: z.ZodOptional<z.ZodObject<{
2130
- user: z.ZodNumber;
2131
- admin: z.ZodNumber;
2132
- superadmin: z.ZodNumber;
2133
- }, "strip", z.ZodTypeAny, {
2134
- user: number;
2135
- admin: number;
2136
- superadmin: number;
2137
- }, {
2138
- user: number;
2139
- admin: number;
2140
- superadmin: number;
2141
- }>>;
2109
+ roles: z.ZodArray<z.ZodNumber, "many">;
2142
2110
  country: z.ZodOptional<z.ZodString>;
2143
2111
  phoneNumber: z.ZodOptional<z.ZodString>;
2144
2112
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2148,15 +2116,11 @@ declare const zMUser: z.ZodObject<{
2148
2116
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2149
2117
  _id: Types.ObjectId;
2150
2118
  name: string;
2119
+ roles: number[];
2151
2120
  email?: string | undefined;
2152
2121
  address?: string | undefined;
2153
2122
  username?: string | undefined;
2154
2123
  password?: string | undefined;
2155
- roles?: {
2156
- user: number;
2157
- admin: number;
2158
- superadmin: number;
2159
- } | undefined;
2160
2124
  country?: string | undefined;
2161
2125
  phoneNumber?: string | undefined;
2162
2126
  birthDate?: string | undefined;
@@ -2165,15 +2129,11 @@ declare const zMUser: z.ZodObject<{
2165
2129
  }, {
2166
2130
  _id: Types.ObjectId;
2167
2131
  name: string;
2132
+ roles: number[];
2168
2133
  email?: string | undefined;
2169
2134
  address?: string | undefined;
2170
2135
  username?: string | undefined;
2171
2136
  password?: string | undefined;
2172
- roles?: {
2173
- user: number;
2174
- admin: number;
2175
- superadmin: number;
2176
- } | undefined;
2177
2137
  country?: string | undefined;
2178
2138
  phoneNumber?: string | undefined;
2179
2139
  birthDate?: string | undefined;
@@ -2186,19 +2146,7 @@ declare const zStudent: z.ZodObject<{
2186
2146
  name: z.ZodString;
2187
2147
  username: z.ZodOptional<z.ZodString>;
2188
2148
  password: z.ZodOptional<z.ZodString>;
2189
- roles: z.ZodOptional<z.ZodObject<{
2190
- user: z.ZodNumber;
2191
- admin: z.ZodNumber;
2192
- superadmin: z.ZodNumber;
2193
- }, "strip", z.ZodTypeAny, {
2194
- user: number;
2195
- admin: number;
2196
- superadmin: number;
2197
- }, {
2198
- user: number;
2199
- admin: number;
2200
- superadmin: number;
2201
- }>>;
2149
+ roles: z.ZodArray<z.ZodNumber, "many">;
2202
2150
  country: z.ZodOptional<z.ZodString>;
2203
2151
  phoneNumber: z.ZodOptional<z.ZodString>;
2204
2152
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2207,15 +2155,11 @@ declare const zStudent: z.ZodObject<{
2207
2155
  }, "strip", z.ZodTypeAny, {
2208
2156
  rank: GoRank;
2209
2157
  name: string;
2158
+ roles: number[];
2210
2159
  email?: string | undefined;
2211
2160
  address?: string | undefined;
2212
2161
  username?: string | undefined;
2213
2162
  password?: string | undefined;
2214
- roles?: {
2215
- user: number;
2216
- admin: number;
2217
- superadmin: number;
2218
- } | undefined;
2219
2163
  country?: string | undefined;
2220
2164
  phoneNumber?: string | undefined;
2221
2165
  birthDate?: string | undefined;
@@ -2223,15 +2167,11 @@ declare const zStudent: z.ZodObject<{
2223
2167
  }, {
2224
2168
  rank: GoRank;
2225
2169
  name: string;
2170
+ roles: number[];
2226
2171
  email?: string | undefined;
2227
2172
  address?: string | undefined;
2228
2173
  username?: string | undefined;
2229
2174
  password?: string | undefined;
2230
- roles?: {
2231
- user: number;
2232
- admin: number;
2233
- superadmin: number;
2234
- } | undefined;
2235
2175
  country?: string | undefined;
2236
2176
  phoneNumber?: string | undefined;
2237
2177
  birthDate?: string | undefined;
@@ -2244,19 +2184,7 @@ declare const zMStudent: z.ZodObject<{
2244
2184
  name: z.ZodString;
2245
2185
  username: z.ZodOptional<z.ZodString>;
2246
2186
  password: z.ZodOptional<z.ZodString>;
2247
- roles: z.ZodOptional<z.ZodObject<{
2248
- user: z.ZodNumber;
2249
- admin: z.ZodNumber;
2250
- superadmin: z.ZodNumber;
2251
- }, "strip", z.ZodTypeAny, {
2252
- user: number;
2253
- admin: number;
2254
- superadmin: number;
2255
- }, {
2256
- user: number;
2257
- admin: number;
2258
- superadmin: number;
2259
- }>>;
2187
+ roles: z.ZodArray<z.ZodNumber, "many">;
2260
2188
  country: z.ZodOptional<z.ZodString>;
2261
2189
  phoneNumber: z.ZodOptional<z.ZodString>;
2262
2190
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2268,15 +2196,11 @@ declare const zMStudent: z.ZodObject<{
2268
2196
  rank: GoRank;
2269
2197
  _id: Types.ObjectId;
2270
2198
  name: string;
2199
+ roles: number[];
2271
2200
  email?: string | undefined;
2272
2201
  address?: string | undefined;
2273
2202
  username?: string | undefined;
2274
2203
  password?: string | undefined;
2275
- roles?: {
2276
- user: number;
2277
- admin: number;
2278
- superadmin: number;
2279
- } | undefined;
2280
2204
  country?: string | undefined;
2281
2205
  phoneNumber?: string | undefined;
2282
2206
  birthDate?: string | undefined;
@@ -2287,15 +2211,11 @@ declare const zMStudent: z.ZodObject<{
2287
2211
  rank: GoRank;
2288
2212
  _id: Types.ObjectId;
2289
2213
  name: string;
2214
+ roles: number[];
2290
2215
  email?: string | undefined;
2291
2216
  address?: string | undefined;
2292
2217
  username?: string | undefined;
2293
2218
  password?: string | undefined;
2294
- roles?: {
2295
- user: number;
2296
- admin: number;
2297
- superadmin: number;
2298
- } | undefined;
2299
2219
  country?: string | undefined;
2300
2220
  phoneNumber?: string | undefined;
2301
2221
  birthDate?: string | undefined;
@@ -2309,19 +2229,7 @@ declare const zTeacher: z.ZodObject<{
2309
2229
  name: z.ZodString;
2310
2230
  username: z.ZodOptional<z.ZodString>;
2311
2231
  password: z.ZodOptional<z.ZodString>;
2312
- roles: z.ZodOptional<z.ZodObject<{
2313
- user: z.ZodNumber;
2314
- admin: z.ZodNumber;
2315
- superadmin: z.ZodNumber;
2316
- }, "strip", z.ZodTypeAny, {
2317
- user: number;
2318
- admin: number;
2319
- superadmin: number;
2320
- }, {
2321
- user: number;
2322
- admin: number;
2323
- superadmin: number;
2324
- }>>;
2232
+ roles: z.ZodArray<z.ZodNumber, "many">;
2325
2233
  country: z.ZodOptional<z.ZodString>;
2326
2234
  phoneNumber: z.ZodOptional<z.ZodString>;
2327
2235
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2333,15 +2241,11 @@ declare const zTeacher: z.ZodObject<{
2333
2241
  }, "strip", z.ZodTypeAny, {
2334
2242
  rank: GoRank;
2335
2243
  name: string;
2244
+ roles: number[];
2336
2245
  email?: string | undefined;
2337
2246
  address?: string | undefined;
2338
2247
  username?: string | undefined;
2339
2248
  password?: string | undefined;
2340
- roles?: {
2341
- user: number;
2342
- admin: number;
2343
- superadmin: number;
2344
- } | undefined;
2345
2249
  country?: string | undefined;
2346
2250
  phoneNumber?: string | undefined;
2347
2251
  birthDate?: string | undefined;
@@ -2352,15 +2256,11 @@ declare const zTeacher: z.ZodObject<{
2352
2256
  }, {
2353
2257
  rank: GoRank;
2354
2258
  name: string;
2259
+ roles: number[];
2355
2260
  email?: string | undefined;
2356
2261
  address?: string | undefined;
2357
2262
  username?: string | undefined;
2358
2263
  password?: string | undefined;
2359
- roles?: {
2360
- user: number;
2361
- admin: number;
2362
- superadmin: number;
2363
- } | undefined;
2364
2264
  country?: string | undefined;
2365
2265
  phoneNumber?: string | undefined;
2366
2266
  birthDate?: string | undefined;
@@ -2378,19 +2278,7 @@ declare const zMTeacher: z.ZodObject<{
2378
2278
  bio: z.ZodOptional<z.ZodString>;
2379
2279
  username: z.ZodOptional<z.ZodString>;
2380
2280
  password: z.ZodOptional<z.ZodString>;
2381
- roles: z.ZodOptional<z.ZodObject<{
2382
- user: z.ZodNumber;
2383
- admin: z.ZodNumber;
2384
- superadmin: z.ZodNumber;
2385
- }, "strip", z.ZodTypeAny, {
2386
- user: number;
2387
- admin: number;
2388
- superadmin: number;
2389
- }, {
2390
- user: number;
2391
- admin: number;
2392
- superadmin: number;
2393
- }>>;
2281
+ roles: z.ZodArray<z.ZodNumber, "many">;
2394
2282
  country: z.ZodOptional<z.ZodString>;
2395
2283
  phoneNumber: z.ZodOptional<z.ZodString>;
2396
2284
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2403,17 +2291,13 @@ declare const zMTeacher: z.ZodObject<{
2403
2291
  rank: GoRank;
2404
2292
  _id: Types.ObjectId;
2405
2293
  name: string;
2294
+ roles: number[];
2406
2295
  email?: string | undefined;
2407
2296
  address?: string | undefined;
2408
2297
  title?: string | undefined;
2409
2298
  bio?: string | undefined;
2410
2299
  username?: string | undefined;
2411
2300
  password?: string | undefined;
2412
- roles?: {
2413
- user: number;
2414
- admin: number;
2415
- superadmin: number;
2416
- } | undefined;
2417
2301
  country?: string | undefined;
2418
2302
  phoneNumber?: string | undefined;
2419
2303
  birthDate?: string | undefined;
@@ -2425,17 +2309,13 @@ declare const zMTeacher: z.ZodObject<{
2425
2309
  rank: GoRank;
2426
2310
  _id: Types.ObjectId;
2427
2311
  name: string;
2312
+ roles: number[];
2428
2313
  email?: string | undefined;
2429
2314
  address?: string | undefined;
2430
2315
  title?: string | undefined;
2431
2316
  bio?: string | undefined;
2432
2317
  username?: string | undefined;
2433
2318
  password?: string | undefined;
2434
- roles?: {
2435
- user: number;
2436
- admin: number;
2437
- superadmin: number;
2438
- } | undefined;
2439
2319
  country?: string | undefined;
2440
2320
  phoneNumber?: string | undefined;
2441
2321
  birthDate?: string | undefined;
package/index.d.ts CHANGED
@@ -393,11 +393,11 @@ declare const zCourse: z.ZodObject<{
393
393
  /**
394
394
  * Camp tuition for half-day option
395
395
  */
396
- halfCampTuition: z.ZodNumber;
396
+ halfCampTuition: z.ZodOptional<z.ZodNumber>;
397
397
  /**
398
398
  * Camp tuition for full-day option
399
399
  */
400
- fullCampTuition: z.ZodNumber;
400
+ fullCampTuition: z.ZodOptional<z.ZodNumber>;
401
401
  }, "strip", z.ZodTypeAny, {
402
402
  price: number;
403
403
  name: string;
@@ -405,9 +405,9 @@ declare const zCourse: z.ZodObject<{
405
405
  duration: number;
406
406
  nyigSchool: NYIGSchool;
407
407
  recLevel: string;
408
- halfCampTuition: number;
409
- fullCampTuition: number;
410
408
  description?: string | undefined;
409
+ halfCampTuition?: number | undefined;
410
+ fullCampTuition?: number | undefined;
411
411
  }, {
412
412
  price: number;
413
413
  name: string;
@@ -415,9 +415,9 @@ declare const zCourse: z.ZodObject<{
415
415
  duration: number;
416
416
  nyigSchool: NYIGSchool;
417
417
  recLevel: string;
418
- halfCampTuition: number;
419
- fullCampTuition: number;
420
418
  description?: string | undefined;
419
+ halfCampTuition?: number | undefined;
420
+ fullCampTuition?: number | undefined;
421
421
  }>;
422
422
  declare const zMCourse: z.ZodObject<{
423
423
  price: z.ZodNumber;
@@ -427,8 +427,8 @@ declare const zMCourse: z.ZodObject<{
427
427
  description: z.ZodOptional<z.ZodString>;
428
428
  nyigSchool: z.ZodNativeEnum<typeof NYIGSchool>;
429
429
  recLevel: z.ZodString;
430
- halfCampTuition: z.ZodNumber;
431
- fullCampTuition: z.ZodNumber;
430
+ halfCampTuition: z.ZodOptional<z.ZodNumber>;
431
+ fullCampTuition: z.ZodOptional<z.ZodNumber>;
432
432
  _id: z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>;
433
433
  createdAt: z.ZodOptional<z.ZodDate>;
434
434
  updatedAt: z.ZodOptional<z.ZodDate>;
@@ -440,9 +440,9 @@ declare const zMCourse: z.ZodObject<{
440
440
  duration: number;
441
441
  nyigSchool: NYIGSchool;
442
442
  recLevel: string;
443
- halfCampTuition: number;
444
- fullCampTuition: number;
445
443
  description?: string | undefined;
444
+ halfCampTuition?: number | undefined;
445
+ fullCampTuition?: number | undefined;
446
446
  createdAt?: Date | undefined;
447
447
  updatedAt?: Date | undefined;
448
448
  }, {
@@ -453,9 +453,9 @@ declare const zMCourse: z.ZodObject<{
453
453
  duration: number;
454
454
  nyigSchool: NYIGSchool;
455
455
  recLevel: string;
456
- halfCampTuition: number;
457
- fullCampTuition: number;
458
456
  description?: string | undefined;
457
+ halfCampTuition?: number | undefined;
458
+ fullCampTuition?: number | undefined;
459
459
  createdAt?: Date | undefined;
460
460
  updatedAt?: Date | undefined;
461
461
  }>;
@@ -2073,19 +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.ZodOptional<z.ZodObject<{
2077
- user: z.ZodNumber;
2078
- admin: z.ZodNumber;
2079
- superadmin: z.ZodNumber;
2080
- }, "strip", z.ZodTypeAny, {
2081
- user: number;
2082
- admin: number;
2083
- superadmin: number;
2084
- }, {
2085
- user: number;
2086
- admin: number;
2087
- superadmin: number;
2088
- }>>;
2076
+ roles: z.ZodArray<z.ZodNumber, "many">;
2089
2077
  email: z.ZodOptional<z.ZodString>;
2090
2078
  address: z.ZodOptional<z.ZodString>;
2091
2079
  country: z.ZodOptional<z.ZodString>;
@@ -2093,13 +2081,9 @@ declare const zUser: z.ZodObject<{
2093
2081
  birthDate: z.ZodOptional<z.ZodString>;
2094
2082
  }, "strip", z.ZodTypeAny, {
2095
2083
  name: string;
2084
+ roles: number[];
2096
2085
  username?: string | undefined;
2097
2086
  password?: string | undefined;
2098
- roles?: {
2099
- user: number;
2100
- admin: number;
2101
- superadmin: number;
2102
- } | undefined;
2103
2087
  email?: string | undefined;
2104
2088
  address?: string | undefined;
2105
2089
  country?: string | undefined;
@@ -2107,13 +2091,9 @@ declare const zUser: z.ZodObject<{
2107
2091
  birthDate?: string | undefined;
2108
2092
  }, {
2109
2093
  name: string;
2094
+ roles: number[];
2110
2095
  username?: string | undefined;
2111
2096
  password?: string | undefined;
2112
- roles?: {
2113
- user: number;
2114
- admin: number;
2115
- superadmin: number;
2116
- } | undefined;
2117
2097
  email?: string | undefined;
2118
2098
  address?: string | undefined;
2119
2099
  country?: string | undefined;
@@ -2126,19 +2106,7 @@ declare const zMUser: z.ZodObject<{
2126
2106
  name: z.ZodString;
2127
2107
  username: z.ZodOptional<z.ZodString>;
2128
2108
  password: z.ZodOptional<z.ZodString>;
2129
- roles: z.ZodOptional<z.ZodObject<{
2130
- user: z.ZodNumber;
2131
- admin: z.ZodNumber;
2132
- superadmin: z.ZodNumber;
2133
- }, "strip", z.ZodTypeAny, {
2134
- user: number;
2135
- admin: number;
2136
- superadmin: number;
2137
- }, {
2138
- user: number;
2139
- admin: number;
2140
- superadmin: number;
2141
- }>>;
2109
+ roles: z.ZodArray<z.ZodNumber, "many">;
2142
2110
  country: z.ZodOptional<z.ZodString>;
2143
2111
  phoneNumber: z.ZodOptional<z.ZodString>;
2144
2112
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2148,15 +2116,11 @@ declare const zMUser: z.ZodObject<{
2148
2116
  }, z.UnknownKeysParam, z.ZodTypeAny, {
2149
2117
  _id: Types.ObjectId;
2150
2118
  name: string;
2119
+ roles: number[];
2151
2120
  email?: string | undefined;
2152
2121
  address?: string | undefined;
2153
2122
  username?: string | undefined;
2154
2123
  password?: string | undefined;
2155
- roles?: {
2156
- user: number;
2157
- admin: number;
2158
- superadmin: number;
2159
- } | undefined;
2160
2124
  country?: string | undefined;
2161
2125
  phoneNumber?: string | undefined;
2162
2126
  birthDate?: string | undefined;
@@ -2165,15 +2129,11 @@ declare const zMUser: z.ZodObject<{
2165
2129
  }, {
2166
2130
  _id: Types.ObjectId;
2167
2131
  name: string;
2132
+ roles: number[];
2168
2133
  email?: string | undefined;
2169
2134
  address?: string | undefined;
2170
2135
  username?: string | undefined;
2171
2136
  password?: string | undefined;
2172
- roles?: {
2173
- user: number;
2174
- admin: number;
2175
- superadmin: number;
2176
- } | undefined;
2177
2137
  country?: string | undefined;
2178
2138
  phoneNumber?: string | undefined;
2179
2139
  birthDate?: string | undefined;
@@ -2186,19 +2146,7 @@ declare const zStudent: z.ZodObject<{
2186
2146
  name: z.ZodString;
2187
2147
  username: z.ZodOptional<z.ZodString>;
2188
2148
  password: z.ZodOptional<z.ZodString>;
2189
- roles: z.ZodOptional<z.ZodObject<{
2190
- user: z.ZodNumber;
2191
- admin: z.ZodNumber;
2192
- superadmin: z.ZodNumber;
2193
- }, "strip", z.ZodTypeAny, {
2194
- user: number;
2195
- admin: number;
2196
- superadmin: number;
2197
- }, {
2198
- user: number;
2199
- admin: number;
2200
- superadmin: number;
2201
- }>>;
2149
+ roles: z.ZodArray<z.ZodNumber, "many">;
2202
2150
  country: z.ZodOptional<z.ZodString>;
2203
2151
  phoneNumber: z.ZodOptional<z.ZodString>;
2204
2152
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2207,15 +2155,11 @@ declare const zStudent: z.ZodObject<{
2207
2155
  }, "strip", z.ZodTypeAny, {
2208
2156
  rank: GoRank;
2209
2157
  name: string;
2158
+ roles: number[];
2210
2159
  email?: string | undefined;
2211
2160
  address?: string | undefined;
2212
2161
  username?: string | undefined;
2213
2162
  password?: string | undefined;
2214
- roles?: {
2215
- user: number;
2216
- admin: number;
2217
- superadmin: number;
2218
- } | undefined;
2219
2163
  country?: string | undefined;
2220
2164
  phoneNumber?: string | undefined;
2221
2165
  birthDate?: string | undefined;
@@ -2223,15 +2167,11 @@ declare const zStudent: z.ZodObject<{
2223
2167
  }, {
2224
2168
  rank: GoRank;
2225
2169
  name: string;
2170
+ roles: number[];
2226
2171
  email?: string | undefined;
2227
2172
  address?: string | undefined;
2228
2173
  username?: string | undefined;
2229
2174
  password?: string | undefined;
2230
- roles?: {
2231
- user: number;
2232
- admin: number;
2233
- superadmin: number;
2234
- } | undefined;
2235
2175
  country?: string | undefined;
2236
2176
  phoneNumber?: string | undefined;
2237
2177
  birthDate?: string | undefined;
@@ -2244,19 +2184,7 @@ declare const zMStudent: z.ZodObject<{
2244
2184
  name: z.ZodString;
2245
2185
  username: z.ZodOptional<z.ZodString>;
2246
2186
  password: z.ZodOptional<z.ZodString>;
2247
- roles: z.ZodOptional<z.ZodObject<{
2248
- user: z.ZodNumber;
2249
- admin: z.ZodNumber;
2250
- superadmin: z.ZodNumber;
2251
- }, "strip", z.ZodTypeAny, {
2252
- user: number;
2253
- admin: number;
2254
- superadmin: number;
2255
- }, {
2256
- user: number;
2257
- admin: number;
2258
- superadmin: number;
2259
- }>>;
2187
+ roles: z.ZodArray<z.ZodNumber, "many">;
2260
2188
  country: z.ZodOptional<z.ZodString>;
2261
2189
  phoneNumber: z.ZodOptional<z.ZodString>;
2262
2190
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2268,15 +2196,11 @@ declare const zMStudent: z.ZodObject<{
2268
2196
  rank: GoRank;
2269
2197
  _id: Types.ObjectId;
2270
2198
  name: string;
2199
+ roles: number[];
2271
2200
  email?: string | undefined;
2272
2201
  address?: string | undefined;
2273
2202
  username?: string | undefined;
2274
2203
  password?: string | undefined;
2275
- roles?: {
2276
- user: number;
2277
- admin: number;
2278
- superadmin: number;
2279
- } | undefined;
2280
2204
  country?: string | undefined;
2281
2205
  phoneNumber?: string | undefined;
2282
2206
  birthDate?: string | undefined;
@@ -2287,15 +2211,11 @@ declare const zMStudent: z.ZodObject<{
2287
2211
  rank: GoRank;
2288
2212
  _id: Types.ObjectId;
2289
2213
  name: string;
2214
+ roles: number[];
2290
2215
  email?: string | undefined;
2291
2216
  address?: string | undefined;
2292
2217
  username?: string | undefined;
2293
2218
  password?: string | undefined;
2294
- roles?: {
2295
- user: number;
2296
- admin: number;
2297
- superadmin: number;
2298
- } | undefined;
2299
2219
  country?: string | undefined;
2300
2220
  phoneNumber?: string | undefined;
2301
2221
  birthDate?: string | undefined;
@@ -2309,19 +2229,7 @@ declare const zTeacher: z.ZodObject<{
2309
2229
  name: z.ZodString;
2310
2230
  username: z.ZodOptional<z.ZodString>;
2311
2231
  password: z.ZodOptional<z.ZodString>;
2312
- roles: z.ZodOptional<z.ZodObject<{
2313
- user: z.ZodNumber;
2314
- admin: z.ZodNumber;
2315
- superadmin: z.ZodNumber;
2316
- }, "strip", z.ZodTypeAny, {
2317
- user: number;
2318
- admin: number;
2319
- superadmin: number;
2320
- }, {
2321
- user: number;
2322
- admin: number;
2323
- superadmin: number;
2324
- }>>;
2232
+ roles: z.ZodArray<z.ZodNumber, "many">;
2325
2233
  country: z.ZodOptional<z.ZodString>;
2326
2234
  phoneNumber: z.ZodOptional<z.ZodString>;
2327
2235
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2333,15 +2241,11 @@ declare const zTeacher: z.ZodObject<{
2333
2241
  }, "strip", z.ZodTypeAny, {
2334
2242
  rank: GoRank;
2335
2243
  name: string;
2244
+ roles: number[];
2336
2245
  email?: string | undefined;
2337
2246
  address?: string | undefined;
2338
2247
  username?: string | undefined;
2339
2248
  password?: string | undefined;
2340
- roles?: {
2341
- user: number;
2342
- admin: number;
2343
- superadmin: number;
2344
- } | undefined;
2345
2249
  country?: string | undefined;
2346
2250
  phoneNumber?: string | undefined;
2347
2251
  birthDate?: string | undefined;
@@ -2352,15 +2256,11 @@ declare const zTeacher: z.ZodObject<{
2352
2256
  }, {
2353
2257
  rank: GoRank;
2354
2258
  name: string;
2259
+ roles: number[];
2355
2260
  email?: string | undefined;
2356
2261
  address?: string | undefined;
2357
2262
  username?: string | undefined;
2358
2263
  password?: string | undefined;
2359
- roles?: {
2360
- user: number;
2361
- admin: number;
2362
- superadmin: number;
2363
- } | undefined;
2364
2264
  country?: string | undefined;
2365
2265
  phoneNumber?: string | undefined;
2366
2266
  birthDate?: string | undefined;
@@ -2378,19 +2278,7 @@ declare const zMTeacher: z.ZodObject<{
2378
2278
  bio: z.ZodOptional<z.ZodString>;
2379
2279
  username: z.ZodOptional<z.ZodString>;
2380
2280
  password: z.ZodOptional<z.ZodString>;
2381
- roles: z.ZodOptional<z.ZodObject<{
2382
- user: z.ZodNumber;
2383
- admin: z.ZodNumber;
2384
- superadmin: z.ZodNumber;
2385
- }, "strip", z.ZodTypeAny, {
2386
- user: number;
2387
- admin: number;
2388
- superadmin: number;
2389
- }, {
2390
- user: number;
2391
- admin: number;
2392
- superadmin: number;
2393
- }>>;
2281
+ roles: z.ZodArray<z.ZodNumber, "many">;
2394
2282
  country: z.ZodOptional<z.ZodString>;
2395
2283
  phoneNumber: z.ZodOptional<z.ZodString>;
2396
2284
  birthDate: z.ZodOptional<z.ZodString>;
@@ -2403,17 +2291,13 @@ declare const zMTeacher: z.ZodObject<{
2403
2291
  rank: GoRank;
2404
2292
  _id: Types.ObjectId;
2405
2293
  name: string;
2294
+ roles: number[];
2406
2295
  email?: string | undefined;
2407
2296
  address?: string | undefined;
2408
2297
  title?: string | undefined;
2409
2298
  bio?: string | undefined;
2410
2299
  username?: string | undefined;
2411
2300
  password?: string | undefined;
2412
- roles?: {
2413
- user: number;
2414
- admin: number;
2415
- superadmin: number;
2416
- } | undefined;
2417
2301
  country?: string | undefined;
2418
2302
  phoneNumber?: string | undefined;
2419
2303
  birthDate?: string | undefined;
@@ -2425,17 +2309,13 @@ declare const zMTeacher: z.ZodObject<{
2425
2309
  rank: GoRank;
2426
2310
  _id: Types.ObjectId;
2427
2311
  name: string;
2312
+ roles: number[];
2428
2313
  email?: string | undefined;
2429
2314
  address?: string | undefined;
2430
2315
  title?: string | undefined;
2431
2316
  bio?: string | undefined;
2432
2317
  username?: string | undefined;
2433
2318
  password?: string | undefined;
2434
- roles?: {
2435
- user: number;
2436
- admin: number;
2437
- superadmin: number;
2438
- } | undefined;
2439
2319
  country?: string | undefined;
2440
2320
  phoneNumber?: string | undefined;
2441
2321
  birthDate?: string | undefined;
package/index.js CHANGED
@@ -319,11 +319,11 @@ var zCourse = import_zod11.z.object({
319
319
  /**
320
320
  * @unit SECONDS - Duration of the course in seconds
321
321
  */
322
- duration: import_zod11.z.number(),
322
+ duration: import_zod11.z.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
323
323
  /**
324
324
  * @unit CENTS - Price of the course in cents
325
325
  */
326
- price: import_zod11.z.number(),
326
+ price: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
327
327
  description: import_zod11.z.string().optional(),
328
328
  /**
329
329
  * NYIG School locations
@@ -336,11 +336,11 @@ var zCourse = import_zod11.z.object({
336
336
  /**
337
337
  * Camp tuition for half-day option
338
338
  */
339
- halfCampTuition: import_zod11.z.number(),
339
+ halfCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
340
340
  /**
341
341
  * Camp tuition for full-day option
342
342
  */
343
- fullCampTuition: import_zod11.z.number()
343
+ fullCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
344
344
  });
345
345
  var zMCourse = extendZodObjectForMongoose(zCourse);
346
346
 
@@ -667,50 +667,46 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
667
667
  })(GoRank || {});
668
668
 
669
669
  // src/interface/user/user.ts
670
- var import_zod26 = require("zod");
671
-
672
- // src/interface/user/userRoles.ts
673
670
  var import_zod25 = require("zod");
674
- var zUserRoles = import_zod25.z.object({
675
- user: import_zod25.z.number().int(),
676
- admin: import_zod25.z.number().int(),
677
- superadmin: import_zod25.z.number().int()
678
- });
679
-
680
- // src/interface/user/user.ts
681
671
  var import_mongoose31 = require("mongoose");
682
- var zUser = import_zod26.z.object({
683
- name: import_zod26.z.string().min(2).max(100),
684
- username: import_zod26.z.string().optional(),
685
- password: import_zod26.z.string().optional(),
686
- roles: zUserRoles.optional(),
687
- email: import_zod26.z.string().email().max(100).optional(),
688
- address: import_zod26.z.string().optional(),
689
- country: import_zod26.z.string().optional(),
690
- phoneNumber: import_zod26.z.string().optional(),
691
- birthDate: import_zod26.z.string().optional()
672
+ var zUser = import_zod25.z.object({
673
+ name: import_zod25.z.string().min(2).max(100),
674
+ username: import_zod25.z.string().optional(),
675
+ password: import_zod25.z.string().optional(),
676
+ roles: import_zod25.z.array(import_zod25.z.number().int()),
677
+ email: import_zod25.z.string().email().max(100).optional(),
678
+ address: import_zod25.z.string().optional(),
679
+ country: import_zod25.z.string().length(2, {
680
+ message: "Enter the 2-letter country code"
681
+ }).optional(),
682
+ phoneNumber: import_zod25.z.string().regex(/^\d{10}/, {
683
+ message: `Please enter a valid 10-digit US phone number with numbers only`
684
+ }).optional(),
685
+ birthDate: import_zod25.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
686
+ message: "Enter a valid date in yyyy-mm-dd format"
687
+ }).optional()
692
688
  });
693
689
  var zMUser = extendZodObjectForMongoose(zUser);
694
690
  var zStudent = zUser.extend({
695
- rank: import_zod26.z.nativeEnum(GoRank),
696
- guardian: import_zod26.z.instanceof(import_mongoose31.Types.ObjectId).optional()
691
+ rank: import_zod25.z.nativeEnum(GoRank),
692
+ guardian: import_zod25.z.instanceof(import_mongoose31.Types.ObjectId).optional()
697
693
  });
698
694
  var zMStudent = extendZodObjectForMongoose(zStudent);
699
695
  var zTeacher = zUser.extend({
700
- rank: import_zod26.z.nativeEnum(GoRank),
696
+ rank: import_zod25.z.nativeEnum(GoRank),
701
697
  /**
702
698
  * Inactive teachers are not shown on public endpoints
703
699
  */
704
- isInactive: import_zod26.z.boolean().optional(),
700
+ isInactive: import_zod25.z.boolean().optional(),
705
701
  /**
706
702
  * Teacher's position, e.g., instructor, president
707
703
  */
708
- title: import_zod26.z.string().optional(),
704
+ title: import_zod25.z.string().optional(),
709
705
  /**
710
706
  * Teacher's bio text describing experience
711
707
  * new lines will be rendered as paragraphs
712
708
  */
713
- bio: import_zod26.z.string().optional(),
709
+ bio: import_zod25.z.string().optional(),
714
710
  /** Format is illustrated below, where teacher is available
715
711
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
716
712
  * [
@@ -723,9 +719,17 @@ var zTeacher = zUser.extend({
723
719
  * [],
724
720
  * ]
725
721
  */
726
- available: import_zod26.z.array(import_zod26.z.array(import_zod26.z.array(import_zod26.z.number()))).optional()
722
+ available: import_zod25.z.array(import_zod25.z.array(import_zod25.z.array(import_zod25.z.number()))).optional()
727
723
  });
728
724
  var zMTeacher = extendZodObjectForMongoose(zTeacher);
725
+
726
+ // src/interface/user/userRoles.ts
727
+ var import_zod26 = require("zod");
728
+ var zUserRoles = import_zod26.z.object({
729
+ user: import_zod26.z.number().int(),
730
+ admin: import_zod26.z.number().int(),
731
+ superadmin: import_zod26.z.number().int()
732
+ });
729
733
  // Annotate the CommonJS export names for ESM import in node:
730
734
  0 && (module.exports = {
731
735
  AgeGroup,
package/index.mjs CHANGED
@@ -233,11 +233,11 @@ var zCourse = z11.object({
233
233
  /**
234
234
  * @unit SECONDS - Duration of the course in seconds
235
235
  */
236
- duration: z11.number(),
236
+ duration: z11.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
237
237
  /**
238
238
  * @unit CENTS - Price of the course in cents
239
239
  */
240
- price: z11.number(),
240
+ price: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
241
241
  description: z11.string().optional(),
242
242
  /**
243
243
  * NYIG School locations
@@ -250,11 +250,11 @@ var zCourse = z11.object({
250
250
  /**
251
251
  * Camp tuition for half-day option
252
252
  */
253
- halfCampTuition: z11.number(),
253
+ halfCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
254
254
  /**
255
255
  * Camp tuition for full-day option
256
256
  */
257
- fullCampTuition: z11.number()
257
+ fullCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
258
258
  });
259
259
  var zMCourse = extendZodObjectForMongoose(zCourse);
260
260
 
@@ -581,50 +581,46 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
581
581
  })(GoRank || {});
582
582
 
583
583
  // src/interface/user/user.ts
584
- import { z as z26 } from "zod";
585
-
586
- // src/interface/user/userRoles.ts
587
584
  import { z as z25 } from "zod";
588
- var zUserRoles = z25.object({
589
- user: z25.number().int(),
590
- admin: z25.number().int(),
591
- superadmin: z25.number().int()
592
- });
593
-
594
- // src/interface/user/user.ts
595
585
  import { Types as Types15 } from "mongoose";
596
- var zUser = z26.object({
597
- name: z26.string().min(2).max(100),
598
- username: z26.string().optional(),
599
- password: z26.string().optional(),
600
- roles: zUserRoles.optional(),
601
- email: z26.string().email().max(100).optional(),
602
- address: z26.string().optional(),
603
- country: z26.string().optional(),
604
- phoneNumber: z26.string().optional(),
605
- birthDate: z26.string().optional()
586
+ var zUser = z25.object({
587
+ name: z25.string().min(2).max(100),
588
+ username: z25.string().optional(),
589
+ password: z25.string().optional(),
590
+ roles: z25.array(z25.number().int()),
591
+ email: z25.string().email().max(100).optional(),
592
+ address: z25.string().optional(),
593
+ country: z25.string().length(2, {
594
+ message: "Enter the 2-letter country code"
595
+ }).optional(),
596
+ phoneNumber: z25.string().regex(/^\d{10}/, {
597
+ message: `Please enter a valid 10-digit US phone number with numbers only`
598
+ }).optional(),
599
+ birthDate: z25.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
600
+ message: "Enter a valid date in yyyy-mm-dd format"
601
+ }).optional()
606
602
  });
607
603
  var zMUser = extendZodObjectForMongoose(zUser);
608
604
  var zStudent = zUser.extend({
609
- rank: z26.nativeEnum(GoRank),
610
- guardian: z26.instanceof(Types15.ObjectId).optional()
605
+ rank: z25.nativeEnum(GoRank),
606
+ guardian: z25.instanceof(Types15.ObjectId).optional()
611
607
  });
612
608
  var zMStudent = extendZodObjectForMongoose(zStudent);
613
609
  var zTeacher = zUser.extend({
614
- rank: z26.nativeEnum(GoRank),
610
+ rank: z25.nativeEnum(GoRank),
615
611
  /**
616
612
  * Inactive teachers are not shown on public endpoints
617
613
  */
618
- isInactive: z26.boolean().optional(),
614
+ isInactive: z25.boolean().optional(),
619
615
  /**
620
616
  * Teacher's position, e.g., instructor, president
621
617
  */
622
- title: z26.string().optional(),
618
+ title: z25.string().optional(),
623
619
  /**
624
620
  * Teacher's bio text describing experience
625
621
  * new lines will be rendered as paragraphs
626
622
  */
627
- bio: z26.string().optional(),
623
+ bio: z25.string().optional(),
628
624
  /** Format is illustrated below, where teacher is available
629
625
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
630
626
  * [
@@ -637,9 +633,17 @@ var zTeacher = zUser.extend({
637
633
  * [],
638
634
  * ]
639
635
  */
640
- available: z26.array(z26.array(z26.array(z26.number()))).optional()
636
+ available: z25.array(z25.array(z25.array(z25.number()))).optional()
641
637
  });
642
638
  var zMTeacher = extendZodObjectForMongoose(zTeacher);
639
+
640
+ // src/interface/user/userRoles.ts
641
+ import { z as z26 } from "zod";
642
+ var zUserRoles = z26.object({
643
+ user: z26.number().int(),
644
+ admin: z26.number().int(),
645
+ superadmin: z26.number().int()
646
+ });
643
647
  export {
644
648
  AgeGroup,
645
649
  AttendState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",