@artu-ai/compliance-sdk 0.4.0 → 0.4.2

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.
Files changed (110) hide show
  1. package/package.json +4 -5
  2. package/src/errors/api.ts +0 -305
  3. package/src/errors/base.ts +0 -127
  4. package/src/errors/index.ts +0 -63
  5. package/src/errors/upload.ts +0 -204
  6. package/src/errors/validation.ts +0 -163
  7. package/src/exports/base.ts +0 -139
  8. package/src/exports/index.ts +0 -187
  9. package/src/exports/mexico/actividad-vulnerable/avi.ts +0 -207
  10. package/src/exports/mexico/actividad-vulnerable/jys.ts +0 -214
  11. package/src/exports/mexico/actividad-vulnerable/tsc.ts +0 -202
  12. package/src/exports/mexico/index.ts +0 -215
  13. package/src/models/Address.ts +0 -235
  14. package/src/models/BankAccount.ts +0 -235
  15. package/src/models/Client.ts +0 -363
  16. package/src/models/ContactMethod.ts +0 -197
  17. package/src/models/Document.ts +0 -355
  18. package/src/models/LinkedClient.ts +0 -84
  19. package/src/models/Report.ts +0 -193
  20. package/src/models/ReportItem.ts +0 -211
  21. package/src/models/Transaction.ts +0 -219
  22. package/src/models/base.ts +0 -56
  23. package/src/models/index.ts +0 -148
  24. package/src/models/mex/MexAddress.ts +0 -184
  25. package/src/models/mex/MexBankAccount.ts +0 -121
  26. package/src/models/mex/MexClient.ts +0 -177
  27. package/src/models/mex/MexDocument.ts +0 -890
  28. package/src/models/mex/MexReport.ts +0 -99
  29. package/src/models/mex/MexReportItem.ts +0 -79
  30. package/src/models/mex/MexTransaction.ts +0 -105
  31. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableClient.ts +0 -66
  32. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReport.ts +0 -73
  33. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +0 -74
  34. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.ts +0 -50
  35. package/src/models/mex/actividad-vulnerable/avi/MexAVIClient.ts +0 -80
  36. package/src/models/mex/actividad-vulnerable/avi/MexAVIReport.ts +0 -114
  37. package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +0 -105
  38. package/src/models/mex/actividad-vulnerable/avi/MexAVITransaction.ts +0 -157
  39. package/src/models/mex/actividad-vulnerable/index.ts +0 -78
  40. package/src/models/mex/actividad-vulnerable/jys/MexJYSClient.ts +0 -73
  41. package/src/models/mex/actividad-vulnerable/jys/MexJYSReport.ts +0 -114
  42. package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +0 -105
  43. package/src/models/mex/actividad-vulnerable/jys/MexJYSTransaction.ts +0 -178
  44. package/src/models/mex/actividad-vulnerable/tsc/MexTSCClient.ts +0 -73
  45. package/src/models/mex/actividad-vulnerable/tsc/MexTSCReport.ts +0 -114
  46. package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +0 -105
  47. package/src/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.ts +0 -104
  48. package/src/models/mex/index.ts +0 -57
  49. package/src/models/types.ts +0 -196
  50. package/src/namespaces/index.ts +0 -29
  51. package/src/namespaces/mexico/actividad-vulnerable/avi/index.ts +0 -62
  52. package/src/namespaces/mexico/actividad-vulnerable/index.ts +0 -79
  53. package/src/namespaces/mexico/actividad-vulnerable/jys/index.ts +0 -72
  54. package/src/namespaces/mexico/actividad-vulnerable/tsc/index.ts +0 -60
  55. package/src/namespaces/mexico/index.ts +0 -325
  56. package/src/resources/addresses.ts +0 -391
  57. package/src/resources/bank-accounts.ts +0 -417
  58. package/src/resources/base.ts +0 -327
  59. package/src/resources/clients.ts +0 -808
  60. package/src/resources/contact-methods.ts +0 -412
  61. package/src/resources/documents.ts +0 -688
  62. package/src/resources/index.ts +0 -40
  63. package/src/resources/mex/actividad-vulnerable/avi/clients.ts +0 -559
  64. package/src/resources/mex/actividad-vulnerable/avi/index.ts +0 -7
  65. package/src/resources/mex/actividad-vulnerable/avi/reports.ts +0 -609
  66. package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +0 -404
  67. package/src/resources/mex/actividad-vulnerable/index.ts +0 -12
  68. package/src/resources/mex/actividad-vulnerable/jys/clients.ts +0 -445
  69. package/src/resources/mex/actividad-vulnerable/jys/index.ts +0 -7
  70. package/src/resources/mex/actividad-vulnerable/jys/reports.ts +0 -591
  71. package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +0 -395
  72. package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +0 -445
  73. package/src/resources/mex/actividad-vulnerable/tsc/index.ts +0 -7
  74. package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +0 -591
  75. package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +0 -404
  76. package/src/resources/mex/addresses.ts +0 -493
  77. package/src/resources/mex/bank-accounts.ts +0 -283
  78. package/src/resources/mex/clients.ts +0 -758
  79. package/src/resources/mex/ebr.ts +0 -621
  80. package/src/resources/mex/index.ts +0 -23
  81. package/src/resources/mex/reports.ts +0 -643
  82. package/src/resources/mex/transactions.ts +0 -422
  83. package/src/resources/reports.ts +0 -515
  84. package/src/resources/transactions.ts +0 -358
  85. package/src/sdk/ComplianceSDK.ts +0 -812
  86. package/src/sdk/base.ts +0 -43
  87. package/src/sdk/index.ts +0 -98
  88. package/src/sdk/mex/ComplianceSDK.ts +0 -147
  89. package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +0 -55
  90. package/src/sdk/mex/actividad-vulnerable/avi/index.ts +0 -16
  91. package/src/sdk/mex/actividad-vulnerable/avi/types.ts +0 -86
  92. package/src/sdk/mex/actividad-vulnerable/index.ts +0 -58
  93. package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +0 -54
  94. package/src/sdk/mex/actividad-vulnerable/jys/index.ts +0 -16
  95. package/src/sdk/mex/actividad-vulnerable/jys/types.ts +0 -86
  96. package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +0 -54
  97. package/src/sdk/mex/actividad-vulnerable/tsc/index.ts +0 -16
  98. package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +0 -86
  99. package/src/sdk/mex/index.ts +0 -66
  100. package/src/sdk/mex/types.ts +0 -88
  101. package/src/sdk/resource-registry.ts +0 -204
  102. package/src/sdk/sdk-registry.ts +0 -99
  103. package/src/sdk/types.ts +0 -304
  104. package/src/utils/environment.ts +0 -187
  105. package/src/utils/filters.ts +0 -412
  106. package/src/utils/index.ts +0 -134
  107. package/src/utils/pagination.ts +0 -143
  108. package/src/utils/session.ts +0 -303
  109. package/src/utils/trpc-client.ts +0 -242
  110. package/src/utils/upload.ts +0 -388
package/src/sdk/base.ts DELETED
@@ -1,43 +0,0 @@
1
- /**
2
- * Base SDK Types & Registration
3
- *
4
- * Unscoped/default SDK types and resource factory registration.
5
- */
6
-
7
- import type { ComplianceSDKOptionsBase } from "./types";
8
- import {
9
- ClientsResource,
10
- TransactionsResource,
11
- ReportsResource,
12
- BankAccountsResource,
13
- AddressesResource,
14
- } from "../resources";
15
- import { registerScope } from "./resource-registry";
16
-
17
- // ===========================
18
- // SDK Options
19
- // ===========================
20
-
21
- /**
22
- * Options for creating an unscoped SDK
23
- */
24
- export type UnscopedSDKOptions = ComplianceSDKOptionsBase & {
25
- jurisdiction?: undefined;
26
- };
27
-
28
- // ===========================
29
- // Registration
30
- // ===========================
31
-
32
- /**
33
- * Registers the base (unscoped) resource factories
34
- */
35
- export function registerBaseScope(): void {
36
- registerScope("base", {
37
- clients: (config) => new ClientsResource(config),
38
- transactions: (config) => new TransactionsResource(config),
39
- reports: (config) => new ReportsResource(config),
40
- bankAccounts: (config) => new BankAccountsResource(config),
41
- addresses: (config) => new AddressesResource(config),
42
- });
43
- }
package/src/sdk/index.ts DELETED
@@ -1,98 +0,0 @@
1
- /**
2
- * SDK Core Module
3
- *
4
- * Core SDK infrastructure including types, registry, and scope registrations.
5
- * Organized by jurisdiction with barrel exports.
6
- */
7
-
8
- // ===========================
9
- // Core Types
10
- // ===========================
11
-
12
- export {
13
- type Environment,
14
- type ComplianceSDKOptionsBase,
15
- type ComplianceAuthOptions,
16
- type ComplianceAuthMode,
17
- type FetchCredentials,
18
- type ComplianceAPIKeyAuth,
19
- type ComplianceCookieAuth,
20
- type SDKScope,
21
- type SDKScopeBase,
22
- type SDKScopeMexico,
23
- isMexicoScope,
24
- buildScope,
25
- } from "./types";
26
-
27
- export type { SessionInfo } from "../utils/session";
28
-
29
- // ===========================
30
- // Registry
31
- // ===========================
32
-
33
- export {
34
- type ResourceFactory,
35
- type ScopeResourceFactories,
36
- registerScope,
37
- getResourceFactories,
38
- getScopeKey,
39
- hasScope,
40
- getRegisteredScopes,
41
- clearRegistry,
42
- } from "./resource-registry";
43
-
44
- // ===========================
45
- // Base (Unscoped)
46
- // ===========================
47
-
48
- export { type UnscopedSDKOptions, registerBaseScope } from "./base";
49
-
50
- // ===========================
51
- // Mexico
52
- // ===========================
53
-
54
- export {
55
- // Types
56
- type ComplianceSDKOptionsMexico,
57
- type MexicoSDKOptions,
58
- type MexicoComplianceSDK,
59
- type AVISDKOptions,
60
- type AVIComplianceSDK,
61
- type JYSSDKOptions,
62
- type JYSComplianceSDK,
63
- type TSCSDKOptions,
64
- type TSCComplianceSDK,
65
- // Registration
66
- registerMexicoScopes,
67
- } from "./mex";
68
-
69
- // ===========================
70
- // Initialize All Scopes
71
- // ===========================
72
-
73
- import { registerBaseScope } from "./base";
74
- import { registerMexicoScopes } from "./mex";
75
-
76
- /**
77
- * Registers all SDK scopes.
78
- * Called automatically when the SDK module is imported.
79
- */
80
- export function initializeRegistry(): void {
81
- registerBaseScope();
82
- registerMexicoScopes();
83
- }
84
-
85
- // Auto-initialize on import
86
- initializeRegistry();
87
-
88
- // ===========================
89
- // ComplianceSDK
90
- // ===========================
91
-
92
- export {
93
- ComplianceSDK,
94
- ComplianceSDKImpl,
95
- type ComplianceSDKOptions,
96
- type ComplianceSDKConstructor,
97
- type UnscopedComplianceSDK,
98
- } from "./ComplianceSDK";
@@ -1,147 +0,0 @@
1
- /**
2
- * Mexico-scoped ComplianceSDK
3
- *
4
- * Provides Mexico-specific resources like EBR (Expediente de Beneficiario Real).
5
- */
6
-
7
- import { ComplianceSDKImpl } from "../ComplianceSDK";
8
- import type {
9
- MexicoScopedSDKOptions,
10
- ComplianceSDKOptionsMexico,
11
- } from "./types";
12
- import { EBRResource } from "../../resources/mex/ebr";
13
- import type { MexClientsResource } from "../../resources/mex/clients";
14
- import type { MexTransactionsResource } from "../../resources/mex/transactions";
15
- import type { MexReportsResource } from "../../resources/mex/reports";
16
- import type { MexBankAccountsResource } from "../../resources/mex/bank-accounts";
17
- import type { MexAddressesResource } from "../../resources/mex/addresses";
18
-
19
- /**
20
- * Mexico ComplianceSDK Implementation.
21
- *
22
- * Extends the base SDK with Mexico-specific resources.
23
- * This class is used when you create a ComplianceSDK with `jurisdiction: "MX"`.
24
- *
25
- * Registration is handled by `registerMexicoScopes()` in `./index.ts`.
26
- *
27
- * @example
28
- * ```typescript
29
- * const sdk = new ComplianceSDK({
30
- * apiKey: process.env.API_KEY!,
31
- * environment: "test",
32
- * jurisdiction: "MX",
33
- * });
34
- *
35
- * // Mexico-specific EBR resource is available
36
- * console.log(sdk.ebr); // EbrResource instance
37
- * ```
38
- */
39
- export class MexicoComplianceSDKImpl extends ComplianceSDKImpl {
40
- // ─────────────────────────────────────────────────────────────────
41
- // Override resource types with Mexico-specific types
42
- // The registry creates these at runtime, we just need correct types
43
- // Note: @ts-expect-error is needed due to sort type parameter variance
44
- // (MexClientSort vs ClientSort in list method parameters)
45
- // ─────────────────────────────────────────────────────────────────
46
-
47
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
48
- declare public readonly clients: MexClientsResource;
49
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
50
- declare public readonly transactions: MexTransactionsResource;
51
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
52
- declare public readonly reports: MexReportsResource;
53
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
54
- declare public readonly bankAccounts: MexBankAccountsResource;
55
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
56
- declare public readonly addresses: MexAddressesResource;
57
-
58
- /**
59
- * EBR (Expediente de Beneficiario Real) resource.
60
- *
61
- * Mexico-only resource for managing beneficial owner records.
62
- */
63
- public readonly ebr: EBRResource;
64
-
65
- constructor(options: ComplianceSDKOptionsMexico) {
66
- super(options);
67
-
68
- // Add Mexico-specific resources
69
- this.ebr = new EBRResource({
70
- trpc: this.trpc,
71
- scope: this._scope,
72
- environment: this.environment,
73
- });
74
- }
75
- }
76
-
77
- /**
78
- * Mexico-scoped ComplianceSDK (convenience class).
79
- * Pre-configured for Mexico jurisdiction - no need to specify jurisdiction in options.
80
- *
81
- * Includes Mexico-specific resources:
82
- * - `ebr` - EBR (Evaluación Basada en Riesgos) for AML/KYC risk evaluation
83
- *
84
- * @example
85
- * ```typescript
86
- * import { ComplianceSDK } from "@artu/compliance-sdk/mexico";
87
- *
88
- * const sdk = new ComplianceSDK({
89
- * apiKey: process.env.API_KEY!,
90
- * environment: "test",
91
- * });
92
- *
93
- * // Already scoped to Mexico - no need to specify jurisdiction
94
- * const client = await sdk.clients.create({
95
- * type: ClientType.Person,
96
- * name: "Juan García",
97
- * });
98
- *
99
- * // Access Mexico-specific EBR resource
100
- * const weights = sdk.ebr.presets.suggested();
101
- * ```
102
- */
103
- export class MexicoComplianceSDKScoped extends MexicoComplianceSDKImpl {
104
- // Resource types inherited from MexicoComplianceSDKImpl (already Mexico-typed)
105
-
106
- /**
107
- * EBR (Evaluación Basada en Riesgos) resource manager.
108
- *
109
- * Provides risk-based evaluation methodology for AML/KYC compliance
110
- * as required by Mexican LFPIORPI regulations.
111
- *
112
- * Key features:
113
- * - Immutable configurations (append-only for audit trail)
114
- * - Scope-aware (global or activity-specific)
115
- * - Weight presets for all 15 Actividades Vulnerables
116
- * - Risk level mapping (5 internal → 3 regulatory)
117
- *
118
- * @example
119
- * ```typescript
120
- * // Create EBR configuration
121
- * const config = await sdk.ebr.create({
122
- * weights: { client: 0.25, geographic: 0.35, product: 0.20, transactional: 0.20 },
123
- * thresholds: sdk.ebr.thresholds.defaults,
124
- * justification: "Initial configuration Q4 2024",
125
- * });
126
- *
127
- * // Get suggested preset for current activity
128
- * const suggested = sdk.ebr.presets.suggested();
129
- *
130
- * // Map risk level for regulatory reporting
131
- * const regulatory = sdk.ebr.riskLevel.mapToRegulatory("muy_alto"); // "alto"
132
- * ```
133
- */
134
- public readonly ebr: EBRResource;
135
-
136
- constructor(options: MexicoScopedSDKOptions) {
137
- const { actividadVulnerable, ...baseOptions } = options;
138
- super({ ...baseOptions, jurisdiction: "MX", actividadVulnerable });
139
-
140
- // Initialize Mexico-specific resources
141
- this.ebr = new EBRResource({
142
- trpc: this.trpc,
143
- scope: this.scope,
144
- environment: this.environment,
145
- });
146
- }
147
- }
@@ -1,55 +0,0 @@
1
- /**
2
- * AVI-scoped ComplianceSDK
3
- *
4
- * Pre-configured SDK for Mexico jurisdiction and Activos Virtuales (AVI) activity.
5
- * Extends MexicoComplianceSDKScoped to inherit Mexico-specific resources like EBR.
6
- */
7
-
8
- import { MexicoComplianceSDKScoped } from "../../ComplianceSDK";
9
- import type { AVIScopedSDKOptions } from "./types";
10
- import type { AVIClientsResource } from "../../../../resources/mex/actividad-vulnerable/avi/clients";
11
- import type { AVITransactionsResource } from "../../../../resources/mex/actividad-vulnerable/avi/transactions";
12
- import type { AVIReportsResource } from "../../../../resources/mex/actividad-vulnerable/avi/reports";
13
-
14
- /**
15
- * AVI-scoped ComplianceSDK.
16
- * Pre-configured for Mexico jurisdiction and Activos Virtuales (AVI) activity.
17
- *
18
- * Inherits Mexico-specific resources:
19
- * - `ebr` - EBR (Evaluación Basada en Riesgos) for AML/KYC risk evaluation
20
- *
21
- * @example
22
- * ```typescript
23
- * import { ComplianceSDK } from "@artu/compliance-sdk/mexico/actividad-vulnerable/avi";
24
- *
25
- * const sdk = new ComplianceSDK({
26
- * apiKey: process.env.API_KEY!,
27
- * environment: "test",
28
- * });
29
- *
30
- * // Already scoped - no need to specify jurisdiction/activity
31
- * const client = await sdk.clients.create({
32
- * type: ClientType.Person,
33
- * name: "Juan García",
34
- * });
35
- *
36
- * // Access inherited EBR resource
37
- * const weights = sdk.ebr.presets.suggested();
38
- * ```
39
- */
40
- export class AVIComplianceSDKScoped extends MexicoComplianceSDKScoped {
41
- // Override resource types with AVI-specific types
42
- // The registry creates these at runtime, we just need correct types
43
- // Note: @ts-expect-error is needed due to sort type parameter variance
44
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
45
- declare public readonly clients: AVIClientsResource;
46
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
47
- declare public readonly transactions: AVITransactionsResource;
48
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
49
- declare public readonly reports: AVIReportsResource;
50
- // addresses and bankAccounts inherited from MexicoComplianceSDKImpl (MexAddressesResource, MexBankAccountsResource)
51
-
52
- constructor(options: AVIScopedSDKOptions) {
53
- super({ ...options, actividadVulnerable: "AVI" });
54
- }
55
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * AVI SDK Module
3
- *
4
- * Exports types, registration, and scoped SDK for Activos Virtuales.
5
- */
6
-
7
- // Types and registration
8
- export {
9
- type AVISDKOptions,
10
- type AVIScopedSDKOptions,
11
- type AVIComplianceSDK,
12
- registerAVIScope,
13
- } from "./types";
14
-
15
- // Scoped SDK class
16
- export { AVIComplianceSDKScoped } from "./ComplianceSDK";
@@ -1,86 +0,0 @@
1
- /**
2
- * AVI SDK Types & Registration
3
- *
4
- * Activos Virtuales (Virtual Assets) - cryptocurrency exchanges, wallets, etc.
5
- */
6
-
7
- import { Jurisdiction, CodigoActividad } from "@artu-ai/shared";
8
- import type {
9
- ComplianceSDKOptionsBase,
10
- DistributiveOmit,
11
- } from "../../../types";
12
- import type { MexicoComplianceSDK } from "../../types";
13
- import {
14
- AVIClientsResource,
15
- AVITransactionsResource,
16
- AVIReportsResource,
17
- MexBankAccountsResource,
18
- MexAddressesResource,
19
- } from "../../../../resources";
20
- import { registerScope } from "../../../resource-registry";
21
- import type { ClientsResource } from "../../../../resources/clients";
22
- import type { TransactionsResource } from "../../../../resources/transactions";
23
- import type { ReportsResource } from "../../../../resources/reports";
24
- import type { BankAccountsResource } from "../../../../resources/bank-accounts";
25
- import type { AddressesResource } from "../../../../resources/addresses";
26
- import type { EBRResource } from "../../../../resources/mex/ebr";
27
-
28
- // ===========================
29
- // SDK Options
30
- // ===========================
31
-
32
- /**
33
- * Options for creating an AVI-scoped SDK
34
- */
35
- export type AVISDKOptions = ComplianceSDKOptionsBase & {
36
- jurisdiction: typeof Jurisdiction.Mexico | "MX";
37
- actividadVulnerable: typeof CodigoActividad.AVI | "AVI";
38
- };
39
-
40
- /**
41
- * Options for AVI-scoped SDK (without jurisdiction/activity - pre-configured)
42
- */
43
- export type AVIScopedSDKOptions = DistributiveOmit<
44
- ComplianceSDKOptionsBase,
45
- "jurisdiction" | "actividadVulnerable"
46
- >;
47
-
48
- // ===========================
49
- // Typed SDK Interface
50
- // ===========================
51
-
52
- /**
53
- * Mexico AVI-scoped SDK - uses AVI resource types
54
- * Extends MexicoComplianceSDK with AVI-specific overrides
55
- */
56
- export interface AVIComplianceSDK extends Omit<
57
- MexicoComplianceSDK,
58
- "clients" | "transactions" | "reports"
59
- > {
60
- readonly clients: AVIClientsResource;
61
- readonly transactions: AVITransactionsResource;
62
- readonly reports: AVIReportsResource;
63
- readonly bankAccounts: MexBankAccountsResource;
64
- /** EBR resource for risk-based evaluation */
65
- readonly ebr: EBRResource;
66
- }
67
-
68
- // ===========================
69
- // Registration
70
- // ===========================
71
-
72
- export function registerAVIScope(): void {
73
- // Note: Casts needed due to sort type parameter variance between scoped and base resources
74
- registerScope("MX:AVI", {
75
- clients: (config) =>
76
- new AVIClientsResource(config) as unknown as ClientsResource,
77
- transactions: (config) =>
78
- new AVITransactionsResource(config) as unknown as TransactionsResource,
79
- reports: (config) =>
80
- new AVIReportsResource(config) as unknown as ReportsResource,
81
- bankAccounts: (config) =>
82
- new MexBankAccountsResource(config) as unknown as BankAccountsResource,
83
- addresses: (config) =>
84
- new MexAddressesResource(config) as unknown as AddressesResource,
85
- });
86
- }
@@ -1,58 +0,0 @@
1
- /**
2
- * Actividad Vulnerable SDK Types & Registrations
3
- *
4
- * Barrel export for all activity-specific SDK types, registrations, and scoped SDKs.
5
- */
6
-
7
- // ===========================
8
- // AVI
9
- // ===========================
10
-
11
- export {
12
- type AVISDKOptions,
13
- type AVIScopedSDKOptions,
14
- type AVIComplianceSDK,
15
- registerAVIScope,
16
- AVIComplianceSDKScoped,
17
- } from "./avi";
18
-
19
- // ===========================
20
- // JYS
21
- // ===========================
22
-
23
- export {
24
- type JYSSDKOptions,
25
- type JYSScopedSDKOptions,
26
- type JYSComplianceSDK,
27
- registerJYSScope,
28
- JYSComplianceSDKScoped,
29
- } from "./jys";
30
-
31
- // ===========================
32
- // TSC
33
- // ===========================
34
-
35
- export {
36
- type TSCSDKOptions,
37
- type TSCScopedSDKOptions,
38
- type TSCComplianceSDK,
39
- registerTSCScope,
40
- TSCComplianceSDKScoped,
41
- } from "./tsc";
42
-
43
- // ===========================
44
- // Register All Activities
45
- // ===========================
46
-
47
- import { registerAVIScope } from "./avi";
48
- import { registerJYSScope } from "./jys";
49
- import { registerTSCScope } from "./tsc";
50
-
51
- /**
52
- * Registers all Actividad Vulnerable activity scopes
53
- */
54
- export function registerActividadVulnerableScopes(): void {
55
- registerAVIScope();
56
- registerJYSScope();
57
- registerTSCScope();
58
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * JYS-scoped ComplianceSDK
3
- *
4
- * Pre-configured SDK for Mexico jurisdiction and Joyas y Relojes (JYS) activity.
5
- * Extends MexicoComplianceSDKScoped to inherit Mexico-specific resources like EBR.
6
- */
7
-
8
- import { MexicoComplianceSDKScoped } from "../../ComplianceSDK";
9
- import type { JYSScopedSDKOptions } from "./types";
10
- import type { JYSClientsResource } from "../../../../resources/mex/actividad-vulnerable/jys/clients";
11
- import type { JYSTransactionsResource } from "../../../../resources/mex/actividad-vulnerable/jys/transactions";
12
- import type { JYSReportsResource } from "../../../../resources/mex/actividad-vulnerable/jys/reports";
13
-
14
- /**
15
- * JYS-scoped ComplianceSDK.
16
- * Pre-configured for Mexico jurisdiction and Joyas y Relojes (JYS) activity.
17
- *
18
- * Inherits Mexico-specific resources:
19
- * - `ebr` - EBR (Evaluación Basada en Riesgos) for AML/KYC risk evaluation
20
- *
21
- * @example
22
- * ```typescript
23
- * import { ComplianceSDK } from "@artu/compliance-sdk/mexico/actividad-vulnerable/jys";
24
- *
25
- * const sdk = new ComplianceSDK({
26
- * apiKey: process.env.API_KEY!,
27
- * environment: "test",
28
- * });
29
- *
30
- * // Already scoped - no need to specify jurisdiction/activity
31
- * const client = await sdk.clients.create({
32
- * type: ClientType.Person,
33
- * name: "Juan García",
34
- * });
35
- *
36
- * // Access inherited EBR resource
37
- * const weights = sdk.ebr.presets.suggested();
38
- * ```
39
- */
40
- export class JYSComplianceSDKScoped extends MexicoComplianceSDKScoped {
41
- // Override resource types with JYS-specific types
42
- // The registry creates these at runtime, we just need correct types
43
- // Note: @ts-expect-error is needed for some overrides due to sort type parameter variance
44
- declare public readonly clients: JYSClientsResource;
45
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
46
- declare public readonly transactions: JYSTransactionsResource;
47
- // @ts-expect-error - Runtime type is correct, variance issue with sort types
48
- declare public readonly reports: JYSReportsResource;
49
- // addresses and bankAccounts inherited from MexicoComplianceSDKImpl (MexAddressesResource, MexBankAccountsResource)
50
-
51
- constructor(options: JYSScopedSDKOptions) {
52
- super({ ...options, actividadVulnerable: "JYS" });
53
- }
54
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * JYS SDK Module
3
- *
4
- * Exports types, registration, and scoped SDK for Joyas y Sorteos.
5
- */
6
-
7
- // Types and registration
8
- export {
9
- type JYSSDKOptions,
10
- type JYSScopedSDKOptions,
11
- type JYSComplianceSDK,
12
- registerJYSScope,
13
- } from "./types";
14
-
15
- // Scoped SDK class
16
- export { JYSComplianceSDKScoped } from "./ComplianceSDK";
@@ -1,86 +0,0 @@
1
- /**
2
- * JYS SDK Types & Registration
3
- *
4
- * Joyas y Relojes (Jewelry and Watches) - high-value goods dealers.
5
- */
6
-
7
- import { Jurisdiction, CodigoActividad } from "@artu-ai/shared";
8
- import type {
9
- ComplianceSDKOptionsBase,
10
- DistributiveOmit,
11
- } from "../../../types";
12
- import type { MexicoComplianceSDK } from "../../types";
13
- import {
14
- JYSClientsResource,
15
- JYSTransactionsResource,
16
- JYSReportsResource,
17
- MexBankAccountsResource,
18
- MexAddressesResource,
19
- } from "../../../../resources";
20
- import { registerScope } from "../../../resource-registry";
21
- import type { ClientsResource } from "../../../../resources/clients";
22
- import type { TransactionsResource } from "../../../../resources/transactions";
23
- import type { ReportsResource } from "../../../../resources/reports";
24
- import type { BankAccountsResource } from "../../../../resources/bank-accounts";
25
- import type { AddressesResource } from "../../../../resources/addresses";
26
- import type { EBRResource } from "../../../../resources/mex/ebr";
27
-
28
- // ===========================
29
- // SDK Options
30
- // ===========================
31
-
32
- /**
33
- * Options for creating a JYS-scoped SDK
34
- */
35
- export type JYSSDKOptions = ComplianceSDKOptionsBase & {
36
- jurisdiction: typeof Jurisdiction.Mexico | "MX";
37
- actividadVulnerable: typeof CodigoActividad.JYS | "JYS";
38
- };
39
-
40
- /**
41
- * Options for JYS-scoped SDK (without jurisdiction/activity - pre-configured)
42
- */
43
- export type JYSScopedSDKOptions = DistributiveOmit<
44
- ComplianceSDKOptionsBase,
45
- "jurisdiction" | "actividadVulnerable"
46
- >;
47
-
48
- // ===========================
49
- // Typed SDK Interface
50
- // ===========================
51
-
52
- /**
53
- * Mexico JYS-scoped SDK - uses JYS resource types
54
- * Extends MexicoComplianceSDK with JYS-specific overrides
55
- */
56
- export interface JYSComplianceSDK extends Omit<
57
- MexicoComplianceSDK,
58
- "clients" | "transactions" | "reports"
59
- > {
60
- readonly clients: JYSClientsResource;
61
- readonly transactions: JYSTransactionsResource;
62
- readonly reports: JYSReportsResource;
63
- readonly bankAccounts: MexBankAccountsResource;
64
- /** EBR resource for risk-based evaluation */
65
- readonly ebr: EBRResource;
66
- }
67
-
68
- // ===========================
69
- // Registration
70
- // ===========================
71
-
72
- export function registerJYSScope(): void {
73
- // Note: Casts needed due to sort type parameter variance between scoped and base resources
74
- registerScope("MX:JYS", {
75
- clients: (config) =>
76
- new JYSClientsResource(config) as unknown as ClientsResource,
77
- transactions: (config) =>
78
- new JYSTransactionsResource(config) as unknown as TransactionsResource,
79
- reports: (config) =>
80
- new JYSReportsResource(config) as unknown as ReportsResource,
81
- bankAccounts: (config) =>
82
- new MexBankAccountsResource(config) as unknown as BankAccountsResource,
83
- addresses: (config) =>
84
- new MexAddressesResource(config) as unknown as AddressesResource,
85
- });
86
- }