baserecord, update, and const improvements #1
Ghost
commented 2026-03-25 15:10:06 +11:00
(Migrated from codeberg.org)
- need to remove create and update from baserecord, inaccurate.
- if a field is autodate, make readonly.
- make an 'Upsert' utility like pocketbase-typegen instead of updatepayload for each (it omits baserecord keys and partial the rest for now).
- instead of having a 'create' payload (handled with upsert for now), we get 'required' in consts, and use it for form validation (also min, max, minselect, maxselect). so we can't send invalid payload to backend.
- also, remove the 'base' type, and replace with just the one type (which is combined with base record)
- also for const, remove ?, in fieldschema, replace with omit<,"collectionName"|"collectionId">, replace typed as FieldSchema with satisfies FieldSchema for narrower typing.
- need to exclude baserecord fields from update payload
- need to remove create and update from baserecord, inaccurate.
- if a field is autodate, make readonly.
- make an 'Upsert<T>' utility like pocketbase-typegen instead of updatepayload for each (it omits baserecord keys and partial the rest for now).
- instead of having a 'create' payload (handled with upsert for now), we get 'required' in consts, and use it for form validation (also min, max, minselect, maxselect). so we can't send invalid payload to backend.
- also, remove the 'base' type, and replace with just the one type (which is combined with base record)
- also for const, remove ?, in fieldschema, replace with omit<,"collectionName"|"collectionId">, replace typed as FieldSchema with satisfies FieldSchema for narrower typing.
- need to exclude baserecord fields from update payload
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?