From e32b3638220a59b59578677682e4ebd9279576c1 Mon Sep 17 00:00:00 2001 From: Matej Lednicky Date: Thu, 12 Oct 2023 14:43:55 +0200 Subject: [PATCH] fix(PR-40): update types (#105) - choice type - new question types --- src/typeform-types.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/typeform-types.ts b/src/typeform-types.ts index 0e0e486..406f5bd 100644 --- a/src/typeform-types.ts +++ b/src/typeform-types.ts @@ -146,6 +146,10 @@ export namespace Typeform { * Choice answer for a properties's choices property of a field. */ export interface Choice { + /** + * Only available when retrieving a form. + */ + id?: string /** * Readable name you can use to reference the answer choice. Available for `multiple_choice` and `picture_choice` types. * Not available for dropdown types. @@ -1031,10 +1035,7 @@ export namespace Typeform { /** * Represents single choice answers for dropdown-like fields. */ - choice?: { - label?: string - other?: string - } + choice?: Omit /** * Represents multiple choice answers. */ @@ -1229,6 +1230,9 @@ export namespace Typeform { * The type of field. */ type Type = + | 'address' + | 'calendly' + | 'contact_info' | 'date' | 'dropdown' | 'email' @@ -1236,17 +1240,20 @@ export namespace Typeform { | 'group' | 'legal' | 'long_text' + | 'matrix' | 'multiple_choice' + | 'nps' | 'number' | 'opinion_scale' | 'payment' + | 'phone_number' | 'picture_choice' + | 'ranking' | 'rating' | 'short_text' | 'statement' | 'website' | 'yes_no' - | 'phone_number' /** * Validations of a field. */