Skip to content

Commit

Permalink
feat(NOJIRA-123): update form.settings type to have all options (#119)
Browse files Browse the repository at this point in the history
* feat(type): update form.settings type to have all options

I got the list of defaults by creating a new form using the API and
inspecting the response as some of the options were not listed on the
docs / had different names vs what was specified on the docs.

I also reordered the options to match the API response order.

Added:
- are_uploads_public
- autosave_progress (docs have this as `autocomplete_progress`)
- free_form_navigation
- hide_navigation
- pro_subdomain_enabled
- show_cookie_consent
- show_key_hint_on_choices
- show_number_of_submissions
- show_question_number
- show_time_to_complete
- use_lead_qualification

Reordered:
- language
- is_public
- progress_bar
- show_progress_bar
- show_typeform_branding

* fix: update defaults to match conventions
  • Loading branch information
gurpreetatwal authored Feb 22, 2024
1 parent 2a92dc5 commit 16ed6f3
Showing 1 changed file with 87 additions and 17 deletions.
104 changes: 87 additions & 17 deletions src/typeform-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1067,37 +1067,46 @@ export namespace Typeform {
*/
export interface Settings {
/**
* Language of form.
* Default `""`
*/
language?: Language
are_uploads_public?: boolean

/**
* Default: `""`
* true if your form is public. Otherwise, false (your form is private).
* Default `""`
* true to enable saving partial form responses on the client side. Otherwise, false.
*/
is_public?: boolean
autosave_progress?: boolean

/**
* Default: `"proportion"`
* Basis for the progress bar displayed on the screen. Choose "proportion" to show the number of questions answered so far.
* Choose "percentage" to show the percentage of questions answered so far.
* Default `""`
* Allow people to navigate freely between the questions of your Typeform. They will still have to answer the required ones before submitting.
*/
progress_bar?: 'percentage' | 'proportion'
free_form_navigation?: boolean

/**
* Default: `""`
* true to display progress bar on the typeform. Otherwise, false.
* Default `""`
* false to display the navigation arrows in the bottom-right corner of the form, true to hide them
*/
show_progress_bar?: boolean
hide_navigation?: boolean

/**
* Default: `""`
* true to display Typeform brand on the typeform. false to hide Typeform branding on the typeform.
* Hiding Typeform branding is available for PRO+ accounts.
* Default `""`
* true if your form is public. Otherwise, false (your form is private).
*/
show_typeform_branding?: boolean
is_public?: boolean

/**
* Language of form.
*/
language?: Language

meta?: {
/**
* Default: `""`
* Default `""`
* true to allow search engines to index your typeform. Otherwise, false.
*/
allow_indexing?: boolean

/**
* Description for search engines to display for your typeform.
*/
Expand All @@ -1109,6 +1118,67 @@ export namespace Typeform {
href?: string
}
}

/**
* Default `""`
*/
pro_subdomain_enabled?: boolean

/**
* Default `""`
* Basis for the progress bar displayed on the screen. Choose "proportion" to show the number of questions answered so far.
* Choose "percentage" to show the percentage of questions answered so far.
*/
progress_bar?: 'percentage' | 'proportion'

/**
* Default `""`
* true to request cookie consent to respondents through a banner, false to do not request it.
*/
show_cookie_consent?: boolean

/**
* Default `""`
* true to display the key hint letters on Multiple Choice, Picture Choice, Legal and Yes/No blocks, false to hide them.
*/
show_key_hint_on_choices?: boolean

/**
* Default `""`
* true to display number of submissions on Welcome screens, false to hide it. Mutually exclusive with show_time_to_complete
*/
show_number_of_submissions?: boolean

/**
* Default `""`
* true to display progress bar on the typeform. Otherwise, false.
*/
show_progress_bar?: boolean

/**
* Default `""`
* true to display the question number on each block, false to hide it.
*/
show_question_number?: boolean

/**
* Default `""`
* true to display estimated time to complete a typeform on Welcome screens, false to hide it. Mutually exclusive with show_number_of_submissions
*/
show_time_to_complete?: boolean

/**
* Default `""`
* true to display Typeform brand on the typeform. false to hide Typeform branding on the typeform.
* Hiding Typeform branding is available for PRO+ accounts.
*/
show_typeform_branding?: boolean

/**
* Default `""`
*/
use_lead_qualification?: boolean

/**
* URL where the typeform should redirect upon submission.
*/
Expand Down

0 comments on commit 16ed6f3

Please sign in to comment.