@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
@@ -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
- }