@artu-ai/compliance-sdk 0.0.6 → 0.3.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 (488) hide show
  1. package/dist/errors/api.d.ts +160 -0
  2. package/dist/errors/api.d.ts.map +1 -0
  3. package/dist/errors/api.js +255 -0
  4. package/dist/errors/base.d.ts +87 -0
  5. package/dist/errors/base.d.ts.map +1 -0
  6. package/dist/errors/base.js +84 -0
  7. package/dist/errors/index.d.ts +32 -0
  8. package/dist/errors/index.d.ts.map +1 -0
  9. package/dist/errors/index.js +35 -0
  10. package/dist/errors/upload.d.ts +109 -0
  11. package/dist/errors/upload.d.ts.map +1 -0
  12. package/dist/errors/upload.js +163 -0
  13. package/dist/errors/validation.d.ts +98 -0
  14. package/dist/errors/validation.d.ts.map +1 -0
  15. package/dist/errors/validation.js +129 -0
  16. package/dist/exports/base.d.ts +12 -0
  17. package/dist/exports/base.d.ts.map +1 -0
  18. package/dist/exports/base.js +21 -0
  19. package/dist/exports/index.d.ts +40 -0
  20. package/dist/exports/index.d.ts.map +1 -0
  21. package/dist/exports/index.js +59 -0
  22. package/dist/{mexico → exports/mexico}/actividad-vulnerable/avi.d.ts +130 -138
  23. package/dist/exports/mexico/actividad-vulnerable/avi.d.ts.map +1 -0
  24. package/dist/exports/mexico/actividad-vulnerable/avi.js +108 -0
  25. package/dist/{mexico → exports/mexico}/actividad-vulnerable/jys.d.ts +147 -158
  26. package/dist/exports/mexico/actividad-vulnerable/jys.d.ts.map +1 -0
  27. package/dist/exports/mexico/actividad-vulnerable/jys.js +115 -0
  28. package/dist/{mexico → exports/mexico}/actividad-vulnerable/tsc.d.ts +118 -129
  29. package/dist/exports/mexico/actividad-vulnerable/tsc.d.ts.map +1 -0
  30. package/dist/exports/mexico/actividad-vulnerable/tsc.js +103 -0
  31. package/dist/exports/mexico/index.d.ts +48 -0
  32. package/dist/exports/mexico/index.d.ts.map +1 -0
  33. package/dist/exports/mexico/index.js +70 -0
  34. package/dist/models/Address.d.ts +118 -0
  35. package/dist/models/Address.d.ts.map +1 -0
  36. package/dist/models/Address.js +187 -0
  37. package/dist/models/BankAccount.d.ts +124 -0
  38. package/dist/models/BankAccount.d.ts.map +1 -0
  39. package/dist/models/BankAccount.js +190 -0
  40. package/dist/models/Client.d.ts +170 -0
  41. package/dist/models/Client.d.ts.map +1 -0
  42. package/dist/models/Client.js +275 -0
  43. package/dist/models/ContactMethod.d.ts +102 -0
  44. package/dist/models/ContactMethod.d.ts.map +1 -0
  45. package/dist/models/ContactMethod.js +152 -0
  46. package/dist/models/Document.d.ts +167 -0
  47. package/dist/models/Document.d.ts.map +1 -0
  48. package/dist/models/Document.js +295 -0
  49. package/dist/models/LinkedClient.d.ts +62 -0
  50. package/dist/models/LinkedClient.d.ts.map +1 -0
  51. package/dist/models/LinkedClient.js +70 -0
  52. package/dist/models/Report.d.ts +98 -0
  53. package/dist/models/Report.d.ts.map +1 -0
  54. package/dist/models/Report.js +156 -0
  55. package/dist/models/ReportItem.d.ts +106 -0
  56. package/dist/models/ReportItem.d.ts.map +1 -0
  57. package/dist/models/ReportItem.js +167 -0
  58. package/dist/models/Transaction.d.ts +108 -0
  59. package/dist/models/Transaction.d.ts.map +1 -0
  60. package/dist/models/Transaction.js +175 -0
  61. package/dist/models/base.d.ts +42 -0
  62. package/dist/models/base.d.ts.map +1 -0
  63. package/dist/models/base.js +51 -0
  64. package/dist/models/index.d.ts +20 -0
  65. package/dist/models/index.d.ts.map +1 -0
  66. package/dist/models/index.js +34 -0
  67. package/dist/models/mex/MexAddress.d.ts +93 -0
  68. package/dist/models/mex/MexAddress.d.ts.map +1 -0
  69. package/dist/models/mex/MexAddress.js +148 -0
  70. package/dist/models/mex/MexBankAccount.d.ts +65 -0
  71. package/dist/models/mex/MexBankAccount.d.ts.map +1 -0
  72. package/dist/models/mex/MexBankAccount.js +90 -0
  73. package/dist/models/mex/MexClient.d.ts +88 -0
  74. package/dist/models/mex/MexClient.d.ts.map +1 -0
  75. package/dist/models/mex/MexClient.js +133 -0
  76. package/dist/models/mex/MexDocument.d.ts +415 -0
  77. package/dist/models/mex/MexDocument.d.ts.map +1 -0
  78. package/dist/models/mex/MexDocument.js +687 -0
  79. package/dist/models/mex/MexReport.d.ts +50 -0
  80. package/dist/models/mex/MexReport.d.ts.map +1 -0
  81. package/dist/models/mex/MexReport.js +73 -0
  82. package/dist/models/mex/MexReportItem.d.ts +39 -0
  83. package/dist/models/mex/MexReportItem.d.ts.map +1 -0
  84. package/dist/models/mex/MexReportItem.js +50 -0
  85. package/dist/models/mex/MexTransaction.d.ts +53 -0
  86. package/dist/models/mex/MexTransaction.d.ts.map +1 -0
  87. package/dist/models/mex/MexTransaction.js +78 -0
  88. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableClient.d.ts +37 -0
  89. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableClient.d.ts.map +1 -0
  90. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableClient.js +46 -0
  91. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReport.d.ts +38 -0
  92. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReport.d.ts.map +1 -0
  93. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReport.js +39 -0
  94. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.d.ts +38 -0
  95. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.d.ts.map +1 -0
  96. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.js +39 -0
  97. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.d.ts +29 -0
  98. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.d.ts.map +1 -0
  99. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.js +37 -0
  100. package/dist/models/mex/actividad-vulnerable/avi/MexAVIClient.d.ts +43 -0
  101. package/dist/models/mex/actividad-vulnerable/avi/MexAVIClient.d.ts.map +1 -0
  102. package/dist/models/mex/actividad-vulnerable/avi/MexAVIClient.js +59 -0
  103. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReport.d.ts +53 -0
  104. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReport.d.ts.map +1 -0
  105. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReport.js +75 -0
  106. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.d.ts +56 -0
  107. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.d.ts.map +1 -0
  108. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.js +63 -0
  109. package/dist/models/mex/actividad-vulnerable/avi/MexAVITransaction.d.ts +67 -0
  110. package/dist/models/mex/actividad-vulnerable/avi/MexAVITransaction.d.ts.map +1 -0
  111. package/dist/models/mex/actividad-vulnerable/avi/MexAVITransaction.js +136 -0
  112. package/dist/models/mex/actividad-vulnerable/index.d.ts +20 -0
  113. package/dist/models/mex/actividad-vulnerable/index.d.ts.map +1 -0
  114. package/dist/models/mex/actividad-vulnerable/index.js +25 -0
  115. package/dist/models/mex/actividad-vulnerable/jys/MexJYSClient.d.ts +39 -0
  116. package/dist/models/mex/actividad-vulnerable/jys/MexJYSClient.d.ts.map +1 -0
  117. package/dist/models/mex/actividad-vulnerable/jys/MexJYSClient.js +53 -0
  118. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReport.d.ts +53 -0
  119. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReport.d.ts.map +1 -0
  120. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReport.js +75 -0
  121. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.d.ts +56 -0
  122. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.d.ts.map +1 -0
  123. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.js +63 -0
  124. package/dist/models/mex/actividad-vulnerable/jys/MexJYSTransaction.d.ts +85 -0
  125. package/dist/models/mex/actividad-vulnerable/jys/MexJYSTransaction.d.ts.map +1 -0
  126. package/dist/models/mex/actividad-vulnerable/jys/MexJYSTransaction.js +152 -0
  127. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCClient.d.ts +39 -0
  128. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCClient.d.ts.map +1 -0
  129. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCClient.js +53 -0
  130. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReport.d.ts +53 -0
  131. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReport.d.ts.map +1 -0
  132. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReport.js +75 -0
  133. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.d.ts +56 -0
  134. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.d.ts.map +1 -0
  135. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.js +63 -0
  136. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.d.ts +53 -0
  137. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.d.ts.map +1 -0
  138. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.js +82 -0
  139. package/dist/models/mex/index.d.ts +12 -0
  140. package/dist/models/mex/index.d.ts.map +1 -0
  141. package/dist/models/mex/index.js +20 -0
  142. package/dist/models/types.d.ts +81 -0
  143. package/dist/models/types.d.ts.map +1 -0
  144. package/dist/models/types.js +6 -0
  145. package/dist/namespaces/index.d.ts +25 -0
  146. package/dist/namespaces/index.d.ts.map +1 -0
  147. package/dist/namespaces/index.js +27 -0
  148. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.d.ts +322 -0
  149. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.d.ts.map +1 -0
  150. package/dist/namespaces/mexico/actividad-vulnerable/avi/index.js +42 -0
  151. package/dist/namespaces/mexico/actividad-vulnerable/index.d.ts +1361 -0
  152. package/dist/namespaces/mexico/actividad-vulnerable/index.d.ts.map +1 -0
  153. package/dist/namespaces/mexico/actividad-vulnerable/index.js +53 -0
  154. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.d.ts +454 -0
  155. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.d.ts.map +1 -0
  156. package/dist/namespaces/mexico/actividad-vulnerable/jys/index.js +52 -0
  157. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.d.ts +162 -0
  158. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.d.ts.map +1 -0
  159. package/dist/namespaces/mexico/actividad-vulnerable/tsc/index.js +40 -0
  160. package/dist/namespaces/mexico/index.d.ts +2481 -0
  161. package/dist/namespaces/mexico/index.d.ts.map +1 -0
  162. package/dist/namespaces/mexico/index.js +140 -0
  163. package/dist/resources/addresses.d.ts +171 -0
  164. package/dist/resources/addresses.d.ts.map +1 -0
  165. package/dist/resources/addresses.js +208 -0
  166. package/dist/resources/bank-accounts.d.ts +174 -0
  167. package/dist/resources/bank-accounts.d.ts.map +1 -0
  168. package/dist/resources/bank-accounts.js +220 -0
  169. package/dist/resources/base.d.ts +192 -0
  170. package/dist/resources/base.d.ts.map +1 -0
  171. package/dist/resources/base.js +205 -0
  172. package/dist/resources/clients.d.ts +446 -0
  173. package/dist/resources/clients.d.ts.map +1 -0
  174. package/dist/resources/clients.js +448 -0
  175. package/dist/resources/contact-methods.d.ts +176 -0
  176. package/dist/resources/contact-methods.d.ts.map +1 -0
  177. package/dist/resources/contact-methods.js +215 -0
  178. package/dist/resources/documents.d.ts +340 -0
  179. package/dist/resources/documents.d.ts.map +1 -0
  180. package/dist/resources/documents.js +447 -0
  181. package/dist/resources/index.d.ts +23 -0
  182. package/dist/resources/index.d.ts.map +1 -0
  183. package/dist/resources/index.js +25 -0
  184. package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts +165 -0
  185. package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts.map +1 -0
  186. package/dist/resources/mex/actividad-vulnerable/avi/clients.js +317 -0
  187. package/dist/resources/mex/actividad-vulnerable/avi/index.d.ts +7 -0
  188. package/dist/resources/mex/actividad-vulnerable/avi/index.d.ts.map +1 -0
  189. package/dist/resources/mex/actividad-vulnerable/avi/index.js +6 -0
  190. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts +152 -0
  191. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts.map +1 -0
  192. package/dist/resources/mex/actividad-vulnerable/avi/reports.js +401 -0
  193. package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts +89 -0
  194. package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts.map +1 -0
  195. package/dist/resources/mex/actividad-vulnerable/avi/transactions.js +252 -0
  196. package/dist/resources/mex/actividad-vulnerable/index.d.ts +7 -0
  197. package/dist/resources/mex/actividad-vulnerable/index.d.ts.map +1 -0
  198. package/dist/resources/mex/actividad-vulnerable/index.js +9 -0
  199. package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts +119 -0
  200. package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts.map +1 -0
  201. package/dist/resources/mex/actividad-vulnerable/jys/clients.js +231 -0
  202. package/dist/resources/mex/actividad-vulnerable/jys/index.d.ts +7 -0
  203. package/dist/resources/mex/actividad-vulnerable/jys/index.d.ts.map +1 -0
  204. package/dist/resources/mex/actividad-vulnerable/jys/index.js +6 -0
  205. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts +132 -0
  206. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts.map +1 -0
  207. package/dist/resources/mex/actividad-vulnerable/jys/reports.js +381 -0
  208. package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts +93 -0
  209. package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts.map +1 -0
  210. package/dist/resources/mex/actividad-vulnerable/jys/transactions.js +253 -0
  211. package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts +119 -0
  212. package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts.map +1 -0
  213. package/dist/resources/mex/actividad-vulnerable/tsc/clients.js +231 -0
  214. package/dist/resources/mex/actividad-vulnerable/tsc/index.d.ts +7 -0
  215. package/dist/resources/mex/actividad-vulnerable/tsc/index.d.ts.map +1 -0
  216. package/dist/resources/mex/actividad-vulnerable/tsc/index.js +6 -0
  217. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts +132 -0
  218. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts.map +1 -0
  219. package/dist/resources/mex/actividad-vulnerable/tsc/reports.js +381 -0
  220. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts +90 -0
  221. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts.map +1 -0
  222. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.js +259 -0
  223. package/dist/resources/mex/addresses.d.ts +143 -0
  224. package/dist/resources/mex/addresses.d.ts.map +1 -0
  225. package/dist/resources/mex/addresses.js +328 -0
  226. package/dist/resources/mex/bank-accounts.d.ts +107 -0
  227. package/dist/resources/mex/bank-accounts.d.ts.map +1 -0
  228. package/dist/resources/mex/bank-accounts.js +163 -0
  229. package/dist/resources/mex/clients.d.ts +195 -0
  230. package/dist/resources/mex/clients.d.ts.map +1 -0
  231. package/dist/resources/mex/clients.js +454 -0
  232. package/dist/resources/mex/ebr.d.ts +213 -0
  233. package/dist/resources/mex/ebr.d.ts.map +1 -0
  234. package/dist/resources/mex/ebr.js +417 -0
  235. package/dist/resources/mex/index.d.ts +11 -0
  236. package/dist/resources/mex/index.d.ts.map +1 -0
  237. package/dist/resources/mex/index.js +12 -0
  238. package/dist/resources/mex/reports.d.ts +226 -0
  239. package/dist/resources/mex/reports.d.ts.map +1 -0
  240. package/dist/resources/mex/reports.js +440 -0
  241. package/dist/resources/mex/transactions.d.ts +125 -0
  242. package/dist/resources/mex/transactions.d.ts.map +1 -0
  243. package/dist/resources/mex/transactions.js +274 -0
  244. package/dist/resources/reports.d.ts +211 -0
  245. package/dist/resources/reports.d.ts.map +1 -0
  246. package/dist/resources/reports.js +308 -0
  247. package/dist/resources/transactions.d.ts +142 -0
  248. package/dist/resources/transactions.d.ts.map +1 -0
  249. package/dist/resources/transactions.js +221 -0
  250. package/dist/sdk/ComplianceSDK.d.ts +459 -0
  251. package/dist/sdk/ComplianceSDK.d.ts.map +1 -0
  252. package/dist/sdk/ComplianceSDK.js +528 -0
  253. package/dist/sdk/base.d.ts +17 -0
  254. package/dist/sdk/base.d.ts.map +1 -0
  255. package/dist/sdk/base.js +22 -0
  256. package/dist/sdk/index.d.ts +18 -0
  257. package/dist/sdk/index.d.ts.map +1 -0
  258. package/dist/sdk/index.js +43 -0
  259. package/dist/{ComplianceSDK-BgzIwSsY.d.cts → sdk/mex/ComplianceSDK.d.ts} +16 -7
  260. package/dist/sdk/mex/ComplianceSDK.d.ts.map +1 -0
  261. package/dist/{ComplianceSDK-DoIZOSJq.d.ts → sdk/mex/ComplianceSDK.js} +26 -11
  262. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts +44 -0
  263. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts.map +1 -0
  264. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.js +39 -0
  265. package/dist/sdk/mex/actividad-vulnerable/avi/index.d.ts +8 -0
  266. package/dist/sdk/mex/actividad-vulnerable/avi/index.d.ts.map +1 -0
  267. package/dist/sdk/mex/actividad-vulnerable/avi/index.js +9 -0
  268. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts +35 -0
  269. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts.map +1 -0
  270. package/dist/sdk/mex/actividad-vulnerable/avi/types.js +20 -0
  271. package/dist/sdk/mex/actividad-vulnerable/index.d.ts +13 -0
  272. package/dist/sdk/mex/actividad-vulnerable/index.d.ts.map +1 -0
  273. package/dist/sdk/mex/actividad-vulnerable/index.js +31 -0
  274. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts +44 -0
  275. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts.map +1 -0
  276. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.js +39 -0
  277. package/dist/sdk/mex/actividad-vulnerable/jys/index.d.ts +8 -0
  278. package/dist/sdk/mex/actividad-vulnerable/jys/index.d.ts.map +1 -0
  279. package/dist/sdk/mex/actividad-vulnerable/jys/index.js +9 -0
  280. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts +35 -0
  281. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts.map +1 -0
  282. package/dist/sdk/mex/actividad-vulnerable/jys/types.js +20 -0
  283. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts +44 -0
  284. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts.map +1 -0
  285. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.js +39 -0
  286. package/dist/sdk/mex/actividad-vulnerable/tsc/index.d.ts +8 -0
  287. package/dist/sdk/mex/actividad-vulnerable/tsc/index.d.ts.map +1 -0
  288. package/dist/sdk/mex/actividad-vulnerable/tsc/index.js +9 -0
  289. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts +35 -0
  290. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts.map +1 -0
  291. package/dist/sdk/mex/actividad-vulnerable/tsc/types.js +20 -0
  292. package/dist/sdk/mex/index.d.ts +13 -0
  293. package/dist/sdk/mex/index.d.ts.map +1 -0
  294. package/dist/sdk/mex/index.js +38 -0
  295. package/dist/sdk/mex/types.d.ts +57 -0
  296. package/dist/sdk/mex/types.d.ts.map +1 -0
  297. package/dist/sdk/mex/types.js +7 -0
  298. package/dist/sdk/resource-registry.d.ts +118 -0
  299. package/dist/sdk/resource-registry.d.ts.map +1 -0
  300. package/dist/sdk/resource-registry.js +145 -0
  301. package/dist/sdk/sdk-registry.d.ts +59 -0
  302. package/dist/sdk/sdk-registry.d.ts.map +1 -0
  303. package/dist/sdk/sdk-registry.js +82 -0
  304. package/dist/sdk/types.d.ts +232 -0
  305. package/dist/sdk/types.d.ts.map +1 -0
  306. package/dist/sdk/types.js +42 -0
  307. package/dist/utils/environment.d.ts +126 -0
  308. package/dist/utils/environment.d.ts.map +1 -0
  309. package/dist/utils/environment.js +148 -0
  310. package/dist/utils/filters.d.ts +338 -0
  311. package/dist/utils/filters.d.ts.map +1 -0
  312. package/dist/utils/filters.js +373 -0
  313. package/dist/utils/index.d.ts +15 -0
  314. package/dist/utils/index.d.ts.map +1 -0
  315. package/dist/utils/index.js +43 -0
  316. package/dist/utils/pagination.d.ts +85 -0
  317. package/dist/utils/pagination.d.ts.map +1 -0
  318. package/dist/utils/pagination.js +120 -0
  319. package/dist/utils/session.d.ts +173 -0
  320. package/dist/utils/session.d.ts.map +1 -0
  321. package/dist/utils/session.js +58 -0
  322. package/dist/utils/trpc-client.d.ts +19507 -0
  323. package/dist/utils/trpc-client.d.ts.map +1 -0
  324. package/dist/utils/trpc-client.js +129 -0
  325. package/dist/utils/upload.d.ts +81 -0
  326. package/dist/utils/upload.d.ts.map +1 -0
  327. package/dist/utils/upload.js +261 -0
  328. package/package.json +17 -27
  329. package/src/errors/api.ts +305 -0
  330. package/src/errors/base.ts +127 -0
  331. package/src/errors/index.ts +63 -0
  332. package/src/errors/upload.ts +204 -0
  333. package/src/errors/validation.ts +163 -0
  334. package/src/exports/base.ts +139 -0
  335. package/src/exports/index.ts +187 -0
  336. package/src/exports/mexico/actividad-vulnerable/avi.ts +207 -0
  337. package/src/exports/mexico/actividad-vulnerable/jys.ts +214 -0
  338. package/src/exports/mexico/actividad-vulnerable/tsc.ts +202 -0
  339. package/src/exports/mexico/index.ts +215 -0
  340. package/src/models/Address.ts +235 -0
  341. package/src/models/BankAccount.ts +235 -0
  342. package/src/models/Client.ts +363 -0
  343. package/src/models/ContactMethod.ts +197 -0
  344. package/src/models/Document.ts +355 -0
  345. package/src/models/LinkedClient.ts +84 -0
  346. package/src/models/Report.ts +193 -0
  347. package/src/models/ReportItem.ts +211 -0
  348. package/src/models/Transaction.ts +219 -0
  349. package/src/models/base.ts +56 -0
  350. package/src/models/index.ts +148 -0
  351. package/src/models/mex/MexAddress.ts +184 -0
  352. package/src/models/mex/MexBankAccount.ts +121 -0
  353. package/src/models/mex/MexClient.ts +177 -0
  354. package/src/models/mex/MexDocument.ts +890 -0
  355. package/src/models/mex/MexReport.ts +99 -0
  356. package/src/models/mex/MexReportItem.ts +79 -0
  357. package/src/models/mex/MexTransaction.ts +105 -0
  358. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableClient.ts +66 -0
  359. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReport.ts +73 -0
  360. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +74 -0
  361. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableTransaction.ts +50 -0
  362. package/src/models/mex/actividad-vulnerable/avi/MexAVIClient.ts +80 -0
  363. package/src/models/mex/actividad-vulnerable/avi/MexAVIReport.ts +114 -0
  364. package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +105 -0
  365. package/src/models/mex/actividad-vulnerable/avi/MexAVITransaction.ts +157 -0
  366. package/src/models/mex/actividad-vulnerable/index.ts +78 -0
  367. package/src/models/mex/actividad-vulnerable/jys/MexJYSClient.ts +73 -0
  368. package/src/models/mex/actividad-vulnerable/jys/MexJYSReport.ts +114 -0
  369. package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +105 -0
  370. package/src/models/mex/actividad-vulnerable/jys/MexJYSTransaction.ts +178 -0
  371. package/src/models/mex/actividad-vulnerable/tsc/MexTSCClient.ts +73 -0
  372. package/src/models/mex/actividad-vulnerable/tsc/MexTSCReport.ts +114 -0
  373. package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +105 -0
  374. package/src/models/mex/actividad-vulnerable/tsc/MexTSCTransaction.ts +104 -0
  375. package/src/models/mex/index.ts +57 -0
  376. package/src/models/types.ts +196 -0
  377. package/src/namespaces/index.ts +29 -0
  378. package/src/namespaces/mexico/actividad-vulnerable/avi/index.ts +62 -0
  379. package/src/namespaces/mexico/actividad-vulnerable/index.ts +79 -0
  380. package/src/namespaces/mexico/actividad-vulnerable/jys/index.ts +72 -0
  381. package/src/namespaces/mexico/actividad-vulnerable/tsc/index.ts +60 -0
  382. package/src/namespaces/mexico/index.ts +325 -0
  383. package/src/resources/addresses.ts +391 -0
  384. package/src/resources/bank-accounts.ts +417 -0
  385. package/src/resources/base.ts +327 -0
  386. package/src/resources/clients.ts +808 -0
  387. package/src/resources/contact-methods.ts +412 -0
  388. package/src/resources/documents.ts +688 -0
  389. package/src/resources/index.ts +40 -0
  390. package/src/resources/mex/actividad-vulnerable/avi/clients.ts +559 -0
  391. package/src/resources/mex/actividad-vulnerable/avi/index.ts +7 -0
  392. package/src/resources/mex/actividad-vulnerable/avi/reports.ts +609 -0
  393. package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +404 -0
  394. package/src/resources/mex/actividad-vulnerable/index.ts +12 -0
  395. package/src/resources/mex/actividad-vulnerable/jys/clients.ts +445 -0
  396. package/src/resources/mex/actividad-vulnerable/jys/index.ts +7 -0
  397. package/src/resources/mex/actividad-vulnerable/jys/reports.ts +591 -0
  398. package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +395 -0
  399. package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +445 -0
  400. package/src/resources/mex/actividad-vulnerable/tsc/index.ts +7 -0
  401. package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +591 -0
  402. package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +404 -0
  403. package/src/resources/mex/addresses.ts +493 -0
  404. package/src/resources/mex/bank-accounts.ts +283 -0
  405. package/src/resources/mex/clients.ts +758 -0
  406. package/src/resources/mex/ebr.ts +621 -0
  407. package/src/resources/mex/index.ts +23 -0
  408. package/src/resources/mex/reports.ts +643 -0
  409. package/src/resources/mex/transactions.ts +422 -0
  410. package/src/resources/reports.ts +515 -0
  411. package/src/resources/transactions.ts +358 -0
  412. package/src/sdk/ComplianceSDK.ts +812 -0
  413. package/src/sdk/base.ts +43 -0
  414. package/src/sdk/index.ts +98 -0
  415. package/src/sdk/mex/ComplianceSDK.ts +147 -0
  416. package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +55 -0
  417. package/src/sdk/mex/actividad-vulnerable/avi/index.ts +16 -0
  418. package/src/sdk/mex/actividad-vulnerable/avi/types.ts +86 -0
  419. package/src/sdk/mex/actividad-vulnerable/index.ts +58 -0
  420. package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +54 -0
  421. package/src/sdk/mex/actividad-vulnerable/jys/index.ts +16 -0
  422. package/src/sdk/mex/actividad-vulnerable/jys/types.ts +86 -0
  423. package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +54 -0
  424. package/src/sdk/mex/actividad-vulnerable/tsc/index.ts +16 -0
  425. package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +86 -0
  426. package/src/sdk/mex/index.ts +66 -0
  427. package/src/sdk/mex/types.ts +88 -0
  428. package/src/sdk/resource-registry.ts +204 -0
  429. package/src/sdk/sdk-registry.ts +99 -0
  430. package/src/sdk/types.ts +304 -0
  431. package/src/utils/environment.ts +187 -0
  432. package/src/utils/filters.ts +412 -0
  433. package/src/utils/index.ts +134 -0
  434. package/src/utils/pagination.ts +143 -0
  435. package/src/utils/session.ts +303 -0
  436. package/src/utils/trpc-client.ts +242 -0
  437. package/src/utils/upload.ts +388 -0
  438. package/dist/chunk-2CIR32CT.cjs +0 -22972
  439. package/dist/chunk-2CIR32CT.cjs.map +0 -1
  440. package/dist/chunk-5FXVLHD3.js +0 -23
  441. package/dist/chunk-5FXVLHD3.js.map +0 -1
  442. package/dist/chunk-62M35I6I.js +0 -249
  443. package/dist/chunk-62M35I6I.js.map +0 -1
  444. package/dist/chunk-ARI5WM5X.js +0 -22819
  445. package/dist/chunk-ARI5WM5X.js.map +0 -1
  446. package/dist/chunk-B75YW6BN.cjs +0 -26
  447. package/dist/chunk-B75YW6BN.cjs.map +0 -1
  448. package/dist/chunk-F6THYYF5.cjs +0 -26
  449. package/dist/chunk-F6THYYF5.cjs.map +0 -1
  450. package/dist/chunk-HAEBRF5N.js +0 -23
  451. package/dist/chunk-HAEBRF5N.js.map +0 -1
  452. package/dist/chunk-HEGTPUIS.cjs +0 -26
  453. package/dist/chunk-HEGTPUIS.cjs.map +0 -1
  454. package/dist/chunk-TYXYZ3WV.js +0 -23
  455. package/dist/chunk-TYXYZ3WV.js.map +0 -1
  456. package/dist/chunk-ZFW24DFL.cjs +0 -261
  457. package/dist/chunk-ZFW24DFL.cjs.map +0 -1
  458. package/dist/filters-UX1_wF2Z.d.cts +0 -6460
  459. package/dist/filters-UX1_wF2Z.d.ts +0 -6460
  460. package/dist/index-6dNlw8uP.d.cts +0 -2866
  461. package/dist/index-CUIwWk-y.d.ts +0 -2866
  462. package/dist/index.cjs +0 -417
  463. package/dist/index.cjs.map +0 -1
  464. package/dist/index.d.cts +0 -9
  465. package/dist/index.d.ts +0 -9
  466. package/dist/index.js +0 -28
  467. package/dist/index.js.map +0 -1
  468. package/dist/mexico/actividad-vulnerable/avi.cjs +0 -320
  469. package/dist/mexico/actividad-vulnerable/avi.cjs.map +0 -1
  470. package/dist/mexico/actividad-vulnerable/avi.d.cts +0 -680
  471. package/dist/mexico/actividad-vulnerable/avi.js +0 -55
  472. package/dist/mexico/actividad-vulnerable/avi.js.map +0 -1
  473. package/dist/mexico/actividad-vulnerable/jys.cjs +0 -330
  474. package/dist/mexico/actividad-vulnerable/jys.cjs.map +0 -1
  475. package/dist/mexico/actividad-vulnerable/jys.d.cts +0 -746
  476. package/dist/mexico/actividad-vulnerable/jys.js +0 -65
  477. package/dist/mexico/actividad-vulnerable/jys.js.map +0 -1
  478. package/dist/mexico/actividad-vulnerable/tsc.cjs +0 -318
  479. package/dist/mexico/actividad-vulnerable/tsc.cjs.map +0 -1
  480. package/dist/mexico/actividad-vulnerable/tsc.d.cts +0 -600
  481. package/dist/mexico/actividad-vulnerable/tsc.js +0 -53
  482. package/dist/mexico/actividad-vulnerable/tsc.js.map +0 -1
  483. package/dist/mexico/index.cjs +0 -384
  484. package/dist/mexico/index.cjs.map +0 -1
  485. package/dist/mexico/index.d.cts +0 -1422
  486. package/dist/mexico/index.d.ts +0 -1422
  487. package/dist/mexico/index.js +0 -7
  488. package/dist/mexico/index.js.map +0 -1
@@ -0,0 +1,528 @@
1
+ /**
2
+ * ComplianceSDK - Main SDK entry point
3
+ *
4
+ * This class provides access to all compliance API resources.
5
+ * It initializes the tRPC client and all resource managers.
6
+ *
7
+ * The SDK can be scoped to a specific jurisdiction and/or actividadVulnerable,
8
+ * which automatically applies to all resource operations.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Unscoped SDK - works with any jurisdiction
13
+ * const sdk = new ComplianceSDK({
14
+ * apiKey: process.env.COMPLIANCE_API_KEY!,
15
+ * environment: "test",
16
+ * });
17
+ *
18
+ * // Mexico-scoped SDK
19
+ * const mexSDK = new ComplianceSDK({
20
+ * apiKey: process.env.COMPLIANCE_API_KEY!,
21
+ * environment: "test",
22
+ * jurisdiction: "MX",
23
+ * });
24
+ *
25
+ * // Mexico AVI-scoped SDK
26
+ * const aviSDK = new ComplianceSDK({
27
+ * apiKey: process.env.COMPLIANCE_API_KEY!,
28
+ * environment: "test",
29
+ * jurisdiction: "MX",
30
+ * actividadVulnerable: CodigoActividad.AVI,
31
+ * });
32
+ *
33
+ * // When scoped, resources automatically use the jurisdiction/actividadVulnerable
34
+ * const client = await aviSDK.clients.create({
35
+ * type: ClientType.Person,
36
+ * name: "Juan García",
37
+ * // primaryJurisdiction defaults to "MX"
38
+ * // jurisdictions.MX.actividadVulnerable.AVI is auto-initialized
39
+ * });
40
+ * ```
41
+ */
42
+ import { Jurisdiction } from "@artu-ai/shared";
43
+ import { createAPIClient, LATEST_API_VERSION, DEFAULT_TIMEOUT, } from "../utils/trpc-client";
44
+ import { resolveEnvironment, resolveBaseUrl, resolveOrganizationId, } from "../utils/environment";
45
+ import { isMexicoScope, buildScope, } from "./types";
46
+ import { getResourceFactories } from "./resource-registry";
47
+ import { getSDKClass } from "./sdk-registry";
48
+ import { fetchSession, } from "../utils/session";
49
+ // Resources
50
+ import { BankAccountsResource, AddressesResource, ContactMethodsResource, DocumentsResource, } from "../resources";
51
+ // ===========================
52
+ // ComplianceSDK Class
53
+ // ===========================
54
+ /**
55
+ * Main entry point for the Compliance SDK.
56
+ *
57
+ * Provides access to all API resources:
58
+ * - `clients` - Client management (individuals, companies, trusts)
59
+ * - `transactions` - Transaction management
60
+ * - `addresses` - Address management
61
+ * - `contactMethods` - Contact method management
62
+ * - `bankAccounts` - Bank account management
63
+ * - `documents` - Document upload and management
64
+ * - `reports` - Regulatory report generation and submission
65
+ *
66
+ * ## Scoping
67
+ *
68
+ * The SDK can be scoped to a specific jurisdiction and/or actividadVulnerable:
69
+ *
70
+ * ```typescript
71
+ * // Unscoped - generic SDK
72
+ * const sdk = new ComplianceSDK({ apiKey, environment: "test" });
73
+ *
74
+ * // Scoped to Mexico
75
+ * const mexSDK = new ComplianceSDK({
76
+ * apiKey,
77
+ * environment: "test",
78
+ * jurisdiction: Jurisdiction.Mexico,
79
+ * });
80
+ *
81
+ * // Scoped to Mexico AVI actividadVulnerable
82
+ * const aviSDK = new ComplianceSDK({
83
+ * apiKey,
84
+ * environment: "test",
85
+ * jurisdiction: Jurisdiction.Mexico,
86
+ * actividadVulnerable: CodigoActividad.AVI,
87
+ * });
88
+ * ```
89
+ *
90
+ * When scoped:
91
+ * - Create operations default to the specified jurisdiction/actividadVulnerable
92
+ * - List operations filter by the specified jurisdiction/actividadVulnerable
93
+ * - Models returned are the appropriate type for the scope
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * import { ComplianceSDK, ClientType, Jurisdiction, CodigoActividad } from "@artu/compliance-sdk";
98
+ *
99
+ * const sdk = new ComplianceSDK({
100
+ * apiKey: process.env.COMPLIANCE_API_KEY!,
101
+ * environment: "test",
102
+ * jurisdiction: Jurisdiction.Mexico,
103
+ * actividadVulnerable: CodigoActividad.AVI,
104
+ * });
105
+ *
106
+ * // Check scope
107
+ * console.log(sdk.jurisdiction); // "MX"
108
+ * console.log(sdk.actividadVulnerable); // "AVI"
109
+ * console.log(sdk.isMexico); // true
110
+ *
111
+ * // Create a client - jurisdiction/actividadVulnerable are auto-applied
112
+ * const client = await sdk.clients.create({
113
+ * type: ClientType.Person,
114
+ * name: "Juan García",
115
+ * });
116
+ * ```
117
+ */
118
+ export class ComplianceSDKImpl {
119
+ // ===========================
120
+ // Protected Properties (accessible by subclasses)
121
+ // ===========================
122
+ /** tRPC client for API communication */
123
+ trpc;
124
+ /** Current environment */
125
+ _environment;
126
+ /** Current API version */
127
+ _apiVersion;
128
+ /** SDK scope (jurisdiction and actividadVulnerable) */
129
+ _scope;
130
+ /** Resolved base URL */
131
+ _baseUrl;
132
+ /** Auth mode */
133
+ _authMode;
134
+ /** Credentials policy (cookie mode) */
135
+ _credentials;
136
+ /** Custom headers (cookie mode, for server-side cookie forwarding) */
137
+ _headers;
138
+ /** Organization ID for session login (cookie mode) */
139
+ _organizationId;
140
+ // ===========================
141
+ // Resource Managers
142
+ // ===========================
143
+ /**
144
+ * Clients resource manager.
145
+ *
146
+ * Provides CRUD operations for clients (individuals, companies, trusts).
147
+ * When SDK is scoped, creates and lists are automatically scoped.
148
+ *
149
+ * @example
150
+ * ```typescript
151
+ * // Create a client (uses SDK scope for jurisdiction/activity)
152
+ * const client = await sdk.clients.create({
153
+ * type: ClientType.Person,
154
+ * name: "Juan García",
155
+ * });
156
+ *
157
+ * // List clients (filtered by SDK scope)
158
+ * const clients = await sdk.clients.list();
159
+ *
160
+ * // Iterate through all clients in scope
161
+ * for await (const client of sdk.clients.iterate()) {
162
+ * console.log(client.name);
163
+ * }
164
+ * ```
165
+ */
166
+ clients;
167
+ /**
168
+ * Transactions resource manager.
169
+ *
170
+ * Provides CRUD operations for transactions and client linking.
171
+ * When SDK is scoped, creates and lists are automatically scoped.
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * // Create a transaction (uses SDK scope)
176
+ * const txn = await sdk.transactions.create({
177
+ * amount: 50000,
178
+ * currency: Currency.MXN,
179
+ * });
180
+ *
181
+ * // Link a client to transaction
182
+ * await sdk.transactions.linkClient(txn.id, clientId, "originator");
183
+ * ```
184
+ */
185
+ transactions;
186
+ /**
187
+ * Addresses resource manager.
188
+ *
189
+ * Provides CRUD operations for client addresses.
190
+ *
191
+ * @example
192
+ * ```typescript
193
+ * const address = await sdk.addresses.create({
194
+ * clientId,
195
+ * type: AddressType.Home,
196
+ * street: "Av. Reforma 222",
197
+ * city: "México",
198
+ * country: Country.Mexico,
199
+ * });
200
+ * ```
201
+ */
202
+ addresses;
203
+ /**
204
+ * Contact methods resource manager.
205
+ *
206
+ * Provides CRUD operations for client contact methods (email, phone).
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * const contact = await sdk.contactMethods.create({
211
+ * clientId,
212
+ * type: ContactMethodType.Email,
213
+ * value: "juan@example.com",
214
+ * });
215
+ * ```
216
+ */
217
+ contactMethods;
218
+ /**
219
+ * Bank accounts resource manager.
220
+ *
221
+ * Provides CRUD operations for client bank accounts.
222
+ *
223
+ * @example
224
+ * ```typescript
225
+ * const account = await sdk.bankAccounts.create({
226
+ * clientId,
227
+ * type: BankAccountType.Checking,
228
+ * bankName: "BBVA",
229
+ * });
230
+ * ```
231
+ */
232
+ bankAccounts;
233
+ /**
234
+ * Documents resource manager.
235
+ *
236
+ * Provides upload, download, and management for client documents.
237
+ *
238
+ * @example
239
+ * ```typescript
240
+ * const doc = await sdk.documents.upload({
241
+ * clientId,
242
+ * category: DocumentCategory.Identification,
243
+ * type: MexDocumentType.INE,
244
+ * file: buffer,
245
+ * filename: "ine.pdf",
246
+ * });
247
+ * ```
248
+ */
249
+ documents;
250
+ /**
251
+ * Reports resource manager.
252
+ *
253
+ * Provides CRUD operations for regulatory reports.
254
+ * When SDK is scoped, creates and lists are automatically scoped.
255
+ *
256
+ * @example
257
+ * ```typescript
258
+ * // Create a report (uses SDK scope for jurisdiction/activity)
259
+ * const report = await sdk.reports.create({
260
+ * // mesReportado is required for AVI scope
261
+ * jurisdictions: {
262
+ * MX: {
263
+ * actividadVulnerable: {
264
+ * AVI: { mesReportado: "202403" },
265
+ * },
266
+ * },
267
+ * },
268
+ * });
269
+ *
270
+ * // Validate and generate
271
+ * const validation = await sdk.reports.validateReport(report.id);
272
+ * if (validation.valid) {
273
+ * const result = await sdk.reports.generate(report.id);
274
+ * }
275
+ * ```
276
+ */
277
+ reports;
278
+ // ===========================
279
+ // Constructor
280
+ // ===========================
281
+ constructor(options) {
282
+ const { environment, baseUrl, organizationId, apiVersion = LATEST_API_VERSION, timeout = DEFAULT_TIMEOUT, jurisdiction, mode, ...authOptions } = options;
283
+ // Extract actividadVulnerable only for Mexico options
284
+ const actividadVulnerable = "actividadVulnerable" in options
285
+ ? options.actividadVulnerable
286
+ : undefined;
287
+ // Build scope early for SDK class dispatch
288
+ const scope = buildScope(jurisdiction, actividadVulnerable);
289
+ // === SDK Class Dispatch ===
290
+ // If we're directly constructing ComplianceSDKImpl (not via super() from subclass),
291
+ // check if a jurisdiction-specific SDK class is registered and return that instead.
292
+ if (new.target === ComplianceSDKImpl) {
293
+ const SDKClass = getSDKClass(scope);
294
+ if (SDKClass) {
295
+ // Return instance of jurisdiction-specific SDK
296
+ return new SDKClass(options);
297
+ }
298
+ }
299
+ // === Normal base SDK initialization ===
300
+ const authMode = mode ?? "apiKey";
301
+ const resolvedApiKey = authMode === "apiKey"
302
+ ? "apiKey" in authOptions
303
+ ? authOptions.apiKey
304
+ : process.env.ARTU_API_KEY
305
+ : undefined;
306
+ const resolvedCredentials = authMode === "cookie"
307
+ ? "credentials" in authOptions
308
+ ? authOptions.credentials
309
+ : "include"
310
+ : undefined;
311
+ const resolvedHeaders = authMode === "cookie" && "headers" in authOptions
312
+ ? authOptions.headers
313
+ : undefined;
314
+ // Validate API key when using apiKey auth mode
315
+ if (authMode === "apiKey") {
316
+ if (!resolvedApiKey || typeof resolvedApiKey !== "string") {
317
+ throw new Error("API key is required. Provide it via auth.apiKey, options.apiKey, or set the ARTU_API_KEY environment variable.");
318
+ }
319
+ }
320
+ // Resolve environment (from options or env var, defaults to "test")
321
+ const resolvedEnv = resolveEnvironment(environment);
322
+ this._environment = resolvedEnv;
323
+ this._apiVersion = apiVersion;
324
+ // Resolve organization ID (from options or env var)
325
+ this._organizationId = organizationId ?? resolveOrganizationId();
326
+ // Validate actividadVulnerable requires Mexico jurisdiction
327
+ if (actividadVulnerable && jurisdiction !== Jurisdiction.Mexico) {
328
+ throw new Error(`actividadVulnerable can only be specified when jurisdiction is Mexico. ` +
329
+ `Got jurisdiction: ${jurisdiction}`);
330
+ }
331
+ // Resolve base URL
332
+ const resolvedBaseUrl = resolveBaseUrl({
333
+ environment: resolvedEnv,
334
+ baseUrl,
335
+ });
336
+ // Store scope and base config
337
+ this._scope = scope;
338
+ this._baseUrl = resolvedBaseUrl;
339
+ this._authMode = authMode;
340
+ this._credentials = resolvedCredentials;
341
+ this._headers = resolvedHeaders;
342
+ // Create tRPC client
343
+ const trpcConfig = authMode === "apiKey"
344
+ ? {
345
+ mode: authMode,
346
+ apiKey: resolvedApiKey,
347
+ baseUrl: resolvedBaseUrl,
348
+ environment: resolvedEnv,
349
+ apiVersion,
350
+ timeout,
351
+ organizationId: this._organizationId,
352
+ }
353
+ : {
354
+ mode: authMode,
355
+ credentials: resolvedCredentials,
356
+ headers: resolvedHeaders,
357
+ baseUrl: resolvedBaseUrl,
358
+ environment: resolvedEnv,
359
+ apiVersion,
360
+ timeout,
361
+ organizationId: this._organizationId,
362
+ };
363
+ this.trpc = createAPIClient(trpcConfig);
364
+ // Initialize resource managers using registry
365
+ const resourceConfig = {
366
+ trpc: this.trpc,
367
+ scope: this._scope,
368
+ environment: resolvedEnv,
369
+ };
370
+ const factories = getResourceFactories(this._scope);
371
+ // Create scoped resources from registry
372
+ this.clients = factories.clients(resourceConfig);
373
+ this.transactions = factories.transactions(resourceConfig);
374
+ this.reports = factories.reports(resourceConfig);
375
+ // Bank accounts and addresses can be scoped or use base
376
+ this.bankAccounts = factories.bankAccounts
377
+ ? factories.bankAccounts(resourceConfig)
378
+ : new BankAccountsResource(resourceConfig);
379
+ this.addresses = factories.addresses
380
+ ? factories.addresses(resourceConfig)
381
+ : new AddressesResource(resourceConfig);
382
+ // Supporting resources (not scoped by jurisdiction)
383
+ this.contactMethods = new ContactMethodsResource(resourceConfig);
384
+ this.documents = new DocumentsResource(resourceConfig);
385
+ }
386
+ // ===========================
387
+ // Public Getters - Environment
388
+ // ===========================
389
+ /**
390
+ * Current environment ("test" or "live").
391
+ *
392
+ * @example
393
+ * ```typescript
394
+ * console.log(`Running in ${sdk.environment} mode`);
395
+ * ```
396
+ */
397
+ get environment() {
398
+ return this._environment;
399
+ }
400
+ /**
401
+ * Current API version.
402
+ *
403
+ * @example
404
+ * ```typescript
405
+ * console.log(`Using API version ${sdk.apiVersion}`);
406
+ * ```
407
+ */
408
+ get apiVersion() {
409
+ return this._apiVersion;
410
+ }
411
+ /**
412
+ * Whether SDK is running in test environment.
413
+ *
414
+ * @example
415
+ * ```typescript
416
+ * if (sdk.isTest) {
417
+ * console.log("Running in test mode - no real data affected");
418
+ * }
419
+ * ```
420
+ */
421
+ get isTest() {
422
+ return this._environment === "test";
423
+ }
424
+ /**
425
+ * Whether SDK is running in live environment.
426
+ *
427
+ * @example
428
+ * ```typescript
429
+ * if (sdk.isLive) {
430
+ * console.log("CAUTION: Live environment - real data will be affected");
431
+ * }
432
+ * ```
433
+ */
434
+ get isLive() {
435
+ return this._environment === "live";
436
+ }
437
+ // ===========================
438
+ // Public Getters - Scope
439
+ // ===========================
440
+ /**
441
+ * Current jurisdiction scope, or undefined if unscoped.
442
+ *
443
+ * @example
444
+ * ```typescript
445
+ * if (sdk.jurisdiction === Jurisdiction.Mexico) {
446
+ * console.log("SDK is scoped to Mexico");
447
+ * }
448
+ * ```
449
+ */
450
+ get jurisdiction() {
451
+ return this._scope.jurisdiction;
452
+ }
453
+ /**
454
+ * Current actividadVulnerable scope, or undefined if unscoped.
455
+ * Only available when jurisdiction is Mexico.
456
+ *
457
+ * @example
458
+ * ```typescript
459
+ * if (sdk.actividadVulnerable === CodigoActividad.AVI) {
460
+ * console.log("SDK is scoped to Activos Virtuales");
461
+ * }
462
+ * ```
463
+ */
464
+ get actividadVulnerable() {
465
+ return isMexicoScope(this._scope)
466
+ ? this._scope.actividadVulnerable
467
+ : undefined;
468
+ }
469
+ /**
470
+ * The complete scope configuration.
471
+ *
472
+ * @example
473
+ * ```typescript
474
+ * console.log(sdk.scope); // { jurisdiction: "MX", actividadVulnerable: "AVI" }
475
+ * ```
476
+ */
477
+ get scope() {
478
+ return { ...this._scope };
479
+ }
480
+ /**
481
+ * Whether SDK is scoped to any jurisdiction.
482
+ */
483
+ get isScoped() {
484
+ return this._scope.jurisdiction !== undefined;
485
+ }
486
+ /**
487
+ * Whether SDK is scoped to Mexico jurisdiction.
488
+ */
489
+ get isMexico() {
490
+ return this._scope.jurisdiction === Jurisdiction.Mexico;
491
+ }
492
+ /**
493
+ * Whether SDK is scoped to United States jurisdiction.
494
+ */
495
+ get isUnitedStates() {
496
+ return this._scope.jurisdiction === Jurisdiction.UnitedStates;
497
+ }
498
+ /**
499
+ * Whether SDK is scoped to an Actividad Vulnerable activity.
500
+ */
501
+ get isActividadVulnerable() {
502
+ return (isMexicoScope(this._scope) &&
503
+ this._scope.actividadVulnerable !== undefined);
504
+ }
505
+ async session(options) {
506
+ if (this._authMode !== "cookie") {
507
+ throw new Error("session() is only available when using cookie auth mode.");
508
+ }
509
+ const baseOptions = {
510
+ baseUrl: this._baseUrl,
511
+ environment: this._environment,
512
+ credentials: this._credentials ?? "include",
513
+ headers: this._headers,
514
+ // Use provided organizationId or fall back to SDK-level config
515
+ organizationId: options?.organizationId ?? this._organizationId,
516
+ };
517
+ if (options?.returnTo) {
518
+ return fetchSession({
519
+ ...baseOptions,
520
+ returnTo: options.returnTo,
521
+ });
522
+ }
523
+ return fetchSession(baseOptions);
524
+ }
525
+ }
526
+ // Cast the class to use the overloaded constructor interface
527
+ // This enables proper type inference when using `new ComplianceSDK(options)`
528
+ export const ComplianceSDK = ComplianceSDKImpl;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Base SDK Types & Registration
3
+ *
4
+ * Unscoped/default SDK types and resource factory registration.
5
+ */
6
+ import type { ComplianceSDKOptionsBase } from "./types";
7
+ /**
8
+ * Options for creating an unscoped SDK
9
+ */
10
+ export type UnscopedSDKOptions = ComplianceSDKOptionsBase & {
11
+ jurisdiction?: undefined;
12
+ };
13
+ /**
14
+ * Registers the base (unscoped) resource factories
15
+ */
16
+ export declare function registerBaseScope(): void;
17
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/sdk/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAcxD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC;AAMF;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAQxC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Base SDK Types & Registration
3
+ *
4
+ * Unscoped/default SDK types and resource factory registration.
5
+ */
6
+ import { ClientsResource, TransactionsResource, ReportsResource, BankAccountsResource, AddressesResource, } from "../resources";
7
+ import { registerScope } from "./resource-registry";
8
+ // ===========================
9
+ // Registration
10
+ // ===========================
11
+ /**
12
+ * Registers the base (unscoped) resource factories
13
+ */
14
+ export function registerBaseScope() {
15
+ registerScope("base", {
16
+ clients: (config) => new ClientsResource(config),
17
+ transactions: (config) => new TransactionsResource(config),
18
+ reports: (config) => new ReportsResource(config),
19
+ bankAccounts: (config) => new BankAccountsResource(config),
20
+ addresses: (config) => new AddressesResource(config),
21
+ });
22
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * SDK Core Module
3
+ *
4
+ * Core SDK infrastructure including types, registry, and scope registrations.
5
+ * Organized by jurisdiction with barrel exports.
6
+ */
7
+ export { type Environment, type ComplianceSDKOptionsBase, type ComplianceAuthOptions, type ComplianceAuthMode, type FetchCredentials, type ComplianceAPIKeyAuth, type ComplianceCookieAuth, type SDKScope, type SDKScopeBase, type SDKScopeMexico, isMexicoScope, buildScope, } from "./types";
8
+ export type { SessionInfo } from "../utils/session";
9
+ export { type ResourceFactory, type ScopeResourceFactories, registerScope, getResourceFactories, getScopeKey, hasScope, getRegisteredScopes, clearRegistry, } from "./resource-registry";
10
+ export { type UnscopedSDKOptions, registerBaseScope } from "./base";
11
+ export { type ComplianceSDKOptionsMexico, type MexicoSDKOptions, type MexicoComplianceSDK, type AVISDKOptions, type AVIComplianceSDK, type JYSSDKOptions, type JYSComplianceSDK, type TSCSDKOptions, type TSCComplianceSDK, registerMexicoScopes, } from "./mex";
12
+ /**
13
+ * Registers all SDK scopes.
14
+ * Called automatically when the SDK module is imported.
15
+ */
16
+ export declare function initializeRegistry(): void;
17
+ export { ComplianceSDK, ComplianceSDKImpl, type ComplianceSDKOptions, type ComplianceSDKConstructor, type UnscopedComplianceSDK, } from "./ComplianceSDK";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,aAAa,EACb,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpD,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,mBAAmB,EACnB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAMpE,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,oBAAoB,GACrB,MAAM,OAAO,CAAC;AASf;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC;AASD,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * SDK Core Module
3
+ *
4
+ * Core SDK infrastructure including types, registry, and scope registrations.
5
+ * Organized by jurisdiction with barrel exports.
6
+ */
7
+ // ===========================
8
+ // Core Types
9
+ // ===========================
10
+ export { isMexicoScope, buildScope, } from "./types";
11
+ // ===========================
12
+ // Registry
13
+ // ===========================
14
+ export { registerScope, getResourceFactories, getScopeKey, hasScope, getRegisteredScopes, clearRegistry, } from "./resource-registry";
15
+ // ===========================
16
+ // Base (Unscoped)
17
+ // ===========================
18
+ export { registerBaseScope } from "./base";
19
+ // ===========================
20
+ // Mexico
21
+ // ===========================
22
+ export {
23
+ // Registration
24
+ registerMexicoScopes, } from "./mex";
25
+ // ===========================
26
+ // Initialize All Scopes
27
+ // ===========================
28
+ import { registerBaseScope } from "./base";
29
+ import { registerMexicoScopes } from "./mex";
30
+ /**
31
+ * Registers all SDK scopes.
32
+ * Called automatically when the SDK module is imported.
33
+ */
34
+ export function initializeRegistry() {
35
+ registerBaseScope();
36
+ registerMexicoScopes();
37
+ }
38
+ // Auto-initialize on import
39
+ initializeRegistry();
40
+ // ===========================
41
+ // ComplianceSDK
42
+ // ===========================
43
+ export { ComplianceSDK, ComplianceSDKImpl, } from "./ComplianceSDK";
@@ -1,11 +1,16 @@
1
- import { C as ComplianceSDKImpl, E as EBRResource, a as ComplianceSDKOptionsMexico, M as MexicoScopedSDKOptions } from './filters-UX1_wF2Z.cjs';
2
-
3
1
  /**
4
2
  * Mexico-scoped ComplianceSDK
5
3
  *
6
4
  * Provides Mexico-specific resources like EBR (Expediente de Beneficiario Real).
7
5
  */
8
-
6
+ import { ComplianceSDKImpl } from "../ComplianceSDK";
7
+ import type { MexicoScopedSDKOptions, ComplianceSDKOptionsMexico } from "./types";
8
+ import { EBRResource } from "../../resources/mex/ebr";
9
+ import type { MexClientsResource } from "../../resources/mex/clients";
10
+ import type { MexTransactionsResource } from "../../resources/mex/transactions";
11
+ import type { MexReportsResource } from "../../resources/mex/reports";
12
+ import type { MexBankAccountsResource } from "../../resources/mex/bank-accounts";
13
+ import type { MexAddressesResource } from "../../resources/mex/addresses";
9
14
  /**
10
15
  * Mexico ComplianceSDK Implementation.
11
16
  *
@@ -26,7 +31,12 @@ import { C as ComplianceSDKImpl, E as EBRResource, a as ComplianceSDKOptionsMexi
26
31
  * console.log(sdk.ebr); // EbrResource instance
27
32
  * ```
28
33
  */
29
- declare class MexicoComplianceSDKImpl extends ComplianceSDKImpl {
34
+ export declare class MexicoComplianceSDKImpl extends ComplianceSDKImpl {
35
+ readonly clients: MexClientsResource;
36
+ readonly transactions: MexTransactionsResource;
37
+ readonly reports: MexReportsResource;
38
+ readonly bankAccounts: MexBankAccountsResource;
39
+ readonly addresses: MexAddressesResource;
30
40
  /**
31
41
  * EBR (Expediente de Beneficiario Real) resource.
32
42
  *
@@ -61,7 +71,7 @@ declare class MexicoComplianceSDKImpl extends ComplianceSDKImpl {
61
71
  * const weights = sdk.ebr.presets.suggested();
62
72
  * ```
63
73
  */
64
- declare class MexicoComplianceSDKScoped extends MexicoComplianceSDKImpl {
74
+ export declare class MexicoComplianceSDKScoped extends MexicoComplianceSDKImpl {
65
75
  /**
66
76
  * EBR (Evaluación Basada en Riesgos) resource manager.
67
77
  *
@@ -93,5 +103,4 @@ declare class MexicoComplianceSDKScoped extends MexicoComplianceSDKImpl {
93
103
  readonly ebr: EBRResource;
94
104
  constructor(options: MexicoScopedSDKOptions);
95
105
  }
96
-
97
- export { MexicoComplianceSDKScoped as M };
106
+ //# sourceMappingURL=ComplianceSDK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComplianceSDK.d.ts","sourceRoot":"","sources":["../../../src/sdk/mex/ComplianceSDK.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,uBAAwB,SAAQ,iBAAiB;IAS5D,SAAwB,OAAO,EAAE,kBAAkB,CAAC;IAEpD,SAAwB,YAAY,EAAE,uBAAuB,CAAC;IAE9D,SAAwB,OAAO,EAAE,kBAAkB,CAAC;IAEpD,SAAwB,YAAY,EAAE,uBAAuB,CAAC;IAE9D,SAAwB,SAAS,EAAE,oBAAoB,CAAC;IAExD;;;;OAIG;IACH,SAAgB,GAAG,EAAE,WAAW,CAAC;gBAErB,OAAO,EAAE,0BAA0B;CAUhD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,yBAA0B,SAAQ,uBAAuB;IAGpE;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,SAAgB,GAAG,EAAE,WAAW,CAAC;gBAErB,OAAO,EAAE,sBAAsB;CAW5C"}