import type { NormalizedSchedule } from "./types.js"; /** Identifies the schema used to validate this manifest independently of the SDK package version. */ export const APPS_MANIFEST_SCHEMA = "notion:apps-manifest:v1" as const; /** Capability types supported by this SDK. */ export type CapabilityType = "workflow" | "sync" | "custom_block"; export type DatabaseManifestConfig = { initialTitle?: string; schema: unknown; }; export type DatabaseManifestEntry = { key: string; config: DatabaseManifestConfig; }; export type PacerManifestEntry = { key: string; config: { allowedRequests: number; intervalMs: number }; }; export type SyncManifestConfig = { databaseKey: string; primaryKeyProperty: string; mode?: "replace" | "incremental"; schedule?: NormalizedSchedule; }; /** * One capability in the manifest: its type, its key (derived from its * filename), and its handler-free configuration. */ export type CapabilityManifestEntry = { type: CapabilityType; key: string; config: unknown; }; /** App-wide secret metadata. Values are supplied securely by each installation. */ export type SecretDeclaration = { name: string; title: string; description: string; required: boolean; }; /** * The full app manifest, emitted by `notion-apps build` as * `dist/manifest.json` and read by the platform at deploy time. This is a * complete, static description of the app. */ export type AppManifest = { $schema: typeof APPS_MANIFEST_SCHEMA; sdkVersion: string; databases: DatabaseManifestEntry[]; /** Reserved platform field; the Apps SDK does not support XLDB. */ xldbs: never[]; pacers: PacerManifestEntry[]; secrets?: SecretDeclaration[]; capabilities: CapabilityManifestEntry[]; };