Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GetDataTableProductMappings

Function: GetDataTableProductMappings()

GetDataTableProductMappings(params?): Command<{ params: { entity?: string; limit?: number; offset?: number; productId?: number; }; }, { pageItems: object[]; totalFilteredRecords: number; }>

Defined in: src/commands/rest/dataTable.ts:475

Get entity data table product mappings

Use this API to retrieve a list of mappings between entity tables, data tables, and products. Use this API to fetch the existing mapping configuration that links specific products with their associated entity and data tables. This is useful for viewing or verifying the relationships set up for data handling and business processes.

Parameters

params?

The query parameters (optional)

entity?

string = ...

Filter results by entity (application table) name (e.g., 'm_loan')

limit?

number = ...

The maximum number of records to return in the response (e.g., 15)

offset?

number = ...

The number of records to skip before starting to return results (e.g., 0)

productId?

number = ...

Filter results by product identifier (e.g., 35)

Returns

Command<{ params: { entity?: string; limit?: number; offset?: number; productId?: number; }; }, { pageItems: object[]; totalFilteredRecords: number; }>

Command object that executes the API request and returns the list of mappings

Example

typescript
// Get all mappings with default pagination
const mappings = await client.request(GetDataTableProductMappings({}));
console.log('Total records:', mappings.totalFilteredRecords);
console.log('Mappings:', mappings.pageItems);

// Get mappings for a specific entity with pagination
const loanMappings = await client.request(GetDataTableProductMappings({
  entity: 'm_loan',
  limit: 10,
  offset: 0
}));

// Get mappings for a specific product
const productMappings = await client.request(GetDataTableProductMappings({
  productId: 35
}));

Released under the MIT License.