CreateImportEntity¶
在导入登记簿中跟踪外部条目(Linear 问题、Notion 页面、Slack 频道)。使用状态 staged 在创建任何内容之前提议导入某一条目;仅当要记录已根据该条目创建的 Macro 实体时,才使用状态 imported(并附带 entityId)。响应会告诉你该条目是否已被用户或队友导入——在这种情况下,切勿创建重复条目;而是引导用户查看现有实体。
参数¶
| Parameter | Type | Required | Description |
|---|---|---|---|
source |
"linear" | "jira" | "notion" | "slack" |
是 | 可从中导入条目的外部系统。 |
foreignId |
string | 是 | 条目在源系统中的稳定 id:Linear 问题标识符(例如 ENG-142)、Notion 页面 URL 或 id,或 Slack 频道 id(例如 C0123456789,缺失时回退到频道名称)。 |
status |
"staged" | "imported" |
是 | 由 [CreateImportEntity] 接受的状态值。 |
metadata |
any | 是 | 描述条目的元数据。Linear:{identifier, title, description?, status?, priority?, assignee?, assignee_email?, url?}。Notion:{title, url?, summary?} — 切勿包含页面内容。Slack:{name, channel_id?, purpose?, participants?: [{name, email?}]}。 |
entityId |
string | 否 | 你创建的 Macro 实体的 id,当状态为 imported 时为必填。实体类型由 source 固定:linear → task,notion → md(文档),slack → channel。 |
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 macro3/macro