@ediflow/edifact-d20b
v0.2.1
Published
EDIFACT D.20B (2020) Standard Definitions - Latest Standard - 7 Message Types
Maintainers
Readme
@ediflow/edifact-d20b
EDIFACT D.20B (2020) Standard Definitions
EDIFACT D.20B • 7 Message Types • MIT Licensed • Free
📦 What is this?
This package contains EDIFACT D.20B (2020) standard definitions for use with @ediflow/core.
Includes:
- Message structures (7 message types)
- Segment definitions
- Element definitions
- Composite definitions
- Code lists
Version: D.20B (2020) - Latest EDIFACT standard ⭐
🚀 Installation
# Install core library (required)
npm install @ediflow/core
# Install this standard package
npm install @ediflow/edifact-d20b📊 Supported Message Types (7)
| Message Type | Description | Use Case | |--------------|-------------|----------| | APERAK | Application Error & Acknowledgement | Error handling | | DESADV | Despatch Advice | Shipping notifications | | IFTMIN | Forwarding & Transport Message | Transport instructions | | INVOIC | Invoice | Billing documents | | ORDERS | Purchase Order | Order placement | | ORDRSP | Order Response | Order confirmations | | RECADV | Receiving Advice | Goods receipt |
📖 Usage Example
import { DIContainer } from '@ediflow/core';
const container = DIContainer.getInstance();
const parseUseCase = container.resolve('ParseEDIUseCase');
const validateUseCase = container.resolve('ValidateMessageUseCase');
// Parse EDIFACT message
const parsed = parseUseCase.execute({
message: edifactString,
standard: 'EDIFACT'
});
// Validate against D.20B structure
const validation = validateUseCase.execute({
message: parsed.message,
messageType: 'ORDERS',
version: 'D20B',
repositoryPath: './node_modules/@ediflow/edifact-d20b/data'
});
if (validation.success) {
console.log('✅ Valid D.20B ORDERS message!');
}📁 Package Contents
@ediflow/edifact-d20b/
└── data/
├── codes/ # Code lists
├── composites.json # Composite elements
├── elements.json # Data elements
├── messages/ # Message structures (7 types)
│ ├── APERAK.json
│ ├── DESADV.json
│ ├── IFTMIN.json
│ ├── INVOIC.json
│ ├── ORDERS.json
│ ├── ORDRSP.json
│ └── RECADV.json
└── segments.json # Segment definitionsPackage Size: ~1.34 MB
🎯 When to Use D.20B
Use D.20B if:
- ✅ Starting new EDIFACT integration (recommended!)
- ✅ Need latest standard features
- ✅ Modern logistics & retail
- ✅ No legacy system constraints
This is the recommended version for new projects! ⭐
Consider other versions if:
- 🔄 D.12A - Need more message types (196 total)
- 🔄 D.96A or D.01B - Legacy partner requirements
📦 Related Packages
Core:
@ediflow/core- Core library (REQUIRED)
Other EDIFACT Standards:
@ediflow/edifact-d96a- D.96A (1996) - 7 messages@ediflow/edifact-d01b- D.01B (2001) - 4 messages@ediflow/edifact-d12a- D.12A (2012) - 196 messages
📚 Documentation
🤝 Contributing
Data corrections or additional message types? We welcome contributions!
📄 License
MIT License - see LICENSE
🔗 Links
- GitHub: ediflow-lib/core
- NPM: @ediflow/edifact-d20b
- Core Package: @ediflow/core
Made with ❤️ for the EDI community
