@notionhq/workers 0.4.0 → 0.6.0
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/dist/alpha/builder.d.ts +149 -0
- package/dist/alpha/builder.d.ts.map +1 -0
- package/dist/alpha/builder.js +260 -0
- package/dist/alpha/builder.test.d.ts +2 -0
- package/dist/alpha/builder.test.d.ts.map +1 -0
- package/dist/alpha/cli/build.d.ts +13 -0
- package/dist/alpha/cli/build.d.ts.map +1 -0
- package/dist/alpha/cli/build.js +36 -0
- package/dist/alpha/cli/build.test.d.ts +2 -0
- package/dist/alpha/cli/build.test.d.ts.map +1 -0
- package/dist/alpha/cli/codegen.d.ts +10 -0
- package/dist/alpha/cli/codegen.d.ts.map +1 -0
- package/dist/alpha/cli/codegen.js +41 -0
- package/dist/alpha/cli/codegen.test.d.ts +2 -0
- package/dist/alpha/cli/codegen.test.d.ts.map +1 -0
- package/dist/alpha/cli/discover.d.ts +35 -0
- package/dist/alpha/cli/discover.d.ts.map +1 -0
- package/dist/alpha/cli/discover.js +39 -0
- package/dist/alpha/cli/discover.test.d.ts +2 -0
- package/dist/alpha/cli/discover.test.d.ts.map +1 -0
- package/dist/alpha/cli/emit-manifest.d.ts +33 -0
- package/dist/alpha/cli/emit-manifest.d.ts.map +1 -0
- package/dist/alpha/cli/emit-manifest.js +266 -0
- package/dist/alpha/cli/emit-manifest.test.d.ts +2 -0
- package/dist/alpha/cli/emit-manifest.test.d.ts.map +1 -0
- package/dist/alpha/cli/index.d.ts +3 -0
- package/dist/alpha/cli/index.d.ts.map +1 -0
- package/dist/alpha/cli/index.js +36 -0
- package/dist/alpha/context.d.ts +8 -0
- package/dist/alpha/context.d.ts.map +1 -0
- package/dist/alpha/context.js +33 -0
- package/dist/alpha/database.d.ts +90 -0
- package/dist/alpha/database.d.ts.map +1 -0
- package/dist/alpha/database.js +9 -0
- package/dist/alpha/error.d.ts +41 -0
- package/dist/alpha/error.d.ts.map +1 -0
- package/dist/alpha/error.js +25 -0
- package/dist/alpha/icon-names.d.ts +6 -0
- package/dist/alpha/icon-names.d.ts.map +1 -0
- package/dist/alpha/icon-names.js +0 -0
- package/dist/alpha/json-schema.d.ts +117 -0
- package/dist/alpha/json-schema.d.ts.map +1 -0
- package/dist/alpha/json-schema.js +0 -0
- package/dist/alpha/manifest.d.ts +44 -0
- package/dist/alpha/manifest.d.ts.map +1 -0
- package/dist/alpha/manifest.js +0 -0
- package/dist/alpha/output.d.ts +7 -0
- package/dist/alpha/output.d.ts.map +1 -0
- package/dist/alpha/output.js +8 -0
- package/dist/alpha/pacer.d.ts +74 -0
- package/dist/alpha/pacer.d.ts.map +1 -0
- package/dist/alpha/pacer.js +66 -0
- package/dist/alpha/pacer.test.d.ts +2 -0
- package/dist/alpha/pacer.test.d.ts.map +1 -0
- package/dist/alpha/schedule.d.ts +6 -0
- package/dist/alpha/schedule.d.ts.map +1 -0
- package/dist/alpha/schedule.js +43 -0
- package/dist/alpha/schedule.test.d.ts +2 -0
- package/dist/alpha/schedule.test.d.ts.map +1 -0
- package/dist/alpha/schema-builder.d.ts +79 -0
- package/dist/alpha/schema-builder.d.ts.map +1 -0
- package/dist/alpha/schema-builder.js +135 -0
- package/dist/alpha/schema.d.ts +185 -0
- package/dist/alpha/schema.d.ts.map +1 -0
- package/dist/alpha/schema.js +115 -0
- package/dist/alpha/sync.d.ts +233 -0
- package/dist/alpha/sync.d.ts.map +1 -0
- package/dist/alpha/sync.js +70 -0
- package/dist/alpha/sync.test.d.ts +2 -0
- package/dist/alpha/sync.test.d.ts.map +1 -0
- package/dist/alpha/tool.d.ts +132 -0
- package/dist/alpha/tool.d.ts.map +1 -0
- package/dist/alpha/tool.js +156 -0
- package/dist/alpha/tool.test.d.ts +2 -0
- package/dist/alpha/tool.test.d.ts.map +1 -0
- package/dist/alpha/triggers.d.ts +365 -0
- package/dist/alpha/triggers.d.ts.map +1 -0
- package/dist/alpha/triggers.generated.d.ts +246 -0
- package/dist/alpha/triggers.generated.d.ts.map +1 -0
- package/dist/alpha/triggers.generated.js +239 -0
- package/dist/alpha/triggers.js +0 -0
- package/dist/alpha/types.d.ts +228 -0
- package/dist/alpha/types.d.ts.map +1 -0
- package/dist/alpha/types.js +0 -0
- package/dist/alpha/workflow.d.ts +70 -0
- package/dist/alpha/workflow.d.ts.map +1 -0
- package/dist/alpha/workflow.js +39 -0
- package/dist/alpha/workflow.test.d.ts +2 -0
- package/dist/alpha/workflow.test.d.ts.map +1 -0
- package/dist/builder.d.ts +7 -1
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +12 -3
- package/dist/capabilities/ai_connector.d.ts.map +1 -1
- package/dist/capabilities/automation.d.ts.map +1 -1
- package/dist/capabilities/context.d.ts.map +1 -1
- package/dist/capabilities/context.js +1 -1
- package/dist/capabilities/custom-block.d.ts +124 -0
- package/dist/capabilities/custom-block.d.ts.map +1 -0
- package/dist/capabilities/custom-block.js +22 -0
- package/dist/capabilities/oauth.d.ts.map +1 -1
- package/dist/capabilities/output.d.ts.map +1 -1
- package/dist/capabilities/output.js +2 -4
- package/dist/capabilities/stateful-capability.d.ts.map +1 -1
- package/dist/capabilities/stateful-capability.js +3 -7
- package/dist/capabilities/sync.d.ts +11 -1
- package/dist/capabilities/sync.d.ts.map +1 -1
- package/dist/capabilities/sync.js +2 -8
- package/dist/capabilities/tool.d.ts.map +1 -1
- package/dist/capabilities/tool.js +6 -20
- package/dist/capabilities/webhook.d.ts.map +1 -1
- package/dist/capabilities/workflow.d.ts +50 -0
- package/dist/capabilities/workflow.d.ts.map +1 -0
- package/dist/capabilities/workflow.js +40 -0
- package/dist/capabilities/workflow.test.d.ts +2 -0
- package/dist/capabilities/workflow.test.d.ts.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/json-schema.d.ts.map +1 -1
- package/dist/schema-builder.d.ts.map +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/triggers.d.ts +365 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.generated.d.ts +246 -0
- package/dist/triggers.generated.d.ts.map +1 -0
- package/dist/triggers.generated.js +239 -0
- package/dist/triggers.js +0 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/worker.d.ts +72 -2
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +85 -4
- package/package.json +81 -14
- package/src/alpha/ajv-formats.d.ts +7 -0
- package/src/alpha/builder.test.ts +197 -0
- package/src/alpha/builder.ts +338 -0
- package/src/alpha/cli/build.test.ts +240 -0
- package/src/alpha/cli/build.ts +57 -0
- package/src/alpha/cli/codegen.test.ts +31 -0
- package/src/alpha/cli/codegen.ts +51 -0
- package/src/alpha/cli/discover.test.ts +43 -0
- package/src/alpha/cli/discover.ts +81 -0
- package/src/alpha/cli/emit-manifest.test.ts +45 -0
- package/src/alpha/cli/emit-manifest.ts +409 -0
- package/src/alpha/cli/index.ts +41 -0
- package/src/alpha/context.ts +61 -0
- package/src/alpha/database.ts +102 -0
- package/src/alpha/error.ts +49 -0
- package/src/alpha/icon-names.ts +890 -0
- package/src/alpha/json-schema.ts +180 -0
- package/src/alpha/manifest.ts +47 -0
- package/src/alpha/output.ts +8 -0
- package/src/alpha/pacer.test.ts +81 -0
- package/src/alpha/pacer.ts +181 -0
- package/src/alpha/schedule.test.ts +31 -0
- package/src/alpha/schedule.ts +53 -0
- package/src/alpha/schema-builder.ts +193 -0
- package/src/alpha/schema.ts +222 -0
- package/src/alpha/sync.test.ts +191 -0
- package/src/alpha/sync.ts +340 -0
- package/src/alpha/tool.test.ts +116 -0
- package/src/alpha/tool.ts +319 -0
- package/src/alpha/triggers.generated.ts +489 -0
- package/src/alpha/triggers.ts +500 -0
- package/src/alpha/types.ts +284 -0
- package/src/alpha/workflow.test.ts +84 -0
- package/src/alpha/workflow.ts +131 -0
- package/src/builder.test.ts +28 -60
- package/src/builder.ts +20 -7
- package/src/capabilities/ai_connector.test.ts +9 -32
- package/src/capabilities/ai_connector.ts +5 -17
- package/src/capabilities/automation.test.ts +3 -12
- package/src/capabilities/automation.ts +3 -11
- package/src/capabilities/context.ts +5 -8
- package/src/capabilities/custom-block.ts +181 -0
- package/src/capabilities/oauth.test.ts +1 -0
- package/src/capabilities/oauth.ts +1 -3
- package/src/capabilities/output.ts +1 -3
- package/src/capabilities/stateful-capability.test.ts +1 -0
- package/src/capabilities/stateful-capability.ts +3 -7
- package/src/capabilities/sync.test.ts +76 -42
- package/src/capabilities/sync.ts +16 -40
- package/src/capabilities/tool.test.ts +106 -146
- package/src/capabilities/tool.ts +17 -39
- package/src/capabilities/webhook.ts +3 -10
- package/src/capabilities/workflow.test.ts +163 -0
- package/src/capabilities/workflow.ts +112 -0
- package/src/index.ts +18 -6
- package/src/json-schema.test.ts +2 -4
- package/src/json-schema.ts +7 -6
- package/src/pacer.test.ts +1 -3
- package/src/pacer_internal.ts +1 -5
- package/src/schema-builder.test.ts +10 -35
- package/src/schema-builder.ts +6 -16
- package/src/schema.ts +2 -10
- package/src/triggers.generated.ts +489 -0
- package/src/triggers.ts +504 -0
- package/src/types.ts +21 -7
- package/src/worker.test.ts +147 -0
- package/src/worker.ts +155 -32
- package/dist/block.d.ts +0 -321
- package/dist/block.d.ts.map +0 -1
- package/src/block.ts +0 -529
- /package/dist/{block.js → alpha/ajv-formats.d.js} +0 -0
package/src/worker.ts
CHANGED
|
@@ -11,6 +11,11 @@ import type {
|
|
|
11
11
|
} from "./capabilities/automation.js";
|
|
12
12
|
import { createAutomationCapability } from "./capabilities/automation.js";
|
|
13
13
|
import type { CapabilityContext } from "./capabilities/context.js";
|
|
14
|
+
import type {
|
|
15
|
+
CustomBlockCapability,
|
|
16
|
+
CustomBlockConfiguration,
|
|
17
|
+
} from "./capabilities/custom-block.js";
|
|
18
|
+
import { createCustomBlockCapability } from "./capabilities/custom-block.js";
|
|
14
19
|
import type {
|
|
15
20
|
NotionManagedOAuthConfiguration,
|
|
16
21
|
OAuthCapability,
|
|
@@ -27,28 +32,34 @@ import type {
|
|
|
27
32
|
WebhookConfiguration,
|
|
28
33
|
WebhookEvent,
|
|
29
34
|
} from "./capabilities/webhook.js";
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
import { createWebhookCapability, WebhookVerificationError } from "./capabilities/webhook.js";
|
|
36
|
+
import type {
|
|
37
|
+
WorkflowCapability,
|
|
38
|
+
WorkflowConfiguration,
|
|
39
|
+
WorkflowEvent,
|
|
40
|
+
} from "./capabilities/workflow.js";
|
|
41
|
+
import { createWorkflowCapability } from "./capabilities/workflow.js";
|
|
34
42
|
import type { PacerDeclaration } from "./pacer_internal.js";
|
|
35
43
|
import { pacerWait } from "./pacer_internal.js";
|
|
36
44
|
import type { Schema } from "./schema.js";
|
|
45
|
+
import type { WorkflowTrigger } from "./triggers.generated.js";
|
|
37
46
|
import type { HandlerOptions, JSONValue } from "./types.js";
|
|
38
47
|
|
|
39
48
|
// Re-export types for convenience
|
|
40
49
|
export type {
|
|
50
|
+
AiConnectorConfiguration,
|
|
41
51
|
AutomationConfiguration,
|
|
42
52
|
AutomationEvent,
|
|
43
|
-
AiConnectorConfiguration,
|
|
44
53
|
CapabilityContext,
|
|
45
|
-
OAuthConfiguration,
|
|
46
54
|
NotionManagedOAuthConfiguration,
|
|
47
|
-
|
|
55
|
+
OAuthConfiguration,
|
|
48
56
|
SyncConfiguration,
|
|
49
57
|
ToolConfiguration,
|
|
58
|
+
UserManagedOAuthConfiguration,
|
|
50
59
|
WebhookConfiguration,
|
|
51
60
|
WebhookEvent,
|
|
61
|
+
WorkflowConfiguration,
|
|
62
|
+
WorkflowEvent,
|
|
52
63
|
};
|
|
53
64
|
export { WebhookVerificationError };
|
|
54
65
|
|
|
@@ -59,14 +70,50 @@ export { WebhookVerificationError };
|
|
|
59
70
|
type Capability =
|
|
60
71
|
| SyncCapability
|
|
61
72
|
| AiConnectorCapability
|
|
62
|
-
// biome-ignore lint/suspicious/noExplicitAny: tool capabilities are generic over arbitrary input/output payloads.
|
|
63
73
|
| ToolCapability<any, any>
|
|
64
74
|
| AutomationCapability
|
|
75
|
+
| WorkflowCapability
|
|
65
76
|
| OAuthCapability
|
|
66
|
-
| WebhookCapability
|
|
77
|
+
| WebhookCapability
|
|
78
|
+
| CustomBlockCapability;
|
|
67
79
|
|
|
68
80
|
export type CapabilityType = Capability["_tag"];
|
|
69
81
|
|
|
82
|
+
// ============================================================================
|
|
83
|
+
// Internal capability storage
|
|
84
|
+
// ============================================================================
|
|
85
|
+
//
|
|
86
|
+
// Registration methods return capabilities whose handler parameters are
|
|
87
|
+
// narrowed to the inputs they declared (e.g. a workflow handler only
|
|
88
|
+
// accepts events for its declared triggers). Handlers are contravariant in
|
|
89
|
+
// those parameters, so the narrowed capabilities are not assignable to the
|
|
90
|
+
// all-inputs members of `Capability`. Rather than cast them, the internal
|
|
91
|
+
// store is honest about this type erasure: stored handlers take `never`,
|
|
92
|
+
// recording that the store cannot prove what each handler accepts. `run()`
|
|
93
|
+
// is the single place that re-asserts the platform's contract that the
|
|
94
|
+
// incoming context matches the capability's declared input.
|
|
95
|
+
|
|
96
|
+
/** A tool capability as stored: its input/output types are erased. */
|
|
97
|
+
type StoredToolCapability = Omit<Extract<Capability, { _tag: "tool" }>, "handler"> & {
|
|
98
|
+
handler: (input: never, options?: HandlerOptions) => Promise<unknown>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** A workflow capability as stored: its event type is erased. */
|
|
102
|
+
type StoredWorkflowCapability = Omit<WorkflowCapability, "handler"> & {
|
|
103
|
+
handler: (event: never, options?: HandlerOptions) => Promise<{ status: "success" } | undefined>;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** How `Worker` stores registered capabilities internally. */
|
|
107
|
+
type StoredCapability =
|
|
108
|
+
| SyncCapability
|
|
109
|
+
| AiConnectorCapability
|
|
110
|
+
| StoredToolCapability
|
|
111
|
+
| AutomationCapability
|
|
112
|
+
| StoredWorkflowCapability
|
|
113
|
+
| OAuthCapability
|
|
114
|
+
| CustomBlockCapability
|
|
115
|
+
| WebhookCapability;
|
|
116
|
+
|
|
70
117
|
/**
|
|
71
118
|
* Configuration for a database that Notion creates and manages on behalf
|
|
72
119
|
* of the worker. The database is created on first deploy and its schema
|
|
@@ -98,10 +145,7 @@ export type ManagedDatabaseConfig<PK extends string, S extends Schema<PK>> = {
|
|
|
98
145
|
* Configuration union for all database types.
|
|
99
146
|
* Currently only `"managed"` is supported.
|
|
100
147
|
*/
|
|
101
|
-
export type DatabaseConfig<
|
|
102
|
-
PK extends string,
|
|
103
|
-
S extends Schema<PK>,
|
|
104
|
-
> = ManagedDatabaseConfig<PK, S>;
|
|
148
|
+
export type DatabaseConfig<PK extends string, S extends Schema<PK>> = ManagedDatabaseConfig<PK, S>;
|
|
105
149
|
|
|
106
150
|
/**
|
|
107
151
|
* An opaque handle returned by `worker.database()`. Pass this to
|
|
@@ -198,7 +242,7 @@ const SDK_VERSION = (() => {
|
|
|
198
242
|
// ============================================================================
|
|
199
243
|
|
|
200
244
|
export class Worker {
|
|
201
|
-
#capabilities: Map<string,
|
|
245
|
+
#capabilities: Map<string, StoredCapability> = new Map();
|
|
202
246
|
#databases: Map<string, RegisteredDatabase> = new Map();
|
|
203
247
|
#pacers: Map<string, PacerDeclaration> = new Map();
|
|
204
248
|
|
|
@@ -409,8 +453,7 @@ export class Worker {
|
|
|
409
453
|
): ToolCapability<I, O> {
|
|
410
454
|
this.#validateUniqueKey(key);
|
|
411
455
|
const capability = createToolCapability(key, config);
|
|
412
|
-
|
|
413
|
-
this.#capabilities.set(key, capability as ToolCapability<any, any>);
|
|
456
|
+
this.#capabilities.set(key, capability);
|
|
414
457
|
return capability;
|
|
415
458
|
}
|
|
416
459
|
|
|
@@ -446,16 +489,50 @@ export class Worker {
|
|
|
446
489
|
* @param config - The automation configuration.
|
|
447
490
|
* @returns The capability object.
|
|
448
491
|
*/
|
|
449
|
-
automation(
|
|
450
|
-
key: string,
|
|
451
|
-
config: AutomationConfiguration,
|
|
452
|
-
): AutomationCapability {
|
|
492
|
+
automation(key: string, config: AutomationConfiguration): AutomationCapability {
|
|
453
493
|
this.#validateUniqueKey(key);
|
|
454
494
|
const capability = createAutomationCapability(key, config);
|
|
455
495
|
this.#capabilities.set(key, capability);
|
|
456
496
|
return capability;
|
|
457
497
|
}
|
|
458
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Register a workflow capability.
|
|
501
|
+
*
|
|
502
|
+
* Example:
|
|
503
|
+
*
|
|
504
|
+
* ```ts
|
|
505
|
+
* import { Worker } from "@notionhq/workers";
|
|
506
|
+
* import { triggers } from "@notionhq/workers/triggers";
|
|
507
|
+
*
|
|
508
|
+
* const worker = new Worker();
|
|
509
|
+
* export default worker;
|
|
510
|
+
*
|
|
511
|
+
* worker.workflow("sendWelcomeEmail", {
|
|
512
|
+
* title: "Send Welcome Email",
|
|
513
|
+
* description: "Sends a welcome email when a new user is added",
|
|
514
|
+
* triggers: [triggers.notionPageCreated()],
|
|
515
|
+
* execute: async (event) => {
|
|
516
|
+
* console.log(event.page);
|
|
517
|
+
* console.log(event.content);
|
|
518
|
+
* },
|
|
519
|
+
* })
|
|
520
|
+
* ```
|
|
521
|
+
*
|
|
522
|
+
* @param key - The unique key for this capability.
|
|
523
|
+
* @param config - The workflow configuration.
|
|
524
|
+
* @returns The capability object.
|
|
525
|
+
*/
|
|
526
|
+
workflow<const TTriggers extends readonly [WorkflowTrigger, ...WorkflowTrigger[]]>(
|
|
527
|
+
key: string,
|
|
528
|
+
config: WorkflowConfiguration<TTriggers>,
|
|
529
|
+
): WorkflowCapability<TTriggers> {
|
|
530
|
+
this.#validateUniqueKey(key);
|
|
531
|
+
const capability = createWorkflowCapability(key, config);
|
|
532
|
+
this.#capabilities.set(key, capability);
|
|
533
|
+
return capability;
|
|
534
|
+
}
|
|
535
|
+
|
|
459
536
|
/**
|
|
460
537
|
* Register a webhook capability.
|
|
461
538
|
*
|
|
@@ -539,6 +616,51 @@ export class Worker {
|
|
|
539
616
|
return capability;
|
|
540
617
|
}
|
|
541
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Register a custom block capability.
|
|
621
|
+
*
|
|
622
|
+
* A custom block is a front-end view that the deploy pipeline builds from
|
|
623
|
+
* the source entry into a deployable bundle. It can optionally declare a
|
|
624
|
+
* data-source *schema* (`name`, and optional `description`, `icon`, and
|
|
625
|
+
* `properties`) that the block reads.
|
|
626
|
+
*
|
|
627
|
+
* Example:
|
|
628
|
+
*
|
|
629
|
+
* ```ts
|
|
630
|
+
* const worker = new Worker();
|
|
631
|
+
* export default worker;
|
|
632
|
+
*
|
|
633
|
+
* worker.customBlock("issueBoard", {
|
|
634
|
+
* version: 1,
|
|
635
|
+
* path: "./views/issueBoard",
|
|
636
|
+
* dataSources: {
|
|
637
|
+
* issues: {
|
|
638
|
+
* name: "Issues",
|
|
639
|
+
* properties: {
|
|
640
|
+
* title: { name: "Title", type: "title" },
|
|
641
|
+
* status: { name: "Status", type: "status" },
|
|
642
|
+
* },
|
|
643
|
+
* },
|
|
644
|
+
* },
|
|
645
|
+
* });
|
|
646
|
+
* ```
|
|
647
|
+
*
|
|
648
|
+
* The manifest keys (`version`, `dataSources`) are top-level on the config;
|
|
649
|
+
* the SDK assembles the deploy-wire `CustomBlockManifest` from them. Binding
|
|
650
|
+
* each declared data source to a concrete managed database is instance-level
|
|
651
|
+
* and handled at deploy time — the worker does not emit bindings.
|
|
652
|
+
*
|
|
653
|
+
* @param key - The unique key for this block (the block declaration key).
|
|
654
|
+
* @param config - The custom block configuration (a `project`/`static` source folder + optional `version`/`dataSources` schema).
|
|
655
|
+
* @returns The custom block capability.
|
|
656
|
+
*/
|
|
657
|
+
customBlock(key: string, config: CustomBlockConfiguration): CustomBlockCapability {
|
|
658
|
+
this.#validateUniqueKey(key);
|
|
659
|
+
const capability = createCustomBlockCapability(key, config);
|
|
660
|
+
this.#capabilities.set(key, capability);
|
|
661
|
+
return capability;
|
|
662
|
+
}
|
|
663
|
+
|
|
542
664
|
/**
|
|
543
665
|
* Get all registered capabilities (for discovery) without their handlers.
|
|
544
666
|
*/
|
|
@@ -567,11 +689,7 @@ export class Worker {
|
|
|
567
689
|
* @param options - Additional options for execution (e.g. for testing).
|
|
568
690
|
* @returns The result of the capability execution.
|
|
569
691
|
*/
|
|
570
|
-
async run(
|
|
571
|
-
key: string,
|
|
572
|
-
context: unknown,
|
|
573
|
-
options: HandlerOptions = {},
|
|
574
|
-
): Promise<unknown> {
|
|
692
|
+
async run(key: string, context: unknown, options: HandlerOptions = {}): Promise<unknown> {
|
|
575
693
|
const capability = this.#capabilities.get(key);
|
|
576
694
|
|
|
577
695
|
if (!capability) {
|
|
@@ -584,23 +702,28 @@ export class Worker {
|
|
|
584
702
|
);
|
|
585
703
|
}
|
|
586
704
|
|
|
705
|
+
if (capability._tag === "custom_block") {
|
|
706
|
+
throw new Error(
|
|
707
|
+
`Cannot run custom block capability "${key}" - custom blocks only provide configuration`,
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
|
|
587
711
|
if (!capability.handler) {
|
|
588
712
|
throw new Error(`Capability "${key}" cannot be executed`);
|
|
589
713
|
}
|
|
590
714
|
|
|
591
|
-
//
|
|
592
|
-
|
|
715
|
+
// The store erases handler parameter types to `never` (see
|
|
716
|
+
// `StoredCapability`); the platform guarantees the context passed by
|
|
717
|
+
// external code matches the capability's declared input, so re-assert
|
|
718
|
+
// that contract here.
|
|
719
|
+
return capability.handler(context as never, options);
|
|
593
720
|
}
|
|
594
721
|
|
|
595
722
|
#validateUniqueKey(key: string): void {
|
|
596
723
|
if (!key || typeof key !== "string") {
|
|
597
724
|
throw new Error("Capability key must be a non-empty string");
|
|
598
725
|
}
|
|
599
|
-
if (
|
|
600
|
-
this.#capabilities.has(key) ||
|
|
601
|
-
this.#databases.has(key) ||
|
|
602
|
-
this.#pacers.has(key)
|
|
603
|
-
) {
|
|
726
|
+
if (this.#capabilities.has(key) || this.#databases.has(key) || this.#pacers.has(key)) {
|
|
604
727
|
throw new Error(`Worker item with key "${key}" already registered`);
|
|
605
728
|
}
|
|
606
729
|
}
|
package/dist/block.d.ts
DELETED
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
type ApiColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
|
|
2
|
-
type RichTextAnnotations = {
|
|
3
|
-
bold: boolean;
|
|
4
|
-
italic: boolean;
|
|
5
|
-
strikethrough: boolean;
|
|
6
|
-
underline: boolean;
|
|
7
|
-
code: boolean;
|
|
8
|
-
color: ApiColor;
|
|
9
|
-
};
|
|
10
|
-
type RichTextBase = {
|
|
11
|
-
plain_text: string;
|
|
12
|
-
href: string | null;
|
|
13
|
-
annotations: RichTextAnnotations;
|
|
14
|
-
};
|
|
15
|
-
type TextContent = {
|
|
16
|
-
content: string;
|
|
17
|
-
link: {
|
|
18
|
-
url: string;
|
|
19
|
-
} | null;
|
|
20
|
-
};
|
|
21
|
-
type EquationContent = {
|
|
22
|
-
expression: string;
|
|
23
|
-
};
|
|
24
|
-
type DateMention = {
|
|
25
|
-
type: "date";
|
|
26
|
-
date: {
|
|
27
|
-
start: string;
|
|
28
|
-
end?: string | null;
|
|
29
|
-
time_zone?: string | null;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type CustomEmojiMention = {
|
|
33
|
-
type: "custom_emoji";
|
|
34
|
-
custom_emoji: {
|
|
35
|
-
id: string;
|
|
36
|
-
name?: string;
|
|
37
|
-
url?: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
type LinkPreviewMention = {
|
|
41
|
-
type: "link_preview";
|
|
42
|
-
link_preview: {
|
|
43
|
-
url: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
type LinkMention = {
|
|
47
|
-
type: "link_mention";
|
|
48
|
-
link_mention: {
|
|
49
|
-
href: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
type MentionContent = DateMention | CustomEmojiMention | LinkPreviewMention | LinkMention;
|
|
53
|
-
type RichTextItem = RichTextBase & ({
|
|
54
|
-
type: "text";
|
|
55
|
-
text: TextContent;
|
|
56
|
-
} | {
|
|
57
|
-
type: "mention";
|
|
58
|
-
mention: MentionContent;
|
|
59
|
-
} | {
|
|
60
|
-
type: "equation";
|
|
61
|
-
equation: EquationContent;
|
|
62
|
-
});
|
|
63
|
-
type RichText = RichTextItem[];
|
|
64
|
-
type EmojiIcon = {
|
|
65
|
-
type: "emoji";
|
|
66
|
-
emoji: string;
|
|
67
|
-
};
|
|
68
|
-
type ExternalIcon = {
|
|
69
|
-
type: "external";
|
|
70
|
-
external: {
|
|
71
|
-
url: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
type FileIcon = {
|
|
75
|
-
type: "file";
|
|
76
|
-
file: {
|
|
77
|
-
url: string;
|
|
78
|
-
expiry_time: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
type Icon = EmojiIcon | ExternalIcon | FileIcon;
|
|
82
|
-
type ExternalFile = {
|
|
83
|
-
type: "external";
|
|
84
|
-
external: {
|
|
85
|
-
url: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
type HostedFile = {
|
|
89
|
-
type: "file";
|
|
90
|
-
file: {
|
|
91
|
-
url: string;
|
|
92
|
-
expiry_time: string;
|
|
93
|
-
};
|
|
94
|
-
name?: string;
|
|
95
|
-
};
|
|
96
|
-
type FileObject = ExternalFile | HostedFile;
|
|
97
|
-
type BlockBase = {
|
|
98
|
-
object: "block";
|
|
99
|
-
};
|
|
100
|
-
type ParagraphBlock = BlockBase & {
|
|
101
|
-
type: "paragraph";
|
|
102
|
-
paragraph: {
|
|
103
|
-
rich_text: RichText;
|
|
104
|
-
color?: ApiColor;
|
|
105
|
-
children?: Block[];
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
type Heading1Block = BlockBase & {
|
|
109
|
-
type: "heading_1";
|
|
110
|
-
heading_1: {
|
|
111
|
-
rich_text: RichText;
|
|
112
|
-
color?: ApiColor;
|
|
113
|
-
is_toggleable?: boolean;
|
|
114
|
-
children?: Block[];
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
type Heading2Block = BlockBase & {
|
|
118
|
-
type: "heading_2";
|
|
119
|
-
heading_2: {
|
|
120
|
-
rich_text: RichText;
|
|
121
|
-
color?: ApiColor;
|
|
122
|
-
is_toggleable?: boolean;
|
|
123
|
-
children?: Block[];
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
type Heading3Block = BlockBase & {
|
|
127
|
-
type: "heading_3";
|
|
128
|
-
heading_3: {
|
|
129
|
-
rich_text: RichText;
|
|
130
|
-
color?: ApiColor;
|
|
131
|
-
is_toggleable?: boolean;
|
|
132
|
-
children?: Block[];
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
type BulletedListItemBlock = BlockBase & {
|
|
136
|
-
type: "bulleted_list_item";
|
|
137
|
-
bulleted_list_item: {
|
|
138
|
-
rich_text: RichText;
|
|
139
|
-
color?: ApiColor;
|
|
140
|
-
children?: Block[];
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
type NumberedListItemBlock = BlockBase & {
|
|
144
|
-
type: "numbered_list_item";
|
|
145
|
-
numbered_list_item: {
|
|
146
|
-
rich_text: RichText;
|
|
147
|
-
color?: ApiColor;
|
|
148
|
-
children?: Block[];
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
type ToDoBlock = BlockBase & {
|
|
152
|
-
type: "to_do";
|
|
153
|
-
to_do: {
|
|
154
|
-
rich_text: RichText;
|
|
155
|
-
checked: boolean;
|
|
156
|
-
color?: ApiColor;
|
|
157
|
-
children?: Block[];
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
type ToggleBlock = BlockBase & {
|
|
161
|
-
type: "toggle";
|
|
162
|
-
toggle: {
|
|
163
|
-
rich_text: RichText;
|
|
164
|
-
color?: ApiColor;
|
|
165
|
-
children?: Block[];
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
type QuoteBlock = BlockBase & {
|
|
169
|
-
type: "quote";
|
|
170
|
-
quote: {
|
|
171
|
-
rich_text: RichText;
|
|
172
|
-
color?: ApiColor;
|
|
173
|
-
children?: Block[];
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
type CalloutBlock = BlockBase & {
|
|
177
|
-
type: "callout";
|
|
178
|
-
callout: {
|
|
179
|
-
rich_text: RichText;
|
|
180
|
-
icon?: Icon | null;
|
|
181
|
-
color?: ApiColor;
|
|
182
|
-
children?: Block[];
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
type CodeBlock = BlockBase & {
|
|
186
|
-
type: "code";
|
|
187
|
-
code: {
|
|
188
|
-
rich_text: RichText;
|
|
189
|
-
caption?: RichText;
|
|
190
|
-
language: string;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
type EquationBlock = BlockBase & {
|
|
194
|
-
type: "equation";
|
|
195
|
-
equation: {
|
|
196
|
-
expression: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
type DividerBlock = BlockBase & {
|
|
200
|
-
type: "divider";
|
|
201
|
-
divider: Record<string, never>;
|
|
202
|
-
};
|
|
203
|
-
type BreadcrumbBlock = BlockBase & {
|
|
204
|
-
type: "breadcrumb";
|
|
205
|
-
breadcrumb: Record<string, never>;
|
|
206
|
-
};
|
|
207
|
-
type TableOfContentsBlock = BlockBase & {
|
|
208
|
-
type: "table_of_contents";
|
|
209
|
-
table_of_contents: {
|
|
210
|
-
color?: ApiColor;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
type ColumnListBlock = BlockBase & {
|
|
214
|
-
type: "column_list";
|
|
215
|
-
column_list: {
|
|
216
|
-
children: ColumnBlock[];
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
type ColumnBlock = BlockBase & {
|
|
220
|
-
type: "column";
|
|
221
|
-
column: {
|
|
222
|
-
children?: Block[];
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
type ImageBlock = BlockBase & {
|
|
226
|
-
type: "image";
|
|
227
|
-
image: FileObject & {
|
|
228
|
-
caption?: RichText;
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
type VideoBlock = BlockBase & {
|
|
232
|
-
type: "video";
|
|
233
|
-
video: FileObject & {
|
|
234
|
-
caption?: RichText;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
type AudioBlock = BlockBase & {
|
|
238
|
-
type: "audio";
|
|
239
|
-
audio: FileObject & {
|
|
240
|
-
caption?: RichText;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
type PDFBlock = BlockBase & {
|
|
244
|
-
type: "pdf";
|
|
245
|
-
pdf: FileObject & {
|
|
246
|
-
caption?: RichText;
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
type FileBlock = BlockBase & {
|
|
250
|
-
type: "file";
|
|
251
|
-
file: FileObject & {
|
|
252
|
-
caption?: RichText;
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
type EmbedBlock = BlockBase & {
|
|
256
|
-
type: "embed";
|
|
257
|
-
embed: {
|
|
258
|
-
url: string;
|
|
259
|
-
caption?: RichText;
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
type BookmarkBlock = BlockBase & {
|
|
263
|
-
type: "bookmark";
|
|
264
|
-
bookmark: {
|
|
265
|
-
url: string;
|
|
266
|
-
caption?: RichText;
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
type LinkPreviewBlock = BlockBase & {
|
|
270
|
-
type: "link_preview";
|
|
271
|
-
link_preview: {
|
|
272
|
-
url: string;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
type ChildPageBlock = BlockBase & {
|
|
276
|
-
type: "child_page";
|
|
277
|
-
child_page: {
|
|
278
|
-
title: string;
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
type ChildDatabaseBlock = BlockBase & {
|
|
282
|
-
type: "child_database";
|
|
283
|
-
child_database: {
|
|
284
|
-
title: string;
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
type TemplateBlock = BlockBase & {
|
|
288
|
-
type: "template";
|
|
289
|
-
template: {
|
|
290
|
-
rich_text: RichText;
|
|
291
|
-
children?: Block[];
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
type TableBlock = BlockBase & {
|
|
295
|
-
type: "table";
|
|
296
|
-
table: {
|
|
297
|
-
table_width: number;
|
|
298
|
-
has_column_header: boolean;
|
|
299
|
-
has_row_header: boolean;
|
|
300
|
-
children: TableRowBlock[];
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
type TableRowBlock = BlockBase & {
|
|
304
|
-
type: "table_row";
|
|
305
|
-
table_row: {
|
|
306
|
-
cells: RichText[];
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
type AIBlock = BlockBase & {
|
|
310
|
-
type: "ai_block";
|
|
311
|
-
ai_block: {
|
|
312
|
-
prompt?: string;
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
type UnsupportedBlock = BlockBase & {
|
|
316
|
-
type: "unsupported";
|
|
317
|
-
unsupported: Record<string, never>;
|
|
318
|
-
};
|
|
319
|
-
type Block = ParagraphBlock | Heading1Block | Heading2Block | Heading3Block | BulletedListItemBlock | NumberedListItemBlock | ToDoBlock | ToggleBlock | QuoteBlock | CalloutBlock | CodeBlock | EquationBlock | DividerBlock | BreadcrumbBlock | TableOfContentsBlock | ColumnListBlock | ColumnBlock | ImageBlock | VideoBlock | AudioBlock | PDFBlock | FileBlock | EmbedBlock | BookmarkBlock | LinkPreviewBlock | ChildPageBlock | ChildDatabaseBlock | TemplateBlock | TableBlock | TableRowBlock | AIBlock | UnsupportedBlock;
|
|
320
|
-
export type { RichText, RichTextItem, RichTextBase, RichTextAnnotations, TextContent, EquationContent, MentionContent, DateMention, CustomEmojiMention, LinkPreviewMention, LinkMention, ApiColor, Icon, EmojiIcon, ExternalIcon, FileIcon, FileObject, ExternalFile, HostedFile, BlockBase, ParagraphBlock, Heading1Block, Heading2Block, Heading3Block, BulletedListItemBlock, NumberedListItemBlock, ToDoBlock, ToggleBlock, QuoteBlock, CalloutBlock, CodeBlock, EquationBlock, DividerBlock, BreadcrumbBlock, TableOfContentsBlock, ColumnListBlock, ColumnBlock, ImageBlock, VideoBlock, AudioBlock, PDFBlock, FileBlock, EmbedBlock, BookmarkBlock, LinkPreviewBlock, ChildPageBlock, ChildDatabaseBlock, TemplateBlock, TableBlock, TableRowBlock, AIBlock, UnsupportedBlock, Block, };
|
|
321
|
-
//# sourceMappingURL=block.d.ts.map
|
package/dist/block.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AAKA,KAAK,QAAQ,GACV,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,GACL,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,CAAC;AAGpB,KAAK,mBAAmB,GAAG;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB,CAAC;AAGF,KAAK,YAAY,GAAG;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,mBAAmB,CAAC;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