@nomba/node-sdk 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/v1/direct-debits/IDirectDebitsService.d.ts +1 -1
- package/dist/lib/errors.d.ts +1 -1
- package/dist/lib/errors.js +1 -1
- package/dist/lib/paginate.d.ts +1 -1
- package/dist/lib/paginate.js +1 -1
- package/dist/lib/sdk-version.generated.d.ts +1 -1
- package/dist/lib/sdk-version.generated.js +1 -1
- package/dist/lib/token-store.d.ts +1 -1
- package/dist/lib/token-store.js +1 -1
- package/dist/lib/util.d.ts +1 -1
- package/dist/lib/util.js +1 -1
- package/dist/lib/webhooks.d.ts +3 -2
- package/dist/lib/webhooks.js +5 -4
- package/dist/services/http/http-client.service.js +2 -0
- package/dist/services/v1/accounts/accounts.service.d.ts +1 -1
- package/dist/services/v1/accounts/accounts.service.js +1 -1
- package/dist/services/v1/charge/charge.service.d.ts +1 -1
- package/dist/services/v1/charge/charge.service.js +1 -1
- package/dist/services/v1/checkout/checkout.service.d.ts +1 -1
- package/dist/services/v1/checkout/checkout.service.js +1 -1
- package/dist/services/v1/direct-debits/direct-debits.service.d.ts +2 -2
- package/dist/services/v1/direct-debits/direct-debits.service.js +2 -2
- package/dist/services/v1/globals/collections.service.d.ts +1 -1
- package/dist/services/v1/globals/collections.service.js +1 -1
- package/dist/services/v1/globals/payout.service.d.ts +1 -1
- package/dist/services/v1/globals/payout.service.js +2 -2
- package/dist/services/v1/requery/requery.service.d.ts +1 -1
- package/dist/services/v1/requery/requery.service.js +1 -1
- package/dist/services/v1/terminals/terminals.service.d.ts +1 -1
- package/dist/services/v1/terminals/terminals.service.js +1 -1
- package/dist/services/v1/transactions/transactions.service.d.ts +1 -1
- package/dist/services/v1/transactions/transactions.service.js +1 -1
- package/dist/services/v1/virtual-accounts/virtual-accounts.service.d.ts +1 -1
- package/dist/services/v1/virtual-accounts/virtual-accounts.service.js +1 -1
- package/dist/services/v1/webhooks/webhooks.service.d.ts +1 -1
- package/dist/services/v1/webhooks/webhooks.service.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/banner-dark.svg">
|
|
3
|
+
<img alt="Nomba Node SDK" src=".github/assets/banner-light.svg" width="100%">
|
|
4
|
+
</picture>
|
|
5
|
+
|
|
1
6
|
# Nomba Node SDK
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
TypeScript/Node.js client for [Nomba's](https://nomba.com) payments and banking APIs.
|
|
4
9
|
|
|
10
|
+
[](https://github.com/NombaOSS/nomba-node-sdk/actions/workflows/ci.yml)
|
|
11
|
+
[](https://www.npmjs.com/package/@nomba/node-sdk)
|
|
5
12
|
[](LICENSE)
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Node.js **22** or newer (see `.nvmrc`)
|
|
10
|
-
- A Nomba account with API credentials (`clientId`, `clientSecret`, `accountId`) from the [Nomba dashboard](https://nomba.com)
|
|
14
|
+
- Checkout, transfers, virtual accounts, direct debits, terminals, electricity, cable TV, betting, airtime and data, cross-border payouts and collections, webhooks, and account/transaction lookups.
|
|
15
|
+
- Built for production use: automatic token management, safe retries, idempotent mutations, and cursor pagination.
|
|
16
|
+
- Requires Node.js **22** or newer (see `.nvmrc`) and a Nomba account with API credentials (`clientId`, `clientSecret`, `accountId`) from the [Nomba dashboard](https://nomba.com).
|
|
11
17
|
|
|
12
|
-
##
|
|
18
|
+
## Install
|
|
13
19
|
|
|
14
20
|
```bash
|
|
15
21
|
npm install @nomba/node-sdk
|
|
16
22
|
```
|
|
17
23
|
|
|
18
|
-
##
|
|
24
|
+
## Quickstart
|
|
19
25
|
|
|
20
26
|
```ts
|
|
21
27
|
import { Nomba } from "@nomba/node-sdk";
|
|
@@ -607,6 +613,12 @@ npm run build # emit dist/
|
|
|
607
613
|
|
|
608
614
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contribution guide (Nomba-docs-first, tests required, Conventional Commits).
|
|
609
615
|
|
|
616
|
+
## Links
|
|
617
|
+
|
|
618
|
+
- [Nomba API documentation](https://developer.nomba.com)
|
|
619
|
+
- [Contributing guide](CONTRIBUTING.md), [Security policy](SECURITY.md), [Releasing](RELEASING.md)
|
|
620
|
+
- [Changelog](CHANGELOG.md)
|
|
621
|
+
|
|
610
622
|
## License
|
|
611
623
|
|
|
612
624
|
[MIT](LICENSE)
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @copyright 2026 Nomba
|
|
8
8
|
* @homepage https://nomba.com
|
|
9
9
|
* @support https://nomba.com/support
|
|
10
|
-
* @repository https://github.com/
|
|
10
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
11
11
|
* @docs https://developer.nomba.com
|
|
12
12
|
*/
|
|
13
13
|
export type { IHttpClient } from "./interfaces/http/IHttpClient.js";
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @copyright 2026 Nomba
|
|
8
8
|
* @homepage https://nomba.com
|
|
9
9
|
* @support https://nomba.com/support
|
|
10
|
-
* @repository https://github.com/
|
|
10
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
11
11
|
* @docs https://developer.nomba.com
|
|
12
12
|
*/
|
|
13
13
|
export { IdempotencyKeyAbsentError, isPending, NombaError, OutcomeUnknownError, TokenError, UnconfirmedOutcomeError, } from "./lib/errors.js";
|
|
@@ -6,7 +6,7 @@ import type { CreatedMandate, CreateMandateParams, DebitMandateParams, ListManda
|
|
|
6
6
|
export interface IDirectDebitsService {
|
|
7
7
|
/**
|
|
8
8
|
* `POST /v1/direct-debits`.
|
|
9
|
-
*
|
|
9
|
+
* limit: this endpoint's response envelope is `{ responseCode, responseMessage, data }`, unlike every
|
|
10
10
|
* other endpoint's `{ code, description, data }` — confirmed from the spec's own example, not guessed.
|
|
11
11
|
* @param params The mandate to create; `merchantReference` is the idempotency key.
|
|
12
12
|
* @returns The created mandate.
|
package/dist/lib/errors.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
/** Thrown for any non-2xx response, or a 2xx whose body `code` is not "00". */
|
package/dist/lib/errors.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
/** Thrown for any non-2xx response, or a 2xx whose body `code` is not "00". */
|
package/dist/lib/paginate.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
/**
|
package/dist/lib/paginate.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.6.
|
|
1
|
+
export declare const SDK_VERSION = "0.6.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.6.
|
|
1
|
+
export const SDK_VERSION = "0.6.1";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
export interface TokenData {
|
package/dist/lib/token-store.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
/** Default store: one token, this process only. */
|
package/dist/lib/util.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
export type PageParams = {
|
package/dist/lib/util.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
*/
|
|
14
14
|
// Path ids come from callers; reject values that would change the endpoint ("", ".", "..").
|
package/dist/lib/webhooks.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-basics/webhook
|
|
14
14
|
*/
|
|
@@ -38,6 +38,7 @@ export interface WebhookEvent {
|
|
|
38
38
|
* True when `signature` (the nomba-signature header) matches the event, signed with your dashboard's
|
|
39
39
|
* webhook signature key and the nomba-timestamp header. `body` is the raw request body (string or Buffer) or the parsed event.
|
|
40
40
|
* A missing or malformed signature or body returns false rather than throwing.
|
|
41
|
-
*
|
|
41
|
+
* Compared exact-case: folding case before comparing would shrink the effective alphabet and weaken
|
|
42
|
+
* forgery resistance, and nothing backs case-insensitivity as real API behavior.
|
|
42
43
|
*/
|
|
43
44
|
export declare function verifyWebhook(body: string | Buffer | WebhookEvent, signature: string | undefined, timestamp: string, secret: string): boolean;
|
package/dist/lib/webhooks.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-basics/webhook
|
|
14
14
|
*/
|
|
@@ -41,7 +41,8 @@ function webhookSignature(event, secret, timestamp) {
|
|
|
41
41
|
* True when `signature` (the nomba-signature header) matches the event, signed with your dashboard's
|
|
42
42
|
* webhook signature key and the nomba-timestamp header. `body` is the raw request body (string or Buffer) or the parsed event.
|
|
43
43
|
* A missing or malformed signature or body returns false rather than throwing.
|
|
44
|
-
*
|
|
44
|
+
* Compared exact-case: folding case before comparing would shrink the effective alphabet and weaken
|
|
45
|
+
* forgery resistance, and nothing backs case-insensitivity as real API behavior.
|
|
45
46
|
*/
|
|
46
47
|
export function verifyWebhook(body, signature, timestamp, secret) {
|
|
47
48
|
if (typeof signature !== "string")
|
|
@@ -58,7 +59,7 @@ export function verifyWebhook(body, signature, timestamp, secret) {
|
|
|
58
59
|
}
|
|
59
60
|
if (typeof event !== "object" || event === null)
|
|
60
61
|
return false;
|
|
61
|
-
const expected = Buffer.from(webhookSignature(event, secret, timestamp)
|
|
62
|
-
const given = Buffer.from(signature
|
|
62
|
+
const expected = Buffer.from(webhookSignature(event, secret, timestamp));
|
|
63
|
+
const given = Buffer.from(signature);
|
|
63
64
|
return expected.length === given.length && timingSafeEqual(expected, given);
|
|
64
65
|
}
|
|
@@ -295,6 +295,8 @@ export class HttpClient {
|
|
|
295
295
|
...(bearer ? { Authorization: `Bearer ${bearer}` } : {}),
|
|
296
296
|
},
|
|
297
297
|
...(payload === undefined ? {} : { body: payload }),
|
|
298
|
+
// The bearer token must never follow a redirect to another host.
|
|
299
|
+
redirect: "error",
|
|
298
300
|
signal: AbortSignal.timeout(this.#options.timeoutMs ?? 30_000),
|
|
299
301
|
});
|
|
300
302
|
let json = null;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/accounts
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/accounts
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/charge
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/charge
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/checkout
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/checkout
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/direct-debits
|
|
14
14
|
*/
|
|
@@ -21,7 +21,7 @@ export declare class DirectDebitsService implements IDirectDebitsService {
|
|
|
21
21
|
constructor(http: IHttpClient);
|
|
22
22
|
/**
|
|
23
23
|
* `POST /v1/direct-debits`.
|
|
24
|
-
*
|
|
24
|
+
* limit: this endpoint's response envelope is `{ responseCode, responseMessage, data }`, unlike every
|
|
25
25
|
* other endpoint's `{ code, description, data }` — confirmed from the spec's own example, not guessed.
|
|
26
26
|
* @param params The mandate to create; `merchantReference` is the idempotency key.
|
|
27
27
|
* @returns The created mandate.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/direct-debits
|
|
14
14
|
*/
|
|
@@ -20,7 +20,7 @@ export class DirectDebitsService {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* `POST /v1/direct-debits`.
|
|
23
|
-
*
|
|
23
|
+
* limit: this endpoint's response envelope is `{ responseCode, responseMessage, data }`, unlike every
|
|
24
24
|
* other endpoint's `{ code, description, data }` — confirmed from the spec's own example, not guessed.
|
|
25
25
|
* @param params The mandate to create; `merchantReference` is the idempotency key.
|
|
26
26
|
* @returns The created mandate.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/products/global-collections/introduction
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/products/global-collections/introduction
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/products/global-payout/introduction
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/products/global-payout/introduction
|
|
14
14
|
*/
|
|
@@ -16,7 +16,7 @@ import { IdempotencyKeyAbsentError } from "../../../lib/errors.js";
|
|
|
16
16
|
import { REJECTED, settle } from "../../../lib/outcome.js";
|
|
17
17
|
import { pathId } from "../../../lib/util.js";
|
|
18
18
|
// authorize-transfer documents data.status PROCESSING, PENDING, COMPLETED and FAILED. The docs never say FAILED is
|
|
19
|
-
// final or safe to refund, so it stays pending until confirmed
|
|
19
|
+
// final or safe to refund, so it stays pending until confirmed; only COMPLETED is success.
|
|
20
20
|
const TRANSFER_OUTCOMES = {
|
|
21
21
|
codes: { "00": "success", ...REJECTED },
|
|
22
22
|
statuses: {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/requery
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/requery
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/terminals
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/terminals
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/transactions
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/transactions
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/virtual-accounts
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-reference/virtual-accounts
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-basics/troubleshoot-webhooks
|
|
14
14
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright 2026 Nomba
|
|
9
9
|
* @homepage https://nomba.com
|
|
10
10
|
* @support https://nomba.com/support
|
|
11
|
-
* @repository https://github.com/
|
|
11
|
+
* @repository https://github.com/NombaOSS/nomba-node-sdk
|
|
12
12
|
* @docs https://developer.nomba.com
|
|
13
13
|
* @see https://developer.nomba.com/docs/api-basics/troubleshoot-webhooks
|
|
14
14
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomba/node-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Node.js SDK for Nomba's APIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"prebuild": "node scripts/generate-sdk-version.cjs",
|
|
23
23
|
"build": "tsc -p tsconfig.build.json",
|
|
24
24
|
"lint": "biome check .",
|
|
25
|
+
"lint:architecture": "node scripts/check-architecture.cjs",
|
|
25
26
|
"pretest": "node scripts/generate-sdk-version.cjs",
|
|
26
27
|
"test": "vitest run",
|
|
27
28
|
"pretypecheck": "node scripts/generate-sdk-version.cjs",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
},
|
|
36
37
|
"repository": {
|
|
37
38
|
"type": "git",
|
|
38
|
-
"url": "git+https://github.com/
|
|
39
|
+
"url": "git+https://github.com/NombaOSS/nomba-node-sdk.git"
|
|
39
40
|
},
|
|
40
41
|
"publishConfig": {
|
|
41
42
|
"access": "public"
|