import { Client } from "@notionhq/client";
/**
* Learn more at
* https://developers.notion.com/reference/retrieve-a-page
*/
type Notion = {
token: string;
};
export async function main(
auth: Notion,
page_id: string,
filter_properties?: string[],
) {
const client = new Client({ auth: auth.token });
if (!filter_properties?.filter(Boolean).length) {
filter_properties = undefined;
}
return await client.pages.retrieve({
page_id,
filter_properties,
});
}
Submitted by hugo989 4 days ago