attio 0.0.1-experimental.20240909 → 0.0.1-experimental.20240911.2

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 (317) hide show
  1. package/attio.js +1 -0
  2. package/client.d.ts +1 -0
  3. package/global.d.ts +19 -0
  4. package/lib/api/add-connection-definition.js +0 -1
  5. package/lib/api/complete-bundle-upload.js +0 -1
  6. package/lib/api/complete-prod-bundle-upload.js +0 -1
  7. package/lib/api/create-app.js +0 -1
  8. package/lib/api/create-dev-version.js +0 -1
  9. package/lib/api/create-developer-account.js +0 -1
  10. package/lib/api/create-version.js +0 -1
  11. package/lib/api/fetch-versions.js +0 -1
  12. package/lib/api/generate-invite-link.js +0 -1
  13. package/lib/api/handle-error.js +0 -1
  14. package/lib/api/is-app-slug-valid.js +0 -1
  15. package/lib/api/make-headers.js +0 -1
  16. package/lib/api/publish-version.js +0 -1
  17. package/lib/api/remove-connection-definition.js +0 -1
  18. package/lib/api/start-upload.js +0 -1
  19. package/lib/attio.js +0 -1
  20. package/lib/build/client/create-client-build-config.js +0 -1
  21. package/lib/build/client/generate-client-entry.js +0 -1
  22. package/lib/build/get-module-hash.js +0 -1
  23. package/lib/build/proxy-server-modules-plugin.js +0 -1
  24. package/lib/build/server/create-server-build-config.js +0 -1
  25. package/lib/build/server/generate-server-entry.js +0 -1
  26. package/lib/build.js +0 -1
  27. package/lib/client/components/action.d.ts +10 -0
  28. package/lib/client/components/combobox.d.ts +9 -0
  29. package/lib/client/components/dialog.d.ts +10 -0
  30. package/lib/client/components/index.d.ts +6 -0
  31. package/lib/client/components/multistep.d.ts +17 -0
  32. package/lib/client/components/section.d.ts +8 -0
  33. package/lib/client/components/text-block.d.ts +8 -0
  34. package/lib/client/forms/array.d.ts +12 -0
  35. package/lib/client/forms/build.d.ts +48 -0
  36. package/lib/client/forms/index.d.ts +4 -0
  37. package/lib/client/forms/number.d.ts +14 -0
  38. package/lib/client/forms/path.d.ts +34 -0
  39. package/lib/client/forms/string.d.ts +15 -0
  40. package/lib/client/hooks/index.d.ts +4 -0
  41. package/lib/client/hooks/use-graphql.d.ts +4 -0
  42. package/lib/client/hooks/use-loader.d.ts +13 -0
  43. package/lib/client/hooks/use-query.d.ts +5 -0
  44. package/lib/client/hooks/use-record.d.ts +9 -0
  45. package/lib/client/index.d.ts +8 -0
  46. package/lib/client/object-slug.d.ts +3 -0
  47. package/lib/client/util/prettify.d.ts +3 -0
  48. package/lib/commands/build.js +0 -1
  49. package/lib/commands/connection/add.js +0 -1
  50. package/lib/commands/connection/index.js +0 -1
  51. package/lib/commands/connection/remove.js +0 -1
  52. package/lib/commands/create.js +0 -1
  53. package/lib/commands/dev.js +0 -1
  54. package/lib/commands/version/create.js +0 -1
  55. package/lib/commands/version/index.js +0 -1
  56. package/lib/commands/version/invite.js +0 -1
  57. package/lib/commands/version/list.js +0 -1
  58. package/lib/commands/version/publish.js +0 -1
  59. package/lib/components/BuildError.js +0 -1
  60. package/lib/components/BuildLog.js +0 -1
  61. package/lib/components/Disclaimer.js +0 -1
  62. package/lib/components/InitialInstructions.js +0 -1
  63. package/lib/components/Logo.js +0 -1
  64. package/lib/components/MultiSelect.js +0 -1
  65. package/lib/components/ScrollBox.js +0 -1
  66. package/lib/components/ScrollBox.store.js +0 -1
  67. package/lib/components/ScrollBox.util.js +0 -1
  68. package/lib/components/Select.js +0 -1
  69. package/lib/components/Table.js +0 -1
  70. package/lib/components/TypeScriptErrors.js +0 -1
  71. package/lib/env.js +0 -1
  72. package/lib/hooks/useFullScreen.js +0 -1
  73. package/lib/hooks/useTerminalTitle.js +0 -1
  74. package/lib/machines/actors.js +0 -1
  75. package/lib/machines/add-connection-machine.js +0 -1
  76. package/lib/machines/build-machine.js +0 -1
  77. package/lib/machines/build-orchestrator.js +0 -1
  78. package/lib/machines/create-machine.js +0 -1
  79. package/lib/machines/create-version-machine.js +0 -1
  80. package/lib/machines/dev-machine.js +0 -1
  81. package/lib/machines/generate-invite-machine.js +0 -1
  82. package/lib/machines/js-machine.js +0 -1
  83. package/lib/machines/list-versions-machine.js +0 -1
  84. package/lib/machines/publish-version-machine.js +0 -1
  85. package/lib/machines/remove-connection-machine.js +0 -1
  86. package/lib/machines/ts-machine.js +0 -1
  87. package/lib/schema.js +0 -1
  88. package/lib/server/index.d.ts +1 -0
  89. package/lib/templates/javascript/package.json +0 -1
  90. package/lib/templates/javascript/src/app/record/counter-action.jsx +1 -1
  91. package/lib/templates/typescript/package.json +0 -1
  92. package/lib/templates/typescript/src/app/record/counter-action.tsx +1 -1
  93. package/lib/templates/typescript/tsconfig.json +2 -2
  94. package/lib/tsconfig.tsbuildinfo +1 -0
  95. package/lib/util/app-config.js +0 -1
  96. package/lib/util/copy-with-replace.js +0 -1
  97. package/lib/util/create-directory.js +0 -1
  98. package/lib/util/load-developer-config.js +0 -1
  99. package/lib/util/load-env.js +0 -1
  100. package/lib/util/slugify-extension.js +0 -1
  101. package/lib/util/typescript.js +0 -1
  102. package/lib/util/validate-slug.js +0 -1
  103. package/package.json +9 -63
  104. package/server.d.ts +1 -0
  105. package/lib/api/add-connection-definition.d.ts +0 -26
  106. package/lib/api/add-connection-definition.d.ts.map +0 -1
  107. package/lib/api/add-connection-definition.js.map +0 -1
  108. package/lib/api/complete-bundle-upload.d.ts +0 -8
  109. package/lib/api/complete-bundle-upload.d.ts.map +0 -1
  110. package/lib/api/complete-bundle-upload.js.map +0 -1
  111. package/lib/api/complete-prod-bundle-upload.d.ts +0 -9
  112. package/lib/api/complete-prod-bundle-upload.d.ts.map +0 -1
  113. package/lib/api/complete-prod-bundle-upload.js.map +0 -1
  114. package/lib/api/create-app.d.ts +0 -14
  115. package/lib/api/create-app.d.ts.map +0 -1
  116. package/lib/api/create-app.js.map +0 -1
  117. package/lib/api/create-dev-version.d.ts +0 -28
  118. package/lib/api/create-dev-version.d.ts.map +0 -1
  119. package/lib/api/create-dev-version.js.map +0 -1
  120. package/lib/api/create-developer-account.d.ts +0 -12
  121. package/lib/api/create-developer-account.d.ts.map +0 -1
  122. package/lib/api/create-developer-account.js.map +0 -1
  123. package/lib/api/create-version.d.ts +0 -33
  124. package/lib/api/create-version.d.ts.map +0 -1
  125. package/lib/api/create-version.js.map +0 -1
  126. package/lib/api/fetch-versions.d.ts +0 -47
  127. package/lib/api/fetch-versions.d.ts.map +0 -1
  128. package/lib/api/fetch-versions.js.map +0 -1
  129. package/lib/api/generate-invite-link.d.ts +0 -18
  130. package/lib/api/generate-invite-link.d.ts.map +0 -1
  131. package/lib/api/generate-invite-link.js.map +0 -1
  132. package/lib/api/handle-error.d.ts +0 -3
  133. package/lib/api/handle-error.d.ts.map +0 -1
  134. package/lib/api/handle-error.js.map +0 -1
  135. package/lib/api/is-app-slug-valid.d.ts +0 -6
  136. package/lib/api/is-app-slug-valid.d.ts.map +0 -1
  137. package/lib/api/is-app-slug-valid.js.map +0 -1
  138. package/lib/api/make-headers.d.ts +0 -6
  139. package/lib/api/make-headers.d.ts.map +0 -1
  140. package/lib/api/make-headers.js.map +0 -1
  141. package/lib/api/publish-version.d.ts +0 -18
  142. package/lib/api/publish-version.d.ts.map +0 -1
  143. package/lib/api/publish-version.js.map +0 -1
  144. package/lib/api/remove-connection-definition.d.ts +0 -6
  145. package/lib/api/remove-connection-definition.d.ts.map +0 -1
  146. package/lib/api/remove-connection-definition.js.map +0 -1
  147. package/lib/api/start-upload.d.ts +0 -12
  148. package/lib/api/start-upload.d.ts.map +0 -1
  149. package/lib/api/start-upload.js.map +0 -1
  150. package/lib/attio.d.ts +0 -3
  151. package/lib/attio.d.ts.map +0 -1
  152. package/lib/attio.js.map +0 -1
  153. package/lib/build/client/create-client-build-config.d.ts +0 -6
  154. package/lib/build/client/create-client-build-config.d.ts.map +0 -1
  155. package/lib/build/client/create-client-build-config.js.map +0 -1
  156. package/lib/build/client/generate-client-entry.d.ts +0 -6
  157. package/lib/build/client/generate-client-entry.d.ts.map +0 -1
  158. package/lib/build/client/generate-client-entry.js.map +0 -1
  159. package/lib/build/get-module-hash.d.ts +0 -2
  160. package/lib/build/get-module-hash.d.ts.map +0 -1
  161. package/lib/build/get-module-hash.js.map +0 -1
  162. package/lib/build/proxy-server-modules-plugin.d.ts +0 -5
  163. package/lib/build/proxy-server-modules-plugin.d.ts.map +0 -1
  164. package/lib/build/proxy-server-modules-plugin.js.map +0 -1
  165. package/lib/build/server/create-server-build-config.d.ts +0 -3
  166. package/lib/build/server/create-server-build-config.d.ts.map +0 -1
  167. package/lib/build/server/create-server-build-config.js.map +0 -1
  168. package/lib/build/server/generate-server-entry.d.ts +0 -5
  169. package/lib/build/server/generate-server-entry.d.ts.map +0 -1
  170. package/lib/build/server/generate-server-entry.js.map +0 -1
  171. package/lib/build.d.ts +0 -156
  172. package/lib/build.d.ts.map +0 -1
  173. package/lib/build.js.map +0 -1
  174. package/lib/commands/build.d.ts +0 -4
  175. package/lib/commands/build.d.ts.map +0 -1
  176. package/lib/commands/build.js.map +0 -1
  177. package/lib/commands/connection/add.d.ts +0 -37
  178. package/lib/commands/connection/add.d.ts.map +0 -1
  179. package/lib/commands/connection/add.js.map +0 -1
  180. package/lib/commands/connection/index.d.ts +0 -2
  181. package/lib/commands/connection/index.d.ts.map +0 -1
  182. package/lib/commands/connection/index.js.map +0 -1
  183. package/lib/commands/connection/remove.d.ts +0 -16
  184. package/lib/commands/connection/remove.d.ts.map +0 -1
  185. package/lib/commands/connection/remove.js.map +0 -1
  186. package/lib/commands/create.d.ts +0 -31
  187. package/lib/commands/create.d.ts.map +0 -1
  188. package/lib/commands/create.js.map +0 -1
  189. package/lib/commands/dev.d.ts +0 -16
  190. package/lib/commands/dev.d.ts.map +0 -1
  191. package/lib/commands/dev.js.map +0 -1
  192. package/lib/commands/version/create.d.ts +0 -16
  193. package/lib/commands/version/create.d.ts.map +0 -1
  194. package/lib/commands/version/create.js.map +0 -1
  195. package/lib/commands/version/index.d.ts +0 -2
  196. package/lib/commands/version/index.d.ts.map +0 -1
  197. package/lib/commands/version/index.js.map +0 -1
  198. package/lib/commands/version/invite.d.ts +0 -18
  199. package/lib/commands/version/invite.d.ts.map +0 -1
  200. package/lib/commands/version/invite.js.map +0 -1
  201. package/lib/commands/version/list.d.ts +0 -17
  202. package/lib/commands/version/list.d.ts.map +0 -1
  203. package/lib/commands/version/list.js.map +0 -1
  204. package/lib/commands/version/publish.d.ts +0 -18
  205. package/lib/commands/version/publish.d.ts.map +0 -1
  206. package/lib/commands/version/publish.js.map +0 -1
  207. package/lib/components/BuildError.d.ts +0 -4
  208. package/lib/components/BuildError.d.ts.map +0 -1
  209. package/lib/components/BuildError.js.map +0 -1
  210. package/lib/components/BuildLog.d.ts +0 -7
  211. package/lib/components/BuildLog.d.ts.map +0 -1
  212. package/lib/components/BuildLog.js.map +0 -1
  213. package/lib/components/Disclaimer.d.ts +0 -3
  214. package/lib/components/Disclaimer.d.ts.map +0 -1
  215. package/lib/components/Disclaimer.js.map +0 -1
  216. package/lib/components/InitialInstructions.d.ts +0 -5
  217. package/lib/components/InitialInstructions.d.ts.map +0 -1
  218. package/lib/components/InitialInstructions.js.map +0 -1
  219. package/lib/components/Logo.d.ts +0 -3
  220. package/lib/components/Logo.d.ts.map +0 -1
  221. package/lib/components/Logo.js.map +0 -1
  222. package/lib/components/MultiSelect.d.ts +0 -13
  223. package/lib/components/MultiSelect.d.ts.map +0 -1
  224. package/lib/components/MultiSelect.js.map +0 -1
  225. package/lib/components/ScrollBox.d.ts +0 -4
  226. package/lib/components/ScrollBox.d.ts.map +0 -1
  227. package/lib/components/ScrollBox.js.map +0 -1
  228. package/lib/components/ScrollBox.store.d.ts +0 -15
  229. package/lib/components/ScrollBox.store.d.ts.map +0 -1
  230. package/lib/components/ScrollBox.store.js.map +0 -1
  231. package/lib/components/ScrollBox.util.d.ts +0 -4
  232. package/lib/components/ScrollBox.util.d.ts.map +0 -1
  233. package/lib/components/ScrollBox.util.js.map +0 -1
  234. package/lib/components/Select.d.ts +0 -13
  235. package/lib/components/Select.d.ts.map +0 -1
  236. package/lib/components/Select.js.map +0 -1
  237. package/lib/components/Table.d.ts +0 -5
  238. package/lib/components/Table.d.ts.map +0 -1
  239. package/lib/components/Table.js.map +0 -1
  240. package/lib/components/TypeScriptErrors.d.ts +0 -4
  241. package/lib/components/TypeScriptErrors.d.ts.map +0 -1
  242. package/lib/components/TypeScriptErrors.js.map +0 -1
  243. package/lib/env.d.ts +0 -5
  244. package/lib/env.d.ts.map +0 -1
  245. package/lib/env.js.map +0 -1
  246. package/lib/hooks/useFullScreen.d.ts +0 -3
  247. package/lib/hooks/useFullScreen.d.ts.map +0 -1
  248. package/lib/hooks/useFullScreen.js.map +0 -1
  249. package/lib/hooks/useTerminalTitle.d.ts +0 -2
  250. package/lib/hooks/useTerminalTitle.d.ts.map +0 -1
  251. package/lib/hooks/useTerminalTitle.js.map +0 -1
  252. package/lib/machines/actors.d.ts +0 -3
  253. package/lib/machines/actors.d.ts.map +0 -1
  254. package/lib/machines/actors.js.map +0 -1
  255. package/lib/machines/add-connection-machine.d.ts +0 -290
  256. package/lib/machines/add-connection-machine.d.ts.map +0 -1
  257. package/lib/machines/add-connection-machine.js.map +0 -1
  258. package/lib/machines/build-machine.d.ts +0 -673
  259. package/lib/machines/build-machine.d.ts.map +0 -1
  260. package/lib/machines/build-machine.js.map +0 -1
  261. package/lib/machines/build-orchestrator.d.ts +0 -16
  262. package/lib/machines/build-orchestrator.d.ts.map +0 -1
  263. package/lib/machines/build-orchestrator.js.map +0 -1
  264. package/lib/machines/create-machine.d.ts +0 -240
  265. package/lib/machines/create-machine.d.ts.map +0 -1
  266. package/lib/machines/create-machine.js.map +0 -1
  267. package/lib/machines/create-version-machine.d.ts +0 -872
  268. package/lib/machines/create-version-machine.d.ts.map +0 -1
  269. package/lib/machines/create-version-machine.js.map +0 -1
  270. package/lib/machines/dev-machine.d.ts +0 -971
  271. package/lib/machines/dev-machine.d.ts.map +0 -1
  272. package/lib/machines/dev-machine.js.map +0 -1
  273. package/lib/machines/generate-invite-machine.d.ts +0 -168
  274. package/lib/machines/generate-invite-machine.d.ts.map +0 -1
  275. package/lib/machines/generate-invite-machine.js.map +0 -1
  276. package/lib/machines/js-machine.d.ts +0 -142
  277. package/lib/machines/js-machine.d.ts.map +0 -1
  278. package/lib/machines/js-machine.js.map +0 -1
  279. package/lib/machines/list-versions-machine.d.ts +0 -119
  280. package/lib/machines/list-versions-machine.d.ts.map +0 -1
  281. package/lib/machines/list-versions-machine.js.map +0 -1
  282. package/lib/machines/publish-version-machine.d.ts +0 -159
  283. package/lib/machines/publish-version-machine.d.ts.map +0 -1
  284. package/lib/machines/publish-version-machine.js.map +0 -1
  285. package/lib/machines/remove-connection-machine.d.ts +0 -103
  286. package/lib/machines/remove-connection-machine.d.ts.map +0 -1
  287. package/lib/machines/remove-connection-machine.js.map +0 -1
  288. package/lib/machines/ts-machine.d.ts +0 -81
  289. package/lib/machines/ts-machine.d.ts.map +0 -1
  290. package/lib/machines/ts-machine.js.map +0 -1
  291. package/lib/schema.d.ts +0 -46
  292. package/lib/schema.d.ts.map +0 -1
  293. package/lib/schema.js.map +0 -1
  294. package/lib/util/app-config.d.ts +0 -11
  295. package/lib/util/app-config.d.ts.map +0 -1
  296. package/lib/util/app-config.js.map +0 -1
  297. package/lib/util/copy-with-replace.d.ts +0 -2
  298. package/lib/util/copy-with-replace.d.ts.map +0 -1
  299. package/lib/util/copy-with-replace.js.map +0 -1
  300. package/lib/util/create-directory.d.ts +0 -2
  301. package/lib/util/create-directory.d.ts.map +0 -1
  302. package/lib/util/create-directory.js.map +0 -1
  303. package/lib/util/load-developer-config.d.ts +0 -41
  304. package/lib/util/load-developer-config.d.ts.map +0 -1
  305. package/lib/util/load-developer-config.js.map +0 -1
  306. package/lib/util/load-env.d.ts +0 -3
  307. package/lib/util/load-env.d.ts.map +0 -1
  308. package/lib/util/load-env.js.map +0 -1
  309. package/lib/util/slugify-extension.d.ts +0 -2
  310. package/lib/util/slugify-extension.d.ts.map +0 -1
  311. package/lib/util/slugify-extension.js.map +0 -1
  312. package/lib/util/typescript.d.ts +0 -41
  313. package/lib/util/typescript.d.ts.map +0 -1
  314. package/lib/util/typescript.js.map +0 -1
  315. package/lib/util/validate-slug.d.ts +0 -3
  316. package/lib/util/validate-slug.d.ts.map +0 -1
  317. package/lib/util/validate-slug.js.map +0 -1
package/attio.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("./lib/attio.js")
package/client.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./lib/client"
package/global.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export {}
2
+
3
+ declare global {
4
+ // Ignoring React because this is consumed as a peerDependency in extensions
5
+
6
+ function setTimeout(fn: () => void, ms: number): unknown
7
+
8
+ function clearTimeout(timeout: ReturnType<typeof setTimeout>): void
9
+
10
+ function setInterval(fn: () => void, ms: number): unknown
11
+
12
+ function clearInterval(interval: ReturnType<typeof setInterval>): void
13
+
14
+ function queueMicrotask(callback: () => void): void
15
+
16
+ const window: {
17
+ open(url?: string, target?: string, features?: string): void
18
+ }
19
+ }
@@ -29,4 +29,3 @@ export async function addConnectionDefinition({ token, devSlug, appId, connectio
29
29
  await handleError(response);
30
30
  return addConnectionSchema.parse(await response.json());
31
31
  }
32
- //# sourceMappingURL=add-connection-definition.js.map
@@ -19,4 +19,3 @@ export async function completeBundleUpload({ token, developerSlug, appId, devVer
19
19
  throw new Error(JSON.stringify(json));
20
20
  }
21
21
  }
22
- //# sourceMappingURL=complete-bundle-upload.js.map
@@ -19,4 +19,3 @@ export async function completeProdBundleUpload({ token, developerSlug, appId, bu
19
19
  throw new Error(JSON.stringify(json));
20
20
  }
21
21
  }
22
- //# sourceMappingURL=complete-prod-bundle-upload.js.map
@@ -38,4 +38,3 @@ export async function createApp({ token, developerSlug, appSlug, title, }) {
38
38
  throw new Error(JSON.stringify(json));
39
39
  }
40
40
  }
41
- //# sourceMappingURL=create-app.js.map
@@ -20,4 +20,3 @@ export async function createDevVersion({ token, devSlug, appId, targetWorkspaceI
20
20
  await handleError(response);
21
21
  return createDevVersionSchema.parse(await response.json());
22
22
  }
23
- //# sourceMappingURL=create-dev-version.js.map
@@ -34,4 +34,3 @@ export async function createDeveloperAccount({ token, developerSlug, }) {
34
34
  throw new Error(JSON.stringify(json));
35
35
  }
36
36
  }
37
- //# sourceMappingURL=create-developer-account.js.map
@@ -22,4 +22,3 @@ export async function createVersion({ token, devSlug, appId, connection, }) {
22
22
  await handleError(response);
23
23
  return createVersionSchema.parse(await response.json());
24
24
  }
25
- //# sourceMappingURL=create-version.js.map
@@ -47,4 +47,3 @@ export async function fetchUnpublishedVersions({ token, devSlug, appId, }) {
47
47
  const versions = await fetchVersions({ token, devSlug, appId });
48
48
  return versions.filter((v) => !v.is_published);
49
49
  }
50
- //# sourceMappingURL=fetch-versions.js.map
@@ -14,4 +14,3 @@ export async function generateInviteLink({ token, devSlug, appId, major, minor,
14
14
  const json = await response.json();
15
15
  return generateInviteLinkSchema.parse(json).invite_link;
16
16
  }
17
- //# sourceMappingURL=generate-invite-link.js.map
@@ -9,4 +9,3 @@ export async function handleError(response) {
9
9
  const error = serverErrorSchema.parse(json);
10
10
  throw new Error(error.message);
11
11
  }
12
- //# sourceMappingURL=handle-error.js.map
@@ -15,4 +15,3 @@ export async function isAppSlugValid({ token, developerSlug, appSlug, }) {
15
15
  await handleError(response);
16
16
  return !isAppSlugValidSchema.parse(await response.json()).exists;
17
17
  }
18
- //# sourceMappingURL=is-app-slug-valid.js.map
@@ -5,4 +5,3 @@ export function makeHeaders(token) {
5
5
  "Content-Type": "application/json",
6
6
  };
7
7
  }
8
- //# sourceMappingURL=make-headers.js.map
@@ -13,4 +13,3 @@ export async function publishVersion({ token, devSlug, appId, major, minor, }) {
13
13
  await handleError(response);
14
14
  return publishVersionSchema.parse(await response.json());
15
15
  }
16
- //# sourceMappingURL=publish-version.js.map
@@ -9,4 +9,3 @@ export async function removeConnectionDefinition({ token, devSlug, appId, }) {
9
9
  });
10
10
  await handleError(response);
11
11
  }
12
- //# sourceMappingURL=remove-connection-definition.js.map
@@ -16,4 +16,3 @@ export async function startUpload({ token, developerSlug, appId, devVersionId, }
16
16
  await handleError(response);
17
17
  return startUploadSchema.parse(await response.json());
18
18
  }
19
- //# sourceMappingURL=start-upload.js.map
package/lib/attio.js CHANGED
@@ -7,4 +7,3 @@ const app = new Pastel({
7
7
  version: "0.0.1",
8
8
  });
9
9
  await app.run();
10
- //# sourceMappingURL=attio.js.map
@@ -23,4 +23,3 @@ export function createClientBuildConfig({ appDir, contents, }) {
23
23
  ],
24
24
  };
25
25
  }
26
- //# sourceMappingURL=create-client-build-config.js.map
@@ -32,4 +32,3 @@ ${concreteRoutes
32
32
  .join("\n")}
33
33
  `;
34
34
  }
35
- //# sourceMappingURL=generate-client-entry.js.map
@@ -2,4 +2,3 @@ import { murmur3 } from "murmurhash-js";
2
2
  export function getModuleHash(modulePath) {
3
3
  return murmur3(modulePath).toString(16);
4
4
  }
5
- //# sourceMappingURL=get-module-hash.js.map
@@ -29,4 +29,3 @@ export function proxyServerModulesPlugin({ appDir }) {
29
29
  },
30
30
  };
31
31
  }
32
- //# sourceMappingURL=proxy-server-modules-plugin.js.map
@@ -19,4 +19,3 @@ export function createServerBuildConfig(contents) {
19
19
  ],
20
20
  };
21
21
  }
22
- //# sourceMappingURL=create-server-build-config.js.map
@@ -53,4 +53,3 @@ main()
53
53
 
54
54
  `;
55
55
  }
56
- //# sourceMappingURL=generate-server-entry.js.map
package/lib/build.js CHANGED
@@ -16,4 +16,3 @@ export const errorSchema = z.object({
16
16
  errors: z.array(buildErrorSchema),
17
17
  warnings: z.array(buildErrorSchema),
18
18
  });
19
- //# sourceMappingURL=build.js.map
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ /**
3
+ * Action Button
4
+ */
5
+ export declare function Action(props: {
6
+ onTrigger: () => void;
7
+ icon?: string;
8
+ disabled?: boolean;
9
+ children: React.ReactNode;
10
+ }): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface ComboboxOption {
2
+ value: string;
3
+ label: string;
4
+ color?: string;
5
+ }
6
+ export interface ComboboxOptionsProvider {
7
+ getOption: (value: string) => Promise<Omit<ComboboxOption, "value">>;
8
+ search: (query: string) => Promise<Array<ComboboxOption>>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ /**
3
+ * A modal dialog
4
+ */
5
+ export declare function Dialog(props: {
6
+ title: string;
7
+ visible: boolean;
8
+ onClose: () => void;
9
+ children: React.ReactNode;
10
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export { Action } from "./action.js";
2
+ export { ComboboxOption, ComboboxOptionsProvider } from "./combobox.js";
3
+ export { Dialog } from "./dialog.js";
4
+ export { Multistep, Step } from "./multistep.js";
5
+ export { Section } from "./section.js";
6
+ export { TextBlock } from "./text-block.js";
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ export interface Step {
3
+ title: string;
4
+ content: React.ReactNode;
5
+ isValid?: boolean;
6
+ }
7
+ /**
8
+ * A multi-step component
9
+ */
10
+ export declare function Multistep(props: {
11
+ initialStep?: number;
12
+ steps: ReadonlyArray<Step>;
13
+ onDone: () => void;
14
+ nextLabel?: string;
15
+ previousLabel?: string;
16
+ doneLabel?: string;
17
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ /**
3
+ * A section of a page
4
+ */
5
+ export declare function Section(props: {
6
+ title: string;
7
+ children?: React.ReactNode;
8
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ /**
3
+ * A text block
4
+ */
5
+ export declare function TextBlock(props: {
6
+ align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | "initial" | "inherit";
7
+ children: React.ReactNode;
8
+ }): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * An array form value.
3
+ */
4
+ export interface FormArray<T> {
5
+ type: "array";
6
+ elementType: T;
7
+ optional(): FormArray<T>;
8
+ }
9
+ /**
10
+ * Create a new array form value.
11
+ */
12
+ export declare function array<T>(elementType: T): FormArray<T>;
@@ -0,0 +1,48 @@
1
+ import { ComboboxOption, ComboboxOptionsProvider } from "../components";
2
+ import { ValueOf, PathTo } from "./path";
3
+ export interface Form<TSchema> {
4
+ Provider: (props: {
5
+ initialValues: ValueOf<TSchema>;
6
+ onSubmit: (data: ValueOf<TSchema>) => void;
7
+ children: React.ReactNode;
8
+ }) => JSX.Element;
9
+ WithSubmit: (props: {
10
+ children: (submit: () => void) => React.ReactNode;
11
+ }) => JSX.Element;
12
+ WithValues: (props: {
13
+ children: (values: ValueOf<TSchema>) => React.ReactNode;
14
+ }) => JSX.Element;
15
+ Input: React.FC<{
16
+ label: string;
17
+ data: PathTo<TSchema, "string" | "number">;
18
+ placeholder?: string;
19
+ disabled?: boolean;
20
+ }>;
21
+ Combobox: React.FC<{
22
+ label: string;
23
+ data: PathTo<TSchema, "string">;
24
+ options: Array<ComboboxOption> | ComboboxOptionsProvider;
25
+ placeholder?: string;
26
+ disabled?: boolean;
27
+ }>;
28
+ Collection: <TPath extends PathTo<TSchema, "array">>(props: {
29
+ label: string;
30
+ data: TPath;
31
+ children: (args: {
32
+ path: `${TPath}.${number}`;
33
+ index: number;
34
+ }) => React.ReactNode;
35
+ }) => React.ReactElement;
36
+ CollectionItem: React.FC<{
37
+ label: string;
38
+ children: React.ReactNode;
39
+ }>;
40
+ SubmitButton: React.FC<{
41
+ label: string;
42
+ disabled?: boolean;
43
+ }>;
44
+ }
45
+ /**
46
+ * Build a new form from a schema.
47
+ */
48
+ export declare function build<TSchema>(schema: TSchema): Form<TSchema>;
@@ -0,0 +1,4 @@
1
+ export { build } from "./build";
2
+ export { array } from "./array";
3
+ export { number } from "./number";
4
+ export { string } from "./string";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A number form value.
3
+ */
4
+ export interface FormNumber {
5
+ type: "number";
6
+ isOptional: boolean;
7
+ default(value: number): FormNumber;
8
+ max(max: number): FormNumber;
9
+ min(min: number): FormNumber;
10
+ }
11
+ /**
12
+ * Create a new number form value.
13
+ */
14
+ export declare function number(): FormNumber;
@@ -0,0 +1,34 @@
1
+ import { Prettify } from "../util/prettify";
2
+ import { FormArray } from "./array";
3
+ import { FormNumber } from "./number";
4
+ import { FormString } from "./string";
5
+ type Assert<TCat, TAnimal> = TCat extends TAnimal ? TCat : never;
6
+ type Join<A extends string | number | null, B extends string | number> = A extends null ? B : `${A}.${B}`;
7
+ export type ValueType = "string" | "number" | "array";
8
+ export type SchemaNode = FormString | FormNumber | FormArray<any> | {
9
+ type: "object";
10
+ };
11
+ type PathWithTypeRecursive<TState, TRoot extends string | number | null> = TState extends FormString ? {
12
+ path: TRoot;
13
+ type: "string";
14
+ } : TState extends FormNumber ? {
15
+ path: TRoot;
16
+ type: "number";
17
+ } : TState extends FormArray<infer TElement> ? {
18
+ path: TRoot;
19
+ type: "array";
20
+ } | PathWithTypeRecursive<TElement, Join<TRoot, number>> : {
21
+ [K in keyof TState]: K extends string ? PathWithTypeRecursive<TState[K], Join<TRoot, K>> : never;
22
+ }[keyof TState];
23
+ type PathWithType<TState> = Assert<Prettify<PathWithTypeRecursive<TState, null>>, {
24
+ path: string;
25
+ type: ValueType;
26
+ }>;
27
+ export type Path<TState> = PathWithType<TState>["path"];
28
+ export type PathTo<TState, TType extends ValueType> = Extract<PathWithType<TState>, {
29
+ type: TType;
30
+ }>["path"];
31
+ export type ValueOf<TState> = TState extends FormString ? string : TState extends FormNumber ? number : TState extends FormArray<infer TElement> ? Array<ValueOf<TElement>> : {
32
+ [K in keyof TState]: K extends string ? ValueOf<TState[K]> : never;
33
+ };
34
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A string form value.
3
+ */
4
+ export interface FormString {
5
+ type: "string";
6
+ isMultiline: boolean;
7
+ isOptional: boolean;
8
+ default(value: string): FormString;
9
+ multiline(): FormString;
10
+ optional(): FormString;
11
+ }
12
+ /**
13
+ * Create a new string form value.
14
+ */
15
+ export declare function string(): FormString;
@@ -0,0 +1,4 @@
1
+ export { useGraphQL } from "./use-graphql.js";
2
+ export { useLoader } from "./use-loader.js";
3
+ export { useQuery } from "./use-query.js";
4
+ export { useRecord } from "./use-record.js";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Temporary hook for playing with GraphQL queries.
3
+ */
4
+ export declare function useGraphQL(): (query: string, variableValues?: Record<string, any>) => Promise<any>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * An async function that loads data.
3
+ */
4
+ export type Loader<Input extends Array<any>, Output> = (...args: Input) => Promise<Output>;
5
+ /**
6
+ * A hook that returns the result of calling a loader.
7
+ */
8
+ export declare function useLoader<Input extends Array<any>, Output>(
9
+ /** A unique name for this function for caching */
10
+ name: string, loader: Loader<Input, Output>, ...args: Input): {
11
+ value: Output;
12
+ invalidate: () => void;
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare function useQuery<T>(
2
+ /** GraphQL query */
3
+ query: string,
4
+ /** GraphQL query variables */
5
+ variableValues?: Record<string, any>): T;
@@ -0,0 +1,9 @@
1
+ import { ObjectSlug } from "../object-slug.js";
2
+ /**
3
+ * Get information about the current record.
4
+ */
5
+ export declare function useRecord(): {
6
+ recordId: string;
7
+ object: ObjectSlug;
8
+ epithet: string;
9
+ };
@@ -0,0 +1,8 @@
1
+ export * from "./hooks/index.js";
2
+ export * from "./components/index.js";
3
+ export * as Forms from "./forms/index.js";
4
+ export { FormArray } from "./forms/array.js";
5
+ export { FormNumber } from "./forms/number.js";
6
+ export { FormString } from "./forms/string.js";
7
+ export * from "./forms/path.js";
8
+ export { Form } from "./forms/build.js";
@@ -0,0 +1,3 @@
1
+ export type SystemObjectSlug = "people" | "companies";
2
+ export type StandardObjectSlug = "deals" | "workspaces" | "users";
3
+ export type ObjectSlug = SystemObjectSlug | StandardObjectSlug | (string & {});
@@ -0,0 +1,3 @@
1
+ export type Prettify<T> = {
2
+ [K in keyof T]: T[K];
3
+ } & {};
@@ -35,4 +35,3 @@ export default function Build() {
35
35
  !jsError && !tsErrors && (React.createElement(Box, null,
36
36
  React.createElement(Text, null, "Unknown error")))))));
37
37
  }
38
- //# sourceMappingURL=build.js.map
@@ -113,4 +113,3 @@ export default function AddConnection({ options: { type: connectionType, audienc
113
113
  snapshot.context.error && (React.createElement(Box, { marginTop: 1 },
114
114
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
115
115
  }
116
- //# sourceMappingURL=add.js.map
@@ -1,2 +1 @@
1
1
  export const description = "Manage app connections";
2
- //# sourceMappingURL=index.js.map
@@ -39,4 +39,3 @@ export default function RemoveConnection({ options: { dev } }) {
39
39
  React.createElement(Box, null,
40
40
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
41
41
  }
42
- //# sourceMappingURL=remove.js.map
@@ -129,4 +129,3 @@ export default function Create({ args: [argName = ""], options: { dev, title, la
129
129
  React.createElement(Box, null,
130
130
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
131
131
  }
132
- //# sourceMappingURL=create.js.map
@@ -89,4 +89,3 @@ export default function Dev({ options: { debug } }) {
89
89
  jsError && renderBuildErrors(jsError),
90
90
  tsErrors && renderTypeScriptErrors(tsErrors)))));
91
91
  }
92
- //# sourceMappingURL=dev.js.map
@@ -69,4 +69,3 @@ export default function CreateVersion({ options: { dev } }) {
69
69
  snapshot.context.error && (React.createElement(Box, { marginTop: 1 },
70
70
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
71
71
  }
72
- //# sourceMappingURL=create.js.map
@@ -1,2 +1 @@
1
1
  export const description = "Manage app versions";
2
- //# sourceMappingURL=index.js.map
@@ -90,4 +90,3 @@ export default function GenerateInvite({ args: [version = ""], options: { dev }
90
90
  snapshot.context.error && (React.createElement(Box, { marginTop: 1 },
91
91
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
92
92
  }
93
- //# sourceMappingURL=invite.js.map
@@ -41,4 +41,3 @@ export default function ListVersions({ options: { dev } }) {
41
41
  snapshot.context.error && (React.createElement(Box, { marginTop: 1 },
42
42
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
43
43
  }
44
- //# sourceMappingURL=list.js.map
@@ -70,4 +70,3 @@ export default function PublishVersion({ args: [version = ""], options: { dev }
70
70
  snapshot.context.error && (React.createElement(Box, { marginTop: 1 },
71
71
  React.createElement(Text, { color: "red" }, snapshot.context.error))))));
72
72
  }
73
- //# sourceMappingURL=publish.js.map
@@ -38,4 +38,3 @@ export function renderBuildErrors({ errors, warnings }) {
38
38
  ...warnings.map((error, index) => (React.createElement(Error, { key: `BuildError-${index}`, message: error, level: "warning" }))),
39
39
  ];
40
40
  }
41
- //# sourceMappingURL=BuildError.js.map
@@ -4,4 +4,3 @@ export function BuildLog({ log }) {
4
4
  return (React.createElement(Box, { flexDirection: "column" }, log.map((msg, index) => (React.createElement(Box, { key: index },
5
5
  React.createElement(Text, null, msg))))));
6
6
  }
7
- //# sourceMappingURL=BuildLog.js.map
@@ -7,4 +7,3 @@ export const Disclaimer = () => (React.createElement(Box, { marginBottom: 2, mar
7
7
  React.createElement(Text, { color: "yellowBright" }, "You are using the Private Alpha version of this CLI tool.")),
8
8
  React.createElement(Box, { marginTop: 2, alignSelf: "center" },
9
9
  React.createElement(Text, { color: "magentaBright" }, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_PROMOTED)))));
10
- //# sourceMappingURL=Disclaimer.js.map
@@ -67,4 +67,3 @@ export const InitialInstructions = ({ reason }) => (React.createElement(Box, { f
67
67
  React.createElement(Text, null, "...")),
68
68
  React.createElement(Box, null,
69
69
  React.createElement(Text, null, "N. PROFIT!")))));
70
- //# sourceMappingURL=InitialInstructions.js.map
@@ -8,4 +8,3 @@ export const Logo = () => (React.createElement(Box, { flexDirection: "column" },
8
8
  React.createElement(Gradient, { name: "morning" },
9
9
  React.createElement(BigText, { text: "/. Attio" }))),
10
10
  React.createElement(Disclaimer, null)));
11
- //# sourceMappingURL=Logo.js.map
@@ -63,4 +63,3 @@ export function MultiSelect({ items, requiredMin = 0, onSubmit, }) {
63
63
  React.createElement(Text, null, item.label))));
64
64
  })));
65
65
  }
66
- //# sourceMappingURL=MultiSelect.js.map
@@ -85,4 +85,3 @@ export const ScrollBox = React.memo(({ padding, ...props }) => {
85
85
  hiddenBelow === 1 ? "" : "s",
86
86
  " ... press \u2193 to scroll")) : (React.createElement(Text, null, " "))))));
87
87
  });
88
- //# sourceMappingURL=ScrollBox.js.map
@@ -34,4 +34,3 @@ export function useScrollBoxStore(numChildren, availableHeight, width) {
34
34
  },
35
35
  }), [availableHeight, numChildren, width]);
36
36
  }
37
- //# sourceMappingURL=ScrollBox.store.js.map
@@ -25,4 +25,3 @@ export function calculateLastPageOffset(heights, offset, availableHeight) {
25
25
  }
26
26
  return 0;
27
27
  }
28
- //# sourceMappingURL=ScrollBox.util.js.map
@@ -4,4 +4,3 @@ import React from "react";
4
4
  export function Select({ initialValue, items, onSelect }) {
5
5
  return (React.createElement(SelectInput, { items: items.map((item) => ({ ...item, key: item.label })), onSelect: ({ value }) => onSelect(value), initialIndex: initialValue ? items.findIndex((item) => item.value === initialValue) : 0, indicatorComponent: ({ isSelected }) => isSelected ? React.createElement(Text, { color: "green" }, "> ") : React.createElement(Text, null, " "), itemComponent: ({ isSelected, label }) => (React.createElement(Text, { color: isSelected ? "green" : "white" }, label)) }));
6
6
  }
7
- //# sourceMappingURL=Select.js.map
@@ -31,4 +31,3 @@ export function Table({ rows, }) {
31
31
  rows.map((row, rowIndex) => (React.createElement(Box, { key: rowIndex, flexDirection: "row", width: "100%", borderStyle: "single", borderTop: rowIndex > 0, borderLeft: false, borderRight: false, borderBottom: rowIndex === rows.length - 1 }, columns.map((column, columnIndex) => (React.createElement(Box, { key: columnIndex, ...flexWidths[column] },
32
32
  React.createElement(Text, null, row[column])))))))));
33
33
  }
34
- //# sourceMappingURL=Table.js.map
@@ -36,4 +36,3 @@ const Error = React.forwardRef(({ error }, ref) => {
36
36
  export function renderTypeScriptErrors(errors) {
37
37
  return errors.map((error, index) => React.createElement(Error, { key: `TypeScriptError-${index}`, error: error }));
38
38
  }
39
- //# sourceMappingURL=TypeScriptErrors.js.map
package/lib/env.js CHANGED
@@ -3,4 +3,3 @@ const DOMAIN = `attio.${IS_DEV ? "me" : "com"}`;
3
3
  export const API = `https://api.${DOMAIN}`;
4
4
  export const APP_NO_PROTOCOL = `app.${DOMAIN}`;
5
5
  export const APP = `https://${APP_NO_PROTOCOL}`;
6
- //# sourceMappingURL=env.js.map
@@ -20,4 +20,3 @@ export const useFullScreen = () => {
20
20
  }, []);
21
21
  return { width: columns, height: rows };
22
22
  };
23
- //# sourceMappingURL=useFullScreen.js.map
@@ -9,4 +9,3 @@ export function useTerminalTitle(title) {
9
9
  }
10
10
  }, [title]);
11
11
  }
12
- //# sourceMappingURL=useTerminalTitle.js.map
@@ -24,4 +24,3 @@ export const loadAppConfig = fromCallback(({ sendBack }) => {
24
24
  }
25
25
  sendBack({ type: "App Config Loaded", config });
26
26
  });
27
- //# sourceMappingURL=actors.js.map
@@ -403,4 +403,3 @@ export const addConnectionMachine = setup({
403
403
  },
404
404
  initial: "Loading Developer Config",
405
405
  });
406
- //# sourceMappingURL=add-connection-machine.js.map