- #251
0ab9490Thanks @kouak! - chore: update dependencies- axios: 1.13.2 -> 1.13.4
- remeda: 2.32.0 -> 2.33.4
- soap: 1.6.1 -> 1.6.4
- tar: 7.5.6 -> 7.5.7
- type-fest: 5.3.1 -> 5.4.2
-
#231
a0d26bdThanks @kouak! - Corrected typos and type errors across multiple domain definitions to strictly align with Eurocontrol NM B2B v27.0.0 Business Documentation and XSD schemas.Modified types:
- AlternativeRouteInfo
- AUPSummary
- CapacityPlanRetrievalRequest
- CapacityPlans
- CompleteAIXMDatasetRequest
- Flight
- FlightField
- FlightListByAirspaceRequest
- FlightRetrievalReplyData
- HotspotPlans
- IRegulationOrMCDMOnly
- OTMVPlanRetrievalRequest
- OTMVPlans
- Regulation
- ReroutingOpportunities
- SignedDistanceNM
- SignedDurationHourMinute
-
#235
340091bThanks @kouak! - - Refactor configuration validation using assertion functions.- Rename
getEndpointtogetSoapEndpoint. - Deprecate
isConfigValid,isValidSecurity, andgetEndpoint. - Enforce strict
xsdEndpointrequirement when using custom endpoints. - Add TSDoc to public API.
- Rename
-
#240
2109151Thanks @kouak! - Added internal testing utilities for fixture-based SOAP testing.Fixtures capture real SOAP interactions and store them as reproducible test artifacts (XML requests/responses with context variables). These artifacts enable deterministic unit testing without requiring a live B2B connection.
-
#229
72bc9e2Thanks @kouak! - Implement isolated WSDL caching for customxsdEndpointconfigurations.- Feature: When
xsdEndpointis configured, WSDL files are now stored in a unique cache directory derived from the endpoint URL. This prevents cache corruption when switching between different sources (e.g. official NM B2B vs internal proxy). - Migration: The default cache directory (used when no
xsdEndpointis provided) has been renamed from{version}to{version}-network-managerto ensure isolation from legacy caches. This will trigger a one-time automatic re-download of WSDL files.
- Feature: When
-
#228
d4ebb33Thanks @kouak! - Ensure valid http response headers for WSDL download -
#226
5b18de0Thanks @kouak! - Improved error handling for SOAP queries: unexpected errors thrown during SOAP query execution are now wrapped in a standardErrorobject. This new error includes a descriptive message identifying the failing service and query (e.g.,[Query service.query] Error thrown during query execution...) and preserves the original error as thecause.
- #222
10b5b56Thanks @kouak! - Fix typescript types to allow passing node-soap options to NM B2B query functions
-
#210
4f898e5Thanks @kouak! - Rework B2B input types to acceptRequestparameters (endUserId,onBehalfOfUnit) -
#207
39d7fe5Thanks @kouak! - Implement query hooks.Hooks are user provided callbacks which will be executed during the SOAP query process.
Basic example :
const client = await createB2BClient({ // ... other options, hooks: [ function onRequestStart({ service, query, input }) { console.log( `Query ${query} of service ${service} was invoked with input`, input, ); }, ], });
A hook can return an optional object containing success / error hooks :
const client = await createB2BClient({ // ... other options, hooks: [ function onRequestStart({ service, query, input }) { const startTime = new Date(); console.log( `Query ${query} of service ${service} was invoked with input:`, input, ); return { onRequestSuccess: ({ response }) => { const durationMs = new Date().valueOf() - startTime; console.log(`Query took ${durationMs}ms`); console.log(`Query responded with`, response); }, onRequestError: ({ error }) => { const durationMs = new Date().valueOf() - startTime; console.log(`Query took ${durationMs}ms`); console.log(`Query failed with error ${error.message}`); }, }; }, ], });
Hooks can also be async :
const client = await createB2BClient({ // ... other options, hooks: [ async function onRequestStart({ service, query, input }) { await sendLog(`Query ${query} of service ${service} was invoked`); }, ], });
To get proper typescript support when creating custom hooks, a
createHook()function helper is now exported :import { createHook } from '@dgac/nmb2b-client'; const withPrometheusMetrics = createHook(({ service, query }) => { prometheusCounter.inc({ service, query, status: 'started' }); return { onRequestSuccess: () => prometheusCounter.inc({ service, query, status: 'completed' }), onRequestError: () => prometheusCounter.inc({ service, query, status: 'completed' }), }; }); // ... in another file const b2bClient = await createB2BClient({ // ... other options hooks: [withPrometheusMetrics], });
-
#212
39f162fThanks @kouak! - Document createClient() options and Config properties. -
#211
f3ead5aThanks @kouak! - Refactor internals with a declarative API which makes it easier to implement new Request/Reply queries -
#208
6b8cd4cThanks @kouak! - Fix incorrect optionnal arguments on some B2B queries
- #194
98b4031Thanks @kouak! - - Renamemake*Clienttocreate*Client- Change export paths:
@dgac/nmb2b-clientexports B2B client builders@dgac/nmb2b-client/configexports utilities to check the B2B client builder configuration@dgac/nmb2b-client/securityexports utilities to create thesecurityobject required by a B2B client builder@dgac/nmb2b-client/typesexports typescript types representing the XSD types defined in the B2B XSD
- Drop node v18 support, test against node 24
- Publish as ESM only package (with correct
module-syncresolution for usage in commonjs context) - Migrate build to
tsdown
- Change export paths:
- #163
28b3764Thanks @kouak! - Removed extraneous exports for oldPublishSubscribeAPI frompackage.json. Fix invalid export forutilsin CommonJS environment. Fixpackage.json#repositoryproperty.
-
#172
d59b4c9Thanks @kouak! - Update micromatch v4.0.8 to fix CVE -
#170
dab435cThanks @kouak! - eslint v9.15.0, typescript 5.6.3 -
#171
112eebdThanks @kouak! - Vitest v2.1.5, tsx v4.19.2, tsup v8.3.5 -
#175
a19ebe8Thanks @kouak! - remeda v2.17.3, type-fest v4.27.0
-
#160
f872768Thanks @kouak! - Remove unused dotenv/config import from config.ts -
#161
fb8297dThanks @kouak! - Fix tests failing when a flight returned byqueryFlightsBy*has a non ICAO aerodrome of departure or destination
-
#152
efc9f0aThanks @kouak! - Safer B2B response types.Typings will now contain
null | undefinedwhen there's a risk a partial deserialization.A type helper
SafeB2BDeserializedResponseis now exported, and will apply a safe type transformation to any typed exported from@dgac/nmb2b-client/*/types.See DGAC#149 for more information.
-
#150
4c4ee7cThanks @kouak! - Improve type safety of B2B replies when objects are potentially empty.See DGAC#149