@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.
Files changed (45) hide show
  1. package/dist/builder.d.ts +13 -1
  2. package/dist/builder.d.ts.map +1 -1
  3. package/dist/builder.js +15 -0
  4. package/dist/capabilities/sync.d.ts +6 -1
  5. package/dist/capabilities/sync.d.ts.map +1 -1
  6. package/dist/capabilities/tool.d.ts +3 -0
  7. package/dist/capabilities/tool.d.ts.map +1 -1
  8. package/dist/capabilities/tool.js +1 -0
  9. package/dist/cli/commands/auth.d.ts.map +1 -1
  10. package/dist/cli/commands/auth.impl.js +1 -1
  11. package/dist/cli/commands/auth.js +1 -2
  12. package/dist/cli/commands/connect.impl.js +2 -2
  13. package/dist/cli/handler.d.ts.map +1 -1
  14. package/dist/cli/handler.js +2 -1
  15. package/dist/cli/routes.d.ts.map +1 -1
  16. package/dist/cli/routes.js +15 -1
  17. package/dist/cli/utils/{openNotionUrl.d.ts → openUrl.d.ts} +2 -1
  18. package/dist/cli/utils/openUrl.d.ts.map +1 -0
  19. package/dist/cli/utils/{openNotionUrl.js → openUrl.js} +17 -7
  20. package/dist/icon-names.d.ts +6 -0
  21. package/dist/icon-names.d.ts.map +1 -0
  22. package/dist/icon-names.js +0 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +3 -0
  26. package/dist/schema.d.ts +7 -1
  27. package/dist/schema.d.ts.map +1 -1
  28. package/dist/types.d.ts +31 -1
  29. package/dist/types.d.ts.map +1 -1
  30. package/package.json +2 -2
  31. package/src/builder.ts +29 -1
  32. package/src/capabilities/sync.ts +6 -1
  33. package/src/capabilities/tool.test.ts +6 -2
  34. package/src/capabilities/tool.ts +3 -0
  35. package/src/cli/commands/auth.impl.ts +1 -1
  36. package/src/cli/commands/auth.ts +0 -1
  37. package/src/cli/commands/connect.impl.ts +2 -2
  38. package/src/cli/handler.ts +6 -1
  39. package/src/cli/routes.ts +14 -0
  40. package/src/cli/utils/{openNotionUrl.ts → openUrl.ts} +23 -10
  41. package/src/icon-names.ts +890 -0
  42. package/src/index.ts +2 -0
  43. package/src/schema.ts +7 -0
  44. package/src/types.ts +47 -0
  45. package/dist/cli/utils/openNotionUrl.d.ts.map +0 -1
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
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";
package/src/schema.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type {
2
2
  DateFormat,
3
+ Icon,
3
4
  NumberFormat,
4
5
  SelectOption,
5
6
  StatusGroup,
@@ -63,6 +64,12 @@ export type PropertyConfiguration =
63
64
 
64
65
  export type Schema<PK extends string> = {
65
66
  dataSourceTitle: string;
67
+ /**
68
+ * Optional icon to use as the icon for the database page.
69
+ * If not provided, defaults to 📋.
70
+ * Use the `icon()` builder to create an icon value.
71
+ */
72
+ databaseIcon?: Icon;
66
73
  properties: PropertySchema<PK>;
67
74
  };
68
75
 
package/src/types.ts CHANGED
@@ -114,3 +114,50 @@ export type DateFormat =
114
114
  | "YYYY/MM/DD"
115
115
  | "ll"
116
116
  | "MMM d";
117
+
118
+ import type { NoticonName } from "./icon-names.js";
119
+
120
+ /**
121
+ * Icon representing an emoji
122
+ */
123
+ export interface EmojiIcon {
124
+ type: "emoji";
125
+ value: string;
126
+ }
127
+
128
+ /**
129
+ * Valid colors for Notion icons
130
+ */
131
+ export type NoticonColor =
132
+ | "gray"
133
+ | "lightgray"
134
+ | "brown"
135
+ | "yellow"
136
+ | "orange"
137
+ | "green"
138
+ | "blue"
139
+ | "purple"
140
+ | "pink"
141
+ | "red";
142
+
143
+ /**
144
+ * Icon representing a Notion built-in icon
145
+ */
146
+ export interface NoticonIcon {
147
+ type: "notion";
148
+ /**
149
+ * The name of the Notion icon (e.g., "checkmark", "pizza", "rocket")
150
+ */
151
+ icon: NoticonName;
152
+ /**
153
+ * The color variant of the icon
154
+ */
155
+ color: NoticonColor;
156
+ }
157
+
158
+ /**
159
+ * All possible icon types
160
+ */
161
+ export type Icon = EmojiIcon | NoticonIcon;
162
+
163
+ export type { NoticonName } from "./icon-names.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"openNotionUrl.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/openNotionUrl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAsB,aAAa,CAClC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAmBf"}