Skip to content

TypeformClient

Attributes

ListFormsResponseOld module-attribute

ListFormsResponseOld = List[Dict[str, Any]]

TRIGGER_OPERATIONS module-attribute

TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'NewResponseWebhook_V2': {'operation_id': 'NewResponseWebhook_V2', 'path': '/{connectionId}/v2/forms/{form_id}/webhooks/{tag}', 'method': 'post', 'required_parameters': ['form_id', 'tag', 'body'], 'callback_payload_type': 'WebhookCreationResponse'}}

Classes

NewResponseWebhookInput dataclass

NewResponseWebhookInput(url: str, enabled: bool)

When a response is submitted

Attributes

url instance-attribute
url: str

Webhook URL.

enabled instance-attribute
enabled: bool

Yes if you want to send responses to the webhook immediately. Otherwise, no.

WebhookCreationResponse dataclass

WebhookCreationResponse(id: str, *, form_id: Optional[str] = None, tag: Optional[str] = None, url: Optional[str] = None, enabled: Optional[bool] = None, created_at: Optional[str] = None, updated_at: Optional[str] = None)

Response for When a response is submitted

Attributes

id instance-attribute
id: str

Unique ID of the webhook

form_id class-attribute instance-attribute
form_id: Optional[str] = dataclass_field(default=None, kw_only=True)

Unique ID of the typeform

tag class-attribute instance-attribute
tag: Optional[str] = dataclass_field(default=None, kw_only=True)

Unique name you want to use for the webhook

url class-attribute instance-attribute
url: Optional[str] = dataclass_field(default=None, kw_only=True)

Webhook URL

enabled class-attribute instance-attribute
enabled: Optional[bool] = dataclass_field(default=None, kw_only=True)

True if you want to send responses to the webhook immediately. Otherwise, false.

created_at class-attribute instance-attribute
created_at: Optional[str] = dataclass_field(default=None, kw_only=True)

Date and time when webhook was created. In ISO 8601 format, UTC time, to the second, with T as a delimiter between the date and time.

updated_at class-attribute instance-attribute
updated_at: Optional[str] = dataclass_field(default=None, kw_only=True)

Date of last update to webhook. In ISO 8601 format, UTC time, to the second, with T as a delimeter between the date and time.

ListFormsResponse dataclass

ListFormsResponse(*, total_items: Optional[int] = None, page_count: Optional[int] = None, items: Optional[List[Dict[str, Any]]] = None)

Response for List forms

Attributes

total_items class-attribute instance-attribute
total_items: Optional[int] = dataclass_field(default=None, kw_only=True)

Total number of forms.

page_count class-attribute instance-attribute
page_count: Optional[int] = dataclass_field(default=None, kw_only=True)

Number of pages of results.

items class-attribute instance-attribute
items: Optional[List[Dict[str, Any]]] = dataclass_field(default=None, kw_only=True)

Forms in response.

ResponseList dataclass

ResponseList(*, responses: Optional[List[Item | Mapping[str, Any]]] = None)

Definition: ResponseList

Item dataclass

Item(*, item_internal_id: Optional[str] = None)

Definition: Item

ItemNew dataclass

ItemNew(*, item_internal_id: Optional[str] = None)

Definition: Item-New

WebhookPayload dataclass

WebhookPayload(event_id: str, event_type: str, *, form_response: Optional[Dict[str, Any]] = None)

Definition: WebhookPayload

Attributes

event_id instance-attribute
event_id: str

Unique ID for the webhook. Automatically assigned by Typeform.

event_type instance-attribute
event_type: str

Reason the webhook is being sent.

form_response class-attribute instance-attribute
form_response: Optional[Dict[str, Any]] = dataclass_field(default=None, kw_only=True)

Object that contains information about the typeform and account associated with the webhook.

TypeformClient

TypeformClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)

Bases: ConnectorClientBase

Typed client for typeform connector.

Initialize a TypeformClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
credential AsyncTokenCredential | AzureKeyCredential

Caller-owned Azure Core credential.

required
max_retry_attempts int

The maximum number of request attempts.

3
timeout float

The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines.

30.0
use_exponential_backoff bool

Whether retries use exponential backoff.

True
initial_retry_delay_seconds float

The initial retry delay in seconds.

0.5
maximum_retry_delay_seconds float

The maximum retry delay in seconds.

120.0
retry_jitter_factor float

The jitter fraction applied to retry delays.

0.1
retry_unsafe_http_methods bool

Whether unsafe HTTP methods may be retried.

False
transport Optional[AsyncHttpTransport]

Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle.

None
**kwargs Any

Optional Azure Core pipeline policy settings.

{}

Methods:

list_forms
list_forms(*, search: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, workspace_id: Optional[str] = None, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

List forms

Retrieves a list of JSON descriptions for all forms in your Typeform account (public and private).

Returns a single-page Azure Core async collection.

Swagger operation ID: ListForms_V2.

Parameters:

Name Type Description Default
search Optional[str]

Returns items that contain the specified string.

None
page Optional[int]

The page of results to retrieve. Default is the first page.

None
page_size Optional[int]

Number of results to retrieve per page. Default is 10. Maximum is 200.

None
workspace_id Optional[str]

Retrieve typeforms for the specified workspace.

None
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.

get_schema async
get_schema(form_id: str, *, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> dict[str, Any] | None

Get schema

Get schema

Swagger operation ID: GetSchema_V3.

Parameters:

Name Type Description Default
form_id str

Form.

required
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
dict[str, Any] | None

dict[str, Any] | None: The connector operation result.

Raises:

Type Description
ConnectorException

If the connector request fails.