wxc_sdk.attachment_actions package

Attachment actions API

class wxc_sdk.attachment_actions.AttachmentActionsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

Users create attachment actions by interacting with message attachments such as clicking on a submit button in a card.

details(action_id: str) AttachmentAction[source]

Shows details for a attachment action, by ID. Specify the attachment action ID in the id URI parameter.

Parameters:

action_id (str) – A unique identifier for the attachment action.

base = 'attachment/actions'
session: RestSession

REST session

class wxc_sdk.attachment_actions.AttachmentAction(*, id: str | None = None, personId: str | None = None, roomId: str | None = None, type: Literal['submit'], messageId: str | None = None, inputs: dict, created: datetime | None = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

id: str | None

A unique identifier for the action.

person_id: str | None

The ID of the person who performed the action.

room_id: str | None

The ID of the room in which the action was performed.

type: Literal['submit']

the type of action performed.

message_id: str | None

The ID of the message which contains the attachment.

inputs: dict

The attachment action’s inputs.

created: datetime | None

The date and time the action was created.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'created': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='created', alias_priority=1), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='id', alias_priority=1), 'inputs': FieldInfo(annotation=dict, required=True, alias='inputs', alias_priority=1), 'message_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='messageId', alias_priority=1), 'person_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='personId', alias_priority=1), 'room_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='roomId', alias_priority=1), 'type': FieldInfo(annotation=Literal['submit'], required=True, alias='type', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class wxc_sdk.attachment_actions.AttachmentActionData(*, id: str, type: Literal['submit'], messageId: str, personId: str, roomId: str, created: datetime, **extra_data: Any)[source]

Bases: WebhookEventData

Data in a webhook “attachmentActions” event

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

resource: ClassVar = 'attachmentActions'
id: str
type: Literal['submit']
message_id: str
person_id: str
room_id: str
created: datetime
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'created': FieldInfo(annotation=datetime, required=True, alias='created', alias_priority=1), 'id': FieldInfo(annotation=str, required=True, alias='id', alias_priority=1), 'message_id': FieldInfo(annotation=str, required=True, alias='messageId', alias_priority=1), 'person_id': FieldInfo(annotation=str, required=True, alias='personId', alias_priority=1), 'room_id': FieldInfo(annotation=str, required=True, alias='roomId', alias_priority=1), 'type': FieldInfo(annotation=Literal['submit'], required=True, alias='type', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.