@nyig/models 0.2.22 → 0.2.23

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
@@ -1042,7 +1042,7 @@ declare const zInvoice: z.ZodObject<{
1042
1042
  paid: z.ZodOptional<z.ZodNativeEnum<typeof PaymentMethod>>;
1043
1043
  notes: z.ZodOptional<z.ZodString>;
1044
1044
  createdBy: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1045
- lastEditBy: z.ZodOptional<z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>>;
1045
+ lastEditBy: z.ZodOptional<z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>>;
1046
1046
  }, "strip", z.ZodTypeAny, {
1047
1047
  billTo: string;
1048
1048
  packages: {
@@ -1062,7 +1062,7 @@ declare const zInvoice: z.ZodObject<{
1062
1062
  shipping?: number | undefined;
1063
1063
  paid?: PaymentMethod | undefined;
1064
1064
  notes?: string | undefined;
1065
- lastEditBy?: Types.ObjectId | undefined;
1065
+ lastEditBy?: string | Types.ObjectId | undefined;
1066
1066
  }, {
1067
1067
  billTo: string;
1068
1068
  packages: {
@@ -1082,7 +1082,7 @@ declare const zInvoice: z.ZodObject<{
1082
1082
  shipping?: number | undefined;
1083
1083
  paid?: PaymentMethod | undefined;
1084
1084
  notes?: string | undefined;
1085
- lastEditBy?: Types.ObjectId | undefined;
1085
+ lastEditBy?: string | Types.ObjectId | undefined;
1086
1086
  }>;
1087
1087
  declare const zMInvoice: z.ZodObject<{
1088
1088
  notes: z.ZodOptional<z.ZodString>;
@@ -1131,7 +1131,7 @@ declare const zMInvoice: z.ZodObject<{
1131
1131
  amount: number;
1132
1132
  }>, "many">;
1133
1133
  createdBy: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1134
- lastEditBy: z.ZodOptional<z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>>;
1134
+ lastEditBy: z.ZodOptional<z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>>;
1135
1135
  _id: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1136
1136
  createdAt: z.ZodOptional<z.ZodDate>;
1137
1137
  updatedAt: z.ZodOptional<z.ZodDate>;
@@ -1155,7 +1155,7 @@ declare const zMInvoice: z.ZodObject<{
1155
1155
  textbook?: number | undefined;
1156
1156
  shipping?: number | undefined;
1157
1157
  paid?: PaymentMethod | undefined;
1158
- lastEditBy?: Types.ObjectId | undefined;
1158
+ lastEditBy?: string | Types.ObjectId | undefined;
1159
1159
  createdAt?: Date | undefined;
1160
1160
  updatedAt?: Date | undefined;
1161
1161
  }, {
@@ -1178,7 +1178,7 @@ declare const zMInvoice: z.ZodObject<{
1178
1178
  textbook?: number | undefined;
1179
1179
  shipping?: number | undefined;
1180
1180
  paid?: PaymentMethod | undefined;
1181
- lastEditBy?: Types.ObjectId | undefined;
1181
+ lastEditBy?: string | Types.ObjectId | undefined;
1182
1182
  createdAt?: Date | undefined;
1183
1183
  updatedAt?: Date | undefined;
1184
1184
  }>;
package/index.d.ts CHANGED
@@ -1042,7 +1042,7 @@ declare const zInvoice: z.ZodObject<{
1042
1042
  paid: z.ZodOptional<z.ZodNativeEnum<typeof PaymentMethod>>;
1043
1043
  notes: z.ZodOptional<z.ZodString>;
1044
1044
  createdBy: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1045
- lastEditBy: z.ZodOptional<z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>>;
1045
+ lastEditBy: z.ZodOptional<z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>>;
1046
1046
  }, "strip", z.ZodTypeAny, {
1047
1047
  billTo: string;
1048
1048
  packages: {
@@ -1062,7 +1062,7 @@ declare const zInvoice: z.ZodObject<{
1062
1062
  shipping?: number | undefined;
1063
1063
  paid?: PaymentMethod | undefined;
1064
1064
  notes?: string | undefined;
1065
- lastEditBy?: Types.ObjectId | undefined;
1065
+ lastEditBy?: string | Types.ObjectId | undefined;
1066
1066
  }, {
1067
1067
  billTo: string;
1068
1068
  packages: {
@@ -1082,7 +1082,7 @@ declare const zInvoice: z.ZodObject<{
1082
1082
  shipping?: number | undefined;
1083
1083
  paid?: PaymentMethod | undefined;
1084
1084
  notes?: string | undefined;
1085
- lastEditBy?: Types.ObjectId | undefined;
1085
+ lastEditBy?: string | Types.ObjectId | undefined;
1086
1086
  }>;
1087
1087
  declare const zMInvoice: z.ZodObject<{
1088
1088
  notes: z.ZodOptional<z.ZodString>;
@@ -1131,7 +1131,7 @@ declare const zMInvoice: z.ZodObject<{
1131
1131
  amount: number;
1132
1132
  }>, "many">;
1133
1133
  createdBy: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1134
- lastEditBy: z.ZodOptional<z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>>;
1134
+ lastEditBy: z.ZodOptional<z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>>;
1135
1135
  _id: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
1136
1136
  createdAt: z.ZodOptional<z.ZodDate>;
1137
1137
  updatedAt: z.ZodOptional<z.ZodDate>;
@@ -1155,7 +1155,7 @@ declare const zMInvoice: z.ZodObject<{
1155
1155
  textbook?: number | undefined;
1156
1156
  shipping?: number | undefined;
1157
1157
  paid?: PaymentMethod | undefined;
1158
- lastEditBy?: Types.ObjectId | undefined;
1158
+ lastEditBy?: string | Types.ObjectId | undefined;
1159
1159
  createdAt?: Date | undefined;
1160
1160
  updatedAt?: Date | undefined;
1161
1161
  }, {
@@ -1178,7 +1178,7 @@ declare const zMInvoice: z.ZodObject<{
1178
1178
  textbook?: number | undefined;
1179
1179
  shipping?: number | undefined;
1180
1180
  paid?: PaymentMethod | undefined;
1181
- lastEditBy?: Types.ObjectId | undefined;
1181
+ lastEditBy?: string | Types.ObjectId | undefined;
1182
1182
  createdAt?: Date | undefined;
1183
1183
  updatedAt?: Date | undefined;
1184
1184
  }>;
package/index.js CHANGED
@@ -232,12 +232,12 @@ var zInvoice = import_zod7.z.object({
232
232
  billTo: import_zod7.z.string(),
233
233
  packages: import_zod7.z.array(zInvoicePackage),
234
234
  discounts: import_zod7.z.array(zDiscount),
235
- textbook: import_zod7.z.number().int().min(1).optional(),
236
- shipping: import_zod7.z.number().int().min(1).optional(),
235
+ textbook: import_zod7.z.number().int().min(0).optional(),
236
+ shipping: import_zod7.z.number().int().min(0).optional(),
237
237
  paid: import_zod7.z.nativeEnum(PaymentMethod).optional(),
238
238
  notes: import_zod7.z.string().optional(),
239
239
  createdBy: import_zod7.z.instanceof(import_mongoose7.Types.ObjectId).or(import_zod7.z.string()),
240
- lastEditBy: import_zod7.z.instanceof(import_mongoose7.Types.ObjectId).optional()
240
+ lastEditBy: import_zod7.z.instanceof(import_mongoose7.Types.ObjectId).or(import_zod7.z.string()).optional()
241
241
  });
242
242
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
243
243
 
package/index.mjs CHANGED
@@ -146,12 +146,12 @@ var zInvoice = z7.object({
146
146
  billTo: z7.string(),
147
147
  packages: z7.array(zInvoicePackage),
148
148
  discounts: z7.array(zDiscount),
149
- textbook: z7.number().int().min(1).optional(),
150
- shipping: z7.number().int().min(1).optional(),
149
+ textbook: z7.number().int().min(0).optional(),
150
+ shipping: z7.number().int().min(0).optional(),
151
151
  paid: z7.nativeEnum(PaymentMethod).optional(),
152
152
  notes: z7.string().optional(),
153
153
  createdBy: z7.instanceof(Types5.ObjectId).or(z7.string()),
154
- lastEditBy: z7.instanceof(Types5.ObjectId).optional()
154
+ lastEditBy: z7.instanceof(Types5.ObjectId).or(z7.string()).optional()
155
155
  });
156
156
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
157
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",