@nyig/models 0.2.17 → 0.2.19

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
@@ -1210,7 +1210,7 @@ declare const zTeacherPaymentRow: z.ZodObject<{
1210
1210
  wage: number;
1211
1211
  }>;
1212
1212
  declare const zTeacherPayment: z.ZodObject<{
1213
- teacher: z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>;
1213
+ teacher: z.ZodString;
1214
1214
  rows: z.ZodArray<z.ZodObject<{
1215
1215
  course: z.ZodString;
1216
1216
  length: z.ZodNumber;
@@ -1229,7 +1229,7 @@ declare const zTeacherPayment: z.ZodObject<{
1229
1229
  }>, "many">;
1230
1230
  paid: z.ZodOptional<z.ZodBoolean>;
1231
1231
  }, "strip", z.ZodTypeAny, {
1232
- teacher: Types.ObjectId;
1232
+ teacher: string;
1233
1233
  rows: {
1234
1234
  length: number;
1235
1235
  course: string;
@@ -1238,7 +1238,7 @@ declare const zTeacherPayment: z.ZodObject<{
1238
1238
  }[];
1239
1239
  paid?: boolean | undefined;
1240
1240
  }, {
1241
- teacher: Types.ObjectId;
1241
+ teacher: string;
1242
1242
  rows: {
1243
1243
  length: number;
1244
1244
  course: string;
@@ -1249,7 +1249,7 @@ declare const zTeacherPayment: z.ZodObject<{
1249
1249
  }>;
1250
1250
  declare const zMTeacherPayment: z.ZodObject<{
1251
1251
  paid: z.ZodOptional<z.ZodBoolean>;
1252
- teacher: z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>;
1252
+ teacher: z.ZodString;
1253
1253
  rows: z.ZodArray<z.ZodObject<{
1254
1254
  course: z.ZodString;
1255
1255
  length: z.ZodNumber;
@@ -1271,7 +1271,7 @@ declare const zMTeacherPayment: z.ZodObject<{
1271
1271
  updatedAt: z.ZodOptional<z.ZodDate>;
1272
1272
  }, z.UnknownKeysParam, z.ZodTypeAny, {
1273
1273
  _id: Types.ObjectId;
1274
- teacher: Types.ObjectId;
1274
+ teacher: string;
1275
1275
  rows: {
1276
1276
  length: number;
1277
1277
  course: string;
@@ -1283,7 +1283,7 @@ declare const zMTeacherPayment: z.ZodObject<{
1283
1283
  updatedAt?: Date | undefined;
1284
1284
  }, {
1285
1285
  _id: Types.ObjectId;
1286
- teacher: Types.ObjectId;
1286
+ teacher: string;
1287
1287
  rows: {
1288
1288
  length: number;
1289
1289
  course: string;
@@ -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
@@ -1210,7 +1210,7 @@ declare const zTeacherPaymentRow: z.ZodObject<{
1210
1210
  wage: number;
1211
1211
  }>;
1212
1212
  declare const zTeacherPayment: z.ZodObject<{
1213
- teacher: z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>;
1213
+ teacher: z.ZodString;
1214
1214
  rows: z.ZodArray<z.ZodObject<{
1215
1215
  course: z.ZodString;
1216
1216
  length: z.ZodNumber;
@@ -1229,7 +1229,7 @@ declare const zTeacherPayment: z.ZodObject<{
1229
1229
  }>, "many">;
1230
1230
  paid: z.ZodOptional<z.ZodBoolean>;
1231
1231
  }, "strip", z.ZodTypeAny, {
1232
- teacher: Types.ObjectId;
1232
+ teacher: string;
1233
1233
  rows: {
1234
1234
  length: number;
1235
1235
  course: string;
@@ -1238,7 +1238,7 @@ declare const zTeacherPayment: z.ZodObject<{
1238
1238
  }[];
1239
1239
  paid?: boolean | undefined;
1240
1240
  }, {
1241
- teacher: Types.ObjectId;
1241
+ teacher: string;
1242
1242
  rows: {
1243
1243
  length: number;
1244
1244
  course: string;
@@ -1249,7 +1249,7 @@ declare const zTeacherPayment: z.ZodObject<{
1249
1249
  }>;
1250
1250
  declare const zMTeacherPayment: z.ZodObject<{
1251
1251
  paid: z.ZodOptional<z.ZodBoolean>;
1252
- teacher: z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>;
1252
+ teacher: z.ZodString;
1253
1253
  rows: z.ZodArray<z.ZodObject<{
1254
1254
  course: z.ZodString;
1255
1255
  length: z.ZodNumber;
@@ -1271,7 +1271,7 @@ declare const zMTeacherPayment: z.ZodObject<{
1271
1271
  updatedAt: z.ZodOptional<z.ZodDate>;
1272
1272
  }, z.UnknownKeysParam, z.ZodTypeAny, {
1273
1273
  _id: Types.ObjectId;
1274
- teacher: Types.ObjectId;
1274
+ teacher: string;
1275
1275
  rows: {
1276
1276
  length: number;
1277
1277
  course: string;
@@ -1283,7 +1283,7 @@ declare const zMTeacherPayment: z.ZodObject<{
1283
1283
  updatedAt?: Date | undefined;
1284
1284
  }, {
1285
1285
  _id: Types.ObjectId;
1286
- teacher: Types.ObjectId;
1286
+ teacher: string;
1287
1287
  rows: {
1288
1288
  length: number;
1289
1289
  course: string;
@@ -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
@@ -198,7 +198,7 @@ var zCampTracker = import_zod6.z.object({
198
198
  var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
199
199
 
200
200
  // src/interface/tracking/classTracker.ts
201
- var import_mongoose11 = require("mongoose");
201
+ var import_mongoose10 = require("mongoose");
202
202
  var import_zod9 = require("zod");
203
203
 
204
204
  // src/interface/payment/invoice.ts
@@ -242,7 +242,6 @@ var zInvoice = import_zod7.z.object({
242
242
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
243
243
 
244
244
  // src/interface/payment/teacherPayment.ts
245
- var import_mongoose9 = require("mongoose");
246
245
  var import_zod8 = require("zod");
247
246
  var zTeacherPaymentRow = import_zod8.z.object({
248
247
  course: import_zod8.z.string(),
@@ -251,7 +250,7 @@ var zTeacherPaymentRow = import_zod8.z.object({
251
250
  wage: import_zod8.z.number()
252
251
  });
253
252
  var zTeacherPayment = import_zod8.z.object({
254
- teacher: import_zod8.z.instanceof(import_mongoose9.Types.ObjectId),
253
+ teacher: import_zod8.z.string(),
255
254
  rows: import_zod8.z.array(zTeacherPaymentRow),
256
255
  paid: import_zod8.z.boolean().optional()
257
256
  });
@@ -259,9 +258,9 @@ var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
259
258
 
260
259
  // src/interface/tracking/classTracker.ts
261
260
  var zClassTracker = import_zod9.z.object({
262
- course: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
263
- teacher: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
264
- student: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
261
+ course: import_zod9.z.instanceof(import_mongoose10.Types.ObjectId),
262
+ teacher: import_zod9.z.instanceof(import_mongoose10.Types.ObjectId),
263
+ student: import_zod9.z.instanceof(import_mongoose10.Types.ObjectId),
265
264
  classTimes: import_zod9.z.array(import_zod9.z.coerce.date()),
266
265
  completedList: import_zod9.z.array(import_zod9.z.boolean()),
267
266
  /**
@@ -345,11 +344,11 @@ var zCourse = import_zod11.z.object({
345
344
  var zMCourse = extendZodObjectForMongoose(zCourse);
346
345
 
347
346
  // src/interface/tracking/groupTracker.ts
348
- var import_mongoose15 = require("mongoose");
347
+ var import_mongoose14 = require("mongoose");
349
348
  var zGroupTracker = import_zod12.z.object({
350
- course: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
351
- teacher: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
352
- semester: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
349
+ course: import_zod12.z.instanceof(import_mongoose14.Types.ObjectId),
350
+ teacher: import_zod12.z.instanceof(import_mongoose14.Types.ObjectId),
351
+ semester: import_zod12.z.instanceof(import_mongoose14.Types.ObjectId),
353
352
  scheduleData: zScheduleData,
354
353
  /**
355
354
  * occurrences are tracked by week for Groups
@@ -358,7 +357,7 @@ var zGroupTracker = import_zod12.z.object({
358
357
  /**
359
358
  * attendances are tracked by week for Groups
360
359
  */
361
- attendances: import_zod12.z.array(import_zod12.z.instanceof(import_mongoose15.Types.ObjectId)),
360
+ attendances: import_zod12.z.array(import_zod12.z.instanceof(import_mongoose14.Types.ObjectId)),
362
361
  /**
363
362
  * public-facing ID of the course instance, e.g., 101
364
363
  */
@@ -386,10 +385,10 @@ var zCampBooking = import_zod13.z.object({
386
385
  var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
387
386
 
388
387
  // src/interface/booking/groupBooking.ts
389
- var import_mongoose17 = require("mongoose");
388
+ var import_mongoose16 = require("mongoose");
390
389
  var import_zod14 = require("zod");
391
390
  var zGroupBooking = import_zod14.z.object({
392
- gtId: import_zod14.z.instanceof(import_mongoose17.Types.ObjectId).optional(),
391
+ gtId: import_zod14.z.instanceof(import_mongoose16.Types.ObjectId).optional(),
393
392
  isTrial: import_zod14.z.boolean().optional(),
394
393
  isOnline: import_zod14.z.boolean(),
395
394
  classDate: import_zod14.z.string().optional(),
@@ -398,11 +397,11 @@ var zGroupBooking = import_zod14.z.object({
398
397
  var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
399
398
 
400
399
  // src/interface/booking/privateBooking.ts
401
- var import_mongoose19 = require("mongoose");
400
+ var import_mongoose18 = require("mongoose");
402
401
  var import_zod15 = require("zod");
403
402
  var zPrivateBooking = import_zod15.z.object({
404
- courseId: import_zod15.z.instanceof(import_mongoose19.Types.ObjectId),
405
- teacherId: import_zod15.z.instanceof(import_mongoose19.Types.ObjectId),
403
+ courseId: import_zod15.z.instanceof(import_mongoose18.Types.ObjectId),
404
+ teacherId: import_zod15.z.instanceof(import_mongoose18.Types.ObjectId),
406
405
  classDate: import_zod15.z.string().optional()
407
406
  }).merge(zBUserInfo).merge(zBPaymentInfo);
408
407
  var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
@@ -434,7 +433,7 @@ var zImageDef = import_zod17.z.object({
434
433
  });
435
434
 
436
435
  // src/interface/reporting/reportTicket.ts
437
- var import_mongoose21 = require("mongoose");
436
+ var import_mongoose20 = require("mongoose");
438
437
  var import_zod18 = require("zod");
439
438
 
440
439
  // src/interface/reporting/ticketStatus.ts
@@ -448,8 +447,8 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
448
447
 
449
448
  // src/interface/reporting/reportTicket.ts
450
449
  var zReportTicket = import_zod18.z.object({
451
- requester: import_zod18.z.instanceof(import_mongoose21.Types.ObjectId),
452
- resolver: import_zod18.z.instanceof(import_mongoose21.Types.ObjectId),
450
+ requester: import_zod18.z.instanceof(import_mongoose20.Types.ObjectId),
451
+ resolver: import_zod18.z.instanceof(import_mongoose20.Types.ObjectId),
453
452
  status: import_zod18.z.nativeEnum(TicketStatus),
454
453
  title: import_zod18.z.string(),
455
454
  description: import_zod18.z.string()
@@ -483,7 +482,7 @@ var zSemester = import_zod19.z.object({
483
482
  var zMSemester = extendZodObjectForMongoose(zSemester);
484
483
 
485
484
  // src/interface/tournament/tConfig.ts
486
- var import_mongoose24 = require("mongoose");
485
+ var import_mongoose23 = require("mongoose");
487
486
  var import_zod21 = require("zod");
488
487
 
489
488
  // src/interface/tournament/table.ts
@@ -546,7 +545,7 @@ var zTConfig = import_zod21.z.object({
546
545
  /**
547
546
  * List of ticket object IDs for this tournament
548
547
  */
549
- tickets: import_zod21.z.array(import_zod21.z.instanceof(import_mongoose24.Types.ObjectId)),
548
+ tickets: import_zod21.z.array(import_zod21.z.instanceof(import_mongoose23.Types.ObjectId)),
550
549
  /**
551
550
  * If false, the tournament registration is closed
552
551
  */
@@ -563,14 +562,14 @@ var zTConfig = import_zod21.z.object({
563
562
  var zMTConfig = extendZodObjectForMongoose(zTConfig);
564
563
 
565
564
  // src/interface/tournament/tReg.ts
566
- var import_mongoose27 = require("mongoose");
565
+ var import_mongoose26 = require("mongoose");
567
566
  var import_zod23 = require("zod");
568
567
 
569
568
  // src/interface/tournament/tTicketReg.ts
570
569
  var import_zod22 = require("zod");
571
- var import_mongoose26 = require("mongoose");
570
+ var import_mongoose25 = require("mongoose");
572
571
  var zTTicketReg = import_zod22.z.object({
573
- ticket: import_zod22.z.instanceof(import_mongoose26.Types.ObjectId),
572
+ ticket: import_zod22.z.instanceof(import_mongoose25.Types.ObjectId),
574
573
  /**
575
574
  * integer minimum 1, otherwise no ticket is being bought
576
575
  */
@@ -580,7 +579,7 @@ var zTTicketReg = import_zod22.z.object({
580
579
  // src/interface/tournament/tReg.ts
581
580
  var zTReg = import_zod23.z.object({
582
581
  agaId: import_zod23.z.string(),
583
- tournamentId: import_zod23.z.instanceof(import_mongoose27.Types.ObjectId),
582
+ tournamentId: import_zod23.z.instanceof(import_mongoose26.Types.ObjectId),
584
583
  tickets: import_zod23.z.array(zTTicketReg),
585
584
  /**
586
585
  * @units CENTS - Donation in cents
@@ -593,7 +592,7 @@ var zTReg = import_zod23.z.object({
593
592
  /**
594
593
  * Mongoose ID of the admin that edited the registration
595
594
  */
596
- edited: import_zod23.z.instanceof(import_mongoose27.Types.ObjectId).optional()
595
+ edited: import_zod23.z.instanceof(import_mongoose26.Types.ObjectId).optional()
597
596
  }).merge(zBUserInfo).merge(zBPaymentInfo);
598
597
  var zMTReg = extendZodObjectForMongoose(zTReg);
599
598
 
@@ -668,12 +667,12 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
668
667
 
669
668
  // src/interface/user/user.ts
670
669
  var import_zod25 = require("zod");
671
- var import_mongoose31 = require("mongoose");
670
+ var import_mongoose30 = require("mongoose");
672
671
  var zUser = import_zod25.z.object({
673
672
  name: import_zod25.z.string().min(2).max(100),
674
673
  username: import_zod25.z.string().optional(),
675
674
  password: import_zod25.z.string().optional(),
676
- roles: import_zod25.z.array(import_zod25.z.number().int()),
675
+ roles: import_zod25.z.array(import_zod25.z.number().int()).optional(),
677
676
  email: import_zod25.z.string().email().max(100).optional(),
678
677
  address: import_zod25.z.string().optional(),
679
678
  country: import_zod25.z.string().length(2, {
@@ -689,7 +688,7 @@ var zUser = import_zod25.z.object({
689
688
  var zMUser = extendZodObjectForMongoose(zUser);
690
689
  var zStudent = zUser.extend({
691
690
  rank: import_zod25.z.nativeEnum(GoRank),
692
- guardian: import_zod25.z.instanceof(import_mongoose31.Types.ObjectId).optional()
691
+ guardian: import_zod25.z.instanceof(import_mongoose30.Types.ObjectId).optional()
693
692
  });
694
693
  var zMStudent = extendZodObjectForMongoose(zStudent);
695
694
  var zTeacher = zUser.extend({
package/index.mjs CHANGED
@@ -112,7 +112,7 @@ var zCampTracker = z6.object({
112
112
  var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
113
113
 
114
114
  // src/interface/tracking/classTracker.ts
115
- import { Types as Types7 } from "mongoose";
115
+ import { Types as Types6 } from "mongoose";
116
116
  import { z as z9 } from "zod";
117
117
 
118
118
  // src/interface/payment/invoice.ts
@@ -156,7 +156,6 @@ var zInvoice = z7.object({
156
156
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
157
157
 
158
158
  // src/interface/payment/teacherPayment.ts
159
- import { Types as Types6 } from "mongoose";
160
159
  import { z as z8 } from "zod";
161
160
  var zTeacherPaymentRow = z8.object({
162
161
  course: z8.string(),
@@ -165,7 +164,7 @@ var zTeacherPaymentRow = z8.object({
165
164
  wage: z8.number()
166
165
  });
167
166
  var zTeacherPayment = z8.object({
168
- teacher: z8.instanceof(Types6.ObjectId),
167
+ teacher: z8.string(),
169
168
  rows: z8.array(zTeacherPaymentRow),
170
169
  paid: z8.boolean().optional()
171
170
  });
@@ -173,9 +172,9 @@ var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
173
172
 
174
173
  // src/interface/tracking/classTracker.ts
175
174
  var zClassTracker = z9.object({
176
- course: z9.instanceof(Types7.ObjectId),
177
- teacher: z9.instanceof(Types7.ObjectId),
178
- student: z9.instanceof(Types7.ObjectId),
175
+ course: z9.instanceof(Types6.ObjectId),
176
+ teacher: z9.instanceof(Types6.ObjectId),
177
+ student: z9.instanceof(Types6.ObjectId),
179
178
  classTimes: z9.array(z9.coerce.date()),
180
179
  completedList: z9.array(z9.boolean()),
181
180
  /**
@@ -259,11 +258,11 @@ var zCourse = z11.object({
259
258
  var zMCourse = extendZodObjectForMongoose(zCourse);
260
259
 
261
260
  // src/interface/tracking/groupTracker.ts
262
- import { Types as Types8 } from "mongoose";
261
+ import { Types as Types7 } from "mongoose";
263
262
  var zGroupTracker = z12.object({
264
- course: z12.instanceof(Types8.ObjectId),
265
- teacher: z12.instanceof(Types8.ObjectId),
266
- semester: z12.instanceof(Types8.ObjectId),
263
+ course: z12.instanceof(Types7.ObjectId),
264
+ teacher: z12.instanceof(Types7.ObjectId),
265
+ semester: z12.instanceof(Types7.ObjectId),
267
266
  scheduleData: zScheduleData,
268
267
  /**
269
268
  * occurrences are tracked by week for Groups
@@ -272,7 +271,7 @@ var zGroupTracker = z12.object({
272
271
  /**
273
272
  * attendances are tracked by week for Groups
274
273
  */
275
- attendances: z12.array(z12.instanceof(Types8.ObjectId)),
274
+ attendances: z12.array(z12.instanceof(Types7.ObjectId)),
276
275
  /**
277
276
  * public-facing ID of the course instance, e.g., 101
278
277
  */
@@ -300,10 +299,10 @@ var zCampBooking = z13.object({
300
299
  var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
301
300
 
302
301
  // src/interface/booking/groupBooking.ts
303
- import { Types as Types9 } from "mongoose";
302
+ import { Types as Types8 } from "mongoose";
304
303
  import { z as z14 } from "zod";
305
304
  var zGroupBooking = z14.object({
306
- gtId: z14.instanceof(Types9.ObjectId).optional(),
305
+ gtId: z14.instanceof(Types8.ObjectId).optional(),
307
306
  isTrial: z14.boolean().optional(),
308
307
  isOnline: z14.boolean(),
309
308
  classDate: z14.string().optional(),
@@ -312,11 +311,11 @@ var zGroupBooking = z14.object({
312
311
  var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
313
312
 
314
313
  // src/interface/booking/privateBooking.ts
315
- import { Types as Types10 } from "mongoose";
314
+ import { Types as Types9 } from "mongoose";
316
315
  import { z as z15 } from "zod";
317
316
  var zPrivateBooking = z15.object({
318
- courseId: z15.instanceof(Types10.ObjectId),
319
- teacherId: z15.instanceof(Types10.ObjectId),
317
+ courseId: z15.instanceof(Types9.ObjectId),
318
+ teacherId: z15.instanceof(Types9.ObjectId),
320
319
  classDate: z15.string().optional()
321
320
  }).merge(zBUserInfo).merge(zBPaymentInfo);
322
321
  var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
@@ -348,7 +347,7 @@ var zImageDef = z17.object({
348
347
  });
349
348
 
350
349
  // src/interface/reporting/reportTicket.ts
351
- import { Types as Types11 } from "mongoose";
350
+ import { Types as Types10 } from "mongoose";
352
351
  import { z as z18 } from "zod";
353
352
 
354
353
  // src/interface/reporting/ticketStatus.ts
@@ -362,8 +361,8 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
362
361
 
363
362
  // src/interface/reporting/reportTicket.ts
364
363
  var zReportTicket = z18.object({
365
- requester: z18.instanceof(Types11.ObjectId),
366
- resolver: z18.instanceof(Types11.ObjectId),
364
+ requester: z18.instanceof(Types10.ObjectId),
365
+ resolver: z18.instanceof(Types10.ObjectId),
367
366
  status: z18.nativeEnum(TicketStatus),
368
367
  title: z18.string(),
369
368
  description: z18.string()
@@ -397,7 +396,7 @@ var zSemester = z19.object({
397
396
  var zMSemester = extendZodObjectForMongoose(zSemester);
398
397
 
399
398
  // src/interface/tournament/tConfig.ts
400
- import { Types as Types12 } from "mongoose";
399
+ import { Types as Types11 } from "mongoose";
401
400
  import { z as z21 } from "zod";
402
401
 
403
402
  // src/interface/tournament/table.ts
@@ -460,7 +459,7 @@ var zTConfig = z21.object({
460
459
  /**
461
460
  * List of ticket object IDs for this tournament
462
461
  */
463
- tickets: z21.array(z21.instanceof(Types12.ObjectId)),
462
+ tickets: z21.array(z21.instanceof(Types11.ObjectId)),
464
463
  /**
465
464
  * If false, the tournament registration is closed
466
465
  */
@@ -477,14 +476,14 @@ var zTConfig = z21.object({
477
476
  var zMTConfig = extendZodObjectForMongoose(zTConfig);
478
477
 
479
478
  // src/interface/tournament/tReg.ts
480
- import { Types as Types14 } from "mongoose";
479
+ import { Types as Types13 } from "mongoose";
481
480
  import { z as z23 } from "zod";
482
481
 
483
482
  // src/interface/tournament/tTicketReg.ts
484
483
  import { z as z22 } from "zod";
485
- import { Types as Types13 } from "mongoose";
484
+ import { Types as Types12 } from "mongoose";
486
485
  var zTTicketReg = z22.object({
487
- ticket: z22.instanceof(Types13.ObjectId),
486
+ ticket: z22.instanceof(Types12.ObjectId),
488
487
  /**
489
488
  * integer minimum 1, otherwise no ticket is being bought
490
489
  */
@@ -494,7 +493,7 @@ var zTTicketReg = z22.object({
494
493
  // src/interface/tournament/tReg.ts
495
494
  var zTReg = z23.object({
496
495
  agaId: z23.string(),
497
- tournamentId: z23.instanceof(Types14.ObjectId),
496
+ tournamentId: z23.instanceof(Types13.ObjectId),
498
497
  tickets: z23.array(zTTicketReg),
499
498
  /**
500
499
  * @units CENTS - Donation in cents
@@ -507,7 +506,7 @@ var zTReg = z23.object({
507
506
  /**
508
507
  * Mongoose ID of the admin that edited the registration
509
508
  */
510
- edited: z23.instanceof(Types14.ObjectId).optional()
509
+ edited: z23.instanceof(Types13.ObjectId).optional()
511
510
  }).merge(zBUserInfo).merge(zBPaymentInfo);
512
511
  var zMTReg = extendZodObjectForMongoose(zTReg);
513
512
 
@@ -582,12 +581,12 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
582
581
 
583
582
  // src/interface/user/user.ts
584
583
  import { z as z25 } from "zod";
585
- import { Types as Types15 } from "mongoose";
584
+ import { Types as Types14 } from "mongoose";
586
585
  var zUser = z25.object({
587
586
  name: z25.string().min(2).max(100),
588
587
  username: z25.string().optional(),
589
588
  password: z25.string().optional(),
590
- roles: z25.array(z25.number().int()),
589
+ roles: z25.array(z25.number().int()).optional(),
591
590
  email: z25.string().email().max(100).optional(),
592
591
  address: z25.string().optional(),
593
592
  country: z25.string().length(2, {
@@ -603,7 +602,7 @@ var zUser = z25.object({
603
602
  var zMUser = extendZodObjectForMongoose(zUser);
604
603
  var zStudent = zUser.extend({
605
604
  rank: z25.nativeEnum(GoRank),
606
- guardian: z25.instanceof(Types15.ObjectId).optional()
605
+ guardian: z25.instanceof(Types14.ObjectId).optional()
607
606
  });
608
607
  var zMStudent = extendZodObjectForMongoose(zStudent);
609
608
  var zTeacher = zUser.extend({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",