As I understand the code, the term "records" should be replaced with "collections" (only in comments).
// fetch a paginated records list
const pageResult = await pb.collections.getList(1, 100, {
filter: 'created >= "2022-01-01 00:00:00"',
});
// you can also fetch all records at once via getFullList
const collections = await pb.collections.getFullList({ sort: '-created' });
// or fetch only the first collection that matches the specified filter
const collection = await pb.collections.getFirstListItem('type="auth"');
As I understand the code, the term "records" should be replaced with "collections" (only in comments).