@qubiton/sdk 0.1.0-dev.1610
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 +128 -0
- package/dist/auth.d.ts +10 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +37 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +158 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +16 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +28 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +75 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +3 -0
- package/dist/models.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# QubitOn API — Node.js SDK
|
|
2
|
+
|
|
3
|
+
TypeScript/Node.js client for the [QubitOn API](https://www.qubiton.com) by QubitOn. Validate addresses, tax IDs, and bank accounts; look up business registrations; screen for sanctions and disqualified directors.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qubiton/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { QubitOnClient } from '@qubiton/sdk';
|
|
15
|
+
|
|
16
|
+
const client = new QubitOnClient({ apiKey: 'svm...' });
|
|
17
|
+
|
|
18
|
+
const result = await client.validateAddress({
|
|
19
|
+
addressLine1: '123 Main St',
|
|
20
|
+
city: 'New York',
|
|
21
|
+
state: 'NY',
|
|
22
|
+
postalCode: '10001',
|
|
23
|
+
country: 'US',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
console.log(`Valid: ${result.isValid}, Score: ${result.confidenceScore}`);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Authentication
|
|
30
|
+
|
|
31
|
+
### API Key (recommended)
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
const client = new QubitOnClient({ apiKey: 'svm...' });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### OAuth2 Client Credentials
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
const client = new QubitOnClient({
|
|
41
|
+
clientId: 'your-client-id',
|
|
42
|
+
clientSecret: 'your-client-secret',
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Methods
|
|
47
|
+
|
|
48
|
+
| Method | Description | Endpoint |
|
|
49
|
+
|--------|-------------|----------|
|
|
50
|
+
| `validateAddress()` | Validate and standardize a postal address | POST /api/validate/address |
|
|
51
|
+
| `validateTaxId()` | Validate a tax identification number | POST /api/validate/taxid |
|
|
52
|
+
| `validateBankAccount()` | Verify bank account details | POST /api/validate/bank |
|
|
53
|
+
| `lookupBusiness()` | Look up official business registration data | POST /api/enrich/business |
|
|
54
|
+
| `checkSanctions()` | Screen against global sanctions lists | POST /api/risk/sanctions |
|
|
55
|
+
| `checkDirectors()` | Check for disqualified directors | POST /api/risk/directors |
|
|
56
|
+
|
|
57
|
+
## Error Handling
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { QubitOnClient, ApiError, RateLimitError } from '@qubiton/sdk';
|
|
61
|
+
|
|
62
|
+
const client = new QubitOnClient({ apiKey: 'svm...' });
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const result = await client.validateAddress(req);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
if (err instanceof RateLimitError) {
|
|
68
|
+
console.log(`Rate limited, retry after ${err.retryAfter}s`);
|
|
69
|
+
} else if (err instanceof ApiError) {
|
|
70
|
+
console.log(`API error [${err.status}]: ${err.message}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
All response objects include a `raw` property with the full API response for fields not yet mapped to typed properties.
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
const client = new QubitOnClient({
|
|
81
|
+
apiKey: 'svm...',
|
|
82
|
+
baseUrl: 'https://api.qubiton.com', // default
|
|
83
|
+
timeout: 30000, // milliseconds
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Requirements
|
|
88
|
+
|
|
89
|
+
- Node.js 18+ (uses built-in `fetch`)
|
|
90
|
+
- Zero runtime dependencies
|
|
91
|
+
|
|
92
|
+
## MCP Protocol Support
|
|
93
|
+
|
|
94
|
+
This API is available as a native [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server.
|
|
95
|
+
|
|
96
|
+
### Tools (37), Prompts (20), Resources (7)
|
|
97
|
+
|
|
98
|
+
| Category | Count | Description |
|
|
99
|
+
|----------|-------|-------------|
|
|
100
|
+
| MCP Tools | 37 | 1:1 mapped to API endpoints — same auth, rate limits, and plan access |
|
|
101
|
+
| MCP Prompts | 20 | Multi-tool workflow templates (onboarding, compliance, risk, payment) |
|
|
102
|
+
| MCP Resources | 7 | Reference datasets (tool inventory, risk categories, country coverage) |
|
|
103
|
+
|
|
104
|
+
Prompts may be plan-gated. See [Pricing](https://www.qubiton.com/pricing) for details.
|
|
105
|
+
|
|
106
|
+
- [MCP Manifest](https://mcp.qubiton.com/.well-known/mcp.json)
|
|
107
|
+
- [Resource Content](https://mcp.qubiton.com/api/portal/mcp/resources/{name})
|
|
108
|
+
|
|
109
|
+
### Accessing Resource Content
|
|
110
|
+
|
|
111
|
+
Resources provide reference data via HTTP:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
curl https://mcp.qubiton.com/api/portal/mcp/resources/tool_inventory
|
|
115
|
+
curl https://mcp.qubiton.com/api/portal/mcp/resources/supported_countries
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Available resources: `tool_inventory`, `entity_risk_categories`, `healthcare_types`, `india_identity_types`, `certification_types`, `supported_countries`, `about`.
|
|
119
|
+
|
|
120
|
+
## Getting an API Key
|
|
121
|
+
|
|
122
|
+
1. Sign up for a free account at [www.qubiton.com](https://www.qubiton.com/auth/register)
|
|
123
|
+
2. Navigate to Dashboard → API Keys
|
|
124
|
+
3. Copy your API key (starts with `svm`)
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** OAuth2 token manager for client credentials flow. */
|
|
2
|
+
export declare class OAuth2TokenManager {
|
|
3
|
+
private clientId;
|
|
4
|
+
private clientSecret;
|
|
5
|
+
private tokenUrl;
|
|
6
|
+
private cache;
|
|
7
|
+
constructor(clientId: string, clientSecret: string, tokenUrl: string);
|
|
8
|
+
getToken(): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAOxD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,KAAK,CAA2B;gBAE5B,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAM9D,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CA8BlC"}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** OAuth2 token manager for client credentials flow. */
|
|
2
|
+
export class OAuth2TokenManager {
|
|
3
|
+
clientId;
|
|
4
|
+
clientSecret;
|
|
5
|
+
tokenUrl;
|
|
6
|
+
cache = null;
|
|
7
|
+
constructor(clientId, clientSecret, tokenUrl) {
|
|
8
|
+
this.clientId = clientId;
|
|
9
|
+
this.clientSecret = clientSecret;
|
|
10
|
+
this.tokenUrl = tokenUrl;
|
|
11
|
+
}
|
|
12
|
+
async getToken() {
|
|
13
|
+
if (this.cache && Date.now() < this.cache.expiresAt - 30_000) {
|
|
14
|
+
return this.cache.accessToken;
|
|
15
|
+
}
|
|
16
|
+
const body = new URLSearchParams({
|
|
17
|
+
grant_type: 'client_credentials',
|
|
18
|
+
client_id: this.clientId,
|
|
19
|
+
client_secret: this.clientSecret,
|
|
20
|
+
});
|
|
21
|
+
const resp = await fetch(this.tokenUrl, {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
24
|
+
body: body.toString(),
|
|
25
|
+
});
|
|
26
|
+
if (!resp.ok) {
|
|
27
|
+
throw new Error(`OAuth2 token request failed: ${resp.status}`);
|
|
28
|
+
}
|
|
29
|
+
const data = (await resp.json());
|
|
30
|
+
this.cache = {
|
|
31
|
+
accessToken: data.access_token,
|
|
32
|
+
expiresAt: Date.now() + (data.expires_in ?? 3600) * 1000,
|
|
33
|
+
};
|
|
34
|
+
return this.cache.accessToken;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAOxD,MAAM,OAAO,kBAAkB;IACrB,QAAQ,CAAS;IACjB,YAAY,CAAS;IACrB,QAAQ,CAAS;IACjB,KAAK,GAAsB,IAAI,CAAC;IAExC,YAAY,QAAgB,EAAE,YAAoB,EAAE,QAAgB;QAClE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,EAAE,CAAC;YAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;QAChC,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC;YAC/B,UAAU,EAAE,oBAAoB;YAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,aAAa,EAAE,IAAI,CAAC,YAAY;SACjC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;SACtB,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAkD,CAAC;QAElF,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,IAAI,CAAC,YAAY;YAC9B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,GAAG,IAAI;SACzD,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;CACF"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AddressRequest, AddressResponse, BankAccountRequest, BankAccountResponse, BusinessLookupRequest, BusinessLookupResponse, DirectorsRequest, DirectorsResponse, SanctionsRequest, SanctionsResponse, TaxIdRequest, TaxIdResponse } from './models';
|
|
2
|
+
export interface ClientOptions {
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
clientId?: string;
|
|
5
|
+
clientSecret?: string;
|
|
6
|
+
tokenUrl?: string;
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
timeout?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class QubitOnClient {
|
|
11
|
+
private apiKey;
|
|
12
|
+
private baseUrl;
|
|
13
|
+
private timeout;
|
|
14
|
+
private oauth;
|
|
15
|
+
constructor(options?: ClientOptions);
|
|
16
|
+
private headers;
|
|
17
|
+
private request;
|
|
18
|
+
validateAddress(req: AddressRequest): Promise<AddressResponse>;
|
|
19
|
+
validateTaxId(req: TaxIdRequest): Promise<TaxIdResponse>;
|
|
20
|
+
validateBankAccount(req: BankAccountRequest): Promise<BankAccountResponse>;
|
|
21
|
+
lookupBusiness(req: BusinessLookupRequest): Promise<BusinessLookupResponse>;
|
|
22
|
+
checkSanctions(req: SanctionsRequest): Promise<SanctionsResponse>;
|
|
23
|
+
checkDirectors(req: DirectorsRequest): Promise<DirectorsResponse>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACd,MAAM,UAAU,CAAC;AAMlB,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAA4B;gBAE7B,OAAO,GAAE,aAAkB;YAezB,OAAO;YAgBP,OAAO;IAgEf,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAU9D,aAAa,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAWxD,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAU1E,cAAc,CAAC,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAY3E,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAUjE,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAQxE"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { OAuth2TokenManager } from './auth';
|
|
2
|
+
import { ApiError, AuthenticationError, RateLimitError } from './errors';
|
|
3
|
+
const VERSION = '0.1.0';
|
|
4
|
+
const DEFAULT_BASE_URL = 'https://api.qubiton.com';
|
|
5
|
+
const MAX_RETRIES = 3;
|
|
6
|
+
export class QubitOnClient {
|
|
7
|
+
apiKey;
|
|
8
|
+
baseUrl;
|
|
9
|
+
timeout;
|
|
10
|
+
oauth;
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.apiKey = options.apiKey;
|
|
13
|
+
this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, '');
|
|
14
|
+
this.timeout = options.timeout ?? 30_000;
|
|
15
|
+
this.oauth = null;
|
|
16
|
+
if (options.clientId && options.clientSecret) {
|
|
17
|
+
this.oauth = new OAuth2TokenManager(options.clientId, options.clientSecret, options.tokenUrl ?? `${this.baseUrl}/api/oauth/token`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async headers() {
|
|
21
|
+
const h = {
|
|
22
|
+
'Content-Type': 'application/json',
|
|
23
|
+
'User-Agent': `qubiton-node-sdk/${VERSION}`,
|
|
24
|
+
};
|
|
25
|
+
if (this.apiKey) {
|
|
26
|
+
h['X-Api-Key'] = this.apiKey;
|
|
27
|
+
}
|
|
28
|
+
else if (this.oauth) {
|
|
29
|
+
const token = await this.oauth.getToken();
|
|
30
|
+
h['Authorization'] = `Bearer ${token}`;
|
|
31
|
+
}
|
|
32
|
+
return h;
|
|
33
|
+
}
|
|
34
|
+
async request(method, path, body) {
|
|
35
|
+
const url = `${this.baseUrl}${path}`;
|
|
36
|
+
let lastError = null;
|
|
37
|
+
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
|
38
|
+
const controller = new AbortController();
|
|
39
|
+
const timer = setTimeout(() => controller.abort(), this.timeout);
|
|
40
|
+
try {
|
|
41
|
+
const resp = await fetch(url, {
|
|
42
|
+
method,
|
|
43
|
+
headers: await this.headers(),
|
|
44
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
45
|
+
signal: controller.signal,
|
|
46
|
+
});
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
if (resp.status === 429) {
|
|
49
|
+
const retryAfter = parseFloat(resp.headers.get('Retry-After') ?? String(2 ** attempt));
|
|
50
|
+
if (attempt < MAX_RETRIES - 1) {
|
|
51
|
+
await sleep(retryAfter * 1000);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const raw = await safeJson(resp);
|
|
55
|
+
throw new RateLimitError(retryAfter, raw);
|
|
56
|
+
}
|
|
57
|
+
if (resp.status >= 500) {
|
|
58
|
+
lastError = new ApiError(resp.status, await resp.text());
|
|
59
|
+
if (attempt < MAX_RETRIES - 1) {
|
|
60
|
+
await sleep(2 ** attempt * 1000);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
throw lastError;
|
|
64
|
+
}
|
|
65
|
+
if (resp.status === 401 || resp.status === 403) {
|
|
66
|
+
const raw = await safeJson(resp);
|
|
67
|
+
throw new AuthenticationError(raw.message ?? 'Authentication failed', raw);
|
|
68
|
+
}
|
|
69
|
+
if (resp.status >= 400) {
|
|
70
|
+
const raw = await safeJson(resp);
|
|
71
|
+
throw new ApiError(resp.status, raw.message ?? 'Request failed', raw);
|
|
72
|
+
}
|
|
73
|
+
return (await resp.json());
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
clearTimeout(timer);
|
|
77
|
+
if (err instanceof ApiError)
|
|
78
|
+
throw err;
|
|
79
|
+
lastError = err;
|
|
80
|
+
if (attempt < MAX_RETRIES - 1) {
|
|
81
|
+
await sleep(2 ** attempt * 1000);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
throw lastError ?? new ApiError(0, 'Request failed after retries');
|
|
87
|
+
}
|
|
88
|
+
// ── Public Methods ────────────────────────────────────────────────────
|
|
89
|
+
async validateAddress(req) {
|
|
90
|
+
const data = await this.request('POST', '/api/validate/address', req);
|
|
91
|
+
return {
|
|
92
|
+
isValid: data.isValid ?? false,
|
|
93
|
+
confidenceScore: data.confidenceScore ?? 0,
|
|
94
|
+
standardizedAddress: data.standardizedAddress ?? {},
|
|
95
|
+
raw: data,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
async validateTaxId(req) {
|
|
99
|
+
const data = await this.request('POST', '/api/validate/taxid', req);
|
|
100
|
+
return {
|
|
101
|
+
isValid: data.isValid ?? false,
|
|
102
|
+
taxIdType: data.taxIdType ?? '',
|
|
103
|
+
country: data.country ?? '',
|
|
104
|
+
registeredName: data.registeredName ?? '',
|
|
105
|
+
raw: data,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
async validateBankAccount(req) {
|
|
109
|
+
const data = await this.request('POST', '/api/validate/bank', req);
|
|
110
|
+
return {
|
|
111
|
+
isValid: data.isValid ?? false,
|
|
112
|
+
bankName: data.bankName ?? '',
|
|
113
|
+
accountType: data.accountType ?? '',
|
|
114
|
+
raw: data,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async lookupBusiness(req) {
|
|
118
|
+
const data = await this.request('POST', '/api/enrich/business', req);
|
|
119
|
+
return {
|
|
120
|
+
found: data.found ?? false,
|
|
121
|
+
companyName: data.companyName ?? '',
|
|
122
|
+
registrationNumber: data.registrationNumber ?? '',
|
|
123
|
+
status: data.status ?? '',
|
|
124
|
+
address: data.address ?? {},
|
|
125
|
+
raw: data,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
async checkSanctions(req) {
|
|
129
|
+
const data = await this.request('POST', '/api/risk/sanctions', req);
|
|
130
|
+
return {
|
|
131
|
+
hasMatches: data.hasMatches ?? false,
|
|
132
|
+
matches: data.matches ?? [],
|
|
133
|
+
screenedLists: data.screenedLists ?? [],
|
|
134
|
+
raw: data,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
async checkDirectors(req) {
|
|
138
|
+
const data = await this.request('POST', '/api/risk/directors', req);
|
|
139
|
+
return {
|
|
140
|
+
hasDisqualified: data.hasDisqualified ?? false,
|
|
141
|
+
directors: data.directors ?? [],
|
|
142
|
+
raw: data,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// ── Helpers ──────────────────────────────────────────────────────────────
|
|
147
|
+
function sleep(ms) {
|
|
148
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
149
|
+
}
|
|
150
|
+
async function safeJson(resp) {
|
|
151
|
+
try {
|
|
152
|
+
return (await resp.json());
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
return {};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,GAAG,EAAE,IAAI;SACV,CAAC;IACJ,CAAC;CACF;AAED,4EAA4E;AAE5E,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,IAAc;IACpC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAA4B,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Base API error with status code and optional raw response. */
|
|
2
|
+
export declare class ApiError extends Error {
|
|
3
|
+
status: number;
|
|
4
|
+
raw: Record<string, unknown>;
|
|
5
|
+
constructor(status: number, message: string, raw?: Record<string, unknown>);
|
|
6
|
+
}
|
|
7
|
+
/** Raised on 401/403 responses. */
|
|
8
|
+
export declare class AuthenticationError extends ApiError {
|
|
9
|
+
constructor(message?: string, raw?: Record<string, unknown>);
|
|
10
|
+
}
|
|
11
|
+
/** Raised on 429 responses. */
|
|
12
|
+
export declare class RateLimitError extends ApiError {
|
|
13
|
+
retryAfter: number | undefined;
|
|
14
|
+
constructor(retryAfter?: number, raw?: Record<string, unknown>);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,qBAAa,QAAS,SAAQ,KAAK;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEjB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3E;AAED,mCAAmC;AACnC,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,OAAO,SAA0B,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI7E;AAED,+BAA+B;AAC/B,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEnB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAK/D"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Base API error with status code and optional raw response. */
|
|
2
|
+
export class ApiError extends Error {
|
|
3
|
+
status;
|
|
4
|
+
raw;
|
|
5
|
+
constructor(status, message, raw) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'ApiError';
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.raw = raw ?? {};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Raised on 401/403 responses. */
|
|
13
|
+
export class AuthenticationError extends ApiError {
|
|
14
|
+
constructor(message = 'Authentication failed', raw) {
|
|
15
|
+
super(401, message, raw);
|
|
16
|
+
this.name = 'AuthenticationError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** Raised on 429 responses. */
|
|
20
|
+
export class RateLimitError extends ApiError {
|
|
21
|
+
retryAfter;
|
|
22
|
+
constructor(retryAfter, raw) {
|
|
23
|
+
super(429, 'Rate limit exceeded', raw);
|
|
24
|
+
this.name = 'RateLimitError';
|
|
25
|
+
this.retryAfter = retryAfter;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,MAAM,CAAS;IACf,GAAG,CAA0B;IAE7B,YAAY,MAAc,EAAE,OAAe,EAAE,GAA6B;QACxE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;IACvB,CAAC;CACF;AAED,mCAAmC;AACnC,MAAM,OAAO,mBAAoB,SAAQ,QAAQ;IAC/C,YAAY,OAAO,GAAG,uBAAuB,EAAE,GAA6B;QAC1E,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,+BAA+B;AAC/B,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C,UAAU,CAAqB;IAE/B,YAAY,UAAmB,EAAE,GAA6B;QAC5D,KAAK,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { QubitOnClient } from './client';
|
|
2
|
+
export type { ClientOptions } from './client';
|
|
3
|
+
export { ApiError, AuthenticationError, RateLimitError } from './errors';
|
|
4
|
+
export type { AddressRequest, AddressResponse, BankAccountRequest, BankAccountResponse, BusinessLookupRequest, BusinessLookupResponse, DirectorsRequest, DirectorsResponse, SanctionsRequest, SanctionsResponse, TaxIdRequest, TaxIdResponse, } from './models';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzE,YAAY,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/models.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface AddressRequest {
|
|
2
|
+
addressLine1: string;
|
|
3
|
+
addressLine2?: string;
|
|
4
|
+
city: string;
|
|
5
|
+
state?: string;
|
|
6
|
+
postalCode?: string;
|
|
7
|
+
country: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AddressResponse {
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
confidenceScore: number;
|
|
12
|
+
standardizedAddress: Record<string, string>;
|
|
13
|
+
raw: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export interface TaxIdRequest {
|
|
16
|
+
taxId: string;
|
|
17
|
+
country: string;
|
|
18
|
+
taxIdType?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TaxIdResponse {
|
|
21
|
+
isValid: boolean;
|
|
22
|
+
taxIdType: string;
|
|
23
|
+
country: string;
|
|
24
|
+
registeredName: string;
|
|
25
|
+
raw: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export interface BankAccountRequest {
|
|
28
|
+
accountNumber: string;
|
|
29
|
+
country: string;
|
|
30
|
+
routingNumber?: string;
|
|
31
|
+
iban?: string;
|
|
32
|
+
bankCode?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface BankAccountResponse {
|
|
35
|
+
isValid: boolean;
|
|
36
|
+
bankName: string;
|
|
37
|
+
accountType: string;
|
|
38
|
+
raw: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export interface BusinessLookupRequest {
|
|
41
|
+
companyName: string;
|
|
42
|
+
country: string;
|
|
43
|
+
registrationNumber?: string;
|
|
44
|
+
state?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface BusinessLookupResponse {
|
|
47
|
+
found: boolean;
|
|
48
|
+
companyName: string;
|
|
49
|
+
registrationNumber: string;
|
|
50
|
+
status: string;
|
|
51
|
+
address: Record<string, string>;
|
|
52
|
+
raw: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
export interface SanctionsRequest {
|
|
55
|
+
entityName: string;
|
|
56
|
+
entityType?: string;
|
|
57
|
+
country?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface SanctionsResponse {
|
|
60
|
+
hasMatches: boolean;
|
|
61
|
+
matches: Record<string, unknown>[];
|
|
62
|
+
screenedLists: string[];
|
|
63
|
+
raw: Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
export interface DirectorsRequest {
|
|
66
|
+
companyName: string;
|
|
67
|
+
country: string;
|
|
68
|
+
registrationNumber?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface DirectorsResponse {
|
|
71
|
+
hasDisqualified: boolean;
|
|
72
|
+
directors: Record<string, unknown>[];
|
|
73
|
+
raw: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAEA,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AAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAID,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACnC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAID,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B"}
|
package/dist/models.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,6EAA6E"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qubiton/sdk",
|
|
3
|
+
"version": "0.1.0-dev.1610",
|
|
4
|
+
"description": "Node.js SDK for the QubitOn API by QubitOn",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"typecheck": "tsc --noEmit"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"api",
|
|
20
|
+
"validation",
|
|
21
|
+
"enrichment",
|
|
22
|
+
"sanctions",
|
|
23
|
+
"qubiton",
|
|
24
|
+
"QubitOn"
|
|
25
|
+
],
|
|
26
|
+
"author": "QubitOn <support@qubiton.com>",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/qubitonhq/qubiton-node"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://www.qubiton.com",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"typescript": "~5.7.0"
|
|
35
|
+
}
|
|
36
|
+
}
|