@fesmex/models 0.1.40 → 0.1.46

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/dist/index.d.ts CHANGED
@@ -132,6 +132,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
132
132
  updated_at?: NativeDate;
133
133
  model?: string;
134
134
  brand?: string;
135
+ files?: {
136
+ images?: Types.DocumentArray<{
137
+ key: string;
138
+ url: string;
139
+ filename: string;
140
+ mime_type: string;
141
+ size: number;
142
+ uploaded_at: NativeDate;
143
+ uploaded_by: string;
144
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
145
+ key: string;
146
+ url: string;
147
+ filename: string;
148
+ mime_type: string;
149
+ size: number;
150
+ uploaded_at: NativeDate;
151
+ uploaded_by: string;
152
+ }> & {
153
+ key: string;
154
+ url: string;
155
+ filename: string;
156
+ mime_type: string;
157
+ size: number;
158
+ uploaded_at: NativeDate;
159
+ uploaded_by: string;
160
+ }>;
161
+ datasheets?: Types.DocumentArray<{
162
+ key: string;
163
+ url: string;
164
+ filename: string;
165
+ mime_type: string;
166
+ size: number;
167
+ uploaded_at: NativeDate;
168
+ uploaded_by: string;
169
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
170
+ key: string;
171
+ url: string;
172
+ filename: string;
173
+ mime_type: string;
174
+ size: number;
175
+ uploaded_at: NativeDate;
176
+ uploaded_by: string;
177
+ }> & {
178
+ key: string;
179
+ url: string;
180
+ filename: string;
181
+ mime_type: string;
182
+ size: number;
183
+ uploaded_at: NativeDate;
184
+ uploaded_by: string;
185
+ }>;
186
+ };
135
187
  }, {}, {}, {
136
188
  id: string;
137
189
  }, mongoose.Document<unknown, {}, {
@@ -144,6 +196,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
144
196
  updated_at?: NativeDate;
145
197
  model?: string;
146
198
  brand?: string;
199
+ files?: {
200
+ images?: Types.DocumentArray<{
201
+ key: string;
202
+ url: string;
203
+ filename: string;
204
+ mime_type: string;
205
+ size: number;
206
+ uploaded_at: NativeDate;
207
+ uploaded_by: string;
208
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
209
+ key: string;
210
+ url: string;
211
+ filename: string;
212
+ mime_type: string;
213
+ size: number;
214
+ uploaded_at: NativeDate;
215
+ uploaded_by: string;
216
+ }> & {
217
+ key: string;
218
+ url: string;
219
+ filename: string;
220
+ mime_type: string;
221
+ size: number;
222
+ uploaded_at: NativeDate;
223
+ uploaded_by: string;
224
+ }>;
225
+ datasheets?: Types.DocumentArray<{
226
+ key: string;
227
+ url: string;
228
+ filename: string;
229
+ mime_type: string;
230
+ size: number;
231
+ uploaded_at: NativeDate;
232
+ uploaded_by: string;
233
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
234
+ key: string;
235
+ url: string;
236
+ filename: string;
237
+ mime_type: string;
238
+ size: number;
239
+ uploaded_at: NativeDate;
240
+ uploaded_by: string;
241
+ }> & {
242
+ key: string;
243
+ url: string;
244
+ filename: string;
245
+ mime_type: string;
246
+ size: number;
247
+ uploaded_at: NativeDate;
248
+ uploaded_by: string;
249
+ }>;
250
+ };
147
251
  }, {
148
252
  id: string;
149
253
  }, mongoose.DefaultSchemaOptions> & Omit<{
@@ -156,6 +260,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
156
260
  updated_at?: NativeDate;
157
261
  model?: string;
158
262
  brand?: string;
263
+ files?: {
264
+ images?: Types.DocumentArray<{
265
+ key: string;
266
+ url: string;
267
+ filename: string;
268
+ mime_type: string;
269
+ size: number;
270
+ uploaded_at: NativeDate;
271
+ uploaded_by: string;
272
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
273
+ key: string;
274
+ url: string;
275
+ filename: string;
276
+ mime_type: string;
277
+ size: number;
278
+ uploaded_at: NativeDate;
279
+ uploaded_by: string;
280
+ }> & {
281
+ key: string;
282
+ url: string;
283
+ filename: string;
284
+ mime_type: string;
285
+ size: number;
286
+ uploaded_at: NativeDate;
287
+ uploaded_by: string;
288
+ }>;
289
+ datasheets?: Types.DocumentArray<{
290
+ key: string;
291
+ url: string;
292
+ filename: string;
293
+ mime_type: string;
294
+ size: number;
295
+ uploaded_at: NativeDate;
296
+ uploaded_by: string;
297
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
298
+ key: string;
299
+ url: string;
300
+ filename: string;
301
+ mime_type: string;
302
+ size: number;
303
+ uploaded_at: NativeDate;
304
+ uploaded_by: string;
305
+ }> & {
306
+ key: string;
307
+ url: string;
308
+ filename: string;
309
+ mime_type: string;
310
+ size: number;
311
+ uploaded_at: NativeDate;
312
+ uploaded_by: string;
313
+ }>;
314
+ };
159
315
  } & {
160
316
  _id: Types.ObjectId;
161
317
  } & {
@@ -172,6 +328,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
172
328
  updated_at?: NativeDate;
173
329
  model?: string;
174
330
  brand?: string;
331
+ files?: {
332
+ images?: Types.DocumentArray<{
333
+ key: string;
334
+ url: string;
335
+ filename: string;
336
+ mime_type: string;
337
+ size: number;
338
+ uploaded_at: NativeDate;
339
+ uploaded_by: string;
340
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
341
+ key: string;
342
+ url: string;
343
+ filename: string;
344
+ mime_type: string;
345
+ size: number;
346
+ uploaded_at: NativeDate;
347
+ uploaded_by: string;
348
+ }> & {
349
+ key: string;
350
+ url: string;
351
+ filename: string;
352
+ mime_type: string;
353
+ size: number;
354
+ uploaded_at: NativeDate;
355
+ uploaded_by: string;
356
+ }>;
357
+ datasheets?: Types.DocumentArray<{
358
+ key: string;
359
+ url: string;
360
+ filename: string;
361
+ mime_type: string;
362
+ size: number;
363
+ uploaded_at: NativeDate;
364
+ uploaded_by: string;
365
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
366
+ key: string;
367
+ url: string;
368
+ filename: string;
369
+ mime_type: string;
370
+ size: number;
371
+ uploaded_at: NativeDate;
372
+ uploaded_by: string;
373
+ }> & {
374
+ key: string;
375
+ url: string;
376
+ filename: string;
377
+ mime_type: string;
378
+ size: number;
379
+ uploaded_at: NativeDate;
380
+ uploaded_by: string;
381
+ }>;
382
+ };
175
383
  }, mongoose.Document<unknown, {}, {
176
384
  created_at: NativeDate;
177
385
  description: string;
@@ -182,6 +390,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
182
390
  updated_at?: NativeDate;
183
391
  model?: string;
184
392
  brand?: string;
393
+ files?: {
394
+ images?: Types.DocumentArray<{
395
+ key: string;
396
+ url: string;
397
+ filename: string;
398
+ mime_type: string;
399
+ size: number;
400
+ uploaded_at: NativeDate;
401
+ uploaded_by: string;
402
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
403
+ key: string;
404
+ url: string;
405
+ filename: string;
406
+ mime_type: string;
407
+ size: number;
408
+ uploaded_at: NativeDate;
409
+ uploaded_by: string;
410
+ }> & {
411
+ key: string;
412
+ url: string;
413
+ filename: string;
414
+ mime_type: string;
415
+ size: number;
416
+ uploaded_at: NativeDate;
417
+ uploaded_by: string;
418
+ }>;
419
+ datasheets?: Types.DocumentArray<{
420
+ key: string;
421
+ url: string;
422
+ filename: string;
423
+ mime_type: string;
424
+ size: number;
425
+ uploaded_at: NativeDate;
426
+ uploaded_by: string;
427
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
428
+ key: string;
429
+ url: string;
430
+ filename: string;
431
+ mime_type: string;
432
+ size: number;
433
+ uploaded_at: NativeDate;
434
+ uploaded_by: string;
435
+ }> & {
436
+ key: string;
437
+ url: string;
438
+ filename: string;
439
+ mime_type: string;
440
+ size: number;
441
+ uploaded_at: NativeDate;
442
+ uploaded_by: string;
443
+ }>;
444
+ };
185
445
  }, {
186
446
  id: string;
187
447
  }, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
@@ -194,6 +454,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
194
454
  updated_at?: NativeDate;
195
455
  model?: string;
196
456
  brand?: string;
457
+ files?: {
458
+ images?: Types.DocumentArray<{
459
+ key: string;
460
+ url: string;
461
+ filename: string;
462
+ mime_type: string;
463
+ size: number;
464
+ uploaded_at: NativeDate;
465
+ uploaded_by: string;
466
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
467
+ key: string;
468
+ url: string;
469
+ filename: string;
470
+ mime_type: string;
471
+ size: number;
472
+ uploaded_at: NativeDate;
473
+ uploaded_by: string;
474
+ }> & {
475
+ key: string;
476
+ url: string;
477
+ filename: string;
478
+ mime_type: string;
479
+ size: number;
480
+ uploaded_at: NativeDate;
481
+ uploaded_by: string;
482
+ }>;
483
+ datasheets?: Types.DocumentArray<{
484
+ key: string;
485
+ url: string;
486
+ filename: string;
487
+ mime_type: string;
488
+ size: number;
489
+ uploaded_at: NativeDate;
490
+ uploaded_by: string;
491
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
492
+ key: string;
493
+ url: string;
494
+ filename: string;
495
+ mime_type: string;
496
+ size: number;
497
+ uploaded_at: NativeDate;
498
+ uploaded_by: string;
499
+ }> & {
500
+ key: string;
501
+ url: string;
502
+ filename: string;
503
+ mime_type: string;
504
+ size: number;
505
+ uploaded_at: NativeDate;
506
+ uploaded_by: string;
507
+ }>;
508
+ };
197
509
  } & {
198
510
  _id: Types.ObjectId;
199
511
  } & {
@@ -213,6 +525,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
213
525
  updated_at?: NativeDate;
214
526
  model?: string;
215
527
  brand?: string;
528
+ files?: {
529
+ images?: Types.DocumentArray<{
530
+ key: string;
531
+ url: string;
532
+ filename: string;
533
+ mime_type: string;
534
+ size: number;
535
+ uploaded_at: NativeDate;
536
+ uploaded_by: string;
537
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
538
+ key: string;
539
+ url: string;
540
+ filename: string;
541
+ mime_type: string;
542
+ size: number;
543
+ uploaded_at: NativeDate;
544
+ uploaded_by: string;
545
+ }> & {
546
+ key: string;
547
+ url: string;
548
+ filename: string;
549
+ mime_type: string;
550
+ size: number;
551
+ uploaded_at: NativeDate;
552
+ uploaded_by: string;
553
+ }>;
554
+ datasheets?: Types.DocumentArray<{
555
+ key: string;
556
+ url: string;
557
+ filename: string;
558
+ mime_type: string;
559
+ size: number;
560
+ uploaded_at: NativeDate;
561
+ uploaded_by: string;
562
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
563
+ key: string;
564
+ url: string;
565
+ filename: string;
566
+ mime_type: string;
567
+ size: number;
568
+ uploaded_at: NativeDate;
569
+ uploaded_by: string;
570
+ }> & {
571
+ key: string;
572
+ url: string;
573
+ filename: string;
574
+ mime_type: string;
575
+ size: number;
576
+ uploaded_at: NativeDate;
577
+ uploaded_by: string;
578
+ }>;
579
+ };
216
580
  }, {
217
581
  id: string;
218
582
  }, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
@@ -225,6 +589,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
225
589
  updated_at?: NativeDate;
226
590
  model?: string;
227
591
  brand?: string;
592
+ files?: {
593
+ images?: Types.DocumentArray<{
594
+ key: string;
595
+ url: string;
596
+ filename: string;
597
+ mime_type: string;
598
+ size: number;
599
+ uploaded_at: NativeDate;
600
+ uploaded_by: string;
601
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
602
+ key: string;
603
+ url: string;
604
+ filename: string;
605
+ mime_type: string;
606
+ size: number;
607
+ uploaded_at: NativeDate;
608
+ uploaded_by: string;
609
+ }> & {
610
+ key: string;
611
+ url: string;
612
+ filename: string;
613
+ mime_type: string;
614
+ size: number;
615
+ uploaded_at: NativeDate;
616
+ uploaded_by: string;
617
+ }>;
618
+ datasheets?: Types.DocumentArray<{
619
+ key: string;
620
+ url: string;
621
+ filename: string;
622
+ mime_type: string;
623
+ size: number;
624
+ uploaded_at: NativeDate;
625
+ uploaded_by: string;
626
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
627
+ key: string;
628
+ url: string;
629
+ filename: string;
630
+ mime_type: string;
631
+ size: number;
632
+ uploaded_at: NativeDate;
633
+ uploaded_by: string;
634
+ }> & {
635
+ key: string;
636
+ url: string;
637
+ filename: string;
638
+ mime_type: string;
639
+ size: number;
640
+ uploaded_at: NativeDate;
641
+ uploaded_by: string;
642
+ }>;
643
+ };
228
644
  } & {
229
645
  _id: Types.ObjectId;
230
646
  } & {
@@ -242,6 +658,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
242
658
  updated_at?: NativeDate;
243
659
  model?: string;
244
660
  brand?: string;
661
+ files?: {
662
+ images?: Types.DocumentArray<{
663
+ key: string;
664
+ url: string;
665
+ filename: string;
666
+ mime_type: string;
667
+ size: number;
668
+ uploaded_at: NativeDate;
669
+ uploaded_by: string;
670
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
671
+ key: string;
672
+ url: string;
673
+ filename: string;
674
+ mime_type: string;
675
+ size: number;
676
+ uploaded_at: NativeDate;
677
+ uploaded_by: string;
678
+ }> & {
679
+ key: string;
680
+ url: string;
681
+ filename: string;
682
+ mime_type: string;
683
+ size: number;
684
+ uploaded_at: NativeDate;
685
+ uploaded_by: string;
686
+ }>;
687
+ datasheets?: Types.DocumentArray<{
688
+ key: string;
689
+ url: string;
690
+ filename: string;
691
+ mime_type: string;
692
+ size: number;
693
+ uploaded_at: NativeDate;
694
+ uploaded_by: string;
695
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
696
+ key: string;
697
+ url: string;
698
+ filename: string;
699
+ mime_type: string;
700
+ size: number;
701
+ uploaded_at: NativeDate;
702
+ uploaded_by: string;
703
+ }> & {
704
+ key: string;
705
+ url: string;
706
+ filename: string;
707
+ mime_type: string;
708
+ size: number;
709
+ uploaded_at: NativeDate;
710
+ uploaded_by: string;
711
+ }>;
712
+ };
245
713
  } & {
246
714
  _id: Types.ObjectId;
247
715
  } & {
@@ -256,6 +724,58 @@ declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any, any> | mongo
256
724
  updated_at?: NativeDate;
257
725
  model?: string;
258
726
  brand?: string;
727
+ files?: {
728
+ images?: Types.DocumentArray<{
729
+ key: string;
730
+ url: string;
731
+ filename: string;
732
+ mime_type: string;
733
+ size: number;
734
+ uploaded_at: NativeDate;
735
+ uploaded_by: string;
736
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
737
+ key: string;
738
+ url: string;
739
+ filename: string;
740
+ mime_type: string;
741
+ size: number;
742
+ uploaded_at: NativeDate;
743
+ uploaded_by: string;
744
+ }> & {
745
+ key: string;
746
+ url: string;
747
+ filename: string;
748
+ mime_type: string;
749
+ size: number;
750
+ uploaded_at: NativeDate;
751
+ uploaded_by: string;
752
+ }>;
753
+ datasheets?: Types.DocumentArray<{
754
+ key: string;
755
+ url: string;
756
+ filename: string;
757
+ mime_type: string;
758
+ size: number;
759
+ uploaded_at: NativeDate;
760
+ uploaded_by: string;
761
+ }, Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
762
+ key: string;
763
+ url: string;
764
+ filename: string;
765
+ mime_type: string;
766
+ size: number;
767
+ uploaded_at: NativeDate;
768
+ uploaded_by: string;
769
+ }> & {
770
+ key: string;
771
+ url: string;
772
+ filename: string;
773
+ mime_type: string;
774
+ size: number;
775
+ uploaded_at: NativeDate;
776
+ uploaded_by: string;
777
+ }>;
778
+ };
259
779
  } & {
260
780
  _id: Types.ObjectId;
261
781
  } & {
package/dist/index.js CHANGED
@@ -151,6 +151,18 @@ var ClientsSalesEmployee_default = mongoose7.models.ClientSalesEmployee || model
151
151
 
152
152
  // src/inventory/models/Article.ts
153
153
  import mongoose8, { Schema as Schema8, model as model8, Types as Types7 } from "mongoose";
154
+ var articleFileSchema = new Schema8(
155
+ {
156
+ key: { type: String, required: true },
157
+ url: { type: String, required: true },
158
+ filename: { type: String, required: true },
159
+ mime_type: { type: String, required: true },
160
+ size: { type: Number, required: true },
161
+ uploaded_at: { type: Date, default: Date.now },
162
+ uploaded_by: { type: String, required: true }
163
+ },
164
+ { _id: false }
165
+ );
154
166
  var articleSchema = new Schema8({
155
167
  article_number: { type: String, required: true, unique: true },
156
168
  // SAP ItemCode
@@ -159,6 +171,10 @@ var articleSchema = new Schema8({
159
171
  brand: { type: String },
160
172
  model: { type: String },
161
173
  group_id: { type: Types7.ObjectId, ref: "ArticleGroup", required: true },
174
+ files: {
175
+ images: { type: [articleFileSchema], required: false },
176
+ datasheets: { type: [articleFileSchema], required: false }
177
+ },
162
178
  created_at: { type: Date, default: Date.now },
163
179
  updated_at: { type: Date },
164
180
  deleted_at: { type: Date }
@@ -502,7 +518,7 @@ var orderSchema = new Schema23(
502
518
  expires_at: { type: Date },
503
519
  shipping_address: { type: shippingAddressSchema, required: true },
504
520
  subtotal: { type: Number, required: true, min: 0 },
505
- shipping_fee: { type: Number, required: true, min: 0, default: 0 },
521
+ shipping_fee: { type: Number, min: 0, default: null },
506
522
  total: { type: Number, required: true, min: 0 },
507
523
  notes: { type: String, trim: true }
508
524
  },