@artu-ai/compliance-sdk 0.13.4 → 0.17.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.
- package/LICENSE +21 -0
- package/README.md +130 -258
- package/dist/errors/api.d.ts +16 -1
- package/dist/errors/api.js +22 -0
- package/dist/errors/base.d.ts +8 -1
- package/dist/errors/base.js +12 -0
- package/dist/errors/index.d.ts +4 -3
- package/dist/errors/index.js +5 -2
- package/dist/errors/migration.d.ts +30 -0
- package/dist/errors/migration.js +33 -0
- package/dist/errors/upload.d.ts +13 -2
- package/dist/errors/upload.js +11 -0
- package/dist/errors/validation.d.ts +0 -1
- package/dist/exports/base.d.ts +3 -4
- package/dist/exports/base.js +3 -2
- package/dist/exports/identity.d.ts +6 -0
- package/dist/exports/identity.js +5 -0
- package/dist/exports/index.d.ts +7 -10
- package/dist/exports/index.js +6 -7
- package/dist/exports/mx/av/ari.d.ts +60 -504
- package/dist/exports/mx/av/ari.js +1 -1
- package/dist/exports/mx/av/avi.d.ts +56 -520
- package/dist/exports/mx/av/avi.js +1 -1
- package/dist/exports/mx/av/inm.d.ts +1099 -0
- package/dist/exports/mx/av/inm.js +118 -0
- package/dist/exports/mx/av/jys.d.ts +76 -551
- package/dist/exports/mx/av/jys.js +1 -1
- package/dist/exports/mx/av/mjr.d.ts +64 -507
- package/dist/exports/mx/av/mjr.js +1 -1
- package/dist/exports/mx/av/mpc.d.ts +1057 -0
- package/dist/exports/mx/av/mpc.js +114 -0
- package/dist/exports/mx/av/tsc.d.ts +52 -447
- package/dist/exports/mx/av/tsc.js +1 -1
- package/dist/exports/mx/av/veh.d.ts +1030 -0
- package/dist/exports/mx/av/veh.js +115 -0
- package/dist/exports/mx/av.d.ts +39 -410
- package/dist/exports/mx/cnbv/transmisor.d.ts +27 -80
- package/dist/exports/mx/cnbv.d.ts +15 -15
- package/dist/exports/mx/index.d.ts +2 -8
- package/dist/exports/mx/index.js +1 -3
- package/dist/exports/mx/sdk.d.ts +6 -0
- package/dist/exports/mx/sdk.js +3 -0
- package/dist/exports/screening.d.ts +6 -0
- package/dist/exports/screening.js +5 -0
- package/dist/i18n/messages.d.ts +4 -0
- package/dist/i18n/messages.en.d.ts +6 -0
- package/dist/i18n/messages.en.js +5 -0
- package/dist/i18n/messages.es.d.ts +5 -0
- package/dist/i18n/messages.es.js +5 -0
- package/dist/i18n/messages.js +22 -0
- package/dist/models/Address.d.ts +2 -3
- package/dist/models/Address.js +3 -3
- package/dist/models/Alert.d.ts +53 -17
- package/dist/models/Alert.js +96 -29
- package/dist/models/AlertClientItem.d.ts +3 -4
- package/dist/models/AlertClientItem.js +3 -3
- package/dist/models/AlertItem.d.ts +3 -4
- package/dist/models/AlertItem.js +5 -5
- package/dist/models/AlertTransactionItem.d.ts +4 -5
- package/dist/models/AlertTransactionItem.js +4 -4
- package/dist/models/BankAccount.d.ts +0 -1
- package/dist/models/Client.d.ts +6 -7
- package/dist/models/Client.js +9 -9
- package/dist/models/ContactMethod.d.ts +0 -1
- package/dist/models/Document.d.ts +28 -7
- package/dist/models/Document.js +54 -9
- package/dist/models/Evidence.d.ts +163 -0
- package/dist/models/Evidence.js +298 -0
- package/dist/models/LinkedClient.d.ts +0 -1
- package/dist/models/Product.d.ts +6 -7
- package/dist/models/Product.js +9 -9
- package/dist/models/Transaction.d.ts +14 -8
- package/dist/models/Transaction.js +19 -9
- package/dist/models/Workflow.d.ts +19 -1
- package/dist/models/Workflow.js +28 -0
- package/dist/models/WorkflowExecution.d.ts +12 -3
- package/dist/models/WorkflowExecution.js +23 -3
- package/dist/models/WorkflowTemplate.d.ts +0 -1
- package/dist/models/WorkflowVariable.d.ts +0 -1
- package/dist/models/base.d.ts +0 -1
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +3 -2
- package/dist/models/mx/MexAddress.d.ts +0 -1
- package/dist/models/mx/MexAddress.js +1 -1
- package/dist/models/mx/MexAlert.d.ts +6 -7
- package/dist/models/mx/MexAlert.js +4 -4
- package/dist/models/mx/MexAlertClientItem.d.ts +16 -17
- package/dist/models/mx/MexAlertClientItem.js +10 -10
- package/dist/models/mx/MexAlertItem.d.ts +6 -7
- package/dist/models/mx/MexAlertItem.js +3 -3
- package/dist/models/mx/MexAlertTransactionItem.d.ts +16 -17
- package/dist/models/mx/MexAlertTransactionItem.js +10 -11
- package/dist/models/mx/MexBankAccount.d.ts +0 -1
- package/dist/models/mx/MexClient.d.ts +7 -8
- package/dist/models/mx/MexClient.js +4 -4
- package/dist/models/mx/MexDocument.d.ts +1 -2
- package/dist/models/mx/MexDocument.js +2 -2
- package/dist/models/mx/MexProduct.d.ts +6 -7
- package/dist/models/mx/MexProduct.js +3 -3
- package/dist/models/mx/MexTransaction.d.ts +6 -7
- package/dist/models/mx/MexTransaction.js +3 -3
- package/dist/models/mx/av/MexAVAlert.d.ts +3 -4
- package/dist/models/mx/av/MexAVAlert.js +2 -2
- package/dist/models/mx/av/MexAVAlertClientItem.d.ts +8 -6
- package/dist/models/mx/av/MexAVAlertClientItem.js +4 -4
- package/dist/models/mx/av/MexAVAlertItem.d.ts +4 -5
- package/dist/models/mx/av/MexAVAlertItem.js +3 -3
- package/dist/models/mx/av/MexAVAlertTransactionItem.d.ts +107 -8
- package/dist/models/mx/av/MexAVAlertTransactionItem.js +4 -4
- package/dist/models/mx/av/MexAVClient.d.ts +0 -1
- package/dist/models/mx/av/MexAVProduct.d.ts +0 -1
- package/dist/models/mx/av/MexAVTransaction.d.ts +0 -1
- package/dist/models/mx/av/ari/MexARIAlert.d.ts +2 -3
- package/dist/models/mx/av/ari/MexARIAlert.js +1 -1
- package/dist/models/mx/av/ari/MexARIAlertClientItem.d.ts +3 -4
- package/dist/models/mx/av/ari/MexARIAlertClientItem.js +2 -2
- package/dist/models/mx/av/ari/MexARIAlertItem.d.ts +3 -4
- package/dist/models/mx/av/ari/MexARIAlertItem.js +2 -2
- package/dist/models/mx/av/ari/MexARIAlertTransactionItem.d.ts +3 -4
- package/dist/models/mx/av/ari/MexARIAlertTransactionItem.js +2 -2
- package/dist/models/mx/av/ari/MexARIClient.d.ts +0 -1
- package/dist/models/mx/av/ari/MexARIProduct.d.ts +0 -1
- package/dist/models/mx/av/ari/MexARITransaction.d.ts +0 -1
- package/dist/models/mx/av/avi/MexAVIAlert.d.ts +2 -3
- package/dist/models/mx/av/avi/MexAVIAlert.js +1 -1
- package/dist/models/mx/av/avi/MexAVIAlertClientItem.d.ts +3 -4
- package/dist/models/mx/av/avi/MexAVIAlertClientItem.js +2 -2
- package/dist/models/mx/av/avi/MexAVIAlertItem.d.ts +3 -4
- package/dist/models/mx/av/avi/MexAVIAlertItem.js +2 -2
- package/dist/models/mx/av/avi/MexAVIAlertTransactionItem.d.ts +3 -4
- package/dist/models/mx/av/avi/MexAVIAlertTransactionItem.js +2 -2
- package/dist/models/mx/av/avi/MexAVIClient.d.ts +0 -1
- package/dist/models/mx/av/avi/MexAVIProduct.d.ts +0 -1
- package/dist/models/mx/av/avi/MexAVITransaction.d.ts +0 -1
- package/dist/models/mx/av/index.d.ts +21 -1
- package/dist/models/mx/av/index.js +21 -0
- package/dist/models/mx/av/inm/MexINMAlert.d.ts +53 -0
- package/dist/models/mx/av/inm/MexINMAlert.js +77 -0
- package/dist/models/mx/av/inm/MexINMAlertClientItem.d.ts +60 -0
- package/dist/models/mx/av/inm/MexINMAlertClientItem.js +68 -0
- package/dist/models/mx/av/inm/MexINMAlertItem.d.ts +57 -0
- package/dist/models/mx/av/inm/MexINMAlertItem.js +67 -0
- package/dist/models/mx/av/inm/MexINMAlertTransactionItem.d.ts +96 -0
- package/dist/models/mx/av/inm/MexINMAlertTransactionItem.js +125 -0
- package/dist/models/mx/av/inm/MexINMClient.d.ts +39 -0
- package/dist/models/mx/av/inm/MexINMClient.js +54 -0
- package/dist/models/mx/av/inm/MexINMProduct.d.ts +63 -0
- package/dist/models/mx/av/inm/MexINMProduct.js +93 -0
- package/dist/models/mx/av/inm/MexINMTransaction.d.ts +75 -0
- package/dist/models/mx/av/inm/MexINMTransaction.js +116 -0
- package/dist/models/mx/av/jys/MexJYSAlert.d.ts +2 -3
- package/dist/models/mx/av/jys/MexJYSAlert.js +1 -1
- package/dist/models/mx/av/jys/MexJYSAlertClientItem.d.ts +3 -4
- package/dist/models/mx/av/jys/MexJYSAlertClientItem.js +2 -2
- package/dist/models/mx/av/jys/MexJYSAlertItem.d.ts +3 -4
- package/dist/models/mx/av/jys/MexJYSAlertItem.js +2 -2
- package/dist/models/mx/av/jys/MexJYSAlertTransactionItem.d.ts +3 -4
- package/dist/models/mx/av/jys/MexJYSAlertTransactionItem.js +2 -2
- package/dist/models/mx/av/jys/MexJYSClient.d.ts +0 -1
- package/dist/models/mx/av/jys/MexJYSProduct.d.ts +0 -1
- package/dist/models/mx/av/jys/MexJYSTransaction.d.ts +0 -1
- package/dist/models/mx/av/mjr/MexMJRAlert.d.ts +2 -3
- package/dist/models/mx/av/mjr/MexMJRAlert.js +1 -1
- package/dist/models/mx/av/mjr/MexMJRAlertClientItem.d.ts +3 -4
- package/dist/models/mx/av/mjr/MexMJRAlertClientItem.js +2 -2
- package/dist/models/mx/av/mjr/MexMJRAlertItem.d.ts +3 -4
- package/dist/models/mx/av/mjr/MexMJRAlertItem.js +2 -2
- package/dist/models/mx/av/mjr/MexMJRAlertTransactionItem.d.ts +3 -4
- package/dist/models/mx/av/mjr/MexMJRAlertTransactionItem.js +2 -2
- package/dist/models/mx/av/mjr/MexMJRClient.d.ts +0 -1
- package/dist/models/mx/av/mjr/MexMJRProduct.d.ts +0 -1
- package/dist/models/mx/av/mjr/MexMJRTransaction.d.ts +0 -1
- package/dist/models/mx/av/mpc/MexMPCAlert.d.ts +53 -0
- package/dist/models/mx/av/mpc/MexMPCAlert.js +77 -0
- package/dist/models/mx/av/mpc/MexMPCAlertClientItem.d.ts +60 -0
- package/dist/models/mx/av/mpc/MexMPCAlertClientItem.js +68 -0
- package/dist/models/mx/av/mpc/MexMPCAlertItem.d.ts +57 -0
- package/dist/models/mx/av/mpc/MexMPCAlertItem.js +67 -0
- package/dist/models/mx/av/mpc/MexMPCAlertTransactionItem.d.ts +92 -0
- package/dist/models/mx/av/mpc/MexMPCAlertTransactionItem.js +119 -0
- package/dist/models/mx/av/mpc/MexMPCClient.d.ts +39 -0
- package/dist/models/mx/av/mpc/MexMPCClient.js +54 -0
- package/dist/models/mx/av/mpc/MexMPCProduct.d.ts +45 -0
- package/dist/models/mx/av/mpc/MexMPCProduct.js +68 -0
- package/dist/models/mx/av/mpc/MexMPCTransaction.d.ts +73 -0
- package/dist/models/mx/av/mpc/MexMPCTransaction.js +113 -0
- package/dist/models/mx/av/tsc/MexTSCAlert.d.ts +2 -3
- package/dist/models/mx/av/tsc/MexTSCAlert.js +1 -1
- package/dist/models/mx/av/tsc/MexTSCAlertClientItem.d.ts +3 -4
- package/dist/models/mx/av/tsc/MexTSCAlertClientItem.js +2 -2
- package/dist/models/mx/av/tsc/MexTSCAlertItem.d.ts +3 -4
- package/dist/models/mx/av/tsc/MexTSCAlertItem.js +2 -2
- package/dist/models/mx/av/tsc/MexTSCAlertTransactionItem.d.ts +3 -4
- package/dist/models/mx/av/tsc/MexTSCAlertTransactionItem.js +2 -2
- package/dist/models/mx/av/tsc/MexTSCClient.d.ts +0 -1
- package/dist/models/mx/av/tsc/MexTSCProduct.d.ts +0 -1
- package/dist/models/mx/av/tsc/MexTSCTransaction.d.ts +0 -1
- package/dist/models/mx/av/veh/MexVEHAlert.d.ts +53 -0
- package/dist/models/mx/av/veh/MexVEHAlert.js +77 -0
- package/dist/models/mx/av/veh/MexVEHAlertClientItem.d.ts +58 -0
- package/dist/models/mx/av/veh/MexVEHAlertClientItem.js +66 -0
- package/dist/models/mx/av/veh/MexVEHAlertItem.d.ts +55 -0
- package/dist/models/mx/av/veh/MexVEHAlertItem.js +65 -0
- package/dist/models/mx/av/veh/MexVEHAlertTransactionItem.d.ts +90 -0
- package/dist/models/mx/av/veh/MexVEHAlertTransactionItem.js +117 -0
- package/dist/models/mx/av/veh/MexVEHClient.d.ts +25 -0
- package/dist/models/mx/av/veh/MexVEHClient.js +31 -0
- package/dist/models/mx/av/veh/MexVEHProduct.d.ts +24 -0
- package/dist/models/mx/av/veh/MexVEHProduct.js +30 -0
- package/dist/models/mx/av/veh/MexVEHTransaction.d.ts +40 -0
- package/dist/models/mx/av/veh/MexVEHTransaction.js +62 -0
- package/dist/models/mx/cnbv/MexCNBVAlert.d.ts +1 -2
- package/dist/models/mx/cnbv/MexCNBVAlert.js +1 -1
- package/dist/models/mx/cnbv/MexCNBVAlertClientItem.d.ts +4 -5
- package/dist/models/mx/cnbv/MexCNBVAlertClientItem.js +3 -3
- package/dist/models/mx/cnbv/MexCNBVAlertItem.d.ts +1 -2
- package/dist/models/mx/cnbv/MexCNBVAlertTransactionItem.d.ts +6 -7
- package/dist/models/mx/cnbv/MexCNBVAlertTransactionItem.js +3 -3
- package/dist/models/mx/cnbv/MexCNBVClient.d.ts +0 -1
- package/dist/models/mx/cnbv/MexCNBVProduct.d.ts +2 -3
- package/dist/models/mx/cnbv/MexCNBVTransaction.d.ts +0 -1
- package/dist/models/mx/cnbv/index.d.ts +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlert.d.ts +2 -3
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlert.js +2 -2
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertClientItem.d.ts +3 -4
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertClientItem.js +4 -4
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertItem.d.ts +2 -3
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertItem.js +2 -2
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertTransactionItem.d.ts +5 -6
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertTransactionItem.js +3 -3
- package/dist/models/mx/cnbv/transmisor/MexTransmisorClient.d.ts +1 -2
- package/dist/models/mx/cnbv/transmisor/MexTransmisorClient.js +1 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorProduct.d.ts +1 -2
- package/dist/models/mx/cnbv/transmisor/MexTransmisorProduct.js +1 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorTransaction.d.ts +1 -2
- package/dist/models/mx/cnbv/transmisor/MexTransmisorTransaction.js +1 -1
- package/dist/models/mx/cnbv/transmisor/index.d.ts +0 -1
- package/dist/models/mx/index.d.ts +0 -1
- package/dist/models/mx/index.js +4 -4
- package/dist/models/types.d.ts +0 -1
- package/dist/resources/addresses.d.ts +0 -1
- package/dist/resources/alert-items.d.ts +1 -4
- package/dist/resources/alert-items.js +1 -0
- package/dist/resources/alerts.d.ts +89 -19
- package/dist/resources/alerts.js +126 -24
- package/dist/resources/api-keys.d.ts +0 -3
- package/dist/resources/api-keys.js +1 -0
- package/dist/resources/audit-logs.d.ts +0 -3
- package/dist/resources/audit-logs.js +1 -0
- package/dist/resources/bank-accounts.d.ts +4 -5
- package/dist/resources/bank-accounts.js +4 -61
- package/dist/resources/base.d.ts +53 -16
- package/dist/resources/base.js +75 -2
- package/dist/resources/clients.d.ts +189 -14
- package/dist/resources/clients.js +238 -16
- package/dist/resources/contact-methods.d.ts +2 -3
- package/dist/resources/contact-methods.js +2 -2
- package/dist/resources/documents.d.ts +76 -8
- package/dist/resources/documents.js +140 -13
- package/dist/resources/evidence.d.ts +393 -0
- package/dist/resources/evidence.js +603 -0
- package/dist/resources/exchange-rates.d.ts +0 -3
- package/dist/resources/exchange-rates.js +1 -0
- package/dist/resources/identity/identity.d.ts +61 -0
- package/dist/resources/identity/identity.js +29 -0
- package/dist/resources/identity/index.d.ts +7 -0
- package/dist/resources/identity/index.js +7 -0
- package/dist/resources/index.d.ts +7 -5
- package/dist/resources/index.js +11 -6
- package/dist/resources/merge-tenant-defaults/index.d.ts +0 -1
- package/dist/resources/merge-tenant-defaults/mx/av/merge.d.ts +8 -9
- package/dist/resources/merge-tenant-defaults/mx/av/merge.js +11 -11
- package/dist/resources/merge-tenant-defaults/mx/cnbv/merge.d.ts +2 -3
- package/dist/resources/merge-tenant-defaults/mx/cnbv/merge.js +4 -4
- package/dist/resources/merge-tenant-defaults/utils.d.ts +0 -1
- package/dist/resources/mx/addresses.d.ts +11 -12
- package/dist/resources/mx/addresses.js +11 -11
- package/dist/resources/mx/alerts.d.ts +24 -12
- package/dist/resources/mx/alerts.js +46 -30
- package/dist/resources/mx/av/alerts.d.ts +41 -8
- package/dist/resources/mx/av/alerts.js +36 -19
- package/dist/resources/mx/av/ari/alerts.d.ts +40 -7
- package/dist/resources/mx/av/ari/alerts.js +37 -20
- package/dist/resources/mx/av/ari/clients.d.ts +21 -5
- package/dist/resources/mx/av/ari/clients.js +38 -17
- package/dist/resources/mx/av/ari/index.d.ts +0 -1
- package/dist/resources/mx/av/ari/products.d.ts +15 -5
- package/dist/resources/mx/av/ari/products.js +23 -9
- package/dist/resources/mx/av/ari/tenant.d.ts +0 -1
- package/dist/resources/mx/av/ari/transactions.d.ts +16 -6
- package/dist/resources/mx/av/ari/transactions.js +40 -68
- package/dist/resources/mx/av/avi/alerts.d.ts +41 -8
- package/dist/resources/mx/av/avi/alerts.js +43 -27
- package/dist/resources/mx/av/avi/clients.d.ts +26 -8
- package/dist/resources/mx/av/avi/clients.js +44 -24
- package/dist/resources/mx/av/avi/index.d.ts +0 -1
- package/dist/resources/mx/av/avi/products.d.ts +15 -5
- package/dist/resources/mx/av/avi/products.js +23 -9
- package/dist/resources/mx/av/avi/tenant.d.ts +0 -1
- package/dist/resources/mx/av/avi/transactions.d.ts +16 -6
- package/dist/resources/mx/av/avi/transactions.js +40 -73
- package/dist/resources/mx/av/clients.d.ts +19 -4
- package/dist/resources/mx/av/clients.js +32 -14
- package/dist/resources/mx/av/index.d.ts +3 -1
- package/dist/resources/mx/av/index.js +6 -0
- package/dist/resources/mx/av/inm/alerts.d.ts +271 -0
- package/dist/resources/mx/av/inm/alerts.js +442 -0
- package/dist/resources/mx/av/inm/clients.d.ts +144 -0
- package/dist/resources/mx/av/inm/clients.js +292 -0
- package/dist/resources/mx/av/inm/index.d.ts +7 -0
- package/dist/resources/mx/av/inm/index.js +7 -0
- package/dist/resources/mx/av/inm/products.d.ts +68 -0
- package/dist/resources/mx/av/inm/products.js +179 -0
- package/dist/resources/mx/av/inm/tenant.d.ts +29 -0
- package/dist/resources/mx/av/inm/tenant.js +36 -0
- package/dist/resources/mx/av/inm/transactions.d.ts +107 -0
- package/dist/resources/mx/av/inm/transactions.js +291 -0
- package/dist/resources/mx/av/jys/alerts.d.ts +41 -8
- package/dist/resources/mx/av/jys/alerts.js +40 -24
- package/dist/resources/mx/av/jys/clients.d.ts +21 -5
- package/dist/resources/mx/av/jys/clients.js +39 -19
- package/dist/resources/mx/av/jys/index.d.ts +0 -1
- package/dist/resources/mx/av/jys/products.d.ts +15 -5
- package/dist/resources/mx/av/jys/products.js +23 -9
- package/dist/resources/mx/av/jys/tenant.d.ts +0 -1
- package/dist/resources/mx/av/jys/transactions.d.ts +16 -6
- package/dist/resources/mx/av/jys/transactions.js +40 -72
- package/dist/resources/mx/av/mjr/alerts.d.ts +41 -8
- package/dist/resources/mx/av/mjr/alerts.js +40 -24
- package/dist/resources/mx/av/mjr/clients.d.ts +21 -5
- package/dist/resources/mx/av/mjr/clients.js +38 -18
- package/dist/resources/mx/av/mjr/index.d.ts +0 -1
- package/dist/resources/mx/av/mjr/products.d.ts +15 -5
- package/dist/resources/mx/av/mjr/products.js +23 -9
- package/dist/resources/mx/av/mjr/tenant.d.ts +0 -1
- package/dist/resources/mx/av/mjr/transactions.d.ts +16 -6
- package/dist/resources/mx/av/mjr/transactions.js +40 -83
- package/dist/resources/mx/av/mpc/alerts.d.ts +271 -0
- package/dist/resources/mx/av/mpc/alerts.js +442 -0
- package/dist/resources/mx/av/mpc/clients.d.ts +144 -0
- package/dist/resources/mx/av/mpc/clients.js +291 -0
- package/dist/resources/mx/av/mpc/index.d.ts +7 -0
- package/dist/resources/mx/av/mpc/index.js +7 -0
- package/dist/resources/mx/av/mpc/products.d.ts +71 -0
- package/dist/resources/mx/av/mpc/products.js +178 -0
- package/dist/resources/mx/av/mpc/tenant.d.ts +29 -0
- package/dist/resources/mx/av/mpc/tenant.js +36 -0
- package/dist/resources/mx/av/mpc/transactions.d.ts +107 -0
- package/dist/resources/mx/av/mpc/transactions.js +291 -0
- package/dist/resources/mx/av/products.d.ts +15 -5
- package/dist/resources/mx/av/products.js +21 -7
- package/dist/resources/mx/av/tenant.d.ts +0 -1
- package/dist/resources/mx/av/transactions.d.ts +15 -5
- package/dist/resources/mx/av/transactions.js +25 -11
- package/dist/resources/mx/av/tsc/alerts.d.ts +41 -8
- package/dist/resources/mx/av/tsc/alerts.js +40 -24
- package/dist/resources/mx/av/tsc/clients.d.ts +21 -5
- package/dist/resources/mx/av/tsc/clients.js +38 -18
- package/dist/resources/mx/av/tsc/index.d.ts +0 -1
- package/dist/resources/mx/av/tsc/products.d.ts +15 -5
- package/dist/resources/mx/av/tsc/products.js +23 -9
- package/dist/resources/mx/av/tsc/tenant.d.ts +0 -1
- package/dist/resources/mx/av/tsc/transactions.d.ts +16 -6
- package/dist/resources/mx/av/tsc/transactions.js +40 -80
- package/dist/resources/mx/av/veh/alerts.d.ts +271 -0
- package/dist/resources/mx/av/veh/alerts.js +442 -0
- package/dist/resources/mx/av/veh/clients.d.ts +144 -0
- package/dist/resources/mx/av/veh/clients.js +291 -0
- package/dist/resources/mx/av/veh/index.d.ts +7 -0
- package/dist/resources/mx/av/veh/index.js +7 -0
- package/dist/resources/mx/av/veh/products.d.ts +55 -0
- package/dist/resources/mx/av/veh/products.js +158 -0
- package/dist/resources/mx/av/veh/tenant.d.ts +18 -0
- package/dist/resources/mx/av/veh/tenant.js +22 -0
- package/dist/resources/mx/av/veh/transactions.d.ts +104 -0
- package/dist/resources/mx/av/veh/transactions.js +288 -0
- package/dist/resources/mx/bank-accounts.d.ts +4 -5
- package/dist/resources/mx/bank-accounts.js +3 -3
- package/dist/resources/mx/clients.d.ts +26 -10
- package/dist/resources/mx/clients.js +47 -27
- package/dist/resources/mx/cnbv/alerts.d.ts +19 -7
- package/dist/resources/mx/cnbv/alerts.js +37 -20
- package/dist/resources/mx/cnbv/clients.d.ts +23 -6
- package/dist/resources/mx/cnbv/clients.js +35 -17
- package/dist/resources/mx/cnbv/index.d.ts +0 -1
- package/dist/resources/mx/cnbv/products.d.ts +16 -6
- package/dist/resources/mx/cnbv/products.js +29 -15
- package/dist/resources/mx/cnbv/tenant.d.ts +0 -1
- package/dist/resources/mx/cnbv/transactions.d.ts +16 -6
- package/dist/resources/mx/cnbv/transactions.js +33 -19
- package/dist/resources/mx/cnbv/transmisor/addresses.d.ts +11 -12
- package/dist/resources/mx/cnbv/transmisor/addresses.js +8 -8
- package/dist/resources/mx/cnbv/transmisor/alerts.d.ts +40 -7
- package/dist/resources/mx/cnbv/transmisor/alerts.js +36 -19
- package/dist/resources/mx/cnbv/transmisor/clients.d.ts +23 -5
- package/dist/resources/mx/cnbv/transmisor/clients.js +37 -16
- package/dist/resources/mx/cnbv/transmisor/index.d.ts +0 -1
- package/dist/resources/mx/cnbv/transmisor/products.d.ts +15 -5
- package/dist/resources/mx/cnbv/transmisor/products.js +23 -9
- package/dist/resources/mx/cnbv/transmisor/tenant.d.ts +0 -1
- package/dist/resources/mx/cnbv/transmisor/transactions.d.ts +16 -6
- package/dist/resources/mx/cnbv/transmisor/transactions.js +35 -65
- package/dist/resources/mx/index.d.ts +0 -1
- package/dist/resources/mx/products.d.ts +15 -5
- package/dist/resources/mx/products.js +27 -10
- package/dist/resources/mx/tenant.d.ts +4 -2
- package/dist/resources/mx/tenant.js +2 -2
- package/dist/resources/mx/transactions.d.ts +20 -8
- package/dist/resources/mx/transactions.js +37 -20
- package/dist/resources/mx/update-split.d.ts +48 -0
- package/dist/resources/mx/update-split.js +105 -0
- package/dist/resources/products.d.ts +43 -9
- package/dist/resources/products.js +54 -11
- package/dist/resources/reference-data/custom-reference-data.d.ts +0 -3
- package/dist/resources/reference-data/custom-reference-data.js +1 -0
- package/dist/resources/reference-data/index.d.ts +0 -1
- package/dist/resources/reference-data/reference-data.d.ts +0 -3
- package/dist/resources/reference-data/reference-data.js +1 -0
- package/dist/resources/related-parties/base.d.ts +72 -0
- package/dist/resources/related-parties/base.js +28 -0
- package/dist/resources/reports.d.ts +0 -3
- package/dist/resources/reports.js +1 -0
- package/dist/resources/roles.d.ts +0 -3
- package/dist/resources/roles.js +1 -0
- package/dist/resources/screening/index.d.ts +7 -0
- package/dist/resources/screening/index.js +7 -0
- package/dist/resources/screening/screening.d.ts +61 -0
- package/dist/resources/screening/screening.js +35 -0
- package/dist/resources/signable-templates.d.ts +80 -0
- package/dist/resources/signable-templates.js +146 -0
- package/dist/resources/tags.d.ts +0 -3
- package/dist/resources/tags.js +1 -0
- package/dist/resources/tenant.d.ts +6 -5
- package/dist/resources/tenant.js +9 -3
- package/dist/resources/transactions.d.ts +126 -11
- package/dist/resources/transactions.js +176 -29
- package/dist/resources/users.d.ts +32 -4
- package/dist/resources/users.js +23 -0
- package/dist/resources/workflow-executions.d.ts +86 -13
- package/dist/resources/workflow-executions.js +89 -11
- package/dist/resources/workflow-links.d.ts +61 -0
- package/dist/resources/workflow-links.js +68 -0
- package/dist/resources/workflow-templates.d.ts +2 -3
- package/dist/resources/workflow-templates.js +1 -0
- package/dist/resources/workflow-variables.d.ts +3 -4
- package/dist/resources/workflow-variables.js +2 -0
- package/dist/resources/workflows.d.ts +108 -17
- package/dist/resources/workflows.js +178 -16
- package/dist/sdk/ComplianceSDK.d.ts +55 -22
- package/dist/sdk/ComplianceSDK.js +74 -23
- package/dist/sdk/base.d.ts +0 -1
- package/dist/sdk/index.d.ts +1 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/mx/ComplianceSDK.d.ts +1 -2
- package/dist/sdk/mx/ComplianceSDK.js +1 -1
- package/dist/sdk/mx/av/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/av/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/av/ari/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/av/ari/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/av/ari/index.d.ts +0 -1
- package/dist/sdk/mx/av/ari/types.d.ts +0 -1
- package/dist/sdk/mx/av/avi/ComplianceSDK.d.ts +1 -2
- package/dist/sdk/mx/av/avi/ComplianceSDK.js +1 -1
- package/dist/sdk/mx/av/avi/index.d.ts +0 -1
- package/dist/sdk/mx/av/avi/types.d.ts +0 -1
- package/dist/sdk/mx/av/index.d.ts +4 -5
- package/dist/sdk/mx/av/index.js +13 -22
- package/dist/sdk/mx/av/inm/ComplianceSDK.d.ts +41 -0
- package/dist/sdk/mx/av/inm/ComplianceSDK.js +35 -0
- package/dist/sdk/mx/av/inm/index.d.ts +7 -0
- package/dist/sdk/mx/av/inm/index.js +9 -0
- package/dist/sdk/mx/av/inm/types.d.ts +31 -0
- package/dist/sdk/mx/av/inm/types.js +21 -0
- package/dist/sdk/mx/av/jys/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/av/jys/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/av/jys/index.d.ts +0 -1
- package/dist/sdk/mx/av/jys/types.d.ts +0 -1
- package/dist/sdk/mx/av/mjr/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/av/mjr/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/av/mjr/index.d.ts +0 -1
- package/dist/sdk/mx/av/mjr/types.d.ts +0 -1
- package/dist/sdk/mx/av/mpc/ComplianceSDK.d.ts +41 -0
- package/dist/sdk/mx/av/mpc/ComplianceSDK.js +35 -0
- package/dist/sdk/mx/av/mpc/index.d.ts +7 -0
- package/dist/sdk/mx/av/mpc/index.js +9 -0
- package/dist/sdk/mx/av/mpc/types.d.ts +31 -0
- package/dist/sdk/mx/av/mpc/types.js +21 -0
- package/dist/sdk/mx/av/register-scopes.d.ts +4 -0
- package/dist/sdk/mx/av/register-scopes.js +28 -0
- package/dist/sdk/mx/av/tsc/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/av/tsc/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/av/tsc/index.d.ts +0 -1
- package/dist/sdk/mx/av/tsc/types.d.ts +0 -1
- package/dist/sdk/mx/av/types.d.ts +0 -1
- package/dist/sdk/mx/av/veh/ComplianceSDK.d.ts +41 -0
- package/dist/sdk/mx/av/veh/ComplianceSDK.js +35 -0
- package/dist/sdk/mx/av/veh/index.d.ts +7 -0
- package/dist/sdk/mx/av/veh/index.js +9 -0
- package/dist/sdk/mx/av/veh/types.d.ts +31 -0
- package/dist/sdk/mx/av/veh/types.js +21 -0
- package/dist/sdk/mx/cnbv/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/cnbv/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/cnbv/index.d.ts +1 -5
- package/dist/sdk/mx/cnbv/index.js +1 -12
- package/dist/sdk/mx/cnbv/register-scopes.d.ts +4 -0
- package/dist/sdk/mx/cnbv/register-scopes.js +12 -0
- package/dist/sdk/mx/cnbv/transmisor/ComplianceSDK.d.ts +3 -4
- package/dist/sdk/mx/cnbv/transmisor/ComplianceSDK.js +3 -3
- package/dist/sdk/mx/cnbv/transmisor/index.d.ts +0 -1
- package/dist/sdk/mx/cnbv/transmisor/types.d.ts +0 -1
- package/dist/sdk/mx/cnbv/types.d.ts +0 -1
- package/dist/sdk/mx/index.d.ts +0 -1
- package/dist/sdk/mx/registration.d.ts +0 -1
- package/dist/sdk/mx/types.d.ts +5 -4
- package/dist/sdk/mx/types.js +1 -1
- package/dist/sdk/registry-init.d.ts +0 -1
- package/dist/sdk/resource-registry.d.ts +4 -10
- package/dist/sdk/resource-registry.js +3 -3
- package/dist/sdk/sdk-registry.d.ts +0 -6
- package/dist/sdk/types.d.ts +16 -4
- package/dist/sdk/types.js +2 -2
- package/dist/utils/environment.d.ts +3 -3
- package/dist/utils/environment.js +7 -5
- package/dist/utils/filters.d.ts +0 -1
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.js +1 -1
- package/dist/utils/pagination.d.ts +0 -1
- package/dist/utils/session.d.ts +7 -1
- package/dist/utils/session.js +3 -1
- package/dist/utils/trpc-client.d.ts +14 -48
- package/dist/utils/trpc-client.js +43 -13
- package/dist/utils/upload.d.ts +0 -7
- package/package.json +53 -9
- package/dist/errors/api.d.ts.map +0 -1
- package/dist/errors/base.d.ts.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/upload.d.ts.map +0 -1
- package/dist/errors/validation.d.ts.map +0 -1
- package/dist/exports/base.d.ts.map +0 -1
- package/dist/exports/index.d.ts.map +0 -1
- package/dist/exports/mx/av/ari.d.ts.map +0 -1
- package/dist/exports/mx/av/avi.d.ts.map +0 -1
- package/dist/exports/mx/av/jys.d.ts.map +0 -1
- package/dist/exports/mx/av/mjr.d.ts.map +0 -1
- package/dist/exports/mx/av/tsc.d.ts.map +0 -1
- package/dist/exports/mx/av.d.ts.map +0 -1
- package/dist/exports/mx/cnbv/transmisor.d.ts.map +0 -1
- package/dist/exports/mx/cnbv.d.ts.map +0 -1
- package/dist/exports/mx/index.d.ts.map +0 -1
- package/dist/models/Address.d.ts.map +0 -1
- package/dist/models/Alert.d.ts.map +0 -1
- package/dist/models/AlertClientItem.d.ts.map +0 -1
- package/dist/models/AlertItem.d.ts.map +0 -1
- package/dist/models/AlertTransactionItem.d.ts.map +0 -1
- package/dist/models/BankAccount.d.ts.map +0 -1
- package/dist/models/Client.d.ts.map +0 -1
- package/dist/models/ContactMethod.d.ts.map +0 -1
- package/dist/models/Document.d.ts.map +0 -1
- package/dist/models/LinkedClient.d.ts.map +0 -1
- package/dist/models/Product.d.ts.map +0 -1
- package/dist/models/Transaction.d.ts.map +0 -1
- package/dist/models/Workflow.d.ts.map +0 -1
- package/dist/models/WorkflowExecution.d.ts.map +0 -1
- package/dist/models/WorkflowTemplate.d.ts.map +0 -1
- package/dist/models/WorkflowVariable.d.ts.map +0 -1
- package/dist/models/base.d.ts.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/mx/MexAddress.d.ts.map +0 -1
- package/dist/models/mx/MexAlert.d.ts.map +0 -1
- package/dist/models/mx/MexAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/MexAlertItem.d.ts.map +0 -1
- package/dist/models/mx/MexAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/MexBankAccount.d.ts.map +0 -1
- package/dist/models/mx/MexClient.d.ts.map +0 -1
- package/dist/models/mx/MexDocument.d.ts.map +0 -1
- package/dist/models/mx/MexProduct.d.ts.map +0 -1
- package/dist/models/mx/MexTransaction.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVAlert.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVClient.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVProduct.d.ts.map +0 -1
- package/dist/models/mx/av/MexAVTransaction.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIAlert.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIClient.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARIProduct.d.ts.map +0 -1
- package/dist/models/mx/av/ari/MexARITransaction.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIAlert.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIClient.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVIProduct.d.ts.map +0 -1
- package/dist/models/mx/av/avi/MexAVITransaction.d.ts.map +0 -1
- package/dist/models/mx/av/index.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSAlert.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSClient.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSProduct.d.ts.map +0 -1
- package/dist/models/mx/av/jys/MexJYSTransaction.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRAlert.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRClient.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRProduct.d.ts.map +0 -1
- package/dist/models/mx/av/mjr/MexMJRTransaction.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCAlert.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCAlertItem.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCClient.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCProduct.d.ts.map +0 -1
- package/dist/models/mx/av/tsc/MexTSCTransaction.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVAlert.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVAlertItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVClient.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVProduct.d.ts.map +0 -1
- package/dist/models/mx/cnbv/MexCNBVTransaction.d.ts.map +0 -1
- package/dist/models/mx/cnbv/index.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlert.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertClientItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorAlertTransactionItem.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorClient.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorProduct.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/MexTransmisorTransaction.d.ts.map +0 -1
- package/dist/models/mx/cnbv/transmisor/index.d.ts.map +0 -1
- package/dist/models/mx/index.d.ts.map +0 -1
- package/dist/models/types.d.ts.map +0 -1
- package/dist/resources/addresses.d.ts.map +0 -1
- package/dist/resources/alert-items.d.ts.map +0 -1
- package/dist/resources/alerts.d.ts.map +0 -1
- package/dist/resources/api-keys.d.ts.map +0 -1
- package/dist/resources/audit-logs.d.ts.map +0 -1
- package/dist/resources/bank-accounts.d.ts.map +0 -1
- package/dist/resources/base.d.ts.map +0 -1
- package/dist/resources/clients.d.ts.map +0 -1
- package/dist/resources/contact-methods.d.ts.map +0 -1
- package/dist/resources/documents.d.ts.map +0 -1
- package/dist/resources/exchange-rates.d.ts.map +0 -1
- package/dist/resources/index.d.ts.map +0 -1
- package/dist/resources/merge-tenant-defaults/index.d.ts.map +0 -1
- package/dist/resources/merge-tenant-defaults/mx/av/merge.d.ts.map +0 -1
- package/dist/resources/merge-tenant-defaults/mx/cnbv/merge.d.ts.map +0 -1
- package/dist/resources/merge-tenant-defaults/utils.d.ts.map +0 -1
- package/dist/resources/mx/addresses.d.ts.map +0 -1
- package/dist/resources/mx/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/index.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/products.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/ari/transactions.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/index.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/products.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/avi/transactions.d.ts.map +0 -1
- package/dist/resources/mx/av/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/index.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/index.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/products.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/jys/transactions.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/index.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/products.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/mjr/transactions.d.ts.map +0 -1
- package/dist/resources/mx/av/products.d.ts.map +0 -1
- package/dist/resources/mx/av/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/transactions.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/alerts.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/clients.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/index.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/products.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/tenant.d.ts.map +0 -1
- package/dist/resources/mx/av/tsc/transactions.d.ts.map +0 -1
- package/dist/resources/mx/bank-accounts.d.ts.map +0 -1
- package/dist/resources/mx/clients.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/alerts.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/clients.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/index.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/products.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/tenant.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transactions.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/addresses.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/alerts.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/clients.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/index.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/products.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/tenant.d.ts.map +0 -1
- package/dist/resources/mx/cnbv/transmisor/transactions.d.ts.map +0 -1
- package/dist/resources/mx/index.d.ts.map +0 -1
- package/dist/resources/mx/products.d.ts.map +0 -1
- package/dist/resources/mx/tenant.d.ts.map +0 -1
- package/dist/resources/mx/transactions.d.ts.map +0 -1
- package/dist/resources/ocr.d.ts +0 -17
- package/dist/resources/ocr.d.ts.map +0 -1
- package/dist/resources/ocr.js +0 -33
- package/dist/resources/onboarding-links.d.ts +0 -101
- package/dist/resources/onboarding-links.d.ts.map +0 -1
- package/dist/resources/onboarding-links.js +0 -124
- package/dist/resources/products.d.ts.map +0 -1
- package/dist/resources/reference-data/custom-reference-data.d.ts.map +0 -1
- package/dist/resources/reference-data/index.d.ts.map +0 -1
- package/dist/resources/reference-data/reference-data.d.ts.map +0 -1
- package/dist/resources/reports.d.ts.map +0 -1
- package/dist/resources/roles.d.ts.map +0 -1
- package/dist/resources/tags.d.ts.map +0 -1
- package/dist/resources/tenant.d.ts.map +0 -1
- package/dist/resources/transactions.d.ts.map +0 -1
- package/dist/resources/users.d.ts.map +0 -1
- package/dist/resources/workflow-executions.d.ts.map +0 -1
- package/dist/resources/workflow-templates.d.ts.map +0 -1
- package/dist/resources/workflow-variables.d.ts.map +0 -1
- package/dist/resources/workflows.d.ts.map +0 -1
- package/dist/sdk/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/base.d.ts.map +0 -1
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/mx/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/ari/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/ari/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/ari/types.d.ts.map +0 -1
- package/dist/sdk/mx/av/avi/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/avi/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/avi/types.d.ts.map +0 -1
- package/dist/sdk/mx/av/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/jys/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/jys/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/jys/types.d.ts.map +0 -1
- package/dist/sdk/mx/av/mjr/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/mjr/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/mjr/types.d.ts.map +0 -1
- package/dist/sdk/mx/av/tsc/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/av/tsc/index.d.ts.map +0 -1
- package/dist/sdk/mx/av/tsc/types.d.ts.map +0 -1
- package/dist/sdk/mx/av/types.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/index.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/transmisor/ComplianceSDK.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/transmisor/index.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/transmisor/types.d.ts.map +0 -1
- package/dist/sdk/mx/cnbv/types.d.ts.map +0 -1
- package/dist/sdk/mx/index.d.ts.map +0 -1
- package/dist/sdk/mx/registration.d.ts.map +0 -1
- package/dist/sdk/mx/types.d.ts.map +0 -1
- package/dist/sdk/registry-init.d.ts.map +0 -1
- package/dist/sdk/resource-registry.d.ts.map +0 -1
- package/dist/sdk/sdk-registry.d.ts.map +0 -1
- package/dist/sdk/types.d.ts.map +0 -1
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/filters.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/pagination.d.ts.map +0 -1
- package/dist/utils/session.d.ts.map +0 -1
- package/dist/utils/trpc-client.d.ts.map +0 -1
- package/dist/utils/upload.d.ts.map +0 -1
|
@@ -3,16 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* CRUD operations, filtering, pagination, and client relationships.
|
|
5
5
|
*
|
|
6
|
-
* This is the base (unscoped) resource. For
|
|
6
|
+
* This is the base (unscoped) resource. For scope-scoped SDKs, use:
|
|
7
7
|
* - MexTransactionsResource - Mexico-scoped with flattened MX fields
|
|
8
8
|
* - AVITransactionsResource - Mexico AVI-scoped with flattened AVI fields
|
|
9
9
|
* - JYSTransactionsResource - Mexico JYS-scoped with flattened JYS fields
|
|
10
10
|
* - TSCTransactionsResource - Mexico TSC-scoped with flattened TSC fields
|
|
11
11
|
*/
|
|
12
|
-
import type { AtomicBatchResult, CreateTransactionInput, ListOptions, PaginatedResponse, PartialBatchResult, RelatedClient, ResourceTagResponse, RiskAssessmentInfo, TransactionFilter, TransactionSort, UpdateTransactionInput, UpsertResult, UpsertTransactionInput } from "@artu-ai/shared";
|
|
12
|
+
import type { AtomicBatchResult, Checklist, CreateTransactionInput, ListOptions, MigrationPreview, MigrationResult, migrateTransactionInputSchema, PaginatedResponse, PartialBatchResult, RelatedClient, ResourceTagResponse, RiskAssessmentInfo, Scope, TransactionFilter, TransactionSort, UpdateTransactionInput, UpsertResult, UpsertTransactionInput } from "@artu-ai/shared";
|
|
13
13
|
import { ClientRole } from "@artu-ai/shared";
|
|
14
|
+
import { z } from "zod";
|
|
14
15
|
import { Transaction, type TransactionData } from "../models";
|
|
16
|
+
import { Evidence } from "../models/Evidence";
|
|
15
17
|
import { BaseResource } from "./base";
|
|
18
|
+
/**
|
|
19
|
+
* Options for `transactions.migrate` / `transactions.migratePreview`. The
|
|
20
|
+
* source-row `id` is supplied as the first argument, so it is omitted here.
|
|
21
|
+
*/
|
|
22
|
+
export type MigrateTransactionOptions = Omit<z.input<typeof migrateTransactionInputSchema>, "id">;
|
|
16
23
|
/**
|
|
17
24
|
* Base resource manager for transaction operations.
|
|
18
25
|
*
|
|
@@ -30,7 +37,7 @@ import { BaseResource } from "./base";
|
|
|
30
37
|
* scopes: ["MX"],
|
|
31
38
|
* relatedClientIds: ["client_sender"],
|
|
32
39
|
* timestamp: new Date(),
|
|
33
|
-
*
|
|
40
|
+
* scopeData: {
|
|
34
41
|
* MX: { actividadVulnerable: { AVI: { ... } } },
|
|
35
42
|
* },
|
|
36
43
|
* });
|
|
@@ -43,13 +50,14 @@ import { BaseResource } from "./base";
|
|
|
43
50
|
* ```
|
|
44
51
|
*/
|
|
45
52
|
export declare class TransactionsResource<TSort = TransactionSort> extends BaseResource<Transaction, CreateTransactionInput, UpdateTransactionInput, TransactionFilter, TSort> {
|
|
53
|
+
protected scopeFilterKey: "scope" | "scopes" | null;
|
|
46
54
|
/**
|
|
47
55
|
* Fetches a product by ID and caches it for the duration of a batch.
|
|
48
56
|
* Subclasses can override for scope-specific product resources.
|
|
49
57
|
*/
|
|
50
58
|
private fetchProduct;
|
|
51
59
|
/**
|
|
52
|
-
* Merges product
|
|
60
|
+
* Merges product scope data into nested transaction input.
|
|
53
61
|
* Used by the base (unscoped) resource. User-provided values take precedence.
|
|
54
62
|
*/
|
|
55
63
|
protected mergeProductData<T extends Record<string, unknown>>(data: T): Promise<T>;
|
|
@@ -57,7 +65,7 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
57
65
|
* Merges product data into flat (scoped) transaction input.
|
|
58
66
|
* Extracts the scope-specific fields from the product and merges at root level.
|
|
59
67
|
*
|
|
60
|
-
* @param scopePath - Path to the scope data in the product
|
|
68
|
+
* @param scopePath - Path to the scope data in the product scopeData
|
|
61
69
|
* e.g., ["MX", "actividadVulnerable", "ARI"]
|
|
62
70
|
*/
|
|
63
71
|
protected mergeProductDataFlat<T extends Record<string, unknown>>(data: T, scopePath: string[]): Promise<T>;
|
|
@@ -85,15 +93,52 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
85
93
|
/**
|
|
86
94
|
* Retrieves a transaction by ID.
|
|
87
95
|
*/
|
|
88
|
-
retrieve(id: string
|
|
96
|
+
retrieve(id: string, opts?: {
|
|
97
|
+
crossScope?: boolean;
|
|
98
|
+
}): Promise<Transaction>;
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves the raw, un-instantiated transaction payload by ID.
|
|
101
|
+
*
|
|
102
|
+
* The API call is identical across every scope; only the client-side
|
|
103
|
+
* reshape differs. The React SDK caches this single scope-agnostic payload
|
|
104
|
+
* and lets each scope derive its own shape via `materialize`, avoiding N
|
|
105
|
+
* redundant fetches in nested scope-overview components.
|
|
106
|
+
*
|
|
107
|
+
* Intentionally does NOT pass `requireScope` (unlike `retrieve`): that is a
|
|
108
|
+
* client-supplied optional narrowing filter, not the authorization boundary.
|
|
109
|
+
* Tenant isolation is enforced server-side by RLS and applies identically
|
|
110
|
+
* here. A shared, id-keyed payload cannot carry a per-scope filter without
|
|
111
|
+
* leaking one scope's narrowing onto the others sharing the cache entry.
|
|
112
|
+
*
|
|
113
|
+
* @param id - Transaction ID
|
|
114
|
+
* @returns The raw API payload (`TransactionData`) — not a model instance
|
|
115
|
+
*/
|
|
116
|
+
retrieveRaw(id: string): Promise<TransactionData>;
|
|
89
117
|
/**
|
|
90
118
|
* Retrieves a transaction by metadata key/value.
|
|
91
119
|
*/
|
|
92
|
-
retrieveByMetadata(key: string, value: string
|
|
120
|
+
retrieveByMetadata(key: string, value: string, opts?: {
|
|
121
|
+
crossScope?: boolean;
|
|
122
|
+
}): Promise<Transaction>;
|
|
93
123
|
/**
|
|
94
124
|
* Retrieves a transaction by externalId.
|
|
95
125
|
*/
|
|
96
|
-
retrieveByExternalId(externalId: string
|
|
126
|
+
retrieveByExternalId(externalId: string, opts?: {
|
|
127
|
+
crossScope?: boolean;
|
|
128
|
+
}): Promise<Transaction>;
|
|
129
|
+
/**
|
|
130
|
+
* Get the compliance checklist for a transaction in a given scope.
|
|
131
|
+
*
|
|
132
|
+
* @param id - The transaction's UUID
|
|
133
|
+
* @param opts.scope - The scope to evaluate (e.g., "MX:AV:AVI")
|
|
134
|
+
* @param opts.includeChildren - When true, rollup items include
|
|
135
|
+
* per-child item arrays. Defaults to true; pass false to receive
|
|
136
|
+
* only the rollup summaries (useful for list views).
|
|
137
|
+
*/
|
|
138
|
+
checklist(id: string, opts: {
|
|
139
|
+
scope: Scope;
|
|
140
|
+
includeChildren?: boolean;
|
|
141
|
+
}): Promise<Checklist>;
|
|
97
142
|
/**
|
|
98
143
|
* Updates a transaction.
|
|
99
144
|
*/
|
|
@@ -105,14 +150,18 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
105
150
|
/**
|
|
106
151
|
* Lists transactions with optional filtering and pagination.
|
|
107
152
|
*/
|
|
108
|
-
list(options?: ListOptions<TransactionFilter, TSort>
|
|
153
|
+
list(options?: ListOptions<TransactionFilter, TSort> & {
|
|
154
|
+
crossScope?: boolean;
|
|
155
|
+
}): Promise<PaginatedResponse<Transaction>>;
|
|
109
156
|
/**
|
|
110
157
|
* Counts transactions matching the given filter.
|
|
111
158
|
*
|
|
112
159
|
* @param filter - Optional filter criteria
|
|
113
160
|
* @returns The count of matching transactions
|
|
114
161
|
*/
|
|
115
|
-
count(filter?: TransactionFilter
|
|
162
|
+
count(filter?: TransactionFilter, options?: {
|
|
163
|
+
crossScope?: boolean;
|
|
164
|
+
}): Promise<number>;
|
|
116
165
|
/**
|
|
117
166
|
* Lists all transactions for a specific client.
|
|
118
167
|
*
|
|
@@ -138,6 +187,7 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
138
187
|
filter?: TransactionFilter;
|
|
139
188
|
sort?: TSort;
|
|
140
189
|
pageSize?: number;
|
|
190
|
+
crossScope?: boolean;
|
|
141
191
|
}): AsyncGenerator<Transaction, void, undefined>;
|
|
142
192
|
/**
|
|
143
193
|
* Links a client to a transaction with an optional role.
|
|
@@ -206,6 +256,31 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
206
256
|
upsertManyByExternalId(transactions: UpsertTransactionInput[], options: {
|
|
207
257
|
atomic: false;
|
|
208
258
|
}): Promise<PartialBatchResult<UpsertResult<Transaction>>>;
|
|
259
|
+
/**
|
|
260
|
+
* Links an evidence record to a transaction.
|
|
261
|
+
*
|
|
262
|
+
* @param input - Transaction ID and evidence ID to link
|
|
263
|
+
*/
|
|
264
|
+
linkEvidence(input: {
|
|
265
|
+
transactionId: string;
|
|
266
|
+
evidenceId: string;
|
|
267
|
+
}): Promise<void>;
|
|
268
|
+
/**
|
|
269
|
+
* Unlinks an evidence record from a transaction.
|
|
270
|
+
*
|
|
271
|
+
* @param input - Transaction ID and evidence ID to unlink
|
|
272
|
+
*/
|
|
273
|
+
unlinkEvidence(input: {
|
|
274
|
+
transactionId: string;
|
|
275
|
+
evidenceId: string;
|
|
276
|
+
}): Promise<void>;
|
|
277
|
+
/**
|
|
278
|
+
* Lists all evidence records linked to a transaction.
|
|
279
|
+
*
|
|
280
|
+
* @param transactionId - Transaction ID
|
|
281
|
+
* @returns Paginated list of evidence records
|
|
282
|
+
*/
|
|
283
|
+
listEvidence(transactionId: string): Promise<PaginatedResponse<Evidence>>;
|
|
209
284
|
/**
|
|
210
285
|
* Adds tags to a transaction.
|
|
211
286
|
*/
|
|
@@ -222,10 +297,50 @@ export declare class TransactionsResource<TSort = TransactionSort> extends BaseR
|
|
|
222
297
|
* Lists all tags on a transaction.
|
|
223
298
|
*/
|
|
224
299
|
listTags(id: string): Promise<ResourceTagResponse[]>;
|
|
300
|
+
/**
|
|
301
|
+
* Copies this transaction into the other environment (test ↔ live),
|
|
302
|
+
* upserting it and the selected subresources (evidence, related clients) by
|
|
303
|
+
* externalId.
|
|
304
|
+
*
|
|
305
|
+
* The whole graph is migrated atomically: nothing is written unless every
|
|
306
|
+
* resource can be matched by externalId. When any resource in the graph
|
|
307
|
+
* lacks an externalId the call throws {@link MigrationBlockedError} (whose
|
|
308
|
+
* `blockers` lists the offending resources) and nothing is written — assign
|
|
309
|
+
* the missing externalIds and retry.
|
|
310
|
+
*
|
|
311
|
+
* @param id - Source-environment transaction id
|
|
312
|
+
* @param options - Target environment, precedence, and subresource selection
|
|
313
|
+
* @returns The completed migration result (target id, action, per-resource counts)
|
|
314
|
+
* @throws {MigrationBlockedError} when resources in the graph lack an externalId
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```typescript
|
|
318
|
+
* const result = await sdk.transactions.migrate(transactionId, { to: "live" });
|
|
319
|
+
* console.log(result.action, result.targetId);
|
|
320
|
+
* ```
|
|
321
|
+
*/
|
|
322
|
+
migrate(id: string, options: MigrateTransactionOptions): Promise<Extract<MigrationResult, {
|
|
323
|
+
status: "completed";
|
|
324
|
+
}>>;
|
|
325
|
+
/**
|
|
326
|
+
* Dry-run of {@link migrate}: reports what would be created/updated in the
|
|
327
|
+
* target environment and any blockers, without writing anything.
|
|
328
|
+
*
|
|
329
|
+
* @param id - Source-environment transaction id
|
|
330
|
+
* @param options - Target environment, precedence, and subresource selection
|
|
331
|
+
* @returns The migration preview (target action, blockers, per-resource counts)
|
|
332
|
+
*/
|
|
333
|
+
migratePreview(id: string, options: MigrateTransactionOptions): Promise<MigrationPreview>;
|
|
225
334
|
/**
|
|
226
335
|
* Instantiates a Transaction model from API response data.
|
|
227
336
|
* Subclasses override this to return their specific model type.
|
|
228
337
|
*/
|
|
229
338
|
protected instantiate(data: TransactionData): Transaction;
|
|
339
|
+
/**
|
|
340
|
+
* Public, pure transform from a raw transaction payload to this scope's model.
|
|
341
|
+
* Wraps the protected `instantiate` so the React SDK can apply it inside a
|
|
342
|
+
* TanStack Query `select`. Subclasses override `instantiate` (and `materialize`),
|
|
343
|
+
* so each scope materializes its own model type.
|
|
344
|
+
*/
|
|
345
|
+
materialize(data: TransactionData): Transaction;
|
|
230
346
|
}
|
|
231
|
-
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* CRUD operations, filtering, pagination, and client relationships.
|
|
5
5
|
*
|
|
6
|
-
* This is the base (unscoped) resource. For
|
|
6
|
+
* This is the base (unscoped) resource. For scope-scoped SDKs, use:
|
|
7
7
|
* - MexTransactionsResource - Mexico-scoped with flattened MX fields
|
|
8
8
|
* - AVITransactionsResource - Mexico AVI-scoped with flattened AVI fields
|
|
9
9
|
* - JYSTransactionsResource - Mexico JYS-scoped with flattened JYS fields
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { createTransactionInputSchema, updateTransactionInputSchema, upsertTransactionInputSchema, } from "@artu-ai/shared";
|
|
13
13
|
import { z } from "zod";
|
|
14
|
+
import { MigrationBlockedError } from "../errors/migration";
|
|
14
15
|
import { Transaction } from "../models";
|
|
16
|
+
import { Evidence } from "../models/Evidence";
|
|
15
17
|
import { BaseResource } from "./base";
|
|
16
18
|
// ===========================
|
|
17
19
|
// TransactionsResource
|
|
@@ -33,7 +35,7 @@ import { BaseResource } from "./base";
|
|
|
33
35
|
* scopes: ["MX"],
|
|
34
36
|
* relatedClientIds: ["client_sender"],
|
|
35
37
|
* timestamp: new Date(),
|
|
36
|
-
*
|
|
38
|
+
* scopeData: {
|
|
37
39
|
* MX: { actividadVulnerable: { AVI: { ... } } },
|
|
38
40
|
* },
|
|
39
41
|
* });
|
|
@@ -46,6 +48,7 @@ import { BaseResource } from "./base";
|
|
|
46
48
|
* ```
|
|
47
49
|
*/
|
|
48
50
|
export class TransactionsResource extends BaseResource {
|
|
51
|
+
scopeFilterKey = "scopes";
|
|
49
52
|
// ─────────────────────────────────────────────────────────────────
|
|
50
53
|
// Product Merge
|
|
51
54
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -55,41 +58,41 @@ export class TransactionsResource extends BaseResource {
|
|
|
55
58
|
*/
|
|
56
59
|
async fetchProduct(productId) {
|
|
57
60
|
const product = await this.execute(() => this.trpc.products.retrieve.query({ id: productId }));
|
|
58
|
-
return product?.
|
|
61
|
+
return product?.scopeData ?? null;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
61
|
-
* Merges product
|
|
64
|
+
* Merges product scope data into nested transaction input.
|
|
62
65
|
* Used by the base (unscoped) resource. User-provided values take precedence.
|
|
63
66
|
*/
|
|
64
67
|
async mergeProductData(data) {
|
|
65
68
|
const productId = data.productId;
|
|
66
69
|
if (!productId)
|
|
67
70
|
return data;
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
71
|
+
const productScopeData = await this.fetchProduct(productId);
|
|
72
|
+
if (!productScopeData)
|
|
70
73
|
return data;
|
|
71
|
-
const txJurisdictions = data.
|
|
74
|
+
const txJurisdictions = data.scopeData ?? {};
|
|
72
75
|
return {
|
|
73
76
|
...data,
|
|
74
|
-
|
|
77
|
+
scopeData: deepMergeDefaults(txJurisdictions, productScopeData),
|
|
75
78
|
};
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
81
|
* Merges product data into flat (scoped) transaction input.
|
|
79
82
|
* Extracts the scope-specific fields from the product and merges at root level.
|
|
80
83
|
*
|
|
81
|
-
* @param scopePath - Path to the scope data in the product
|
|
84
|
+
* @param scopePath - Path to the scope data in the product scopeData
|
|
82
85
|
* e.g., ["MX", "actividadVulnerable", "ARI"]
|
|
83
86
|
*/
|
|
84
87
|
async mergeProductDataFlat(data, scopePath) {
|
|
85
88
|
const productId = data.productId;
|
|
86
89
|
if (!productId)
|
|
87
90
|
return data;
|
|
88
|
-
const
|
|
89
|
-
if (!
|
|
91
|
+
const productScopeData = await this.fetchProduct(productId);
|
|
92
|
+
if (!productScopeData)
|
|
90
93
|
return data;
|
|
91
94
|
// Navigate to the scope-specific data in the product
|
|
92
|
-
let scopeData =
|
|
95
|
+
let scopeData = productScopeData;
|
|
93
96
|
for (const key of scopePath) {
|
|
94
97
|
if (scopeData && typeof scopeData === "object") {
|
|
95
98
|
scopeData = scopeData[key];
|
|
@@ -115,13 +118,13 @@ export class TransactionsResource extends BaseResource {
|
|
|
115
118
|
const productId = item.productId;
|
|
116
119
|
if (!productId)
|
|
117
120
|
return item;
|
|
118
|
-
const
|
|
119
|
-
if (!
|
|
121
|
+
const productScopeData = productMap.get(productId);
|
|
122
|
+
if (!productScopeData)
|
|
120
123
|
return item;
|
|
121
|
-
const txJurisdictions = item.
|
|
124
|
+
const txJurisdictions = item.scopeData ?? {};
|
|
122
125
|
return {
|
|
123
126
|
...item,
|
|
124
|
-
|
|
127
|
+
scopeData: deepMergeDefaults(txJurisdictions, productScopeData),
|
|
125
128
|
};
|
|
126
129
|
});
|
|
127
130
|
}
|
|
@@ -136,11 +139,11 @@ export class TransactionsResource extends BaseResource {
|
|
|
136
139
|
const productId = item.productId;
|
|
137
140
|
if (!productId)
|
|
138
141
|
return item;
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
142
|
+
const productScopeData = productMap.get(productId);
|
|
143
|
+
if (!productScopeData)
|
|
141
144
|
return item;
|
|
142
145
|
// Navigate to scope-specific data
|
|
143
|
-
let scopeData =
|
|
146
|
+
let scopeData = productScopeData;
|
|
144
147
|
for (const key of scopePath) {
|
|
145
148
|
if (scopeData && typeof scopeData === "object") {
|
|
146
149
|
scopeData = scopeData[key];
|
|
@@ -169,7 +172,7 @@ export class TransactionsResource extends BaseResource {
|
|
|
169
172
|
const products = await Promise.all(productIds.map((id) => this.execute(() => this.trpc.products.retrieve.query({ id }))));
|
|
170
173
|
return new Map(products
|
|
171
174
|
.filter(Boolean)
|
|
172
|
-
.map((p) => [p.id, p.
|
|
175
|
+
.map((p) => [p.id, p.scopeData]));
|
|
173
176
|
}
|
|
174
177
|
// ─────────────────────────────────────────────────────────────────
|
|
175
178
|
// CRUD Operations
|
|
@@ -189,24 +192,70 @@ export class TransactionsResource extends BaseResource {
|
|
|
189
192
|
/**
|
|
190
193
|
* Retrieves a transaction by ID.
|
|
191
194
|
*/
|
|
192
|
-
async retrieve(id) {
|
|
193
|
-
const response = await this.execute(() => this.trpc.transactions.retrieve.query({
|
|
195
|
+
async retrieve(id, opts) {
|
|
196
|
+
const response = await this.execute(() => this.trpc.transactions.retrieve.query({
|
|
197
|
+
id,
|
|
198
|
+
requireScope: this.buildRequireScope(opts?.crossScope),
|
|
199
|
+
}));
|
|
194
200
|
return this.instantiate(response);
|
|
195
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Retrieves the raw, un-instantiated transaction payload by ID.
|
|
204
|
+
*
|
|
205
|
+
* The API call is identical across every scope; only the client-side
|
|
206
|
+
* reshape differs. The React SDK caches this single scope-agnostic payload
|
|
207
|
+
* and lets each scope derive its own shape via `materialize`, avoiding N
|
|
208
|
+
* redundant fetches in nested scope-overview components.
|
|
209
|
+
*
|
|
210
|
+
* Intentionally does NOT pass `requireScope` (unlike `retrieve`): that is a
|
|
211
|
+
* client-supplied optional narrowing filter, not the authorization boundary.
|
|
212
|
+
* Tenant isolation is enforced server-side by RLS and applies identically
|
|
213
|
+
* here. A shared, id-keyed payload cannot carry a per-scope filter without
|
|
214
|
+
* leaking one scope's narrowing onto the others sharing the cache entry.
|
|
215
|
+
*
|
|
216
|
+
* @param id - Transaction ID
|
|
217
|
+
* @returns The raw API payload (`TransactionData`) — not a model instance
|
|
218
|
+
*/
|
|
219
|
+
async retrieveRaw(id) {
|
|
220
|
+
return this.execute(() => this.trpc.transactions.retrieve.query({ id }));
|
|
221
|
+
}
|
|
196
222
|
/**
|
|
197
223
|
* Retrieves a transaction by metadata key/value.
|
|
198
224
|
*/
|
|
199
|
-
async retrieveByMetadata(key, value) {
|
|
200
|
-
const response = await this.execute(() => this.trpc.transactions.retrieveByMetadata.query({
|
|
225
|
+
async retrieveByMetadata(key, value, opts) {
|
|
226
|
+
const response = await this.execute(() => this.trpc.transactions.retrieveByMetadata.query({
|
|
227
|
+
key,
|
|
228
|
+
value,
|
|
229
|
+
requireScope: this.buildRequireScope(opts?.crossScope),
|
|
230
|
+
}));
|
|
201
231
|
return this.instantiate(response);
|
|
202
232
|
}
|
|
203
233
|
/**
|
|
204
234
|
* Retrieves a transaction by externalId.
|
|
205
235
|
*/
|
|
206
|
-
async retrieveByExternalId(externalId) {
|
|
207
|
-
const response = await this.execute(() => this.trpc.transactions.retrieveByExternalId.query({
|
|
236
|
+
async retrieveByExternalId(externalId, opts) {
|
|
237
|
+
const response = await this.execute(() => this.trpc.transactions.retrieveByExternalId.query({
|
|
238
|
+
externalId,
|
|
239
|
+
requireScope: this.buildRequireScope(opts?.crossScope),
|
|
240
|
+
}));
|
|
208
241
|
return this.instantiate(response);
|
|
209
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Get the compliance checklist for a transaction in a given scope.
|
|
245
|
+
*
|
|
246
|
+
* @param id - The transaction's UUID
|
|
247
|
+
* @param opts.scope - The scope to evaluate (e.g., "MX:AV:AVI")
|
|
248
|
+
* @param opts.includeChildren - When true, rollup items include
|
|
249
|
+
* per-child item arrays. Defaults to true; pass false to receive
|
|
250
|
+
* only the rollup summaries (useful for list views).
|
|
251
|
+
*/
|
|
252
|
+
async checklist(id, opts) {
|
|
253
|
+
return this.execute(() => this.trpc.transactions.checklist.query({
|
|
254
|
+
id,
|
|
255
|
+
scope: opts.scope,
|
|
256
|
+
includeChildren: opts.includeChildren ?? true,
|
|
257
|
+
}));
|
|
258
|
+
}
|
|
210
259
|
/**
|
|
211
260
|
* Updates a transaction.
|
|
212
261
|
*/
|
|
@@ -229,7 +278,12 @@ export class TransactionsResource extends BaseResource {
|
|
|
229
278
|
* Lists transactions with optional filtering and pagination.
|
|
230
279
|
*/
|
|
231
280
|
async list(options) {
|
|
232
|
-
const
|
|
281
|
+
const { crossScope, ...rest } = options ?? {};
|
|
282
|
+
const filter = this.applyAutoScope(rest.filter, crossScope);
|
|
283
|
+
const response = await this.execute(() => this.trpc.transactions.list.query({
|
|
284
|
+
...rest,
|
|
285
|
+
filter,
|
|
286
|
+
}));
|
|
233
287
|
return {
|
|
234
288
|
data: response.data.map((t) => this.instantiate(t)),
|
|
235
289
|
pagination: response.pagination,
|
|
@@ -241,8 +295,9 @@ export class TransactionsResource extends BaseResource {
|
|
|
241
295
|
* @param filter - Optional filter criteria
|
|
242
296
|
* @returns The count of matching transactions
|
|
243
297
|
*/
|
|
244
|
-
async count(filter) {
|
|
245
|
-
const
|
|
298
|
+
async count(filter, options) {
|
|
299
|
+
const scopedFilter = this.applyAutoScope(filter, options?.crossScope);
|
|
300
|
+
const response = await this.execute(() => this.trpc.transactions.count.query({ filter: scopedFilter }));
|
|
246
301
|
return response.count;
|
|
247
302
|
}
|
|
248
303
|
/**
|
|
@@ -276,6 +331,7 @@ export class TransactionsResource extends BaseResource {
|
|
|
276
331
|
filter: options?.filter,
|
|
277
332
|
sort: options?.sort,
|
|
278
333
|
pageSize: options?.pageSize,
|
|
334
|
+
crossScope: options?.crossScope,
|
|
279
335
|
});
|
|
280
336
|
}
|
|
281
337
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -417,6 +473,45 @@ export class TransactionsResource extends BaseResource {
|
|
|
417
473
|
}
|
|
418
474
|
}
|
|
419
475
|
// ─────────────────────────────────────────────────────────────────
|
|
476
|
+
// Evidence Relationship Management
|
|
477
|
+
// ─────────────────────────────────────────────────────────────────
|
|
478
|
+
/**
|
|
479
|
+
* Links an evidence record to a transaction.
|
|
480
|
+
*
|
|
481
|
+
* @param input - Transaction ID and evidence ID to link
|
|
482
|
+
*/
|
|
483
|
+
async linkEvidence(input) {
|
|
484
|
+
await this.execute(() => this.trpc.evidence.linkTransaction.mutate({
|
|
485
|
+
evidenceId: input.evidenceId,
|
|
486
|
+
transactionId: input.transactionId,
|
|
487
|
+
}));
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Unlinks an evidence record from a transaction.
|
|
491
|
+
*
|
|
492
|
+
* @param input - Transaction ID and evidence ID to unlink
|
|
493
|
+
*/
|
|
494
|
+
async unlinkEvidence(input) {
|
|
495
|
+
await this.execute(() => this.trpc.evidence.unlinkTransaction.mutate({
|
|
496
|
+
evidenceId: input.evidenceId,
|
|
497
|
+
transactionId: input.transactionId,
|
|
498
|
+
}));
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Lists all evidence records linked to a transaction.
|
|
502
|
+
*
|
|
503
|
+
* @param transactionId - Transaction ID
|
|
504
|
+
* @returns Paginated list of evidence records
|
|
505
|
+
*/
|
|
506
|
+
async listEvidence(transactionId) {
|
|
507
|
+
const response = await this.execute(() => this.trpc.evidence.listForTransaction.query({ transactionId }));
|
|
508
|
+
const typedResponse = response;
|
|
509
|
+
return {
|
|
510
|
+
data: typedResponse.data.map((d) => new Evidence(d)),
|
|
511
|
+
pagination: typedResponse.pagination,
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
// ─────────────────────────────────────────────────────────────────
|
|
420
515
|
// Tag Operations
|
|
421
516
|
// ─────────────────────────────────────────────────────────────────
|
|
422
517
|
/**
|
|
@@ -444,6 +539,49 @@ export class TransactionsResource extends BaseResource {
|
|
|
444
539
|
return this.execute(() => this.trpc.transactions.listTags.query({ id }));
|
|
445
540
|
}
|
|
446
541
|
// ─────────────────────────────────────────────────────────────────
|
|
542
|
+
// Cross-environment Migration
|
|
543
|
+
// ─────────────────────────────────────────────────────────────────
|
|
544
|
+
/**
|
|
545
|
+
* Copies this transaction into the other environment (test ↔ live),
|
|
546
|
+
* upserting it and the selected subresources (evidence, related clients) by
|
|
547
|
+
* externalId.
|
|
548
|
+
*
|
|
549
|
+
* The whole graph is migrated atomically: nothing is written unless every
|
|
550
|
+
* resource can be matched by externalId. When any resource in the graph
|
|
551
|
+
* lacks an externalId the call throws {@link MigrationBlockedError} (whose
|
|
552
|
+
* `blockers` lists the offending resources) and nothing is written — assign
|
|
553
|
+
* the missing externalIds and retry.
|
|
554
|
+
*
|
|
555
|
+
* @param id - Source-environment transaction id
|
|
556
|
+
* @param options - Target environment, precedence, and subresource selection
|
|
557
|
+
* @returns The completed migration result (target id, action, per-resource counts)
|
|
558
|
+
* @throws {MigrationBlockedError} when resources in the graph lack an externalId
|
|
559
|
+
*
|
|
560
|
+
* @example
|
|
561
|
+
* ```typescript
|
|
562
|
+
* const result = await sdk.transactions.migrate(transactionId, { to: "live" });
|
|
563
|
+
* console.log(result.action, result.targetId);
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
async migrate(id, options) {
|
|
567
|
+
const response = await this.execute(() => this.trpc.transactions.migrate.mutate({ ...options, id }));
|
|
568
|
+
if (response.status === "blocked") {
|
|
569
|
+
throw new MigrationBlockedError(response.blockers);
|
|
570
|
+
}
|
|
571
|
+
return response;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Dry-run of {@link migrate}: reports what would be created/updated in the
|
|
575
|
+
* target environment and any blockers, without writing anything.
|
|
576
|
+
*
|
|
577
|
+
* @param id - Source-environment transaction id
|
|
578
|
+
* @param options - Target environment, precedence, and subresource selection
|
|
579
|
+
* @returns The migration preview (target action, blockers, per-resource counts)
|
|
580
|
+
*/
|
|
581
|
+
async migratePreview(id, options) {
|
|
582
|
+
return this.execute(() => this.trpc.transactions.migratePreview.mutate({ ...options, id }));
|
|
583
|
+
}
|
|
584
|
+
// ─────────────────────────────────────────────────────────────────
|
|
447
585
|
// Instantiation (protected for subclasses to override)
|
|
448
586
|
// ─────────────────────────────────────────────────────────────────
|
|
449
587
|
/**
|
|
@@ -453,6 +591,15 @@ export class TransactionsResource extends BaseResource {
|
|
|
453
591
|
instantiate(data) {
|
|
454
592
|
return new Transaction(data);
|
|
455
593
|
}
|
|
594
|
+
/**
|
|
595
|
+
* Public, pure transform from a raw transaction payload to this scope's model.
|
|
596
|
+
* Wraps the protected `instantiate` so the React SDK can apply it inside a
|
|
597
|
+
* TanStack Query `select`. Subclasses override `instantiate` (and `materialize`),
|
|
598
|
+
* so each scope materializes its own model type.
|
|
599
|
+
*/
|
|
600
|
+
materialize(data) {
|
|
601
|
+
return this.instantiate(data);
|
|
602
|
+
}
|
|
456
603
|
}
|
|
457
604
|
// ===========================
|
|
458
605
|
// Utilities
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* - List/manage invitations
|
|
9
9
|
* - Assign/revoke roles
|
|
10
10
|
*/
|
|
11
|
-
import type { AssignUserRoleInput, RevokeUserRoleInput, UserRoleResponse } from "@artu-ai/shared";
|
|
12
|
-
import type { TRPCClient } from "../utils/trpc-client";
|
|
11
|
+
import type { AssignUserRoleInput, Locale, RevokeUserRoleInput, UserRoleResponse } from "@artu-ai/shared";
|
|
13
12
|
export interface Member {
|
|
14
13
|
id: string;
|
|
15
14
|
userId: string;
|
|
@@ -25,6 +24,16 @@ export interface Member {
|
|
|
25
24
|
slug: string;
|
|
26
25
|
}[];
|
|
27
26
|
}
|
|
27
|
+
/** Lightweight user summary returned by `users.get`. Excludes roles and
|
|
28
|
+
* membership status — those belong to the full `Member` shape that
|
|
29
|
+
* org-settings surfaces consume. */
|
|
30
|
+
export interface UserSummary {
|
|
31
|
+
userId: string;
|
|
32
|
+
email: string;
|
|
33
|
+
firstName: string | null;
|
|
34
|
+
lastName: string | null;
|
|
35
|
+
profilePictureUrl: string | null;
|
|
36
|
+
}
|
|
28
37
|
export interface Invitation {
|
|
29
38
|
id: string;
|
|
30
39
|
email: string;
|
|
@@ -43,8 +52,15 @@ export interface InviteUserInput {
|
|
|
43
52
|
}
|
|
44
53
|
export declare class UsersResource {
|
|
45
54
|
private readonly trpc;
|
|
46
|
-
constructor(trpc: TRPCClient);
|
|
47
55
|
listMembers(): Promise<Member[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve a single user by id, scoped to the caller's org. Returns
|
|
58
|
+
* `null` when the user isn't a member (cross-org probes look
|
|
59
|
+
* indistinguishable from "user doesn't exist"). Two WorkOS calls
|
|
60
|
+
* round-trip; cache client-side via React Query if you're calling
|
|
61
|
+
* this from a list surface.
|
|
62
|
+
*/
|
|
63
|
+
get(userId: string): Promise<UserSummary | null>;
|
|
48
64
|
removeMember(membershipId: string): Promise<void>;
|
|
49
65
|
listInvitations(options?: {
|
|
50
66
|
status?: "pending" | "accepted" | "expired" | "revoked";
|
|
@@ -54,8 +70,20 @@ export declare class UsersResource {
|
|
|
54
70
|
listRoleAssignments(): Promise<UserRoleResponse[]>;
|
|
55
71
|
listRolesForUser(userId: string): Promise<UserRoleResponse[]>;
|
|
56
72
|
myRoles(): Promise<UserRoleResponse[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Persist the current user's preferred locale to their WorkOS profile.
|
|
75
|
+
* The dashboard cookie remains the immediate render source of truth; this
|
|
76
|
+
* makes the choice durable across devices and cleared cookies.
|
|
77
|
+
*/
|
|
78
|
+
updateLocale(locale: Locale): Promise<{
|
|
79
|
+
locale: Locale;
|
|
80
|
+
}>;
|
|
81
|
+
/** Record the current user's acceptance of the Terms & Conditions. */
|
|
82
|
+
acceptTerms(): Promise<{
|
|
83
|
+
termsAcceptedAt: string;
|
|
84
|
+
termsVersion: string;
|
|
85
|
+
}>;
|
|
57
86
|
assignRole(input: AssignUserRoleInput): Promise<UserRoleResponse>;
|
|
58
87
|
revokeRole(input: RevokeUserRoleInput): Promise<void>;
|
|
59
88
|
private execute;
|
|
60
89
|
}
|
|
61
|
-
//# sourceMappingURL=users.d.ts.map
|