@@ -1652,6 +1652,55 @@ <h1 class="title">Module <code>slack_sdk.models.blocks.block_elements</code></h1
16521652 self.dispatch_action_config = dispatch_action_config
16531653
16541654
1655+ # -------------------------------------------------
1656+ # File Input Element
1657+ # -------------------------------------------------
1658+
1659+
1660+ class FileInputElement(InputInteractiveElement):
1661+ type = "file_input"
1662+
1663+ @property
1664+ def attributes(self) -> Set[str]:
1665+ return super().attributes.union(
1666+ {
1667+ "filetypes",
1668+ "max_files",
1669+ }
1670+ )
1671+
1672+ def __init__(
1673+ self,
1674+ *,
1675+ action_id: Optional[str] = None,
1676+ filetypes: Optional[List[str]] = None,
1677+ max_files: Optional[int] = None,
1678+ **others: dict,
1679+ ):
1680+ """
1681+ https://api.slack.com/reference/block-kit/block-elements#file_input
1682+
1683+ Args:
1684+ action_id (required): An identifier for the input value when the parent modal is submitted.
1685+ You can use this when you receive a view_submission payload to identify the value of the input element.
1686+ Should be unique among all other action_ids in the containing block. Maximum length is 255 characters.
1687+ filetypes: An array of valid file extensions that will be accepted for this element.
1688+ All file extensions will be accepted if filetypes is not specified.
1689+ This validation is provided for convenience only,
1690+ and you should perform your own file type validation based on what you expect to receive.
1691+ max_files: Maximum number of files that can be uploaded for this file_input element.
1692+ Minimum of 1, maximum of 10. Defaults to 10 if not specified.
1693+ """
1694+ super().__init__(
1695+ type=self.type,
1696+ action_id=action_id,
1697+ )
1698+ show_unknown_key_warning(self, others)
1699+
1700+ self.filetypes = filetypes
1701+ self.max_files = max_files
1702+
1703+
16551704# -------------------------------------------------
16561705# Radio Buttons Select
16571706# -------------------------------------------------
@@ -3514,6 +3563,107 @@ <h3>Inherited members</h3>
35143563</ li >
35153564</ ul >
35163565</ dd >
3566+ < dt id ="slack_sdk.models.blocks.block_elements.FileInputElement "> < code class ="flex name class ">
3567+ < span > class < span class ="ident "> FileInputElement</ span > </ span >
3568+ < span > (</ span > < span > *, action_id: Optional[str] = None, filetypes: Optional[List[str]] = None, max_files: Optional[int] = None, **others: dict)</ span >
3569+ </ code > </ dt >
3570+ < dd >
3571+ < div class ="desc "> < p > Block Elements are things that exists inside of your Blocks.
3572+ < a href ="https://api.slack.com/reference/block-kit/block-elements "> https://api.slack.com/reference/block-kit/block-elements</ a > </ p >
3573+ < p > < a href ="https://api.slack.com/reference/block-kit/block-elements#file_input "> https://api.slack.com/reference/block-kit/block-elements#file_input</ a > </ p >
3574+ < h2 id ="args "> Args</ h2 >
3575+ < dl >
3576+ < dt > < strong > < code > action_id</ code > </ strong > : < code > required</ code > </ dt >
3577+ < dd > An identifier for the input value when the parent modal is submitted.
3578+ You can use this when you receive a view_submission payload to identify the value of the input element.
3579+ Should be unique among all other action_ids in the containing block. Maximum length is 255 characters.</ dd >
3580+ < dt > < strong > < code > filetypes</ code > </ strong > </ dt >
3581+ < dd > An array of valid file extensions that will be accepted for this element.
3582+ All file extensions will be accepted if filetypes is not specified.
3583+ This validation is provided for convenience only,
3584+ and you should perform your own file type validation based on what you expect to receive.</ dd >
3585+ < dt > < strong > < code > max_files</ code > </ strong > </ dt >
3586+ < dd > Maximum number of files that can be uploaded for this file_input element.
3587+ Minimum of 1, maximum of 10. Defaults to 10 if not specified.</ dd >
3588+ </ dl > </ div >
3589+ < details class ="source ">
3590+ < summary >
3591+ < span > Expand source code</ span >
3592+ </ summary >
3593+ < pre > < code class ="python "> class FileInputElement(InputInteractiveElement):
3594+ type = "file_input"
3595+
3596+ @property
3597+ def attributes(self) -> Set[str]:
3598+ return super().attributes.union(
3599+ {
3600+ "filetypes",
3601+ "max_files",
3602+ }
3603+ )
3604+
3605+ def __init__(
3606+ self,
3607+ *,
3608+ action_id: Optional[str] = None,
3609+ filetypes: Optional[List[str]] = None,
3610+ max_files: Optional[int] = None,
3611+ **others: dict,
3612+ ):
3613+ """
3614+ https://api.slack.com/reference/block-kit/block-elements#file_input
3615+
3616+ Args:
3617+ action_id (required): An identifier for the input value when the parent modal is submitted.
3618+ You can use this when you receive a view_submission payload to identify the value of the input element.
3619+ Should be unique among all other action_ids in the containing block. Maximum length is 255 characters.
3620+ filetypes: An array of valid file extensions that will be accepted for this element.
3621+ All file extensions will be accepted if filetypes is not specified.
3622+ This validation is provided for convenience only,
3623+ and you should perform your own file type validation based on what you expect to receive.
3624+ max_files: Maximum number of files that can be uploaded for this file_input element.
3625+ Minimum of 1, maximum of 10. Defaults to 10 if not specified.
3626+ """
3627+ super().__init__(
3628+ type=self.type,
3629+ action_id=action_id,
3630+ )
3631+ show_unknown_key_warning(self, others)
3632+
3633+ self.filetypes = filetypes
3634+ self.max_files = max_files</ code > </ pre >
3635+ </ details >
3636+ < h3 > Ancestors</ h3 >
3637+ < ul class ="hlist ">
3638+ < li > < a title ="slack_sdk.models.blocks.block_elements.InputInteractiveElement " href ="#slack_sdk.models.blocks.block_elements.InputInteractiveElement "> InputInteractiveElement</ a > </ li >
3639+ < li > < a title ="slack_sdk.models.blocks.block_elements.InteractiveElement " href ="#slack_sdk.models.blocks.block_elements.InteractiveElement "> InteractiveElement</ a > </ li >
3640+ < li > < a title ="slack_sdk.models.blocks.block_elements.BlockElement " href ="#slack_sdk.models.blocks.block_elements.BlockElement "> BlockElement</ a > </ li >
3641+ < li > < a title ="slack_sdk.models.basic_objects.JsonObject " href ="../basic_objects.html#slack_sdk.models.basic_objects.JsonObject "> JsonObject</ a > </ li >
3642+ < li > < a title ="slack_sdk.models.basic_objects.BaseObject " href ="../basic_objects.html#slack_sdk.models.basic_objects.BaseObject "> BaseObject</ a > </ li >
3643+ </ ul >
3644+ < h3 > Class variables</ h3 >
3645+ < dl >
3646+ < dt id ="slack_sdk.models.blocks.block_elements.FileInputElement.type "> < code class ="name "> var < span class ="ident "> type</ span > </ code > </ dt >
3647+ < dd >
3648+ < div class ="desc "> </ div >
3649+ </ dd >
3650+ </ dl >
3651+ < h3 > Inherited members</ h3 >
3652+ < ul class ="hlist ">
3653+ < li > < code > < b > < a title ="slack_sdk.models.blocks.block_elements.InputInteractiveElement " href ="#slack_sdk.models.blocks.block_elements.InputInteractiveElement "> InputInteractiveElement</ a > </ b > </ code > :
3654+ < ul class ="hlist ">
3655+ < li > < code > < a title ="slack_sdk.models.blocks.block_elements.InputInteractiveElement.get_non_null_attributes " href ="../basic_objects.html#slack_sdk.models.basic_objects.JsonObject.get_non_null_attributes "> get_non_null_attributes</ a > </ code > </ li >
3656+ < li > < code > < a title ="slack_sdk.models.blocks.block_elements.InputInteractiveElement.to_dict " href ="../basic_objects.html#slack_sdk.models.basic_objects.JsonObject.to_dict "> to_dict</ a > </ code > </ li >
3657+ < li > < code > < a title ="slack_sdk.models.blocks.block_elements.InputInteractiveElement.validate_json " href ="../basic_objects.html#slack_sdk.models.basic_objects.JsonObject.validate_json "> validate_json</ a > </ code > </ li >
3658+ </ ul >
3659+ </ li >
3660+ < li > < code > < b > < a title ="slack_sdk.models.blocks.block_elements.InteractiveElement " href ="#slack_sdk.models.blocks.block_elements.InteractiveElement "> InteractiveElement</ a > </ b > </ code > :
3661+ < ul class ="hlist ">
3662+ < li > < code > < a title ="slack_sdk.models.blocks.block_elements.InteractiveElement.attributes " href ="#slack_sdk.models.blocks.block_elements.InteractiveElement.attributes "> attributes</ a > </ code > </ li >
3663+ </ ul >
3664+ </ li >
3665+ </ ul >
3666+ </ dd >
35173667< dt id ="slack_sdk.models.blocks.block_elements.ImageElement "> < code class ="flex name class ">
35183668< span > class < span class ="ident "> ImageElement</ span > </ span >
35193669< span > (</ span > < span > *, image_url: Optional[str] = None, alt_text: Optional[str] = None, **others: dict)</ span >
@@ -3700,6 +3850,7 @@ <h3>Subclasses</h3>
37003850< li > < a title ="slack_sdk.models.blocks.block_elements.EmailInputElement " href ="#slack_sdk.models.blocks.block_elements.EmailInputElement "> EmailInputElement</ a > </ li >
37013851< li > < a title ="slack_sdk.models.blocks.block_elements.ExternalDataMultiSelectElement " href ="#slack_sdk.models.blocks.block_elements.ExternalDataMultiSelectElement "> ExternalDataMultiSelectElement</ a > </ li >
37023852< li > < a title ="slack_sdk.models.blocks.block_elements.ExternalDataSelectElement " href ="#slack_sdk.models.blocks.block_elements.ExternalDataSelectElement "> ExternalDataSelectElement</ a > </ li >
3853+ < li > < a title ="slack_sdk.models.blocks.block_elements.FileInputElement " href ="#slack_sdk.models.blocks.block_elements.FileInputElement "> FileInputElement</ a > </ li >
37033854< li > < a title ="slack_sdk.models.blocks.block_elements.NumberInputElement " href ="#slack_sdk.models.blocks.block_elements.NumberInputElement "> NumberInputElement</ a > </ li >
37043855< li > < a title ="slack_sdk.models.blocks.block_elements.PlainTextInputElement " href ="#slack_sdk.models.blocks.block_elements.PlainTextInputElement "> PlainTextInputElement</ a > </ li >
37053856< li > < a title ="slack_sdk.models.blocks.block_elements.RadioButtonsElement " href ="#slack_sdk.models.blocks.block_elements.RadioButtonsElement "> RadioButtonsElement</ a > </ li >
@@ -5675,6 +5826,12 @@ <h4><code><a title="slack_sdk.models.blocks.block_elements.ExternalDataSelectEle
56755826</ ul >
56765827</ li >
56775828< li >
5829+ < h4 > < code > < a title ="slack_sdk.models.blocks.block_elements.FileInputElement " href ="#slack_sdk.models.blocks.block_elements.FileInputElement "> FileInputElement</ a > </ code > </ h4 >
5830+ < ul class ="">
5831+ < li > < code > < a title ="slack_sdk.models.blocks.block_elements.FileInputElement.type " href ="#slack_sdk.models.blocks.block_elements.FileInputElement.type "> type</ a > </ code > </ li >
5832+ </ ul >
5833+ </ li >
5834+ < li >
56785835< h4 > < code > < a title ="slack_sdk.models.blocks.block_elements.ImageElement " href ="#slack_sdk.models.blocks.block_elements.ImageElement "> ImageElement</ a > </ code > </ h4 >
56795836< ul class ="">
56805837< li > < code > < a title ="slack_sdk.models.blocks.block_elements.ImageElement.alt_text_max_length " href ="#slack_sdk.models.blocks.block_elements.ImageElement.alt_text_max_length "> alt_text_max_length</ a > </ code > </ li >
0 commit comments