@artu-ai/compliance-sdk 0.0.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 +131 -0
- package/dist/chunk-5FWX6MJJ.js +23 -0
- package/dist/chunk-5FWX6MJJ.js.map +1 -0
- package/dist/chunk-5M73AGYR.js +22163 -0
- package/dist/chunk-5M73AGYR.js.map +1 -0
- package/dist/chunk-C4N2ALDL.js +23 -0
- package/dist/chunk-C4N2ALDL.js.map +1 -0
- package/dist/chunk-CLRMY27D.js +232 -0
- package/dist/chunk-CLRMY27D.js.map +1 -0
- package/dist/chunk-FT2LSJUD.js +23 -0
- package/dist/chunk-FT2LSJUD.js.map +1 -0
- package/dist/chunk-IKDGGCJO.cjs +26 -0
- package/dist/chunk-IKDGGCJO.cjs.map +1 -0
- package/dist/chunk-J2P6EUCD.cjs +26 -0
- package/dist/chunk-J2P6EUCD.cjs.map +1 -0
- package/dist/chunk-QM2YAOGD.cjs +22316 -0
- package/dist/chunk-QM2YAOGD.cjs.map +1 -0
- package/dist/chunk-X3RBAIDU.cjs +245 -0
- package/dist/chunk-X3RBAIDU.cjs.map +1 -0
- package/dist/chunk-XO3OCPIN.cjs +26 -0
- package/dist/chunk-XO3OCPIN.cjs.map +1 -0
- package/dist/filters-BjYmxK8N.d.cts +6187 -0
- package/dist/filters-BjYmxK8N.d.ts +6187 -0
- package/dist/index-BF15okXT.d.ts +777 -0
- package/dist/index-DeVuMBhV.d.cts +777 -0
- package/dist/index.cjs +365 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/mexico/actividad-vulnerable/avi.cjs +310 -0
- package/dist/mexico/actividad-vulnerable/avi.cjs.map +1 -0
- package/dist/mexico/actividad-vulnerable/avi.d.cts +104 -0
- package/dist/mexico/actividad-vulnerable/avi.d.ts +104 -0
- package/dist/mexico/actividad-vulnerable/avi.js +45 -0
- package/dist/mexico/actividad-vulnerable/avi.js.map +1 -0
- package/dist/mexico/actividad-vulnerable/jys.cjs +315 -0
- package/dist/mexico/actividad-vulnerable/jys.cjs.map +1 -0
- package/dist/mexico/actividad-vulnerable/jys.d.cts +109 -0
- package/dist/mexico/actividad-vulnerable/jys.d.ts +109 -0
- package/dist/mexico/actividad-vulnerable/jys.js +50 -0
- package/dist/mexico/actividad-vulnerable/jys.js.map +1 -0
- package/dist/mexico/actividad-vulnerable/tsc.cjs +309 -0
- package/dist/mexico/actividad-vulnerable/tsc.cjs.map +1 -0
- package/dist/mexico/actividad-vulnerable/tsc.d.cts +103 -0
- package/dist/mexico/actividad-vulnerable/tsc.d.ts +103 -0
- package/dist/mexico/actividad-vulnerable/tsc.js +44 -0
- package/dist/mexico/actividad-vulnerable/tsc.js.map +1 -0
- package/dist/mexico/index.cjs +384 -0
- package/dist/mexico/index.cjs.map +1 -0
- package/dist/mexico/index.d.cts +305 -0
- package/dist/mexico/index.d.ts +305 -0
- package/dist/mexico/index.js +7 -0
- package/dist/mexico/index.js.map +1 -0
- package/package.json +77 -0
package/README.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# @artu-ai/compliance-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the Artu Compliance API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
The SDK is available as a private package on npm.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# npm
|
|
11
|
+
npm install @artu-ai/compliance-sdk
|
|
12
|
+
|
|
13
|
+
# pnpm
|
|
14
|
+
pnpm add @artu-ai/compliance-sdk
|
|
15
|
+
|
|
16
|
+
# yarn
|
|
17
|
+
yarn add @artu-ai/compliance-sdk
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Authentication
|
|
21
|
+
|
|
22
|
+
You'll need to authenticate with npm to access the private package:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm login --scope=@artu-ai
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or add to your `.npmrc`:
|
|
29
|
+
|
|
30
|
+
```ini
|
|
31
|
+
//registry.npmjs.org/:_authToken=YOUR_NPM_TOKEN
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import {
|
|
38
|
+
ComplianceSDK,
|
|
39
|
+
ClientType,
|
|
40
|
+
Jurisdiction,
|
|
41
|
+
Mexico,
|
|
42
|
+
} from "@artu-ai/compliance-sdk";
|
|
43
|
+
|
|
44
|
+
// Initialize the SDK
|
|
45
|
+
const sdk = new ComplianceSDK({
|
|
46
|
+
apiKey: process.env.COMPLIANCE_API_KEY!,
|
|
47
|
+
environment: "test", // "test" | "production"
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Create a client
|
|
51
|
+
const client = await sdk.clients.create({
|
|
52
|
+
type: ClientType.Person,
|
|
53
|
+
name: "Juan García",
|
|
54
|
+
primaryJurisdiction: Jurisdiction.Mexico,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// List transactions with pagination
|
|
58
|
+
for await (const txn of sdk.transactions.iterate()) {
|
|
59
|
+
console.log(txn.id, txn.amount);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Access Mexico-specific functionality
|
|
63
|
+
Mexico.Enums.ActividadEconomica;
|
|
64
|
+
Mexico.Validators.Rfc.validate("...");
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Exports
|
|
68
|
+
|
|
69
|
+
### Main Entry Point
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
import {
|
|
73
|
+
ComplianceSDK,
|
|
74
|
+
ClientType,
|
|
75
|
+
Jurisdiction,
|
|
76
|
+
} from "@artu-ai/compliance-sdk";
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Mexico-Specific
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import { ComplianceSDK } from "@artu-ai/compliance-sdk/mexico";
|
|
83
|
+
|
|
84
|
+
// Or for specific activity types
|
|
85
|
+
import { ComplianceSDK } from "@artu-ai/compliance-sdk/mexico/actividad-vulnerable/jys";
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## API Reference
|
|
89
|
+
|
|
90
|
+
### ComplianceSDK
|
|
91
|
+
|
|
92
|
+
The main entry point for the SDK.
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
const sdk = new ComplianceSDK({
|
|
96
|
+
apiKey: string; // Your API key
|
|
97
|
+
environment?: "test" | "live"; // Default: "live"
|
|
98
|
+
baseUrl?: string; // Optional custom base URL
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Resources
|
|
103
|
+
|
|
104
|
+
- `sdk.clients` - Manage clients (individuals, companies, trusts)
|
|
105
|
+
- `sdk.transactions` - Manage transactions
|
|
106
|
+
- `sdk.reports` - Generate and submit compliance reports
|
|
107
|
+
- `sdk.bankAccounts` - Manage bank accounts
|
|
108
|
+
- `sdk.contactMethods` - Manage contact methods
|
|
109
|
+
|
|
110
|
+
### Models
|
|
111
|
+
|
|
112
|
+
All resources return model instances with helper methods:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
const client = await sdk.clients.retrieve("client_123");
|
|
116
|
+
|
|
117
|
+
// Type guards
|
|
118
|
+
if (client.isIndividual()) {
|
|
119
|
+
console.log(client.data.dateOfBirth);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Refresh data
|
|
123
|
+
await client.refresh();
|
|
124
|
+
|
|
125
|
+
// Update
|
|
126
|
+
await client.update({ name: "New Name" });
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
UNLICENSED - Private package for Artu AI organization members only.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComplianceSDKImpl, registerScope, MexAddressesResource, MexBankAccountsResource, TSCReportsResource, TSCTransactionsResource, TSCClientsResource } from './chunk-5M73AGYR.js';
|
|
2
|
+
|
|
3
|
+
// src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts
|
|
4
|
+
var TSCComplianceSDKScoped = class extends ComplianceSDKImpl {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
super({ ...options, jurisdiction: "MX", actividadVulnerable: "TSC" });
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// src/sdk/mex/actividad-vulnerable/tsc/types.ts
|
|
11
|
+
function registerTSCScope() {
|
|
12
|
+
registerScope("MX:TSC", {
|
|
13
|
+
clients: (config) => new TSCClientsResource(config),
|
|
14
|
+
transactions: (config) => new TSCTransactionsResource(config),
|
|
15
|
+
reports: (config) => new TSCReportsResource(config),
|
|
16
|
+
bankAccounts: (config) => new MexBankAccountsResource(config),
|
|
17
|
+
addresses: (config) => new MexAddressesResource(config)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { TSCComplianceSDKScoped, registerTSCScope };
|
|
22
|
+
//# sourceMappingURL=chunk-5FWX6MJJ.js.map
|
|
23
|
+
//# sourceMappingURL=chunk-5FWX6MJJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts","../src/sdk/mex/actividad-vulnerable/tsc/types.ts"],"names":[],"mappings":";;;AA6BO,IAAM,sBAAA,GAAN,cAAqC,iBAAA,CAAkB;AAAA,EAC5D,YAAY,OAAA,EAA8B;AACxC,IAAA,KAAA,CAAM,EAAE,GAAG,OAAA,EAAS,cAAc,IAAA,EAAM,mBAAA,EAAqB,OAAO,CAAA;AAAA,EACtE;AACF;;;ACyBO,SAAS,gBAAA,GAAyB;AACvC,EAAA,aAAA,CAAc,QAAA,EAAU;AAAA,IACtB,OAAA,EAAS,CAAC,MAAA,KAAW,IAAI,mBAAmB,MAAM,CAAA;AAAA,IAClD,YAAA,EAAc,CAAC,MAAA,KAAW,IAAI,wBAAwB,MAAM,CAAA;AAAA,IAC5D,OAAA,EAAS,CAAC,MAAA,KACR,IAAI,mBAAmB,MAAM,CAAA;AAAA,IAC/B,YAAA,EAAc,CAAC,MAAA,KAAW,IAAI,wBAAwB,MAAM,CAAA;AAAA,IAC5D,SAAA,EAAW,CAAC,MAAA,KAAW,IAAI,qBAAqB,MAAM;AAAA,GACvD,CAAA;AACH","file":"chunk-5FWX6MJJ.js","sourcesContent":["/**\n * TSC-scoped ComplianceSDK\n *\n * Pre-configured SDK for Mexico jurisdiction and Tarjetas de Servicio y Crédito (TSC) activity.\n */\n\nimport { ComplianceSDKImpl } from \"../../../ComplianceSDK\";\nimport type { TSCScopedSDKOptions } from \"./types\";\n\n/**\n * TSC-scoped ComplianceSDK.\n * Pre-configured for Mexico jurisdiction and Tarjetas de Servicio y Crédito (TSC) activity.\n *\n * @example\n * ```typescript\n * import { ComplianceSDK } from \"@artu/compliance-sdk/mexico/actividad-vulnerable/tsc\";\n *\n * const sdk = new ComplianceSDK({\n * apiKey: process.env.API_KEY!,\n * environment: \"test\",\n * });\n *\n * // Already scoped - no need to specify jurisdiction/activity\n * const client = await sdk.clients.create({\n * type: ClientType.Person,\n * name: \"Juan García\",\n * });\n * ```\n */\nexport class TSCComplianceSDKScoped extends ComplianceSDKImpl {\n constructor(options: TSCScopedSDKOptions) {\n super({ ...options, jurisdiction: \"MX\", actividadVulnerable: \"TSC\" });\n }\n}\n","/**\n * TSC SDK Types & Registration\n *\n * Tarjetas de Servicios y Crédito (Service and Credit Cards) - prepaid cards, etc.\n */\n\nimport { Jurisdiction, CodigoActividad } from \"@artu-ai/shared\";\nimport type { ComplianceSDKOptionsBase } from \"../../../types\";\nimport type { MexicoComplianceSDK } from \"../../types\";\nimport {\n TSCClientsResource,\n TSCTransactionsResource,\n TSCReportsResource,\n MexBankAccountsResource,\n MexAddressesResource,\n} from \"../../../../resources\";\nimport { registerScope } from \"../../../resource-registry\";\nimport type { ReportsResource } from \"../../../../resources/reports\";\n\n// ===========================\n// SDK Options\n// ===========================\n\n/**\n * Options for creating a TSC-scoped SDK\n */\nexport interface TSCSDKOptions extends ComplianceSDKOptionsBase {\n jurisdiction: typeof Jurisdiction.Mexico | \"MX\";\n actividadVulnerable: typeof CodigoActividad.TSC | \"TSC\";\n}\n\n/**\n * Options for TSC-scoped SDK (without jurisdiction/activity - pre-configured)\n */\nexport type TSCScopedSDKOptions = Omit<\n ComplianceSDKOptionsBase,\n \"jurisdiction\" | \"actividadVulnerable\"\n>;\n\n// ===========================\n// Typed SDK Interface\n// ===========================\n\n/**\n * Mexico TSC-scoped SDK - uses TSC resource types\n * Extends MexicoComplianceSDK with TSC-specific overrides\n */\nexport interface TSCComplianceSDK\n extends Omit<MexicoComplianceSDK, \"clients\" | \"transactions\" | \"reports\"> {\n readonly clients: TSCClientsResource;\n readonly transactions: TSCTransactionsResource;\n readonly reports: TSCReportsResource;\n}\n\n// ===========================\n// Registration\n// ===========================\n\nexport function registerTSCScope(): void {\n registerScope(\"MX:TSC\", {\n clients: (config) => new TSCClientsResource(config),\n transactions: (config) => new TSCTransactionsResource(config),\n reports: (config) =>\n new TSCReportsResource(config) as unknown as ReportsResource,\n bankAccounts: (config) => new MexBankAccountsResource(config),\n addresses: (config) => new MexAddressesResource(config),\n });\n}\n"]}
|