@zauru-sdk/types 1.0.6 → 1.0.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.8](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.7...v1.0.8) (2024-03-16)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/types
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.7](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.6...v1.0.7) (2024-03-16)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/types
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.0.6](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.5...v1.0.6) (2024-03-16)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/types
@@ -384,3 +384,229 @@ export type AxiosUtilsResponse<T> = {
384
384
  userMsg?: string;
385
385
  data?: T;
386
386
  };
387
+ export type MonthsType = {
388
+ ene: number;
389
+ feb: number;
390
+ mar: number;
391
+ abr: number;
392
+ may: number;
393
+ jun: number;
394
+ jul: number;
395
+ ago: number;
396
+ sep: number;
397
+ oct: number;
398
+ nov: number;
399
+ dic: number;
400
+ };
401
+ export declare const MONTHS: {
402
+ ene: number;
403
+ feb: number;
404
+ mar: number;
405
+ abr: number;
406
+ may: number;
407
+ jun: number;
408
+ jul: number;
409
+ ago: number;
410
+ sep: number;
411
+ oct: number;
412
+ nov: number;
413
+ dic: number;
414
+ };
415
+ export type POHistoryMassive = {
416
+ id: number;
417
+ finalizada?: boolean;
418
+ originalOtherCharges: number;
419
+ originalDiscount: number;
420
+ };
421
+ export type BitacoraPOMassive = {
422
+ accion: string;
423
+ discount?: number | string;
424
+ other_charges?: number | string;
425
+ payeeCategoryId?: number | string;
426
+ itemId?: number | string;
427
+ fechaDesde?: string;
428
+ fechaHasta?: string;
429
+ purchaseOrders: POHistoryMassive[];
430
+ modificadoPor: string;
431
+ fechaCreacion: string;
432
+ };
433
+ export type ConsolidatedHistory = {
434
+ creadoPor: string;
435
+ fechaCreacion: string;
436
+ grupos: ConsolidateGroup[];
437
+ pdfLink: string;
438
+ };
439
+ export type ConsolidateGroup = {
440
+ purchaseOrderIds: number[];
441
+ payeeId: number;
442
+ finalizado: boolean;
443
+ msgError: string;
444
+ consolidatedId: number;
445
+ payeeName: string;
446
+ };
447
+ export type CostoSemanalSpecialItem = {
448
+ specialItemId: number;
449
+ lunMar: number;
450
+ mieJue: number;
451
+ vieSabDom: number;
452
+ };
453
+ export type PurchaseOrderCosto = {
454
+ id: number;
455
+ finalizado?: boolean;
456
+ msgResultado?: string;
457
+ fecha: string;
458
+ purchase_order_details: {
459
+ id: number;
460
+ item_id: number;
461
+ unit_cost: number;
462
+ }[];
463
+ };
464
+ export type CostoSemanal = {
465
+ item: number;
466
+ lunMar: number;
467
+ mieJue: number;
468
+ vieSabDom: number;
469
+ };
470
+ export type BitacoraCostosItems = {
471
+ costos: CostoSemanal[];
472
+ costosEspeciales: CostoSemanalSpecialItem[];
473
+ costosActualizados: PurchaseOrderCosto[];
474
+ costosEspecialesActualizados: PurchaseOrderCosto[];
475
+ fechas: {
476
+ lunes: string;
477
+ martes: string;
478
+ miercoles: string;
479
+ jueves: string;
480
+ viernes: string;
481
+ sabado: string;
482
+ domingo: string;
483
+ };
484
+ accion: string;
485
+ modificadoPor: string;
486
+ fechaCreacion: string;
487
+ };
488
+ export type DischargeHistory = {
489
+ creadoPor: string;
490
+ fechaCreacion: string;
491
+ grupos: DischargeGroup[];
492
+ pdfLink: string;
493
+ initialIdNumber: string;
494
+ };
495
+ export type DischargeGroup = {
496
+ purchaseOrders: {
497
+ id: number;
498
+ due: string;
499
+ }[];
500
+ discharge_id: number;
501
+ finalizado: boolean;
502
+ msgError: string;
503
+ description: string;
504
+ payee_id: number;
505
+ id_number: string;
506
+ };
507
+ export type TransformedObject = {
508
+ form_submission_values_attributes: {
509
+ [key: string]: {
510
+ form_field_id: string;
511
+ value: string;
512
+ groups_path: string;
513
+ };
514
+ };
515
+ form_id: number;
516
+ document_id: string;
517
+ document_type: string;
518
+ reference: string;
519
+ zid: number;
520
+ id_number?: string;
521
+ };
522
+ export declare const UNIDADES_DE_MEDIDA: {
523
+ label: string;
524
+ value: string;
525
+ stocks_only_integer: boolean;
526
+ }[];
527
+ export type SearchItemParams = {
528
+ start: string;
529
+ length: string;
530
+ search: {
531
+ value: string;
532
+ regex: "false" | "true";
533
+ };
534
+ };
535
+ export type HTMLItemListSchema = {
536
+ zid: string;
537
+ cod: string;
538
+ act: string;
539
+ name: string;
540
+ stck: string;
541
+ sell: string;
542
+ purch: string;
543
+ cat: string;
544
+ cat_note: string;
545
+ vat: string;
546
+ warr: string;
547
+ ra: string;
548
+ DT_RowId: string;
549
+ };
550
+ export type ResponseItemList = {
551
+ draw: number;
552
+ recordsTotal: number;
553
+ recordsFiltered: number;
554
+ data: Array<HTMLItemListSchema>;
555
+ };
556
+ export type ItemDataTable = {
557
+ zid: number;
558
+ itemId: number;
559
+ name: string;
560
+ stck: string | null;
561
+ act: string | null;
562
+ sell: string | null;
563
+ purch: string | null;
564
+ vat: string | null;
565
+ cat: string;
566
+ warr: string;
567
+ cat_note: string;
568
+ DT_RowId: number;
569
+ };
570
+ export type Template = {
571
+ hoja: string;
572
+ nombre: string;
573
+ version: number;
574
+ etiqueta: string;
575
+ creadoPor: string;
576
+ fechaCreacion: string;
577
+ marginTop: number;
578
+ marginLeft: number;
579
+ verticalGap: number;
580
+ horizontalGap: number;
581
+ templateBorder: number;
582
+ pageBorder: number;
583
+ barCodeHeight: number;
584
+ };
585
+ export type HistoryTemplate = Template & {
586
+ id_plantilla: number;
587
+ };
588
+ export type TipoMuestra = {
589
+ creadoPor: string;
590
+ fechaCreacion: string;
591
+ nombre: string;
592
+ agency_id: string;
593
+ description: string;
594
+ };
595
+ export type RejectionWebAppTableObject = {
596
+ webapp_table: {
597
+ [key: string]: string;
598
+ };
599
+ rejection_select: {
600
+ value: string;
601
+ label: string;
602
+ }[];
603
+ rejection_list: string[];
604
+ };
605
+ export type ReceptionType = {
606
+ Codigo: string;
607
+ Nombre: string;
608
+ };
609
+ export type RowDataType = {
610
+ id: any;
611
+ [key: string]: any;
612
+ };
@@ -1 +1,21 @@
1
- export {};
1
+ export const MONTHS = {
2
+ ene: 0,
3
+ feb: 1,
4
+ mar: 2,
5
+ abr: 3,
6
+ may: 4,
7
+ jun: 5,
8
+ jul: 6,
9
+ ago: 7,
10
+ sep: 8,
11
+ oct: 9,
12
+ nov: 10,
13
+ dic: 11,
14
+ };
15
+ export const UNIDADES_DE_MEDIDA = [
16
+ { label: "Frasco", value: "frasco", stocks_only_integer: false },
17
+ { label: "Bolsa", value: "bolsa", stocks_only_integer: false },
18
+ { label: "Paquete", value: "paquete", stocks_only_integer: false },
19
+ { label: "Caja", value: "caja", stocks_only_integer: false },
20
+ { label: "Unidades", value: "unidades", stocks_only_integer: true },
21
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/types",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Estructuras de Zauru, tipado de modelos y modelos personalizados.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,5 +19,5 @@
19
19
  "engines": {
20
20
  "node": ">=18.0.0"
21
21
  },
22
- "gitHead": "d49d7b1cec4ab5685b34983c46d97db129115aaf"
22
+ "gitHead": "60fc0a94174a359d300c7479bcb8278316857ed9"
23
23
  }
@@ -330,6 +330,7 @@ export type CreateNewPurchaseOrderBody = Omit<
330
330
  ExtendedPurchaseOrderBody;
331
331
 
332
332
  export type SelectFieldOption = { value: any; label: string };
333
+
333
334
  export type DataTablesFilterBody = {
334
335
  start: number;
335
336
  length: number;
@@ -446,3 +447,247 @@ export type AxiosUtilsResponse<T> = {
446
447
  userMsg?: string;
447
448
  data?: T;
448
449
  };
450
+
451
+ export type MonthsType = {
452
+ ene: number;
453
+ feb: number;
454
+ mar: number;
455
+ abr: number;
456
+ may: number;
457
+ jun: number;
458
+ jul: number;
459
+ ago: number;
460
+ sep: number;
461
+ oct: number;
462
+ nov: number;
463
+ dic: number;
464
+ };
465
+
466
+ export const MONTHS = {
467
+ ene: 0,
468
+ feb: 1,
469
+ mar: 2,
470
+ abr: 3,
471
+ may: 4,
472
+ jun: 5,
473
+ jul: 6,
474
+ ago: 7,
475
+ sep: 8,
476
+ oct: 9,
477
+ nov: 10,
478
+ dic: 11,
479
+ };
480
+
481
+ export type POHistoryMassive = {
482
+ id: number;
483
+ finalizada?: boolean;
484
+ originalOtherCharges: number;
485
+ originalDiscount: number;
486
+ };
487
+
488
+ export type BitacoraPOMassive = {
489
+ accion: string;
490
+ discount?: number | string;
491
+ other_charges?: number | string;
492
+ payeeCategoryId?: number | string;
493
+ itemId?: number | string;
494
+ fechaDesde?: string;
495
+ fechaHasta?: string;
496
+ purchaseOrders: POHistoryMassive[];
497
+ modificadoPor: string;
498
+ fechaCreacion: string;
499
+ };
500
+
501
+ //Modelo con el cuál responde el backend
502
+ export type ConsolidatedHistory = {
503
+ creadoPor: string;
504
+ fechaCreacion: string;
505
+ grupos: ConsolidateGroup[];
506
+ pdfLink: string;
507
+ };
508
+
509
+ export type ConsolidateGroup = {
510
+ purchaseOrderIds: number[];
511
+ payeeId: number;
512
+ finalizado: boolean;
513
+ msgError: string;
514
+ consolidatedId: number;
515
+ payeeName: string;
516
+ };
517
+
518
+ export type CostoSemanalSpecialItem = {
519
+ specialItemId: number;
520
+ lunMar: number;
521
+ mieJue: number;
522
+ vieSabDom: number;
523
+ };
524
+
525
+ export type PurchaseOrderCosto = {
526
+ id: number;
527
+ finalizado?: boolean;
528
+ msgResultado?: string;
529
+ fecha: string;
530
+ purchase_order_details: {
531
+ id: number;
532
+ item_id: number;
533
+ unit_cost: number;
534
+ }[];
535
+ };
536
+
537
+ export type CostoSemanal = {
538
+ item: number;
539
+ lunMar: number;
540
+ mieJue: number;
541
+ vieSabDom: number;
542
+ };
543
+
544
+ export type BitacoraCostosItems = {
545
+ costos: CostoSemanal[];
546
+ costosEspeciales: CostoSemanalSpecialItem[];
547
+ costosActualizados: PurchaseOrderCosto[];
548
+ costosEspecialesActualizados: PurchaseOrderCosto[];
549
+ fechas: {
550
+ lunes: string;
551
+ martes: string;
552
+ miercoles: string;
553
+ jueves: string;
554
+ viernes: string;
555
+ sabado: string;
556
+ domingo: string;
557
+ };
558
+ accion: string;
559
+ modificadoPor: string;
560
+ fechaCreacion: string;
561
+ };
562
+
563
+ //Modelo con el cuál responde el backend
564
+ export type DischargeHistory = {
565
+ creadoPor: string;
566
+ fechaCreacion: string;
567
+ grupos: DischargeGroup[];
568
+ pdfLink: string;
569
+ initialIdNumber: string;
570
+ };
571
+
572
+ export type DischargeGroup = {
573
+ purchaseOrders: { id: number; due: string }[];
574
+ discharge_id: number;
575
+ finalizado: boolean;
576
+ msgError: string;
577
+ description: string;
578
+ payee_id: number;
579
+ id_number: string;
580
+ };
581
+
582
+ export type TransformedObject = {
583
+ form_submission_values_attributes: {
584
+ [key: string]: {
585
+ form_field_id: string;
586
+ value: string;
587
+ groups_path: string;
588
+ };
589
+ };
590
+ form_id: number;
591
+ document_id: string;
592
+ document_type: string;
593
+ reference: string;
594
+ zid: number;
595
+ id_number?: string;
596
+ };
597
+
598
+ export const UNIDADES_DE_MEDIDA = [
599
+ { label: "Frasco", value: "frasco", stocks_only_integer: false },
600
+ { label: "Bolsa", value: "bolsa", stocks_only_integer: false },
601
+ { label: "Paquete", value: "paquete", stocks_only_integer: false },
602
+ { label: "Caja", value: "caja", stocks_only_integer: false },
603
+ { label: "Unidades", value: "unidades", stocks_only_integer: true },
604
+ ];
605
+
606
+ export type SearchItemParams = {
607
+ start: string;
608
+ length: string;
609
+ search: { value: string; regex: "false" | "true" };
610
+ };
611
+
612
+ export type HTMLItemListSchema = {
613
+ zid: string;
614
+ cod: string;
615
+ act: string;
616
+ name: string;
617
+ stck: string;
618
+ sell: string;
619
+ purch: string;
620
+ cat: string;
621
+ cat_note: string;
622
+ vat: string;
623
+ warr: string;
624
+ ra: string;
625
+ DT_RowId: string;
626
+ };
627
+
628
+ export type ResponseItemList = {
629
+ draw: number;
630
+ recordsTotal: number;
631
+ recordsFiltered: number;
632
+ data: Array<HTMLItemListSchema>;
633
+ };
634
+
635
+ export type ItemDataTable = {
636
+ zid: number;
637
+ itemId: number;
638
+ name: string;
639
+ stck: string | null;
640
+ act: string | null;
641
+ sell: string | null;
642
+ purch: string | null;
643
+ vat: string | null;
644
+ cat: string;
645
+ warr: string;
646
+ cat_note: string;
647
+ DT_RowId: number;
648
+ };
649
+
650
+ //Modelo con el cuál responde el backend
651
+ export type Template = {
652
+ hoja: string;
653
+ nombre: string;
654
+ version: number;
655
+ etiqueta: string;
656
+ creadoPor: string;
657
+ fechaCreacion: string;
658
+ marginTop: number;
659
+ marginLeft: number;
660
+ verticalGap: number;
661
+ horizontalGap: number;
662
+ templateBorder: number;
663
+ pageBorder: number;
664
+ barCodeHeight: number;
665
+ };
666
+
667
+ export type HistoryTemplate = Template & {
668
+ id_plantilla: number;
669
+ };
670
+
671
+ //Modelo con el cuál responde el backend
672
+ export type TipoMuestra = {
673
+ creadoPor: string;
674
+ fechaCreacion: string;
675
+ nombre: string;
676
+ agency_id: string;
677
+ description: string;
678
+ };
679
+
680
+ export type RejectionWebAppTableObject = {
681
+ webapp_table: {
682
+ [key: string]: string;
683
+ };
684
+ rejection_select: { value: string; label: string }[];
685
+ rejection_list: string[];
686
+ };
687
+
688
+ export type ReceptionType = { Codigo: string; Nombre: string };
689
+
690
+ export type RowDataType = {
691
+ id: any;
692
+ [key: string]: any;
693
+ };