Take a look into the lightning/uiListApi
module. It has below functionality
- Get list view records and metadata for a list view by API name
import { LightningElement, wire } from 'lwc';
import { getListUi } from 'lightning/uiListApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';
export default class Example extends LightningElement {
@wire(getListUi, { objectApiName: ACCOUNT_OBJECT, listViewApiName: 'AllAccounts' })
propertyOrFunction;
}
- Get list view records and metadata for a list view by ID
import { LightningElement, wire } from 'lwc';
import { getListUi } from 'lightning/uiListApi';
export default class Example extends LightningElement {
@wire(getListUi, { listViewId: '00BT0000001TONQMA4'})
propertyOrFunction;
}
- Get all list views of an object
import { LightningElement, wire } from 'lwc';
import { getListUi } from 'lightning/uiListApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';
export default class Example extends LightningElement {
@wire(getListUi, { objectApiName: ACCOUNT_OBJECT })
propertyOrFunction;
}
There is lot more examples in official documentation here
Note that the uiListAPI Module is implementation of the User Interface API thats documented here