@artu-ai/compliance-sdk 0.8.2 → 0.9.0

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 (201) hide show
  1. package/README.md +2 -2
  2. package/dist/errors/base.d.ts +1 -1
  3. package/dist/errors/base.js +1 -1
  4. package/dist/exports/index.d.ts +4 -4
  5. package/dist/exports/index.d.ts.map +1 -1
  6. package/dist/exports/index.js +2 -2
  7. package/dist/exports/mexico/actividad-vulnerable/avi.d.ts +11 -11
  8. package/dist/exports/mexico/actividad-vulnerable/avi.d.ts.map +1 -1
  9. package/dist/exports/mexico/actividad-vulnerable/avi.js +10 -10
  10. package/dist/exports/mexico/actividad-vulnerable/jys.d.ts +11 -11
  11. package/dist/exports/mexico/actividad-vulnerable/jys.d.ts.map +1 -1
  12. package/dist/exports/mexico/actividad-vulnerable/jys.js +10 -10
  13. package/dist/exports/mexico/actividad-vulnerable/mjr.d.ts +11 -11
  14. package/dist/exports/mexico/actividad-vulnerable/mjr.d.ts.map +1 -1
  15. package/dist/exports/mexico/actividad-vulnerable/mjr.js +10 -10
  16. package/dist/exports/mexico/actividad-vulnerable/tsc.d.ts +11 -11
  17. package/dist/exports/mexico/actividad-vulnerable/tsc.d.ts.map +1 -1
  18. package/dist/exports/mexico/actividad-vulnerable/tsc.js +10 -10
  19. package/dist/exports/mexico/index.d.ts +4 -4
  20. package/dist/exports/mexico/index.d.ts.map +1 -1
  21. package/dist/exports/mexico/index.js +3 -3
  22. package/dist/models/Alert.d.ts +106 -0
  23. package/dist/models/Alert.d.ts.map +1 -0
  24. package/dist/models/{Report.js → Alert.js} +44 -31
  25. package/dist/models/{ReportItem.d.ts → AlertItem.d.ts} +15 -15
  26. package/dist/models/AlertItem.d.ts.map +1 -0
  27. package/dist/models/{ReportItem.js → AlertItem.js} +13 -13
  28. package/dist/models/index.d.ts +5 -5
  29. package/dist/models/index.d.ts.map +1 -1
  30. package/dist/models/index.js +7 -7
  31. package/dist/models/mex/MexAlert.d.ts +50 -0
  32. package/dist/models/mex/MexAlert.d.ts.map +1 -0
  33. package/dist/models/mex/{MexReport.js → MexAlert.js} +15 -15
  34. package/dist/models/mex/MexAlertItem.d.ts +39 -0
  35. package/dist/models/mex/MexAlertItem.d.ts.map +1 -0
  36. package/dist/models/mex/{MexReportItem.js → MexAlertItem.js} +11 -11
  37. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableAlert.d.ts +38 -0
  38. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableAlert.d.ts.map +1 -0
  39. package/dist/models/mex/actividad-vulnerable/{MexActividadVulnerableReport.js → MexActividadVulnerableAlert.js} +11 -11
  40. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableAlertItem.d.ts +38 -0
  41. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableAlertItem.d.ts.map +1 -0
  42. package/dist/models/mex/actividad-vulnerable/{MexActividadVulnerableReportItem.js → MexActividadVulnerableAlertItem.js} +11 -11
  43. package/dist/models/mex/actividad-vulnerable/avi/MexAVIAlert.d.ts +53 -0
  44. package/dist/models/mex/actividad-vulnerable/avi/MexAVIAlert.d.ts.map +1 -0
  45. package/dist/models/mex/actividad-vulnerable/avi/{MexAVIReport.js → MexAVIAlert.js} +14 -14
  46. package/dist/models/mex/actividad-vulnerable/avi/MexAVIAlertItem.d.ts +56 -0
  47. package/dist/models/mex/actividad-vulnerable/avi/MexAVIAlertItem.d.ts.map +1 -0
  48. package/dist/models/mex/actividad-vulnerable/avi/{MexAVIReportItem.js → MexAVIAlertItem.js} +13 -13
  49. package/dist/models/mex/actividad-vulnerable/index.d.ts +10 -10
  50. package/dist/models/mex/actividad-vulnerable/index.d.ts.map +1 -1
  51. package/dist/models/mex/actividad-vulnerable/index.js +12 -12
  52. package/dist/models/mex/actividad-vulnerable/jys/MexJYSAlert.d.ts +53 -0
  53. package/dist/models/mex/actividad-vulnerable/jys/MexJYSAlert.d.ts.map +1 -0
  54. package/dist/models/mex/actividad-vulnerable/jys/{MexJYSReport.js → MexJYSAlert.js} +14 -14
  55. package/dist/models/mex/actividad-vulnerable/jys/MexJYSAlertItem.d.ts +56 -0
  56. package/dist/models/mex/actividad-vulnerable/jys/MexJYSAlertItem.d.ts.map +1 -0
  57. package/dist/models/mex/actividad-vulnerable/jys/{MexJYSReportItem.js → MexJYSAlertItem.js} +13 -13
  58. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRAlert.d.ts +53 -0
  59. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRAlert.d.ts.map +1 -0
  60. package/dist/models/mex/actividad-vulnerable/mjr/{MexMJRReport.js → MexMJRAlert.js} +14 -14
  61. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRAlertItem.d.ts +56 -0
  62. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRAlertItem.d.ts.map +1 -0
  63. package/dist/models/mex/actividad-vulnerable/mjr/{MexMJRReportItem.js → MexMJRAlertItem.js} +13 -13
  64. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCAlert.d.ts +53 -0
  65. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCAlert.d.ts.map +1 -0
  66. package/dist/models/mex/actividad-vulnerable/tsc/{MexTSCReport.js → MexTSCAlert.js} +14 -14
  67. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCAlertItem.d.ts +56 -0
  68. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCAlertItem.d.ts.map +1 -0
  69. package/dist/models/mex/actividad-vulnerable/tsc/{MexTSCReportItem.js → MexTSCAlertItem.js} +13 -13
  70. package/dist/models/mex/index.d.ts +2 -2
  71. package/dist/models/mex/index.d.ts.map +1 -1
  72. package/dist/models/mex/index.js +3 -3
  73. package/dist/models/types.d.ts +17 -17
  74. package/dist/models/types.d.ts.map +1 -1
  75. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.d.ts +12 -12
  76. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.d.ts.map +1 -1
  77. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.js +7 -7
  78. package/dist/namespaces/mexico/actividad-vulnerable/index.d.ts +24 -24
  79. package/dist/namespaces/mexico/actividad-vulnerable/index.d.ts.map +1 -1
  80. package/dist/namespaces/mexico/actividad-vulnerable/index.js +5 -5
  81. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.d.ts +12 -12
  82. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.d.ts.map +1 -1
  83. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.js +7 -7
  84. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.d.ts +12 -12
  85. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.d.ts.map +1 -1
  86. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.js +7 -7
  87. package/dist/namespaces/mexico/index.d.ts +48 -48
  88. package/dist/namespaces/mexico/index.d.ts.map +1 -1
  89. package/dist/namespaces/mexico/index.js +8 -8
  90. package/dist/resources/alerts.d.ts +245 -0
  91. package/dist/resources/alerts.d.ts.map +1 -0
  92. package/dist/resources/{reports.js → alerts.js} +107 -107
  93. package/dist/resources/index.d.ts +1 -1
  94. package/dist/resources/index.d.ts.map +1 -1
  95. package/dist/resources/index.js +1 -1
  96. package/dist/resources/mex/actividad-vulnerable/avi/alerts.d.ts +190 -0
  97. package/dist/resources/mex/actividad-vulnerable/avi/alerts.d.ts.map +1 -0
  98. package/dist/resources/mex/actividad-vulnerable/avi/{reports.js → alerts.js} +86 -86
  99. package/dist/resources/mex/actividad-vulnerable/avi/index.d.ts +1 -1
  100. package/dist/resources/mex/actividad-vulnerable/avi/index.d.ts.map +1 -1
  101. package/dist/resources/mex/actividad-vulnerable/avi/index.js +1 -1
  102. package/dist/resources/mex/actividad-vulnerable/jys/alerts.d.ts +170 -0
  103. package/dist/resources/mex/actividad-vulnerable/jys/alerts.d.ts.map +1 -0
  104. package/dist/resources/mex/actividad-vulnerable/jys/{reports.js → alerts.js} +82 -82
  105. package/dist/resources/mex/actividad-vulnerable/jys/index.d.ts +1 -1
  106. package/dist/resources/mex/actividad-vulnerable/jys/index.d.ts.map +1 -1
  107. package/dist/resources/mex/actividad-vulnerable/jys/index.js +1 -1
  108. package/dist/resources/mex/actividad-vulnerable/mjr/alerts.d.ts +170 -0
  109. package/dist/resources/mex/actividad-vulnerable/mjr/alerts.d.ts.map +1 -0
  110. package/dist/resources/mex/actividad-vulnerable/mjr/{reports.js → alerts.js} +83 -83
  111. package/dist/resources/mex/actividad-vulnerable/mjr/index.d.ts +1 -1
  112. package/dist/resources/mex/actividad-vulnerable/mjr/index.d.ts.map +1 -1
  113. package/dist/resources/mex/actividad-vulnerable/mjr/index.js +1 -1
  114. package/dist/resources/mex/actividad-vulnerable/tsc/alerts.d.ts +170 -0
  115. package/dist/resources/mex/actividad-vulnerable/tsc/alerts.d.ts.map +1 -0
  116. package/dist/resources/mex/actividad-vulnerable/tsc/{reports.js → alerts.js} +82 -82
  117. package/dist/resources/mex/actividad-vulnerable/tsc/index.d.ts +1 -1
  118. package/dist/resources/mex/actividad-vulnerable/tsc/index.d.ts.map +1 -1
  119. package/dist/resources/mex/actividad-vulnerable/tsc/index.js +1 -1
  120. package/dist/resources/mex/alerts.d.ts +266 -0
  121. package/dist/resources/mex/alerts.d.ts.map +1 -0
  122. package/dist/resources/mex/{reports.js → alerts.js} +109 -109
  123. package/dist/resources/mex/ebr.d.ts +1 -1
  124. package/dist/resources/mex/ebr.js +1 -1
  125. package/dist/resources/mex/index.d.ts +1 -1
  126. package/dist/resources/mex/index.d.ts.map +1 -1
  127. package/dist/resources/mex/index.js +1 -1
  128. package/dist/sdk/ComplianceSDK.d.ts +10 -10
  129. package/dist/sdk/ComplianceSDK.d.ts.map +1 -1
  130. package/dist/sdk/ComplianceSDK.js +9 -9
  131. package/dist/sdk/base.js +2 -2
  132. package/dist/sdk/mex/ComplianceSDK.d.ts +3 -3
  133. package/dist/sdk/mex/ComplianceSDK.d.ts.map +1 -1
  134. package/dist/sdk/mex/ComplianceSDK.js +1 -1
  135. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts +2 -2
  136. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts.map +1 -1
  137. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts +3 -3
  138. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts.map +1 -1
  139. package/dist/sdk/mex/actividad-vulnerable/avi/types.js +2 -2
  140. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts +2 -2
  141. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts.map +1 -1
  142. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts +3 -3
  143. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts.map +1 -1
  144. package/dist/sdk/mex/actividad-vulnerable/jys/types.js +2 -2
  145. package/dist/sdk/mex/actividad-vulnerable/mjr/ComplianceSDK.d.ts +2 -2
  146. package/dist/sdk/mex/actividad-vulnerable/mjr/ComplianceSDK.d.ts.map +1 -1
  147. package/dist/sdk/mex/actividad-vulnerable/mjr/types.d.ts +3 -3
  148. package/dist/sdk/mex/actividad-vulnerable/mjr/types.d.ts.map +1 -1
  149. package/dist/sdk/mex/actividad-vulnerable/mjr/types.js +2 -2
  150. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts +2 -2
  151. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts.map +1 -1
  152. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts +3 -3
  153. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts.map +1 -1
  154. package/dist/sdk/mex/actividad-vulnerable/tsc/types.js +2 -2
  155. package/dist/sdk/mex/index.js +2 -2
  156. package/dist/sdk/mex/types.d.ts +2 -2
  157. package/dist/sdk/mex/types.d.ts.map +1 -1
  158. package/dist/sdk/resource-registry.d.ts +4 -4
  159. package/dist/sdk/resource-registry.d.ts.map +1 -1
  160. package/dist/sdk/resource-registry.js +1 -1
  161. package/dist/utils/upload.js +1 -1
  162. package/package.json +2 -2
  163. package/dist/models/Report.d.ts +0 -98
  164. package/dist/models/Report.d.ts.map +0 -1
  165. package/dist/models/ReportItem.d.ts.map +0 -1
  166. package/dist/models/mex/MexReport.d.ts +0 -50
  167. package/dist/models/mex/MexReport.d.ts.map +0 -1
  168. package/dist/models/mex/MexReportItem.d.ts +0 -39
  169. package/dist/models/mex/MexReportItem.d.ts.map +0 -1
  170. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReport.d.ts +0 -38
  171. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReport.d.ts.map +0 -1
  172. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.d.ts +0 -38
  173. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.d.ts.map +0 -1
  174. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReport.d.ts +0 -53
  175. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReport.d.ts.map +0 -1
  176. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.d.ts +0 -56
  177. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.d.ts.map +0 -1
  178. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReport.d.ts +0 -53
  179. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReport.d.ts.map +0 -1
  180. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.d.ts +0 -56
  181. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.d.ts.map +0 -1
  182. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRReport.d.ts +0 -53
  183. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRReport.d.ts.map +0 -1
  184. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRReportItem.d.ts +0 -56
  185. package/dist/models/mex/actividad-vulnerable/mjr/MexMJRReportItem.d.ts.map +0 -1
  186. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReport.d.ts +0 -53
  187. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReport.d.ts.map +0 -1
  188. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.d.ts +0 -56
  189. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.d.ts.map +0 -1
  190. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts +0 -190
  191. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts.map +0 -1
  192. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts +0 -170
  193. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts.map +0 -1
  194. package/dist/resources/mex/actividad-vulnerable/mjr/reports.d.ts +0 -170
  195. package/dist/resources/mex/actividad-vulnerable/mjr/reports.d.ts.map +0 -1
  196. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts +0 -170
  197. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts.map +0 -1
  198. package/dist/resources/mex/reports.d.ts +0 -266
  199. package/dist/resources/mex/reports.d.ts.map +0 -1
  200. package/dist/resources/reports.d.ts +0 -245
  201. package/dist/resources/reports.d.ts.map +0 -1
@@ -1,33 +1,33 @@
1
1
  /**
2
- * Reports Resource
2
+ * Alerts Resource
3
3
  *
4
- * CRUD operations, report items management, validation, and generation.
4
+ * CRUD operations, alert items management, validation, and generation.
5
5
  *
6
6
  * This is the base (unscoped) resource. For jurisdiction-scoped SDKs, use:
7
- * - MexReportsResource - Mexico-scoped with flattened MX fields
8
- * - AVIReportsResource - Mexico AVI-scoped with flattened AVI fields
9
- * - JYSReportsResource - Mexico JYS-scoped with flattened JYS fields
10
- * - TSCReportsResource - Mexico TSC-scoped with flattened TSC fields
7
+ * - MexAlertsResource - Mexico-scoped with flattened MX fields
8
+ * - AVIAlertsResource - Mexico AVI-scoped with flattened AVI fields
9
+ * - JYSAlertsResource - Mexico JYS-scoped with flattened JYS fields
10
+ * - TSCAlertsResource - Mexico TSC-scoped with flattened TSC fields
11
11
  */
12
12
  import { z } from "zod";
13
- import { createReportInputSchema, updateReportInputSchema, upsertReportInputSchema, updateReportStatusInputSchema, createReportItemInputSchema, updateReportItemInputSchema, reportDefaultsInputSchema, submitReportInputSchema, } from "@artu-ai/shared";
13
+ import { createAlertInputSchema, updateAlertInputSchema, upsertAlertInputSchema, updateReportStatusInputSchema, createAlertItemInputSchema, updateAlertItemInputSchema, alertDefaultsInputSchema, submitAlertInputSchema, } from "@artu-ai/shared";
14
14
  import { BaseResource } from "./base";
15
- import { Report, ReportItem, } from "../models";
15
+ import { Alert, AlertItem, } from "../models";
16
16
  // ===========================
17
- // ReportsResource
17
+ // AlertsResource
18
18
  // ===========================
19
19
  /**
20
- * Base resource manager for report operations.
20
+ * Base resource manager for alert operations.
21
21
  *
22
22
  * Provides:
23
23
  * - CRUD operations (create, retrieve, update, delete)
24
- * - Report items management (add, update, remove items)
24
+ * - Alert items management (add, update, remove items)
25
25
  * - Validation and generation
26
26
  *
27
27
  * @example
28
28
  * ```typescript
29
- * // Create a report with full nested format
30
- * const report = await sdk.reports.create({
29
+ * // Create a alert with full nested format
30
+ * const alert = await sdk.alerts.create({
31
31
  * jurisdictions: {
32
32
  * MX: {
33
33
  * actividadVulnerable: {
@@ -37,105 +37,105 @@ import { Report, ReportItem, } from "../models";
37
37
  * }
38
38
  * });
39
39
  *
40
- * // Add items to the report
41
- * await sdk.reports.addItem(report.id, {
40
+ * // Add items to the alert
41
+ * await sdk.alerts.addItem(alert.id, {
42
42
  * transactionId: "txn_123",
43
43
  * });
44
44
  *
45
- * // Validate the report
46
- * const result = await sdk.reports.validate(report.id);
45
+ * // Validate the alert
46
+ * const result = await sdk.alerts.validate(alert.id);
47
47
  * if (result.valid) {
48
48
  * // Generate XML
49
- * const xml = await sdk.reports.generate(report.id);
49
+ * const xml = await sdk.alerts.generate(alert.id);
50
50
  * }
51
51
  * ```
52
52
  */
53
- export class ReportsResource extends BaseResource {
53
+ export class AlertsResource extends BaseResource {
54
54
  // ─────────────────────────────────────────────────────────────────
55
- // Report CRUD
55
+ // Alert CRUD
56
56
  // ─────────────────────────────────────────────────────────────────
57
57
  /**
58
- * Creates a new report.
58
+ * Creates a new alert.
59
59
  *
60
- * @param data - Report creation data in nested format
61
- * @returns The created report model
60
+ * @param data - Alert creation data in nested format
61
+ * @returns The created alert model
62
62
  */
63
63
  async create(data) {
64
- const validated = this.validate(createReportInputSchema, data);
65
- const response = await this.execute(() => this.trpc.reports.create.mutate(validated));
64
+ const validated = this.validate(createAlertInputSchema, data);
65
+ const response = await this.execute(() => this.trpc.alerts.create.mutate(validated));
66
66
  return this.instantiate(response);
67
67
  }
68
68
  /**
69
- * Retrieves a report by ID.
69
+ * Retrieves a alert by ID.
70
70
  */
71
71
  async retrieve(id) {
72
- const response = await this.execute(() => this.trpc.reports.retrieve.query({ id }));
72
+ const response = await this.execute(() => this.trpc.alerts.retrieve.query({ id }));
73
73
  return this.instantiate(response);
74
74
  }
75
75
  /**
76
- * Retrieves a report by metadata key/value.
76
+ * Retrieves a alert by metadata key/value.
77
77
  */
78
78
  async retrieveByMetadata(key, value) {
79
- const response = await this.execute(() => this.trpc.reports.retrieveByMetadata.query({ key, value }));
79
+ const response = await this.execute(() => this.trpc.alerts.retrieveByMetadata.query({ key, value }));
80
80
  return this.instantiate(response);
81
81
  }
82
82
  /**
83
- * Retrieves a report by externalId.
83
+ * Retrieves a alert by externalId.
84
84
  */
85
85
  async retrieveByExternalId(externalId) {
86
- const response = await this.execute(() => this.trpc.reports.retrieveByExternalId.query({ externalId }));
86
+ const response = await this.execute(() => this.trpc.alerts.retrieveByExternalId.query({ externalId }));
87
87
  return this.instantiate(response);
88
88
  }
89
89
  /**
90
- * Updates a report.
90
+ * Updates a alert.
91
91
  */
92
92
  async update(id, data) {
93
- const validated = this.validate(updateReportInputSchema, data);
94
- const response = await this.execute(() => this.trpc.reports.update.mutate({ id, data: validated }));
93
+ const validated = this.validate(updateAlertInputSchema, data);
94
+ const response = await this.execute(() => this.trpc.alerts.update.mutate({ id, data: validated }));
95
95
  return this.instantiate(response);
96
96
  }
97
97
  /**
98
- * Updates a report's status.
98
+ * Updates a alert's status.
99
99
  *
100
100
  * Restrictions:
101
101
  * - Can only manually set to: Draft
102
102
  * - Cannot change from: Accepted (terminal), Submitted (awaiting response)
103
103
  *
104
- * Use this to reset a report back to Draft status for re-editing.
104
+ * Use this to reset a alert back to Draft status for re-editing.
105
105
  */
106
106
  async updateStatus(id, data) {
107
107
  const validated = this.validate(updateReportStatusInputSchema, data);
108
- const response = await this.execute(() => this.trpc.reports.updateStatus.mutate({ id, data: validated }));
108
+ const response = await this.execute(() => this.trpc.alerts.updateStatus.mutate({ id, data: validated }));
109
109
  return this.instantiate(response);
110
110
  }
111
111
  /**
112
- * Deletes a report.
112
+ * Deletes a alert.
113
113
  */
114
114
  async delete(id) {
115
- await this.execute(() => this.trpc.reports.delete.mutate({ id }));
115
+ await this.execute(() => this.trpc.alerts.delete.mutate({ id }));
116
116
  }
117
117
  /**
118
- * Lists reports with optional filtering and pagination.
118
+ * Lists alerts with optional filtering and pagination.
119
119
  */
120
120
  async list(options) {
121
- const response = await this.execute(() => this.trpc.reports.list.query(options));
121
+ const response = await this.execute(() => this.trpc.alerts.list.query(options));
122
122
  return {
123
123
  data: response.data.map((r) => this.instantiate(r)),
124
124
  pagination: response.pagination,
125
125
  };
126
126
  }
127
127
  /**
128
- * Counts reports matching the given filter.
128
+ * Counts alerts matching the given filter.
129
129
  *
130
130
  * @param filter - Optional filter criteria
131
- * @returns The count of matching reports
131
+ * @returns The count of matching alerts
132
132
  */
133
133
  async count(filter) {
134
- const response = await this.execute(() => this.trpc.reports.count.query({ filter }));
134
+ const response = await this.execute(() => this.trpc.alerts.count.query({ filter }));
135
135
  return response.count;
136
136
  }
137
137
  /**
138
- * Returns an async iterator over all reports matching the filter.
138
+ * Returns an async iterator over all alerts matching the filter.
139
139
  */
140
140
  iterate(options) {
141
141
  return this.createIterator({
@@ -145,47 +145,47 @@ export class ReportsResource extends BaseResource {
145
145
  });
146
146
  }
147
147
  // ─────────────────────────────────────────────────────────────────
148
- // Report Items
148
+ // Alert Items
149
149
  // ─────────────────────────────────────────────────────────────────
150
150
  /**
151
- * Adds an item to a report.
151
+ * Adds an item to a alert.
152
152
  */
153
- async addItem(reportId, data) {
154
- const validated = this.validate(createReportItemInputSchema, data);
155
- const response = await this.execute(() => this.trpc.reports.addItem.mutate({ reportId, data: validated }));
153
+ async addItem(alertId, data) {
154
+ const validated = this.validate(createAlertItemInputSchema, data);
155
+ const response = await this.execute(() => this.trpc.alerts.addItem.mutate({ alertId, data: validated }));
156
156
  return this.instantiateItem(response);
157
157
  }
158
158
  /**
159
- * Gets a specific report item.
159
+ * Gets a specific alert item.
160
160
  */
161
- async getItem(reportId, itemId) {
162
- const response = await this.execute(() => this.trpc.reports.getItem.query({ reportId, itemId }));
161
+ async getItem(alertId, itemId) {
162
+ const response = await this.execute(() => this.trpc.alerts.getItem.query({ alertId, itemId }));
163
163
  return this.instantiateItem(response);
164
164
  }
165
165
  /**
166
- * Updates a report item.
166
+ * Updates a alert item.
167
167
  */
168
- async updateItem(reportId, itemId, data) {
169
- const validated = this.validate(updateReportItemInputSchema, data);
170
- const response = await this.execute(() => this.trpc.reports.updateItem.mutate({
171
- reportId,
168
+ async updateItem(alertId, itemId, data) {
169
+ const validated = this.validate(updateAlertItemInputSchema, data);
170
+ const response = await this.execute(() => this.trpc.alerts.updateItem.mutate({
171
+ alertId,
172
172
  itemId,
173
173
  data: validated,
174
174
  }));
175
175
  return this.instantiateItem(response);
176
176
  }
177
177
  /**
178
- * Removes an item from a report.
178
+ * Removes an item from a alert.
179
179
  */
180
- async removeItem(reportId, itemId) {
181
- await this.execute(() => this.trpc.reports.removeItem.mutate({ reportId, itemId }));
180
+ async removeItem(alertId, itemId) {
181
+ await this.execute(() => this.trpc.alerts.removeItem.mutate({ alertId, itemId }));
182
182
  }
183
183
  /**
184
- * Lists items in a report with filtering, sorting, and pagination.
184
+ * Lists items in a alert with filtering, sorting, and pagination.
185
185
  */
186
- async listItems(reportId, options) {
187
- const response = await this.execute(() => this.trpc.reports.listItems.query({
188
- reportId,
186
+ async listItems(alertId, options) {
187
+ const response = await this.execute(() => this.trpc.alerts.listItems.query({
188
+ alertId,
189
189
  ...options,
190
190
  }));
191
191
  return {
@@ -194,96 +194,96 @@ export class ReportsResource extends BaseResource {
194
194
  };
195
195
  }
196
196
  /**
197
- * Adds multiple items to a report.
197
+ * Adds multiple items to a alert.
198
198
  * Validates all items upfront - fails fast if any item is invalid.
199
199
  */
200
- async addItems(reportId, items) {
201
- const validated = this.validate(z.array(createReportItemInputSchema), items);
202
- const response = await this.execute(() => this.trpc.reports.addItems.mutate({ reportId, items: validated }));
200
+ async addItems(alertId, items) {
201
+ const validated = this.validate(z.array(createAlertItemInputSchema), items);
202
+ const response = await this.execute(() => this.trpc.alerts.addItems.mutate({ alertId, items: validated }));
203
203
  return {
204
204
  added: response.added,
205
205
  items: response.items.map((i) => this.instantiateItem(i)),
206
206
  };
207
207
  }
208
208
  /**
209
- * Removes multiple items from a report.
209
+ * Removes multiple items from a alert.
210
210
  */
211
- async removeItems(reportId, itemIds) {
212
- return this.execute(() => this.trpc.reports.removeItems.mutate({ reportId, itemIds }));
211
+ async removeItems(alertId, itemIds) {
212
+ return this.execute(() => this.trpc.alerts.removeItems.mutate({ alertId, itemIds }));
213
213
  }
214
214
  // ─────────────────────────────────────────────────────────────────
215
215
  // Validation & Generation
216
216
  // ─────────────────────────────────────────────────────────────────
217
217
  /**
218
- * Validates a report and its items.
218
+ * Validates a alert and its items.
219
219
  *
220
220
  * Requires jurisdiction-specific defaults.
221
221
  * For scoped SDKs, use the scoped resource which provides a simpler API.
222
222
  *
223
- * @param reportId - The report ID to validate
223
+ * @param alertId - The alert ID to validate
224
224
  * @param defaults - Jurisdiction-specific defaults for validation
225
225
  */
226
- async validateReport(reportId, defaults) {
227
- const validated = this.validate(reportDefaultsInputSchema, defaults);
228
- return this.execute(() => this.trpc.reports.validate.mutate({ reportId, ...validated }));
226
+ async validateAlert(alertId, defaults) {
227
+ const validated = this.validate(alertDefaultsInputSchema, defaults);
228
+ return this.execute(() => this.trpc.alerts.validate.mutate({ alertId, ...validated }));
229
229
  }
230
230
  /**
231
- * Validates and generates the report output (e.g., XML for Mexico reports).
231
+ * Validates and generates the alert output (e.g., XML for Mexico alerts).
232
232
  *
233
233
  * Performs validation first:
234
234
  * - If validation fails, returns `{ status: "validation_failed", validation: {...} }`
235
235
  * - If validation passes, returns `{ status: "success", xml: "...", ... }`
236
236
  *
237
- * Use `validateReport` for dry-run/preview validation without generating XML.
237
+ * Use `validateAlert` for dry-run/preview validation without generating XML.
238
238
  *
239
- * @param reportId - The report ID to generate
239
+ * @param alertId - The alert ID to generate
240
240
  * @param defaults - Jurisdiction-specific defaults for generation
241
241
  * @returns GenerateResult with status "success" or "validation_failed"
242
242
  */
243
- async generateReport(reportId, defaults) {
244
- const validated = this.validate(reportDefaultsInputSchema, defaults);
245
- return this.execute(() => this.trpc.reports.generate.mutate({ reportId, ...validated }));
243
+ async generateAlert(alertId, defaults) {
244
+ const validated = this.validate(alertDefaultsInputSchema, defaults);
245
+ return this.execute(() => this.trpc.alerts.generate.mutate({ alertId, ...validated }));
246
246
  }
247
247
  // ─────────────────────────────────────────────────────────────────
248
248
  // Submission
249
249
  // ─────────────────────────────────────────────────────────────────
250
250
  /**
251
- * Submits a validated report.
251
+ * Submits a validated alert.
252
252
  *
253
- * The report must be in "valid" status. After submission, the report
253
+ * The alert must be in "valid" status. After submission, the alert
254
254
  * is locked and cannot be edited.
255
255
  *
256
- * @param reportId - The report ID
256
+ * @param alertId - The alert ID
257
257
  * @param input - Submission data with jurisdiction-specific structure
258
258
  */
259
259
  async submit(input) {
260
- const validated = this.validate(submitReportInputSchema, input);
261
- return this.execute(() => this.trpc.reports.submit.mutate(validated));
260
+ const validated = this.validate(submitAlertInputSchema, input);
261
+ return this.execute(() => this.trpc.alerts.submit.mutate(validated));
262
262
  }
263
263
  // ─────────────────────────────────────────────────────────────────
264
264
  // Upsert Operations
265
265
  // ─────────────────────────────────────────────────────────────────
266
266
  /**
267
- * Creates or updates a report by externalId.
267
+ * Creates or updates a alert by externalId.
268
268
  *
269
- * If a report with the given externalId exists, it will be updated.
270
- * Otherwise, a new report will be created.
269
+ * If a alert with the given externalId exists, it will be updated.
270
+ * Otherwise, a new alert will be created.
271
271
  *
272
- * @param data - Report upsert data (must include externalId)
273
- * @returns The created or updated report with action indicator
272
+ * @param data - Alert upsert data (must include externalId)
273
+ * @returns The created or updated alert with action indicator
274
274
  */
275
275
  async upsertByExternalId(data) {
276
- const validated = this.validate(upsertReportInputSchema, data);
277
- const response = await this.execute(() => this.trpc.reports.upsertByExternalId.mutate(validated));
276
+ const validated = this.validate(upsertAlertInputSchema, data);
277
+ const response = await this.execute(() => this.trpc.alerts.upsertByExternalId.mutate(validated));
278
278
  return {
279
279
  data: this.instantiate(response.data),
280
280
  action: response.action,
281
281
  };
282
282
  }
283
- async upsertManyByExternalId(reports, options = {}) {
283
+ async upsertManyByExternalId(alerts, options = {}) {
284
284
  const atomic = options.atomic ?? true;
285
- const validated = this.validate(z.array(upsertReportInputSchema), reports);
286
- const response = await this.execute(() => this.trpc.reports.upsertManyByExternalId.mutate({
285
+ const validated = this.validate(z.array(upsertAlertInputSchema), alerts);
286
+ const response = await this.execute(() => this.trpc.alerts.upsertManyByExternalId.mutate({
287
287
  items: validated,
288
288
  atomic,
289
289
  }));
@@ -310,10 +310,10 @@ export class ReportsResource extends BaseResource {
310
310
  };
311
311
  }
312
312
  }
313
- async createMany(reports, options = {}) {
313
+ async createMany(alerts, options = {}) {
314
314
  const atomic = options.atomic ?? true;
315
- const validated = this.validate(z.array(createReportInputSchema), reports);
316
- const response = await this.execute(() => this.trpc.reports.createMany.mutate({ items: validated, atomic }));
315
+ const validated = this.validate(z.array(createAlertInputSchema), alerts);
316
+ const response = await this.execute(() => this.trpc.alerts.createMany.mutate({ items: validated, atomic }));
317
317
  if (response.atomic) {
318
318
  return {
319
319
  atomic: true,
@@ -335,10 +335,10 @@ export class ReportsResource extends BaseResource {
335
335
  const atomic = options.atomic ?? true;
336
336
  const updateItemSchema = z.object({
337
337
  id: z.uuid(),
338
- data: updateReportInputSchema,
338
+ data: updateAlertInputSchema,
339
339
  });
340
340
  const validated = this.validate(z.array(updateItemSchema), updates);
341
- const response = await this.execute(() => this.trpc.reports.updateMany.mutate({ items: validated, atomic }));
341
+ const response = await this.execute(() => this.trpc.alerts.updateMany.mutate({ items: validated, atomic }));
342
342
  if (response.atomic) {
343
343
  return {
344
344
  atomic: true,
@@ -360,17 +360,17 @@ export class ReportsResource extends BaseResource {
360
360
  // Instantiation (protected for subclasses to override)
361
361
  // ─────────────────────────────────────────────────────────────────
362
362
  /**
363
- * Instantiates a Report model from API response data.
363
+ * Instantiates a Alert model from API response data.
364
364
  * Subclasses override this to return their specific model type.
365
365
  */
366
366
  instantiate(data) {
367
- return new Report(data);
367
+ return new Alert(data);
368
368
  }
369
369
  /**
370
- * Instantiates a ReportItem model from API response data.
370
+ * Instantiates a AlertItem model from API response data.
371
371
  * Subclasses override this to return their specific model type.
372
372
  */
373
373
  instantiateItem(data) {
374
- return new ReportItem(data);
374
+ return new AlertItem(data);
375
375
  }
376
376
  }
@@ -14,7 +14,7 @@ export { BaseResource, ReadOnlyResource, type ResourceConfig } from "./base";
14
14
  export { ClientsResource, type BatchOptions } from "./clients";
15
15
  export { TransactionsResource } from "./transactions";
16
16
  export type { RelatedClient, LinkedClient } from "@artu-ai/shared";
17
- export { ReportsResource, type ReportFilter, type ReportItemFilter, type AddItemsResult, } from "./reports";
17
+ export { AlertsResource, type AlertFilter, type AlertItemFilter, type AddItemsResult, } from "./alerts";
18
18
  export { AddressesResource } from "./addresses";
19
19
  export { ContactMethodsResource } from "./contact-methods";
20
20
  export { BankAccountsResource } from "./bank-accounts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG7E,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG7E,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,cAAc,OAAO,CAAC"}
@@ -15,7 +15,7 @@ export { BaseResource, ReadOnlyResource } from "./base";
15
15
  // Base resource implementations (unscoped)
16
16
  export { ClientsResource } from "./clients";
17
17
  export { TransactionsResource } from "./transactions";
18
- export { ReportsResource, } from "./reports";
18
+ export { AlertsResource, } from "./alerts";
19
19
  // Supporting resources
20
20
  export { AddressesResource } from "./addresses";
21
21
  export { ContactMethodsResource } from "./contact-methods";
@@ -0,0 +1,190 @@
1
+ /**
2
+ * AVI (Activos Virtuales) Alerts Resource
3
+ *
4
+ * Extends MexAlertsResource with AVI-specific behavior:
5
+ * - Accepts flattened CreateAVIAlertInput (AVI fields at root level)
6
+ * - Returns MexAVIAlert models
7
+ */
8
+ import type { CreateAlertInput, UpdateAlertInput, CreateAlertItemInput, UpdateAlertItemInput, CreateAVIAlertInput, UpdateAVIAlertInput, UpsertAVIAlertInput, CreateAVIAlertItemInput, UpdateAVIAlertItemInput, ListOptions, PaginatedResponse, AtomicBatchResult, PartialBatchResult, ValidationResult, GenerateResult, SubmissionResult, AviAlertDefaultsInput, SubmitAVIAlertInput, UpsertResult } from "@artu-ai/shared";
9
+ import type { AVIAlertFilter, AVIAlertSort, AVIAlertItemFilter, AlertSort, AlertItemFilter, AlertItemSort } from "@artu-ai/shared";
10
+ import { MexAlertsResource } from "../../alerts";
11
+ import { MexAVIAlert, MexAVIAlertItem, type AlertData, type AlertItemData } from "../../../../models";
12
+ /**
13
+ * AVI (Activos Virtuales) scoped alerts resource.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const aviSdk = new ComplianceSDK({
18
+ * apiKey,
19
+ * jurisdiction: Jurisdiction.Mexico,
20
+ * actividadVulnerable: CodigoActividad.AVI,
21
+ * });
22
+ *
23
+ * // Create with fully flattened input
24
+ * const alert = await aviSdk.alerts.create({
25
+ * mesReportado: "202401",
26
+ * });
27
+ *
28
+ * // Returns MexAVIAlert
29
+ * console.log(alert.mesReportado);
30
+ * ```
31
+ */
32
+ export declare class AVIAlertsResource extends MexAlertsResource<AVIAlertSort, AviAlertDefaultsInput> {
33
+ create(data: CreateAVIAlertInput): Promise<MexAVIAlert>;
34
+ retrieve(id: string): Promise<MexAVIAlert>;
35
+ retrieveByMetadata(key: string, value: string): Promise<MexAVIAlert>;
36
+ retrieveByExternalId(externalId: string): Promise<MexAVIAlert>;
37
+ update(id: string, data: UpdateAVIAlertInput): Promise<MexAVIAlert>;
38
+ /**
39
+ * Lists AVI alerts with optional filtering.
40
+ *
41
+ * Accepts flattened AVI filter (future AVI-specific alert fields at root level).
42
+ */
43
+ list(options?: ListOptions<AVIAlertFilter, AVIAlertSort>): Promise<PaginatedResponse<MexAVIAlert>>;
44
+ /**
45
+ * Iterates over AVI alerts.
46
+ *
47
+ * Accepts flattened AVI filter (future AVI-specific alert fields at root level).
48
+ */
49
+ iterate(options?: {
50
+ filter?: AVIAlertFilter;
51
+ sort?: AVIAlertSort;
52
+ pageSize?: number;
53
+ }): AsyncGenerator<MexAVIAlert, void, undefined>;
54
+ /**
55
+ * Counts AVI alerts matching the given filter.
56
+ *
57
+ * @param filter - Optional filter criteria (with AVI fields at root level)
58
+ * @returns The count of matching alerts
59
+ */
60
+ count(filter?: AVIAlertFilter): Promise<number>;
61
+ createMany(alerts: CreateAVIAlertInput[], options?: {
62
+ atomic?: true;
63
+ }): Promise<AtomicBatchResult<MexAVIAlert>>;
64
+ createMany(alerts: CreateAVIAlertInput[], options: {
65
+ atomic: false;
66
+ }): Promise<PartialBatchResult<MexAVIAlert>>;
67
+ updateMany(updates: {
68
+ id: string;
69
+ data: UpdateAVIAlertInput;
70
+ }[], options?: {
71
+ atomic?: true;
72
+ }): Promise<AtomicBatchResult<MexAVIAlert>>;
73
+ updateMany(updates: {
74
+ id: string;
75
+ data: UpdateAVIAlertInput;
76
+ }[], options: {
77
+ atomic: false;
78
+ }): Promise<PartialBatchResult<MexAVIAlert>>;
79
+ /**
80
+ * Creates or updates an AVI alert by externalId.
81
+ *
82
+ * @param data - Alert upsert data with AVI fields at root level (must include externalId)
83
+ * @returns The created or updated alert with action indicator
84
+ */
85
+ upsertByExternalId(data: UpsertAVIAlertInput): Promise<UpsertResult<MexAVIAlert>>;
86
+ /**
87
+ * Creates or updates multiple AVI alerts by externalId.
88
+ *
89
+ * @param alerts - Array of alert upsert data (each must include externalId)
90
+ * @param options - Batch options (atomic: true by default)
91
+ * @returns Atomic result with data array, or partial result with succeeded/failed
92
+ */
93
+ upsertManyByExternalId(alerts: UpsertAVIAlertInput[], options?: {
94
+ atomic?: true;
95
+ }): Promise<AtomicBatchResult<UpsertResult<MexAVIAlert>>>;
96
+ upsertManyByExternalId(alerts: UpsertAVIAlertInput[], options: {
97
+ atomic: false;
98
+ }): Promise<PartialBatchResult<UpsertResult<MexAVIAlert>>>;
99
+ addItem(alertId: string, data: CreateAVIAlertItemInput): Promise<MexAVIAlertItem>;
100
+ getItem(alertId: string, itemId: string): Promise<MexAVIAlertItem>;
101
+ updateItem(alertId: string, itemId: string, data: UpdateAVIAlertItemInput): Promise<MexAVIAlertItem>;
102
+ listItems(alertId: string, options?: ListOptions<AVIAlertItemFilter, AlertItemSort>): Promise<PaginatedResponse<MexAVIAlertItem>>;
103
+ /**
104
+ * Transforms a flattened AVIAlertItemFilter to nested AlertItemFilter format.
105
+ */
106
+ protected applyScopeToItemFilter(filter?: AVIAlertItemFilter): AlertItemFilter | undefined;
107
+ addItems(alertId: string, items: CreateAVIAlertItemInput[]): Promise<{
108
+ added: number;
109
+ items: MexAVIAlertItem[];
110
+ }>;
111
+ /**
112
+ * Validates an AVI alert.
113
+ *
114
+ * Uses AVI-scoped validation input (jurisdiction and activity are implicit).
115
+ *
116
+ * @param alertId - The alert ID to validate
117
+ * @param defaults - AVI alert defaults including rfc, platformDomain, alertType, etc.
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * const result = await aviSdk.alerts.validateAlert(alert.id, {
122
+ * rfc: "ABC200101XXX",
123
+ * platformDomain: "https://example.com",
124
+ * alertType: "100",
125
+ * });
126
+ * ```
127
+ */
128
+ validateAlert(alertId: string, defaults: AviAlertDefaultsInput): Promise<ValidationResult>;
129
+ /**
130
+ * Generates XML for an AVI alert.
131
+ *
132
+ * Uses the same input as validateAlert.
133
+ *
134
+ * @param alertId - The alert ID to generate XML for
135
+ * @param defaults - AVI alert defaults including rfc, platformDomain, alertType, etc.
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * const result = await aviSdk.alerts.generateAlert(alert.id, {
140
+ * rfc: "ABC200101XXX",
141
+ * platformDomain: "https://example.com",
142
+ * alertType: "100",
143
+ * });
144
+ * console.log(result.xml);
145
+ * ```
146
+ */
147
+ generateAlert(alertId: string, defaults: AviAlertDefaultsInput): Promise<GenerateResult>;
148
+ /**
149
+ * Submits a validated AVI alert.
150
+ *
151
+ * Uses AVI-scoped submission input (activity is implicit).
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * const result = await aviSdk.alerts.submit({
156
+ * alertId: alert.id,
157
+ * acuseRecibo: "SAT-12345",
158
+ * notes: "Submitted via portal",
159
+ * });
160
+ * ```
161
+ */
162
+ submit(input: SubmitAVIAlertInput): Promise<SubmissionResult>;
163
+ /**
164
+ * Transforms a flattened AVIAlertSort to nested AlertSort format.
165
+ *
166
+ * Maps flattened field names to their full API paths.
167
+ */
168
+ protected applyScopeToSort(sort?: AVIAlertSort): AlertSort | undefined;
169
+ protected transformToNested(data: CreateAVIAlertInput): CreateAlertInput;
170
+ /**
171
+ * Transforms AVI update input to nested API format.
172
+ *
173
+ * NOTE: Always includes `actividadVulnerable: { AVI: {} }` even if no
174
+ * AVI-specific fields are provided. This ensures that records touched via
175
+ * the AVI SDK can be filtered by `activityCodes: { in: ["AVI"] }`.
176
+ */
177
+ protected transformUpdateToNested(data: UpdateAVIAlertInput): UpdateAlertInput;
178
+ protected instantiate(data: AlertData): MexAVIAlert;
179
+ protected instantiateItem(data: AlertItemData): MexAVIAlertItem;
180
+ protected transformItemToNested(data: CreateAVIAlertItemInput): CreateAlertItemInput;
181
+ protected transformItemUpdateToNested(data: UpdateAVIAlertItemInput): UpdateAlertItemInput;
182
+ /**
183
+ * Transforms AVI defaults to nested API format for validate/generate.
184
+ */
185
+ protected transformAviDefaultsToNested(alertId: string, defaults: AviAlertDefaultsInput): {
186
+ alertId: string;
187
+ jurisdictions: unknown;
188
+ };
189
+ }
190
+ //# sourceMappingURL=alerts.d.ts.map