@adminide-stack/yantra-mobile 12.0.142-alpha.0 → 12.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/lib/features/attachments/displayUserMessageText.js +2 -2
  2. package/lib/features/attachments/displayUserMessageText.js.map +1 -1
  3. package/lib/features/devices/bodyComposition.js +116 -0
  4. package/lib/features/devices/bodyComposition.js.map +1 -0
  5. package/lib/features/devices/readings.js.map +1 -1
  6. package/lib/features/devices/session.js +22 -2
  7. package/lib/features/devices/session.js.map +1 -1
  8. package/lib/features/notion/NotionAgentPanel.js +987 -0
  9. package/lib/features/notion/NotionAgentPanel.js.map +1 -0
  10. package/lib/features/notion/NotionAskAiSheet.js +362 -0
  11. package/lib/features/notion/NotionAskAiSheet.js.map +1 -0
  12. package/lib/features/notion/NotionBlockView.js +4 -3
  13. package/lib/features/notion/NotionBlockView.js.map +1 -1
  14. package/lib/features/notion/NotionConnectionsSheet.js +47 -13
  15. package/lib/features/notion/NotionConnectionsSheet.js.map +1 -1
  16. package/lib/features/notion/NotionPageView.js +68 -8
  17. package/lib/features/notion/NotionPageView.js.map +1 -1
  18. package/lib/features/notion/NotionSidebarSections.js +1 -1
  19. package/lib/features/notion/NotionSidebarSections.js.map +1 -1
  20. package/lib/features/notion/NotionWorkspaceView.js +14 -9
  21. package/lib/features/notion/NotionWorkspaceView.js.map +1 -1
  22. package/lib/features/notion/database/DatabaseCells.js +3 -1
  23. package/lib/features/notion/database/DatabaseCells.js.map +1 -1
  24. package/lib/features/notion/database/DatabaseDateLayouts.js +1 -1
  25. package/lib/features/notion/database/DatabaseDateLayouts.js.map +1 -1
  26. package/lib/features/notion/database/NotionDatabaseView.js +1 -1
  27. package/lib/features/notion/database/NotionDatabaseView.js.map +1 -1
  28. package/lib/features/notion/notionAgentRunStatus.js +2 -2
  29. package/lib/features/notion/notionAgentRunStatus.js.map +1 -1
  30. package/lib/features/notion/notionAgentRuns.js +57 -0
  31. package/lib/features/notion/notionAgentRuns.js.map +1 -0
  32. package/lib/features/notion/notionAiContext.js +91 -0
  33. package/lib/features/notion/notionAiContext.js.map +1 -0
  34. package/lib/features/notion/notionConnections.js +42 -4
  35. package/lib/features/notion/notionConnections.js.map +1 -1
  36. package/lib/features/notion/notionDocuments.js +61 -1
  37. package/lib/features/notion/notionDocuments.js.map +1 -1
  38. package/lib/features/notion/notionNotesAgent.js +173 -3
  39. package/lib/features/notion/notionNotesAgent.js.map +1 -1
  40. package/lib/features/notion/notionPageKinds.js +1 -1
  41. package/lib/features/webbuilder/WebBuilderExperience.js +229 -97
  42. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  43. package/lib/features/webbuilder/buildFragments.js +33 -7
  44. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  45. package/lib/features/webbuilder/buildJob.js +2 -2
  46. package/lib/features/webbuilder/buildJob.js.map +1 -1
  47. package/lib/features/webbuilder/codeFiles.js +18 -1
  48. package/lib/features/webbuilder/codeFiles.js.map +1 -1
  49. package/lib/features/webbuilder/components/BottomTabs.js.map +1 -1
  50. package/lib/features/webbuilder/components/CodeView.js +134 -56
  51. package/lib/features/webbuilder/components/CodeView.js.map +1 -1
  52. package/lib/features/webbuilder/components/Composer.js +2 -2
  53. package/lib/features/webbuilder/components/Composer.js.map +1 -1
  54. package/lib/features/webbuilder/components/PreviewFrame.js +19 -3
  55. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  56. package/lib/features/webbuilder/components/PreviewScreen.js +310 -46
  57. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  58. package/lib/features/webbuilder/components/ProjectChat.js +141 -12
  59. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  60. package/lib/features/webbuilder/components/ProjectSheets.js +792 -0
  61. package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -0
  62. package/lib/features/webbuilder/components/ProjectsScreen.js +14 -2
  63. package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
  64. package/lib/features/webbuilder/components/PublishSheet.js +914 -58
  65. package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
  66. package/lib/features/webbuilder/components/TemplateCard.js +9 -6
  67. package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
  68. package/lib/features/webbuilder/components/TemplatesSheet.js +5 -17
  69. package/lib/features/webbuilder/components/TemplatesSheet.js.map +1 -1
  70. package/lib/features/webbuilder/connectorTemplates.js +171 -0
  71. package/lib/features/webbuilder/connectorTemplates.js.map +1 -0
  72. package/lib/features/webbuilder/fileTree.js +163 -0
  73. package/lib/features/webbuilder/fileTree.js.map +1 -0
  74. package/lib/features/webbuilder/followUps.js +67 -0
  75. package/lib/features/webbuilder/followUps.js.map +1 -0
  76. package/lib/features/webbuilder/previewProbe.js +49 -0
  77. package/lib/features/webbuilder/previewProbe.js.map +1 -0
  78. package/lib/features/webbuilder/previewRoutes.js +156 -0
  79. package/lib/features/webbuilder/previewRoutes.js.map +1 -0
  80. package/lib/features/webbuilder/projectTools.js +341 -0
  81. package/lib/features/webbuilder/projectTools.js.map +1 -0
  82. package/lib/features/webbuilder/publishTools.js +475 -0
  83. package/lib/features/webbuilder/publishTools.js.map +1 -0
  84. package/lib/features/webbuilder/sleepNotice.js +13 -0
  85. package/lib/features/webbuilder/sleepNotice.js.map +1 -0
  86. package/lib/features/webbuilder/stepLabels.js +37 -7
  87. package/lib/features/webbuilder/stepLabels.js.map +1 -1
  88. package/lib/features/webbuilder/studioCatalog.js +5 -1
  89. package/lib/features/webbuilder/studioCatalog.js.map +1 -1
  90. package/lib/features/webbuilder/templateCatalog.js +140 -0
  91. package/lib/features/webbuilder/templateCatalog.js.map +1 -0
  92. package/lib/features/webbuilder/webbuilderPrompts.js +31 -5
  93. package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -1
  94. package/lib/features/webbuilder/workflow.js +8 -4
  95. package/lib/features/webbuilder/workflow.js.map +1 -1
  96. package/lib/screens/Devices/index.js +205 -3
  97. package/lib/screens/Devices/index.js.map +1 -1
  98. package/lib/screens/WebBuilderNative/codeWorkspaceApi.js +9 -6
  99. package/lib/screens/WebBuilderNative/codeWorkspaceApi.js.map +1 -1
  100. package/lib/screens/WebBuilderNative/index.js +1 -1
  101. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  102. package/lib/screens/WebBuilderNative/keepAlive.js +53 -3
  103. package/lib/screens/WebBuilderNative/keepAlive.js.map +1 -1
  104. package/lib/screens/WebBuilderNative/unreachableRetry.js +23 -0
  105. package/lib/screens/WebBuilderNative/unreachableRetry.js.map +1 -0
  106. package/lib/screens/WebBuilderNative/useConnectorTemplates.js +37 -0
  107. package/lib/screens/WebBuilderNative/useConnectorTemplates.js.map +1 -0
  108. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js +6 -0
  109. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js.map +1 -1
  110. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +302 -40
  111. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  112. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js +2 -2
  113. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js.map +1 -1
  114. package/lib/screens/WebBuilderNative/versionUndo.js +1 -1
  115. package/lib/screens/WebBuilderNative/versionUndo.js.map +1 -1
  116. package/lib/screens/WebBuilderNative/webbuilderTransport.js +147 -77
  117. package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
  118. package/package.json +4 -4
@@ -0,0 +1,91 @@
1
+ function withNotionContext(text, ctx) {
2
+ if (isControlText(text)) return text;
3
+ const preamble = notionContextPreamble(ctx);
4
+ return preamble ? `${preamble}
5
+
6
+ ${text}` : text;
7
+ }
8
+ function isControlText(text) {
9
+ return /^\s*\[[A-Z_]+[:\]]/.test(text) || /^\s*\*\*[^*]+:\*\*/.test(text);
10
+ }
11
+ function clean(s, max = 120) {
12
+ const t = String(s != null ? s : "").replace(/\s+/g, " ").replace(/[[\]]/g, "").replace(/"/g, "'").trim();
13
+ return t.length > max ? `${t.slice(0, max - 1)}\u2026` : t;
14
+ }
15
+ function attachmentLine(list, openPageId) {
16
+ const seen = /* @__PURE__ */ new Set();
17
+ const items = (list != null ? list : []).filter((a) => {
18
+ if (!(a == null ? void 0 : a.id) || seen.has(a.id) || a.id === openPageId) return false;
19
+ seen.add(a.id);
20
+ return true;
21
+ });
22
+ if (!items.length) return null;
23
+ return `[Attached: ${items.map((a) => `${a.kind} "${clean(a.title) || "Untitled"}" (id ${a.id})`).join("; ")}]`;
24
+ }
25
+ function selectionLine(sel) {
26
+ var _a;
27
+ const ids = ((_a = sel == null ? void 0 : sel.blockIds) != null ? _a : []).filter(Boolean);
28
+ const text = clean(sel == null ? void 0 : sel.text, 500);
29
+ if (!ids.length && !text) return null;
30
+ const head = ids.length ? `${ids.length} block${ids.length === 1 ? "" : "s"} (ids ${ids.join(", ")})` : "text";
31
+ return `[Selection: ${head}${text ? `: "${text}"` : ""}]`;
32
+ }
33
+ const REPLY_RULE = "After creating or changing a page, reply in one or two short sentences with a link to it as [Title](/notion/page/<id>) \u2014 do not describe its sections, tables or columns; mention only what needs the user's attention (a missing owner, a judgement call).";
34
+ function workspaceLine(ctx) {
35
+ if (!ctx.workspaceId) return null;
36
+ const name = ctx.workspaceName ? `"${clean(ctx.workspaceName)}"` : "this workspace";
37
+ return `[Workspace: create new pages and databases in ${name} \u2014 pass "workspaceId": "${ctx.workspaceId}" to yantra-notion create actions unless the user names another workspace. ${REPLY_RULE}]`;
38
+ }
39
+ function describeSources(sources) {
40
+ var _a;
41
+ switch (sources == null ? void 0 : sources.scope) {
42
+ case "workspace":
43
+ return "this workspace only (no connected apps)";
44
+ case "page":
45
+ return "only the open page and the attached items";
46
+ case "connectors": {
47
+ const names = ((_a = sources.connectors) != null ? _a : []).map((c) => clean(c, 60)).filter(Boolean);
48
+ return names.length ? `connected apps only (${names.join(", ")})` : "connected apps only";
49
+ }
50
+ default:
51
+ return null;
52
+ }
53
+ }
54
+ function actModeLine(mode) {
55
+ return mode === "auto" ? "[Mode: act automatically \u2014 make the changes the task needs (workspace or connected apps) without asking first; say what you changed.]" : "[Mode: ask before acting \u2014 reading and searching are fine, but before you create, change, send or delete anything (workspace or connected apps) describe the exact change and ask for approval with an ask-user question; act only after the user approves.]";
56
+ }
57
+ function notionContextPreamble(ctx) {
58
+ if (!ctx) return "";
59
+ const lines = [];
60
+ const parts = [];
61
+ if (ctx.pageId) parts.push(`open page "${clean(ctx.pageTitle) || "Untitled"}" (id ${ctx.pageId})`);
62
+ if (ctx.workspaceId) parts.push(`workspace ${ctx.workspaceName ? `"${clean(ctx.workspaceName)}" ` : ""}(id ${ctx.workspaceId})`);
63
+ const extra = [workspaceLine(ctx), attachmentLine(ctx.attachments, ctx.pageId), selectionLine(ctx.selection), ((s) => s ? `[Sources: ${s}]` : null)(describeSources(ctx.sources)), ctx.actMode ? actModeLine(ctx.actMode) : null].filter((l) => Boolean(l));
64
+ if (!parts.length && !extra.length) return "";
65
+ lines.push(`[Notes surface context: ${parts.length ? parts.join(", ") : "no page open"}. Use the yantra-notion skill for workspace actions.]`);
66
+ lines.push(...extra);
67
+ return lines.join("\n");
68
+ }
69
+ function stripNotionContext(text) {
70
+ const m = /^\[Notes surface context: [^\n]*\]\n(?:\[(?:Workspace|Attached|Selection|Sources|Mode): [^\n]*\]\n)*\n/.exec(text);
71
+ return m ? text.slice(m[0].length) : text;
72
+ }
73
+ const NOTION_AI_PROMPTS = {
74
+ summarize: (c) => `Summarize my notion page "${c.pageTitle || "Untitled"}" (page id ${c.pageId}) into its key points. Read the page first with the yantra-notion connector; do not change it unless I ask.`,
75
+ continueWriting: (c) => `Continue writing my notion page "${c.pageTitle || "Untitled"}" (page id ${c.pageId}): read it with the yantra-notion connector, then append two or three paragraphs that continue naturally from the last block, in the same tone. Append them to the page and tell me what you added.`,
76
+ actionItems: (c) => `Find the action items in my notion page "${c.pageTitle || "Untitled"}" (page id ${c.pageId}) and append them to the end of the page as to-do blocks under an "Action items" heading.`,
77
+ askAbout: (c) => `About my notion page "${c.pageTitle || "Untitled"}" (page id ${c.pageId}): `
78
+ };
79
+ const AI_SUGGESTIONS = [{
80
+ label: "Summarize this page",
81
+ text: "Summarize the page I have open into its key points."
82
+ }, {
83
+ label: "Build a project tracker",
84
+ text: "Build a project tracker database with Status, Due, Priority and Assigned to columns, and add 10 sample tasks."
85
+ }, {
86
+ label: "What changed this week?",
87
+ text: "What changed in my workspace this week?"
88
+ }, {
89
+ label: "Draft meeting notes",
90
+ text: "Create a meeting-notes page for today with agenda, notes and action items."
91
+ }];export{AI_SUGGESTIONS,NOTION_AI_PROMPTS,REPLY_RULE,actModeLine,describeSources,isControlText,notionContextPreamble,stripNotionContext,withNotionContext};//# sourceMappingURL=notionAiContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notionAiContext.js","sources":["../../../src/features/notion/notionAiContext.ts"],"sourcesContent":["// Ported from forms-stack surfaces/notion/src/chat/withNotionContext.ts + services.ts (context types)\n// and notion-api browser actions/notionAiBus.ts (prompts) + components/ai/AiEmptyState.tsx (suggestions).\n// Keep in step with the web so a mobile Ask AI turn grounds the agent the same way.\n\n/** What the page/workspace the user is looking at — sent with each assistant turn. */\nexport interface NotionChatContext {\n workspaceId?: string | null;\n workspaceName?: string | null;\n pageId?: string | null;\n pageTitle?: string | null;\n /** Pages / databases / blocks the user added with \"@ Add context\". */\n attachments?: NotionChatContextAttachment[];\n /** Blocks the user had selected when they asked. */\n selection?: { blockIds: string[]; text?: string } | null;\n /** Where the agent may look (\"All sources\" picker); omitted / `all` = no restriction. */\n sources?: NotionChatSources | null;\n /**\n * How the assistant acts on changes (the composer's mode switch, like Claude's): `ask` = describe\n * the change and wait for approval before creating / changing / sending / deleting anything,\n * in the workspace or a connected app; `auto` = make changes directly. Omitted = `ask`.\n */\n actMode?: NotionChatActMode;\n}\n\nexport type NotionChatActMode = 'ask' | 'auto';\n\n/** One \"@ Add context\" chip. */\nexport interface NotionChatContextAttachment {\n kind: 'page' | 'database' | 'block';\n id: string;\n title: string;\n}\n\n/** The composer's sources picker. `connectors` lists the connector names when scope is `connectors`. */\nexport interface NotionChatSources {\n scope: 'all' | 'workspace' | 'page' | 'connectors';\n connectors?: string[];\n}\n\n/**\n * The context preamble the agent reads with each turn — which page \"this page\" is (so it\n * resolves it by id via yantra-notion instead of asking), what the user attached with\n * \"@ Add context\", what they had selected, and which sources they allowed.\n *\n * [Notes surface context: open page \"Launch\" (id p1), workspace \"Acme\" (id w1). Use the yantra-notion skill for workspace actions.]\n * [Attached: page \"Q4 plan\" (id p2); database \"Tasks\" (id d1)]\n * [Selection: 2 blocks (ids b1, b2): \"the selected text…\"]\n * [Sources: connected apps only (github, slack)]\n *\n * <the user's message>\n *\n * The first line keeps its original format (older agents / skills match it). Control replies\n * ([CONNECTOR_CONNECTED:…], `**question:** answer`) are sent verbatim — the agent matches\n * them exactly.\n */\nexport function withNotionContext(text: string, ctx?: NotionChatContext | null): string {\n if (isControlText(text)) return text;\n const preamble = notionContextPreamble(ctx);\n return preamble ? `${preamble}\\n\\n${text}` : text;\n}\n\n/** Control replies and card answers go to the agent untouched. */\nexport function isControlText(text: string): boolean {\n return /^\\s*\\[[A-Z_]+[:\\]]/.test(text) || /^\\s*\\*\\*[^*]+:\\*\\*/.test(text);\n}\n\n/** Titles go inside quotes on a one-line marker: no newlines, brackets or double quotes. */\nfunction clean(s: string | null | undefined, max = 120): string {\n const t = String(s ?? '')\n .replace(/\\s+/g, ' ')\n .replace(/[[\\]]/g, '')\n .replace(/\"/g, \"'\")\n .trim();\n return t.length > max ? `${t.slice(0, max - 1)}…` : t;\n}\n\nfunction attachmentLine(list: NotionChatContextAttachment[] | undefined, openPageId?: string | null): string | null {\n const seen = new Set<string>();\n const items = (list ?? []).filter((a) => {\n if (!a?.id || seen.has(a.id) || a.id === openPageId) return false;\n seen.add(a.id);\n return true;\n });\n if (!items.length) return null;\n return `[Attached: ${items.map((a) => `${a.kind} \"${clean(a.title) || 'Untitled'}\" (id ${a.id})`).join('; ')}]`;\n}\n\nfunction selectionLine(sel: NotionChatContext['selection']): string | null {\n const ids = (sel?.blockIds ?? []).filter(Boolean);\n const text = clean(sel?.text, 500);\n if (!ids.length && !text) return null;\n const head = ids.length ? `${ids.length} block${ids.length === 1 ? '' : 's'} (ids ${ids.join(', ')})` : 'text';\n return `[Selection: ${head}${text ? `: \"${text}\"` : ''}]`;\n}\n\n/**\n * After a write the user wants the page, not a tour of it: a link opens it in the panel\n * (components/ai/AiConversation → workspaceLinkTarget) and marks it \"New\" in the sidebar.\n */\nexport const REPLY_RULE =\n \"After creating or changing a page, reply in one or two short sentences with a link to it as [Title](/notion/page/<id>) — do not describe its sections, tables or columns; mention only what needs the user's attention (a missing owner, a judgement call).\";\n\n/**\n * Without a workspaceId, yantra-notion creates in the user's DEFAULT workspace — not the one\n * open in Notes (a page asked for in \"Acme Labs\" landed in \"workspace-test\").\n */\nfunction workspaceLine(ctx: NotionChatContext): string | null {\n if (!ctx.workspaceId) return null;\n const name = ctx.workspaceName ? `\"${clean(ctx.workspaceName)}\"` : 'this workspace';\n return `[Workspace: create new pages and databases in ${name} — pass \"workspaceId\": \"${ctx.workspaceId}\" to yantra-notion create actions unless the user names another workspace. ${REPLY_RULE}]`;\n}\n\n/** `null` for the default (all sources) — nothing to say. */\nexport function describeSources(sources: NotionChatSources | null | undefined): string | null {\n switch (sources?.scope) {\n case 'workspace':\n return 'this workspace only (no connected apps)';\n case 'page':\n return 'only the open page and the attached items';\n case 'connectors': {\n const names = (sources.connectors ?? []).map((c) => clean(c, 60)).filter(Boolean);\n return names.length ? `connected apps only (${names.join(', ')})` : 'connected apps only';\n }\n default:\n return null;\n }\n}\n\n/**\n * The approval mode line. Ask (the default): reads are free, every change waits for the user's\n * OK through an ask-user card. Auto: changes go ahead (deletes still say what went away).\n */\nexport function actModeLine(mode: NotionChatActMode | null | undefined): string {\n return mode === 'auto'\n ? '[Mode: act automatically — make the changes the task needs (workspace or connected apps) without asking first; say what you changed.]'\n : '[Mode: ask before acting — reading and searching are fine, but before you create, change, send or delete anything (workspace or connected apps) describe the exact change and ask for approval with an ask-user question; act only after the user approves.]';\n}\n\n/** The preamble lines for `ctx`, or '' when there is nothing to say. */\nexport function notionContextPreamble(ctx?: NotionChatContext | null): string {\n if (!ctx) return '';\n const lines: string[] = [];\n const parts: string[] = [];\n if (ctx.pageId) parts.push(`open page \"${clean(ctx.pageTitle) || 'Untitled'}\" (id ${ctx.pageId})`);\n if (ctx.workspaceId)\n parts.push(`workspace ${ctx.workspaceName ? `\"${clean(ctx.workspaceName)}\" ` : ''}(id ${ctx.workspaceId})`);\n const extra = [\n workspaceLine(ctx),\n attachmentLine(ctx.attachments, ctx.pageId),\n selectionLine(ctx.selection),\n ((s) => (s ? `[Sources: ${s}]` : null))(describeSources(ctx.sources)),\n ctx.actMode ? actModeLine(ctx.actMode) : null,\n ].filter((l): l is string => Boolean(l));\n if (!parts.length && !extra.length) return '';\n lines.push(\n `[Notes surface context: ${parts.length ? parts.join(', ') : 'no page open'}. Use the yantra-notion skill for workspace actions.]`,\n );\n lines.push(...extra);\n return lines.join('\\n');\n}\n\n/**\n * Drop the preamble from a stored user turn (the host transcript keeps what was sent) so the\n * bubble shows only what the user typed.\n */\nexport function stripNotionContext(text: string): string {\n const m =\n /^\\[Notes surface context: [^\\n]*\\]\\n(?:\\[(?:Workspace|Attached|Selection|Sources|Mode): [^\\n]*\\]\\n)*\\n/.exec(\n text,\n );\n return m ? text.slice(m[0].length) : text;\n}\n\nexport interface NotionAiPageContext {\n pageId: string;\n pageTitle: string;\n workspaceId?: string | null;\n}\n\n/** Prompt builders shared by the page menu, slash menu and command palette. */\nexport const NOTION_AI_PROMPTS = {\n summarize: (c: NotionAiPageContext) =>\n `Summarize my notion page \"${c.pageTitle || 'Untitled'}\" (page id ${c.pageId}) into its key points. Read the page first with the yantra-notion connector; do not change it unless I ask.`,\n continueWriting: (c: NotionAiPageContext) =>\n `Continue writing my notion page \"${c.pageTitle || 'Untitled'}\" (page id ${c.pageId}): read it with the yantra-notion connector, then append two or three paragraphs that continue naturally from the last block, in the same tone. Append them to the page and tell me what you added.`,\n actionItems: (c: NotionAiPageContext) =>\n `Find the action items in my notion page \"${c.pageTitle || 'Untitled'}\" (page id ${c.pageId}) and append them to the end of the page as to-do blocks under an \"Action items\" heading.`,\n askAbout: (c: NotionAiPageContext) => `About my notion page \"${c.pageTitle || 'Untitled'}\" (page id ${c.pageId}): `,\n};\n\nexport interface NotionAiSuggestion {\n label: string;\n text: string;\n}\n\nexport const AI_SUGGESTIONS: NotionAiSuggestion[] = [\n { label: 'Summarize this page', text: 'Summarize the page I have open into its key points.' },\n {\n label: 'Build a project tracker',\n text: 'Build a project tracker database with Status, Due, Priority and Assigned to columns, and add 10 sample tasks.',\n },\n { label: 'What changed this week?', text: 'What changed in my workspace this week?' },\n {\n label: 'Draft meeting notes',\n text: 'Create a meeting-notes page for today with agenda, notes and action items.',\n },\n];\n"],"names":[],"mappings":"AAyDgB,SAAA,iBAAA,CAAkB,MAAc,GAAwC,EAAA;AACtF,EAAI,IAAA,aAAA,CAAc,IAAI,CAAA,EAAU,OAAA,IAAA;AAChC,EAAM,MAAA,QAAA,GAAW,sBAAsB,GAAG,CAAA;AAC1C,EAAO,OAAA,QAAA,GAAW,GAAG,QAAQ;;AAAA,EAAO,IAAI,CAAK,CAAA,GAAA,IAAA;AAC/C;AAGO,SAAS,cAAc,IAAuB,EAAA;AACnD,EAAA,OAAO,qBAAqB,IAAK,CAAA,IAAI,CAAK,IAAA,oBAAA,CAAqB,KAAK,IAAI,CAAA;AAC1E;AAGA,SAAS,KAAA,CAAM,CAA8B,EAAA,GAAA,GAAM,GAAa,EAAA;AAC9D,EAAA,MAAM,IAAI,MAAO,CAAA,CAAA,IAAA,IAAA,GAAA,CAAA,GAAK,EAAE,CAAA,CAAE,QAAQ,MAAQ,EAAA,GAAG,CAAE,CAAA,OAAA,CAAQ,UAAU,EAAE,CAAA,CAAE,QAAQ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nD,KAAO,EAAA,qBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,KAAO,EAAA,yBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,KAAO,EAAA,yBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,KAAO,EAAA,qBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAC"}
@@ -39,9 +39,47 @@ function connectorDisplayName(name) {
39
39
  return name.replace(/[-_]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (c) => c.toUpperCase());
40
40
  }
41
41
  function requiresCredentials(app) {
42
- var _a;
43
- const methods = ((_a = app.authMethods) != null ? _a : []).map((m) => m.toLowerCase());
44
- return !methods.length || methods.some((m) => m !== "none");
42
+ return !app.id.trim().toLowerCase().startsWith("yantra-");
43
+ }
44
+ function cdeConnectorCatalogUrl(backendOrGraphqlUrl) {
45
+ const backend = backendOrGraphqlUrl.replace(/\/+$/, "").replace(/\/graphql$/, "");
46
+ return `${backend}/api/workflow/cde-connector`;
47
+ }
48
+ function catalogFromWorkflowResponse(body) {
49
+ const list = body == null ? void 0 : body.data;
50
+ if (!Array.isArray(list)) return [];
51
+ const out = [];
52
+ list.forEach((raw) => {
53
+ var _a, _b;
54
+ const c = raw && typeof raw === "object" ? raw : null;
55
+ const id = c ? String((_a = c.name) != null ? _a : "").trim() : "";
56
+ if (!c || !id) return;
57
+ out.push({
58
+ id,
59
+ title: String((_b = c.label) != null ? _b : id),
60
+ description: typeof c.description === "string" ? c.description : null,
61
+ logo: typeof c.logo === "string" && c.logo.trim() ? c.logo.trim() : null
62
+ });
63
+ });
64
+ return out;
65
+ }
66
+ async function fetchConnectorCatalog(url, token, signal) {
67
+ const res = await fetch(url, {
68
+ method: "GET",
69
+ headers: {
70
+ Accept: "application/json",
71
+ Authorization: `Bearer ${token}`
72
+ },
73
+ signal
74
+ });
75
+ let body = null;
76
+ try {
77
+ body = await res.json();
78
+ } catch (e) {
79
+ throw new Error(`Invalid response from the connector catalog (HTTP ${res.status})`);
80
+ }
81
+ if (!res.ok || !(body == null ? void 0 : body.success)) throw new Error((body == null ? void 0 : body.error) || `Couldn't load apps (HTTP ${res.status})`);
82
+ return catalogFromWorkflowResponse(body);
45
83
  }
46
84
  function buildConnectionRows(catalog, credentials) {
47
85
  const rows = /* @__PURE__ */ new Map();
@@ -71,4 +109,4 @@ function buildConnectionRows(catalog, credentials) {
71
109
  rows.set(key, row);
72
110
  });
73
111
  return [...rows.values()].sort((a, b) => Number(b.credentials.length > 0) - Number(a.credentials.length > 0) || a.label.localeCompare(b.label));
74
- }export{buildConnectionRows,connectorDisplayName,connectorNameFromRecord,requiresCredentials,toVaultCredential};//# sourceMappingURL=notionConnections.js.map
112
+ }export{buildConnectionRows,catalogFromWorkflowResponse,cdeConnectorCatalogUrl,connectorDisplayName,connectorNameFromRecord,fetchConnectorCatalog,requiresCredentials,toVaultCredential};//# sourceMappingURL=notionConnections.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notionConnections.js","sources":["../../../src/features/notion/notionConnections.ts"],"sourcesContent":["/**\n * Connections (web components/connector/ConnectionsDialog): every app that needs a credential,\n * and whether the vault holds one for it. The row rules are the web's - credentials are matched\n * to an app by connectorNameFromRecord (web connectorCredentialResolution), connected apps come\n * first, then by name. The phone reads the catalog over GraphQL (integrationConnectors) since it\n * has no web session cookie for the workflow REST catalog.\n *\n * Pure: no RN imports, so it runs under jest as-is.\n */\n\nexport interface CatalogApp {\n id: string;\n title: string;\n description?: string | null;\n logo?: string | null;\n authMethods?: string[] | null;\n}\n\nexport interface VaultCredential {\n id: string;\n name: string;\n connector: string;\n status: string;\n owner?: string;\n lastUsedAt?: string | null;\n createdAt?: string | null;\n}\n\nexport interface ConnectionRow {\n connector: string;\n label: string;\n logo?: string;\n description?: string;\n credentials: VaultCredential[];\n}\n\n/** Web connectorNameFromRecord: which app a vault record belongs to. */\nexport function connectorNameFromRecord(record: Record<string, unknown>): string {\n const metadata = record.metadata as Record<string, unknown> | undefined;\n const formData = record.formData as Record<string, unknown> | undefined;\n const customFields = metadata?.customFields as Record<string, unknown> | undefined;\n return String(\n customFields?.connectorName ||\n customFields?.providerId ||\n metadata?.providerId ||\n formData?.providerId ||\n formData?.provider ||\n '',\n ).trim();\n}\n\nexport function toVaultCredential(r: Record<string, unknown>): VaultCredential {\n return {\n id: String(r.id),\n name: String(r.name ?? ''),\n connector: connectorNameFromRecord(r),\n status: String(r.status ?? ''),\n owner: (r.owner as { username?: string } | null | undefined)?.username,\n lastUsedAt: (r.lastUsedAt as string | null) ?? null,\n createdAt: (r.createdAt as string | null) ?? null,\n };\n}\n\n/** \"google-sheets\" -> \"Google Sheets\" (web connectorDisplayName). */\nexport function connectorDisplayName(name: string): string {\n return name\n .replace(/[-_]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\n/** An app needs a credential unless its only auth method is \"none\". */\nexport function requiresCredentials(app: CatalogApp): boolean {\n const methods = (app.authMethods ?? []).map((m) => m.toLowerCase());\n return !methods.length || methods.some((m) => m !== 'none');\n}\n\n/** Catalog apps that need credentials, plus any app the vault has a credential for (web buildConnectionRows). */\nexport function buildConnectionRows(\n catalog: readonly CatalogApp[],\n credentials: readonly VaultCredential[],\n): ConnectionRow[] {\n const rows = new Map<string, ConnectionRow>();\n catalog.forEach((c) => {\n if (!requiresCredentials(c)) return;\n rows.set(c.id, {\n connector: c.id,\n label: c.title && c.title !== c.id ? c.title : connectorDisplayName(c.id),\n ...(c.logo ? { logo: c.logo } : {}),\n ...(c.description ? { description: c.description } : {}),\n credentials: [],\n });\n });\n credentials.forEach((cred) => {\n const key = cred.connector || cred.name;\n if (!key) return;\n const row = rows.get(key) ?? { connector: key, label: connectorDisplayName(key), credentials: [] };\n row.credentials.push(cred);\n rows.set(key, row);\n });\n return [...rows.values()].sort(\n (a, b) => Number(b.credentials.length > 0) - Number(a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AA,KAAA,EACpE,EAAE,IAAO,GAAA;AAAA,MACX,MAAM,CAAE,CAAA;AAAA,KACN,GAAA,EACA,CAAA,EAAA,CAAA,CAAE,WAAc,GAAA;AAAA,MAClB,aAAa,CAAE,CAAA;AAAA,KACjB,GAAI,EARS,CAAA,EAAA;AAAA,MASb,aAAa;AAAC,KACf,CAAA,CAAA;AAAA,GACF,CAAA;AACD,EAAA,WAAA,CAAY,QAAQ,CAAQ,IAAA,KAAA;AAnF9B,IAAA,IAAA,EAAA;AAoFI,IAAM,MAAA,GAAA,GAAM,IAAK,CAAA,SAAA,IAAa,IAAK,CAAA,IAAA;AACnC,IAAA,IAAI,CAAC,GAAK,EAAA;AACV,IAAA,MAAM,GAAM,GAAA,CAAA,EAAA,GAAA,IAAA,CAAK,GAAI,CAAA,GAAG,MAAZ,IAAiB,GAAA,EAAA,GAAA;AAAA,MAC3B,SAAW,EAAA,GAAA;AAAA,MACX,KAAA,EAAO,qBAAqB,GAAG,CAAA;AAAA,MAC/B,aAAa;AAAC,KAChB;AACA,IAAI,GAAA,CAAA,WAAA,CAAY,KAAK,IAAI,CAAA;AACzB,IAAK,IAAA,CAAA,GAAA,CAAI,KAAK,GAAG,CAAA;AAAA,GAClB,CAAA;AACD,EAAO,OAAA,CAAC,GAAG,IAAA,CAAK,MAAO,EAAC,CAAE,CAAA,IAAA,CAAK,CAAC,CAAA,EAAG,CAAM,KAAA,MAAA,CAAO,CAAE,CAAA,WAAA,CAAY,MAAS,GAAA,CAAC,CAAI,GAAA,MAAA,CAAO,CAAE,CAAA,WAAA,CAAY,MAAS,GAAA,CAAC,CAAK,IAAA,CAAA,CAAE,KAAM,CAAA,aAAA,CAAc,CAAE,CAAA,KAAK,CAAC,CAAA;AAChJ"}
1
+ {"version":3,"file":"notionConnections.js","sources":["../../../src/features/notion/notionConnections.ts"],"sourcesContent":["/**\n * Connections (web components/connector/ConnectionsDialog): every app that needs a credential,\n * and whether the vault holds one for it. The row rules are the web's - credentials are matched\n * to an app by connectorNameFromRecord (web connectorCredentialResolution), connected apps come\n * first, then by name. The phone reads the catalog over GraphQL (integrationConnectors) since it\n * has no web session cookie for the workflow REST catalog.\n *\n * Pure: no RN imports, so it runs under jest as-is.\n */\n\nexport interface CatalogApp {\n id: string;\n title: string;\n description?: string | null;\n logo?: string | null;\n authMethods?: string[] | null;\n}\n\nexport interface VaultCredential {\n id: string;\n name: string;\n connector: string;\n status: string;\n owner?: string;\n lastUsedAt?: string | null;\n createdAt?: string | null;\n}\n\nexport interface ConnectionRow {\n connector: string;\n label: string;\n logo?: string;\n description?: string;\n credentials: VaultCredential[];\n}\n\n/** Web connectorNameFromRecord: which app a vault record belongs to. */\nexport function connectorNameFromRecord(record: Record<string, unknown>): string {\n const metadata = record.metadata as Record<string, unknown> | undefined;\n const formData = record.formData as Record<string, unknown> | undefined;\n const customFields = metadata?.customFields as Record<string, unknown> | undefined;\n return String(\n customFields?.connectorName ||\n customFields?.providerId ||\n metadata?.providerId ||\n formData?.providerId ||\n formData?.provider ||\n '',\n ).trim();\n}\n\nexport function toVaultCredential(r: Record<string, unknown>): VaultCredential {\n return {\n id: String(r.id),\n name: String(r.name ?? ''),\n connector: connectorNameFromRecord(r),\n status: String(r.status ?? ''),\n owner: (r.owner as { username?: string } | null | undefined)?.username,\n lastUsedAt: (r.lastUsedAt as string | null) ?? null,\n createdAt: (r.createdAt as string | null) ?? null,\n };\n}\n\n/** \"google-sheets\" -> \"Google Sheets\" (web connectorDisplayName). */\nexport function connectorDisplayName(name: string): string {\n return name\n .replace(/[-_]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\n/** An app needs a credential unless its only auth method is \"none\". */\n/** Yantra's own connectors run without vault credentials (web utils/connectorCredentialPolicy). */\nexport function requiresCredentials(app: CatalogApp): boolean {\n return !app.id.trim().toLowerCase().startsWith('yantra-');\n}\n\n/** The workflow API base (`${backend}/api/workflow/cde-connector`) for a GraphQL / backend URL. */\nexport function cdeConnectorCatalogUrl(backendOrGraphqlUrl: string): string {\n const backend = backendOrGraphqlUrl.replace(/\\/+$/, '').replace(/\\/graphql$/, '');\n return `${backend}/api/workflow/cde-connector`;\n}\n\n/**\n * Apps from `GET /api/workflow/cde-connector` (`{ success, data: [{ name, label, description,\n * logo, … }] }`) - the catalog the web Connections dialog lists (hooks/useCdeConnectorCatalog).\n */\nexport function catalogFromWorkflowResponse(body: unknown): CatalogApp[] {\n const list = (body as { data?: unknown } | null)?.data;\n if (!Array.isArray(list)) return [];\n const out: CatalogApp[] = [];\n list.forEach((raw) => {\n const c = raw && typeof raw === 'object' ? (raw as Record<string, unknown>) : null;\n const id = c ? String(c.name ?? '').trim() : '';\n if (!c || !id) return;\n out.push({\n id,\n title: String(c.label ?? id),\n description: typeof c.description === 'string' ? c.description : null,\n logo: typeof c.logo === 'string' && c.logo.trim() ? c.logo.trim() : null,\n });\n });\n return out;\n}\n\n/** Fetch the workflow connector catalog with the user's bearer token. */\nexport async function fetchConnectorCatalog(url: string, token: string, signal?: AbortSignal): Promise<CatalogApp[]> {\n const res = await fetch(url, {\n method: 'GET',\n headers: { Accept: 'application/json', Authorization: `Bearer ${token}` },\n signal,\n });\n let body: { success?: boolean; error?: string } | null = null;\n try {\n body = await res.json();\n } catch {\n throw new Error(`Invalid response from the connector catalog (HTTP ${res.status})`);\n }\n if (!res.ok || !body?.success) throw new Error(body?.error || `Couldn't load apps (HTTP ${res.status})`);\n return catalogFromWorkflowResponse(body);\n}\n\n/** Catalog apps that need credentials, plus any app the vault has a credential for (web buildConnectionRows). */\nexport function buildConnectionRows(\n catalog: readonly CatalogApp[],\n credentials: readonly VaultCredential[],\n): ConnectionRow[] {\n const rows = new Map<string, ConnectionRow>();\n catalog.forEach((c) => {\n if (!requiresCredentials(c)) return;\n rows.set(c.id, {\n connector: c.id,\n label: c.title && c.title !== c.id ? c.title : connectorDisplayName(c.id),\n ...(c.logo ? { logo: c.logo } : {}),\n ...(c.description ? { description: c.description } : {}),\n credentials: [],\n });\n });\n credentials.forEach((cred) => {\n const key = cred.connector || cred.name;\n if (!key) return;\n const row = rows.get(key) ?? { connector: key, label: connectorDisplayName(key), credentials: [] };\n row.credentials.push(cred);\n rows.set(key, row);\n });\n return [...rows.values()].sort(\n (a, b) => Number(b.credentials.length > 0) - Number(a.credentials.length > 0) || a.label.localeCompare(b.label),\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAmCO,SAAS,wBAAwB,MAAyC,EAAA;AAC/E,EAAA,MAAM,WAAW,MAAO,CAAA,QAAA;AACxB,EAAA,MAAM,WAAW,MAAO,CAAA,QAAA;AACxB,EAAA,MAAM,eAAe,QAAU,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAA,YAAA;AAC/B,EAAA,OAAO,MAAO,CAAA,CAAA,YAAA,IAAA,IAAA,GAAA,MAAA,GAAA,YAAA,CAAc,aAAiB,MAAA,YAAA,IAAA,IAAA,GAAA,MAAA,GAAA,YAAA,CAAc,UAAc,CAAA,KAAA,QAAA,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAU,UAAc,CAAA,KAAA,QAAA,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAU,UAAc,CAAA,KAAA,QAAA,IAAA,IAAA,GAAA,MAAA,GAAA,QAAA,CAAU,QAAY,CAAA,IAAA,EAAE,EAAE,IAAK,EAAA;AAC1J;AACO,SAAS,kBAAkB,CAA6C,EAAA;AAzC/E,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA;AA0CE,EAAO,OAAA;AAAA,IACL,EAAA,EAAI,MAAO,CAAA,CAAA,CAAE,EAAE,CAAA;AAAA,IACf,IAAM,EAAA,MAAA,CAAA,CAAO,EAAE,GAAA,CAAA,CAAA,IAAA,KAAF,YAAU,EAAE,CAAA;AAAA,IACzB,SAAA,EAAW,wBAAwB,CAAC,CAAA;AAAA,IACpC,MAAQ,EAAA,MAAA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CAAC,GAAK,EAAA;AACV,IAAA,MAAM,GAAM,GAAA,CAAA,EAAA,GAAA,IAAA,CAAK,GAAI,CAAA,GAAG,MAAZ,IAAiB,GAAA,EAAA,GAAA;AAAA,MAC3B,SAAW,EAAA,GAAA;AAAA,MACX,KAAA,EAAO,qBAAqB,GAAG,CAAA;AAAA,MAC/B,aAAa;AAAC,KAChB;AACA,IAAI,GAAA,CAAA,WAAA,CAAY,KAAK,IAAI,CAAA;AACzB,IAAK,IAAA,CAAA,GAAA,CAAI,KAAK,GAAG,CAAA;AAAA,GAClB,CAAA;AACD,EAAO,OAAA,CAAC,GAAG,IAAA,CAAK,MAAO,EAAC,CAAE,CAAA,IAAA,CAAK,CAAC,CAAA,EAAG,CAAM,KAAA,MAAA,CAAO,CAAE,CAAA,WAAA,CAAY,MAAS,GAAA,CAAC,CAAI,GAAA,MAAA,CAAO,CAAE,CAAA,WAAA,CAAY,MAAS,GAAA,CAAC,CAAK,IAAA,CAAA,CAAE,KAAM,CAAA,aAAA,CAAc,CAAE,CAAA,KAAK,CAAC,CAAA;AAChJ"}
@@ -631,4 +631,64 @@ const NATIVE_NOTION_DELETE_DATABASE_VIEW = gql`
631
631
  mutation NativeNotionDeleteDatabaseView($databaseId: String!, $viewId: String!) {
632
632
  deleteDatabaseView(databaseId: $databaseId, viewId: $viewId)
633
633
  }
634
- `;export{NATIVE_INTEGRATION_CONNECTORS,NATIVE_NOTES_USERS,NATIVE_NOTES_VIEWER,NATIVE_NOTION_ADD_COMMENT,NATIVE_NOTION_ADD_DOMAIN,NATIVE_NOTION_ADD_MEMBER,NATIVE_NOTION_APPEND_CHILDREN,NATIVE_NOTION_BACKLINKS,NATIVE_NOTION_BLOCK,NATIVE_NOTION_CHILDREN,NATIVE_NOTION_COMMENTS,NATIVE_NOTION_CREATE_BLOCK,NATIVE_NOTION_CREATE_DATABASE_VIEW,NATIVE_NOTION_CREATE_UPLOAD_LINK,NATIVE_NOTION_CREATE_WORKSPACE,NATIVE_NOTION_DATABASE_VIEWS,NATIVE_NOTION_DELETE_BLOCK,NATIVE_NOTION_DELETE_COMMENT,NATIVE_NOTION_DELETE_DATABASE_VIEW,NATIVE_NOTION_DELETE_WORKSPACE,NATIVE_NOTION_DUPLICATE_BLOCK,NATIVE_NOTION_EDIT_COMMENT,NATIVE_NOTION_EXPORT_MARKDOWN,NATIVE_NOTION_FAVORITES,NATIVE_NOTION_GUESTS,NATIVE_NOTION_IMPORT_MARKDOWN,NATIVE_NOTION_INBOX,NATIVE_NOTION_INBOX_UNREAD,NATIVE_NOTION_MARK_INBOX_READ,NATIVE_NOTION_MEMBERS,NATIVE_NOTION_MOVE_BLOCK,NATIVE_NOTION_OPEN_GRAPH,NATIVE_NOTION_PAGE_HISTORY,NATIVE_NOTION_PAGE_SNAPSHOT,NATIVE_NOTION_PAGE_TREE,NATIVE_NOTION_PERMANENTLY_DELETE,NATIVE_NOTION_PERMISSIONS,NATIVE_NOTION_PUBLICATION,NATIVE_NOTION_PUBLISH,NATIVE_NOTION_QUERY_DATABASE,NATIVE_NOTION_REFRESH_DOMAIN,NATIVE_NOTION_REMOVE_DOMAIN,NATIVE_NOTION_REMOVE_GUEST,NATIVE_NOTION_REMOVE_MEMBER,NATIVE_NOTION_REORDER_CHILDREN,NATIVE_NOTION_RESOLVE_FILE_URL,NATIVE_NOTION_RESOLVE_THREAD,NATIVE_NOTION_RESTORE_BLOCK,NATIVE_NOTION_RESTORE_SNAPSHOT,NATIVE_NOTION_RESTORE_VERSION,NATIVE_NOTION_SAVE_UPLOADED_FILE,NATIVE_NOTION_SEARCH,NATIVE_NOTION_SEARCH_HITS,NATIVE_NOTION_SET_FAVORITES,NATIVE_NOTION_TOGGLE_REACTION,NATIVE_NOTION_TRANSFORM_BLOCK,NATIVE_NOTION_TRASH,NATIVE_NOTION_UNPUBLISH,NATIVE_NOTION_UPDATE_BLOCK,NATIVE_NOTION_UPDATE_DATABASE_VIEW,NATIVE_NOTION_UPDATE_MEMBER,NATIVE_NOTION_UPDATE_PERMISSIONS,NATIVE_NOTION_UPDATE_WORKSPACE,NATIVE_NOTION_VERSION_HISTORY,NATIVE_NOTION_WORKSPACES,NATIVE_NOTION_WORKSPACE_DETAIL};//# sourceMappingURL=notionDocuments.js.map
634
+ `;
635
+ const NATIVE_NOTES_RUNTIME_STATUS = gql`
636
+ query NativeNotesRuntimeStatus {
637
+ notesRuntimeStatus {
638
+ eventsEnabled
639
+ agentRuntimeEnabled
640
+ schedulerEnabled
641
+ serverAiReplies
642
+ reason
643
+ }
644
+ }
645
+ `;
646
+ const AGENT_RUN_FIELDS = `
647
+ id
648
+ agentId
649
+ trigger
650
+ triggerType
651
+ status
652
+ startedAt
653
+ finishedAt
654
+ summary
655
+ error
656
+ sessionId
657
+ attempt
658
+ createdAt
659
+ `;
660
+ const NATIVE_NOTION_AGENT_RUNS = gql`
661
+ query NativeNotionAgentRuns($agentId: String!, $limit: Int, $cursor: String) {
662
+ notionAgentRuns(agentId: $agentId, limit: $limit, cursor: $cursor) {
663
+ runs {
664
+ ${AGENT_RUN_FIELDS}
665
+ }
666
+ nextCursor
667
+ }
668
+ }
669
+ `;
670
+ const NATIVE_NOTION_START_AGENT_RUN = gql`
671
+ mutation NativeNotionStartAgentRun($agentId: String!) {
672
+ startNotionAgentRun(agentId: $agentId) {
673
+ ${AGENT_RUN_FIELDS}
674
+ }
675
+ }
676
+ `;
677
+ const NATIVE_NOTION_CANCEL_AGENT_RUN = gql`
678
+ mutation NativeNotionCancelAgentRun($runId: String!) {
679
+ cancelNotionAgentRun(runId: $runId) {
680
+ ${AGENT_RUN_FIELDS}
681
+ }
682
+ }
683
+ `;
684
+ const APPROVAL_FIELDS = "agentId ownerId approved approvedBy approvedAt canApprove";
685
+ const NATIVE_NOTION_AGENT_APPROVAL = gql`
686
+ query NativeNotionAgentApproval($agentId: String!) {
687
+ notionAgentApproval(agentId: $agentId) { ${APPROVAL_FIELDS} }
688
+ }
689
+ `;
690
+ const NATIVE_NOTION_APPROVE_AGENT = gql`
691
+ mutation NativeNotionApproveAgent($agentId: String!) {
692
+ approveNotionAgent(agentId: $agentId) { ${APPROVAL_FIELDS} }
693
+ }
694
+ `;export{NATIVE_INTEGRATION_CONNECTORS,NATIVE_NOTES_RUNTIME_STATUS,NATIVE_NOTES_USERS,NATIVE_NOTES_VIEWER,NATIVE_NOTION_ADD_COMMENT,NATIVE_NOTION_ADD_DOMAIN,NATIVE_NOTION_ADD_MEMBER,NATIVE_NOTION_AGENT_APPROVAL,NATIVE_NOTION_AGENT_RUNS,NATIVE_NOTION_APPEND_CHILDREN,NATIVE_NOTION_APPROVE_AGENT,NATIVE_NOTION_BACKLINKS,NATIVE_NOTION_BLOCK,NATIVE_NOTION_CANCEL_AGENT_RUN,NATIVE_NOTION_CHILDREN,NATIVE_NOTION_COMMENTS,NATIVE_NOTION_CREATE_BLOCK,NATIVE_NOTION_CREATE_DATABASE_VIEW,NATIVE_NOTION_CREATE_UPLOAD_LINK,NATIVE_NOTION_CREATE_WORKSPACE,NATIVE_NOTION_DATABASE_VIEWS,NATIVE_NOTION_DELETE_BLOCK,NATIVE_NOTION_DELETE_COMMENT,NATIVE_NOTION_DELETE_DATABASE_VIEW,NATIVE_NOTION_DELETE_WORKSPACE,NATIVE_NOTION_DUPLICATE_BLOCK,NATIVE_NOTION_EDIT_COMMENT,NATIVE_NOTION_EXPORT_MARKDOWN,NATIVE_NOTION_FAVORITES,NATIVE_NOTION_GUESTS,NATIVE_NOTION_IMPORT_MARKDOWN,NATIVE_NOTION_INBOX,NATIVE_NOTION_INBOX_UNREAD,NATIVE_NOTION_MARK_INBOX_READ,NATIVE_NOTION_MEMBERS,NATIVE_NOTION_MOVE_BLOCK,NATIVE_NOTION_OPEN_GRAPH,NATIVE_NOTION_PAGE_HISTORY,NATIVE_NOTION_PAGE_SNAPSHOT,NATIVE_NOTION_PAGE_TREE,NATIVE_NOTION_PERMANENTLY_DELETE,NATIVE_NOTION_PERMISSIONS,NATIVE_NOTION_PUBLICATION,NATIVE_NOTION_PUBLISH,NATIVE_NOTION_QUERY_DATABASE,NATIVE_NOTION_REFRESH_DOMAIN,NATIVE_NOTION_REMOVE_DOMAIN,NATIVE_NOTION_REMOVE_GUEST,NATIVE_NOTION_REMOVE_MEMBER,NATIVE_NOTION_REORDER_CHILDREN,NATIVE_NOTION_RESOLVE_FILE_URL,NATIVE_NOTION_RESOLVE_THREAD,NATIVE_NOTION_RESTORE_BLOCK,NATIVE_NOTION_RESTORE_SNAPSHOT,NATIVE_NOTION_RESTORE_VERSION,NATIVE_NOTION_SAVE_UPLOADED_FILE,NATIVE_NOTION_SEARCH,NATIVE_NOTION_SEARCH_HITS,NATIVE_NOTION_SET_FAVORITES,NATIVE_NOTION_START_AGENT_RUN,NATIVE_NOTION_TOGGLE_REACTION,NATIVE_NOTION_TRANSFORM_BLOCK,NATIVE_NOTION_TRASH,NATIVE_NOTION_UNPUBLISH,NATIVE_NOTION_UPDATE_BLOCK,NATIVE_NOTION_UPDATE_DATABASE_VIEW,NATIVE_NOTION_UPDATE_MEMBER,NATIVE_NOTION_UPDATE_PERMISSIONS,NATIVE_NOTION_UPDATE_WORKSPACE,NATIVE_NOTION_VERSION_HISTORY,NATIVE_NOTION_WORKSPACES,NATIVE_NOTION_WORKSPACE_DETAIL};//# sourceMappingURL=notionDocuments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notionDocuments.js","sources":["../../../src/features/notion/notionDocuments.ts"],"sourcesContent":["/**\n * GraphQL for the native Notion workspace - the same operations the web\n * workspace (forms-stack `notion-api/browser/src/graphql`) runs against the\n * main backend's block schema. Field sets are trimmed to what native renders.\n */\nimport { gql } from '@apollo/client';\n\nconst BLOCK_FIELDS = gql`\n fragment NativeNotionBlockFields on NotionBlock {\n id\n type\n properties\n content\n parent {\n type\n id\n }\n workspaceId\n createdTime\n lastEditedTime\n archived\n inTrash\n rootPageId\n }\n`;\n\nexport const NATIVE_NOTION_WORKSPACES = gql`\n query NativeNotionWorkspaces {\n listWorkspaces {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_CHILDREN = gql`\n query NativeNotionChildren($blockId: String!, $startCursor: String, $pageSize: Int) {\n getBlockChildren(blockId: $blockId, startCursor: $startCursor, pageSize: $pageSize) {\n results {\n ...NativeNotionBlockFields\n }\n nextCursor\n hasMore\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n/** A page with its body: four levels covers nested lists/toggles on a phone. */\nexport const NATIVE_NOTION_PAGE_TREE = gql`\n query NativeNotionPageTree($input: NotionGetBlockInput!) {\n getBlockTree(input: $input) {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n }\n }\n }\n }\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_SEARCH = gql`\n query NativeNotionSearch($input: NotionSearchBlocksInput!) {\n searchBlocks(input: $input) {\n results {\n ...NativeNotionBlockFields\n }\n hasMore\n nextCursor\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_TRASH = gql`\n query NativeNotionTrash($workspaceId: String) {\n listTrash(workspaceId: $workspaceId) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_CREATE_WORKSPACE = gql`\n mutation NativeNotionCreateWorkspace($input: NotionCreateWorkspaceInput!) {\n createWorkspace(input: $input) {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_CREATE_BLOCK = gql`\n mutation NativeNotionCreateBlock($input: NotionCreateBlockInput!) {\n createBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_UPDATE_BLOCK = gql`\n mutation NativeNotionUpdateBlock($input: NotionUpdateBlockInput!) {\n updateBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DELETE_BLOCK = gql`\n mutation NativeNotionDeleteBlock($blockId: String!) {\n deleteBlock(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_BLOCK = gql`\n mutation NativeNotionRestoreBlock($blockId: String!) {\n restoreBlock(blockId: $blockId) {\n id\n inTrash\n }\n }\n`;\n\n/** Inbox: @mentions of you and your due @date reminders (web components/api/inbox). */\nexport const NATIVE_NOTION_INBOX = gql`\n query NativeNotionInbox($limit: Int) {\n notesInbox(limit: $limit) {\n id\n kind\n pageId\n blockId\n actorId\n text\n createdAt\n dueAt\n showAt\n readAt\n }\n }\n`;\n\nexport const NATIVE_NOTION_INBOX_UNREAD = gql`\n query NativeNotionInboxUnread {\n notesInboxUnreadCount\n }\n`;\n\nexport const NATIVE_NOTION_MARK_INBOX_READ = gql`\n mutation NativeNotionMarkInboxRead($ids: [String!], $all: Boolean) {\n markNotesInboxRead(ids: $ids, all: $all)\n }\n`;\n\n/** Insert blocks under a parent, right after the `after` sibling (else at the end). */\nexport const NATIVE_NOTION_APPEND_CHILDREN = gql`\n mutation NativeNotionAppendChildren($input: NotionAppendBlocksInput!) {\n appendChildren(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_TRANSFORM_BLOCK = gql`\n mutation NativeNotionTransformBlock($blockId: String!, $newType: NotionBlockType!) {\n transformBlock(blockId: $blockId, newType: $newType) {\n id\n type\n }\n }\n`;\n\n/** The page itself (title, icon, edit time) - the web editor reads it with getBlock, not from the tree. */\nexport const NATIVE_NOTION_BLOCK = gql`\n query NativeNotionBlock($input: NotionGetBlockInput!) {\n getBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n/** Delete forever (Trash \"Delete forever\" / \"Empty trash\"). */\nexport const NATIVE_NOTION_PERMANENTLY_DELETE = gql`\n mutation NativeNotionPermanentlyDelete($blockId: String!) {\n permanentlyDeleteBlock(blockId: $blockId)\n }\n`;\n\n// ---- Page actions (web ••• menu / sidebar row menu) -------------------------\n\nexport const NATIVE_NOTION_DUPLICATE_BLOCK = gql`\n mutation NativeNotionDuplicateBlock($blockId: String!, $includeChildren: Boolean, $targetParentId: String) {\n duplicateBlock(blockId: $blockId, includeChildren: $includeChildren, targetParentId: $targetParentId) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_MOVE_BLOCK = gql`\n mutation NativeNotionMoveBlock($input: NotionMoveBlockInput!) {\n moveBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_FAVORITES = gql`\n query NativeNotionFavorites($workspaceId: String!) {\n notionFavorites(workspaceId: $workspaceId)\n }\n`;\n\nexport const NATIVE_NOTION_SET_FAVORITES = gql`\n mutation NativeNotionSetFavorites($workspaceId: String!, $blockIds: [String!]!) {\n setNotionFavorites(workspaceId: $workspaceId, blockIds: $blockIds)\n }\n`;\n\nexport const NATIVE_NOTION_BACKLINKS = gql`\n query NativeNotionBacklinks($blockId: String!, $limit: Int) {\n getBacklinks(blockId: $blockId, limit: $limit) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_EXPORT_MARKDOWN = gql`\n query NativeNotionExportMarkdown($blockId: String!) {\n exportNotionPageMarkdown(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_IMPORT_MARKDOWN = gql`\n mutation NativeNotionImportMarkdown($parentBlockId: String!, $markdown: String!) {\n importNotionMarkdown(parentBlockId: $parentBlockId, markdown: $markdown) {\n id\n }\n }\n`;\n\n/** Search with server hits (breadcrumb + snippet), like the web SearchView / palette. */\nexport const NATIVE_NOTION_SEARCH_HITS = gql`\n query NativeNotionSearchHits($input: NotionSearchBlocksInput!) {\n searchBlocks(input: $input) {\n hits {\n snippet\n block {\n ...NativeNotionBlockFields\n }\n container {\n id\n title\n type\n }\n parentPath {\n id\n title\n type\n }\n }\n hasMore\n nextCursor\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n// ---- Workspace management (web components/api/workspaceAdmin) --------------\n\nconst MEMBER_FIELDS = `\n userId\n role\n permissions\n joinedAt\n`;\n\nexport const NATIVE_NOTION_WORKSPACE_DETAIL = gql`\n query NativeNotionWorkspaceDetail($workspaceId: String!) {\n getWorkspace(workspaceId: $workspaceId) {\n id\n name\n icon\n ownerId\n members {${MEMBER_FIELDS}}\n }\n }\n`;\n\nexport const NATIVE_NOTES_VIEWER = gql`\n query NativeNotesViewer {\n notesViewer {\n id\n name\n email\n avatarUrl\n }\n }\n`;\n\nexport const NATIVE_NOTES_USERS = gql`\n query NativeNotesUsers($ids: [ID!]!) {\n notesUsers(ids: $ids) {\n id\n name\n email\n avatarUrl\n }\n }\n`;\n\nexport const NATIVE_NOTION_MEMBERS = gql`\n query NativeNotionMembers($workspaceId: String!) {\n notionWorkspaceMembers(workspaceId: $workspaceId) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_ADD_MEMBER = gql`\n mutation NativeNotionAddMember($workspaceId: String!, $userId: String!, $role: NotionWorkspaceRole) {\n addNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId, role: $role) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_UPDATE_MEMBER = gql`\n mutation NativeNotionUpdateMember($workspaceId: String!, $userId: String!, $role: NotionWorkspaceRole!) {\n updateNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId, role: $role) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_MEMBER = gql`\n mutation NativeNotionRemoveMember($workspaceId: String!, $userId: String!) {\n removeNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_GUESTS = gql`\n query NativeNotionGuests($workspaceId: String!) {\n notionWorkspaceGuests(workspaceId: $workspaceId) {\n userId\n pages {\n id\n title\n permission\n }\n }\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_GUEST = gql`\n mutation NativeNotionRemoveGuest($workspaceId: String!, $userId: String!) {\n removeNotionWorkspaceGuest(workspaceId: $workspaceId, userId: $userId) {\n userId\n }\n }\n`;\n\nexport const NATIVE_NOTION_UPDATE_WORKSPACE = gql`\n mutation NativeNotionUpdateWorkspace($id: String!, $input: UpdateNotionWorkspaceInput!) {\n updateNotionWorkspace(id: $id, input: $input) {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_DELETE_WORKSPACE = gql`\n mutation NativeNotionDeleteWorkspace($workspaceId: String!) {\n deleteWorkspace(workspaceId: $workspaceId)\n }\n`;\n\n/** New child order of a page / block (block menu Move up / Move down). */\nexport const NATIVE_NOTION_REORDER_CHILDREN = gql`\n mutation NativeNotionReorderChildren($blockId: String!, $childIds: [String!]!) {\n reorderChildren(blockId: $blockId, childIds: $childIds) {\n id\n }\n }\n`;\n\n// ---- Media (web components/api/executors upload flow) -----------------------\n\nexport const NATIVE_NOTION_CREATE_UPLOAD_LINK = gql`\n mutation NativeNotionCreateUploadLink($input: NotionCreateUploadLinkInput!) {\n createNotionUploadLink(input: $input) {\n success\n uploadUrl\n message\n }\n }\n`;\n\nexport const NATIVE_NOTION_SAVE_UPLOADED_FILE = gql`\n mutation NativeNotionSaveUploadedFile($input: NotionSaveUploadedFileInput!) {\n saveNotionUploadedFile(input: $input) {\n success\n message\n fileInfo {\n id\n url\n name\n mimeType\n size\n }\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESOLVE_FILE_URL = gql`\n query NativeNotionResolveFileUrl($s3KeyOrUrl: String!, $expiresIn: Int) {\n resolveNotionFileUrl(s3KeyOrUrl: $s3KeyOrUrl, expiresIn: $expiresIn)\n }\n`;\n\n/** Link preview for bookmark blocks (fetched server side). */\nexport const NATIVE_NOTION_OPEN_GRAPH = gql`\n query NativeNotionOpenGraph($url: String!) {\n fetchOpenGraph(url: $url) {\n title\n description\n image\n }\n }\n`;\n\n// ---- Comments (web components/api/comments) ----------------------------------\n\nconst COMMENT_FIELDS = `\n id\n workspaceId\n pageId\n blockId\n threadId\n parentId\n body\n author {\n kind\n id\n name\n avatarUrl\n }\n reactions {\n emoji\n userIds\n count\n reacted\n }\n resolved\n createdBy\n createdTime\n editedTime\n deleted\n mine\n`;\n\nexport const NATIVE_NOTION_COMMENTS = gql`\n query NativeNotionComments($pageId: String!, $includeResolved: Boolean) {\n notionComments(pageId: $pageId, includeResolved: $includeResolved) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_ADD_COMMENT = gql`\n mutation NativeNotionAddComment($input: AddNotionCommentInput!) {\n addNotionComment(input: $input) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_EDIT_COMMENT = gql`\n mutation NativeNotionEditComment($input: EditNotionCommentInput!) {\n editNotionComment(input: $input) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_DELETE_COMMENT = gql`\n mutation NativeNotionDeleteComment($id: String!) {\n deleteNotionComment(id: $id) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_RESOLVE_THREAD = gql`\n mutation NativeNotionResolveThread($threadId: String!, $resolved: Boolean!) {\n resolveNotionThread(threadId: $threadId, resolved: $resolved) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_TOGGLE_REACTION = gql`\n mutation NativeNotionToggleReaction($id: String!, $emoji: String!) {\n toggleNotionCommentReaction(id: $id, emoji: $emoji) {${COMMENT_FIELDS}}\n }\n`;\n\n// ---- Share + Publish (web PageShareDialog / PageEditorPage publish) ----------\n\nexport const NATIVE_NOTION_PERMISSIONS = gql`\n query NativeNotionPermissions($blockId: String!) {\n getBlockPermissions(blockId: $blockId) {\n type\n userId\n groupId\n permission\n }\n }\n`;\n\n/** Replaces the page's whole permission list (web updateBlockPermissions). */\nexport const NATIVE_NOTION_UPDATE_PERMISSIONS = gql`\n mutation NativeNotionUpdatePermissions($input: NotionUpdatePermissionsInput!) {\n updateBlockPermissions(input: $input) {\n type\n userId\n groupId\n permission\n }\n }\n`;\n\nconst PUBLICATION_FIELDS = `\n id\n rootBlockId\n slug\n title\n status\n visibility\n publicUrl\n customDomain\n lastPublishedAt\n storageError\n domains {\n domain\n status\n message\n dnsRecords {\n type\n name\n value\n }\n }\n`;\n\nexport const NATIVE_NOTION_PUBLICATION = gql`\n query NativeNotionPublication($blockId: String!) {\n notionPublication(blockId: $blockId) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_PUBLISH = gql`\n mutation NativeNotionPublish($input: PublishNotionInput!) {\n publishNotionPage(input: $input) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_UNPUBLISH = gql`\n mutation NativeNotionUnpublish($blockId: String!) {\n unpublishNotionPage(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_ADD_DOMAIN = gql`\n mutation NativeNotionAddDomain($blockId: String!, $domain: String!) {\n addNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_DOMAIN = gql`\n mutation NativeNotionRemoveDomain($blockId: String!, $domain: String!) {\n removeNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REFRESH_DOMAIN = gql`\n mutation NativeNotionRefreshDomain($blockId: String!, $domain: String!) {\n refreshNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\n// ---- Page history (web PageHistoryPanel / PageVersionsSection) ----------------\n\nexport const NATIVE_NOTION_VERSION_HISTORY = gql`\n query NativeNotionVersionHistory($blockId: String!, $limit: Int) {\n getVersionHistory(blockId: $blockId, limit: $limit) {\n version\n timestamp\n userId\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_VERSION = gql`\n mutation NativeNotionRestoreVersion($blockId: String!, $version: Int!) {\n restoreBlockVersion(blockId: $blockId, version: $version) {\n id\n properties\n version\n lastEditedTime\n }\n }\n`;\n\nexport const NATIVE_NOTION_PAGE_HISTORY = gql`\n query NativeNotionPageHistory($pageId: String!, $limit: Int) {\n getPageHistory(pageId: $pageId, limit: $limit) {\n id\n createdAt\n userIds\n blockCount\n reason\n }\n }\n`;\n\nexport const NATIVE_NOTION_PAGE_SNAPSHOT = gql`\n query NativeNotionPageSnapshot($snapshotId: String!) {\n getPageSnapshot(snapshotId: $snapshotId) {\n id\n pageId\n createdAt\n blocks\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_SNAPSHOT = gql`\n mutation NativeNotionRestoreSnapshot($pageId: String!, $snapshotId: String!) {\n restorePageSnapshot(pageId: $pageId, snapshotId: $snapshotId) {\n id\n version\n lastEditedTime\n }\n }\n`;\n\n/** App catalog for Connections (GraphQL: the phone has no web session for the workflow REST catalog). */\nexport const NATIVE_INTEGRATION_CONNECTORS = gql`\n query NativeIntegrationConnectors($search: String) {\n integrationConnectors(search: $search) {\n id\n title\n description\n logo\n authMethods\n }\n }\n`;\n\n// ---- Databases (web containers/DatabasePage) --------------------------------\n\nconst DATABASE_VIEW_FIELDS = gql`\n fragment NativeNotionDatabaseViewFields on NotionDatabaseView {\n id\n databaseId\n type\n name\n filter\n sorts\n properties\n groupBy\n settings\n }\n`;\n\n/** One page of rows (`database_row` children); page with `nextCursor`, the server caps a page at 200. */\nexport const NATIVE_NOTION_QUERY_DATABASE = gql`\n query NativeNotionQueryDatabase($input: NotionQueryDatabaseInput!) {\n queryDatabase(input: $input) {\n results {\n ...NativeNotionBlockFields\n createdBy\n lastEditedBy\n }\n nextCursor\n hasMore\n totalCount\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DATABASE_VIEWS = gql`\n query NativeNotionDatabaseViews($databaseId: String!) {\n getDatabaseViews(databaseId: $databaseId) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_CREATE_DATABASE_VIEW = gql`\n mutation NativeNotionCreateDatabaseView($input: NotionCreateDatabaseViewInput!) {\n createDatabaseView(input: $input) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_UPDATE_DATABASE_VIEW = gql`\n mutation NativeNotionUpdateDatabaseView($input: NotionUpdateDatabaseViewInput!) {\n updateDatabaseView(input: $input) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DELETE_DATABASE_VIEW = gql`\n mutation NativeNotionDeleteDatabaseView($databaseId: String!, $viewId: String!) {\n deleteDatabaseView(databaseId: $databaseId, viewId: $viewId)\n }\n`;\n"],"names":[],"mappings":"0CAMA,MAAM,YAAe,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBd,MAAM,wBAA2B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASjC,MAAM,sBAAyB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAUhC,YAAY;AAAA;AAIX,MAAM,uBAA0B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EA4BjC,YAAY;AAAA;AAEX,MAAM,oBAAuB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAA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AA;AAUtC,MAAM,0BAA6B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWnC,MAAM,2BAA8B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC,MAAM,8BAAiC,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWvC,MAAM,6BAAgC,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc7C,MAAM,oBAAuB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAetB,MAAM,4BAA+B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAatC,YAAY;AAAA;AAEX,MAAM,4BAA+B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAMtC,oBAAoB;AAAA;AAEnB,MAAM,kCAAqC,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAM5C,oBAAoB;AAAA;AAEnB,MAAM,kCAAqC,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAM5C,oBAAoB;AAAA;AAEnB,MAAM,kCAAqC,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"notionDocuments.js","sources":["../../../src/features/notion/notionDocuments.ts"],"sourcesContent":["/**\n * GraphQL for the native Notion workspace - the same operations the web\n * workspace (forms-stack `notion-api/browser/src/graphql`) runs against the\n * main backend's block schema. Field sets are trimmed to what native renders.\n */\nimport { gql } from '@apollo/client';\n\nconst BLOCK_FIELDS = gql`\n fragment NativeNotionBlockFields on NotionBlock {\n id\n type\n properties\n content\n parent {\n type\n id\n }\n workspaceId\n createdTime\n lastEditedTime\n archived\n inTrash\n rootPageId\n }\n`;\n\nexport const NATIVE_NOTION_WORKSPACES = gql`\n query NativeNotionWorkspaces {\n listWorkspaces {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_CHILDREN = gql`\n query NativeNotionChildren($blockId: String!, $startCursor: String, $pageSize: Int) {\n getBlockChildren(blockId: $blockId, startCursor: $startCursor, pageSize: $pageSize) {\n results {\n ...NativeNotionBlockFields\n }\n nextCursor\n hasMore\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n/** A page with its body: four levels covers nested lists/toggles on a phone. */\nexport const NATIVE_NOTION_PAGE_TREE = gql`\n query NativeNotionPageTree($input: NotionGetBlockInput!) {\n getBlockTree(input: $input) {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n children {\n block {\n ...NativeNotionBlockFields\n }\n }\n }\n }\n }\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_SEARCH = gql`\n query NativeNotionSearch($input: NotionSearchBlocksInput!) {\n searchBlocks(input: $input) {\n results {\n ...NativeNotionBlockFields\n }\n hasMore\n nextCursor\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_TRASH = gql`\n query NativeNotionTrash($workspaceId: String) {\n listTrash(workspaceId: $workspaceId) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_CREATE_WORKSPACE = gql`\n mutation NativeNotionCreateWorkspace($input: NotionCreateWorkspaceInput!) {\n createWorkspace(input: $input) {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_CREATE_BLOCK = gql`\n mutation NativeNotionCreateBlock($input: NotionCreateBlockInput!) {\n createBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_UPDATE_BLOCK = gql`\n mutation NativeNotionUpdateBlock($input: NotionUpdateBlockInput!) {\n updateBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DELETE_BLOCK = gql`\n mutation NativeNotionDeleteBlock($blockId: String!) {\n deleteBlock(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_BLOCK = gql`\n mutation NativeNotionRestoreBlock($blockId: String!) {\n restoreBlock(blockId: $blockId) {\n id\n inTrash\n }\n }\n`;\n\n/** Inbox: @mentions of you and your due @date reminders (web components/api/inbox). */\nexport const NATIVE_NOTION_INBOX = gql`\n query NativeNotionInbox($limit: Int) {\n notesInbox(limit: $limit) {\n id\n kind\n pageId\n blockId\n actorId\n text\n createdAt\n dueAt\n showAt\n readAt\n }\n }\n`;\n\nexport const NATIVE_NOTION_INBOX_UNREAD = gql`\n query NativeNotionInboxUnread {\n notesInboxUnreadCount\n }\n`;\n\nexport const NATIVE_NOTION_MARK_INBOX_READ = gql`\n mutation NativeNotionMarkInboxRead($ids: [String!], $all: Boolean) {\n markNotesInboxRead(ids: $ids, all: $all)\n }\n`;\n\n/** Insert blocks under a parent, right after the `after` sibling (else at the end). */\nexport const NATIVE_NOTION_APPEND_CHILDREN = gql`\n mutation NativeNotionAppendChildren($input: NotionAppendBlocksInput!) {\n appendChildren(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_TRANSFORM_BLOCK = gql`\n mutation NativeNotionTransformBlock($blockId: String!, $newType: NotionBlockType!) {\n transformBlock(blockId: $blockId, newType: $newType) {\n id\n type\n }\n }\n`;\n\n/** The page itself (title, icon, edit time) - the web editor reads it with getBlock, not from the tree. */\nexport const NATIVE_NOTION_BLOCK = gql`\n query NativeNotionBlock($input: NotionGetBlockInput!) {\n getBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n/** Delete forever (Trash \"Delete forever\" / \"Empty trash\"). */\nexport const NATIVE_NOTION_PERMANENTLY_DELETE = gql`\n mutation NativeNotionPermanentlyDelete($blockId: String!) {\n permanentlyDeleteBlock(blockId: $blockId)\n }\n`;\n\n// ---- Page actions (web ••• menu / sidebar row menu) -------------------------\n\nexport const NATIVE_NOTION_DUPLICATE_BLOCK = gql`\n mutation NativeNotionDuplicateBlock($blockId: String!, $includeChildren: Boolean, $targetParentId: String) {\n duplicateBlock(blockId: $blockId, includeChildren: $includeChildren, targetParentId: $targetParentId) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_MOVE_BLOCK = gql`\n mutation NativeNotionMoveBlock($input: NotionMoveBlockInput!) {\n moveBlock(input: $input) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_FAVORITES = gql`\n query NativeNotionFavorites($workspaceId: String!) {\n notionFavorites(workspaceId: $workspaceId)\n }\n`;\n\nexport const NATIVE_NOTION_SET_FAVORITES = gql`\n mutation NativeNotionSetFavorites($workspaceId: String!, $blockIds: [String!]!) {\n setNotionFavorites(workspaceId: $workspaceId, blockIds: $blockIds)\n }\n`;\n\nexport const NATIVE_NOTION_BACKLINKS = gql`\n query NativeNotionBacklinks($blockId: String!, $limit: Int) {\n getBacklinks(blockId: $blockId, limit: $limit) {\n ...NativeNotionBlockFields\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_EXPORT_MARKDOWN = gql`\n query NativeNotionExportMarkdown($blockId: String!) {\n exportNotionPageMarkdown(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_IMPORT_MARKDOWN = gql`\n mutation NativeNotionImportMarkdown($parentBlockId: String!, $markdown: String!) {\n importNotionMarkdown(parentBlockId: $parentBlockId, markdown: $markdown) {\n id\n }\n }\n`;\n\n/** Search with server hits (breadcrumb + snippet), like the web SearchView / palette. */\nexport const NATIVE_NOTION_SEARCH_HITS = gql`\n query NativeNotionSearchHits($input: NotionSearchBlocksInput!) {\n searchBlocks(input: $input) {\n hits {\n snippet\n block {\n ...NativeNotionBlockFields\n }\n container {\n id\n title\n type\n }\n parentPath {\n id\n title\n type\n }\n }\n hasMore\n nextCursor\n }\n }\n ${BLOCK_FIELDS}\n`;\n\n// ---- Workspace management (web components/api/workspaceAdmin) --------------\n\nconst MEMBER_FIELDS = `\n userId\n role\n permissions\n joinedAt\n`;\n\nexport const NATIVE_NOTION_WORKSPACE_DETAIL = gql`\n query NativeNotionWorkspaceDetail($workspaceId: String!) {\n getWorkspace(workspaceId: $workspaceId) {\n id\n name\n icon\n ownerId\n members {${MEMBER_FIELDS}}\n }\n }\n`;\n\nexport const NATIVE_NOTES_VIEWER = gql`\n query NativeNotesViewer {\n notesViewer {\n id\n name\n email\n avatarUrl\n }\n }\n`;\n\nexport const NATIVE_NOTES_USERS = gql`\n query NativeNotesUsers($ids: [ID!]!) {\n notesUsers(ids: $ids) {\n id\n name\n email\n avatarUrl\n }\n }\n`;\n\nexport const NATIVE_NOTION_MEMBERS = gql`\n query NativeNotionMembers($workspaceId: String!) {\n notionWorkspaceMembers(workspaceId: $workspaceId) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_ADD_MEMBER = gql`\n mutation NativeNotionAddMember($workspaceId: String!, $userId: String!, $role: NotionWorkspaceRole) {\n addNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId, role: $role) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_UPDATE_MEMBER = gql`\n mutation NativeNotionUpdateMember($workspaceId: String!, $userId: String!, $role: NotionWorkspaceRole!) {\n updateNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId, role: $role) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_MEMBER = gql`\n mutation NativeNotionRemoveMember($workspaceId: String!, $userId: String!) {\n removeNotionWorkspaceMember(workspaceId: $workspaceId, userId: $userId) {${MEMBER_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_GUESTS = gql`\n query NativeNotionGuests($workspaceId: String!) {\n notionWorkspaceGuests(workspaceId: $workspaceId) {\n userId\n pages {\n id\n title\n permission\n }\n }\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_GUEST = gql`\n mutation NativeNotionRemoveGuest($workspaceId: String!, $userId: String!) {\n removeNotionWorkspaceGuest(workspaceId: $workspaceId, userId: $userId) {\n userId\n }\n }\n`;\n\nexport const NATIVE_NOTION_UPDATE_WORKSPACE = gql`\n mutation NativeNotionUpdateWorkspace($id: String!, $input: UpdateNotionWorkspaceInput!) {\n updateNotionWorkspace(id: $id, input: $input) {\n id\n name\n icon\n }\n }\n`;\n\nexport const NATIVE_NOTION_DELETE_WORKSPACE = gql`\n mutation NativeNotionDeleteWorkspace($workspaceId: String!) {\n deleteWorkspace(workspaceId: $workspaceId)\n }\n`;\n\n/** New child order of a page / block (block menu Move up / Move down). */\nexport const NATIVE_NOTION_REORDER_CHILDREN = gql`\n mutation NativeNotionReorderChildren($blockId: String!, $childIds: [String!]!) {\n reorderChildren(blockId: $blockId, childIds: $childIds) {\n id\n }\n }\n`;\n\n// ---- Media (web components/api/executors upload flow) -----------------------\n\nexport const NATIVE_NOTION_CREATE_UPLOAD_LINK = gql`\n mutation NativeNotionCreateUploadLink($input: NotionCreateUploadLinkInput!) {\n createNotionUploadLink(input: $input) {\n success\n uploadUrl\n message\n }\n }\n`;\n\nexport const NATIVE_NOTION_SAVE_UPLOADED_FILE = gql`\n mutation NativeNotionSaveUploadedFile($input: NotionSaveUploadedFileInput!) {\n saveNotionUploadedFile(input: $input) {\n success\n message\n fileInfo {\n id\n url\n name\n mimeType\n size\n }\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESOLVE_FILE_URL = gql`\n query NativeNotionResolveFileUrl($s3KeyOrUrl: String!, $expiresIn: Int) {\n resolveNotionFileUrl(s3KeyOrUrl: $s3KeyOrUrl, expiresIn: $expiresIn)\n }\n`;\n\n/** Link preview for bookmark blocks (fetched server side). */\nexport const NATIVE_NOTION_OPEN_GRAPH = gql`\n query NativeNotionOpenGraph($url: String!) {\n fetchOpenGraph(url: $url) {\n title\n description\n image\n }\n }\n`;\n\n// ---- Comments (web components/api/comments) ----------------------------------\n\nconst COMMENT_FIELDS = `\n id\n workspaceId\n pageId\n blockId\n threadId\n parentId\n body\n author {\n kind\n id\n name\n avatarUrl\n }\n reactions {\n emoji\n userIds\n count\n reacted\n }\n resolved\n createdBy\n createdTime\n editedTime\n deleted\n mine\n`;\n\nexport const NATIVE_NOTION_COMMENTS = gql`\n query NativeNotionComments($pageId: String!, $includeResolved: Boolean) {\n notionComments(pageId: $pageId, includeResolved: $includeResolved) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_ADD_COMMENT = gql`\n mutation NativeNotionAddComment($input: AddNotionCommentInput!) {\n addNotionComment(input: $input) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_EDIT_COMMENT = gql`\n mutation NativeNotionEditComment($input: EditNotionCommentInput!) {\n editNotionComment(input: $input) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_DELETE_COMMENT = gql`\n mutation NativeNotionDeleteComment($id: String!) {\n deleteNotionComment(id: $id) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_RESOLVE_THREAD = gql`\n mutation NativeNotionResolveThread($threadId: String!, $resolved: Boolean!) {\n resolveNotionThread(threadId: $threadId, resolved: $resolved) {${COMMENT_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_TOGGLE_REACTION = gql`\n mutation NativeNotionToggleReaction($id: String!, $emoji: String!) {\n toggleNotionCommentReaction(id: $id, emoji: $emoji) {${COMMENT_FIELDS}}\n }\n`;\n\n// ---- Share + Publish (web PageShareDialog / PageEditorPage publish) ----------\n\nexport const NATIVE_NOTION_PERMISSIONS = gql`\n query NativeNotionPermissions($blockId: String!) {\n getBlockPermissions(blockId: $blockId) {\n type\n userId\n groupId\n permission\n }\n }\n`;\n\n/** Replaces the page's whole permission list (web updateBlockPermissions). */\nexport const NATIVE_NOTION_UPDATE_PERMISSIONS = gql`\n mutation NativeNotionUpdatePermissions($input: NotionUpdatePermissionsInput!) {\n updateBlockPermissions(input: $input) {\n type\n userId\n groupId\n permission\n }\n }\n`;\n\nconst PUBLICATION_FIELDS = `\n id\n rootBlockId\n slug\n title\n status\n visibility\n publicUrl\n customDomain\n lastPublishedAt\n storageError\n domains {\n domain\n status\n message\n dnsRecords {\n type\n name\n value\n }\n }\n`;\n\nexport const NATIVE_NOTION_PUBLICATION = gql`\n query NativeNotionPublication($blockId: String!) {\n notionPublication(blockId: $blockId) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_PUBLISH = gql`\n mutation NativeNotionPublish($input: PublishNotionInput!) {\n publishNotionPage(input: $input) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_UNPUBLISH = gql`\n mutation NativeNotionUnpublish($blockId: String!) {\n unpublishNotionPage(blockId: $blockId)\n }\n`;\n\nexport const NATIVE_NOTION_ADD_DOMAIN = gql`\n mutation NativeNotionAddDomain($blockId: String!, $domain: String!) {\n addNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REMOVE_DOMAIN = gql`\n mutation NativeNotionRemoveDomain($blockId: String!, $domain: String!) {\n removeNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\nexport const NATIVE_NOTION_REFRESH_DOMAIN = gql`\n mutation NativeNotionRefreshDomain($blockId: String!, $domain: String!) {\n refreshNotionPublicationDomain(blockId: $blockId, domain: $domain) {${PUBLICATION_FIELDS}}\n }\n`;\n\n// ---- Page history (web PageHistoryPanel / PageVersionsSection) ----------------\n\nexport const NATIVE_NOTION_VERSION_HISTORY = gql`\n query NativeNotionVersionHistory($blockId: String!, $limit: Int) {\n getVersionHistory(blockId: $blockId, limit: $limit) {\n version\n timestamp\n userId\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_VERSION = gql`\n mutation NativeNotionRestoreVersion($blockId: String!, $version: Int!) {\n restoreBlockVersion(blockId: $blockId, version: $version) {\n id\n properties\n version\n lastEditedTime\n }\n }\n`;\n\nexport const NATIVE_NOTION_PAGE_HISTORY = gql`\n query NativeNotionPageHistory($pageId: String!, $limit: Int) {\n getPageHistory(pageId: $pageId, limit: $limit) {\n id\n createdAt\n userIds\n blockCount\n reason\n }\n }\n`;\n\nexport const NATIVE_NOTION_PAGE_SNAPSHOT = gql`\n query NativeNotionPageSnapshot($snapshotId: String!) {\n getPageSnapshot(snapshotId: $snapshotId) {\n id\n pageId\n createdAt\n blocks\n }\n }\n`;\n\nexport const NATIVE_NOTION_RESTORE_SNAPSHOT = gql`\n mutation NativeNotionRestoreSnapshot($pageId: String!, $snapshotId: String!) {\n restorePageSnapshot(pageId: $pageId, snapshotId: $snapshotId) {\n id\n version\n lastEditedTime\n }\n }\n`;\n\n/** App catalog for Connections (GraphQL: the phone has no web session for the workflow REST catalog). */\nexport const NATIVE_INTEGRATION_CONNECTORS = gql`\n query NativeIntegrationConnectors($search: String) {\n integrationConnectors(search: $search) {\n id\n title\n description\n logo\n authMethods\n }\n }\n`;\n\n// ---- Databases (web containers/DatabasePage) --------------------------------\n\nconst DATABASE_VIEW_FIELDS = gql`\n fragment NativeNotionDatabaseViewFields on NotionDatabaseView {\n id\n databaseId\n type\n name\n filter\n sorts\n properties\n groupBy\n settings\n }\n`;\n\n/** One page of rows (`database_row` children); page with `nextCursor`, the server caps a page at 200. */\nexport const NATIVE_NOTION_QUERY_DATABASE = gql`\n query NativeNotionQueryDatabase($input: NotionQueryDatabaseInput!) {\n queryDatabase(input: $input) {\n results {\n ...NativeNotionBlockFields\n createdBy\n lastEditedBy\n }\n nextCursor\n hasMore\n totalCount\n }\n }\n ${BLOCK_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DATABASE_VIEWS = gql`\n query NativeNotionDatabaseViews($databaseId: String!) {\n getDatabaseViews(databaseId: $databaseId) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_CREATE_DATABASE_VIEW = gql`\n mutation NativeNotionCreateDatabaseView($input: NotionCreateDatabaseViewInput!) {\n createDatabaseView(input: $input) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_UPDATE_DATABASE_VIEW = gql`\n mutation NativeNotionUpdateDatabaseView($input: NotionUpdateDatabaseViewInput!) {\n updateDatabaseView(input: $input) {\n ...NativeNotionDatabaseViewFields\n }\n }\n ${DATABASE_VIEW_FIELDS}\n`;\n\nexport const NATIVE_NOTION_DELETE_DATABASE_VIEW = gql`\n mutation NativeNotionDeleteDatabaseView($databaseId: String!, $viewId: String!) {\n deleteDatabaseView(databaseId: $databaseId, viewId: $viewId)\n }\n`;\n\n// ---- Agents (web components/AgentPageHeader + api/notesServerOps) ------------\n\n/** Is the server agent runtime / scheduler on (web hooks/useNotesRuntimeStatus)? */\nexport const NATIVE_NOTES_RUNTIME_STATUS = gql`\n query NativeNotesRuntimeStatus {\n notesRuntimeStatus {\n eventsEnabled\n agentRuntimeEnabled\n schedulerEnabled\n serverAiReplies\n reason\n }\n }\n`;\n\nconst AGENT_RUN_FIELDS = `\n id\n agentId\n trigger\n triggerType\n status\n startedAt\n finishedAt\n summary\n error\n sessionId\n attempt\n createdAt\n`;\n\nexport const NATIVE_NOTION_AGENT_RUNS = gql`\n query NativeNotionAgentRuns($agentId: String!, $limit: Int, $cursor: String) {\n notionAgentRuns(agentId: $agentId, limit: $limit, cursor: $cursor) {\n runs {\n ${AGENT_RUN_FIELDS}\n }\n nextCursor\n }\n }\n`;\n\nexport const NATIVE_NOTION_START_AGENT_RUN = gql`\n mutation NativeNotionStartAgentRun($agentId: String!) {\n startNotionAgentRun(agentId: $agentId) {\n ${AGENT_RUN_FIELDS}\n }\n }\n`;\n\nexport const NATIVE_NOTION_CANCEL_AGENT_RUN = gql`\n mutation NativeNotionCancelAgentRun($runId: String!) {\n cancelNotionAgentRun(runId: $runId) {\n ${AGENT_RUN_FIELDS}\n }\n }\n`;\n\nconst APPROVAL_FIELDS = 'agentId ownerId approved approvedBy approvedAt canApprove';\n\nexport const NATIVE_NOTION_AGENT_APPROVAL = gql`\n query NativeNotionAgentApproval($agentId: String!) {\n notionAgentApproval(agentId: $agentId) { ${APPROVAL_FIELDS} }\n }\n`;\n\nexport const NATIVE_NOTION_APPROVE_AGENT = gql`\n mutation NativeNotionApproveAgent($agentId: String!) {\n approveNotionAgent(agentId: $agentId) { ${APPROVAL_FIELDS} }\n }\n`;\n"],"names":[],"mappings":"0CAMA,MAAM,YAAe,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBd,MAAM,wBAA2B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASjC,MAAM,sBAAyB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EAUhC,YAAY;AAAA;AAIX,MAAM,uBAA0B,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,EA4BjC,YAAY;AAAA;AAEX,MAAM,oBAAuB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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