[docs]@dataclasses.dataclass(frozen=True)classNodeExtensionAttrs(Base):""" Attributes for :class:`NodeExtension`. :param extensionKey: Required. The key that identifies the specific extension within an app (e.g., "my-macro-key"). :param extensionType: Required. The type identifier for the extension, typically in the format "com.atlassian.confluence.macro.core" or similar. :param parameters: Optional. Custom parameters passed to the extension as a dictionary of key-value pairs. The structure depends on the specific extension. :param text: Optional. Fallback text content for the extension. :param layout: Optional. The layout mode for the extension display. One of "wide", "full-width", or "default". :param localId: Optional. A unique identifier for the node. """extensionKey:str=REQextensionType:str=REQparameters:T.Any=OPTtext:str=OPTlayout:T.Literal["wide","full-width","default"]=OPTlocalId:str=OPT
[docs]@dataclasses.dataclass(frozen=True)classNodeExtension(BaseNode):""" An extension node in ADF representing a block-level app extension. Extension nodes are used to embed third-party app functionality within Confluence pages. They represent macros and other block-level integrations from Atlassian Marketplace apps or custom Forge/Connect apps. Common use cases include: - Confluence macros (Table of Contents, Code Block, etc.) - Third-party app integrations (Jira issues, diagrams, etc.) - Custom Forge or Connect app extensions The extension is identified by its ``extensionType`` (the app identifier) and ``extensionKey`` (the specific extension within that app). Reference: https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/extension/ """type:str=TypeEnum.extension.valueattrs:NodeExtensionAttrs=REQmarks:list=OPT
[docs]defto_markdown(self,ignore_error:bool=False,)->str:# Extensions don't have a standard markdown representation# Return a placeholder with extension infoext_key=self.attrs.extensionKeyext_type=self.attrs.extensionTypeifisinstance(self.attrs.text,str)andself.attrs.text:returnf"[Extension: {ext_key}] {self.attrs.text}"returnf"[Extension: {ext_type}/{ext_key}]"