diff --git a/apps/templates/perfect-meetings/APP.md b/apps/templates/perfect-meetings/APP.md index 1ae339b..2ba28e2 100644 --- a/apps/templates/perfect-meetings/APP.md +++ b/apps/templates/perfect-meetings/APP.md @@ -6,6 +6,8 @@ Prepare for Google Calendar meetings with people outside your organization, with ## Your library +Perfect Meetings Resources — The databases created by this app, grouped for demo cleanup. + - Meetings — Meeting briefs and your notes. - People — Get to know the people you're meeting. - Companies — Background on their companies. diff --git a/apps/templates/perfect-meetings/README.md b/apps/templates/perfect-meetings/README.md index c511400..f32c2de 100644 --- a/apps/templates/perfect-meetings/README.md +++ b/apps/templates/perfect-meetings/README.md @@ -9,15 +9,16 @@ Notion pages with a short research brief. ## What it creates -| Kind | Name | Purpose | -| ------------ | ------------------ | ------------------------------------------------------------------------------------------------- | -| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help | -| Database | Meetings | One row per external meeting; brief at the top of the page, notes below | -| Database | People | One row per outside attendee, keyed by email | -| Database | Companies | One row per outside company, keyed by email domain | -| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) | -| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly | -| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting | +| Kind | Name | Purpose | +| ------------ | -------------------------- | ------------------------------------------------------------------------------------------------- | +| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help | +| Page | Perfect Meetings Resources | Parent of the four app databases for demo cleanup | +| Database | Meetings | One row per external meeting; brief at the top of the page, notes below | +| Database | People | One row per outside attendee, keyed by email | +| Database | Companies | One row per outside company, keyed by email domain | +| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) | +| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly | +| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting | ## Home page diff --git a/apps/templates/perfect-meetings/src/notion.ts b/apps/templates/perfect-meetings/src/notion.ts index f490053..5daff8e 100644 --- a/apps/templates/perfect-meetings/src/notion.ts +++ b/apps/templates/perfect-meetings/src/notion.ts @@ -1,4 +1,4 @@ -import { access, customAgent, database } from "@notionhq/apps" +import { access, customAgent, page } from "@notionhq/apps" import { notion } from "@notionhq/apps/notion-as-code" // Resource and property IDs are stable declaration identities. Do not rename @@ -55,7 +55,20 @@ export const MEETING_STATUS = { cancelled: "Cancelled", } as const -export const companies = database("companies-db", { +// Keep the data together for demo cleanup without deleting the app home. +const resources = page({ + resourceId: "perfect-meetings-resources", + properties: { title: notion.text("Perfect Meetings Resources") }, + content: `Meetings + +People + +Companies + +Workflow runs`, +}) + +export const companies = resources.addDatabase("companies-db", { dataSourceResourceId: COMPANIES_SOURCE, name: "Companies", icon: { type: "emoji", emoji: "🏢" }, @@ -83,7 +96,7 @@ export const companies = database("companies-db", { ], }) -export const people = database("people-db", { +export const people = resources.addDatabase("people-db", { dataSourceResourceId: PEOPLE_SOURCE, name: "People", icon: { type: "emoji", emoji: "🧑‍💼" }, @@ -158,7 +171,7 @@ export const people = database("people-db", { ], }) -export const meetings = database("meetings-db", { +export const meetings = resources.addDatabase("meetings-db", { dataSourceResourceId: MEETINGS_SOURCE, name: "Meetings", icon: { type: "emoji", emoji: "🗓️" }, @@ -283,7 +296,7 @@ export const RUN_TRIGGER = { // One row per calendar ingest run. Adding a row yourself runs a calendar // catch-up, and the ingest fills in that row. -export const syncRuns = database("sync-runs-db", { +export const syncRuns = resources.addDatabase("sync-runs-db", { dataSourceResourceId: "sync-runs-source", name: "Workflow runs", icon: { type: "emoji", emoji: "🔄" },