@project-ajax/sdk 0.0.36 → 0.0.47
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/builder.d.ts +13 -1
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +15 -0
- package/dist/capabilities/sync.d.ts +6 -1
- package/dist/capabilities/sync.d.ts.map +1 -1
- package/dist/capabilities/tool.d.ts +3 -0
- package/dist/capabilities/tool.d.ts.map +1 -1
- package/dist/capabilities/tool.js +1 -0
- package/dist/cli/commands/auth.d.ts.map +1 -1
- package/dist/cli/commands/auth.impl.js +1 -1
- package/dist/cli/commands/auth.js +1 -2
- package/dist/cli/commands/connect.impl.js +2 -2
- package/dist/cli/handler.d.ts.map +1 -1
- package/dist/cli/handler.js +2 -1
- package/dist/cli/routes.d.ts.map +1 -1
- package/dist/cli/routes.js +15 -1
- package/dist/cli/utils/{openNotionUrl.d.ts → openUrl.d.ts} +2 -1
- package/dist/cli/utils/openUrl.d.ts.map +1 -0
- package/dist/cli/utils/{openNotionUrl.js → openUrl.js} +17 -7
- package/dist/icon-names.d.ts +6 -0
- package/dist/icon-names.d.ts.map +1 -0
- package/dist/icon-names.js +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/schema.d.ts +7 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/types.d.ts +31 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/builder.ts +29 -1
- package/src/capabilities/sync.ts +6 -1
- package/src/capabilities/tool.test.ts +6 -2
- package/src/capabilities/tool.ts +3 -0
- package/src/cli/commands/auth.impl.ts +1 -1
- package/src/cli/commands/auth.ts +0 -1
- package/src/cli/commands/connect.impl.ts +2 -2
- package/src/cli/handler.ts +6 -1
- package/src/cli/routes.ts +14 -0
- package/src/cli/utils/{openNotionUrl.ts → openUrl.ts} +23 -10
- package/src/icon-names.ts +890 -0
- package/src/index.ts +2 -0
- package/src/schema.ts +7 -0
- package/src/types.ts +47 -0
- package/dist/cli/utils/openNotionUrl.d.ts.map +0 -1
package/dist/builder.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NoticonName } from "./icon-names.js";
|
|
2
|
+
import type { Icon, NoticonColor, TextValue } from "./types.js";
|
|
2
3
|
/**
|
|
3
4
|
* Creates a rich text value.
|
|
4
5
|
*/
|
|
@@ -72,4 +73,15 @@ export declare function multiSelect(...values: string[]): TextValue;
|
|
|
72
73
|
* Creates a status value from a status option name.
|
|
73
74
|
*/
|
|
74
75
|
export declare function status(value: string): TextValue;
|
|
76
|
+
/**
|
|
77
|
+
* Creates an emoji icon.
|
|
78
|
+
* @param emoji - An emoji string (e.g., "🎯", "✨", "🚀")
|
|
79
|
+
*/
|
|
80
|
+
export declare function emojiIcon(emoji: string): Icon;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a Notion icon with a specific color.
|
|
83
|
+
* @param icon - The name of the Notion icon (e.g., "checkmark", "pizza", "rocket")
|
|
84
|
+
* @param color - The color variant (defaults to "gray")
|
|
85
|
+
*/
|
|
86
|
+
export declare function notionIcon(icon: NoticonName, color?: NoticonColor): Icon;
|
|
75
87
|
//# sourceMappingURL=builder.d.ts.map
|
package/dist/builder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAa,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE3E;;GAEG;AACH,wBAAgB,QAAQ,CAAC,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AG,SAAS,CAE/C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAK1D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAE/C;AA4CD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAK7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,WAAW,EACjB,KAAK,GAAE,YAAqB,GAC1B,IAAI,CAMN"}
|
package/dist/builder.js
CHANGED
|
@@ -110,6 +110,19 @@ function formatTime(date2) {
|
|
|
110
110
|
const minutes = String(date2.getMinutes()).padStart(2, "0");
|
|
111
111
|
return `${hours}:${minutes}`;
|
|
112
112
|
}
|
|
113
|
+
function emojiIcon(emoji) {
|
|
114
|
+
return {
|
|
115
|
+
type: "emoji",
|
|
116
|
+
value: emoji
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function notionIcon(icon, color = "gray") {
|
|
120
|
+
return {
|
|
121
|
+
type: "notion",
|
|
122
|
+
icon,
|
|
123
|
+
color
|
|
124
|
+
};
|
|
125
|
+
}
|
|
113
126
|
export {
|
|
114
127
|
checkbox,
|
|
115
128
|
date,
|
|
@@ -117,9 +130,11 @@ export {
|
|
|
117
130
|
dateTime,
|
|
118
131
|
dateTimeRange,
|
|
119
132
|
email,
|
|
133
|
+
emojiIcon,
|
|
120
134
|
file,
|
|
121
135
|
link,
|
|
122
136
|
multiSelect,
|
|
137
|
+
notionIcon,
|
|
123
138
|
number,
|
|
124
139
|
phoneNumber,
|
|
125
140
|
richText,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropertySchema, Schema } from "../schema.js";
|
|
2
|
-
import type { TextValue } from "../types.js";
|
|
2
|
+
import type { Icon, TextValue } from "../types.js";
|
|
3
3
|
/**
|
|
4
4
|
* An object representing a third-party record to be synced.
|
|
5
5
|
*/
|
|
@@ -8,6 +8,11 @@ export type SyncedObject<PK extends string, S extends PropertySchema<PK>> = {
|
|
|
8
8
|
properties: {
|
|
9
9
|
[Property in keyof S]: TextValue;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Optional icon to use as the icon for this row's page.
|
|
13
|
+
* Use the `icon()` builder to create an icon value.
|
|
14
|
+
*/
|
|
15
|
+
icon?: Icon;
|
|
11
16
|
};
|
|
12
17
|
/**
|
|
13
18
|
* A configuration object that enables synchronization between a data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/capabilities/sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/capabilities/sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,SAAS,cAAc,CAAC,EAAE,CAAC,IAAI;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE;SAAG,QAAQ,IAAI,MAAM,CAAC,GAAG,SAAS;KAAE,CAAC;IACjD;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,IAAI;IACxE;;;;OAIG;IACH,kBAAkB,EAAE,EAAE,CAAC;IAEvB;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC;IAEV;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,EAAE,SAAS,MAAM,IAAI;IAClD,kBAAkB,EAAE,EAAE,CAAC;IACvB,OAAO,EAAE,YAAY,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;CAChD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,EAC3D,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAC;;;;;;;;;;EAuB3C"}
|
|
@@ -3,6 +3,7 @@ type JSONValue = string | number | boolean | null | JSONValue[] | {
|
|
|
3
3
|
[key: string]: JSONValue;
|
|
4
4
|
};
|
|
5
5
|
export interface ToolConfiguration<I extends JSONValue, O extends JSONValue = JSONValue> {
|
|
6
|
+
title: string;
|
|
6
7
|
description: string;
|
|
7
8
|
schema: JSONSchemaType<I>;
|
|
8
9
|
outputSchema?: JSONSchemaType<O>;
|
|
@@ -45,6 +46,7 @@ export declare class ToolExecutionError extends Error {
|
|
|
45
46
|
*
|
|
46
47
|
* ```ts
|
|
47
48
|
* tool<{ name: string }>({
|
|
49
|
+
* title: "Say Hello",
|
|
48
50
|
* description: "Say hello to the user",
|
|
49
51
|
* schema: {
|
|
50
52
|
* type: "object",
|
|
@@ -65,6 +67,7 @@ export declare class ToolExecutionError extends Error {
|
|
|
65
67
|
export declare function tool<I extends JSONValue, O extends JSONValue = JSONValue>(config: ToolConfiguration<I, O>): {
|
|
66
68
|
_tag: string;
|
|
67
69
|
config: {
|
|
70
|
+
title: string;
|
|
68
71
|
description: string;
|
|
69
72
|
schema: JSONSchemaType<I>;
|
|
70
73
|
outputSchema: JSONSchemaType<O> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/capabilities/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE/C,KAAK,SAAS,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEhC,MAAM,WAAW,iBAAiB,CACjC,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,SAAS,GAAG,SAAS;IAE/B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/capabilities/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE/C,KAAK,SAAS,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEhC,MAAM,WAAW,iBAAiB,CACjC,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,SAAS,GAAG,SAAS;IAE/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,EACxE,MAAM,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;mBAgBT,SAAS,GAAG,OAAO,CACrC;QACA,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,CAAC,CAAC;KACR,GACD;QACA,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EACF,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,CAAC;KACrB,CACH;EA0DF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/auth.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/auth.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,wEAuEvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { baseUrl } from "../api/client.js";
|
|
2
2
|
import { buildHandler } from "../handler.js";
|
|
3
|
-
import { openNotionUrl } from "../utils/
|
|
3
|
+
import { openNotionUrl } from "../utils/openUrl.js";
|
|
4
4
|
const login = buildHandler(async function(flags, token) {
|
|
5
5
|
const environment = flags.env ?? "prod";
|
|
6
6
|
if (flags["base-url"]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result } from "../api/result.js";
|
|
2
2
|
import { buildAuthedHandler } from "../handler.js";
|
|
3
|
-
import {
|
|
3
|
+
import { openBrowserUrl } from "../utils/openUrl.js";
|
|
4
4
|
const listProviders = buildAuthedHandler(async function(flags) {
|
|
5
5
|
this.process.stderr.write("Fetching providers...");
|
|
6
6
|
const providersResult = await this.apiClient.listOauthProviders();
|
|
@@ -36,7 +36,7 @@ const addConnection = buildAuthedHandler(async function(_flags, provider) {
|
|
|
36
36
|
const { authorizationUrl } = startResult.value;
|
|
37
37
|
this.writer.writeErr("Opening your browser to continue the OAuth flow...");
|
|
38
38
|
try {
|
|
39
|
-
await
|
|
39
|
+
await openBrowserUrl(authorizationUrl);
|
|
40
40
|
} catch (error) {
|
|
41
41
|
this.writer.writeErr(
|
|
42
42
|
`Unable to open the browser automatically (${String(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/cli/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,cAAe,SAAQ,YAAY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kB,CACjC,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,IAAI,SAAS,QAAQ,GAAG,EAAE,EAEhC,OAAO,EAAE,CACR,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,IAAI,KACT,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,UA5BlB,YAAY,8DAgDnB"}
|
package/dist/cli/handler.js
CHANGED
|
@@ -2,8 +2,9 @@ import { ApiClient } from "./api/client.js";
|
|
|
2
2
|
import { Config } from "./config.js";
|
|
3
3
|
function buildHandler(handler) {
|
|
4
4
|
return async function(flags, ...args) {
|
|
5
|
+
const configFilePath = this.process.env.WORKERS_CONFIG_FILE_PATH ?? flags.config ?? "./workers.json";
|
|
5
6
|
const config = await Config.load({
|
|
6
|
-
configFilePath
|
|
7
|
+
configFilePath,
|
|
7
8
|
processEnv: process.env
|
|
8
9
|
});
|
|
9
10
|
this.writer.debugEnabled = flags.debug;
|
package/dist/cli/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/cli/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/cli/routes.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,GAAG,0EAgBd,CAAC"}
|
package/dist/cli/routes.js
CHANGED
|
@@ -11,7 +11,21 @@ import { secretsCommands } from "./commands/secrets.js";
|
|
|
11
11
|
import { TokenNotSetError } from "./config.js";
|
|
12
12
|
const routes = buildRouteMap({
|
|
13
13
|
docs: {
|
|
14
|
-
brief: "A CLI for the Project Ajax platform"
|
|
14
|
+
brief: "A CLI for the Project Ajax platform",
|
|
15
|
+
fullDescription: `
|
|
16
|
+
The Project Ajax CLI is a tool for managing workers, which run code written by
|
|
17
|
+
you, other developers, or AI agents to perform automation tasks, such as syncing
|
|
18
|
+
data, adding slash commands, or performing other actions.
|
|
19
|
+
|
|
20
|
+
Most flags are configured either with a config file or flags, but environment
|
|
21
|
+
variables can also be provided:
|
|
22
|
+
|
|
23
|
+
- WORKERS_CONFIG_FILE_PATH: The path to the config file to use (e.g. ./workers.dev.json)
|
|
24
|
+
- WORKERS_TOKEN: The token to use for authentication
|
|
25
|
+
- WORKERS_ENVIRONMENT: The environment to use
|
|
26
|
+
- WORKERS_WORKER_ID: The worker ID to use
|
|
27
|
+
- WORKERS_BASE_URL: The base API URL to use
|
|
28
|
+
`.trim()
|
|
15
29
|
},
|
|
16
30
|
routes: {
|
|
17
31
|
auth: authCommands,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Environment } from "../config.js";
|
|
2
|
+
export declare function openBrowserUrl(url: string): Promise<void>;
|
|
2
3
|
export declare function openNotionUrl(env: Environment, url: string): Promise<void>;
|
|
3
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=openUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openUrl.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/openUrl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc/D;AAED,wBAAsB,aAAa,CAClC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { exec } from "node:child_process";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
async function
|
|
3
|
+
async function openBrowserUrl(url) {
|
|
4
4
|
const platform = process.platform;
|
|
5
5
|
try {
|
|
6
6
|
if (platform === "darwin") {
|
|
7
|
-
|
|
8
|
-
if (appName) {
|
|
9
|
-
exec(`open -a "${appName}" "${url}"`);
|
|
10
|
-
} else {
|
|
11
|
-
exec(`open "${url}"`);
|
|
12
|
-
}
|
|
7
|
+
exec(`open "${url}"`);
|
|
13
8
|
} else if (platform === "win32") {
|
|
14
9
|
exec(`start "" "${url}"`);
|
|
15
10
|
} else {
|
|
@@ -19,6 +14,20 @@ async function openNotionUrl(env, url) {
|
|
|
19
14
|
throw new Error(`Failed to open browser: ${error}`);
|
|
20
15
|
}
|
|
21
16
|
}
|
|
17
|
+
async function openNotionUrl(env, url) {
|
|
18
|
+
const platform = process.platform;
|
|
19
|
+
if (platform === "darwin") {
|
|
20
|
+
const appName = preferredNotionApp(env);
|
|
21
|
+
if (appName) {
|
|
22
|
+
try {
|
|
23
|
+
exec(`open -a "${appName}" "${url}"`);
|
|
24
|
+
return;
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
await openBrowserUrl(url);
|
|
30
|
+
}
|
|
22
31
|
function preferredNotionApp(env) {
|
|
23
32
|
if (env === "prod" && existsSync("/Applications/Notion.app")) {
|
|
24
33
|
return "Notion";
|
|
@@ -29,5 +38,6 @@ function preferredNotionApp(env) {
|
|
|
29
38
|
return null;
|
|
30
39
|
}
|
|
31
40
|
export {
|
|
41
|
+
openBrowserUrl,
|
|
32
42
|
openNotionUrl
|
|
33
43
|
};
|
|
@@ -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/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,QA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BAAoB,GACpB,qBAAqB,GACrB,WAAW,GACX,MAAM,GACN,UAAU,GACV,cAAc,GACd,QAAQ,GACR,OAAO,GACP,eAAe,GACf,WAAW,GACX,SAAS,GACT,aAAa,GACb,YAAY,GACZ,MAAM,GACN,MAAM,GACN,SAAS,GACT,cAAc,GACd,OAAO,GACP,OAAO,GACP,OAAO,GACP,YAAY,GACZ,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC"}
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { emojiIcon, notionIcon } from "./builder.js";
|
|
1
2
|
export { slashCommand } from "./capabilities/slashCommand.js";
|
|
2
3
|
export { sync } from "./capabilities/sync.js";
|
|
3
4
|
export { tool } from "./capabilities/tool.js";
|
|
5
|
+
export type { Icon, NoticonColor, NoticonName } from "./types.js";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { emojiIcon, notionIcon } from "./builder.js";
|
|
1
2
|
import { slashCommand } from "./capabilities/slashCommand.js";
|
|
2
3
|
import { sync } from "./capabilities/sync.js";
|
|
3
4
|
import { tool } from "./capabilities/tool.js";
|
|
4
5
|
export {
|
|
6
|
+
emojiIcon,
|
|
7
|
+
notionIcon,
|
|
5
8
|
slashCommand,
|
|
6
9
|
sync,
|
|
7
10
|
tool
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DateFormat, NumberFormat, SelectOption, StatusGroup } from "./types.js";
|
|
1
|
+
import type { DateFormat, Icon, NumberFormat, SelectOption, StatusGroup } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Supported property types for sync schemas.
|
|
4
4
|
*/
|
|
@@ -44,6 +44,12 @@ export type PropertyConfiguration = {
|
|
|
44
44
|
};
|
|
45
45
|
export type Schema<PK extends string> = {
|
|
46
46
|
dataSourceTitle: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional icon to use as the icon for the database page.
|
|
49
|
+
* If not provided, defaults to 📋.
|
|
50
|
+
* Use the `icon()` builder to create an icon value.
|
|
51
|
+
*/
|
|
52
|
+
databaseIcon?: Icon;
|
|
47
53
|
properties: PropertySchema<PK>;
|
|
48
54
|
};
|
|
49
55
|
/**
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,YAAY,GACrB,OAAO,GACP,WAAW,GACX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AAqB,CAEhD;AAED;;GAEG;AACH,wBAAgB,GAAG,IAAI,qBAAqB,CAE3C;AAED;;GAEG;AACH,wBAAgB,KAAK,IAAI,qBAAqB,CAE7C;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,qBAAqB,CAEnD;AAED;;GAEG;AACH,wBAAgB,QAAQ,IAAI,qBAAqB,CAEhD;AAED;;GAEG;AACH,wBAAgB,IAAI,IAAI,qBAAqB,CAE5C;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,qBAAqB,CAEnE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,qBAAqB,CAEpE;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,qBAAqB,CAErE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,qBAAqB,CAE1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE;IAC9B,MAAM,EAAE,WAAW,EAAE,CAAC;CACtB,GAAG,qBAAqB,CAExB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -76,5 +76,35 @@ export type NumberFormat = "number" | "number_with_commas" | "percent" | "dollar
|
|
|
76
76
|
* Date format types
|
|
77
77
|
*/
|
|
78
78
|
export type DateFormat = "relative" | "MM/DD/YYYY" | "DD/MM/YYYY" | "YYYY/MM/DD" | "ll" | "MMM d";
|
|
79
|
-
|
|
79
|
+
import type { NoticonName } from "./icon-names.js";
|
|
80
|
+
/**
|
|
81
|
+
* Icon representing an emoji
|
|
82
|
+
*/
|
|
83
|
+
export interface EmojiIcon {
|
|
84
|
+
type: "emoji";
|
|
85
|
+
value: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Valid colors for Notion icons
|
|
89
|
+
*/
|
|
90
|
+
export type NoticonColor = "gray" | "lightgray" | "brown" | "yellow" | "orange" | "green" | "blue" | "purple" | "pink" | "red";
|
|
91
|
+
/**
|
|
92
|
+
* Icon representing a Notion built-in icon
|
|
93
|
+
*/
|
|
94
|
+
export interface NoticonIcon {
|
|
95
|
+
type: "notion";
|
|
96
|
+
/**
|
|
97
|
+
* The name of the Notion icon (e.g., "checkmark", "pizza", "rocket")
|
|
98
|
+
*/
|
|
99
|
+
icon: NoticonName;
|
|
100
|
+
/**
|
|
101
|
+
* The color variant of the icon
|
|
102
|
+
*/
|
|
103
|
+
color: NoticonColor;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* All possible icon types
|
|
107
|
+
*/
|
|
108
|
+
export type Icon = EmojiIcon | NoticonIcon;
|
|
109
|
+
export type { NoticonName } from "./icon-names.js";
|
|
80
110
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,KAAK,SAAS,GAAG,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GACpB,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,CAAC;AAET;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;CACxB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GACpB,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,GACL,OAAO,GACP,KAAK,GACL,MAAM,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,UAAU,GACnB,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,IAAI,GACJ,OAAO,CAAC;AAEX,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GACrB,MAAM,GACN,WAAW,GACX,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,CAAC;AAET;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@project-ajax/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "An SDK for building workers for the Project Ajax platform",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"workers": "
|
|
8
|
+
"workers": "dist/cli/bin/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
package/src/builder.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NoticonName } from "./icon-names.js";
|
|
2
|
+
import type { DateValue, Icon, NoticonColor, TextValue } from "./types.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Creates a rich text value.
|
|
@@ -213,3 +214,30 @@ function formatTime(date: Date): string {
|
|
|
213
214
|
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
214
215
|
return `${hours}:${minutes}`;
|
|
215
216
|
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Creates an emoji icon.
|
|
220
|
+
* @param emoji - An emoji string (e.g., "🎯", "✨", "🚀")
|
|
221
|
+
*/
|
|
222
|
+
export function emojiIcon(emoji: string): Icon {
|
|
223
|
+
return {
|
|
224
|
+
type: "emoji",
|
|
225
|
+
value: emoji,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Creates a Notion icon with a specific color.
|
|
231
|
+
* @param icon - The name of the Notion icon (e.g., "checkmark", "pizza", "rocket")
|
|
232
|
+
* @param color - The color variant (defaults to "gray")
|
|
233
|
+
*/
|
|
234
|
+
export function notionIcon(
|
|
235
|
+
icon: NoticonName,
|
|
236
|
+
color: NoticonColor = "gray",
|
|
237
|
+
): Icon {
|
|
238
|
+
return {
|
|
239
|
+
type: "notion",
|
|
240
|
+
icon,
|
|
241
|
+
color,
|
|
242
|
+
};
|
|
243
|
+
}
|
package/src/capabilities/sync.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExecutionError } from "../error.js";
|
|
2
2
|
import type { PropertySchema, Schema } from "../schema.js";
|
|
3
|
-
import type { TextValue } from "../types.js";
|
|
3
|
+
import type { Icon, TextValue } from "../types.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* An object representing a third-party record to be synced.
|
|
@@ -8,6 +8,11 @@ import type { TextValue } from "../types.js";
|
|
|
8
8
|
export type SyncedObject<PK extends string, S extends PropertySchema<PK>> = {
|
|
9
9
|
key: string;
|
|
10
10
|
properties: { [Property in keyof S]: TextValue };
|
|
11
|
+
/**
|
|
12
|
+
* Optional icon to use as the icon for this row's page.
|
|
13
|
+
* Use the `icon()` builder to create an icon value.
|
|
14
|
+
*/
|
|
15
|
+
icon?: Icon;
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
/**
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
describe("tool", () => {
|
|
10
10
|
it("sync execution", async () => {
|
|
11
11
|
const myTool = tool<{ name: string }, string>({
|
|
12
|
+
title: "Say Hello",
|
|
12
13
|
description: "Greet a user",
|
|
13
14
|
schema: {
|
|
14
15
|
type: "object",
|
|
@@ -33,6 +34,7 @@ describe("tool", () => {
|
|
|
33
34
|
|
|
34
35
|
it("async execution", async () => {
|
|
35
36
|
const myTool = tool<{ id: number }, { data: string }>({
|
|
37
|
+
title: "Fetch Data",
|
|
36
38
|
description: "Fetch data asynchronously",
|
|
37
39
|
schema: {
|
|
38
40
|
type: "object",
|
|
@@ -59,6 +61,7 @@ describe("tool", () => {
|
|
|
59
61
|
|
|
60
62
|
it("execution error", async () => {
|
|
61
63
|
const myTool = tool<Record<string, never>, string>({
|
|
64
|
+
title: "Throw Error",
|
|
62
65
|
description: "Throws an error",
|
|
63
66
|
schema: {
|
|
64
67
|
type: "object",
|
|
@@ -82,6 +85,7 @@ describe("tool", () => {
|
|
|
82
85
|
|
|
83
86
|
it("invalid input", async () => {
|
|
84
87
|
const myTool = tool<{ name: string }, string>({
|
|
88
|
+
title: "Say Hello",
|
|
85
89
|
description: "Requires a name property",
|
|
86
90
|
schema: {
|
|
87
91
|
type: "object",
|
|
@@ -107,7 +111,7 @@ describe("tool", () => {
|
|
|
107
111
|
|
|
108
112
|
it("invalid output", async () => {
|
|
109
113
|
const myTool = tool<Record<string, never>, { result: string }>({
|
|
110
|
-
|
|
114
|
+
title: "Return Invalid Output",
|
|
111
115
|
description: "Returns output that doesn't match schema",
|
|
112
116
|
schema: {
|
|
113
117
|
type: "object",
|
|
@@ -143,7 +147,7 @@ describe("tool", () => {
|
|
|
143
147
|
{ value: number },
|
|
144
148
|
{ doubled: number; message: string }
|
|
145
149
|
>({
|
|
146
|
-
|
|
150
|
+
title: "Custom Output",
|
|
147
151
|
description: "Has custom output schema",
|
|
148
152
|
schema: {
|
|
149
153
|
type: "object",
|
package/src/capabilities/tool.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface ToolConfiguration<
|
|
|
12
12
|
I extends JSONValue,
|
|
13
13
|
O extends JSONValue = JSONValue,
|
|
14
14
|
> {
|
|
15
|
+
title: string;
|
|
15
16
|
description: string;
|
|
16
17
|
schema: JSONSchemaType<I>;
|
|
17
18
|
outputSchema?: JSONSchemaType<O>;
|
|
@@ -76,6 +77,7 @@ export class ToolExecutionError extends Error {
|
|
|
76
77
|
*
|
|
77
78
|
* ```ts
|
|
78
79
|
* tool<{ name: string }>({
|
|
80
|
+
* title: "Say Hello",
|
|
79
81
|
* description: "Say hello to the user",
|
|
80
82
|
* schema: {
|
|
81
83
|
* type: "object",
|
|
@@ -105,6 +107,7 @@ export function tool<I extends JSONValue, O extends JSONValue = JSONValue>(
|
|
|
105
107
|
return {
|
|
106
108
|
_tag: "tool",
|
|
107
109
|
config: {
|
|
110
|
+
title: config.title,
|
|
108
111
|
description: config.description,
|
|
109
112
|
schema: config.schema,
|
|
110
113
|
outputSchema: config.outputSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { baseUrl } from "../api/client.js";
|
|
2
2
|
import type { Environment } from "../config.js";
|
|
3
3
|
import { buildHandler, type HandlerContext } from "../handler.js";
|
|
4
|
-
import { openNotionUrl } from "../utils/
|
|
4
|
+
import { openNotionUrl } from "../utils/openUrl.js";
|
|
5
5
|
|
|
6
6
|
interface LoginFlags {
|
|
7
7
|
env?: Environment;
|