Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(schema): Add steadyState property on FieldSchema #721

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/schema/docs/build/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ Key | Required | Type | Description
`dict` | no | `boolean` | Is this field a key/value input?
`computed` | no | `boolean` | Is this field automatically populated (and hidden from the user)? Note: Only OAuth and Session Auth support fields with this key.
`altersDynamicFields` | no | `boolean` | Does the value of this field affect the definitions of other fields in the set?
`steadyState` | no | `boolean` | Prevents triggering on new output until all values for fields with this property remain unchanged for 2 polls. Can be used to, e.g., not trigger on a new contact until the contact has completed typing their name.
`inputFormat` | no | `string` | Useful when you expect the input to be part of a longer string. Put "{{input}}" in place of the user's input (IE: "https://{{input}}.yourdomain.com").

#### Examples
Expand Down
4 changes: 4 additions & 0 deletions packages/schema/exported-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@
"description": "Does the value of this field affect the definitions of other fields in the set?",
"type": "boolean"
},
"steadyState": {
"description": "Prevents triggering on new output until all values for fields with this property remain unchanged for 2 polls. Can be used to, e.g., not trigger on a new contact until the contact has completed typing their name.",
"type": "boolean"
},
"inputFormat": {
"description": "Useful when you expect the input to be part of a longer string. Put \"{{input}}\" in place of the user's input (IE: \"https://{{input}}.yourdomain.com\").",
"type": "string",
Expand Down
4 changes: 4 additions & 0 deletions packages/schema/lib/schemas/FieldSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ module.exports = makeSchema(
'Does the value of this field affect the definitions of other fields in the set?',
type: 'boolean',
},
steadyState: {
description: 'Prevents triggering on new output until all values for fields with this property remain unchanged for 2 polls. Can be used to, e.g., not trigger on a new contact until the contact has completed typing their name.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be worthwhile to include a note about how this only applies to "Polling Triggers"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be helpful. Will include it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

type: 'boolean',
},
inputFormat: {
description:
'Useful when you expect the input to be part of a longer string. Put "{{input}}" in place of the user\'s input (IE: "https://{{input}}.yourdomain.com").',
Expand Down