Skip to content

Conversation

@asein-sinch
Copy link
Collaborator

No description provided.

@JPPortier
Copy link

Is this PR is an initial step regarding opening access to domain for MCP?
Current domains implementation/init are tied to ApiFecthClient (e.g.: https://github.com/sinch/sinch-sdk-node/blob/DEVEXP-1107_Export-domain-API-classes/packages/numbers/src/rest/v1/numbers-domain-api.ts#L63)
Ideally, and this is highlighted by having client field public (https://github.com/sinch/sinch-sdk-node/blob/DEVEXP-1107_Export-domain-API-classes/packages/numbers/src/rest/v1/numbers-domain-api.ts#L13), the classes should use dependencies injection and then client could private.
Then, no need more need for this https://github.com/sinch/sinch-mcp-server/blob/main/src/tools/verification/utils/verification-service-helper.ts#L36
Then, "just" initialize the ApiService with proper dedicated ApiFetchClient

@asein-sinch
Copy link
Collaborator Author

I planned to let it this way, but if we want to implement what you are proposing, it must be done in the same release, and so I'll group everything in the same PR.
To keep in mind regarding the current design: it has been done this way to support the lazy loading of the credentials. I can move the lazy loading up to the service class, but it would break the current implementation of the Domain API since the constructor would now expect a getClient() callback instead of the list of parameters

@asein-sinch asein-sinch merged commit 77e311a into v1.4-next Nov 17, 2025
4 checks passed
@asein-sinch asein-sinch deleted the DEVEXP-1107_Export-domain-API-classes branch November 17, 2025 08:14
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.

4 participants