@@ -16,6 +16,11 @@ function createConfluenceClient() {
1616 } ) ;
1717}
1818
19+ /**
20+ * Returns the content of a Confluence page by its ID.
21+ * @param id Id of the page to get the content from
22+ * @returns Content of the page
23+ */
1924async function getPageContent ( id : string ) {
2025 const client = createConfluenceClient ( ) ;
2126 const content = await client . content . getContentById ( {
@@ -25,15 +30,24 @@ async function getPageContent(id: string) {
2530 return content ;
2631}
2732
33+ /**
34+ * Returns the confluence content properties of the README page
35+ */
2836async function getReadmePageContent ( ) {
2937 return getPageContent ( README_PAGE_ID ) ;
3038}
3139
40+ /**
41+ * Returns the Confluence children of the README page
42+ */
3243export async function getReadmePageChildren ( ) {
3344 const content = await getReadmePageContent ( ) ;
3445 return content . children ?. page ?. results ;
3546}
3647
48+ /**
49+ * Returns the confluence content properties of the CHANGELOG page
50+ */
3751async function getChangelogPageContent ( ) {
3852 const readmeChildren = await getReadmePageChildren ( ) ;
3953 const changelogId = readmeChildren ? readmeChildren [ 0 ] ?. id : undefined ;
@@ -47,16 +61,25 @@ async function getChangelogPageContent() {
4761 return changelogContent ;
4862}
4963
64+ /**
65+ * Returns the body of the CHANGELOG page
66+ */
5067export async function getChangelogPageBody ( ) {
5168 const content = await getChangelogPageContent ( ) ;
5269 return content . body ?. view ?. value ;
5370}
5471
72+ /**
73+ * Returns the title of the CHANGELOG page
74+ */
5575export async function getChangelogPageTitle ( ) {
5676 const content = await getChangelogPageContent ( ) ;
5777 return content . title ;
5878}
5979
80+ /**
81+ * Returns the title of the README page
82+ */
6083export async function getReadmePageTitle ( ) {
6184 const content = await getReadmePageContent ( ) ;
6285 return content . title ;
0 commit comments