@notionhq/workers 0.5.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.
Files changed (189) hide show
  1. package/dist/alpha/builder.d.ts +149 -0
  2. package/dist/alpha/builder.d.ts.map +1 -0
  3. package/dist/alpha/builder.js +260 -0
  4. package/dist/alpha/builder.test.d.ts +2 -0
  5. package/dist/alpha/builder.test.d.ts.map +1 -0
  6. package/dist/alpha/cli/build.d.ts +13 -0
  7. package/dist/alpha/cli/build.d.ts.map +1 -0
  8. package/dist/alpha/cli/build.js +36 -0
  9. package/dist/alpha/cli/build.test.d.ts +2 -0
  10. package/dist/alpha/cli/build.test.d.ts.map +1 -0
  11. package/dist/alpha/cli/codegen.d.ts +10 -0
  12. package/dist/alpha/cli/codegen.d.ts.map +1 -0
  13. package/dist/alpha/cli/codegen.js +41 -0
  14. package/dist/alpha/cli/codegen.test.d.ts +2 -0
  15. package/dist/alpha/cli/codegen.test.d.ts.map +1 -0
  16. package/dist/alpha/cli/discover.d.ts +35 -0
  17. package/dist/alpha/cli/discover.d.ts.map +1 -0
  18. package/dist/alpha/cli/discover.js +39 -0
  19. package/dist/alpha/cli/discover.test.d.ts +2 -0
  20. package/dist/alpha/cli/discover.test.d.ts.map +1 -0
  21. package/dist/alpha/cli/emit-manifest.d.ts +33 -0
  22. package/dist/alpha/cli/emit-manifest.d.ts.map +1 -0
  23. package/dist/alpha/cli/emit-manifest.js +266 -0
  24. package/dist/alpha/cli/emit-manifest.test.d.ts +2 -0
  25. package/dist/alpha/cli/emit-manifest.test.d.ts.map +1 -0
  26. package/dist/alpha/cli/index.d.ts +3 -0
  27. package/dist/alpha/cli/index.d.ts.map +1 -0
  28. package/dist/alpha/cli/index.js +36 -0
  29. package/dist/alpha/context.d.ts +8 -0
  30. package/dist/alpha/context.d.ts.map +1 -0
  31. package/dist/alpha/context.js +33 -0
  32. package/dist/alpha/database.d.ts +90 -0
  33. package/dist/alpha/database.d.ts.map +1 -0
  34. package/dist/alpha/database.js +9 -0
  35. package/dist/alpha/error.d.ts +41 -0
  36. package/dist/alpha/error.d.ts.map +1 -0
  37. package/dist/alpha/error.js +25 -0
  38. package/dist/alpha/icon-names.d.ts +6 -0
  39. package/dist/alpha/icon-names.d.ts.map +1 -0
  40. package/dist/alpha/icon-names.js +0 -0
  41. package/dist/alpha/json-schema.d.ts +117 -0
  42. package/dist/alpha/json-schema.d.ts.map +1 -0
  43. package/dist/alpha/json-schema.js +0 -0
  44. package/dist/alpha/manifest.d.ts +44 -0
  45. package/dist/alpha/manifest.d.ts.map +1 -0
  46. package/dist/alpha/manifest.js +0 -0
  47. package/dist/alpha/output.d.ts +7 -0
  48. package/dist/alpha/output.d.ts.map +1 -0
  49. package/dist/alpha/output.js +8 -0
  50. package/dist/alpha/pacer.d.ts +74 -0
  51. package/dist/alpha/pacer.d.ts.map +1 -0
  52. package/dist/alpha/pacer.js +66 -0
  53. package/dist/alpha/pacer.test.d.ts +2 -0
  54. package/dist/alpha/pacer.test.d.ts.map +1 -0
  55. package/dist/alpha/schedule.d.ts +6 -0
  56. package/dist/alpha/schedule.d.ts.map +1 -0
  57. package/dist/alpha/schedule.js +43 -0
  58. package/dist/alpha/schedule.test.d.ts +2 -0
  59. package/dist/alpha/schedule.test.d.ts.map +1 -0
  60. package/dist/alpha/schema-builder.d.ts +79 -0
  61. package/dist/alpha/schema-builder.d.ts.map +1 -0
  62. package/dist/alpha/schema-builder.js +135 -0
  63. package/dist/alpha/schema.d.ts +185 -0
  64. package/dist/alpha/schema.d.ts.map +1 -0
  65. package/dist/alpha/schema.js +115 -0
  66. package/dist/alpha/sync.d.ts +233 -0
  67. package/dist/alpha/sync.d.ts.map +1 -0
  68. package/dist/alpha/sync.js +70 -0
  69. package/dist/alpha/sync.test.d.ts +2 -0
  70. package/dist/alpha/sync.test.d.ts.map +1 -0
  71. package/dist/alpha/tool.d.ts +132 -0
  72. package/dist/alpha/tool.d.ts.map +1 -0
  73. package/dist/alpha/tool.js +156 -0
  74. package/dist/alpha/tool.test.d.ts +2 -0
  75. package/dist/alpha/tool.test.d.ts.map +1 -0
  76. package/dist/alpha/triggers.d.ts +365 -0
  77. package/dist/alpha/triggers.d.ts.map +1 -0
  78. package/dist/alpha/triggers.generated.d.ts +246 -0
  79. package/dist/alpha/triggers.generated.d.ts.map +1 -0
  80. package/dist/alpha/triggers.generated.js +239 -0
  81. package/dist/alpha/triggers.js +0 -0
  82. package/dist/alpha/types.d.ts +228 -0
  83. package/dist/alpha/types.d.ts.map +1 -0
  84. package/dist/alpha/types.js +0 -0
  85. package/dist/alpha/workflow.d.ts +70 -0
  86. package/dist/alpha/workflow.d.ts.map +1 -0
  87. package/dist/alpha/workflow.js +39 -0
  88. package/dist/alpha/workflow.test.d.ts +2 -0
  89. package/dist/alpha/workflow.test.d.ts.map +1 -0
  90. package/dist/builder.d.ts.map +1 -1
  91. package/dist/builder.js +2 -6
  92. package/dist/capabilities/ai_connector.d.ts.map +1 -1
  93. package/dist/capabilities/automation.d.ts.map +1 -1
  94. package/dist/capabilities/context.d.ts.map +1 -1
  95. package/dist/capabilities/custom-block.d.ts +124 -0
  96. package/dist/capabilities/custom-block.d.ts.map +1 -0
  97. package/dist/capabilities/custom-block.js +22 -0
  98. package/dist/capabilities/oauth.d.ts.map +1 -1
  99. package/dist/capabilities/output.d.ts.map +1 -1
  100. package/dist/capabilities/output.js +2 -4
  101. package/dist/capabilities/stateful-capability.d.ts.map +1 -1
  102. package/dist/capabilities/stateful-capability.js +2 -6
  103. package/dist/capabilities/sync.d.ts.map +1 -1
  104. package/dist/capabilities/sync.js +2 -8
  105. package/dist/capabilities/tool.d.ts.map +1 -1
  106. package/dist/capabilities/tool.js +6 -20
  107. package/dist/capabilities/webhook.d.ts.map +1 -1
  108. package/dist/capabilities/workflow.d.ts +2 -2
  109. package/dist/capabilities/workflow.d.ts.map +1 -1
  110. package/dist/index.d.ts +3 -2
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +1 -7
  113. package/dist/json-schema.d.ts.map +1 -1
  114. package/dist/schema-builder.d.ts.map +1 -1
  115. package/dist/schema.d.ts.map +1 -1
  116. package/dist/types.d.ts.map +1 -1
  117. package/dist/worker.d.ts +41 -1
  118. package/dist/worker.d.ts.map +1 -1
  119. package/dist/worker.js +51 -4
  120. package/package.json +74 -14
  121. package/src/alpha/ajv-formats.d.ts +7 -0
  122. package/src/alpha/builder.test.ts +197 -0
  123. package/src/alpha/builder.ts +338 -0
  124. package/src/alpha/cli/build.test.ts +240 -0
  125. package/src/alpha/cli/build.ts +57 -0
  126. package/src/alpha/cli/codegen.test.ts +31 -0
  127. package/src/alpha/cli/codegen.ts +51 -0
  128. package/src/alpha/cli/discover.test.ts +43 -0
  129. package/src/alpha/cli/discover.ts +81 -0
  130. package/src/alpha/cli/emit-manifest.test.ts +45 -0
  131. package/src/alpha/cli/emit-manifest.ts +409 -0
  132. package/src/alpha/cli/index.ts +41 -0
  133. package/src/alpha/context.ts +61 -0
  134. package/src/alpha/database.ts +102 -0
  135. package/src/alpha/error.ts +49 -0
  136. package/src/alpha/icon-names.ts +890 -0
  137. package/src/alpha/json-schema.ts +180 -0
  138. package/src/alpha/manifest.ts +47 -0
  139. package/src/alpha/output.ts +8 -0
  140. package/src/alpha/pacer.test.ts +81 -0
  141. package/src/alpha/pacer.ts +181 -0
  142. package/src/alpha/schedule.test.ts +31 -0
  143. package/src/alpha/schedule.ts +53 -0
  144. package/src/alpha/schema-builder.ts +193 -0
  145. package/src/alpha/schema.ts +222 -0
  146. package/src/alpha/sync.test.ts +191 -0
  147. package/src/alpha/sync.ts +340 -0
  148. package/src/alpha/tool.test.ts +116 -0
  149. package/src/alpha/tool.ts +319 -0
  150. package/src/alpha/triggers.generated.ts +489 -0
  151. package/src/alpha/triggers.ts +500 -0
  152. package/src/alpha/types.ts +284 -0
  153. package/src/alpha/workflow.test.ts +84 -0
  154. package/src/alpha/workflow.ts +131 -0
  155. package/src/builder.test.ts +28 -60
  156. package/src/builder.ts +3 -10
  157. package/src/capabilities/ai_connector.test.ts +9 -32
  158. package/src/capabilities/ai_connector.ts +5 -17
  159. package/src/capabilities/automation.test.ts +3 -12
  160. package/src/capabilities/automation.ts +3 -11
  161. package/src/capabilities/context.ts +3 -6
  162. package/src/capabilities/custom-block.ts +181 -0
  163. package/src/capabilities/oauth.test.ts +1 -0
  164. package/src/capabilities/oauth.ts +1 -3
  165. package/src/capabilities/output.ts +1 -3
  166. package/src/capabilities/stateful-capability.test.ts +1 -0
  167. package/src/capabilities/stateful-capability.ts +2 -6
  168. package/src/capabilities/sync.test.ts +15 -45
  169. package/src/capabilities/sync.ts +10 -40
  170. package/src/capabilities/tool.test.ts +106 -146
  171. package/src/capabilities/tool.ts +17 -39
  172. package/src/capabilities/webhook.ts +3 -10
  173. package/src/capabilities/workflow.test.ts +10 -31
  174. package/src/capabilities/workflow.ts +5 -12
  175. package/src/index.ts +9 -12
  176. package/src/json-schema.test.ts +2 -4
  177. package/src/json-schema.ts +7 -6
  178. package/src/pacer.test.ts +1 -3
  179. package/src/pacer_internal.ts +1 -5
  180. package/src/schema-builder.test.ts +10 -35
  181. package/src/schema-builder.ts +5 -16
  182. package/src/schema.ts +2 -10
  183. package/src/types.ts +1 -7
  184. package/src/worker.test.ts +147 -0
  185. package/src/worker.ts +67 -35
  186. package/dist/block.d.ts +0 -321
  187. package/dist/block.d.ts.map +0 -1
  188. package/src/block.ts +0 -529
  189. /package/dist/{block.js → alpha/ajv-formats.d.js} +0 -0
@@ -0,0 +1,266 @@
1
+ import { createRequire } from "node:module";
2
+ import { pathToFileURL } from "node:url";
3
+ import { Ajv } from "ajv";
4
+ import { clearRegisteredPacers, registeredPacers } from "../pacer.js";
5
+ const SDK_VERSION = (() => {
6
+ const require2 = createRequire(import.meta.url);
7
+ const packageJson = require2("../../../package.json");
8
+ if (typeof packageJson !== "object" || packageJson === null || !("version" in packageJson) || typeof packageJson.version !== "string") {
9
+ throw new Error("Failed to read SDK version from package.json");
10
+ }
11
+ return packageJson.version;
12
+ })();
13
+ const MANIFEST_SCHEMA = {
14
+ type: "object",
15
+ properties: {
16
+ sdkVersion: { type: "string" },
17
+ databases: {
18
+ type: "array",
19
+ items: {
20
+ type: "object",
21
+ properties: {
22
+ key: { type: "string" },
23
+ config: {}
24
+ },
25
+ required: ["key", "config"],
26
+ additionalProperties: false
27
+ }
28
+ },
29
+ pacers: {
30
+ type: "array",
31
+ items: {
32
+ type: "object",
33
+ properties: {
34
+ key: { type: "string" },
35
+ config: {}
36
+ },
37
+ required: ["key", "config"],
38
+ additionalProperties: false
39
+ }
40
+ },
41
+ capabilities: {
42
+ type: "array",
43
+ items: {
44
+ type: "object",
45
+ properties: {
46
+ type: { type: "string" },
47
+ key: { type: "string" },
48
+ config: {}
49
+ },
50
+ required: ["type", "key", "config"],
51
+ additionalProperties: false
52
+ }
53
+ }
54
+ },
55
+ required: ["sdkVersion", "databases", "pacers", "capabilities"],
56
+ additionalProperties: false
57
+ };
58
+ class DatabaseCollector {
59
+ /** Database object → name, for identity-based dedup. */
60
+ #names = /* @__PURE__ */ new Map();
61
+ /** Name → database object, for detecting distinct objects sharing a name. */
62
+ #byName = /* @__PURE__ */ new Map();
63
+ /** Names in first-seen order, for deterministic manifest output. */
64
+ #order = [];
65
+ /**
66
+ * Register a database and, transitively, every database its schema's
67
+ * relation properties reference. Returns the database's name.
68
+ */
69
+ collect(value, referencedFrom) {
70
+ const known = this.#names.get(value);
71
+ if (known !== void 0) {
72
+ return known;
73
+ }
74
+ const database = asDatabase(value);
75
+ if (!database) {
76
+ throw new Error(`${referencedFrom}: expected a database created with createDatabase(...)`);
77
+ }
78
+ const existing = this.#byName.get(database.name);
79
+ if (existing && existing !== value) {
80
+ throw new Error(
81
+ `Two distinct databases are named "${database.name}" (found via ${referencedFrom}). A name identifies one database \u2014 share a single createDatabase(...) instance via import instead of declaring it twice`
82
+ );
83
+ }
84
+ this.#names.set(value, database.name);
85
+ this.#byName.set(database.name, database);
86
+ this.#order.push(database.name);
87
+ validatePrimaryKey(database);
88
+ for (const [propertyName, property] of schemaProperties(database)) {
89
+ if (isRelationProperty(property)) {
90
+ this.collect(
91
+ property.database,
92
+ `relation property "${propertyName}" of database "${database.name}"`
93
+ );
94
+ }
95
+ }
96
+ return database.name;
97
+ }
98
+ /** Manifest entries with relation references resolved to names. */
99
+ entries() {
100
+ return this.#order.map((name) => {
101
+ const database = this.#byName.get(name);
102
+ const resolvedProperties = {};
103
+ for (const [propertyName, property] of schemaProperties(database)) {
104
+ if (isRelationProperty(property)) {
105
+ const { database: target, ...rest } = property;
106
+ resolvedProperties[propertyName] = {
107
+ ...rest,
108
+ relatedDatabaseKey: this.#names.get(target)
109
+ };
110
+ } else {
111
+ resolvedProperties[propertyName] = property;
112
+ }
113
+ }
114
+ const schema = database.config.schema;
115
+ return {
116
+ key: name,
117
+ config: { ...database.config, schema: { ...schema, properties: resolvedProperties } }
118
+ };
119
+ });
120
+ }
121
+ }
122
+ async function extractManifest(bundlePath, capabilities) {
123
+ clearRegisteredPacers();
124
+ const bundle = await importBundle(bundlePath);
125
+ const pacerEntries = registeredPacers().map((pacer) => ({
126
+ key: pacer.name,
127
+ config: pacer.config
128
+ }));
129
+ const capabilityRegistry = getCapabilityRegistry(bundle);
130
+ const databaseCollector = new DatabaseCollector();
131
+ const capabilityEntries = capabilities.map((capability) => {
132
+ const value = capabilityRegistry[capability.type]?.[capability.key];
133
+ const tagged = asTagged(value);
134
+ if (!tagged) {
135
+ throw new Error(`${capability.sourcePath}: default export is not a capability`);
136
+ }
137
+ if (tagged._tag !== capability.tag) {
138
+ throw new Error(
139
+ `${capability.sourcePath}: default export is not a ${capability.type} \u2014 files under this directory must default-export create${capitalize(capability.type)}(...)`
140
+ );
141
+ }
142
+ const config = { ...tagged.config };
143
+ if (capability.type === "sync") {
144
+ config.databaseKey = databaseCollector.collect(config.database, capability.sourcePath);
145
+ config.database = void 0;
146
+ }
147
+ assertJsonSafe(config, `${capability.sourcePath} config`);
148
+ return { type: capability.type, key: capability.key, config };
149
+ });
150
+ const databaseEntries = databaseCollector.entries();
151
+ for (const entry of databaseEntries) {
152
+ assertJsonSafe(entry.config, `database "${entry.key}" config`);
153
+ }
154
+ for (const entry of pacerEntries) {
155
+ assertJsonSafe(entry.config, `pacer "${entry.key}" config`);
156
+ }
157
+ const manifest = JSON.parse(
158
+ JSON.stringify({
159
+ sdkVersion: SDK_VERSION,
160
+ databases: databaseEntries,
161
+ pacers: pacerEntries,
162
+ capabilities: capabilityEntries
163
+ })
164
+ );
165
+ const ajv = new Ajv();
166
+ if (!ajv.validate(MANIFEST_SCHEMA, manifest)) {
167
+ throw new Error(`Generated manifest is invalid: ${ajv.errorsText(ajv.errors)}`);
168
+ }
169
+ return manifest;
170
+ }
171
+ function schemaProperties(database) {
172
+ const schema = database.config.schema;
173
+ if (typeof schema !== "object" || schema === null || !("properties" in schema) || typeof schema.properties !== "object" || schema.properties === null) {
174
+ throw new Error(`Database "${database.name}" has no schema.properties`);
175
+ }
176
+ return Object.entries(schema.properties);
177
+ }
178
+ function validatePrimaryKey(database) {
179
+ const propertyNames = schemaProperties(database).map(([name]) => name);
180
+ const primaryKey = database.config.primaryKey;
181
+ if (typeof primaryKey !== "string" || !propertyNames.includes(primaryKey)) {
182
+ throw new Error(
183
+ `Database "${database.name}": primaryKey "${String(primaryKey)}" is not a property in the schema`
184
+ );
185
+ }
186
+ }
187
+ function isRelationProperty(property) {
188
+ return typeof property === "object" && property !== null && "type" in property && property.type === "relation" && "database" in property;
189
+ }
190
+ let importNonce = 0;
191
+ async function importBundle(bundlePath) {
192
+ try {
193
+ return await import(`${pathToFileURL(bundlePath).href}?import=${importNonce++}`);
194
+ } catch (error) {
195
+ throw new Error(
196
+ `Failed to import built worker bundle. Capability modules must be importable without secrets or network access \u2014 check for top-level code that throws.
197
+ Caused by: ${error instanceof Error ? error.message : String(error)}`
198
+ );
199
+ }
200
+ }
201
+ function getCapabilityRegistry(bundle) {
202
+ if (typeof bundle !== "object" || bundle === null || !("capabilities" in bundle) || typeof bundle.capabilities !== "object" || bundle.capabilities === null) {
203
+ throw new Error(`Built worker bundle does not export a capability registry`);
204
+ }
205
+ return bundle.capabilities;
206
+ }
207
+ function asTagged(value) {
208
+ if (typeof value === "object" && value !== null && "_tag" in value && typeof value._tag === "string" && "config" in value && typeof value.config === "object" && value.config !== null) {
209
+ return value;
210
+ }
211
+ return void 0;
212
+ }
213
+ function asDatabase(value) {
214
+ const tagged = asTagged(value);
215
+ if (tagged?._tag === "database" && "name" in tagged && typeof tagged.name === "string") {
216
+ return tagged;
217
+ }
218
+ return void 0;
219
+ }
220
+ function capitalize(value) {
221
+ return value.charAt(0).toUpperCase() + value.slice(1);
222
+ }
223
+ function assertJsonSafe(value, path) {
224
+ const reject = (reason) => {
225
+ throw new Error(`${path}: not JSON-serializable (${reason})`);
226
+ };
227
+ switch (typeof value) {
228
+ case "function":
229
+ reject("function");
230
+ break;
231
+ case "symbol":
232
+ reject("symbol");
233
+ break;
234
+ case "bigint":
235
+ reject("bigint");
236
+ break;
237
+ case "number":
238
+ if (!Number.isFinite(value)) reject(String(value));
239
+ return;
240
+ case "string":
241
+ case "boolean":
242
+ case "undefined":
243
+ return;
244
+ }
245
+ if (value === null) return;
246
+ if (Array.isArray(value)) {
247
+ value.forEach((element, index) => {
248
+ if (element === void 0) reject(`undefined at [${index}]`);
249
+ assertJsonSafe(element, `${path}[${index}]`);
250
+ });
251
+ return;
252
+ }
253
+ const object = value;
254
+ const prototype = Object.getPrototypeOf(object);
255
+ if (prototype !== null && prototype !== Object.prototype) {
256
+ reject(object.constructor?.name ?? "non-plain object");
257
+ }
258
+ for (const [key, property] of Object.entries(object)) {
259
+ if (property === void 0) continue;
260
+ assertJsonSafe(property, `${path}.${key}`);
261
+ }
262
+ }
263
+ export {
264
+ assertJsonSafe,
265
+ extractManifest
266
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=emit-manifest.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit-manifest.test.d.ts","sourceRoot":"","sources":["../../../src/alpha/cli/emit-manifest.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alpha/cli/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import * as path from "node:path";
3
+ import { buildWorker } from "./build.js";
4
+ const USAGE = `Usage: notion-workers <command>
5
+
6
+ Commands:
7
+ build Build the worker in the current directory
8
+ `;
9
+ async function main() {
10
+ const command = process.argv[2];
11
+ switch (command) {
12
+ case "build": {
13
+ const projectRoot = process.cwd();
14
+ const { manifest, bundlePath, manifestPath } = await buildWorker(projectRoot);
15
+ const count = manifest.capabilities.length;
16
+ console.log(
17
+ `Built ${path.relative(projectRoot, bundlePath)} and ${path.relative(projectRoot, manifestPath)} (${count} ${count === 1 ? "capability" : "capabilities"})`
18
+ );
19
+ break;
20
+ }
21
+ case void 0:
22
+ case "help":
23
+ case "--help":
24
+ console.log(USAGE);
25
+ break;
26
+ default:
27
+ console.error(`Unknown command: ${command}
28
+
29
+ ${USAGE}`);
30
+ process.exitCode = 1;
31
+ }
32
+ }
33
+ main().catch((error) => {
34
+ console.error(error instanceof Error ? error.message : String(error));
35
+ process.exitCode = 1;
36
+ });
@@ -0,0 +1,8 @@
1
+ import { Client } from "@notionhq/client";
2
+ import type { CapabilityType } from "./manifest.js";
3
+ export type CapabilityContext = {
4
+ /** Notion API SDK client for this execution. */
5
+ notion: Client;
6
+ };
7
+ export declare function createCapabilityContext(capabilityType: CapabilityType): CapabilityContext;
8
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/alpha/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC/B,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAqCF,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,cAAc,GAAG,iBAAiB,CAezF"}
@@ -0,0 +1,33 @@
1
+ import { Client } from "@notionhq/client";
2
+ const FIX_STEPS = "\n\nTo fix this:\n1. Create a personal access token at https://app.notion.com/developers/tokens\n2. Add NOTION_API_TOKEN=<your-token> to your .env file\n3. For deployed workers, run: ntn workers env push";
3
+ function missingTokenMessage(capabilityType) {
4
+ if (capabilityType === "tool") {
5
+ return "NOTION_API_TOKEN is not set. When tools are called through a Custom Agent, the platform sets NOTION_API_TOKEN automatically, using the permissions of the Custom Agent. Outside of that context (e.g. ntn workers exec), you must set it yourself." + FIX_STEPS;
6
+ }
7
+ return `NOTION_API_TOKEN is not set. context.notion requires an API token to make requests in ${capabilityType} capabilities to Notion.` + FIX_STEPS;
8
+ }
9
+ function createUnauthenticatedNotionProxy(capabilityType) {
10
+ return new Proxy({}, {
11
+ get(_target, prop) {
12
+ if (prop === "then" || typeof prop === "symbol") {
13
+ return void 0;
14
+ }
15
+ throw new Error(missingTokenMessage(capabilityType));
16
+ }
17
+ });
18
+ }
19
+ function createCapabilityContext(capabilityType) {
20
+ const options = {};
21
+ if (process.env.NOTION_API_BASE_URL) {
22
+ options.baseUrl = process.env.NOTION_API_BASE_URL;
23
+ }
24
+ if (!process.env.NOTION_API_TOKEN) {
25
+ return { notion: createUnauthenticatedNotionProxy(capabilityType) };
26
+ }
27
+ options.auth = process.env.NOTION_API_TOKEN;
28
+ const notion = new Client(options);
29
+ return { notion };
30
+ }
31
+ export {
32
+ createCapabilityContext
33
+ };
@@ -0,0 +1,90 @@
1
+ import type { PropertySchema, Schema } from "./schema.js";
2
+ /**
3
+ * Configuration for a database that Notion creates and manages on behalf
4
+ * of the worker. The database is created on first deploy and its schema
5
+ * is migrated on subsequent deploys.
6
+ */
7
+ export type ManagedDatabaseConfig<S extends PropertySchema = PropertySchema> = {
8
+ type: "managed";
9
+ /**
10
+ * The title for the database when it is first created in Notion.
11
+ * Defaults to the database's name.
12
+ *
13
+ * Updating this after the database has been created will not change the
14
+ * title of the database — users may rename it freely.
15
+ */
16
+ initialTitle?: string;
17
+ /**
18
+ * The property that serves as the primary key for matching records.
19
+ * Must be a property defined in the schema. The value of this property
20
+ * should match the `key` field on each sync change.
21
+ */
22
+ primaryKey: Extract<keyof S, string>;
23
+ /**
24
+ * The database schema. Notion will migrate the database to match
25
+ * the given schema on worker deploy.
26
+ */
27
+ schema: Schema<S>;
28
+ };
29
+ /**
30
+ * Configuration union for all database types.
31
+ * Currently only `"managed"` is supported.
32
+ */
33
+ export type DatabaseConfig<S extends PropertySchema = PropertySchema> = ManagedDatabaseConfig<S>;
34
+ /**
35
+ * A database declaration as returned by {@link createDatabase}.
36
+ */
37
+ export type Database<S extends PropertySchema = PropertySchema> = {
38
+ _tag: "database";
39
+ name: string;
40
+ config: DatabaseConfig<S>;
41
+ };
42
+ /**
43
+ * Declare a database.
44
+ *
45
+ * A database can be declared anywhere — inline in a sync's config, in the
46
+ * sync's file, or in a shared module that several syncs import. The build
47
+ * discovers databases by walking capability configs: any database attached
48
+ * to a sync (or referenced by a `Schema.relation(...)`) is included in the
49
+ * manifest and created on deploy.
50
+ *
51
+ * The `name` is the database's stable identity across deploys — it is how
52
+ * the platform matches the declaration to the actual Notion database it
53
+ * created previously. Renaming it orphans that database, so treat it like a
54
+ * primary key: pick it once and leave it alone. Two distinct
55
+ * `createDatabase(...)` calls sharing a name fail the build; share one
56
+ * instance via import instead.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * // src/lib/databases.ts — shared by several syncs
61
+ * import { createDatabase } from "@notionhq/workers/alpha/database";
62
+ * import { Schema } from "@notionhq/workers/alpha/schema";
63
+ *
64
+ * export const projects = createDatabase("projects", {
65
+ * type: "managed",
66
+ * primaryKey: "Project ID",
67
+ * schema: {
68
+ * properties: {
69
+ * Name: Schema.title(),
70
+ * "Project ID": Schema.richText(),
71
+ * },
72
+ * },
73
+ * });
74
+ *
75
+ * export const tasks = createDatabase("tasks", {
76
+ * type: "managed",
77
+ * initialTitle: "Tasks",
78
+ * primaryKey: "Task ID",
79
+ * schema: {
80
+ * properties: {
81
+ * Title: Schema.title(),
82
+ * "Task ID": Schema.richText(),
83
+ * Project: Schema.relation(projects),
84
+ * },
85
+ * },
86
+ * });
87
+ * ```
88
+ */
89
+ export declare function createDatabase<S extends PropertySchema>(name: string, config: DatabaseConfig<S>): Database<S>;
90
+ //# sourceMappingURL=database.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/alpha/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;IAC9E,IAAI,EAAE,SAAS,CAAC;IAChB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACrC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;IACjE,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACtD,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GACvB,QAAQ,CAAC,CAAC,CAAC,CAMb"}
@@ -0,0 +1,9 @@
1
+ function createDatabase(name, config) {
2
+ if (!name || typeof name !== "string") {
3
+ throw new Error("Database name must be a non-empty string");
4
+ }
5
+ return { _tag: "database", name, config };
6
+ }
7
+ export {
8
+ createDatabase
9
+ };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * An error that occurred during the execution of a worker capability.
3
+ */
4
+ export declare class ExecutionError extends Error {
5
+ readonly cause: unknown;
6
+ constructor(cause: unknown);
7
+ }
8
+ /**
9
+ * Throw this error from your sync handler to signal that the external API
10
+ * returned a rate-limit response (e.g. HTTP 429).
11
+ *
12
+ * When the platform receives this error it applies exponential backoff
13
+ * instead of retrying immediately. If `retryAfter` is provided, the
14
+ * platform will wait at least that many seconds before the next attempt.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * handler: async () => {
19
+ * const res = await fetch("https://api.example.com/issues");
20
+ * if (res.status === 429) {
21
+ * const retryAfter = Number(res.headers.get("Retry-After"));
22
+ * throw new RateLimitError({
23
+ * retryAfter: Number.isFinite(retryAfter) ? retryAfter : undefined,
24
+ * });
25
+ * }
26
+ * // ...
27
+ * },
28
+ * ```
29
+ */
30
+ export declare class RateLimitError extends ExecutionError {
31
+ /**
32
+ * Optional number of seconds the external API asked us to wait
33
+ * before retrying. The platform takes the max of this value and its
34
+ * own exponential-backoff delay.
35
+ */
36
+ readonly retryAfter: number | undefined;
37
+ constructor(options?: {
38
+ retryAfter?: number;
39
+ });
40
+ }
41
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/alpha/error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACxC,SAAkB,KAAK,EAAE,OAAO,CAAC;gBAErB,KAAK,EAAE,OAAO;CAK1B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAe,SAAQ,cAAc;IACjD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE5B,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;CAK7C"}
@@ -0,0 +1,25 @@
1
+ class ExecutionError extends Error {
2
+ cause;
3
+ constructor(cause) {
4
+ super(`Error during worker execution: ${cause}`);
5
+ this.name = "ExecutionError";
6
+ this.cause = cause;
7
+ }
8
+ }
9
+ class RateLimitError extends ExecutionError {
10
+ /**
11
+ * Optional number of seconds the external API asked us to wait
12
+ * before retrying. The platform takes the max of this value and its
13
+ * own exponential-backoff delay.
14
+ */
15
+ retryAfter;
16
+ constructor(options) {
17
+ super("Rate limited by external API");
18
+ this.name = "RateLimitError";
19
+ this.retryAfter = options?.retryAfter;
20
+ }
21
+ }
22
+ export {
23
+ ExecutionError,
24
+ RateLimitError
25
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Valid Notion icon names
3
+ * Complete list from https://www.notion.so/icons/
4
+ */
5
+ export type NoticonName = "123" | "accessibility" | "activity" | "add" | "airplane" | "alarm" | "alert" | "alien" | "alien-pixel" | "ambulance" | "anchor" | "apple" | "apron" | "aquarius" | "arch-bridge" | "archery" | "archive" | "aries" | "arrivals" | "arrow-circle-down" | "arrow-down" | "arrow-down-basic" | "arrow-down-line" | "arrow-left" | "arrow-left-basic" | "arrow-left-line" | "arrow-northeast" | "arrow-northwest" | "arrow-right" | "arrow-right-basic" | "arrow-right-line" | "arrow-southeast" | "arrow-southwest" | "arrow-turn-left" | "arrow-turn-right" | "arrow-up" | "arrow-up-basic" | "arrow-up-line" | "arrows-horizontal" | "arrows-swap-horizontally" | "arrows-swap-vertically" | "arrows-vertical" | "art" | "asterisk" | "atm" | "attachment" | "avocado" | "baby" | "baby-bottle" | "backpack" | "backward" | "badge" | "bag" | "baggage-claim" | "balloon" | "banana" | "barcode" | "barricade" | "baseball" | "baseball-cap" | "basketball" | "bathtub" | "bathtub-shower" | "battery" | "battery-charged" | "battery-charging" | "bed" | "bee" | "beer" | "beer-bottle" | "bell" | "bell-notification" | "bell-off" | "belt" | "bicycle" | "bikini" | "binoculars" | "blood-pressure" | "bluetooth" | "boarding-pass" | "boat" | "bomb" | "bone" | "book" | "book-closed" | "bookmark" | "bookmark-outline" | "boombox" | "boot" | "bounce" | "bowl" | "bowl-food" | "bowling" | "bra" | "brain" | "branch" | "branch-create" | "branch-fork" | "branch-merge" | "bread" | "briefcase" | "brightness-high" | "broccoli" | "broom" | "broom-and-dustpan" | "browser-stop" | "bug" | "bugle" | "bullseye" | "bunk-bed" | "burger" | "burst" | "bus" | "bus-double-decker" | "bus-metro" | "butterfly" | "button" | "cactus" | "cafe" | "cake" | "calculator" | "calendar" | "calendar-day" | "calendar-month" | "calendar-week" | "camera" | "camera-off" | "camera-roll" | "camera-roll-portrait" | "camping-tent" | "camping-trailer" | "cancer" | "candy" | "capricorn" | "car" | "card" | "card-club" | "card-diamond" | "card-heart" | "card-spade" | "cards" | "carrot" | "cash" | "cash-register" | "cassette" | "castle" | "castle-japanese" | "cat" | "categories" | "cd" | "cellular" | "chair" | "champagne" | "champagne-bottle" | "chart" | "chart-alternate" | "chart-area" | "chart-donut" | "chart-line" | "chart-mixed" | "chart-pie" | "chat" | "chat-user" | "check" | "checklist" | "checkmark" | "checkmark-line" | "checkmark-square" | "chemistry" | "cherries" | "chess-bishop" | "chess-king" | "chess-knight" | "chess-pawn" | "chess-queen" | "chess-rook" | "chevrons-vertical" | "chicken" | "child" | "chili-pepper" | "christmas-tree" | "church" | "cigarette" | "circle" | "circle-alternate" | "circle-arrows-horizontal" | "circle-arrows-vertical" | "circle-dashed" | "circle-dot" | "circle-five-eighths" | "circle-four-eighths" | "circle-one-eighth" | "circle-remove" | "circle-seven-eighths" | "circle-six-eighths" | "circle-three-eighths" | "circle-two-eighths" | "city" | "clarinet" | "clear" | "clipping" | "clock" | "clock-alternate" | "close" | "clothes-button" | "clothes-iron" | "cloud" | "cloud-no" | "cloud-off" | "cloud-yes" | "cloudy" | "clover" | "clover-four-leaf" | "coaster" | "coat" | "cocktail" | "code" | "code-scan" | "coffee" | "coffee-maker" | "color-palette" | "color-picker" | "color-swatch" | "column" | "comb" | "command-line" | "comment" | "compass" | "compose" | "compressed-document" | "computer" | "computer-chip" | "conceal" | "condense" | "confetti-ball" | "confetti-party-popper" | "conifer-tree" | "connecting-flight" | "construction-crane" | "contrast" | "conversation" | "copy" | "corn" | "couch" | "cow" | "crab" | "crayon" | "create" | "credit-card" | "crop" | "crutch" | "cupcake" | "currency" | "currency-coin" | "cursor" | "cursor-button" | "cursor-click" | "customs" | "cut" | "dairy" | "daisy" | "dance" | "darks" | "dashboard" | "database" | "defibrillator" | "delete" | "delivery-truck" | "dental" | "departures" | "dependency" | "description" | "dialogue" | "die1" | "die2" | "die3" | "die4" | "die5" | "die6" | "dining" | "directional-sign" | "directional-sign-left" | "directional-sign-right" | "directions" | "dish-soap" | "dna" | "do-not-disturb" | "document" | "dog" | "donkey" | "download" | "downward" | "drafts" | "dress" | "drink" | "duck" | "duster" | "ear" | "ear-hearing-aid" | "earthquake" | "egg" | "eject" | "electric-guitar" | "electric-plug" | "elephant" | "elevator" | "emoji" | "emoji-angry" | "emoji-big-sad" | "emoji-disappointed" | "emoji-grinning" | "emoji-grinning-smiling-eyes" | "emoji-heart-eyes" | "emoji-neutral" | "emoji-sad" | "emoji-smiling-eyes" | "emoji-sunglasses" | "emoji-surprised" | "emoji-winking" | "error" | "escalator" | "exclamation-mark" | "exclamation-mark-double" | "exit" | "expand" | "extension" | "fabric-swatch" | "facial-tissues" | "factory" | "fan-deck" | "feather" | "feed" | "filtered" | "fire" | "fire-extinguisher" | "fire-truck" | "fireworks" | "first-aid" | "first-aid-kit" | "fish" | "flag" | "flag-checkered" | "flag-pennant" | "flag-swallowtail" | "flash" | "flashlight" | "flatware" | "fleur-de-lis" | "flood" | "fog" | "folder" | "follow" | "following" | "font" | "food-and-drink" | "football" | "forest-fire" | "fork" | "fork-and-knife" | "formula" | "forward" | "fragile" | "friends" | "frying-pan" | "fuel" | "game-pawn" | "garlic" | "gavel" | "gear" | "gears" | "gem" | "gemini" | "geography" | "ghost" | "gift" | "git" | "glasses" | "globe" | "golf" | "government" | "gradebook" | "graduate" | "grapes" | "grave" | "grid" | "grid-dense" | "grid-wide" | "grid-wide-six" | "grocery" | "groups" | "guitar" | "gym" | "hail" | "hair-care" | "hairdryer" | "hammer" | "hanafuda" | "hand" | "handbag" | "hanger" | "hare" | "hashtag" | "headphones" | "headset" | "heart" | "heart-box-bow" | "heart-outline" | "heart-rate" | "heart-rate-monitor" | "heartbroken" | "helicopter" | "helm" | "help-alternate" | "hexagon" | "hexagon-alternate" | "hexagon-dashed" | "hexagon-five-sixths" | "hexagon-four-sixths" | "hexagon-one-sixth" | "hexagon-three-sixths" | "hexagon-two-sixths" | "highball" | "history" | "home" | "hot-air-balloon" | "hourglass" | "hurricane" | "ice-skate" | "immigration" | "inbox" | "infinity" | "info-alternate" | "inline-skate" | "invitation" | "iterate" | "jack-o-lantern" | "jar" | "judicial-scales" | "junk" | "key" | "key-antique" | "keyboard" | "keyboard-alternate" | "keypad" | "kind" | "kite" | "knife" | "knife-kitchen" | "language" | "laptop" | "laundry-basket" | "laundry-detergent" | "laundry-dryer" | "laundry-washer" | "layers" | "leaf" | "leaf-monstera" | "lemon" | "leo" | "libra" | "library" | "light-bulb" | "lights" | "link" | "lipstick" | "list" | "list-indent" | "litter-disposal" | "location" | "lock" | "lock-keyhole" | "log-in" | "log-out" | "long-bone" | "long-sleeve-shirt" | "looped-square" | "lost-and-found" | "lounge" | "luggage" | "luggage-cart" | "lungs" | "magic-wand" | "magnet" | "mahjong" | "mail" | "makeup-brush" | "mandir" | "map" | "map-pin" | "map-pin-alternate" | "mathematics" | "meat" | "medication" | "meeting" | "megaphone" | "menorah" | "menstrual-pad" | "merge" | "metronome" | "microphone" | "microphone-off" | "microscope" | "microwave" | "midtones" | "mirror" | "mobile" | "monorail" | "moon" | "mop" | "mop-and-bucket" | "more" | "mosque" | "motorcycle" | "mountains" | "mouth" | "move" | "move-document" | "movie" | "movie-camera" | "movie-clapboard" | "movie-clapboard-play" | "mushroom" | "music" | "music-album" | "music-artist" | "navigation" | "necktie" | "network" | "new-alert" | "new-badge" | "new-document" | "new-folder" | "news" | "no" | "no-entry" | "note-eighth" | "note-half" | "note-quarter" | "note-sixteenth" | "note-sixteenth-beamed" | "note-whole" | "notification" | "notion" | "numero" | "nut" | "octagon" | "official-document" | "onion" | "orange" | "orbit" | "ornament" | "oven" | "package" | "paifang" | "paint-brush" | "paint-brush-wide" | "paint-bucket" | "paint-roller" | "palm-tree" | "pants" | "paper-towels" | "parking" | "parking-no" | "partly-cloudy-day" | "partly-cloudy-night" | "passport" | "paste" | "peace" | "peanut" | "pear" | "pen" | "pencil" | "pentagon" | "pentagon-alternate" | "pentagon-dashed" | "pentagon-four-fifths" | "pentagon-one-fifth" | "pentagon-three-fifths" | "pentagon-two-fifths" | "people" | "perfume" | "person-feminine" | "person-masculine" | "phone" | "phone-call" | "phone-end-call" | "phone-speaker" | "photo-landscape" | "piano" | "pig" | "pill" | "pin" | "pisces" | "pitcher" | "pizza" | "plate-food" | "playback-fast-forward" | "playback-next" | "playback-pause" | "playback-play" | "playback-play-button" | "playback-previous" | "playback-rewind" | "playback-stop" | "playlist" | "plus" | "poo" | "postage-stamp" | "postcard" | "pot" | "potted-plant" | "poultry" | "power" | "pram" | "pregnancy-test" | "pretzel" | "preview" | "print" | "priority-high" | "priority-low" | "priority-mid" | "private" | "profile" | "promoted" | "public" | "pull-request" | "pump" | "pump-bottle" | "push-pin" | "puzzle" | "question-mark" | "radio" | "rain" | "rainbow" | "receipt" | "redirect" | "redo" | "reference" | "refresh" | "refresh-reverse" | "refrigerator" | "remove" | "rename" | "reorder" | "repeat" | "reply" | "reply-all" | "report" | "ringed-planet" | "robot" | "rocket" | "roller-skate" | "row" | "rubber-stamp" | "ruler" | "run" | "safety-pin" | "sagittarius" | "sailboat" | "sandwich" | "save" | "scarf" | "school" | "science" | "scooter" | "scorpio" | "screwdriver" | "script" | "scrub-brush" | "search" | "seed" | "send" | "send-to" | "server" | "service-counter" | "set-square" | "share" | "sharing" | "sheep" | "shell" | "shield" | "shirt" | "shoe" | "shogi" | "shop" | "shopping-bag" | "shopping-basket" | "shopping-cart" | "shorts" | "shovel-and-pail" | "shower" | "shuffle" | "sign-in" | "sign-out" | "signature-document" | "sink" | "skateboard" | "skip-backward" | "skip-forward" | "skirt" | "skull" | "skull-profile" | "sleet" | "slide" | "sliders-horizontal" | "sliders-vertical" | "slideshow" | "slideshow-play" | "smoking" | "smoking-no" | "snake" | "snare-drum" | "snippet" | "snorkel" | "snowflake" | "soap" | "soccer" | "sock" | "soda-bottle" | "soft-serve" | "soy" | "spider" | "sponge" | "spoon" | "spray-bottle" | "square" | "square-alternate" | "square-circle" | "square-dashed" | "square-one-fourth" | "square-three-fourths" | "square-two-fourths" | "squeeze-tube" | "stairs" | "star" | "star-half" | "star-of-life" | "star-outline" | "stars" | "steering-wheel" | "stethoscope" | "sticker" | "stomach" | "stopwatch" | "storm" | "stovetop" | "strawberry" | "stroller" | "subtask" | "subtitles" | "suit" | "suit-club" | "suit-diamond" | "suit-heart" | "suit-spade" | "suitcase" | "sun" | "sunglasses" | "sunrise" | "sunscreen" | "sunset" | "suspension-bridge" | "swap-horizontally" | "swap-vertically" | "sword" | "symbol" | "synagogue" | "sync" | "sync-reverse" | "syringe" | "t-square" | "table" | "tablet" | "tabs" | "tabs-user" | "tag" | "takeout-box" | "tampon" | "target" | "taurus" | "taxi" | "teapot" | "telephone" | "telescope" | "temperature-cool" | "temperature-warm" | "temple" | "theatre" | "thinking" | "thought" | "thought-alert" | "thought-dialogue" | "throat" | "thumbs-down" | "thumbs-up" | "ticket" | "ticket-admission" | "timeline" | "toaster" | "toilet" | "toilet-paper" | "token" | "tooth" | "torii" | "tornado" | "tortoise" | "towel" | "traffic-cone" | "traffic-light" | "train" | "train-high-speed" | "train-light-rail" | "train-magnetic-levitation" | "train-metro" | "transfers" | "translate" | "tree" | "triangle" | "triangle-alternate" | "triangle-dashed" | "triangle-one-third" | "triangle-two-thirds" | "trophy" | "tropical-cocktail" | "truck" | "trumpet" | "tshirt" | "tulip" | "tulip-name-tag" | "tumbler" | "tv" | "umbrella" | "underwear" | "undo" | "unfollow" | "unlock" | "unlock-keyhole" | "upload" | "upload-document" | "upload-folder" | "upward" | "user" | "user-circle" | "user-circle-dashed" | "user-circle-filled" | "username" | "vacuum-cleaner" | "verified" | "video-camera" | "video-camera-off" | "video-game" | "video-game-classic" | "video-game-joystick" | "videotape" | "view" | "view-off" | "vinyl-record" | "violin" | "virgo" | "vitruvian-man" | "voicemail" | "volcano" | "volume-high" | "volume-off" | "walk" | "wall" | "warning" | "watch-analog" | "water" | "whale" | "wheat" | "wheelchair" | "wheelchair-access" | "wheelchair-motorized" | "whistle" | "wifi" | "wind" | "window" | "wine" | "wine-bottle" | "wrapping-paper" | "wrench" | "yin-yang" | "zoom-in" | "zoom-out";
6
+ //# sourceMappingURL=icon-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-names.d.ts","sourceRoot":"","sources":["../../src/alpha/icon-names.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GACpB,KAAK,GACL,eAAe,GACf,UAAU,GACV,KAAK,GACL,UAAU,GACV,OAAO,GACP,OAAO,GACP,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,aAAa,GACb,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,m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