Skip to content

feat(sdk): add Internet.bs and Moniker clients behind a single ClientFactory - #995

Merged
KaiSchwarz-cnic merged 1 commit into
masterfrom
RSRMID-2974-prepare-node-sdk-for-ibs-moniker-iwmn-availability-check-mcp
Aug 26, 2026
Merged

feat(sdk): add Internet.bs and Moniker clients behind a single ClientFactory#995
KaiSchwarz-cnic merged 1 commit into
masterfrom
RSRMID-2974-prepare-node-sdk-for-ibs-moniker-iwmn-availability-check-mcp

Conversation

@AsifNawaz-cnic

Copy link
Copy Markdown
Collaborator

This SDK now talks to Internet.bs and Moniker, not just CentralNic Reseller (CNR) — construct a client for any of the three through one ClientFactory.

It also repairs several things the package advertised but did not do:

  • 10.0.11-10.0.15 published with an empty dist/ and could not be imported at all. Fixed, and the tarball contents are now asserted on every build.
  • every release corrupted CNR_CONNECTION_URL_PROXY in the published artifact, rewriting 127.0.0.1 to the version number (10.0.15.1 in the last release), so useHighPerformanceConnectionSetup() pointed at an arbitrary routable host.
  • setProxy() and the request timeout were silently doing nothing: neither is a fetch option. Both now reach the wire.
  • API description rewrites never applied — the matching pattern could not match anything.
  • a failed request reported only "fetch failed". The real reason (refused connection, DNS failure, timeout, with host and port) now reaches you through the response's HTTP error description.
  • pagination arithmetic is corrected throughout, and a non-list response reports "no total" honestly instead of substituting its own row count.

Sessions and role-based login stay CNR-only, as do the five CNR-specific response capabilities (getQueuetime, getRuntime, isTmpError, isPending, getListHash); on IBS and Moniker they are absent by type rather than present and throwing.

HTTP now goes through an injectable transport, so you can drive the whole request lifecycle against your own double — no network, no credentials — when testing an integration.

BREAKING CHANGE: Construct clients via ClientFactory.cnr()/ibs()/moniker() instead of new APIClient(). Only the package's root export works now -- importing internal files directly is no longer supported. If you registered custom response templates, register them on your own template-manager instance and pass it in per request; a shared instance is no longer used automatically. If you used a custom logger, have it return a formatted string and pass a log sink to write it, instead of overriding a method that prints directly. Replace getNextRecord()/rewindRecordList() with standard iteration over the response (for...of, or getRecord(index)). If you customized the HTTP layer, pass your own transport via setTransport(). Session and role-based login remain specific to CentralNic Reseller clients -- Internet.bs and Moniker clients do not expose them. setUserView(), resetUserView() and useDefaultConnectionSetup() have been removed; see MIGRATION.md for the direct replacement for each. If you imported the bundled example custom-logger class from the package, copy it from examples/CustomLoggerClass.ts into your own project instead. Pagination and status metadata (CNR TOTAL/FIRST/LAST/COUNT/LIMIT, IBS transactid/status/message/code/count keys) is no longer registered as a column; getColumnKeys() drops its filter-boolean parameter; getPagination() returns a Paginator instead of a plain object (call .toArray() for the old shape); CNR.SessionClient is removed, its methods live on CNR.Client; ResponseTemplateManagerInterface no longer declares getTemplate()/ getTemplates()/isTemplateMatchHash()/isTemplateMatchPlain() -- see the new ResponseTemplateFactoryInterface; Column.length is removed, use getLength().

See MIGRATION.md -> v11.0.0 for full upgrade steps: https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/blob/master/MIGRATION.md#-v1100

…Factory

This SDK now talks to Internet.bs and Moniker, not just CentralNic Reseller
(CNR) — construct a client for any of the three through one ClientFactory.

It also repairs several things the package advertised but did not do:

- 10.0.11-10.0.15 published with an empty dist/ and could not be imported
  at all. Fixed, and the tarball contents are now asserted on every build.
- every release corrupted CNR_CONNECTION_URL_PROXY in the published
  artifact, rewriting 127.0.0.1 to the version number (10.0.15.1 in the
  last release), so useHighPerformanceConnectionSetup() pointed at an
  arbitrary routable host.
- setProxy() and the request timeout were silently doing nothing: neither
  is a fetch option. Both now reach the wire.
- API description rewrites never applied — the matching pattern could not
  match anything.
- a failed request reported only "fetch failed". The real reason (refused
  connection, DNS failure, timeout, with host and port) now reaches you
  through the response's HTTP error description.
- pagination arithmetic is corrected throughout, and a non-list response
  reports "no total" honestly instead of substituting its own row count.

Sessions and role-based login stay CNR-only, as do the five CNR-specific
response capabilities (getQueuetime, getRuntime, isTmpError, isPending,
getListHash); on IBS and Moniker they are absent by type rather than
present and throwing.

HTTP now goes through an injectable transport, so you can drive the whole
request lifecycle against your own double — no network, no credentials —
when testing an integration.

BREAKING CHANGE: Construct clients via ClientFactory.cnr()/ibs()/moniker()
instead of `new APIClient()`. Only the package's root export works now --
importing internal files directly is no longer supported. If you registered
custom response templates, register them on your own template-manager
instance and pass it in per request; a shared instance is no longer used
automatically. If you used a custom logger, have it return a formatted
string and pass a log sink to write it, instead of overriding a method that
prints directly. Replace getNextRecord()/rewindRecordList() with standard
iteration over the response (for...of, or getRecord(index)). If you
customized the HTTP layer, pass your own transport via setTransport().
Session and role-based login remain specific to CentralNic Reseller clients
-- Internet.bs and Moniker clients do not expose them. setUserView(),
resetUserView() and useDefaultConnectionSetup() have been removed; see
MIGRATION.md for the direct replacement for each. If you imported the
bundled example custom-logger class from the package, copy it from
examples/CustomLoggerClass.ts into your own project instead.
Pagination and status metadata (CNR TOTAL/FIRST/LAST/COUNT/LIMIT, IBS
transactid/status/message/code/count keys) is no longer registered as a
column; getColumnKeys() drops its filter-boolean parameter; getPagination()
returns a Paginator instead of a plain object (call .toArray() for the old
shape); CNR.SessionClient is removed, its methods live on CNR.Client;
ResponseTemplateManagerInterface no longer declares getTemplate()/
getTemplates()/isTemplateMatchHash()/isTemplateMatchPlain() -- see the new
ResponseTemplateFactoryInterface; Column.length is removed, use getLength().

See MIGRATION.md -> v11.0.0 for full upgrade steps:
https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/blob/master/MIGRATION.md#-v1100
@KaiSchwarz-cnic
KaiSchwarz-cnic merged commit 887692d into master Aug 26, 2026
3 checks passed
@KaiSchwarz-cnic
KaiSchwarz-cnic deleted the RSRMID-2974-prepare-node-sdk-for-ibs-moniker-iwmn-availability-check-mcp branch August 26, 2026 08:36
@KaiSchwarz-cnic

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants