From ea972166b7906b17dd6cc98f5b58c1433af8730e Mon Sep 17 00:00:00 2001 From: CodeMash Date: Thu, 22 Oct 2026 10:54:22 +0300 Subject: [PATCH] =?UTF-8?q?feat(hub):=20require=20@norbix.ai/ts=204.32=20?= =?UTF-8?q?=E2=80=94=20optional=20true-by-default=20switches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hooks take their argument types from the core SDK, so with 4.32.0 the save hooks for webhook destinations, passkey settings, email validation and payments integrations (Montonio isSandbox) accept the switches as optional. No hook ever wrapped /internal/* (hub.internal had none). Peer and dev dependency raised to 4.32.0; a test proves an unset Montonio isSandbox is passed through untouched. 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. Co-Authored-By: Claude Opus 5.5 --- package-lock.json | 10 +++++----- package.json | 4 ++-- tests/payments.test.ts | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8031a22..aba1f7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@commitlint/cli": "^21.2.2", "@commitlint/config-conventional": "^21.2.2", "@eslint/js": "^10.0.1", - "@norbix.ai/ts": "^4.31.0", + "@norbix.ai/ts": "^4.32.0", "@reduxjs/toolkit": "^2.12.0", "@semantic-release/commit-analyzer": "^13.0.1", "@semantic-release/github": "^12.0.9", @@ -45,7 +45,7 @@ "node": ">=18" }, "peerDependencies": { - "@norbix.ai/ts": ">=4.31.0", + "@norbix.ai/ts": ">=4.32.0", "@reduxjs/toolkit": ">=2.0.0", "react": ">=18.0.0", "react-redux": ">=9.0.0" @@ -1490,9 +1490,9 @@ } }, "node_modules/@norbix.ai/ts": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@norbix.ai/ts/-/ts-4.31.0.tgz", - "integrity": "sha512-0nCic6VbLdmCDeJGhEwJaSo1O6Sj+p4M9xtww7Nbo/F1HDnqE7uBVL21MRoNCvZNpEui1fqgf0+j0vBGwIUfuw==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/@norbix.ai/ts/-/ts-4.32.0.tgz", + "integrity": "sha512-6IVA8btojZtRsyTGSP1j87CD1n+w2kdzhLc9l8IkvpPu5qQUl7VLNSltjcQfXCoG+xX/6AbH/qZDLvXhYDkMcA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 1dff8d6..c97e751 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "prepublishOnly": "npm run build" }, "peerDependencies": { - "@norbix.ai/ts": ">=4.31.0", + "@norbix.ai/ts": ">=4.32.0", "@reduxjs/toolkit": ">=2.0.0", "react": ">=18.0.0", "react-redux": ">=9.0.0" @@ -68,7 +68,7 @@ "@commitlint/cli": "^21.2.2", "@commitlint/config-conventional": "^21.2.2", "@eslint/js": "^10.0.1", - "@norbix.ai/ts": "^4.31.0", + "@norbix.ai/ts": "^4.32.0", "@reduxjs/toolkit": "^2.12.0", "@semantic-release/commit-analyzer": "^13.0.1", "@semantic-release/github": "^12.0.9", diff --git a/tests/payments.test.ts b/tests/payments.test.ts index 7cbe1de..23230c2 100644 --- a/tests/payments.test.ts +++ b/tests/payments.test.ts @@ -67,6 +67,28 @@ describe('hubPayments', () => { expect(endpoints.getPaymentsWebhookLog.providesTags).toEqual(['PaymentIntegrations']); expect(calls).toEqual([{ method: 'hub.getPaymentsWebhookLog', args }]); }); + + /** + * Montonio `isSandbox` is optional since core SDK 4.32.0: empty = true on the + * gateway (sandbox). The hook must hand the caller's integration over as is, + * never fill the switch in. + */ + it('savePaymentsIntegration leaves an unset Montonio isSandbox out', async () => { + const { calls, client } = fakeNorbix(); + const args = { + integration: { + provider: 'Montonio', + integrationName: 'montonio', + accessKey: 'ak', + secretKey: 'sk', + }, + }; + + await endpoints.savePaymentsIntegration.query(args)(client); + + expect(calls).toEqual([{ method: 'hub.savePaymentsIntegration', args }]); + expect('isSandbox' in (calls[0]!.args as typeof args).integration).toBe(false); + }); }); /**