Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/extension-points.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* - view
* - project.page (full-page view routed from a project sidebar nav item)
* - admin.page (full-page view routed from the admin sidebar nav item)
* - app.page (full-page view at /plugin-pages/:pluginId/:slug, listed in no sidebar)
* - user.settings.tab (tab on the current user's own Account/Profile settings page)
*/

Expand Down Expand Up @@ -127,6 +128,22 @@ export interface ProjectPageProps extends BaseExtensionProps {
*/
export interface AdminPageProps extends BaseExtensionProps {}

// ── app.page ──────────────────────────────────────────────────────────────────

/**
* Props for components registered at `app.page`.
* Rendered full-bleed at `/plugin-pages/:pluginId/:slug` (nav item `scope: "app"`),
* a top-level page that no sidebar lists. It exists so a plugin can own a URL
* on the Paca origin — typically the address an external service redirects the
* browser back to (an App-installation or OAuth callback). The page sits under
* the host's authenticated layout, so by the time it mounts an expired access
* token has been refreshed (or the user has signed in and been returned here);
* the injected `api` client then calls the plugin's own backend as that user.
* `api` has no `projectId` (global scope). Read the callback's query string
* from `window.location`, and treat it as untrusted input.
*/
export interface AppPageProps extends BaseExtensionProps {}

// ── user.settings.tab ────────────────────────────────────────────────────────

/**
Expand Down Expand Up @@ -154,4 +171,5 @@ export type ExtensionPointProps =
| ViewExtensionProps
| ProjectPageProps
| AdminPageProps
| AppPageProps
| UserSettingsTabProps;
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type {
BaseExtensionProps,
ExtensionPointProps,
AdminPageProps,
AppPageProps,
ProjectPageProps,
ProjectSettingsTabProps,
SidebarGeneralSectionProps,
Expand Down
Loading