Skip to content

Added lading support#5

Open
Anidem1995 wants to merge 2 commits intomainfrom
feat/AddLadingSupport
Open

Added lading support#5
Anidem1995 wants to merge 2 commits intomainfrom
feat/AddLadingSupport

Conversation

@Anidem1995
Copy link
Copy Markdown

@Anidem1995 Anidem1995 commented Mar 21, 2026

Summary by CodeRabbit

  • New Features

    • Added complete lading (shipping manifest) support with 19 newly exported types enabling comprehensive transport documentation. Supports multiple transport modes including automotive, maritime, air, and rail. Includes customs documentation, merchandise tracking, location information, and transport figures.
  • Chores

    • Released version 4.0.372.

@Anidem1995 Anidem1995 requested a review from mendozagit March 21, 2026 23:22
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • examples/ejemplos-carta-porte-referencias.ts
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d19a3fc2-448a-4e67-ab84-8b6f9dbd8567

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb0028 and 1f43499.

📒 Files selected for processing (1)
  • examples/ejemplos-carta-porte-referencias.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates the package version to 4.0.372 and expands the invoice/lading model by adding 19 new TypeScript interfaces to implement the LadingComplement type, replacing a placeholder with complete schemas for customs regimes, locations, merchandise, and multimodal transport structures.

Changes

Cohort / File(s) Summary
Package Configuration
package.json
Updated version from 4.0.360 to 4.0.372.
Export Declarations
src/index.ts
Added 19 new type exports from ./models/invoice: LadingCustomsRegime, LadingDomicilio, LadingLocation, LadingMerchandiseDetail, LadingCustomsDocument, LadingQuantityTransported, LadingMerchandise, LadingTrailer, LadingAutoTransport, LadingSeaTrailerCCP, LadingSeaContainer, LadingSeaTransport, LadingAirTransport, LadingRailContainer, LadingRailcar, LadingRailRightOfWay, LadingRailTransport, LadingTransportPart, and LadingFigure.
Model Implementation
src/models/invoice.ts
Implemented 19 new interfaces modeling Carta Porte structures (customs, domiciles, locations, merchandise, and multimodal transport). Replaced LadingComplement placeholder with complete schema including required fields (transpInternacId, totalDistRec, pesoNetoTotal, unidadPesoId, ubicaciones, mercancias) and optional transport-specific sections.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A warren of types, now declared with care,
Lading and commerce, transported with flair,
From customs regimes to containers at sea,
These interfaces bloom—what structured decree!
The complement's placeholder hops off to the past, 🚛✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Added lading support' accurately summarizes the main changes in the pull request, which involve implementing comprehensive lading (Carta Porte) support with 19 new types and complete interface definitions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/AddLadingSupport

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

Copy link
Copy Markdown
Contributor

@mendozagit mendozagit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encontre muchas discrepancias entre los modelos del SDK y el contrato público de la API. Por favor utiliza como referencia la API publica (CartaPorteComplementRequest.cs en el backend) y sus clases anidadas para validar campo por campo o directamente reescribir los modelos equivalentes. Los problemas principales son: propiedades que la API expone pero el SDK no tiene (~20 en mercancias, 5 de seguros en autotransporte, guias de identificacion completas), campos marcados como opcionales en el SDK cuando la API los exige como obligatorios (8 en transporte maritimo, 4 en aereo, 3 en ferroviario, entre otros), campos marcados como obligatorios en el SDK cuando la API los tiene como opcionales (totalDistRec, pesoNetoTotal), y 5 campos en el SDK que no existen en la API (configMaritimaId, numCertITC, nombreEmbarCargador, nombreAgente en maritimo y rfcTransportista en aereo). Ademas los nombres de los campos del SDK no coinciden con los nombres que usa el backend. Esto agrega una carga cognitiva alta cuando se realiza trazabilidad entre el SDK y la API publica, o cuando toca debuggear por que un campo no llega como se esperaba. Te sugiero que uses los mismos nombres de propiedades que tiene CartaPorteComplementRequest.cs y sus clases relacionadas, manteniendo tipos de datos equivalentes y la misma obligatoriedad.

Otro comentario es que Falta interface LadingGuiaIdentificacion, no lo agregue en el código porque no existe tal código.

La API expone guiasIdentificacion como lista en Mercancia con 3 campos: numeroGuiaIdentificacion, descripGuiaIdentificacion, pesoGuiaIdentificacion. Crea la interface LadingGuiaIdentificacion con esos
campos, agrega la propiedad guiasIdentificacion en LadingMerchandise y exportala en index.ts.

Revise superficialmente el de Java y veo los mismos issues. Por favor haz ajustes en todo y avísame cuando esté listo para Code review por favor.

/**
* Mercancía en carta porte
*/
export interface LadingMerchandise {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faltan propiedades en LadingMerchandise que la API sí expone. Revisa este contrato en la API: CartaPorteMercanciaRequest

Las siguientes propiedades existen en el backend pero no en el SDK:

  • claveSTCCId
  • unidad
  • dimensiones
  • cveMaterialPeligrosoId
  • embalajeId
  • descripEmbalaje
  • sectorCOFEPRISId
  • nombreIngredienteActivo
  • nomQuimico
  • permisoImportacion
  • folioImpoVUCEM
  • numCAS
  • razonSocialEmpImp
  • numRegSanPlagCOFEPRIS
  • datosFabricante
  • datosFormulador
  • datosMaquilador
  • usoAutorizado
  • uuidComercioExt

Agregar todas estas propiedades opcionales a LadingMerchandise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants