Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ For Montonio (the checkout provider of payment orders), the keys of a Montonio
{"accessKey": "…", "secretKey": "…", "isSandbox": true, "locale": "lt"}
```

`isSandbox` is optional: empty = true (sandbox). Leave it out or send `true`;
only an explicit `false` points the integration at a live store.

```bash
norbix payments integration save --provider Montonio --name "Montonio sandbox" --config @montonio.json
```
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"dependencies": {
"@inquirer/prompts": "^8.7.2",
"@norbix.ai/ts": "^4.31.0",
"@norbix.ai/ts": "^4.32.0",
"@oclif/core": "^5.0.0",
"@oclif/plugin-autocomplete": "^4.0.0",
"@oclif/plugin-help": "^7.0.0"
Expand Down
3 changes: 3 additions & 0 deletions scripts/gen-request-fields.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export function methodsOf(block, label = 'module') {
continue
}

// owner 2026-10-22: /internal/* is not SDK surface
if (path.startsWith('/internal/')) continue

methods[name] = {http, path, dto: dtos[0], target}
// A deprecated forwarder may call the other host's route (4.28.0:
// hub.notifications.grantContactConsent → the API route); the host check
Expand Down
2 changes: 1 addition & 1 deletion src/generated/request-fields.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions tests/gen-request-fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,27 @@ describe('gen:fields reads SDK methods', () => {
})
})

it('skips a route under /internal/ (owner 2026-10-22: not SDK surface)', () => {
const source = sdk(
moduleClass(
'ThingsModule',
[
method('plain', ['GET /{version}/things', 'Request DTO: GetThings']),
method('internalsTypeGen', ['GET /internal/_typegen', 'Request DTO: InternalsTypeGen'], {
target: 'hub',
path: '/internal/_typegen',
method: 'GET',
}),
].join(''),
),
)

const {methods, problems} = sdkMethods(source)

expect(problems).toEqual([])
expect(methods.hub).toEqual({things: {plain: {http: 'GET', path: '/{version}/things', dto: 'GetThings', target: 'hub'}}})
})

it('lists every method it cannot read instead of dropping it', () => {
const source = sdk(
moduleClass(
Expand Down
10 changes: 10 additions & 0 deletions tests/payments-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,16 @@ describe('payments integration save --provider Montonio', () => {
integration: {accessKey: 'ak_1', secretKey: 'sk_1', isSandbox: true, provider: 'Montonio', integrationName: 'Montonio', isEnabled: true},
})
})

it('leaves isSandbox out when --config has none (empty = true on the gateway: sandbox)', async () => {
const {body} = await callOf([
'integration', 'save', '--provider', 'Montonio', '--name', 'Montonio',
'--config', '{"accessKey":"ak_1","secretKey":"sk_1"}',
])
expect(body).toEqual({
integration: {accessKey: 'ak_1', secretKey: 'sk_1', provider: 'Montonio', integrationName: 'Montonio', isEnabled: true},
})
})
})

describe('payments order create', () => {
Expand Down
Loading