- ✅ TypeScript configuration with strict mode
- ✅ Build system with tsup (CommonJS + ESM)
- ✅ Testing framework (Vitest) configured
- ✅ Environment variables setup (.env)
- ✅ Changed from API key to username/password authentication
- ✅ Implemented HTTP Basic Auth using Axios
- ✅ Demo credentials configured:
iasp-dev/1Asp-dev
All tests successfully verified against demo API:
- ✅
GET /Nomenclatures/NomenclaturesService.getOffices.json- 819 offices returned - ✅ Filter by country code (BGR) - 625 offices
- ✅
GET /Nomenclatures/NomenclaturesService.getCities.json- 5,492 cities - ✅
GET /Nomenclatures/NomenclaturesService.getCountries.json- 236 countries
Based on actual API responses:
{
id: number;
code: string;
isMPS: boolean;
isAPS: boolean;
name: string;
nameEn: string;
phones: string[];
emails: string[];
address: OfficeAddress;
currency: string;
normalBusinessHoursFrom: number; // Unix timestamp
normalBusinessHoursTo: number;
shipmentTypes: string[];
partnerCode: string;
hubCode: string;
isDrive: boolean;
// ... more fields
}{
id: number;
country: Country;
postCode: string;
name: string;
nameEn: string;
regionName: string | null;
expressCityDeliveries: boolean | null;
servingOffices: ServingOffice[];
// ... more fields
}The following endpoints need testing and type updates:
-
Create Label
- Endpoint:
/Shipments/LabelService.createLabel.json - Need to test request/response structure
- Endpoint:
-
Calculate Shipping
- Endpoint:
/Shipments/ShipmentService.calculateShipping.json - Need to verify pricing structure
- Endpoint:
-
Track Shipment
- Endpoint:
/Shipments/ShipmentService.trackShipment.json - Need to test tracking data structure
- Endpoint:
-
Cancel Shipment
- Endpoint:
/Shipments/ShipmentService.cancelShipment.json - Need to verify cancellation flow
- Endpoint:
-
Create Shipment Tests
# Create test file tests/shipments.test.ts # Test each endpoint with real data npm test
-
Update Shipment Types
- Review actual API responses
- Update
src/types/shipments.ts - Update
src/types/tracking.ts
-
Fix Example Files
examples/create-shipment.ts- Update City type usageexamples/track-shipment.ts- Verify tracking typesexamples/basic-usage.ts- Update auth method
-
Documentation
- Update README with username/password auth
- Add API response examples
- Document all tested endpoints
✅ Offices API: 100% (4/4 tests passing)
⏳ Shipments API: 0% (not yet tested)
⏳ Tracking API: 0% (not yet tested)
# Run all tests
npm test
# Watch mode
npm run test:watch
# With UI
npm run test:uiUsername: iasp-dev
Password: 1Asp-dev
Base URL: https://demo.econt.com/ee/services/
Official documentation: https://demo.econt.com/ee/services/
The API uses:
- Protocol: HTTPS
- Format: JSON (with
.jsonextension) - Method: POST
- Auth: HTTP Basic Authentication
- Content-Type: application/json