@mbanq/core-sdk-js 0.43.0 → 0.44.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/README.md CHANGED
@@ -767,6 +767,20 @@ await client.request(UpdateCardID({
767
767
  | `CustomCreate` | Execute a custom create operation |
768
768
  | `CustomGet` | Execute a custom get operation |
769
769
 
770
+ #### DataTable Operations
771
+
772
+ | Command | Description |
773
+ |---------|-------------|
774
+ | `CreateEntryInDataTable` | Create a new entry (row) in a data table with support for JSON data or file uploads |
775
+ | `GetEntriesFromDataTable` | Retrieve all entries from a data table including column metadata and structure |
776
+ | `UpdateEntryInDataTable` | Update an existing entry in a data table by its unique identifier |
777
+ | `DeleteEntryFromDataTable` | Delete an entry from a data table by its unique identifier |
778
+ | `GetDataTableProductMappingTemplate` | Get template for entity data table product mapping with available entities, data tables, and products |
779
+ | `CreateDataTableProductMapping` | Create a mapping between an entity table, data table, and product |
780
+ | `GetDataTableProductMappings` | Retrieve list of entity data table product mappings with pagination and filtering support |
781
+ | `GetDataTableProductMappingById` | Retrieve a specific entity data table product mapping by its unique identifier |
782
+ | `DeleteDataTableProductMapping` | Delete a specific entity data table product mapping by its unique identifier |
783
+
770
784
  #### Global Configuration Operations
771
785
 
772
786
  | Command | Description |
@@ -1035,3 +1049,59 @@ try {
1035
1049
  ```
1036
1050
 
1037
1051
  For more detailed information or support, please contact our support team or visit our developer portal.
1052
+
1053
+ // Delete a data table entry
1054
+ const deleted = await client.request(DeleteEntryFromDataTable({
1055
+ datatable: 'd_client_info',
1056
+ apptableid: 101,
1057
+ datatableId: 1651719413544 // Entry ID to delete
1058
+ }));
1059
+
1060
+ console.log('Deleted entry ID:', deleted.id);
1061
+ console.log('Resource ID:', deleted.resourceId);
1062
+
1063
+ // Get product mapping template
1064
+ const mappings = await client.request(GetDataTableProductMappingTemplate({}));
1065
+ console.log('Total records:', mappings.totalFilteredRecords);
1066
+ console.log('Mappings:', mappings.pageItems);
1067
+ // pageItems contains: [{ id, entity, datatableName, productId, productName }, ...]
1068
+
1069
+ // Filter by application table
1070
+ const loanMappings = await client.request(GetDataTableProductMappingTemplate({
1071
+ apptable: 'm_loan'
1072
+ }));
1073
+ // Returns only mappings for m_loan entity
1074
+
1075
+ // Create data table product mapping
1076
+ const mapping = await client.request(CreateDataTableProductMapping({
1077
+ entity: 'm_loan',
1078
+ productId: 23,
1079
+ datatableName: 'd_loan_additional_details'
1080
+ }));
1081
+ console.log('Mapping created with ID:', mapping.id);
1082
+ console.log('Resource ID:', mapping.resourceId);
1083
+
1084
+ // Get list of mappings with pagination
1085
+ const mappings = await client.request(GetDataTableProductMappings({
1086
+ limit: 10,
1087
+ offset: 0
1088
+ }));
1089
+ console.log('Total records:', mappings.totalFilteredRecords);
1090
+ console.log('First page:', mappings.pageItems);
1091
+
1092
+ // Filter mappings by entity
1093
+ const loanMappings = await client.request(GetDataTableProductMappings({
1094
+ entity: 'm_loan'
1095
+ }));
1096
+
1097
+ // Get specific mapping by ID
1098
+ const mapping = await client.request(GetDataTableProductMappingById(67));
1099
+ console.log('Mapping ID:', mapping.id);
1100
+ console.log('Entity:', mapping.entity);
1101
+ console.log('Data Table:', mapping.datatableName);
1102
+ console.log('Product:', mapping.productName);
1103
+
1104
+ // Delete mapping by ID
1105
+ const deleteResult = await client.request(DeleteDataTableProductMapping(67));
1106
+ console.log('Deleted resource ID:', deleteResult.resourceId);
1107
+ console.log('Deleted mapping ID:', deleteResult.id);