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); + }); }); /**