docs: omit implementation details from hooks reference#1675
Open
serikjensen wants to merge 1 commit intomainfrom
Open
docs: omit implementation details from hooks reference#1675serikjensen wants to merge 1 commit intomainfrom
serikjensen wants to merge 1 commit intomainfrom
Conversation
Tightens the hook reference docs to focus on what partners need to build
forms, removing implementation-detail leaks that don't help integrators
and that previously could mislead readers into wiring forms in
non-recommended ways.
- Removed the Advanced: Fields Metadata section from hooks.md so
partners aren't steered toward consuming fieldsMetadata directly.
- Reworded the Fields.Ssn section to describe the masked placeholder +
auto-waived REQUIRED rule behaviorally rather than via the
fieldsMetadata.ssn.hasRedactedValue flag.
- Replaced internal symbols with behavioral descriptions: NAME_REGEX
(Employee Details), FLSA_OVERTIME_SALARY_LIMIT (Compensation),
rev_2020_w4 (Federal Taxes).
- Stripped schema-builder vocabulary ('never'/'always'/predicate,
"schema declares/enforces") from Pay Schedule, Compensation, and
hooks.md.
- Dropped the internal Rule column from the Compensation required-fields
table.
- Removed raw HTTP endpoint paths from Work Address mode descriptions
in favor of mode-only language.
fieldsMetadata is preserved in return-type signatures and the
SignEmployeeFormFieldsMetadata Exported Types entry since those
accurately describe the public return shape without prescribing direct
consumption.
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tightens the hook reference docs to focus on what partners need to build forms, removing implementation-detail leaks that don't help integrators and that previously could mislead readers into wiring forms in non-recommended ways.
Changes
Advanced: Fields Metadatasection fromhooks.mdso partners aren't steered toward consumingfieldsMetadatadirectly. Field components consume metadata internally; the recommended path isFields(withFieldComponentfor UI overrides).Fields.Ssnsection to describe the masked placeholder + auto-waivedREQUIREDrule behaviorally instead of viafieldsMetadata.ssn.hasRedactedValue.NAME_REGEX(Employee Details),FLSA_OVERTIME_SALARY_LIMIT(Compensation),rev_2020_w4(Federal Taxes).'never'/'always'/ "predicate", "schema declares/enforces") from Pay Schedule, Compensation, andhooks.mdin favor of partner-facing language.Rulecolumn from the Compensation required-fields table; the remaining columns convey the same partner-relevant info.GET /v1/work_addresses/{work_address_uuid},POST) from Work Address mode descriptions in favor of mode-only language.What was intentionally preserved:
fieldsMetadatain return-type signatures and theSignEmployeeFormFieldsMetadatarow in the Exported Types table — they accurately describe the public return shape without prescribing direct consumption.react-hook-form/Zod/UseFormReturnreferences — partner-relevant framework context, especially for theAdvanced: Hook Form Internalsescape hatch.useCurrentWorkAddressForm,useWorkAddressManagement).Testing
Made with Cursor