@notionhq/apps 0.0.48 → 0.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/apps",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "description": "An SDK for building workflow apps for Notion",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -156,7 +156,10 @@ configuration, and do not log secrets or private payloads.
156
156
 
157
157
  ## Manual workflow inputs
158
158
 
159
- Provide up to one `events.manual` to allow triggering the workflow manually from the UI or CLI for testing purposes.
159
+ Provide up to one `events.manual()` to allow triggering the workflow from the UI
160
+ or CLI on demand. For scheduled workflows, include it alongside
161
+ `events.scheduled()` so users can run the workflow without waiting for the next
162
+ scheduled time.
160
163
 
161
164
  Specify the inputs accepted using `@notionhq/apps/schema-builder`.
162
165
 
@@ -247,7 +250,7 @@ import { guide } from "./sayHello/lib/notion.js";
247
250
  export default workflow({
248
251
  name: "Read guide",
249
252
  description: "Reads the App's guide on a recurring schedule.",
250
- triggers: [events.scheduled()],
253
+ triggers: [events.scheduled(), events.manual()],
251
254
  access: { guide: access.view(guide) },
252
255
  handler: async (_event, context) => {
253
256
  await context.step("Read guide", () =>
@@ -262,11 +265,6 @@ declarations in `access` work too. Importing a declaration alone provisions the
262
265
  resource but does not create a `context.access` alias. An `access` entry declares
263
266
  the needed permission level and a named binding for that NaC resource.
264
267
 
265
- For a workflow that uses `events.scheduled()`, also declare a "triggers"
266
- database with a page-added trigger bound to it. This lets the user manually
267
- trigger a run at any time by adding a page to that database, without waiting
268
- for the schedule.
269
-
270
268
  `access.view()`, `access.comment()`, `access.edit()`, and `access.fullAccess()`
271
269
  accept page, database, and data-source handles. `access.call()` accepts custom-agent
272
270
  handles. Keys are workflow-local aliases. The handler's