From 89c58351077657b01fe2686e05a5697d4c63dd48 Mon Sep 17 00:00:00 2001 From: CodeMash Date: Thu, 22 Oct 2026 10:44:38 +0300 Subject: [PATCH 1/2] feat(hub): remove the /internal/_typegen method (hub.internal) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GET /internal/_typegen is gateway tooling for the type generator, not product surface (owner 2026-10-22: /internal/* is not SDK surface). The module, the client property (hub.internal / Internal), its docs page and its test are gone. This SDK has no module generator, so nothing can bring it back on a regeneration. Breaking: the /internal/_typegen method (hub.internal) is removed — it was gateway tooling. Breaking: DryRun / IsSandbox / IsEnabled / Publish / GenerateRecoveryCodesAtSignup / IncludeRawPayload are optional now; empty = true on the gateway. The module methods take keyword arguments and send only what the caller passes, so no method filled these fields with false; nothing else changes. Co-Authored-By: Claude Opus 5.5 --- docs/hub/_index.md | 1 - docs/hub/internal.md | 7 ------ src/norbix_python/client.py | 2 -- src/norbix_python/hub/__init__.py | 3 --- src/norbix_python/hub/internal.py | 41 ------------------------------- tests/hub/test_internal.py | 18 -------------- 6 files changed, 72 deletions(-) delete mode 100644 docs/hub/internal.md delete mode 100644 src/norbix_python/hub/internal.py delete mode 100644 tests/hub/test_internal.py diff --git a/docs/hub/_index.md b/docs/hub/_index.md index 35d63e0..0a367e9 100644 --- a/docs/hub/_index.md +++ b/docs/hub/_index.md @@ -9,7 +9,6 @@ | [`echo`](./echo.md) | 1 | | [`email`](./email.md) | 1 | | [`files`](./files.md) | 23 | -| [`internal`](./internal.md) | 1 | | [`logs`](./logs.md) | 15 | | [`membership`](./membership.md) | 25 | | [`notifications`](./notifications.md) | 117 | diff --git a/docs/hub/internal.md b/docs/hub/internal.md deleted file mode 100644 index 87fe897..0000000 --- a/docs/hub/internal.md +++ /dev/null @@ -1,7 +0,0 @@ -# HUB · Internal - -Access with `norbix.hub.internal`. - -| Method | Verb | Path | Scope | -| --- | --- | --- | --- | -| `internals_type_gen` | `GET` | `/internal/_typegen` | `project` | diff --git a/src/norbix_python/client.py b/src/norbix_python/client.py index 6014ef0..2d994fb 100644 --- a/src/norbix_python/client.py +++ b/src/norbix_python/client.py @@ -324,7 +324,6 @@ def __init__( self.email = hub.email self.environments = hub.environments self.files = hub.files - self.internal = hub.internal self.logs = hub.logs self.membership = hub.membership self.notifications = hub.notifications @@ -341,7 +340,6 @@ def __init__( self.Email = self.email self.Environments = self.environments self.Files = self.files - self.Internal = self.internal self.Logs = self.logs self.Membership = self.membership self.Notifications = self.notifications diff --git a/src/norbix_python/hub/__init__.py b/src/norbix_python/hub/__init__.py index 980c801..974f47a 100644 --- a/src/norbix_python/hub/__init__.py +++ b/src/norbix_python/hub/__init__.py @@ -9,7 +9,6 @@ from .email import AsyncEmailModule, EmailModule from .environments import AsyncEnvironmentsModule, EnvironmentsModule from .files import AsyncFilesModule, FilesModule -from .internal import AsyncInternalModule, InternalModule from .logs import AsyncLogsModule, LogsModule from .membership import AsyncMembershipModule, MembershipModule from .notifications import AsyncNotificationsModule, NotificationsModule @@ -31,7 +30,6 @@ def __init__(self, transport: Transport) -> None: self.email = EmailModule(transport) self.environments = EnvironmentsModule(transport) self.files = FilesModule(transport) - self.internal = InternalModule(transport) self.logs = LogsModule(transport) self.membership = MembershipModule(transport) self.notifications = NotificationsModule(transport) @@ -53,7 +51,6 @@ def __init__(self, transport: AsyncTransport) -> None: self.email = AsyncEmailModule(transport) self.environments = AsyncEnvironmentsModule(transport) self.files = AsyncFilesModule(transport) - self.internal = AsyncInternalModule(transport) self.logs = AsyncLogsModule(transport) self.membership = AsyncMembershipModule(transport) self.notifications = AsyncNotificationsModule(transport) diff --git a/src/norbix_python/hub/internal.py b/src/norbix_python/hub/internal.py deleted file mode 100644 index a34229f..0000000 --- a/src/norbix_python/hub/internal.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import Any - -from ..transport import AsyncTransport, Transport - - -class InternalModule: - def __init__(self, transport: Transport) -> None: - self._transport = transport - - def internals_type_gen(self, *, timeout: float | None = None, bearer_token: str | None = None, **request: Any) -> Any: - """GET /internal/_typegen""" - return self._transport.send( - target="hub", - path="/internal/_typegen", - method="GET", - path_params={}, - request=request, - scope="project", - timeout=timeout, - bearer_token=bearer_token, - ) - - -class AsyncInternalModule: - def __init__(self, transport: AsyncTransport) -> None: - self._transport = transport - - async def internals_type_gen(self, *, timeout: float | None = None, bearer_token: str | None = None, **request: Any) -> Any: - """GET /internal/_typegen""" - return await self._transport.send( - target="hub", - path="/internal/_typegen", - method="GET", - path_params={}, - request=request, - scope="project", - timeout=timeout, - bearer_token=bearer_token, - ) diff --git a/tests/hub/test_internal.py b/tests/hub/test_internal.py deleted file mode 100644 index ba61650..0000000 --- a/tests/hub/test_internal.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -from norbix_python import Norbix, NorbixError -from ..helpers import make_client - - -def test_hub_internal_module_surface() -> None: - client, _ = make_client() - module = client.hub.internal - assert callable(module.internals_type_gen) - - -def test_hub_internal_internals_type_gen_request_shape() -> None: - client, transport = make_client(account_id=None) - client.hub.internal.internals_type_gen() - assert transport.last_request['method'] == 'GET' - assert transport.last_request is not None - assert transport.last_request['url'].startswith('https://') From 93ff80fe09f400a3d5c262d4366a5557a49a17ac Mon Sep 17 00:00:00 2001 From: CodeMash Date: Thu, 22 Oct 2026 10:44:38 +0300 Subject: [PATCH 2/2] test(payments): an unset isSandbox is not sent on save_payments_integration Owner 2026-10-22: isSandbox is optional and empty = true (sandbox) on the gateway, so the SDK must leave it out when the caller did not set it. Co-Authored-By: Claude Opus 5.5 --- tests/hub/test_payments.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/hub/test_payments.py b/tests/hub/test_payments.py index 5b1b4a8..b4a2d58 100644 --- a/tests/hub/test_payments.py +++ b/tests/hub/test_payments.py @@ -131,6 +131,20 @@ def test_hub_payments_save_payments_integration_request_shape() -> None: assert transport.last_request is not None assert transport.last_request['url'].startswith('https://') +def test_hub_payments_save_montonio_integration_leaves_out_unset_is_sandbox() -> None: + # Owner 2026-10-22: isSandbox is optional; empty = true (sandbox) on the gateway. + # The SDK must not fill in a default, or an unset field would become live mode. + import json + + client, transport = make_client(account_id=None) + client.hub.payments.save_payments_integration( + integration={"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"}, + ) + assert transport.last_request is not None + body = json.loads(transport.last_request['body']) + assert body == {"integration": {"provider": "Montonio", "accessKey": "ak_test", "secretKey": "sk_test"}} + assert "isSandbox" not in body["integration"] + def test_hub_payments_test_payments_integration_request_shape() -> None: client, transport = make_client(account_id=None) client.hub.payments.test_payments_integration()