feat: add respondent attributes to SignInFieldAttributes - #120
Merged
Merged
Conversation
`allow-visitor-respondents` and `allow-employee-respondents` back the Field options -> Respondents controls in the dashboard. Both are writable on the v3 sign-in-fields resource and both default to true server-side, so a field created without them is offered to visitors and to employees. Optional rather than required, matching `store-response`, so this cannot break an existing consumer. Needed so integrations can create an admin-only field (a badge or card number read off the credential) without casting past this type.
There was a problem hiding this comment.
Pull request overview
Adds respondent-scoping attributes to the Node SDK’s SignInFieldAttributes type so integrations can control whether visitors and/or employees are allowed to answer a sign-in field, matching the v3 API and database defaults.
Changes:
- Extend
SignInFieldAttributeswith'allow-visitor-respondents'?: booleanand'allow-employee-respondents'?: boolean. - Add inline JSDoc explaining semantics and server-side default behavior for these new attributes.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Addresses review on #120. The hyphens mean the TS property name is 'allow-visitor-respondents', so the unquoted form in the doc was not the actual key and would not copy/paste.
Contributor
|
Please update the version |
ryanflynndev
approved these changes
Aug 31, 2026
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.
What
Adds two attributes to
SignInFieldAttributes:These back the Field options → Respondents controls in the dashboard. Both are writable on the v3
sign-in-fieldsresource (app/resources/api/v3/sign_in_field_resource.rbdeclares them, and onlycreated_at/updated_atare readonly there), and both default to true in the database:Why
An integration that creates a sign-in field holding a value only an admin can supply, a badge or card number read off the credential, has no way to say so through this type. Because the columns default to true, the field is silently offered to visitors and to employees, neither of whom can know the number.
pacs-integration-service #327 fixes that for the Card ID field, but has to cast past this interface to do it:
With this merged and released, that cast comes out.
Optional, not required
Marked optional to match
'store-response'?: boolean, even though the columns areNOT NULLand a read always returns them. Required would be a breaking change for anyone building an attributes literal, and it buys nothing: the internal SDK's creation model already makes everything exceptnameandkindpartial, so optionality here does not weaken creation payloads.Verification
tsc --noEmit, eslint, and prettier clean. Test suite green: 5 suites, 72 tests. Type-only change, so no new tests.Version bumped to 2.5.3 in
package.jsonandpackage-lock.json, matching how #115 handled a comparable additive change to the payload types (2.5.1 -> 2.5.2). Publishing itself still happens on release creation, so this only stages the version.