MCPcopy Index your code
hub / github.com/simstudioai/sim / transformPageData

Function transformPageData

apps/sim/tools/confluence/utils.ts:98–121  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

96}
97
98export function transformPageData(data: any) {
99 const rawContent =
100 data.body?.storage?.value || data.body?.view?.value || data.body?.atlas_doc_format?.value || ''
101
102 const cleanContent = cleanHtmlContent(rawContent)
103
104 return {
105 success: true,
106 output: {
107 ts: new Date().toISOString(),
108 pageId: data.id ?? '',
109 title: data.title ?? '',
110 content: cleanContent,
111 status: data.status ?? null,
112 spaceId: data.spaceId ?? null,
113 parentId: data.parentId ?? null,
114 authorId: data.authorId ?? null,
115 createdAt: data.createdAt ?? null,
116 url: data._links?.webui ?? null,
117 body: data.body ?? null,
118 version: data.version ?? null,
119 },
120 }
121}

Callers 1

retrieve.tsFile · 0.90

Calls 1

cleanHtmlContentFunction · 0.85

Tested by

no test coverage detected