Methods
helpersFrom
The helpersFrom
method returns an object with two methods: getRecord
and getRecords
described below.
fetch
- Type:
(url: RequestInfo | URL, config?: RequestInit) => Promise<Response>
Optional custom fetch function to use for sending the request.
pocketbase
- Required
- Type:
TypedPocketbase
The pocketbase
parameter is a mandatory parameter that specifies a PocketBase instance.
getRecord
The getRecord
method returns a single record from your PocketBase instance.
reference
- Required
- Type:
RecordRef
schema
- Required
- Type:
AnyZodRecord
getRecords
The getRecords
method returns a records list from your PocketBase instance.
collection
- Required
- Type:
string
filter
- Type:
string
page
- Type:
number
- Default:
1
perPage
- Type:
number
- Default:
200
schema
- Required
- Type:
AnyZodRecord
skipTotal
- Type:
boolean
- Default:
true
sort
- Type:
ZodRecordSort