@artu-ai/compliance-sdk 0.4.1 → 0.4.3
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/package.json +3 -4
- package/src/errors/api.ts +0 -305
- package/src/errors/base.ts +0 -127
- package/src/errors/index.ts +0 -63
- package/src/errors/upload.ts +0 -204
- package/src/errors/validation.ts +0 -163
- package/src/exports/base.ts +0 -139
- package/src/exports/index.ts +0 -187
- package/src/exports/mexico/actividad-vulnerable/avi.ts +0 -207
- package/src/exports/mexico/actividad-vulnerable/jys.ts +0 -214
- package/src/exports/mexico/actividad-vulnerable/tsc.ts +0 -202
- package/src/exports/mexico/index.ts +0 -215
- package/src/models/Address.ts +0 -235
- package/src/models/BankAccount.ts +0 -235
- package/src/models/Client.ts +0 -363
- package/src/models/ContactMethod.ts +0 -197
- package/src/models/Document.ts +0 -355
- package/src/models/LinkedClient.ts +0 -84
- package/src/models/Report.ts +0 -193
- package/src/models/ReportItem.ts +0 -211
- package/src/models/Transaction.ts +0 -219
- package/src/models/base.ts +0 -56
- package/src/models/index.ts +0 -148
- package/src/models/mex/MexAddress.ts +0 -184
- package/src/models/mex/MexBankAccount.ts +0 -121
- package/src/models/mex/MexClient.ts +0 -177
- package/src/models/mex/MexDocument.ts +0 -890
- package/src/models/mex/MexReport.ts +0 -99
- package/src/models/mex/MexReportItem.ts +0 -79
- package/src/models/mex/MexTransaction.ts +0 -105
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableClient.ts +0 -66
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReport.ts +0 -73
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +0 -74
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.ts +0 -50
- package/src/models/mex/actividad-vulnerable/avi/MexAVIClient.ts +0 -80
- package/src/models/mex/actividad-vulnerable/avi/MexAVIReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/avi/MexAVITransaction.ts +0 -157
- package/src/models/mex/actividad-vulnerable/index.ts +0 -78
- package/src/models/mex/actividad-vulnerable/jys/MexJYSClient.ts +0 -73
- package/src/models/mex/actividad-vulnerable/jys/MexJYSReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/jys/MexJYSTransaction.ts +0 -178
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCClient.ts +0 -73
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCReport.ts +0 -114
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +0 -105
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.ts +0 -104
- package/src/models/mex/index.ts +0 -57
- package/src/models/types.ts +0 -196
- package/src/namespaces/index.ts +0 -29
- package/src/namespaces/mexico/actividad-vulnerable/avi/index.ts +0 -62
- package/src/namespaces/mexico/actividad-vulnerable/index.ts +0 -79
- package/src/namespaces/mexico/actividad-vulnerable/jys/index.ts +0 -72
- package/src/namespaces/mexico/actividad-vulnerable/tsc/index.ts +0 -60
- package/src/namespaces/mexico/index.ts +0 -325
- package/src/resources/addresses.ts +0 -391
- package/src/resources/bank-accounts.ts +0 -417
- package/src/resources/base.ts +0 -327
- package/src/resources/clients.ts +0 -808
- package/src/resources/contact-methods.ts +0 -412
- package/src/resources/documents.ts +0 -688
- package/src/resources/index.ts +0 -40
- package/src/resources/mex/actividad-vulnerable/avi/clients.ts +0 -559
- package/src/resources/mex/actividad-vulnerable/avi/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/avi/reports.ts +0 -609
- package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +0 -404
- package/src/resources/mex/actividad-vulnerable/index.ts +0 -12
- package/src/resources/mex/actividad-vulnerable/jys/clients.ts +0 -445
- package/src/resources/mex/actividad-vulnerable/jys/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/jys/reports.ts +0 -591
- package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +0 -395
- package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +0 -445
- package/src/resources/mex/actividad-vulnerable/tsc/index.ts +0 -7
- package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +0 -591
- package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +0 -404
- package/src/resources/mex/addresses.ts +0 -493
- package/src/resources/mex/bank-accounts.ts +0 -283
- package/src/resources/mex/clients.ts +0 -758
- package/src/resources/mex/ebr.ts +0 -621
- package/src/resources/mex/index.ts +0 -23
- package/src/resources/mex/reports.ts +0 -643
- package/src/resources/mex/transactions.ts +0 -422
- package/src/resources/reports.ts +0 -515
- package/src/resources/transactions.ts +0 -358
- package/src/sdk/ComplianceSDK.ts +0 -812
- package/src/sdk/base.ts +0 -43
- package/src/sdk/index.ts +0 -98
- package/src/sdk/mex/ComplianceSDK.ts +0 -147
- package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +0 -55
- package/src/sdk/mex/actividad-vulnerable/avi/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/avi/types.ts +0 -86
- package/src/sdk/mex/actividad-vulnerable/index.ts +0 -58
- package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +0 -54
- package/src/sdk/mex/actividad-vulnerable/jys/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/jys/types.ts +0 -86
- package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +0 -54
- package/src/sdk/mex/actividad-vulnerable/tsc/index.ts +0 -16
- package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +0 -86
- package/src/sdk/mex/index.ts +0 -66
- package/src/sdk/mex/types.ts +0 -88
- package/src/sdk/resource-registry.ts +0 -204
- package/src/sdk/sdk-registry.ts +0 -99
- package/src/sdk/types.ts +0 -304
- package/src/utils/environment.ts +0 -187
- package/src/utils/filters.ts +0 -412
- package/src/utils/index.ts +0 -134
- package/src/utils/pagination.ts +0 -143
- package/src/utils/session.ts +0 -303
- package/src/utils/trpc-client.ts +0 -242
- package/src/utils/upload.ts +0 -388
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Report Model
|
|
3
|
-
*
|
|
4
|
-
* Extends base Report with Mexico-specific accessors.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { Report, type ReportData } from "../Report";
|
|
8
|
-
import type { MexReportJurisdictionData } from "@artu-ai/shared";
|
|
9
|
-
|
|
10
|
-
// ===========================
|
|
11
|
-
// Types
|
|
12
|
-
// ===========================
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Report data with Mexico jurisdiction
|
|
16
|
-
*/
|
|
17
|
-
export interface MexReportData extends ReportData {
|
|
18
|
-
jurisdictions?: {
|
|
19
|
-
MX?: MexReportJurisdictionData;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// ===========================
|
|
25
|
-
// MexReport Model
|
|
26
|
-
// ===========================
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Mexico Report Model.
|
|
30
|
-
*
|
|
31
|
-
* Provides typed accessors for Mexico-specific data.
|
|
32
|
-
* Extended by MexActividadVulnerableReport.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* if (report instanceof MexReport) {
|
|
37
|
-
* console.log(`Activities: ${report.activityCodes.join(", ")}`);
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export class MexReport extends Report {
|
|
42
|
-
// ─────────────────────────────────────────────────────────────────
|
|
43
|
-
// Mexico Jurisdiction Data
|
|
44
|
-
// ─────────────────────────────────────────────────────────────────
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Mexico-specific jurisdiction data
|
|
48
|
-
*/
|
|
49
|
-
protected get mexicoData(): MexReportJurisdictionData | undefined {
|
|
50
|
-
return (this._data as MexReportData).jurisdictions?.MX;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ─────────────────────────────────────────────────────────────────
|
|
54
|
-
// Actividad Vulnerable
|
|
55
|
-
// ─────────────────────────────────────────────────────────────────
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Whether this report is for an Actividad Vulnerable
|
|
59
|
-
*/
|
|
60
|
-
get isActividadVulnerable(): boolean {
|
|
61
|
-
const av = this.mexicoData?.actividadVulnerable;
|
|
62
|
-
if (!av) return false;
|
|
63
|
-
return !!(av.AVI || av.JYS || av.TSC);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Activity codes with data in this report
|
|
68
|
-
*/
|
|
69
|
-
get activityCodes(): string[] {
|
|
70
|
-
const av = this.mexicoData?.actividadVulnerable;
|
|
71
|
-
if (!av) return [];
|
|
72
|
-
const codes: string[] = [];
|
|
73
|
-
if (av.AVI) codes.push("AVI");
|
|
74
|
-
if (av.JYS) codes.push("JYS");
|
|
75
|
-
if (av.TSC) codes.push("TSC");
|
|
76
|
-
return codes;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// ─────────────────────────────────────────────────────────────────
|
|
80
|
-
// String Representation
|
|
81
|
-
// ─────────────────────────────────────────────────────────────────
|
|
82
|
-
|
|
83
|
-
override toString(): string {
|
|
84
|
-
return `MexReport(${this.id}, ${this.status})`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// ===========================
|
|
89
|
-
// Type Guards
|
|
90
|
-
// ===========================
|
|
91
|
-
|
|
92
|
-
import type { ReportModel } from "../types";
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Check if report is a Mexico report
|
|
96
|
-
*/
|
|
97
|
-
export function isMexReport(report: ReportModel): report is MexReport {
|
|
98
|
-
return report instanceof MexReport;
|
|
99
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Report Item Model
|
|
3
|
-
*
|
|
4
|
-
* Extends base ReportItem with Mexico-specific accessors.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { ReportItem, type ReportItemData } from "../ReportItem";
|
|
8
|
-
import type { MexReportItemJurisdictionData } from "@artu-ai/shared";
|
|
9
|
-
|
|
10
|
-
// ===========================
|
|
11
|
-
// Types
|
|
12
|
-
// ===========================
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Report item data with Mexico jurisdiction
|
|
16
|
-
*/
|
|
17
|
-
export interface MexReportItemData extends ReportItemData {
|
|
18
|
-
jurisdictions?: {
|
|
19
|
-
MX?: MexReportItemJurisdictionData;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// ===========================
|
|
25
|
-
// MexReportItem Model
|
|
26
|
-
// ===========================
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Mexico Report Item Model.
|
|
30
|
-
*
|
|
31
|
-
* Provides typed accessors for Mexico-specific data.
|
|
32
|
-
* Extended by MexActividadVulnerableReportItem.
|
|
33
|
-
*/
|
|
34
|
-
export class MexReportItem extends ReportItem {
|
|
35
|
-
// ─────────────────────────────────────────────────────────────────
|
|
36
|
-
// Mexico Jurisdiction Data
|
|
37
|
-
// ─────────────────────────────────────────────────────────────────
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Mexico-specific jurisdiction data
|
|
41
|
-
*/
|
|
42
|
-
protected get mexicoData(): MexReportItemJurisdictionData | undefined {
|
|
43
|
-
return (this._data as MexReportItemData).jurisdictions?.MX;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// ─────────────────────────────────────────────────────────────────
|
|
47
|
-
// Actividad Vulnerable
|
|
48
|
-
// ─────────────────────────────────────────────────────────────────
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Whether this item has Actividad Vulnerable data
|
|
52
|
-
*/
|
|
53
|
-
get isActividadVulnerable(): boolean {
|
|
54
|
-
const av = this.mexicoData?.actividadVulnerable;
|
|
55
|
-
if (!av) return false;
|
|
56
|
-
return !!(av.AVI || av.JYS || av.TSC);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// ─────────────────────────────────────────────────────────────────
|
|
60
|
-
// String Representation
|
|
61
|
-
// ─────────────────────────────────────────────────────────────────
|
|
62
|
-
|
|
63
|
-
override toString(): string {
|
|
64
|
-
return `MexReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"})`;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// ===========================
|
|
69
|
-
// Type Guards
|
|
70
|
-
// ===========================
|
|
71
|
-
|
|
72
|
-
import type { ReportItemModel } from "../types";
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Check if report item is a Mexico report item
|
|
76
|
-
*/
|
|
77
|
-
export function isMexReportItem(item: ReportItemModel): item is MexReportItem {
|
|
78
|
-
return item instanceof MexReportItem;
|
|
79
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Transaction Model
|
|
3
|
-
*
|
|
4
|
-
* Extends base Transaction with Mexico-specific accessors.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { Transaction, type TransactionData } from "../Transaction";
|
|
8
|
-
import type { MexTransactionJurisdictionData } from "@artu-ai/shared";
|
|
9
|
-
|
|
10
|
-
// ===========================
|
|
11
|
-
// Types
|
|
12
|
-
// ===========================
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Transaction data with Mexico jurisdiction
|
|
16
|
-
*/
|
|
17
|
-
export interface MexTransactionData extends TransactionData {
|
|
18
|
-
jurisdictions?: {
|
|
19
|
-
MX?: MexTransactionJurisdictionData;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// ===========================
|
|
25
|
-
// MexTransaction Model
|
|
26
|
-
// ===========================
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Mexico Transaction Model.
|
|
30
|
-
*
|
|
31
|
-
* Provides typed accessors for Mexico-specific transaction data.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* if (txn instanceof MexTransaction) {
|
|
36
|
-
* console.log(`Activities: ${txn.activityCodes.join(", ")}`);
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export class MexTransaction extends Transaction {
|
|
41
|
-
// ─────────────────────────────────────────────────────────────────
|
|
42
|
-
// Mexico Jurisdiction Data
|
|
43
|
-
// ─────────────────────────────────────────────────────────────────
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Mexico-specific jurisdiction data
|
|
47
|
-
*/
|
|
48
|
-
protected get mexicoData(): MexTransactionJurisdictionData | undefined {
|
|
49
|
-
return (this._data as MexTransactionData).jurisdictions?.MX;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ─────────────────────────────────────────────────────────────────
|
|
53
|
-
// Actividades Vulnerables
|
|
54
|
-
// ─────────────────────────────────────────────────────────────────
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Whether transaction is related to any Actividad Vulnerable
|
|
58
|
-
*/
|
|
59
|
-
get isActividadVulnerable(): boolean {
|
|
60
|
-
const av = this.mexicoData?.actividadVulnerable;
|
|
61
|
-
if (!av) return false;
|
|
62
|
-
return !!(av.AVI || av.JYS || av.TSC);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Activity codes this transaction is associated with
|
|
67
|
-
*/
|
|
68
|
-
get activityCodes(): string[] {
|
|
69
|
-
const av = this.mexicoData?.actividadVulnerable;
|
|
70
|
-
if (!av) return [];
|
|
71
|
-
const codes: string[] = [];
|
|
72
|
-
if (av.AVI) codes.push("AVI");
|
|
73
|
-
if (av.JYS) codes.push("JYS");
|
|
74
|
-
if (av.TSC) codes.push("TSC");
|
|
75
|
-
return codes;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Checks if transaction is for a specific activity
|
|
80
|
-
*/
|
|
81
|
-
hasActivity(code: "AVI" | "JYS" | "TSC"): boolean {
|
|
82
|
-
return this.activityCodes.includes(code);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ─────────────────────────────────────────────────────────────────
|
|
86
|
-
// String Representation
|
|
87
|
-
// ─────────────────────────────────────────────────────────────────
|
|
88
|
-
|
|
89
|
-
override toString(): string {
|
|
90
|
-
return `MexTransaction(${this.id}, ${this.formattedAmount}, Activities: [${this.activityCodes.join(", ")}])`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// ===========================
|
|
95
|
-
// Type Guards
|
|
96
|
-
// ===========================
|
|
97
|
-
|
|
98
|
-
import type { TransactionModel } from "../types";
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Check if transaction is a Mexico transaction
|
|
102
|
-
*/
|
|
103
|
-
export function isMexTransaction(txn: TransactionModel): txn is MexTransaction {
|
|
104
|
-
return txn instanceof MexTransaction;
|
|
105
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Actividad Vulnerable Base Client
|
|
3
|
-
*
|
|
4
|
-
* Common functionality for all Actividad Vulnerable clients.
|
|
5
|
-
* Extended by activity-specific models (AVI, JYS, TSC).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { MexClient } from "../MexClient";
|
|
9
|
-
import type { ClientRelationshipType } from "@artu-ai/shared";
|
|
10
|
-
|
|
11
|
-
// ===========================
|
|
12
|
-
// MexActividadVulnerableClient Model
|
|
13
|
-
// ===========================
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Base model for Mexico Actividad Vulnerable clients.
|
|
17
|
-
*
|
|
18
|
-
* Provides common accessors for all activity types.
|
|
19
|
-
* Extended by MexAVIClient, MexJYSClient, MexTSCClient.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* if (client instanceof MexActividadVulnerableClient) {
|
|
24
|
-
* console.log(`Activities: ${client.activityCodes.join(", ")}`);
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export class MexActividadVulnerableClient extends MexClient {
|
|
29
|
-
// ─────────────────────────────────────────────────────────────────
|
|
30
|
-
// String Representation
|
|
31
|
-
// ─────────────────────────────────────────────────────────────────
|
|
32
|
-
|
|
33
|
-
override toString(): string {
|
|
34
|
-
return `MexActividadVulnerableClient(${this.id}, ${this.name}, Activities: [${this.activityCodes.join(", ")}])`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Linked clients (if included) instantiated as MexActividadVulnerableClient
|
|
39
|
-
*/
|
|
40
|
-
override get linkedClients():
|
|
41
|
-
| {
|
|
42
|
-
relationshipType: ClientRelationshipType;
|
|
43
|
-
client: MexActividadVulnerableClient;
|
|
44
|
-
}[]
|
|
45
|
-
| undefined {
|
|
46
|
-
return (this._data.linkedClients ?? []).map((l) => ({
|
|
47
|
-
relationshipType: l.relationshipType,
|
|
48
|
-
client: new MexActividadVulnerableClient(l.client),
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ===========================
|
|
54
|
-
// Type Guards
|
|
55
|
-
// ===========================
|
|
56
|
-
|
|
57
|
-
import type { ClientModel } from "../../types";
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Check if client is registered for any Actividad Vulnerable
|
|
61
|
-
*/
|
|
62
|
-
export function isActividadVulnerable(
|
|
63
|
-
client: ClientModel
|
|
64
|
-
): client is MexActividadVulnerableClient {
|
|
65
|
-
return client instanceof MexActividadVulnerableClient;
|
|
66
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Actividad Vulnerable Base Report
|
|
3
|
-
*
|
|
4
|
-
* Common functionality for all Actividad Vulnerable reports.
|
|
5
|
-
* Extended by activity-specific models (AVI, JYS, TSC).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { MexReport, type MexReportData } from "../MexReport";
|
|
9
|
-
import type { ActividadVulnerableReportData } from "@artu-ai/shared";
|
|
10
|
-
|
|
11
|
-
// ===========================
|
|
12
|
-
// Types
|
|
13
|
-
// ===========================
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Report data with Actividad Vulnerable data
|
|
17
|
-
*/
|
|
18
|
-
export interface MexActividadVulnerableReportData extends MexReportData {
|
|
19
|
-
jurisdictions?: {
|
|
20
|
-
MX?: {
|
|
21
|
-
actividadVulnerable?: ActividadVulnerableReportData;
|
|
22
|
-
};
|
|
23
|
-
[key: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// ===========================
|
|
28
|
-
// MexActividadVulnerableReport Model
|
|
29
|
-
// ===========================
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Base model for Mexico Actividad Vulnerable reports.
|
|
33
|
-
*
|
|
34
|
-
* Provides common accessors for all activity types.
|
|
35
|
-
* Extended by MexAVIReport, MexJYSReport, MexTSCReport.
|
|
36
|
-
*/
|
|
37
|
-
export class MexActividadVulnerableReport extends MexReport {
|
|
38
|
-
// ─────────────────────────────────────────────────────────────────
|
|
39
|
-
// Activity Data
|
|
40
|
-
// ─────────────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Actividad Vulnerable data
|
|
44
|
-
*/
|
|
45
|
-
protected get actividadVulnerableData():
|
|
46
|
-
| ActividadVulnerableReportData
|
|
47
|
-
| undefined {
|
|
48
|
-
return this.mexicoData?.actividadVulnerable;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ─────────────────────────────────────────────────────────────────
|
|
52
|
-
// String Representation
|
|
53
|
-
// ─────────────────────────────────────────────────────────────────
|
|
54
|
-
|
|
55
|
-
override toString(): string {
|
|
56
|
-
return `MexActividadVulnerableReport(${this.id}, ${this.status})`;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ===========================
|
|
61
|
-
// Type Guards
|
|
62
|
-
// ===========================
|
|
63
|
-
|
|
64
|
-
import type { ReportModel } from "../../types";
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Check if report is for any Actividad Vulnerable
|
|
68
|
-
*/
|
|
69
|
-
export function isActividadVulnerableReport(
|
|
70
|
-
report: ReportModel
|
|
71
|
-
): report is MexActividadVulnerableReport {
|
|
72
|
-
return report instanceof MexActividadVulnerableReport;
|
|
73
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Actividad Vulnerable Base Report Item
|
|
3
|
-
*
|
|
4
|
-
* Common functionality for all Actividad Vulnerable report items.
|
|
5
|
-
* Extended by activity-specific models (AVI, JYS, TSC).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { MexReportItem, type MexReportItemData } from "../MexReportItem";
|
|
9
|
-
import type { ActividadVulnerableReportItemData } from "@artu-ai/shared";
|
|
10
|
-
|
|
11
|
-
// ===========================
|
|
12
|
-
// Types
|
|
13
|
-
// ===========================
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Report item data with Actividad Vulnerable data
|
|
17
|
-
*/
|
|
18
|
-
export interface MexActividadVulnerableReportItemData
|
|
19
|
-
extends MexReportItemData {
|
|
20
|
-
jurisdictions?: {
|
|
21
|
-
MX?: {
|
|
22
|
-
actividadVulnerable?: ActividadVulnerableReportItemData;
|
|
23
|
-
};
|
|
24
|
-
[key: string]: unknown;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ===========================
|
|
29
|
-
// MexActividadVulnerableReportItem Model
|
|
30
|
-
// ===========================
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Base model for Mexico Actividad Vulnerable report items.
|
|
34
|
-
*
|
|
35
|
-
* Provides common accessors for all activity types.
|
|
36
|
-
* Extended by MexAVIReportItem, MexJYSReportItem, MexTSCReportItem.
|
|
37
|
-
*/
|
|
38
|
-
export class MexActividadVulnerableReportItem extends MexReportItem {
|
|
39
|
-
// ─────────────────────────────────────────────────────────────────
|
|
40
|
-
// Activity Data
|
|
41
|
-
// ─────────────────────────────────────────────────────────────────
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Actividad Vulnerable data
|
|
45
|
-
*/
|
|
46
|
-
protected get actividadVulnerableData():
|
|
47
|
-
| ActividadVulnerableReportItemData
|
|
48
|
-
| undefined {
|
|
49
|
-
return this.mexicoData?.actividadVulnerable;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ─────────────────────────────────────────────────────────────────
|
|
53
|
-
// String Representation
|
|
54
|
-
// ─────────────────────────────────────────────────────────────────
|
|
55
|
-
|
|
56
|
-
override toString(): string {
|
|
57
|
-
return `MexActividadVulnerableReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"})`;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// ===========================
|
|
62
|
-
// Type Guards
|
|
63
|
-
// ===========================
|
|
64
|
-
|
|
65
|
-
import type { ReportItemModel } from "../../types";
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Check if report item is for any Actividad Vulnerable
|
|
69
|
-
*/
|
|
70
|
-
export function isActividadVulnerableReportItem(
|
|
71
|
-
item: ReportItemModel
|
|
72
|
-
): item is MexActividadVulnerableReportItem {
|
|
73
|
-
return item instanceof MexActividadVulnerableReportItem;
|
|
74
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico Actividad Vulnerable Transaction Base
|
|
3
|
-
*
|
|
4
|
-
* Common functionality for all Actividad Vulnerable transactions.
|
|
5
|
-
* Extended by activity-specific models (AVI, JYS, TSC).
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { MexTransaction } from "../MexTransaction";
|
|
9
|
-
|
|
10
|
-
// ===========================
|
|
11
|
-
// MexActividadVulnerableTransaction Model
|
|
12
|
-
// ===========================
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Base model for Mexico Actividad Vulnerable transactions.
|
|
16
|
-
*
|
|
17
|
-
* Provides common accessors for all activity types.
|
|
18
|
-
* Extended by MexAVITransaction, MexJYSTransaction, MexTSCTransaction.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* if (txn instanceof MexActividadVulnerableTransaction) {
|
|
23
|
-
* console.log(`Activities: ${txn.activityCodes.join(", ")}`);
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export class MexActividadVulnerableTransaction extends MexTransaction {
|
|
28
|
-
// ─────────────────────────────────────────────────────────────────
|
|
29
|
-
// String Representation
|
|
30
|
-
// ─────────────────────────────────────────────────────────────────
|
|
31
|
-
|
|
32
|
-
override toString(): string {
|
|
33
|
-
return `MexActividadVulnerableTransaction(${this.id}, ${this.formattedAmount}, Activities: [${this.activityCodes.join(", ")}])`;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// ===========================
|
|
38
|
-
// Type Guards
|
|
39
|
-
// ===========================
|
|
40
|
-
|
|
41
|
-
import type { TransactionModel } from "../../types";
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Check if transaction is for any Actividad Vulnerable
|
|
45
|
-
*/
|
|
46
|
-
export function isActividadVulnerableTransaction(
|
|
47
|
-
txn: TransactionModel
|
|
48
|
-
): txn is MexActividadVulnerableTransaction {
|
|
49
|
-
return txn instanceof MexActividadVulnerableTransaction;
|
|
50
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mexico AVI (Activos Virtuales) Client
|
|
3
|
-
*
|
|
4
|
-
* Specialized for virtual asset / cryptocurrency operations.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { ClientRelationshipType, avi } from "@artu-ai/shared";
|
|
8
|
-
import { MexActividadVulnerableClient } from "../MexActividadVulnerableClient";
|
|
9
|
-
|
|
10
|
-
// ===========================
|
|
11
|
-
// MexAVIClient Model
|
|
12
|
-
// ===========================
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Mexico AVI Client Model.
|
|
16
|
-
*
|
|
17
|
-
* Provides typed accessors for virtual asset specific data.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* if (client instanceof MexAVIClient) {
|
|
22
|
-
* console.log(`Username: ${client.aviUsername}`);
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export class MexAVIClient extends MexActividadVulnerableClient {
|
|
27
|
-
// ─────────────────────────────────────────────────────────────────
|
|
28
|
-
// AVI-Specific Data
|
|
29
|
-
// ─────────────────────────────────────────────────────────────────
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* AVI-specific activity data
|
|
33
|
-
*/
|
|
34
|
-
protected get aviData(): avi.AVIClientData | undefined {
|
|
35
|
-
return this.mexicoData?.actividadVulnerable?.AVI;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Platform username for virtual asset operations
|
|
40
|
-
*/
|
|
41
|
-
get username(): string | undefined {
|
|
42
|
-
return this.aviData?.username;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ─────────────────────────────────────────────────────────────────
|
|
46
|
-
// String Representation
|
|
47
|
-
// ─────────────────────────────────────────────────────────────────
|
|
48
|
-
|
|
49
|
-
override toString(): string {
|
|
50
|
-
return `MexAVIClient(${this.id}, ${this.name}, Username: ${this.username ?? "N/A"})`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Linked clients (if included) instantiated as MexAVIClient
|
|
55
|
-
*/
|
|
56
|
-
override get linkedClients():
|
|
57
|
-
| {
|
|
58
|
-
relationshipType: ClientRelationshipType;
|
|
59
|
-
client: MexAVIClient;
|
|
60
|
-
}[]
|
|
61
|
-
| undefined {
|
|
62
|
-
return (this._data.linkedClients ?? []).map((l) => ({
|
|
63
|
-
relationshipType: l.relationshipType,
|
|
64
|
-
client: new MexAVIClient(l.client),
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ===========================
|
|
70
|
-
// Type Guards
|
|
71
|
-
// ===========================
|
|
72
|
-
|
|
73
|
-
import type { ClientModel } from "../../../types";
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Check if client is an AVI (Activos Virtuales) client
|
|
77
|
-
*/
|
|
78
|
-
export function isMexAVIClient(client: ClientModel): client is MexAVIClient {
|
|
79
|
-
return client instanceof MexAVIClient;
|
|
80
|
-
}
|