| 480 | |
| 481 | |
| 482 | class FileBlock(Block): |
| 483 | type = "file" |
| 484 | |
| 485 | @property |
| 486 | def attributes(self) -> Set[str]: # type: ignore[override] |
| 487 | return super().attributes.union({"external_id", "source"}) |
| 488 | |
| 489 | def __init__( |
| 490 | self, |
| 491 | *, |
| 492 | external_id: str, |
| 493 | source: str = "remote", |
| 494 | block_id: Optional[str] = None, |
| 495 | **others: dict, |
| 496 | ): |
| 497 | """Displays a remote file. |
| 498 | https://docs.slack.dev/reference/block-kit/blocks/file-block |
| 499 | |
| 500 | Args: |
| 501 | external_id (required): The external unique ID for this file. |
| 502 | source (required): At the moment, source will always be remote for a remote file. |
| 503 | block_id: A string acting as a unique identifier for a block. If not specified, one will be generated. |
| 504 | Maximum length for this field is 255 characters. |
| 505 | block_id should be unique for each message and each iteration of a message. |
| 506 | If a message is updated, use a new block_id. |
| 507 | """ |
| 508 | super().__init__(type=self.type, block_id=block_id) |
| 509 | show_unknown_key_warning(self, others) |
| 510 | |
| 511 | self.external_id = external_id |
| 512 | self.source = source |
| 513 | |
| 514 | |
| 515 | class CallBlock(Block): |
no outgoing calls