Compare commits

...
Author SHA1 Message Date
Devessier 2a784d2e24 feat: create workspaces and user workspaces 2026-02-26 18:31:59 +01:00
Devessier cddf40468f feat: batch updates 2026-02-26 16:46:37 +01:00
Devessier b68a8c6886 fix: send id correctly 2026-02-26 16:29:26 +01:00
Devessier cdd2bb2b37 feat: add missing relation fields + add insertion in function 2026-02-26 16:15:31 +01:00
Devessier fed7f1b57e Merge remote-tracking branch 'origin/main' into twenty-for-twenty-app 2026-02-26 13:41:17 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
08bfbfda45 Bump @emotion/styled from 11.13.0 to 11.14.1 (#18253)
Bumps [@emotion/styled](https://github.com/emotion-js/emotion) from
11.13.0 to 11.14.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/emotion-js/emotion/releases"><code>@​emotion/styled</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​emotion/styled</code><a
href="https://github.com/11"><code>@​11</code></a>.14.1</h2>
<h3>Patch Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/emotion-js/emotion/pull/3334">#3334</a>
<a
href="https://github.com/emotion-js/emotion/commit/0facbe47bd9099ae4ed22dc201822d910ac3dec5"><code>0facbe4</code></a>
Thanks <a
href="https://github.com/ZachRiegel"><code>@​ZachRiegel</code></a>! -
Renamed default-exported variable in <code>@emotion/styled</code> to aid
inferred import names in auto-import completions in IDEs</li>
</ul>
<h2><code>@​emotion/styled</code><a
href="https://github.com/11"><code>@​11</code></a>.14.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/emotion-js/emotion/pull/3284">#3284</a>
<a
href="https://github.com/emotion-js/emotion/commit/a19d019bd418ebc3b9cba0e58f58b36ac2862a42"><code>a19d019</code></a>
Thanks <a
href="https://github.com/Andarist"><code>@​Andarist</code></a>! - Source
code has been migrated to TypeScript. From now on type declarations will
be emitted based on that, instead of being hand-written.</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies [<a
href="https://github.com/emotion-js/emotion/commit/e1bf17ee87ec51da1412eb5291460ea95a39d27a"><code>e1bf17e</code></a>]:
<ul>
<li><code>@​emotion/use-insertion-effect-with-fallbacks</code><a
href="https://github.com/1"><code>@​1</code></a>.2.0</li>
</ul>
</li>
</ul>
<h2><code>@​emotion/styled</code><a
href="https://github.com/11"><code>@​11</code></a>.13.5</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/emotion-js/emotion/pull/3270">#3270</a>
<a
href="https://github.com/emotion-js/emotion/commit/77d930dc708015ff6fd34a1084bb343b02d732fa"><code>77d930d</code></a>
Thanks <a
href="https://github.com/emmatown"><code>@​emmatown</code></a>! - Fix
inconsistent hashes using development vs production
bundles/<code>exports</code> conditions when using
<code>@emotion/babel-plugin</code> with <code>sourceMap: true</code>
(the default). This is particularly visible when using Emotion with the
Next.js Pages router where the <code>development</code> condition is
used when bundling code but not when importing external code with
Node.js.</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/emotion-js/emotion/commit/77d930dc708015ff6fd34a1084bb343b02d732fa"><code>77d930d</code></a>]:</p>
<ul>
<li><code>@​emotion/serialize</code><a
href="https://github.com/1"><code>@​1</code></a>.3.3</li>
<li><code>@​emotion/utils</code><a
href="https://github.com/1"><code>@​1</code></a>.4.2</li>
<li><code>@​emotion/babel-plugin</code><a
href="https://github.com/11"><code>@​11</code></a>.13.5</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/emotion-js/emotion/commit/49229553967b6050c92d9602eb577bdc48167e91"><code>4922955</code></a>
Version Packages (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3335">#3335</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/0facbe47bd9099ae4ed22dc201822d910ac3dec5"><code>0facbe4</code></a>
Renamed default-exported variable in <code>@emotion/styled</code> to aid
inferred import...</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/cce67ec6b2fc94261028b4f4778aae8c3d6c5fd6"><code>cce67ec</code></a>
Bump parcel (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3258">#3258</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/3c19ce5997f73960679e546af47801205631dfde"><code>3c19ce5</code></a>
Version Packages (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3280">#3280</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/a19d019bd418ebc3b9cba0e58f58b36ac2862a42"><code>a19d019</code></a>
Convert <code>@emotion/styled</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3284">#3284</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/5974e33fcb5e7aee177408684ac6fe8b38b3e353"><code>5974e33</code></a>
Fix JSX namespace <a
href="https://github.com/ts-ignores"><code>@​ts-ignores</code></a> (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3282">#3282</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/fc4d7bd744c205f55513dcd4e4e5134198c219de"><code>fc4d7bd</code></a>
Convert <code>@emotion/react</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3281">#3281</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/8dc1a6dd19d2dc9ce435ef0aff85ccf5647f5d2e"><code>8dc1a6d</code></a>
Convert <code>@emotion/cache</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3277">#3277</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/282b61d2ad4e39ea65af88351a894a903c2d42c4"><code>282b61d</code></a>
Convert <code>@emotion/css-prettifier</code>'s source code to TypeScript
(<a
href="https://redirect.github.com/emotion-js/emotion/issues/3278">#3278</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/e1bf17ee87ec51da1412eb5291460ea95a39d27a"><code>e1bf17e</code></a>
Convert <code>@emotion/use-insertion-effect-with-fallbacks</code>'s
source code to TypeS...</li>
<li>Additional commits viewable in <a
href="https://github.com/emotion-js/emotion/compare/@emotion/[email protected]...@emotion/[email protected]">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@emotion/styled&package-manager=npm_and_yarn&previous-version=11.13.0&new-version=11.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 12:59:59 +01:00
Raphaël BosiandGitHub c025a0c2b8 Add events and properties to video, audio and iFrame (#18257)
- Add media-specific events
- Extend `iFrame` with missing properties
- Enrich `SerializedEventData` with media-related target fields so
serialized events carry the media element state.
- Refactor the `remote-elements` code generator to support per-element
custom events
2026-02-26 12:14:51 +01:00
Paul RastoinandGitHub 5e19361494 Allow uuidv5 for universal identifier (#18265)
Twenty apps are using v5
2026-02-26 12:13:38 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f11d76d6cf Bump @babel/preset-react from 7.26.3 to 7.28.5 (#18254)
Bumps
[@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react)
from 7.26.3 to 7.28.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/babel/babel/releases"><code>@​babel/preset-react</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.28.5 (2025-10-23)</h2>
<p>Thank you <a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>, <a
href="https://github.com/Olexandr88"><code>@​Olexandr88</code></a>, and
<a href="https://github.com/youthfulhps"><code>@​youthfulhps</code></a>
for your first PRs!</p>
<h4>👓 Spec Compliance</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17446">#17446</a>
Allow <code>Runtime Errors for Function Call Assignment Targets</code>
(<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-validator-identifier</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17501">#17501</a>
fix: update identifier to unicode 17 (<a
href="https://github.com/fisker"><code>@​fisker</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-proposal-destructuring-private</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17534">#17534</a>
Allow mixing private destructuring and rest (<a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17521">#17521</a>
Improve <code>@babel/parser</code> error typing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a
href="https://redirect.github.com/babel/babel/pull/17491">#17491</a>
fix: improve ts-only declaration parsing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-discard-binding</code>,
<code>babel-plugin-transform-destructuring</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17519">#17519</a>
fix: <code>rest</code> correctly returns plain array (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>,
<code>babel-helper-member-expression-to-functions</code>,
<code>babel-plugin-transform-block-scoping</code>,
<code>babel-plugin-transform-optional-chaining</code>,
<code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17503">#17503</a> Fix
<code>JSXIdentifier</code> handling in
<code>isReferencedIdentifier</code> (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17504">#17504</a>
fix: ensure scope.push register in anonymous fn (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-types</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17494">#17494</a>
Type checking babel-types scripts (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏃‍♀️ Performance</h4>
<ul>
<li><code>babel-core</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17490">#17490</a>
Faster finding of locations in <code>buildCodeFrameError</code> (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 8</h4>
<ul>
<li>Babel Bot (<a
href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
<li>Byeongho Yoo (<a
href="https://github.com/youthfulhps"><code>@​youthfulhps</code></a>)</li>
<li>Huáng Jùnliàng (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Hyeon Dokko (<a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>)</li>
<li>Nicolò Ribaudo (<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li><a
href="https://github.com/Olexandr88"><code>@​Olexandr88</code></a></li>
<li><a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
<li>fisker Cheung (<a
href="https://github.com/fisker"><code>@​fisker</code></a>)</li>
</ul>
<h2>v7.28.4 (2025-09-05)</h2>
<p>Thanks <a
href="https://github.com/gwillen"><code>@​gwillen</code></a> and <a
href="https://github.com/mrginglymus"><code>@​mrginglymus</code></a> for
your first PRs!</p>
<h4>🏠 Internal</h4>
<ul>
<li><code>babel-core</code>,
<code>babel-helper-check-duplicate-nodes</code>,
<code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17493">#17493</a>
Update Jest to v30.1.1 (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-regenerator</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17455">#17455</a>
chore: Clean up <code>transform-regenerator</code> (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/preset-react</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<blockquote>
<p><strong>Tags:</strong></p>
<ul>
<li>💥 [Breaking Change]</li>
<li>👓 [Spec Compliance]</li>
<li>🚀 [New Feature]</li>
<li>🐛 [Bug Fix]</li>
<li>📝 [Documentation]</li>
<li>🏠 [Internal]</li>
<li>💅 [Polish]</li>
</ul>
</blockquote>
<p><em>Note: Gaps between patch versions are faulty, broken or test
releases.</em></p>
<p>This file contains the changelog starting from v8.0.0-alpha.0.</p>
<ul>
<li>See <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v7.15.0-v7.28.5.md">CHANGELOG
- v7.15.0 to v7.28.5</a> for v7.15.0 to v7.28.5 changes (the last common
release between the v8 and v7 release lines was v7.28.5).</li>
<li>See <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v7.0.0-v7.14.9.md">CHANGELOG
- v7.0.0 to v7.14.9</a> for v7.0.0 to v7.14.9 changes.</li>
<li>See <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v7-prereleases.md">CHANGELOG
- v7 prereleases</a> for v7.0.0-alpha.1 to v7.0.0-rc.4 changes.</li>
<li>See <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v4.md">CHANGELOG
- v4</a>, <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v5.md">CHANGELOG
- v5</a>, and <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-v6.md">CHANGELOG
- v6</a> for v4.x-v6.x changes.</li>
<li>See <a
href="https://github.com/babel/babel/blob/main/.github/CHANGELOG-6to5.md">CHANGELOG
- 6to5</a> for the pre-4.0.0 version changelog.</li>
<li>See <a
href="https://github.com/babel/babel/blob/main/packages/babel-parser/CHANGELOG.md">Babylon's
CHANGELOG</a> for the Babylon pre-7.0.0-beta.29 version changelog.</li>
<li>See <a
href="https://github.com/babel/babel-eslint/releases"><code>babel-eslint</code>'s
releases</a> for the changelog before <code>@babel/eslint-parser</code>
7.8.0.</li>
<li>See <a
href="https://github.com/babel/eslint-plugin-babel/releases"><code>eslint-plugin-babel</code>'s
releases</a> for the changelog before <code>@babel/eslint-plugin</code>
7.8.0.</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<h2>v8.0.0-rc.2 (2026-02-15)</h2>
<h4>💥 Breaking Change</h4>
<ul>
<li>Other
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17766">#17766</a>
Remove unused code for old ESLint versions (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-code-frame</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17772">#17772</a>
Remove deprecated default export from <code>@babel/code-frame</code> (<a
href="https://github.com/fisker"><code>@​fisker</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-helpers</code>,
<code>babel-plugin-transform-async-generator-functions</code>,
<code>babel-runtime-corejs3</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17797">#17797</a>
fix: Properly handle <code>await</code> in <code>finally</code> (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17796">#17796</a>
Support ESLint 10 (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-preset-env</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17787">#17787</a>
Fix: preset-env include/exclude should accept bugfix plugins (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17781">#17781</a>
fix: preserve trailing comma in optional call args (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a
href="https://redirect.github.com/babel/babel/pull/17774">#17774</a> Fix
<code>undefined</code> indentation when exactly 64 indents (<a
href="https://github.com/YoussefHenna"><code>@​YoussefHenna</code></a>)</li>
</ul>
</li>
<li><code>babel-standalone</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17770">#17770</a>
fix: ensure <code>targets.esmodules</code> is validated (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-core</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/babel/babel/commit/61647ae2397c82c3c71f077b5ab109106a5cac0f"><code>61647ae</code></a>
v7.28.5</li>
<li><a
href="https://github.com/babel/babel/commit/42cb285b59fc99a8102d69bef6223b75617e9f46"><code>42cb285</code></a>
Improve <code>@babel/core</code> types (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react/issues/17404">#17404</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/eebd3a06021c13d335b5b0bd79734df3abbea678"><code>eebd3a0</code></a>
v7.27.1</li>
<li><a
href="https://github.com/babel/babel/commit/fdc0fb59e119ee0b38bced63867a344a5b4bc2f3"><code>fdc0fb5</code></a>
[Babel 8] Bump nodejs requirements to <code>^20.19.0 || &gt;=
22.12.0</code> (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react/issues/17204">#17204</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/cd24cc07ef6558b7f6510f9177f6393c91b0549f"><code>cd24cc0</code></a>
chore: Update TS 5.7 (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react/issues/17053">#17053</a>)</li>
<li>See full diff in <a
href="https://github.com/babel/babel/commits/v7.28.5/packages/babel-preset-react">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by [GitHub Actions](<a
href="https://www.npmjs.com/~GitHub">https://www.npmjs.com/~GitHub</a>
Actions), a new releaser for <code>@​babel/preset-react</code> since
your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/preset-react&package-manager=npm_and_yarn&previous-version=7.26.3&new-version=7.28.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 11:57:26 +01:00
Paul RastoinandGitHub 3aedce9af7 Fix remaining non v4 uuid universal identifier (#18263) 2026-02-26 11:24:01 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8e8ecfb8a3 Bump @sentry/react from 10.27.0 to 10.40.0 (#18252)
Bumps [@sentry/react](https://github.com/getsentry/sentry-javascript)
from 10.27.0 to 10.40.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/releases"><code>@​sentry/react</code>'s
releases</a>.</em></p>
<blockquote>
<h2>10.40.0</h2>
<h3>Important Changes</h3>
<ul>
<li>
<p><strong>feat(tanstackstart-react): Add global sentry exception
middlewares (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19330">#19330</a>)</strong></p>
<p>The <code>sentryGlobalRequestMiddleware</code> and
<code>sentryGlobalFunctionMiddleware</code> global middlewares capture
unhandled exceptions thrown in TanStack Start API routes and server
functions. Add them as the first entries in the
<code>requestMiddleware</code> and <code>functionMiddleware</code>
arrays of <code>createStart()</code>:</p>
<pre lang="ts"><code>import { createStart } from
'@tanstack/react-start/server';
import { sentryGlobalRequestMiddleware, sentryGlobalFunctionMiddleware }
from '@sentry/tanstackstart-react';
<p>export default createStart({
requestMiddleware: [sentryGlobalRequestMiddleware, myRequestMiddleware],
functionMiddleware: [sentryGlobalFunctionMiddleware,
myFunctionMiddleware],
});
</code></pre></p>
</li>
<li>
<p><strong>feat(tanstackstart-react)!: Export Vite plugin from
<code>@sentry/tanstackstart-react/vite</code> subpath (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19182">#19182</a>)</strong></p>
<p>The <code>sentryTanstackStart</code> Vite plugin is now exported from
a dedicated subpath. Update your import:</p>
<pre lang="diff"><code>- import { sentryTanstackStart } from
'@sentry/tanstackstart-react';
+ import { sentryTanstackStart } from
'@sentry/tanstackstart-react/vite';
</code></pre>
</li>
<li>
<p><strong>fix(node-core): Reduce bundle size by removing apm-js-collab
and requiring pino &gt;= 9.10 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/18631">#18631</a>)</strong></p>
<p>In order to keep receiving pino logs, you need to update your pino
version to &gt;= 9.10, the reason for the support bump is to reduce the
bundle size of the node-core SDK in frameworks that cannot tree-shake
the apm-js-collab dependency.</p>
</li>
<li>
<p><strong>fix(browser): Ensure user id is consistently added to
sessions (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19341">#19341</a>)</strong></p>
<p>Previously, the SDK inconsistently set the user id on sessions,
meaning sessions were often lacking proper coupling to the user set for
example via <code>Sentry.setUser()</code>.
Additionally, the SDK incorrectly skipped starting a new session for the
first soft navigation after the pageload.
This patch fixes these issues. As a result, metrics around sessions,
like &quot;Crash Free Sessions&quot; or &quot;Crash Free Users&quot;
might change.
This could also trigger alerts, depending on your set thresholds and
conditions.
We apologize for any inconvenience caused!</p>
<p>While we're at it, if you're using Sentry in a Single Page App or
meta framework, you might want to give the new <code>'page'</code>
session lifecycle a try!
This new mode no longer creates a session per soft navigation but
continues the initial session until the next hard page refresh.
Check out the <a
href="https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/browsersession/">docs</a>
to learn more!</p>
</li>
<li>
<p><strong>ref!(gatsby): Drop Gatsby v2 support (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19467">#19467</a>)</strong></p>
<p>We drop support for Gatsby v2 (which still relies on webpack 4) for a
critical security update in <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/releases/tag/5.0.0">https://github.com/getsentry/sentry-javascript-bundler-plugins/releases/tag/5.0.0</a></p>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat(astro): Add support for Astro on CF Workers (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19265">#19265</a>)</li>
<li>feat(cloudflare): Instrument async KV API (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19404">#19404</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md"><code>@​sentry/react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>10.40.0</h2>
<h3>Important Changes</h3>
<ul>
<li>
<p><strong>feat(tanstackstart-react): Add global sentry exception
middlewares (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19330">#19330</a>)</strong></p>
<p>The <code>sentryGlobalRequestMiddleware</code> and
<code>sentryGlobalFunctionMiddleware</code> global middlewares capture
unhandled exceptions thrown in TanStack Start API routes and server
functions. Add them as the first entries in the
<code>requestMiddleware</code> and <code>functionMiddleware</code>
arrays of <code>createStart()</code>:</p>
<pre lang="ts"><code>import { createStart } from
'@tanstack/react-start/server';
import { sentryGlobalRequestMiddleware, sentryGlobalFunctionMiddleware }
from '@sentry/tanstackstart-react/server';
<p>export default createStart({
requestMiddleware: [sentryGlobalRequestMiddleware, myRequestMiddleware],
functionMiddleware: [sentryGlobalFunctionMiddleware,
myFunctionMiddleware],
});
</code></pre></p>
</li>
<li>
<p><strong>feat(tanstackstart-react)!: Export Vite plugin from
<code>@sentry/tanstackstart-react/vite</code> subpath (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19182">#19182</a>)</strong></p>
<p>The <code>sentryTanstackStart</code> Vite plugin is now exported from
a dedicated subpath. Update your import:</p>
<pre lang="diff"><code>- import { sentryTanstackStart } from
'@sentry/tanstackstart-react';
+ import { sentryTanstackStart } from
'@sentry/tanstackstart-react/vite';
</code></pre>
</li>
<li>
<p><strong>fix(node-core): Reduce bundle size by removing apm-js-collab
and requiring pino &gt;= 9.10 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/18631">#18631</a>)</strong></p>
<p>In order to keep receiving pino logs, you need to update your pino
version to &gt;= 9.10, the reason for the support bump is to reduce the
bundle size of the node-core SDK in frameworks that cannot tree-shake
the apm-js-collab dependency.</p>
</li>
<li>
<p><strong>fix(browser): Ensure user id is consistently added to
sessions (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19341">#19341</a>)</strong></p>
<p>Previously, the SDK inconsistently set the user id on sessions,
meaning sessions were often lacking proper coupling to the user set for
example via <code>Sentry.setUser()</code>.
Additionally, the SDK incorrectly skipped starting a new session for the
first soft navigation after the pageload.
This patch fixes these issues. As a result, metrics around sessions,
like &quot;Crash Free Sessions&quot; or &quot;Crash Free Users&quot;
might change.
This could also trigger alerts, depending on your set thresholds and
conditions.
We apologize for any inconvenience caused!</p>
<p>While we're at it, if you're using Sentry in a Single Page App or
meta framework, you might want to give the new <code>'page'</code>
session lifecycle a try!
This new mode no longer creates a session per soft navigation but
continues the initial session until the next hard page refresh.
Check out the <a
href="https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/browsersession/">docs</a>
to learn more!</p>
</li>
<li>
<p><strong>ref!(gatsby): Drop Gatsby v2 support (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19467">#19467</a>)</strong></p>
<p>We drop support for Gatsby v2 (which still relies on webpack 4) for a
critical security update in <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/releases/tag/5.0.0">https://github.com/getsentry/sentry-javascript-bundler-plugins/releases/tag/5.0.0</a></p>
</li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>feat(astro): Add support for Astro on CF Workers (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/19265">#19265</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/663fd5e7e3c1808d4a636f001d768845f167668e"><code>663fd5e</code></a>
Increase bundler-tests timeout to 30s</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/8033ea380f0526cc863c6d50347fd5747ae5df32"><code>8033ea3</code></a>
release: 10.40.0</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/eb3c4d2489a77753377f7e3a320f18cd853ebf6a"><code>eb3c4d2</code></a>
Merge pull request <a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19488">#19488</a>
from getsentry/prepare-release/10.40.0</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/9a10630c6b7524d053b96cfaafa14751b0611f33"><code>9a10630</code></a>
meta(changelog): Update changelog for 10.40.0</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/39d1ef77849223f7742999c808f7f23da0c42adf"><code>39d1ef7</code></a>
fix(deps): Bump to latest version of each minimatch major (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19486">#19486</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/e8ed6d262f7f43cef8b04265794db83ab013f95c"><code>e8ed6d2</code></a>
test(nextjs): Deactivate canary test for cf-workers (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19483">#19483</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/6eb320eb3e01985720238c8f08e3ac114502059b"><code>6eb320e</code></a>
chore(deps): Bump Sentry CLI to latest v2 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19477">#19477</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/8fc81d2cd4048fb41b49e773d4829d9fb799f16c"><code>8fc81d2</code></a>
fix: Bump bundler plugins to v5 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19468">#19468</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/365f7fab4e33d69363d4eb6d99e5f87e48672fba"><code>365f7fa</code></a>
chore(ci): Adapt max turns of triage issue agent (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/19473">#19473</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript/commit/11e5412d42f6126e5415d67d1418ffdb17f5caa6"><code>11e5412</code></a>
feat(tanstackstart-react)!: Export Vite plugin from
<code>@​sentry/tanstackstart-rea</code>...</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-javascript/compare/10.27.0...10.40.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@sentry/react&package-manager=npm_and_yarn&previous-version=10.27.0&new-version=10.40.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 11:16:24 +01:00
martmullandGitHub 120096346a Add define post isntall logic function (#18248)
As title
2026-02-26 11:09:21 +01:00
Paul RastoinandGitHub fde8168a85 Centralized universal identifier validation on create (#18258) 2026-02-26 10:48:24 +01:00
Charles BochetandGitHub 2674589b44 Remove any recoil reference from project (#18250)
## Remove all Recoil references and replace with Jotai

### Summary

- Removed every occurrence of Recoil from the entire codebase, replacing
with Jotai equivalents where applicable
- Updated `README.md` tech stack: `Recoil` → `Jotai`
- Rewrote documentation code examples to use
`createAtomState`/`useAtomState` instead of `atom`/`useRecoilState`, and
removed `RecoilRoot` wrappers
- Cleaned up source code comment and Cursor rules that referenced Recoil
- Applied changes across all 13 locale translations (ar, cs, de, es, fr,
it, ja, ko, pt, ro, ru, tr, zh)
2026-02-26 10:28:40 +01:00
Charles BochetandGitHub f325509d96 Fix Jotai state leak in frontend tests causing unbounded memory growth (#18249)
## Summary

The global `jotaiStore` singleton was shared across all tests without
reset, leaking state between test suites and causing unbounded heap
growth within each Jest worker.

- `getJestMetadataAndApolloMocksWrapper` now creates a **fresh Jotai
store per wrapper** (equivalent of RecoilRoot isolation), so each test
gets clean state
- Added `workerIdleMemoryLimit: '512MB'` to recycle workers that still
accumulate memory
- Set `maxWorkers: 3` for CI

## Performance

Measured on 48 test suites (command-menu + views + object-record hooks),
single worker:

| Metric | Before | After |
|---|---|---|
| Peak heap | **1519 MB** | **~530 MB** (-65%) |
| Final heap | **1519 MB** | **437 MB** (-71%) |
| Growth pattern | Monotonic (never freed) | Bounded sawtooth (recycled
at 512MB) |
2026-02-26 01:20:25 +01:00
a9649b06d5 followup 18044 (#18213)
Co-authored-by: Charles Bochet <[email protected]>
2026-02-26 00:55:57 +01:00
Charles BochetandGitHub 0b4bf97f35 Fix twenty-sdk typecheck race condition (#18246)
## Fix SDK first-run build failure when generated API client is missing

### Problem

When running `twenty app:dev` for the first time, the build pipeline
crashes because:

1. The esbuild front-component watcher tries to resolve
`twenty-sdk/generated`, but the generated API client doesn't exist yet —
it's only created later in the pipeline after syncing with the server.
2. The typecheck plugin (`tsc --noEmit`) runs as a blocking esbuild
`onStart` hook, so even with stub files, type errors on the empty client
classes (e.g. `Property 'query' does not exist on type 'CoreApiClient'`)
cause the build to fail before the real client can be generated.

This creates a chicken-and-egg problem: the watchers need the generated
client to build, but the client is generated after the watchers produce
their output.

### Solution

**1. Stub generated client on startup**

Added `ensureGeneratedClientStub` to `ClientService` that writes minimal
placeholder files (`CoreApiClient`, `MetadataApiClient`) into
`node_modules/twenty-sdk/generated/` if the directory doesn't already
exist. This is called in `DevModeOrchestrator.start()` before any
watchers are created, so the `twenty-sdk/generated` import always
resolves.

**2. Skip typecheck on first sync round**

Made the esbuild typecheck plugin accept a `shouldSkipTypecheck`
callback. The orchestrator starts with `skipTypecheck = true` and passes
`() => this.skipTypecheck` through the watcher chain. After the real API
client is generated, the flag is flipped to `false`, so subsequent
rebuilds enforce full type checking with the real generated types.
2026-02-25 23:47:08 +01:00
4ea8245387 i18n - docs translations (#18245)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-25 23:42:24 +01:00
0fa8063054 Handle ObjectMetadataItem, FieldMetadataItem and NavigationMenuItem with SSE events (#18235)
This PR allows to handle ObjectMetadataItem, FieldMetadataItem and
NavigationMenuItem SSE events.

---------

Co-authored-by: Copilot <[email protected]>
2026-02-25 23:18:00 +01:00
Abdullah.andGitHub 546114d07f fix: next-mdx-remote related dependabot alerts (#18244)
Resolves [Dependabot Alert
485](https://github.com/twentyhq/twenty/security/dependabot/485) and
[Dependabot Alert
486](https://github.com/twentyhq/twenty/security/dependabot/486).

Bumped up `next-mdx-remote` to v6.0.0 and `remark-gfm` to v4.0.1 for
compatibility - no breaking changes for our use-case.
2026-02-25 23:12:23 +01:00
92824c6533 i18n - translations (#18243)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-25 22:34:27 +01:00
Charles BochetandGitHub bc4ae35bc4 Rework atom naming (#18240)
## Summary

- **Enhanced the `matching-state-variable` ESLint rule** to enforce
consistent naming for `ComponentState`, `FamilyState`, and
`ComponentFamilyState` hooks — previously it only covered `useAtomState`
and `useAtomStateValue`
- **The rule now checks 12 hooks** across three categories: value hooks
(`useAtomComponentStateValue`, `useAtomFamilyStateValue`, etc.), state
hooks (`useAtomComponentState`, `useAtomComponentFamilyState`), and
setter hooks (`useSetAtomState`, `useSetAtomComponentState`,
`useSetAtomFamilyState`, `useSetAtomComponentFamilyState`)
- **Fixed all 225 resulting lint violations** across 151 files, renaming
variables to match their state atom names (e.g. `currentViewId` →
`contextStoreCurrentViewId`, `selectedRecord` → `recordStore`). Cases
where the same state is accessed with different family keys/instance IDs
are suppressed with `eslint-disable-next-line`.

## Naming convention

| Hook | State argument | Valid | Invalid |
|------|---------------|-------|---------|
| `useAtomStateValue` | `fooState` | `const foo = ...` | `const bar =
...` |
| `useAtomComponentStateValue` | `fooComponentState` | `const foo = ...`
| `const bar = ...` |
| `useAtomFamilyStateValue` | `fooFamilyState` | `const foo = ...` |
`const bar = ...` |
| `useAtomComponentFamilyStateValue` | `fooComponentFamilyState` |
`const foo = ...` | `const bar = ...` |
| `useAtomState` | `fooState` | `const [foo, setFoo] = ...` | `const
[bar, setBar] = ...` |
| `useAtomComponentState` | `fooComponentState` | `const [foo, setFoo] =
...` | `const [bar, setBar] = ...` |
| `useAtomComponentFamilyState` | `fooComponentFamilyState` | `const
[foo, setFoo] = ...` | `const [bar, setBar] = ...` |
| `useSetAtomState` | `fooState` | `const setFoo = ...` | `const setBar
= ...` |
| `useSetAtomComponentState` | `fooComponentState` | `const setFoo =
...` | `const setBar = ...` |
| `useSetAtomFamilyState` | `fooFamilyState` | `const setFoo = ...` |
`const setBar = ...` |
| `useSetAtomComponentFamilyState` | `fooComponentFamilyState` | `const
setFoo = ...` | `const setBar = ...` |
2026-02-25 22:28:25 +01:00
EtienneandGitHub 1b805a36f3 Fix page layout widget creation with front component (#18242) 2026-02-25 22:07:51 +01:00
Baptiste DevessierandGitHub f7ea1d9500 Update doc for front components (#18196) 2026-02-25 22:04:37 +01:00
Abdullah.andGitHub cbb0f212cf fix: fast-xml-parser related dependabot alerts (#18241)
Resolves [Dependabot Alert
459](https://github.com/twentyhq/twenty/security/dependabot/459) and
[Dependabot Alert
483](https://github.com/twentyhq/twenty/security/dependabot/483).

Upgraded AWS SDKs pulling in fast-xml-parser as transitive dependency.
2026-02-25 22:01:34 +01:00
WeikoandGitHub 0af980a783 introduce metadata api client to twenty sdk (#18233)
Logic function: hello-world.ts
```typescript
import { CoreApiClient } from 'twenty-sdk/generated/core';
import { MetadataApiClient } from 'twenty-sdk/generated/metadata';

const handler = async () => {
  const coreClient = new CoreApiClient();
  const metadataClient = new MetadataApiClient();

  // Query the core /graphql endpoint — fetch some people
  const coreResult = await coreClient.query({
    people: {
      edges: {
        node: {
          id: true,
          name: {
            firstName: true,
            lastName: true,
          },
        },
      },
    },
  });

  // Query the metadata /metadata endpoint — fetch current workspace
  const metadataResult = await metadataClient.query({
    currentWorkspace: {
      id: true,
      displayName: true,
    },
  });

  return {
    coreResponse: coreResult,
    metadataResponse: metadataResult,
  };
};
```
With route trigger should now produce:
<img width="582" height="238" alt="Screenshot 2026-02-25 at 17 14 29"
src="https://github.com/user-attachments/assets/8c597113-7552-4d32-845a-352083d84ac7"
/>

```json
{
  "coreResponse": {
    "people": {
      "edges": [
        {
          "node": {
            "id": "20202020-b000-4485-94de-70c2a98daef2",
            "name": {
              "firstName": "Jeffery",
              "lastName": "Griffin"
            }
          }
        },
        {
          "node": {
            "id": "20202020-b003-415a-9051-133248495f7f",
            "name": {
              "firstName": "Terry",
              "lastName": "Melendez"
            }
          }
        },
        {
          "node": {
            "id": "20202020-b00e-4bc1-87c8-00aeb49c10f8",
            "name": {
              "firstName": "Lee",
              "lastName": "Jones"
            }
          }
        },
        {
          "node": {
            "id": "20202020-b012-44c1-9fdc-90f110962d07",
            "name": {
              "firstName": "Sarah",
              "lastName": "Hernandez"
            }
          }
        },
      ]
    }
  },
...
  "metadataResponse": {
    "currentWorkspace": {
      "id": "20202020-1c25-4d02-bf25-6aeccf7ea419",
      "displayName": "Apple"
    }
  }
}
2026-02-25 21:42:05 +01:00
Charles BochetandGitHub e01b641a05 Introduce npx nx mock:generate twenty-front (#18237)
## Add codegen script for frontend test mock data

### Summary

- Adds a new `npx nx mock:generate twenty-front` and
`generate-mock-data.ts` script that fetches object metadata from a
running server's `/metadata` endpoint, authenticates with default seeds,
and writes the result to a generated TypeScript file
(`src/testing/mock-data/generated/mock-metadata-query-result.ts`). This
replaces hand-maintained mock metadata with server-sourced data,
ensuring tests always reflect the real schema.
- Updates all frontend tests to be compatible with the newly generated
metadata, fixing hard-coded GraphQL queries, Zod validation schemas,
snapshot expectations, and Apollo mock mismatches.

### What changed

**New files**
- `scripts/generate-mock-data.ts` — codegen script that authenticates
against the server, queries `/metadata` for all object metadata (with
explicit `__typename` at every level), and writes a typed `.ts` file.
- `project.json` — added `mock:generate` Nx target (`dotenv npx tsx
scripts/generate-mock-data.ts`).

**Schema validation updates**
- `objectMetadataItemSchema.ts` — added `universalIdentifier`, made
`duplicateCriteria` nullable.
- `fieldMetadataItemSchema.ts` — added `universalIdentifier`, `morphId`,
`morphRelations`, restructured relation schema.
- `indexMetadataItemSchema.ts` — added optional `isCustom` field.
2026-02-25 21:40:05 +01:00
nitinandGitHub 50be97422d Fix dropdown scroll by restoring scroll container nesting order (#18239) 2026-02-25 19:55:08 +01:00
WeikoandGitHub 4ae8381ffc logicFunction sourceHandlerPath and builtHandlerPath manifest updates are not saved (#18230)
and delete legacy files
2026-02-25 19:24:24 +01:00
Paul RastoinandGitHub 856859f9f3 Fix front comp build/run order to be processed before dependent entities (#18232) 2026-02-25 18:52:59 +01:00
Paul RastoinandGitHub 98d67e0f6b Fix jwt auth guard for application (#18234) 2026-02-25 18:01:55 +01:00
Devessier a2d7e18dce feat: manually create a bunch of things 2026-02-25 17:51:12 +01:00
Charles BochetandGitHub 1fa55bfd02 Fix bugs tied to jotai migration (#18227)
Fixing a few bugs:
- CommandMenu not reactive
- Filtering on index view infinite loop
2026-02-25 17:11:12 +01:00
001c2097a3 i18n - docs translations (#18231)
Created by Github action

<!-- mintlify-editor-comments:start -->
Mintlify
---
0 threads from 0 users in Mintlify

- No unresolved comments
<!-- mintlify-editor-comments:end -->

<!-- mintlify-comment-->

<a
href="https://dashboard.mintlify.com/twenty/twenty/editor/i18n-docs?source=pr_comment"
target="_blank" rel="noopener noreferrer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"><img
src="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"
alt="Open in Mintlify Editor"></picture></a>

<!-- /mintlify-comment -->

Co-authored-by: github-actions <[email protected]>
2026-02-25 16:50:28 +01:00
9107f5bbc7 feat: upgrade ai package to version six and the corresponding @ai-sdk/* packages to compatible versions (#18172)
Used the migration guide to carry out this upgrade:
https://ai-sdk.dev/docs/migration-guides/migration-guide-6-0

I have not been able to test locally due to credits.

<img width="220" height="450" alt="image"
src="https://github.com/user-attachments/assets/050b34b9-3239-4010-8c47-b43d44571994"
/>

---------

Co-authored-by: Félix Malfait <[email protected]>
2026-02-25 16:49:26 +01:00
Devessier 00105454b8 feat: create all cloud user objects 2026-02-25 15:30:59 +01:00
Raphaël BosiandGitHub 435e21d23f [FRONT COMPONENTS] Serialize relation between widget and front component (#18228)
This allows us to define page layout widgets of type front component in
an app with the front component universal identifier.
2026-02-25 15:01:50 +01:00
martmullandGitHub 448241540d Improve create-twenty-app command (#18226)
as title
2026-02-25 14:10:47 +01:00
neo773GitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
e7f958c9cf Fix Google API Availability and a edge case (#18150)
First run shows a real customer account, and the second run is my
account with all the permissions.

<img width="1490" height="386" alt="SCR-20260221-bmfd"
src="https://github.com/user-attachments/assets/1e2bd269-67ab-450d-9bf3-3c4872b90773"
/>


Simulated edge case if user has access to neither

<img width="343" height="162" alt="SCR-20260221-bloo"
src="https://github.com/user-attachments/assets/a697302b-e8b0-432e-bd15-f689da06dc0e"
/>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-02-25 14:02:19 +01:00
Paul RastoinandGitHub 98e73791a4 Resolve involved application ids from API metadata (#18221)
# Introduction
Resolving each create|updated|deleted entities related entities
application through their universal foreingKey ( silently failing if not
found leaving the validator handling that )
In order to compute all the required application in the dependency flat
entity maps

## Tested
Creating a field on a custom local twenty-apps installed on the
workspace + view field

## Out of scope
- updated snapshot
- update graphql generated front
2026-02-25 13:58:38 +01:00
f3857c41b8 fix dashboard duplicate (#18193)
closes https://github.com/twentyhq/twenty/issues/18192
what was broken - wrong client


before - 


https://github.com/user-attachments/assets/1da60e07-622c-4884-b5bb-9eb7fc954782




after  - 


https://github.com/user-attachments/assets/fcf299f0-2515-410b-ad60-738c4b3dc322

---------

Co-authored-by: Raphaël Bosi <[email protected]>
2026-02-25 13:55:41 +01:00
Lucas BordeauandGitHub 2c02f2c499 Handle SSE event for View and ViewField (#18218)
This PR implements a first working version of SSE for View and
ViewField.

We could improve the logic but we re-use the same actual codepath for
refreshing the views of an object.

This does not handle filters and sorts for now.

# Demo 


https://github.com/user-attachments/assets/73367f3a-a5fc-4b06-a2e2-fad3b99deec7
2026-02-25 13:43:56 +01:00
Charles BochetandGitHub 121788c42f Fully deprecate old recoil (#18210)
## Summary

Removes the `recoil` dependency entirely from `package.json` and
`twenty-front/package.json`, completing the migration to Jotai as the
sole state management library.

Removes all Recoil infrastructure: `RecoilRoot` wrapper from `App.tsx`
and test decorators, `RecoilDebugObserver`, Recoil-specific ESLint rules
(`use-getLoadable-and-getValue-to-get-atoms`,
`useRecoilCallback-has-dependency-array`), and legacy Recoil utility
hooks/types (`useRecoilComponentState`, `useRecoilComponentValue`,
`createComponentState`, `createFamilyState`, `getSnapshotValue`,
`cookieStorageEffect`, `localStorageEffect`, etc.).

Renames all `V2`-suffixed Jotai state files and types to their canonical
names (e.g., `ComponentStateV2` -> `ComponentState`,
`agentChatInputStateV2` -> `agentChatInputState`, `SelectorCallbacksV2`
-> `SelectorCallbacks`), and removes the now-redundant V1 counterparts.

Updates ~433 files across the codebase to use the renamed Jotai imports,
remove Recoil imports, and clean up test wrappers (`RecoilRootDecorator`
-> `JotaiRootDecorator`).
2026-02-25 12:26:42 +01:00
Abdul RahmanandGitHub ecb7270a7b fix: delete orphan favorites before 1.18 migration (#18219) 2026-02-25 11:30:39 +01:00
Devessier e68b9c7062 feat: wip 2026-02-25 11:04:45 +01:00
martmullandGitHub e365b546d9 Deploy new cli version (#18216)
as title
2026-02-25 10:58:21 +01:00
martmullandGitHub f080b952eb Add manifest integration tests (#18203)
- add integration test on sync manifest endpoint
- fix invalid standard uuid + migration command
2026-02-25 10:37:50 +01:00
martmullandGitHub b84a8588be Fix function logs (#18215)
as title
2026-02-25 10:36:19 +01:00
martmullandGitHub e6a415b438 Fix twenty zapier (#18191)
as title
2026-02-25 10:35:46 +01:00
Charles BochetandGitHub d81f006979 Rename Jotai state hooks and utilities to consistent Atom-based naming (#18209)
## Summary

Rename all Jotai-based state management hooks and utilities to a
consistent naming convention that:
1. Removes legacy Recoil naming (`useRecoilXxxV2`, `createXxxV2`)
2. Always includes `Atom` in the name to distinguish from jotai native
hooks
3. Follows a consistent ordering: `Atom` → `Component` → `Family` →
`Type` (`State`/`Selector`)
4. Includes the type qualifier (`State` or `Selector`) in all
value-reading hooks to avoid naming conflicts with jotai's native
`useAtomValue`

## Naming Convention

**Hooks**:
`use[Set]Atom[Component][Family][State|Selector][Value|State|CallbackState]`
**Utils**: `createAtom[Component][Family][State|Selector]`

## Changes

### Hooks renamed (definition files + all usages across ~1,500 files):

| Old Name (Recoil) | Intermediate (Atom) | Final Name |
|---|---|---|
| `useRecoilValueV2` | `useAtomValue` | **`useAtomStateValue`** |
| `useRecoilStateV2` | `useAtomState` | `useAtomState` |
| `useSetRecoilStateV2` | `useSetAtomState` | `useSetAtomState` |
| `useFamilyRecoilValueV2` | `useFamilyAtomValue` |
**`useAtomFamilyStateValue`** |
| `useSetFamilyRecoilStateV2` | `useSetFamilyAtomState` |
**`useSetAtomFamilyState`** |
| `useFamilySelectorValueV2` | `useFamilySelectorValue` |
**`useAtomFamilySelectorValue`** |
| `useFamilySelectorStateV2` | `useFamilySelectorState` |
**`useAtomFamilySelectorState`** |
| `useRecoilComponentValueV2` | `useAtomComponentValue` |
**`useAtomComponentStateValue`** |
| `useRecoilComponentStateV2` | `useAtomComponentState` |
`useAtomComponentState` |
| `useSetRecoilComponentStateV2` | `useSetAtomComponentState` |
`useSetAtomComponentState` |
| `useRecoilComponentFamilyValueV2` | `useAtomComponentFamilyValue` |
**`useAtomComponentFamilyStateValue`** |
| `useRecoilComponentFamilyStateV2` | `useAtomComponentFamilyState` |
`useAtomComponentFamilyState` |
| `useSetRecoilComponentFamilyStateV2` |
`useSetAtomComponentFamilyState` | `useSetAtomComponentFamilyState` |
| `useRecoilComponentSelectorValueV2` | `useAtomComponentSelectorValue`
| `useAtomComponentSelectorValue` |
| `useRecoilComponentFamilySelectorValueV2` |
`useAtomComponentFamilySelectorValue` |
`useAtomComponentFamilySelectorValue` |
| `useRecoilComponentStateCallbackStateV2` |
`useAtomComponentStateCallbackState` |
`useAtomComponentStateCallbackState` |
| `useRecoilComponentSelectorCallbackStateV2` |
`useAtomComponentSelectorCallbackState` |
`useAtomComponentSelectorCallbackState` |
| `useRecoilComponentFamilyStateCallbackStateV2` |
`useAtomComponentFamilyStateCallbackState` |
`useAtomComponentFamilyStateCallbackState` |
| `useRecoilComponentFamilySelectorCallbackStateV2` |
`useAtomComponentFamilySelectorCallbackState` |
`useAtomComponentFamilySelectorCallbackState` |

### Utilities renamed:

| Old Name (Recoil) | Final Name |
|---|---|
| `createStateV2` | **`createAtomState`** |
| `createFamilyStateV2` | **`createAtomFamilyState`** |
| `createSelectorV2` | **`createAtomSelector`** |
| `createFamilySelectorV2` | **`createAtomFamilySelector`** |
| `createWritableSelectorV2` | **`createAtomWritableSelector`** |
| `createWritableFamilySelectorV2` |
**`createAtomWritableFamilySelector`** |
| `createComponentStateV2` | **`createAtomComponentState`** |
| `createComponentFamilyStateV2` | **`createAtomComponentFamilyState`**
|
| `createComponentSelectorV2` | **`createAtomComponentSelector`** |
| `createComponentFamilySelectorV2` |
**`createAtomComponentFamilySelector`** |

## Details

- All definition files renamed to match new convention
- All import paths and usages updated across the entire `twenty-front`
package
- Jotai's native `useAtomValue` is aliased as `useJotaiAtomValue` in the
wrapper hook to avoid collision
- Legacy Recoil files in `state/utils/` and `component-state/utils/`
left untouched (separate naming scope)
- Typecheck passes cleanly
2026-02-25 01:55:46 +01:00
Charles BochetandGitHub eaf9fe27b2 Improve Jotai work (#18205) 2026-02-24 20:38:30 +01:00
Baptiste DevessierandGitHub b339c93699 Fix app env var fetching (#18199) 2026-02-24 20:20:33 +01:00
Devessier b8d798f302 feat: finish clickhouse user validation and fetch people 2026-02-24 20:17:47 +01:00
Devessier a1deb09503 feat: fetch users from clickhouse 2026-02-24 19:37:42 +01:00
nitinandGitHub 887371054a Host-remote refresh token implementation (#18044) 2026-02-24 19:37:29 +01:00
Raphaël BosiandGitHub b56f85f36a Allow video, audio and iFrame in front components (#18200)
Allow video, audio and iFrame in front components

+ fix css style properties starting with `--`
2026-02-24 19:04:52 +01:00
Devessier d873a5972f fix: fix fetching 2026-02-24 18:27:34 +01:00
Devessier 2dc94f2f68 feat: set up env var 2026-02-24 18:14:55 +01:00
1ed13182d0 i18n - translations (#18197)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-24 18:10:28 +01:00
20d997bc5a Fix: Password validation requires data and hash arguments (#18189)
## Automated fix for [bug 5360](https://sonarly.com/issue/5360?type=bug)

**Severity:** `critical`

### Summary
When an existing user created via OAuth (with no password hash) attempts
to sign in through the signInUp password flow, their null passwordHash
is passed directly to bcrypt.compare, which throws an unhandled 'data
and hash arguments required' error instead of a user-friendly message.

### User Impact
Users who originally registered via Google or Microsoft OAuth and then
attempt to sign in using email/password through the signInUp flow cannot
authenticate. They see a server error instead of a helpful message like
'User was not created with email/password'. This blocks the user from
accessing the CRM entirely.

### Root Cause
Proximate cause: bcrypt.compare() at auth.util.ts:19 throws 'data and
hash arguments required' because the passwordHash argument is null.

1. Why did bcrypt throw? Because compareHash() was called with a null
passwordHash value. The compareHash function at auth.util.ts:19 passes
its arguments directly to bcrypt.compare without any null check.

2. Why was passwordHash null? Because SignInUpService.validatePassword()
at sign-in-up.service.ts:154 received a null passwordHash from
AuthService.validatePassword() at auth.service.ts:232. The value
userData.existingUser.passwordHash is null for users who were originally
created via an OAuth provider (Google, Microsoft) and never set a
password.

3. Why was there no null check before calling bcrypt? Because
AuthService.validatePassword() at line 229-233 does not check whether
userData.existingUser.passwordHash is null before passing it to
signInUpService.validatePassword(). The TypeScript type annotation says
passwordHash is string, but the UserEntity column is declared nullable:
true (user.entity.ts:73), so the runtime value can be null despite the
type system.

4. Why does this code path lack the null check when another path has it?
The validateLoginWithPassword() method at auth.service.ts:177 correctly
checks if (!user.passwordHash) and throws a user-friendly AuthException
'Incorrect login method'. This guard was added by Thomas Trompette on
2024-08-07 (commit 2abb6adb61). However, the signInUp flow's
validatePassword() method was introduced later by Antoine Moreaux on
2025-03-17 (commit bda835b9f8) without replicating this same defensive
check.

5. Why was this not caught? The signInUp validatePassword method was
written assuming the existingUser would always have a passwordHash when
the auth provider is Password. This assumption is incorrect because the
signInUp flow can match an existing OAuth-created user (who has no
passwordHash) when someone tries to sign up with email/password using an
email already registered via OAuth. No test covers this cross-provider
scenario in the signInUp path.

Root cause: The AuthService.validatePassword() method
(auth.service.ts:229-233) in the signInUp code path is missing a null
guard on userData.existingUser.passwordHash before passing it to
bcrypt.compare. The fix should check for null/undefined passwordHash and
throw a descriptive AuthException, mirroring the existing guard in
validateLoginWithPassword at line 177.

**Introduced by:** Antoine Moreaux on 2025-03-17 in commit
[`bda835b`](https://github.com/twentyhq/twenty/commit/bda835b9f82)

### Suggested Fix
Added a null check on userData.existingUser.passwordHash inside the
validatePassword private method of AuthService, immediately before
calling signInUpService.validatePassword. When passwordHash is null or
undefined (i.e. the user was created via OAuth and never set a
password), an AuthException with code INVALID_INPUT is thrown with the
user-friendly message 'User was not created with email/password'. This
mirrors the identical guard that already exists in
validateLoginWithPassword at line 177, preventing bcrypt.compare from
receiving a null argument and crashing with an unhandled error.

### Evidence
- **Code:**
[packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts:229
- if (userData.type === 'existingUser')
{](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts#L229)

---
*Generated by [Sonarly](https://sonarly.com)*

Co-authored-by: Sonarly Claude Code <[email protected]>
2026-02-24 17:52:53 +01:00
Charles BochetandGitHub 0f2af6a6cb Jotai 13 (#18178)
## Recoil to Jotai Migration — PR 13: Workflow, Page Layout, AI,
Activities, Settings, SSE & Remaining Modules

### Summary

This is the 13th PR in the [14-PR migration
series](packages/twenty-front/src/modules/ui/utilities/state/jotai/MIGRATION_PLAN.md)
to replace Recoil with Jotai as the state management library in
`twenty-front`. This PR migrates the remaining consumer code across all
modules — updating ~1,076 files with ~10k insertions/deletions.

### What changed

**New Jotai infrastructure (13 new files):**
- `createComponentSelectorV2` and `createComponentFamilySelectorV2` —
instance-scoped derived atoms, replacing Recoil's component selectors
- 6 new hooks: `useRecoilComponentSelectorValueV2`,
`useRecoilComponentFamilySelectorValueV2`,
`useRecoilComponentSelectorCallbackStateV2`,
`useRecoilComponentFamilySelectorCallbackStateV2`,
`useRecoilComponentStateCallbackStateV2`,
`useRecoilComponentFamilyStateCallbackStateV2`
- New types: `ComponentSelectorV2`, `ComponentFamilySelectorV2`,
`SelectorCallbacksV2`
- Extended `buildGetHelper` to support the new selector patterns

**State definition migrations:**
- `createState()` → `createStateV2()` (Jotai `atom()`)
- `createFamilyState()` → `createFamilyStateV2()` (Jotai `atom()` with
family cache)
- Recoil `selector`/`selectorFamily` → Jotai derived `atom()` via V2
utilities

**Hook migrations (~2,400 removed, ~1,545 added V2 equivalents):**
- `useRecoilValue` → `useRecoilValueV2`
- `useRecoilState` → `useRecoilStateV2`
- `useSetRecoilState` → `useSetRecoilStateV2`
- `useRecoilCallback` → `useCallback` + `jotaiStore.get/set`
- `useRecoilComponentValue` → `useRecoilComponentValueV2`
- `useSetRecoilComponentState` → `useSetRecoilComponentStateV2`
- `useRecoilComponentFamilyValue` → `useRecoilComponentFamilyValueV2` /
`useFamilySelectorValueV2`
- ~397 direct `import from 'recoil'` removed

**Deleted files (9 files):**
- `dateLocaleState.ts` — consolidated
- `currentAIChatThreadTitleStateV2.ts` — renamed to replace the original
- `isCommandMenuOpenedState.ts` — removed
- `filesFieldUploadState.ts` — replaced by V2
- `recordStoreFamilySelector.ts`, `recordStoreFieldValueSelector.ts`,
`recordStoreRecordsSelector.ts` — replaced by V2 equivalents
- `settingsAllRolesSelector.ts` — replaced by `useSettingsAllRoles` hook
- `settingsRoleIdsStateV2.ts` — consolidated

**Modules migrated:**
- Workflow (diagram, steps, variables, filters)
- Page Layout (widgets, fields, graph, tabs)
- AI (chat, agents, browsing context)
- Activities (rich text editor, targets, timeline)
- Action Menu (single/multiple record actions)
- Command Menu (navigation, history, pages, workflow)
- Context Store
- Record Board, Record Table, Record Calendar, Record Index
- Record Field, Record Filter, Record Sort, Record Group
- Record Drag, Record Picker, Record Store
- Views (view bar, view picker, filters, sorts)
- Settings (roles, permissions, SSO, security, data model, developers,
domains)
- SSE (event streams, subscriptions)
- Spreadsheet Import
- Auth, Favorites, Front Components, Information Banner
2026-02-24 17:37:01 +01:00
Devessier 6d05beb64e feat: clean 2026-02-24 17:14:41 +01:00
Devessier 453f3d7f91 feat: scaffold 2026-02-24 17:13:26 +01:00
Paul RastoinandGitHub c6ec764b23 Fix ci-server ci (#18180) 2026-02-24 12:51:46 +01:00
959cbfb725 i18n - translations (#18183)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-24 12:08:42 +01:00
Félix MalfaitandGitHub 458a61ed30 Change runner from depot-ubuntu-24.04 to ubuntu-latest (#18182) 2026-02-24 10:17:38 +01:00
9a3852bf04 feat: add two-layer AI model availability filtering (#18170)
## Summary

- **Admin-level filtering**: New AI tab in admin panel with server-wide
model availability controls (whitelist/blacklist via
`AI_AUTO_ENABLE_NEW_MODELS`, `AI_DISABLED_MODEL_IDS`,
`AI_ENABLED_MODEL_IDS` config variables). Dedicated
`setAdminAiModelEnabled` mutation replaces frontend config-variable
manipulation. Filter dropdown to show/hide unconfigured and deprecated
models.
- **Workspace-level filtering**: Per-workspace controls with "Use best
models only" mode (curated list backed by `isRecommended` flag), or
custom whitelist/blacklist. Separate Smart/Fast model selectors with
"Best (...)" virtual options.
- **Security enforcement**: Both layers enforced at every backend
execution point — workspace update, agent create/update, chat execution.
Model ID validated against known models before config mutation. All
admin endpoints protected by `AdminPanelGuard`.

## Changes

### Backend (`twenty-server`)
- New config variables for admin-level model filtering
- `AiModelRegistryService`: `getAllModelsWithStatus()`,
`setModelAdminEnabled()` with model ID validation,
`isModelAdminAllowed()`
- `AdminPanelResolver`: `getAdminAiModels` query,
`setAdminAiModelEnabled` mutation
- `WorkspaceEntity`: new fields (`autoEnableNewAiModels`,
`disabledAiModelIds`, `enabledAiModelIds`, `useRecommendedModels`)
- `WorkspaceService`: model validation on `smartModel`/`fastModel`
updates
- `AgentResolver`: model availability checks on create/update
- `isModelAllowedByWorkspace` centralized utility
- `isRecommended` flag on model definitions
- Two TypeORM migrations

### Frontend (`twenty-front`)
- New `SettingsAdminAI` component with search, filter dropdown
(unconfigured/deprecated), and model toggle cards
- AI tab added to admin panel navigation
- `useWorkspaceAiModelAvailability` hook for workspace-level filtering
- `SettingsAIModelsTab` redesigned: merged sections, "Use best models
only" toggle, conditional available models list
- `getModelIcon`/`getModelProviderLabel` shared utilities with GraphQL
enum casing normalization
- Updated generated GraphQL types and mock data

## Test plan
- [ ] Toggle models on/off in admin panel AI tab and verify they
appear/disappear in workspace settings
- [ ] Enable "Use best models only" in workspace settings and verify
only recommended models are selectable
- [ ] Disable recommended mode and verify whitelist/blacklist toggles
work correctly
- [ ] Verify deprecated models hidden by default, shown greyed out when
filter enabled
- [ ] Verify unconfigured models hidden by default, shown disabled when
filter enabled
- [ ] Try setting a disabled model as Smart/Fast model — should be
rejected
- [ ] Try creating an agent with a disabled model — should be rejected
- [ ] Verify admin panel AI tab requires admin access


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
2026-02-24 10:14:24 +01:00
c369baf63a i18n - translations (#18176)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-24 10:07:16 +01:00
Paul RastoinandGitHub 9e8024a07a Restore depot (#18179) 2026-02-24 09:59:54 +01:00
a827681306andGitHub df196b4a03 fix: use default Apollo client for AI chat file upload (#18158)
## Summary

Fix file uploads in AI chat (Agent Chat) failing with "Failed to upload
file" for all file types.

## Root Cause

`useAIChatFileUpload.ts` was using `useApolloCoreClient()` which points
to the `/graphql` (workspace) endpoint. However, `FileUploadResolver` is
decorated with `@MetadataResolver()`, meaning `uploadFile` is only
registered on the `/metadata` endpoint.

## Fix

Replace `useApolloCoreClient()` with `useApolloClient()` from
`@apollo/client`, which is the default Apollo client pointing to the
`/metadata` endpoint. This is consistent with how
`useUploadAttachmentFile.tsx` handles file uploads.

## Changes

- Replaced `useApolloCoreClient` import with `useApolloClient` from
`@apollo/client`
- Updated the client variable to use the default Apollo client
- Removed unused `useApolloCoreClient` import

Fixes #18153
2026-02-24 09:54:29 +01:00
Paul RastoinandGitHub af0af0a237 Fix cross app installation (#18151)
# Introduction
- Fixing app dependencyFlatEntityMaps load ( to load current app +
dependent app )
- Fix empty flat entity maps and undefined optimistic override
- Refactor the optimistic rendering to be mutation oriented at
orchestrator level
2026-02-23 19:58:06 +01:00
Charles BochetandGitHub 0d4fe4575b Various SDK improvements (#18115)
## Summary

- **Refactor frontend metadata loading architecture**: Split the
monolithic `EagerMetadataLoadEffect` into focused provider effects
(`UserMetadataProviderEffect`, `ObjectMetadataProviderEffect`,
`ViewMetadataProviderEffect`) orchestrated by `MetadataProviderEffects`.
Replaced `UserProvider` + `ObjectMetadataItemsProvider` with a single
`MetadataGater` that gates rendering on `isAppMetadataReadyState`. The
metadata store now validates view-object consistency before promoting
views, and `updateDraft` skips no-op updates via deep equality checks.

- **SDK CLI improvements**: Added `app:typecheck` command, improved
error handling in API sync (extracts GraphQL error messages), added
`serializeError` utility for human-readable error output, added `error`
file status to dev mode orchestrator with UI support, and fixed
ClickHouse migration/seed commands to use `transpile-only`.
2026-02-23 19:57:02 +01:00
Thomas TrompetteandGitHub ccddd105d8 Add generate key command (#18171)
Will be useful to auto log users on app creation
2026-02-23 19:56:44 +01:00
e21a7e11b2 i18n - translations (#18175)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-23 19:56:31 +01:00
WeikoandGitHub 1ac87d106e With RLS predicates on Select, only show possible values in option picker (#18166)
## Context
Removing SELECT/MULTI_SELECT options that can't be selected due to RLS
(see https://github.com/twentyhq/core-team-issues/issues/2226)

<img width="521" height="276" alt="Screenshot 2026-02-23 at 11 30 21"
src="https://github.com/user-attachments/assets/238ff596-cd8c-4660-a709-3eb2486e23b4"
/>
<img width="279" height="200" alt="Screenshot 2026-02-23 at 11 30 03"
src="https://github.com/user-attachments/assets/7a627d74-7519-4314-9a0e-0890cb8cbf30"
/>
2026-02-23 19:25:58 +01:00
9a0295fd3d feat: add atomic upsertFieldsWidget mutation to replace multiple view field group/field API calls (#18137)
The `useSaveFieldsWidgetGroups` hook was making multiple sequential API
calls per widget (create groups, delete groups, update groups, update
fields) — non-atomic, chatty, and with heavy diff computation on the
frontend.

## Backend

- **New input DTOs**: `UpsertFieldsWidgetInput` /
`UpsertFieldsWidgetGroupInput` / `UpsertFieldsWidgetFieldInput` — caller
passes the full desired state of groups + fields for a widget
- **`FieldsWidgetUpsertService`**: looks up widget → resolves `viewId`,
diffs against existing flat entity maps, builds optimistic group maps so
newly-created groups can be referenced by field updates in the same
pass, then runs creates/updates/deletes in a single
`validateBuildAndRunWorkspaceMigration` call
- **`upsertFieldsWidget` mutation** added to `ViewFieldGroupResolver`;
new `FIELDS_WIDGET_NOT_FOUND` exception code added and wired into the
GraphQL exception filter

## Frontend

- New `UPSERT_FIELDS_WIDGET` GQL document
- `useSaveFieldsWidgetGroups` replaces all per-operation calls with a
single mutation per widget, passing the full draft state — diff logic
moves entirely to the backend

```graphql
mutation UpsertFieldsWidget($input: UpsertFieldsWidgetInput!) {
  upsertFieldsWidget(input: $input) {
    id
    name
    position
    isVisible
    viewId
    viewFields { id isVisible position ... }
  }
}
```

Widget IDs are collected from both draft **and** persisted state so
widgets whose draft groups were cleared still trigger deletion of their
server-side groups.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

Start implementation

The user has attached the following file paths as relevant context:
 - CLAUDE.md

<analysis>
[Chronological Review: The conversation began with the user requesting a
review of how updates on views are stored in the frontend of record page
layouts. The user expressed a desire to migrate heavy computations and
multiple requests from the frontend to the backend. They proposed
creating a custom upsertFieldsWidget mutation to handle updates
atomically. The conversation has focused on this migration strategy and
its implementation.]

[Intent Mapping: The user explicitly requested to "check how we store
updates on views in the frontend of record page layouts" and indicated a
need to "migrate this task to the backend" by creating a custom mutation
for atomic updates.]

[Technical Inventory: The conversation involves the following technical
concepts:
- Frontend and backend architecture for handling page layout updates.
- Custom GraphQL mutation (upsertFieldsWidget) for atomic updates.
- The file in focus is page-layout-update.service.ts, which is likely
responsible for handling updates related to page layouts in the
backend.]

[Code Archaeology: The specific file being worked on is
/Users/devessier/Web/twenty/packages/twenty-server/src/engine/metadata-modules/page-layout/services/page-layout-update.service.ts.
The user is likely looking to modify or enhance this service to
accommodate the new mutation for handling updates.]

[Progress Assessment: The user has identified the need for a backend
migration strategy but has not yet implemented any changes. The focus is
on planning the transition from frontend to backend processing.]

[Context Validation: All critical information for continuation is
captured, including the user's intent to migrate computations to the
backend and the specific file being modified.]

[Recent Commands Analysis: The last agent commands involved checking the
current file context and the user's request to summarize the
conversation. No specific tool results were generated as the focus was
on summarizing the conversation history. The agent was actively working
on summarizing the conversation when the token budget was exceeded,
which was triggered by the user's request for a summary.]

</analysis>

<summary>
1. Conversation Overview:
- Primary Objectives: The user requested to "check how we store updates
on views in the frontend of record page layouts" and expressed a desire
to "migrate this task to the backend" by creating a custom
upsertFieldsWidget mutation for atomic updates.
- Session Context: The conversation has focused on the need to shift
heavy computations from the frontend to the backend, with an emphasis on
implementing a new mutation to streamline updates.
- User Intent Evolution: The user's needs have remained consistent,
focusing on backend migration for efficiency and atomicity in updates.

2. Technical Foundation:
- Core Technology: The conversation involves a backend service likely
built with Node.js and TypeScript, as indicated by the file path.
- Framework/Library: The use of GraphQL for handling mutations is
implied through the mention of a custom mutation.
- Architectural Pattern: The user is looking to implement a
service-oriented architecture where the backend handles complex
computations instead of the frontend.
- Environment Detail: The current working file is located in a server
package of the twenty repository.

3. Codebase Status:
- File Name: page-layout-update.service.ts
- Purpose: This file is responsible for managing updates related to page
layouts in the backend.
- Current State: The user is considering modifications to implement a
new mutation for handling updates.
- Key Code Segments: Specific functions or classes have not been
detailed yet, as the focus is on planning changes.
- Dependencies: This service likely interacts with other components in
the metadata-modules related to page layouts.

4. Problem Resolution:
- Issues Encountered: The current challenge is the inefficiency of
handling updates in the frontend.
- Solutions Implemented: The proposed solution is to create a custom
mutation to handle updates atomically in the backend.
- Debugging Context: No ongoing troubleshooting efforts have been
mentioned yet.
- Lessons Learned: The need for backend processing to improve
performance has been highlighted.

5. Progress Tracking:
- Completed Tasks: No tasks have been completed yet; the user is in the
planning phase.
- Partially Complete Work: The user is preparing to implement a new
mutation for backend updates.
- Validated Outcomes: No features have been confirmed working through
testing at this stage.

6. Active Work State:
- Current Focus: The user is focused on modifying the
page-layout-update.service.ts to implement the new mutation.
- Recent Context: The last few exchanges involved discussing the
migration of update tasks from the frontend to the backend.
- Working Code: No specific code snippets have been modified yet, as the
co...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

Created from [VS
Code](https://code.visualstudio.com/docs/copilot/copilot-coding-agent).

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Devessier <[email protected]>
Co-authored-by: Baptiste Devessier <[email protected]>
2026-02-23 19:25:47 +01:00
a0c0e7de25 [FRONT COMPONENTS] Add snackbar to the API (#18136)
## PR description

- Adds `enqueueSnackbar` to the front component host communication API,
allowing front components to display snack bar notifications (success,
error, info, warning) to the user.
- Introduces `frontComponentId` to the `FrontComponentExecutionContext`
and a `useFrontComponentId` hook, enabling front components to identify
themselves (used for dedupe keys).
- Wires error/success notifications into the `Action`, `ActionLink`, and
`ActionOpenSidePanelPage` SDK components -> actions now catch errors and
display them as snack bars, and `Action` supports an optional
`notifyOnEnd` prop for success feedback.

## Video QA

### Success example


https://github.com/user-attachments/assets/8cc53d31-d9eb-49a8-9220-f7866ec1b415

### Error example


https://github.com/user-attachments/assets/a37d65b8-0b5f-4adb-bcdb-571bb2b997c3

---------

Co-authored-by: Charles Bochet <[email protected]>
2026-02-23 12:25:05 +01:00
EtienneGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
7cbbd082e3 Billing - Fix (#18135)
Context : https://github.com/twentyhq/private-issues/issues/425
Try to fix https://github.com/twentyhq/core-team-issues/issues/2158

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-23 12:13:19 +01:00
Charles BochetandGitHub 7944ca29fa Fix CI (#18168)
Fix 2 issues on CI:
- website still using ubuntu-latest
- linter that cannot use more than 2GB
2026-02-23 12:05:53 +01:00
b51eb6471f Jotai 12 (#18160)
Co-authored-by: Cursor <[email protected]>
2026-02-23 12:01:37 +01:00
Raphaël BosiandGitHub 22bc3004b9 [FRONT COMPONENTS] Add loader to command menu items (#18165)
## PR description

- Add a loader to the command menu items when the action is running.
- Add a new method `closeSidePanel` to the front component host api.

## Video QA


https://github.com/user-attachments/assets/c20b592a-6e4c-4cab-b5da-4cb2316acc7c
2026-02-23 11:15:45 +01:00
Charles BochetandGitHub 129d1ede86 Change runners temp (#18163)
Temporarily moving all ubuntu-latest 1 core to depot except ci-website
2026-02-23 10:53:31 +01:00
a2e3af5625 i18n - translations (#18156)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-22 15:40:35 +01:00
41f09c5a4c Add AI model pricing, Bedrock provider, and InferenceProvider/ModelFamily split (#18155)
## Summary

- **Model pricing overhaul**: All model constants updated with accurate
pricing in dollars per 1M tokens, including cached input rates, cache
creation rates, and tiered >200k context pricing
- **New providers**: Added Google (Gemini 3.x), Mistral, and AWS Bedrock
as inference providers. Bedrock serves Claude Opus 4.6 and Sonnet 4.6
via AWS, with proper credential handling following the existing S3/SES
pattern
- **InferenceProvider/ModelFamily split**: Refactored `ModelProvider`
into two orthogonal enums — `InferenceProvider` (who serves the model:
auth, SDK, metadata format) and `ModelFamily` (who created it: token
counting semantics). This eliminates growing `||` chains for token
normalization checks like `excludesCachedTokens`
- **Billing improvements**: Reasoning tokens charged at output rate,
cache token discounts applied accurately, real errors thrown to Sentry
on billing failures

## Test plan

- [x] All existing unit tests updated and passing (23 tests across 3
test files)
- [x] Lint passes for both twenty-server and twenty-front
- [ ] CI checks pass


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
2026-02-22 14:39:04 +01:00
a900b4a4b4 i18n - docs translations (#18141)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-22 12:36:36 +01:00
020cf7f3e0 i18n - translations (#18146)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-22 12:36:23 +01:00
0bccdedb4f feat: design the ai-models tab on settings ai page (#18147)
Remove AI model selectors from the settings tab on AI settings page,
rename that tab to "More" and create a separate "Models" tab as per the
design.


https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=91311-278313&m=dev

---------

Co-authored-by: Félix Malfait <[email protected]>
2026-02-22 11:41:26 +01:00
martmullandGitHub 088be4c47b Expose standard universal identifiers (#18152)
as title
2026-02-21 23:53:55 +00:00
ad88108b28 Update README: add E2B logo and improve heading (#18144)
## Summary
- Add E2B logo to the Thanks section (after Crowdin, same height)
- Rename section heading from "Does the world need another CRM?" to "Why
Twenty" for a more confident, direct tone

## Test plan
- [ ] Verify E2B logo renders correctly on GitHub README
- [ ] Confirm all other logos still display properly

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <[email protected]>
2026-02-21 15:02:11 +01:00
Raphaël BosiandGitHub 58e8b466f3 Fix frontComponentHostCommunicationApi is not defined error (#18145)
Fix missing import
2026-02-20 18:49:03 +01:00
martmullandGitHub ba59ab8094 Add upload file in twenty client (#18129)
This function 

```typescript
import { defineLogicFunction } from 'twenty-sdk';
import TwentyClient from 'twenty-sdk/generated';

import { v4 } from 'uuid';

export const POST_INSTALL_UNIVERSAL_IDENTIFIER =
  '1312be5c-4fd6-44b3-afd0-567352616c7c';

const handler = async (): Promise<any> => {
  const client = new TwentyClient();

  const seedResult = await client.mutation({
    createCompany: {
      id: true,
      name: true,
      __args: {
        data: {
          name: `toto + ${v4()}`,
        },
      },
    },
  });

  const companyFieldUniversalIdentifier =
    '20202020-15db-460e-8166-c7b5d87ad4be';

  const uploadFileResult = await client.uploadFile(
    Buffer.from('hello world', 'utf-8'),
    'test.txt',
    undefined,
    companyFieldUniversalIdentifier,
  );

  await client.mutation({
    createAttachment: {
      id: true,
      __args: {
        data: {
          file: [{ fileId: uploadFileResult.id, label: 'hello-world.txt' }],
          fullPath: uploadFileResult.path,
          targetCompanyId: seedResult.createCompany?.id,
        },
      },
    },
  });

  return;
};

export default defineLogicFunction({
  universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
  name: 'post-install',
  description: 'Add a description for your logic function',
  timeoutSeconds: 30,
  handler,
});

```

produces this record below 

<img width="1512" height="859" alt="image"
src="https://github.com/user-attachments/assets/57dc3a6b-fd2c-4f21-8331-8f1f05403826"
/>
2026-02-20 17:11:59 +00:00
Thomas TrompetteandGitHub cd1a2712d5 Add server health check every 2 secs on app:dev (#18142)
https://github.com/user-attachments/assets/ff10503f-ebc0-417b-b0f3-8aa40dee74e2
2026-02-20 17:01:45 +00:00
Thomas TrompetteandGitHub 932adf8e4b Create view and navigation item on add-object command - to be tested (#18134)
<img width="580" height="141" alt="Capture d’écran 2026-02-20 à 15 52
11"
src="https://github.com/user-attachments/assets/40254d3a-f7f9-4f2a-a51f-c37dc1f5d167"
/>
2026-02-20 16:41:16 +00:00
Lucas BordeauandGitHub 26fabdc3d0 Minor fixes following up Temporal refactor (#18139)
Fixes https://github.com/twentyhq/core-team-issues/issues/2034
2026-02-20 15:54:38 +00:00
82617727a2 i18n - docs translations (#18131)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-20 16:33:06 +01:00
Raphaël BosiandGitHub 87922253f3 Fix front component cleanup (#18132)
Fix front component cleanup
2026-02-20 15:03:10 +00:00
Raphaël BosiandGitHub 7da8450075 [FRONT COMPONENTS] Headless components (#18096)
## Description

- Add `isHeadless` field to `FrontComponent` entity so front components
can run without rendering UI in the command menu
- Introduce headless front component mounting logic:
`HeadlessFrontComponentMountRoot` at the application root,
`useMountHeadlessFrontComponent`, and `useUnmountHeadlessFrontComponent`
hooks to mount/unmount headless components
- Expand the SDK with new action components (`Action`, `ActionLink`,
`ActionOpenSidePanelPage`) and host communication functions
(`openSidePanelPage`, `unmountFrontComponent`)
- Move `CommandMenuPages` type to twenty-shared so the SDK can reference
it for side panel navigation

## Video QA



https://github.com/user-attachments/assets/4f9e3bb1-fcd1-42be-b3f4-a97e80c2add2
2026-02-20 14:14:42 +00:00
d444648cc0 i18n - translations (#18127)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-20 14:41:58 +01:00
ec57d3fe0f Fix flaky 2FA encryption test for AES-256-CBC wrong-key behavior (#18126)
## Summary

- Fixes a flaky test in `simple-secret-encryption.util.spec.ts` that
fails ~1 in 256 runs
- AES-256-CBC doesn't guarantee wrong-key decryption throws — PKCS7
padding validation is probabilistic. When padding accidentally looks
valid, decryption silently returns garbage instead of throwing.
- Changed the test to verify the correct security property: wrong-key
decryption must never return the original secret (both throw and garbage
are acceptable)
- Audited both production `decryptSecret` call sites in
`two-factor-authentication.service.ts` — they always use the correct
key, so end users are not affected

## Test plan

- [x] Test passes 5/5 consecutive runs locally
- [x] Lint passes


Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <[email protected]>
2026-02-20 14:41:31 +01:00
Baptiste DevessierandGitHub 00209f7e2c Wire fields widget to backend + basic edition (#17965)
Closes https://github.com/twentyhq/core-team-issues/issues/2215
Closes https://github.com/twentyhq/core-team-issues/issues/2216
Closes https://github.com/twentyhq/core-team-issues/issues/2218

## Fields widget edition demo


https://github.com/user-attachments/assets/08626d70-8fcb-4ae2-9222-10ef57e75f90

## Dashboards still work


https://github.com/user-attachments/assets/aa9a9c45-a0a2-481e-b132-bc52254778da
2026-02-20 13:18:00 +00:00
b107020ad3 Fix search edge case with permissions (#18123)
Fix E2E tests

---------

Co-authored-by: Cursor <[email protected]>
2026-02-20 14:08:20 +01:00
9f3f2e21d8 i18n - docs translations (#18122)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-20 13:51:43 +01:00
21472da38f i18n - translations (#18120)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-20 13:51:34 +01:00
Paul RastoinandGitHub bf1e0d0811 Typecheck main sdk (#18124) 2026-02-20 13:47:57 +01:00
Abdullah.andGitHub 917a36821a fix: hover appearing on not shared for junction relations (#18058)
Hovering over "Not Shared" in junction relations shows the placeholder
text.

<img width="1039" height="862" alt="image"
src="https://github.com/user-attachments/assets/a9523f51-c417-41b0-9926-d154c9601fd8"
/>

<br />
<br />

This PR fixes it.

<img width="1040" height="860" alt="image"
src="https://github.com/user-attachments/assets/09d5fecf-1faa-449d-86d9-a105464d31c3"
/>
2026-02-20 13:16:49 +01:00
66da296799 Unify MCP into single endpoint with lazy tool discovery (#18113)
## Summary

- Consolidates the MCP server from two endpoints (`/mcp` +
`/mcp/metadata`) into a **single `POST /mcp`** endpoint exposing five
high-level tools: `get_tool_catalog`, `learn_tools`, `execute_tool`,
`load_skills`, and `search_help_center`
- Fixes **DATABASE_CRUD tools not accessible via API key auth** by
removing an unnecessary `userId`/`userWorkspaceId` guard in
`DatabaseToolProvider` and threading `ApiKeyWorkspaceAuthContext`
through the tool context chain
- Improves tool descriptions with **STEP 1/2/3 workflow guidance** so AI
clients follow the correct discovery flow (catalog → learn → execute)
instead of guessing tool names
- Simplifies the **frontend AI settings** by removing the schema picker
dropdown (no more "Core Schema" vs "Metadata Schema" choice)

## Changes

### Backend
- **Deleted**: `mcp-metadata.controller.ts`, `mcp-metadata.service.ts`
(merged into core)
- **New**: `get-tool-catalog.tool.ts` — browsable, categorized tool
discovery
- **Fixed**: `DatabaseToolProvider.generateDescriptors` — removed guard
that blocked API key access to CRUD tools
- **Fixed**: `ToolContext` type + `ToolRegistryService` — `authContext`
now flows through so API key CRUD execution works end-to-end
- **Updated**: `McpProtocolService` — builds
`ApiKeyWorkspaceAuthContext` for API key requests
- **Updated**: All MCP tool descriptions with explicit step numbering

### Frontend
- **Simplified**: `SettingsAIMCP.tsx` — removed schema selector
dropdown, shows single MCP config

## Test plan
- [x] All 19 MCP unit tests pass (controller + protocol service)
- [x] Server and frontend lint clean
- [x] Server and frontend typecheck pass
- [x] Live-tested on localhost:3000 with API key: `get_tool_catalog`
returns 236 tools including 196 DATABASE_CRUD tools
- [x] Live-tested `execute_tool` with `find_companies` via API key —
returns real data
- [x] Tested MCP connection from Cursor IDE via project-level
`.cursor/mcp.json`

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
2026-02-20 13:09:54 +01:00
3bc887e12e Add default relation to standard object on custom object in manifest (#18033)
add default relation fields when creating an object from an application

---------

Co-authored-by: prastoin <[email protected]>
2026-02-20 11:49:06 +01:00
Thomas TrompetteandGitHub d060c843d1 Remove sse feature flag (#18114)
As title
2026-02-20 11:46:03 +01:00
Paul RastoinandGitHub 175df59c21 Support Skill in manifest (#18092)
# Introduction
Support skill in manifest, pre-requisite for the twenty standard app
migration
2026-02-20 11:45:42 +01:00
6ad581d178 Fix global search for CJK and non-tokenizable text (#18030)
## Summary

Fixes #12962

- Adds a two-pass ILIKE fallback to the global search service
(`search.service.ts`)
- **Fast path**: runs the tsvector query first (uses GIN index,
sub-millisecond)
- **Fallback**: only if tsvector returns fewer results than the limit,
runs an ILIKE query on `searchVector::text` to catch cases where
PostgreSQL's `simple` text search config fails to tokenize (continuous
CJK text, etc.)
- Zero performance impact for the common case (Latin text where tsvector
works)
- Also adds `escapeForIlike` utility to properly escape `%`, `_`, `\` in
user input

### Why tsvector fails for CJK

PostgreSQL's `simple` config treats continuous CJK text as a single
lexeme:
- `to_tsvector('simple', '示例商业线索')` → `'示例商业线索':1`
- Searching `商业:*` only prefix-matches from the start, so it misses `商业`
in the middle

The ILIKE fallback catches these substring matches when the tsvector
path can't.

### What this fixes

- Global search (command menu / sidebar)
- Relation picker (single and multi-object)
- Morph relation picker

All three use `search.service.ts` under the hood.

Co-authored-by: mykh-hailo (original direction in #18021)

## Test plan

- [ ] Search `示例` with records `示例商业线索` and `示例-商业-线索` → both should
appear
- [ ] Search `商业` → both should appear (previously only the hyphenated
one did)
- [ ] Search for Latin text (e.g. `john`) → same performance, results
unchanged
- [ ] Relation picker search with CJK text → results appear
- [ ] Search input with special chars like `%` or `_` → no SQL
injection, results correct


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: mykh-hailo <[email protected]>
Co-authored-by: Cursor <[email protected]>
2026-02-20 11:02:09 +01:00
neo773andGitHub 712b1553bd Fix participant matching failing due to updating all columns instead of only changed fields (#18105)
The updateMany in matchParticipants was spreading the entire participant
object into the SET clause, which included generated columns
(searchVector) and composite field columns (createdBySource) that can't
be written to. Narrowed the update to only set personId and
workspaceMemberId.
```
[1] query failed: UPDATE "workspace_3ixj3i1a5avy16ptijtb3lae3"."calendarEventParticipant" SET "id" = $1, "createdAt" = $2, "updatedAt" = $3, "deletedAt" = $4, "createdBySource" = $5, "createdByWorkspaceMemberId" = $6, "createdByName" = $7, "createdByContext" = $8, "updatedBySource" = $9, "updatedByWorkspaceMemberId" = $10, "updatedByName" = $11, "updatedByContext" = $12, "position" = $13, "searchVector" = $14, "handle" = $15, "displayName" = $16, "isOrganizer" = $17, "responseStatus" = $18, "calendarEventId" = $19, "personId" = $20, "workspaceMemberId" = $21 WHERE "id" = $22 RETURNING * -- PARAMETERS: ["f1526103-451a-429f-9743-3a81c3a3e3aa","2026-02-19T22:23:32.354Z","2026-02-19T22:23:32.354Z",null,"MANUAL",null,"System",null,"MANUAL",null,"System",null,0,"'[email protected]':1","[email protected]","",false,"NEEDS_ACTION","fb1892a8-6daf-435b-a43b-e8fe8693eb99","60bf9e82-f1b7-4bed-a1af-7039fb9c32f5",null,"f1526103-451a-429f-9743-3a81c3a3e3aa"]
[1] error: error: column "searchVector" can only be updated to DEFAULT
[1] Exception Captured
[1]   undefined
[1]   [
[1]     PostgresException [Error]: Data validation error.
[1]         at computeTwentyORMException (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/engine/twenty-orm/error-handling/compute-twenty-orm-exception.js:35:19)
[1]         at WorkspaceUpdateQueryBuilder.executeMany (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/engine/twenty-orm/repository/workspace-update-query-builder.js:269:82)
[1]         at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[1]         at async WorkspaceRepository.updateMany (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/engine/twenty-orm/repository/workspace.repository.js:234:25)
[1]         at async MatchParticipantService.matchParticipants (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/modules/match-participant/match-participant.service.js:93:13)
[1]         at async /Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/modules/match-participant/match-participant.service.js:160:13
[1]         at async MatchParticipantService.matchParticipantsForPeople (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/modules/match-participant/match-participant.service.js:130:9)
[1]         at async CalendarEventParticipantMatchParticipantJob.handle (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/modules/calendar/calendar-event-participant-manager/jobs/calendar-event-participant-match-participant.job.js:45:13)
[1]         at async MessageQueueExplorer.invokeProcessMethods (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/engine/core-modules/message-queue/message-queue.explorer.js:113:17)
[1]         at async MessageQueueExplorer.handleProcessor (/Users/huzef/Documents/bounties/twenty/packages/twenty-server/dist/engine/core-modules/message-queue/message-queue.explorer.js:104:13) {
[1]       code: '428C9'
[1]     }
[1]   ]
```
2026-02-20 10:25:10 +01:00
sonarly[bot]GitHubSonarly Claude Codeclaude[bot] <41898282+claude[bot]@users.noreply.github.com>Etienne
cc1145c701 Fix: Person avatar upload fails with unknown field error (#18109)
## Automated fix for [bug None](https://sonarly.com/issue/None?type=bug)

**Severity:** `critical`

### Summary
When uploading a person avatar with the new FILES field migration
enabled, the optimistic record validation in
computeOptimisticRecordFromInput throws because the avatarFile field may
not be recognized in the person object metadata, crashing the upload
flow.

### User Impact
Users with the IS_FILES_FIELD_MIGRATED feature flag enabled cannot
upload or change a person's avatar photo. The upload operation throws an
unhandled error, preventing the avatar update from completing.

### Root Cause
The usePersonAvatarUpload hook passes avatarFile as a field in
updateOneRecordInput when calling updateOneRecord. This input goes
through computeOptimisticRecordFromInput, which validates that every
field in the record input exists in objectMetadataItem.fields. The
avatarFile field (type FILES) was recently added as a standard field on
the person object, but may not yet be present in the frontend's cached
object metadata for all workspaces (e.g., workspaces where the metadata
has not been synced after the migration, or SSE events arriving before
metadata refresh). When avatarFile is not found in the metadata fields
array, the validation throws. The useUpdateOneRecord hook supports an
optimisticRecord parameter that bypasses this validation entirely, but
usePersonAvatarUpload did not provide it.

Introduced by Etienne in commit d0c1841f0f on 2026-02-11, which added
the avatar file migration and upload logic but did not supply an
optimisticRecord to bypass the strict field validation in
computeOptimisticRecordFromInput.

**Introduced by:** Etienne on 2026-02-11 in commit
[`d0c1841`](https://github.com/twentyhq/twenty/commit/d0c1841f0f8a6a9069bbe2e9cafacf4ff6137f82)

### Suggested Fix
Pass an explicit optimisticRecord parameter when calling updateOneRecord
from usePersonAvatarUpload. The useUpdateOneRecord hook uses
optimisticRecord via nullish coalescing (optimisticRecord ??
computeOptimisticRecordFromInput(...)), so providing it bypasses the
strict field validation in computeOptimisticRecordFromInput entirely.
The avatarFile value is extracted into a shared variable to avoid
duplication between updateOneRecordInput and optimisticRecord.

---
*Generated by [Sonarly](https://sonarly.com)*

---------

Co-authored-by: Sonarly Claude Code <[email protected]>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Etienne <[email protected]>
2026-02-20 08:27:53 +00:00
Félix MalfaitGitHubCursorclaude[bot] <41898282+claude[bot]@users.noreply.github.com>
726b1373d9 fix: convert metered tier upTo from internal to display credits in listPlans (#18108)
## Summary
- The `listPlans` GraphQL query was returning metered tier `upTo` values
in internal credit units (1000x the display value), causing "Credits by
period" and "Credit Plan" dropdowns to show "50M" instead of "50k"
- Applied the existing `INTERNAL_CREDITS_PER_DISPLAY_CREDIT` (1000)
divisor in `formatBillingDatabasePriceToMeteredPriceDTO`, matching the
conversion already used in `getMeteredProductsUsage` resolver
- Updated frontend mock data to reflect the corrected display-unit
values

## Test plan
- [x] Unit tests pass for `format-database-product-to-graphql-dto.util`
- [x] Unit tests pass for `metered-credit.service` and
`billing-credit-rollover.service`
- [ ] Verify billing page shows correct credit amounts (50k, not 50M)
for "Credits by period" and "Credit Plan"


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-02-20 09:44:11 +01:00
783e57f5d8 i18n - translations (#18100)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-19 21:14:57 +01:00
163254baef fix: laggy edition of FormNumberFieldInput (#18011)
### What this PR do ?

Stops the delay fields from updating the workflow on every keystroke by
keeping values locally and saving them on blur, which fixes the cached
relation error

Fixed #15709

---------

Co-authored-by: Lucas Bordeau <[email protected]>
2026-02-19 17:16:25 +00:00
aaa6511007 feat: added workspace member filter for actor fields (#16628)
Closes #16619

This PR adds support for filtering ACTOR fields by `Workspace Member`
subfield, enabling users to filter records by who created them with a
`Me` option.

I replicated the same UX and code structure as the Relation field filter
for consistency.

Each filter selection triggers a server-side GraphQL call. But there is
client-side filtering in `isRecordMatchingFilter.ts` which instantly
filters already-loaded records while the server is fetching new results.
I replicated this behaviour from how `FULL_NAME` and other composite
fields handle filtering.


UX decision that were taken by me (Let me know if changes are needed) : 
- The filter shows comma separated selected workspace member names until
3 members are selected. After that it shows [no of selected members]
workspace members.

<img width="643" height="283" alt="Screenshot 2025-12-17 at 8 01 23 PM"
src="https://github.com/user-attachments/assets/18d524f4-979b-4d92-ad64-aa7b63be7897"
/>
<img width="774" height="309" alt="Screenshot 2025-12-17 at 8 01 33 PM"
src="https://github.com/user-attachments/assets/779f374f-1501-48f9-afa2-a78628e067b1"
/>
<img width="737" height="397" alt="Screenshot 2025-12-17 at 8 01 40 PM"
src="https://github.com/user-attachments/assets/4e8b963e-8a0f-467d-91ae-48bca4e1d842"
/>
<img width="697" height="334" alt="Screenshot 2025-12-17 at 8 01 53 PM"
src="https://github.com/user-attachments/assets/c9a0e4bb-48b4-486b-a4f9-d7c49ff3852c"
/>
<img width="684" height="343" alt="Screenshot 2025-12-17 at 8 02 04 PM"
src="https://github.com/user-attachments/assets/d5c45eba-06a3-40fc-b9d0-d585dc8bc136"
/>

---------

Co-authored-by: Lucas Bordeau <[email protected]>
2026-02-19 16:56:40 +00:00
WeikoandGitHub 2a670520b9 Add page layout backfill command (#18095)
## Context
Command to backfill record page layouts and related entities for legacy
workspaces.

## Test
Set SHOULD_SEED_STANDARD_RECORD_PAGE_LAYOUTS=false, reset DB then run
the command and compare with Set
SHOULD_SEED_STANDARD_RECORD_PAGE_LAYOUTS=true on a different workspace
2026-02-19 16:24:20 +00:00
Charles BochetandGitHub 10bd005021 Rework types for logic function (#18074)
## Summary

- **Consolidate logic function services**: Remove
`LogicFunctionMetadataService` and consolidate all logic function CRUD
operations into `LogicFunctionFromSourceService`, with a new
`LogicFunctionFromSourceHelperService` for shared validation/migration
logic
- **Introduce typed conversion utils following the skill pattern**: Add
`fromCreateLogicFunctionFromSourceInputToUniversalFlatLogicFunctionToCreate`
and `fromUpdateLogicFunctionFromSourceInputToFlatLogicFunctionToUpdate`
that convert DTO inputs directly to flat entities
(`UniversalFlatLogicFunction` / `FlatLogicFunction`), replacing the
previous intermediate `UpdateLogicFunctionMetadataParams` indirection
- **Simplify `CodeStepBuildService`**: Remove ~100 lines of manual
duplication logic by delegating to
`LogicFunctionFromSourceService.duplicateOneWithSource`
- **Remove completed 1-17 migration**: Delete
`MigrateWorkflowCodeStepsCommand` and associated utils that migrated
workflow code steps from serverless functions to logic functions
2026-02-19 17:25:08 +01:00
0e25aeb5be chore: upgrade @swc/core to 1.15.11 and align SWC ecosystem (#18088)
## Summary

- Upgrades `@swc/core` from 1.13.3 to **1.15.11** (swc_core v56), which
introduces CBOR-based plugin serialization replacing rkyv, eliminating
strict version-matching between SWC core and Wasm plugins
- Upgrades `@lingui/swc-plugin` from ^5.6.0 to **^5.11.0** (swc_core
50.2.3, built with `--cfg=swc_ast_unknown` for cross-version
compatibility)
- Upgrades `@swc/plugin-emotion` from 10.0.4 to **14.6.0** (swc_core 53,
also with backward-compat feature)
- Upgrades companion packages: `@swc-node/register` 1.8.0 → 1.11.1,
`@swc/helpers` ~0.5.2 → ~0.5.18, `@vitejs/plugin-react-swc` 3.11.0 →
4.2.3

### Why this is safe now

Starting from `@swc/core v1.15.0`, SWC replaced the rkyv serialization
scheme with CBOR (a self-describing format) and added `Unknown` AST enum
variants. Plugins built with `swc_core >= 47` and
`--cfg=swc_ast_unknown` are now forward-compatible across `@swc/core`
versions. Both `@lingui/[email protected].1+` and
`@swc/[email protected]+` have this support, meaning the old
version-matching nightmare between Lingui and SWC is largely solved.

Reference: https://github.com/lingui/swc-plugin/issues/179

## Test plan

- [x] `yarn install` resolves without errors
- [x] `npx nx build twenty-shared` succeeds
- [x] `npx nx build twenty-ui` succeeds (validates
@swc/[email protected])
- [x] `npx nx typecheck twenty-front` succeeds
- [x] `npx nx build twenty-front` succeeds (validates vite + swc +
lingui pipeline)
- [x] `npx nx build twenty-emails` succeeds (validates lingui plugin)
- [x] Frontend jest tests pass (validates @swc/jest +
@lingui/swc-plugin)
- [x] Server jest tests pass (validates server-side SWC + lingui)

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
2026-02-19 15:27:56 +00:00
BugIsGodandGitHub e051cce24f Fix: add a new style to the target text box (#18065)
### Approach
I add some new rules for the style of the target text box. (Fix: #13229
)
<img width="842" height="545" alt="target class"
src="https://github.com/user-attachments/assets/7cd0a615-392a-493b-831f-77ddb93de5fc"
/>


**This is what it looks like now.**
<img width="320" height="224" alt="image"
src="https://github.com/user-attachments/assets/26514102-e684-49ce-915d-43e5677520a5"
/>
2026-02-19 13:59:11 +00:00
Raphaël BosiandGitHub bd03073b6d [FRONT COMPONENTS] Declare command menu items in front components (#18047)
## Description

- Adds support for declaring command menu items directly within
`defineFrontComponent` via an optional command config property
- Introduces a new `CommandMenuItemManifest` type in twenty-shared and
wires it through the manifest build pipeline

## Example Of usage

```tsx
import { defineFrontComponent } from "twenty-sdk";

const TestAction = () => {
  return <div>Test Action</div>;
};

export default defineFrontComponent({
  universalIdentifier: "6c289461-0007-4a62-a99f-69e5c11a4ce7",
  name: "test-action",
  description: "Test Action",
  component: TestAction,
  command: {
    universalIdentifier: "c07df864-495f-46f3-9f5b-9d3ce2589e9b",
    label: "Run My Action",
    icon: "IconBolt",
    isPinned: false,
  },
});

```

## Video QA


https://github.com/user-attachments/assets/f910fc6a-44a9-45d1-87c5-f0ce64bb3878
2026-02-19 15:23:46 +01:00
EtienneandGitHub b3d8f8813f Remove non positive integer constraint on Nav Menu Item 2/2 (#18090)
Follow up https://github.com/twentyhq/twenty/pull/18081
2026-02-19 15:17:25 +01:00
WeikoandGitHub 37d9828458 Fix google compose scope not gated by feature flag (#18093)
## Context
New google api scope has been introduced in
https://github.com/twentyhq/twenty/pull/17793 without being gated behind
a feature flag

Microsoft is using pre-existing Mail.ReadWrite scope there is nothing to
gate

## Before
<img width="553" height="445" alt="Screenshot 2026-02-19 at 14 57 58"
src="https://github.com/user-attachments/assets/59a4f76b-d38d-492f-b013-b6cad4091a7f"
/>


## After
<img width="535" height="392" alt="Screenshot 2026-02-19 at 14 58 44"
src="https://github.com/user-attachments/assets/0337bf15-ec30-4549-bb9d-571a982dffd8"
/>
2026-02-19 15:16:54 +01:00
Thomas TrompetteGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
e16b6d6485 Create LLMS.md on create-twenty-app (#18091)
Managed to create a many to many app with minimal instructions. File
will need to be enriched with more pitfalls.

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-19 14:51:31 +01:00
Paul RastoinandGitHub 9626c7ce02 Twenty standard app static options id (#18089)
# Introduction
While preparing the twenty-standard as code migration to twenty-app
through sdk I've faced permanent field enum update as the id was
generated dynamically at each twenty standard app construction
Making them deterministic in order to avoid having this noise

Won't backfill this on existing workspace as it's not critical and that
we will rework the options in the future
2026-02-19 13:19:09 +00:00
martmullandGitHub 754de411fe Factorize and add public-assets/*path endpoint (#18080)
as title
2026-02-19 14:00:52 +01:00
Charles BochetandGitHub 530f74e28c Migrate more to Jotai (#18087)
Continue jotai migration
2026-02-19 13:50:21 +01:00
Paul RastoinandGitHub 5a46cf7bd3 Refactor message backfill command (#18078)
# Introduction
Atomically create the field and object to be created
And avoid synchronizing unrelated non up to date object and fields 
Followup https://github.com/twentyhq/twenty/pull/17398
2026-02-19 12:18:42 +00:00
7b10202c69 i18n - translations (#18086)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-19 13:17:01 +01:00
EtienneandGitHub 9e54a8082c Remove non positive integer constraint on Nav Menu Item (#18081)
To fit with position typed field logic + Ease favorite to nav menu item
migration (which have negative and float position)
2026-02-19 11:24:14 +00:00
Charles BochetandGitHub 1a13258302 Keep migrating to jotai (#18064)
And we continue!
2026-02-19 12:10:02 +01:00
Abdullah.andGitHub c0ea049ad7 fix: remove the error message for test failure in ci-front (#18076)
Introduced an error message on twenty-front CI earlier to try and inform
the user that test failure could be a coverage issue if no individual
test was failing. However, it led to the assumption that it must be
coverage failure in all cases even when it was test failure leading to
the CI being red.

This PR reverts the change.
2026-02-19 11:57:01 +01:00
b33f86fbf5 i18n - translations (#18079)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-19 11:56:21 +01:00
Paul RastoinandGitHub 88424611ec Refactor and standardize isSystem field and object (#17992)
# Introduction

## Centralize system field definitions
- Extract a single `PARTIAL_SYSTEM_FLAT_FIELD_METADATAS` constant as the
source of truth for all 8 system fields (`id`, `createdAt`, `updatedAt`,
`deletedAt`, `createdBy`, `updatedBy`, `position`, `searchVector`),
eliminating duplication across custom object and standard app field
builders
- Refactor `buildDefaultFlatFieldMetadatasForCustomObject` to use the
shared constant via a new `buildObjectSystemFlatFieldMetadatas` helper

## Mark system fields as `isSystem: true`
- Fields `id`, `createdAt`, `updatedAt`, `deletedAt`, `createdBy`,
`updatedBy`, `position`, `searchVector` are now properly flagged as
system fields across all standard objects and custom object creation
- Standard app field builders for all ~30 standard objects updated to
set `isSystem: true` on `createdAt`, `updatedAt`, `deletedAt`,
`createdBy`, `updatedBy`
- System-only standard objects (blocklist, calendar channels, message
threads, etc.) now also include `createdBy`, `updatedBy`, `position`,
`searchVector` field definitions that were previously missing

## Validate system fields on object creation
- New transversal validation (`crossEntityTransversalValidation`) runs
after all atomic entity validations in the build orchestrator, ensuring
all 8 system fields are present with correct `type` and `isSystem: true`
when an object is created
- New `buildUniversalFlatObjectFieldByNameAndJoinColumnMaps` utility to
resolve field names to universal identifiers for a given object
- New exception codes: `MISSING_SYSTEM_FIELD` and `INVALID_SYSTEM_FIELD`
on `ObjectMetadataExceptionCode`

## Protect system fields and objects from mutation
- Field validators now block update/delete of `isSystem` fields by
non-system callers (`FIELD_MUTATION_NOT_ALLOWED`)
- Object validators now block update/delete of `isSystem` objects by
non-system callers
- `POSITION` and `TS_VECTOR` field type validators replaced: instead of
rejecting creation outright, they now validate that the field is named
correctly (`position` / `searchVector`) and has `isSystem: true`

## Distinguish `isSystemBuild` from `isCallerTwentyStandardApp`
- New `isCallerTwentyStandardApp` utility checks whether the caller's
`applicationUniversalIdentifier` matches the twenty standard app
- Name-sync logic (`isFlatFieldMetadataNameSyncedWithLabel`,
`areFlatObjectMetadataNamesSyncedWithLabels`) refactored to use
`isCallerTwentyStandardApp` for custom suffix decisions, keeping
`isSystemBuild` for mutation permission checks
- `WorkspaceMigrationBuilderOptions` type updated to include
`applicationUniversalIdentifier`

## Adapt frontend filtering
- New `HIDDEN_SYSTEM_FIELD_NAMES` constant (`id`, `position`,
`searchVector`) and `isHiddenSystemField` utility to only hide truly
internal fields while keeping user-facing system fields (`createdAt`,
`updatedAt`, `deletedAt`, `createdBy`, `updatedBy`) visible in the UI
- ~20 frontend files updated to replace `!field.isSystem` checks with
`!isHiddenSystemField(field)` across record index, settings, data model,
charts, workflows, spreadsheet import, aggregations, and role
permissions

## Add 1.19 upgrade commands
- **`backfill-system-fields-is-system`**: Raw SQL command to set
`isSystem = true` on existing workspace fields matching system field
names, and fix `position` field type from `NUMBER` to `POSITION` for
`favorite`/`favoriteFolder` objects. Includes proper cache invalidation.
- **`add-missing-system-fields-to-standard-objects`**: Codegen'd
workspace migration to create missing `position`, `searchVector`,
`createdBy`, `updatedBy` fields on standard objects that didn't
previously have them. Runs via `WorkspaceMigrationRunnerService` in a
single transaction with idempotency check. **Known limitation**: assumes
all standard objects exist and are valid in the target workspace.

## Add `universalIdentifier` for system fields in standard object
constants
- `standard-object.constant.ts` updated to include `universalIdentifier`
for `createdBy`, `updatedBy`, `position`, and `searchVector` across all
standard objects
- `fieldManifestType.ts` updated to support the new field manifest shape

## System relation
Completely removed and backfilled all `isSystem` relation to be false
false
As we won't require an object to have any relation system fields

## Add integration tests
- New test suite `failing-sync-application-object-system-fields`
covering: missing system fields, wrong field types (`id` as TEXT,
`createdAt` as TEXT, `position` as TEXT), system field deletion
attempts, and system field update attempts
- New test utilities: `buildDefaultObjectManifest` (builds an object
manifest with all 8 system fields) and `setupApplicationForSync`
(centralizes application setup)
- Existing successful sync test updated to verify system fields are
created with correct properties

## Next step
Make the builder scope the compared entity to be the currently built app
+ nor twenty standard app
2026-02-19 10:13:50 +00:00
082400f751 Add objectRecordCounts query to /metadata endpoint (#18054)
## Summary

- Adds an `objectRecordCounts` query on the `/metadata` GraphQL endpoint
that returns approximate record counts for all objects in the workspace
- Uses PostgreSQL's `pg_class.reltuples` catalog stats — a single
instant query instead of N `COUNT(*)` table scans
- Replaces the previous `CombinedFindManyRecords` approach which hit the
server's 20 root resolver limit and silently showed 0 for all counts on
the settings Data Model page

### Server
- `ObjectRecordCountDTO` — GraphQL type with `objectNamePlural` and
`totalCount`
- `ObjectRecordCountService` — reads `pg_class` catalog for the
workspace schema
- Query added to `ObjectMetadataResolver` with `@MetadataResolver()` +
`NoPermissionGuard`

### Frontend
- `OBJECT_RECORD_COUNTS` query added to
`object-metadata/graphql/queries.ts`
- `useCombinedGetTotalCount` simplified to a zero-argument hook using
the new query
- `SettingsObjectTable` simplified to a single hook call

---------

Co-authored-by: Cursor <[email protected]>
2026-02-19 09:02:31 +00:00
EtienneandGitHub a14b0ab6ca FILES field - Attachment name display fix (#18073)
with new 'file' FILES field on attachment, UI should display attachment
name from file field value.
Issue with API users updating only 'file' FILES field (and not name
field anymore)
2026-02-19 10:04:05 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6e29f66ce8 Bump @emotion/is-prop-valid from 1.3.0 to 1.4.0 (#18068)
Bumps [@emotion/is-prop-valid](https://github.com/emotion-js/emotion)
from 1.3.0 to 1.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/emotion-js/emotion/releases"><code>@​emotion/is-prop-valid</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​emotion/is-prop-valid</code><a
href="https://github.com/1"><code>@​1</code></a>.4.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/emotion-js/emotion/pull/3306">#3306</a>
<a
href="https://github.com/emotion-js/emotion/commit/dfae1cbd98d3ebe449ce322b38cbf4a7fbfbfe96"><code>dfae1cb</code></a>
Thanks <a
href="https://github.com/EnzoAlbornoz"><code>@​EnzoAlbornoz</code></a>!
- Adds <code>popover</code>, <code>popoverTarget</code> and
<code>popoverTargetAction</code> to the list of allowed props.</li>
</ul>
<h2><code>@​emotion/is-prop-valid</code><a
href="https://github.com/1"><code>@​1</code></a>.3.1</h2>
<h3>Patch Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/emotion-js/emotion/pull/3093">#3093</a>
<a
href="https://github.com/emotion-js/emotion/commit/532ff57cafd8ba04f3b624074556ea47ec76fc9a"><code>532ff57</code></a>
Thanks <a href="https://github.com/codejet"><code>@​codejet</code></a>,
<a href="https://github.com/DustinBrett"><code>@​DustinBrett</code></a>!
- Adds <code>fetchpriority</code> and <code>fetchPriority</code> to the
list of allowed props.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/emotion-js/emotion/commit/38db311adf024fe8a24b57c687824c47abbd0957"><code>38db311</code></a>
Version Packages (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3347">#3347</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/dfae1cbd98d3ebe449ce322b38cbf4a7fbfbfe96"><code>dfae1cb</code></a>
Adds <code>popover</code>, <code>popoverTarget</code> and
<code>popoverTargetAction</code> to the list of allo...</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/49229553967b6050c92d9602eb577bdc48167e91"><code>4922955</code></a>
Version Packages (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3335">#3335</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/0facbe47bd9099ae4ed22dc201822d910ac3dec5"><code>0facbe4</code></a>
Renamed default-exported variable in <code>@emotion/styled</code> to aid
inferred import...</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/cce67ec6b2fc94261028b4f4778aae8c3d6c5fd6"><code>cce67ec</code></a>
Bump parcel (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3258">#3258</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/3c19ce5997f73960679e546af47801205631dfde"><code>3c19ce5</code></a>
Version Packages (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3280">#3280</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/a19d019bd418ebc3b9cba0e58f58b36ac2862a42"><code>a19d019</code></a>
Convert <code>@emotion/styled</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3284">#3284</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/5974e33fcb5e7aee177408684ac6fe8b38b3e353"><code>5974e33</code></a>
Fix JSX namespace <a
href="https://github.com/ts-ignores"><code>@​ts-ignores</code></a> (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3282">#3282</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/fc4d7bd744c205f55513dcd4e4e5134198c219de"><code>fc4d7bd</code></a>
Convert <code>@emotion/react</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3281">#3281</a>)</li>
<li><a
href="https://github.com/emotion-js/emotion/commit/8dc1a6dd19d2dc9ce435ef0aff85ccf5647f5d2e"><code>8dc1a6d</code></a>
Convert <code>@emotion/cache</code>'s source code to TypeScript (<a
href="https://redirect.github.com/emotion-js/emotion/issues/3277">#3277</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/emotion-js/emotion/compare/@emotion/[email protected]...@emotion/[email protected]">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@emotion/is-prop-valid&package-manager=npm_and_yarn&previous-version=1.3.0&new-version=1.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:10:11 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9bcc2fc5d9 Bump eslint-config-next from 14.2.33 to 14.2.35 (#18069)
Bumps
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
from 14.2.33 to 14.2.35.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/7b940d9ce96faddb9f92ff40f5e35c34ace04eb2"><code>7b940d9</code></a>
v14.2.35</li>
<li><a
href="https://github.com/vercel/next.js/commit/f3073688ce18878a674fdb9954da68e9d626a930"><code>f307368</code></a>
v14.2.34</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v14.2.35/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-config-next&package-manager=npm_and_yarn&previous-version=14.2.33&new-version=14.2.35)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:09:59 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
01e203a70b Bump @xyflow/react from 12.4.2 to 12.10.0 (#18070)
Bumps
[@xyflow/react](https://github.com/xyflow/xyflow/tree/HEAD/packages/react)
from 12.4.2 to 12.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/xyflow/xyflow/releases"><code>@​xyflow/react</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.10.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5637">#5637</a> <a
href="https://github.com/xyflow/xyflow/commit/0c7261a6dc94f1aa58333a6aebcaca8ced9b5ad2"><code>0c7261a6d</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Add <code>zIndexMode</code> to control how z-index is calculated for
nodes and edges</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5484">#5484</a> <a
href="https://github.com/xyflow/xyflow/commit/a523919d6789995e9d0f3dd29b0b47fc3b8d8439"><code>a523919d6</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Add
<code>experimental_useOnNodesChangeMiddleware</code> hook</p>
</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5629">#5629</a> <a
href="https://github.com/xyflow/xyflow/commit/9030fab2df8285fdfb649bda6e1e885dfd228d45"><code>9030fab2d</code></a>
Thanks <a
href="https://github.com/AlaricBaraou"><code>@​AlaricBaraou</code></a>!
- Prevent unnecessary re-render in <code>FlowRenderer</code></p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5592">#5592</a> <a
href="https://github.com/xyflow/xyflow/commit/38dbf41c464550cc803b946a4ad1f46982385a03"><code>38dbf41c4</code></a>
Thanks <a
href="https://github.com/svilen-ivanov-kubit"><code>@​svilen-ivanov-kubit</code></a>!
- Always create a new measured object in apply changes.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5635">#5635</a> <a
href="https://github.com/xyflow/xyflow/commit/2d7fa40e2684a0fcdd4eca7800ccf2c34338e549"><code>2d7fa40e2</code></a>
Thanks <a
href="https://github.com/tornado-softwares"><code>@​tornado-softwares</code></a>!
- Update an ongoing connection when user moves node with keyboard.</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/0c7261a6dc94f1aa58333a6aebcaca8ced9b5ad2"><code>0c7261a6d</code></a>,
<a
href="https://github.com/xyflow/xyflow/commit/8598b6bc2a9d052b12d5215706382da0aa84827b"><code>8598b6bc2</code></a>,
<a
href="https://github.com/xyflow/xyflow/commit/2d7fa40e2684a0fcdd4eca7800ccf2c34338e549"><code>2d7fa40e2</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.74</li>
</ul>
</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.9.3</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5621">#5621</a> <a
href="https://github.com/xyflow/xyflow/commit/c1304dba7a20bb8d74c7aceb23cd80b56e4c0482"><code>c1304dba7</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Set <code>paneClickDistance</code> default value to
<code>1</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5578">#5578</a> <a
href="https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773"><code>00bcb9f5f</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Pass
current pointer position to connection</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773"><code>00bcb9f5f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.73</li>
</ul>
</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.9.2</h2>
<h3>Patch Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/xyflow/xyflow/pull/5593">#5593</a> <a
href="https://github.com/xyflow/xyflow/commit/a8ee089d7689d9a58113690c8e90e1c1e109602a"><code>a8ee089d7</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Reset selection box when user selects a node</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.9.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5572">#5572</a> <a
href="https://github.com/xyflow/xyflow/commit/5ec0cac7fad21109b74839969c0818f88ddc87d9"><code>5ec0cac7f</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Fix
onPaneClick events being suppressed when selectionOnDrag=true</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/5ec0cac7fad21109b74839969c0818f88ddc87d9"><code>5ec0cac7f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.72</li>
</ul>
</li>
</ul>
<h2><code>@​xyflow/react</code><a
href="https://github.com/12"><code>@​12</code></a>.9.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5544">#5544</a> <a
href="https://github.com/xyflow/xyflow/commit/c17b49f4c16167da3f791430163edd592159d27d"><code>c17b49f4c</code></a>
Thanks <a
href="https://github.com/0x0f0f0f"><code>@​0x0f0f0f</code></a>! - Add
<code>EdgeToolbar</code> component</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5550">#5550</a> <a
href="https://github.com/xyflow/xyflow/commit/6ffb9f7901c32f5b335aee2517f41bf87f274f32"><code>6ffb9f790</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! -
Prevent child nodes of different parents from overlapping</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5551">#5551</a> <a
href="https://github.com/xyflow/xyflow/commit/6bb64b3ed60f26c9ea8bc01c8d62fb9bf74cd634"><code>6bb64b3ed</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Allow to start a selection above a node</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/xyflow/xyflow/blob/main/packages/react/CHANGELOG.md"><code>@​xyflow/react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>12.10.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5637">#5637</a> <a
href="https://github.com/xyflow/xyflow/commit/0c7261a6dc94f1aa58333a6aebcaca8ced9b5ad2"><code>0c7261a6d</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Add <code>zIndexMode</code> to control how z-index is calculated for
nodes and edges</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5484">#5484</a> <a
href="https://github.com/xyflow/xyflow/commit/a523919d6789995e9d0f3dd29b0b47fc3b8d8439"><code>a523919d6</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Add
<code>experimental_useOnNodesChangeMiddleware</code> hook</p>
</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5629">#5629</a> <a
href="https://github.com/xyflow/xyflow/commit/9030fab2df8285fdfb649bda6e1e885dfd228d45"><code>9030fab2d</code></a>
Thanks <a
href="https://github.com/AlaricBaraou"><code>@​AlaricBaraou</code></a>!
- Prevent unnecessary re-render in <code>FlowRenderer</code></p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5592">#5592</a> <a
href="https://github.com/xyflow/xyflow/commit/38dbf41c464550cc803b946a4ad1f46982385a03"><code>38dbf41c4</code></a>
Thanks <a
href="https://github.com/svilen-ivanov-kubit"><code>@​svilen-ivanov-kubit</code></a>!
- Always create a new measured object in apply changes.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5635">#5635</a> <a
href="https://github.com/xyflow/xyflow/commit/2d7fa40e2684a0fcdd4eca7800ccf2c34338e549"><code>2d7fa40e2</code></a>
Thanks <a
href="https://github.com/tornado-softwares"><code>@​tornado-softwares</code></a>!
- Update an ongoing connection when user moves node with keyboard.</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/0c7261a6dc94f1aa58333a6aebcaca8ced9b5ad2"><code>0c7261a6d</code></a>,
<a
href="https://github.com/xyflow/xyflow/commit/8598b6bc2a9d052b12d5215706382da0aa84827b"><code>8598b6bc2</code></a>,
<a
href="https://github.com/xyflow/xyflow/commit/2d7fa40e2684a0fcdd4eca7800ccf2c34338e549"><code>2d7fa40e2</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.74</li>
</ul>
</li>
</ul>
<h2>12.9.3</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5621">#5621</a> <a
href="https://github.com/xyflow/xyflow/commit/c1304dba7a20bb8d74c7aceb23cd80b56e4c0482"><code>c1304dba7</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Set <code>paneClickDistance</code> default value to
<code>1</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5578">#5578</a> <a
href="https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773"><code>00bcb9f5f</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Pass
current pointer position to connection</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773"><code>00bcb9f5f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.73</li>
</ul>
</li>
</ul>
<h2>12.9.2</h2>
<h3>Patch Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/xyflow/xyflow/pull/5593">#5593</a> <a
href="https://github.com/xyflow/xyflow/commit/a8ee089d7689d9a58113690c8e90e1c1e109602a"><code>a8ee089d7</code></a>
Thanks <a href="https://github.com/moklick"><code>@​moklick</code></a>!
- Reset selection box when user selects a node</li>
</ul>
<h2>12.9.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/xyflow/xyflow/pull/5572">#5572</a> <a
href="https://github.com/xyflow/xyflow/commit/5ec0cac7fad21109b74839969c0818f88ddc87d9"><code>5ec0cac7f</code></a>
Thanks <a
href="https://github.com/peterkogo"><code>@​peterkogo</code></a>! - Fix
onPaneClick events being suppressed when selectionOnDrag=true</p>
</li>
<li>
<p>Updated dependencies [<a
href="https://github.com/xyflow/xyflow/commit/5ec0cac7fad21109b74839969c0818f88ddc87d9"><code>5ec0cac7f</code></a>]:</p>
<ul>
<li><code>@​xyflow/system</code><a
href="https://github.com/0"><code>@​0</code></a>.0.72</li>
</ul>
</li>
</ul>
<h2>12.9.0</h2>
<h3>Minor Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/xyflow/xyflow/pull/5544">#5544</a> <a
href="https://github.com/xyflow/xyflow/commit/c17b49f4c16167da3f791430163edd592159d27d"><code>c17b49f4c</code></a>
Thanks <a
href="https://github.com/0x0f0f0f"><code>@​0x0f0f0f</code></a>! - Add
<code>EdgeToolbar</code> component</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/xyflow/xyflow/commit/c0ed3c33a3498877ab2a5755299ff84ee659782e"><code>c0ed3c3</code></a>
chore(packages): bump</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/83a312b2e1691a44223536653689f8f99f0d5b24"><code>83a312b</code></a>
chore(zIndexMode): use basic as default</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/14fd41b1f153406f1a21a61bf98ea07ad8275ec6"><code>14fd41b</code></a>
change default back to elevateEdgesOnSelect=false and
zIndexMode=basic</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/3680a6a0e623e19d1f983515273f11bdd355ec86"><code>3680a6a</code></a>
Merge branch 'main' into feat/zindexmode</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/a523919d6789995e9d0f3dd29b0b47fc3b8d8439"><code>a523919</code></a>
chore(middleware): cleanup</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/e4e3605d62c8c710fe7ddb2ec3929af0a7962a6b"><code>e4e3605</code></a>
Merge branch 'main' into middlewares</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/2c05b3224a13e896dfb9a0c93f3af7bb592afc45"><code>2c05b32</code></a>
Merge branch 'feat/zindexmode' of github.com:xyflow/xyflow into
feat/zindexmode</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/ddbb9280f6242794187205a207e993e2c721c244"><code>ddbb928</code></a>
chore(examples): add zindexmode</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/9faca3357d5db68fdad6c96de06fd66dd1d0ba64"><code>9faca33</code></a>
Merge branch 'main' into feat/zindexmode</li>
<li><a
href="https://github.com/xyflow/xyflow/commit/4eb42952f01b947c9d36c25e6b30b7bd98224632"><code>4eb4295</code></a>
feat(svelte): add zIndexMode</li>
<li>Additional commits viewable in <a
href="https://github.com/xyflow/xyflow/commits/@xyflow/[email protected]/packages/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@xyflow/react&package-manager=npm_and_yarn&previous-version=12.4.2&new-version=12.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 08:09:48 +00:00
db9636bd9e i18n - docs translations (#18067)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-19 02:07:09 +01:00
Charles BochetandGitHub 36c2b0e23b Migrate dropdown to jotai (#18063)
Here we go again
2026-02-19 00:58:26 +01:00
66deb8be63 i18n - docs translations (#18062)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-18 23:34:46 +01:00
Charles BochetandGitHub 01d2269bd0 Fix website build (#18061)
As per title
2026-02-18 23:34:36 +01:00
04502e5abb Messages Message Folder Association (#17398)
This PR adds Message folder association for message channel messages,
Currently under testing phase, not ready yet.

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
2026-02-18 23:13:47 +01:00
Charles BochetandGitHub 549c7a613b Fix website build (#18057) 2026-02-18 22:40:54 +01:00
743b733e70 i18n - translations (#18056)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-18 22:40:10 +01:00
Thomas des FrancsGitHubclaude[bot] <41898282+claude[bot]@users.noreply.github.com>Charles BochetCharles Bochet
612f7c37a5 Improve security settings card grouping and description overflow (#17928)
# After

- Added a separtor between the two audit logs cards
- Rename the audit log card to avoid repetition
- Grouped "Invite by link" and "2 factor auth" in one group
- Changed the card component description to always be one line max with
truncation & tooltips

<img width="777" height="1278" alt="CleanShot 2026-02-13 at 17 02 36"
src="https://github.com/user-attachments/assets/685c792a-c85b-4521-8c1b-bd9adedc75d9"
/>

<img width="976" height="690"
alt="b49f2eb043b6712d013618bb0a4ef7f011cf2316e1163fbdee4c293bed036ac9"
src="https://github.com/user-attachments/assets/6e17aa11-ecdb-4f98-ba50-5cd9b9c5def6"
/>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Charles Bochet <[email protected]>
Co-authored-by: Charles Bochet <[email protected]>
2026-02-18 22:33:37 +01:00
42108e0611 i18n - translations (#18053)
Created by Github action

---------

Co-authored-by: github-actions <[email protected]>
2026-02-18 22:20:32 +01:00
Charles BochetandGitHub 9a2dc45eb7 Fix website build (#18052) 2026-02-18 22:15:30 +01:00
neo773andGitHub 7de565f70c Prevent SSRF via IMAP/SMTP/CalDAV (#17973)
Prevents leaking of internal services by filtering out private IPs, same
way we do for webhooks
2026-02-18 22:15:10 +01:00
Félix MalfaitGitHubCursorclaude[bot] <41898282+claude[bot]@users.noreply.github.com>
67074a7581 Harden server-side input validation and auth defaults (#18018)
## Summary

- **File storage (LocalDriver):** Add realpath resolution and symlink
rejection to `writeFile`, `downloadFile`, and `downloadFolder` — brings
them in line with the existing `readFile` protections. Includes unit
tests.
- **JWT:** Pin signing/verification to HS256 explicitly.
- **Auth:** Revoke active refresh tokens when a user changes their
password.
- **Logic functions:** Validate `handlerName` as a safe JS identifier at
both DTO and runtime level, preventing injection into the generated
runner script.
- **User entity:** Remove `passwordHash` from the GraphQL schema
(`@Field` decorator removed, column stays).
- **Query params:** Use `crypto.randomBytes` instead of `Math.random`
for SQL parameter name generation.
- **Exception filter:** Mirror the request `Origin` header instead of
sending `Access-Control-Allow-Origin: *`.

## Test plan

- [x] `local.driver.spec.ts` — writeFile rejects symlinks, downloadFile
rejects paths outside storage
- [ ] Verify JWT auth flow still works (login, token refresh)
- [ ] Verify password change invalidates existing sessions
- [ ] Verify logic function creation with valid/invalid handler names
- [ ] Verify file upload/download in dev environment


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-02-18 21:41:01 +01:00
Charles BochetandGitHub 330737aa2e Fix impossible scroll in sdk app:dev (#18051)
Issue is that we are refreshing the terminal because of icons animations
2026-02-18 21:39:21 +01:00
4cb64c6aa5 Restore old favorite design (#18049)
Issue : With IS_NAVIGATION_MENU_ITEM_ENABLED:true +
IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED:false, nav menu design is
changed after 1.18.0 release : views expansion removed, system object
displayed, position re-ordered

We prefer keeping the same "old" favorite behaviour and design state

- After 1.18.0 all workspaces have up-to-date navigation menu items
(migrated)
- IS_NAVIGATION_MENU_ITEM_EDITING_ENABLED becomes the FF for nav menu
new design

---------

Co-authored-by: Charles Bochet <[email protected]>
2026-02-18 21:35:17 +01:00
6b3ef404b0 i18n - docs translations (#18050)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-18 21:31:54 +01:00
6aaafb76b6 fix: show "Not shared" for junction relation fields when target or intermediate object is not readable (#18025)
When a user's role lacks read permission on the target object (e.g.,
Company) or the intermediate junction object (e.g., EmploymentHistory),
junction relation fields like "Previous Companies" displayed as blank
instead of showing "Not shared."

- In RecordFieldList, junction fields now check the junction object's
read permission and set isForbidden on the field context so FieldDisplay
renders "Not shared" instead of an empty field.
- In RelationFromManyFieldDisplay, if junction records exist but all
nested target records are null (permission-denied by the API), the
component renders "Not shared" instead of an empty list.

---------

Co-authored-by: Félix Malfait <[email protected]>
2026-02-18 21:05:45 +01:00
Thomas des FrancsandGitHub 7ec4508d5f Add currency hover tooltip in CurrencyDisplay (#18045)
https://github.com/user-attachments/assets/af768ecb-b5e9-4e8d-a9f9-fee1a08ea9a0

Fixes https://github.com/twentyhq/twenty/issues/17756
2026-02-18 20:25:34 +01:00
Thomas des FrancsandGitHub a05a9c8f79 refactor workflow action messaging with callout (#18038)
## Summary
- remove the dedicated `WorkflowMessage` component and story
- update workflow action editor components to use the shared callout
patterns
- adjust `Callout` and its stories to support the new usage in workflow
actions

## Before/After

<img width="525" height="548" alt="image"
src="https://github.com/user-attachments/assets/ce57a84f-f070-4149-85ef-a4d162b2d878"
/>


<img width="518" height="593" alt="image"
src="https://github.com/user-attachments/assets/f7249cd0-221f-496d-9deb-d9966ee43382"
/>
2026-02-18 20:23:38 +01:00
Charles BochetandGitHub ce1ffa8550 Refactor page layout types (#18042)
## Refactor page layout widget types into shared package and expose from
SDK

### Why

Widget configuration types were defined only on the server, forcing SDK
consumer apps to import from deep internal `twenty-shared/dist` paths —
fragile and breaks on structural changes. Server DTOs also had no
compile-time guarantee they matched the canonical types.

### What changed

- **`twenty-shared`**: Migrated `ChartFilter`, `GridPosition`,
`RatioAggregateConfig` and all 20 widget configuration variants into
`twenty-shared/types`. `PageLayoutWidgetConfiguration` (base, with
`SerializedRelation`) and `PageLayoutWidgetUniversalConfiguration`
(derived via `FormatRecordSerializedRelationProperties`) are now the
single source of truth.
- **`twenty-sdk`**: Re-exported `AggregateOperations`,
`ObjectRecordGroupByDateGranularity`, `PageLayoutTabLayoutMode`, and
`PageLayoutWidgetUniversalConfiguration` so consumer apps import from
`twenty-sdk` directly.
- **`twenty-server`**: All widget DTOs now `implements` their shared
type for compile-time enforcement. Added helpers to convert nested
`fieldMetadataId` ↔ `fieldMetadataUniversalIdentifier` inside chart
filters. Removed redundant local type re-exports.
2026-02-18 20:17:40 +01:00
martmullandGitHub 2cc3c75c7e Add example in create-twenty-app (#18043)
- add interactive mode to create-twenty-app
- by default create an example for each entities

<img width="1181" height="168" alt="image"
src="https://github.com/user-attachments/assets/a2490d8f-66a1-4cd5-bf41-57166cc20a1e"
/>
2026-02-18 18:04:19 +00:00
Thomas TrompetteandGitHub 9733ff1b8e Add missing objects to rich app integration tests (#18039)
Updating rich app so it also create:
- a many to many relation
- views
- navigation items

The app was built successfully.

Will still be missing front component examples

<img width="1498" height="660" alt="Capture d’écran 2026-02-18 à 17 47
25"
src="https://github.com/user-attachments/assets/acd5193f-3a36-4eb7-8276-3154e4e60f5e"
/>
2026-02-18 18:01:14 +00:00
e4075caa65 i18n - docs translations (#18048)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-18 19:42:34 +01:00
Charles BochetandGitHub c3781e87cc Sync page Layout (#18034)
## Sync page layouts, tabs, and widgets

Adds the ability for SDK applications to synchronize `pageLayout`,
`pageLayoutTab`, and `pageLayoutWidget` entities, following the same
pattern established in #18003 for views and navigation menu items.

### Changes

**`twenty-shared`**
- New `PageLayoutManifest`, `PageLayoutTabManifest`, and
`PageLayoutWidgetManifest` types with a hierarchical structure (page
layout → tabs → widgets)
- Added `pageLayouts: PageLayoutManifest[]` to the `Manifest` type

**`twenty-sdk`**
- New `definePageLayout()` SDK function with validation for
universalIdentifier, name, and nested tabs/widgets
- Wired into the manifest extraction and build pipeline
(`DefinePageLayout` target function, `PageLayouts` entity key)
- Exported from the SDK entry point

**`twenty-server`**
- Added `pageLayout`, `pageLayoutTab`, `pageLayoutWidget` to
`APPLICATION_MANIFEST_METADATA_NAMES`
- New conversion utilities: manifest → universal flat entity for all
three entity types
- Updated `computeApplicationManifestAllUniversalFlatEntity
2026-02-18 17:55:04 +01:00
e9b5cb830c i18n - docs translations (#18040)
Created by Github action

Co-authored-by: github-actions <[email protected]>
2026-02-18 17:54:40 +01:00
EtienneandGitHub e40c758aa6 Nav Menu Item Migration command fix (#18041) 2026-02-18 17:45:21 +01:00
martmullandGitHub 53c314d0fa 2094 extensibility define postinstall orand preinstall function to run in application (#18037)
- add a new optional key `postInstallLogicFunctionUniversalIdentifier`
in applicationConfig
- seed postInstall function in create-twenty-app
- update execute:function options
- update doc
2026-02-18 15:38:22 +00:00
618df704e6 [Chore] : Generate migration for DATE_TIME to DATE for DATE_TIME + IS operand filters (#17564)
migration command in response to the fix :
https://github.com/twentyhq/twenty/pull/17529 for the issue
https://github.com/twentyhq/core-team-issues/issues/2027

---------

Co-authored-by: Arun kumar <[email protected]>
Co-authored-by: Lucas Bordeau <[email protected]>
2026-02-18 15:15:38 +00:00
EtienneandGitHub 058489b5cc Fixes - Workspace logo migration (#18035)
- Update migration command to handle case where workspace logo is
originated from workspace email and point to twenty-icons.com
- Update same logic for new workspaces
- Add feature-flag for all newly created workspaces
2026-02-18 16:35:48 +01:00
3bd431e95d Use proper PostgreSQL identifier/literal escaping in workspace DDL (#18024)
## Summary

- Replace the character-stripping approach (`removeSqlDDLInjection`)
with standard PostgreSQL `escapeIdentifier` and `escapeLiteral`
functions across all workspace schema manager services
- Add missing identifier escaping to `createForeignKey` (was the only
method in the FK manager without it)
- Add allowlist validation for index WHERE clauses and FK action types
- Harden tsvector expression builder with proper identifier quoting

## Context

The workspace schema managers build DDL dynamically from metadata (table
names, column names, enum values, etc.). The previous approach stripped
all non-alphanumeric characters — safe but lossy (silently corrupts
values with legitimate special characters). The new approach uses
PostgreSQL's standard escaping:

- **Identifiers**: double internal `"` and wrap → `"my""table"` (same
algorithm as `pg` driver's `escapeIdentifier`)
- **Literals**: double internal `'` and wrap → `'it''s a value'` (same
algorithm as `pg` driver's `escapeLiteral`)

`removeSqlDDLInjection` is kept only for name generation (e.g.,
`computePostgresEnumName`) where stripping to `[a-zA-Z0-9_]` is the
correct behavior.

## Files changed

| File | What |
|------|------|
| `remove-sql-injection.util.ts` | Added `escapeIdentifier` +
`escapeLiteral` |
| `validate-index-where-clause.util.ts` | New — allowlist for partial
index WHERE clauses |
| 5 schema manager services | Replaced strip+manual-quote with
`escapeIdentifier`/`escapeLiteral` |
| `build-sql-column-definition.util.ts` | `escapeIdentifier` for column
names, validated `generatedType` |
| `sanitize-default-value.util.ts` | `escapeLiteral` instead of
stripping |
| `serialize-default-value.util.ts` | `escapeLiteral` for values,
`escapeIdentifier` for enum casts |
| `get-ts-vector-column-expression.util.ts` | `escapeIdentifier` for
field names in expressions |
| `sanitize-default-value.util.spec.ts` | Updated tests for escape
behavior |

## Test plan

- [x] All 64 existing tests pass across 6 test suites
- [x] `lint:diff-with-main` passes
- [x] TypeScript typecheck — no new errors
- [ ] Verify workspace sync-metadata still works end-to-end
- [ ] Verify custom object/field creation works
- [ ] Verify enum field option changes work


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <[email protected]>
2026-02-18 14:24:10 +00:00
f4a61f26c0 Replace generic "Unknown error" messages with descriptive error details (#18019)
## Summary

- Replace all generic `"Unknown error"` fallback messages across the
server codebase with messages that include the actual error details
- The most impactful change is in `guard-redirect.service.ts`, which
handles OAuth redirect errors — non-`AuthException` errors (e.g.,
passport state verification failures) now show `"Authentication error:
<actual message>"` instead of the opaque `"Unknown error"`
- Gmail/Google error handler services now include the error message in
the thrown exception instead of discarding it
- Other catch blocks (workflow delay resume, migration runner rollback,
code interpreter, marketplace) now use `String(error)` for non-Error
objects instead of a static fallback

Fixes the class of issues reported in
https://github.com/twentyhq/twenty/issues/17812, where a user saw
"Unknown error" during Google OAuth and had no way to diagnose the root
cause (which turned out to be a session cookie / SSL configuration
issue).

## Test plan

- [ ] Verify OAuth error flows (e.g., Google Auth with misconfigured
callback URL) now display the actual error message on the `/verify` page
instead of "Unknown error"
- [ ] Verify Gmail sync error handling still correctly classifies and
re-throws errors with descriptive messages
- [ ] Verify workflow delay resume failures include the error details in
the workflow run status


Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <[email protected]>
2026-02-18 14:12:47 +00:00
8e6b267ff3 Allow DATE_TIME IS operand to filter on a whole day (#17529)
Fixes:  https://github.com/twentyhq/core-team-issues/issues/2027

We've replaced the DATE_TIME picker with DATE picker, and changed the
logic to filter for complete day period.



https://github.com/user-attachments/assets/ba7e1078-bab3-4c62-a803-d6a851f14b7d

---------

Co-authored-by: Arun kumar <[email protected]>
Co-authored-by: Lucas Bordeau <[email protected]>
2026-02-18 13:44:05 +00:00
neo773andGitHub 88146c2170 Fix Gmail thread awareness for custom labels (#18031)
This fixes two edge cases for Gmail

- When policy was set to `SELECTED_FOLDERS` excluding root INBOX, it
missed label changes, so messages with newly applied labels weren't
imported until a full resync.

- Gmail thread replies by default by default do no inherit parent
message's label properties so thread context was also lost because only
individually labeled messages were returned, dropping earlier parts of
the conversation.

Fixed by subscribing to `labelAdded`/`labelRemoved` history events and
fetching full thread context when at least one message in a thread
carries a synced label. `ALL_FOLDERS` path is untouched.
2026-02-18 14:10:38 +01:00
1906 changed files with 237705 additions and 19550 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ on:
jobs:
deploy-main:
timeout-minutes: 3
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
+1 -1
View File
@@ -11,7 +11,7 @@ on:
jobs:
deploy-tag:
timeout-minutes: 3
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
+1 -1
View File
@@ -16,7 +16,7 @@ permissions:
jobs:
changed-files:
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 45
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
services:
postgres:
image: twentycrm/twenty-postgres-spilo
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
strategy:
matrix:
task: [lint, typecheck, test]
@@ -50,7 +50,7 @@ jobs:
ci-create-app-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, create-app-test]
steps:
- name: Fail job if any needs failed
+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
steps:
- name: Fetch custom Github Actions and base branch history
uses: actions/checkout@v4
@@ -56,7 +56,7 @@ jobs:
ci-emails-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, emails-test]
steps:
- name: Fail job if any needs failed
+12 -19
View File
@@ -14,8 +14,8 @@ concurrency:
env:
# restore-cache action adds 'v4-' prefix and '-<branch>-<sha>' suffix to the key
STORYBOOK_BUILD_CACHE_KEY_FOR_RESTORE_ACTION: storybook-build-ubuntu-latest-8-cores-runner
STORYBOOK_BUILD_CACHE_KEY_FOR_SAVE_ACTION: v4-storybook-build-ubuntu-latest-8-cores-runner-${{ github.ref_name }}-${{ github.sha }}
STORYBOOK_BUILD_CACHE_KEY_FOR_RESTORE_ACTION: storybook-build-depot-ubuntu-24.04-8-runner
STORYBOOK_BUILD_CACHE_KEY_FOR_SAVE_ACTION: v4-storybook-build-depot-ubuntu-24.04-8-runner-${{ github.ref_name }}-${{ github.sha }}
jobs:
changed-files-check:
@@ -42,7 +42,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
env:
REACT_APP_SERVER_BASE_URL: http://localhost:3000
steps:
@@ -68,7 +68,7 @@ jobs:
key: ${{ env.STORYBOOK_BUILD_CACHE_KEY_FOR_SAVE_ACTION }}
front-sb-test:
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
needs: front-sb-build
strategy:
fail-fast: false
@@ -115,7 +115,7 @@ jobs:
path: packages/twenty-front/coverage/storybook/coverage-shard-${{matrix.shard}}.json
merge-reports-and-check-coverage:
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: front-sb-test
env:
PATH_TO_COVERAGE: packages/twenty-front/coverage/storybook
@@ -143,7 +143,7 @@ jobs:
timeout-minutes: 30
if: false
needs: front-sb-build
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
env:
REACT_APP_SERVER_BASE_URL: http://127.0.0.1:3000
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
@@ -169,8 +169,9 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
env:
NODE_OPTIONS: '--max-old-space-size=4096'
TASK_CACHE_KEY: front-task-${{ matrix.task }}
strategy:
matrix:
@@ -202,14 +203,6 @@ jobs:
with:
tag: scope:frontend
tasks: ${{ matrix.task }}
- name: Check for coverage threshold failure
if: always() && steps.run-task.outcome == 'failure' && matrix.task == 'test'
shell: bash
run: |
echo "::error::The test task failed. If no individual test is failing, this is likely a coverage threshold not being met."
echo ""
echo "To debug locally, run: npx nx run twenty-front:test:ci"
exit 1
- name: Save ${{ matrix.task }} cache
uses: ./.github/actions/save-cache
with:
@@ -218,7 +211,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
env:
NODE_OPTIONS: "--max-old-space-size=10240"
steps:
@@ -243,7 +236,7 @@ jobs:
path: packages/twenty-front/build
retention-days: 1
e2e-test:
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check-e2e, front-build]
if: |
always() &&
@@ -353,7 +346,7 @@ jobs:
ci-front-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs:
[
changed-files-check,
@@ -370,7 +363,7 @@ jobs:
ci-e2e-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check-e2e, e2e-test]
steps:
- name: Fail job if any needs failed
+1 -1
View File
@@ -25,7 +25,7 @@ defaults:
jobs:
create_pr:
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -15,7 +15,7 @@ defaults:
jobs:
tag_and_release:
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
steps:
- name: Check PR Author
+3 -3
View File
@@ -23,7 +23,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
strategy:
matrix:
task: [lint, typecheck, test:unit, storybook:build, storybook:test, test:integration]
@@ -50,7 +50,7 @@ jobs:
tasks: ${{ matrix.task }}
sdk-e2e-test:
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
needs: [changed-files-check, sdk-test]
if: needs.changed-files-check.outputs.any_changed == 'true'
services:
@@ -94,7 +94,7 @@ jobs:
ci-sdk-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, sdk-test, sdk-e2e-test]
steps:
- name: Fail job if any needs failed
+4 -4
View File
@@ -31,7 +31,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
services:
postgres:
image: twentycrm/twenty-postgres-spilo
@@ -143,7 +143,7 @@ jobs:
key: ${{ steps.restore-server-setup-cache.outputs.cache-primary-key }}
server-test:
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
needs: server-setup
steps:
- name: Fetch custom Github Actions and base branch history
@@ -164,7 +164,7 @@ jobs:
server-integration-test:
timeout-minutes: 30
runs-on: ubuntu-latest-8-cores
runs-on: depot-ubuntu-24.04-8
needs: server-setup
strategy:
fail-fast: false
@@ -250,7 +250,7 @@ jobs:
ci-server-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, server-setup, server-test, server-integration-test]
steps:
- name: Fail job if any needs failed
+4 -2
View File
@@ -22,7 +22,9 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
env:
NODE_OPTIONS: '--max-old-space-size=4096'
strategy:
matrix:
task: [lint, typecheck, test]
@@ -45,7 +47,7 @@ jobs:
ci-shared-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, shared-test]
steps:
- name: Fail job if any needs failed
@@ -23,7 +23,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -92,7 +92,7 @@ jobs:
ci-test-docker-compose-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, test]
steps:
- name: Fail job if any needs failed
+2 -2
View File
@@ -25,7 +25,7 @@ concurrency:
jobs:
danger-js:
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
if: github.event.action != 'closed'
steps:
- uses: actions/checkout@v4
@@ -38,7 +38,7 @@ jobs:
congratulate:
timeout-minutes: 3
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
if: github.event.action == 'closed' && github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
services:
postgres:
image: twentycrm/twenty-postgres-spilo
@@ -65,7 +65,7 @@ jobs:
ci-website-status-check:
if: always() && !cancelled()
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
needs: [changed-files-check, website-build]
steps:
- name: Fail job if any needs failed
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && github.event.comment.user.type != 'Bot') ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && github.event.review.user.type != 'Bot') ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
@@ -96,7 +96,7 @@ jobs:
claude-cross-repo:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
+1 -1
View File
@@ -34,7 +34,7 @@ concurrency:
jobs:
pull_docs_translations:
name: Pull docs translations
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -21,7 +21,7 @@ concurrency:
jobs:
push_docs:
name: Push documentation to Crowdin
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -32,7 +32,7 @@ concurrency:
jobs:
pull_translations:
name: Pull translations
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -17,7 +17,7 @@ concurrency:
jobs:
extract_translations:
name: Extract and upload translations
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -18,7 +18,7 @@ concurrency:
jobs:
qa_report:
name: Generate QA Report
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
trigger-preview:
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || (github.event.action == 'labeled' && github.event.label.name == 'preview-app')
timeout-minutes: 5
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- name: Trigger preview environment workflow
uses: peter-evans/repository-dispatch@v2
+20 -20
View File
@@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.pr_head_sha }}
- name: Run compose setup
run: |
echo "Patching docker-compose.yml..."
@@ -25,17 +25,17 @@ jobs:
yq eval 'del(.services.server.image)' -i packages/twenty-docker/docker-compose.yml
yq eval '.services.server.build.context = "../../"' -i packages/twenty-docker/docker-compose.yml
yq eval '.services.server.build.dockerfile = "./packages/twenty-docker/twenty/Dockerfile"' -i packages/twenty-docker/docker-compose.yml
yq eval 'del(.services.worker.image)' -i packages/twenty-docker/docker-compose.yml
yq eval '.services.worker.build.context = "../../"' -i packages/twenty-docker/docker-compose.yml
yq eval '.services.worker.build.dockerfile = "./packages/twenty-docker/twenty/Dockerfile"' -i packages/twenty-docker/docker-compose.yml
echo "Adding SIGN_IN_PREFILLED environment variable to server service..."
yq eval '.services.server.environment.SIGN_IN_PREFILLED = "${SIGN_IN_PREFILLED}"' -i packages/twenty-docker/docker-compose.yml
echo "Setting up .env file..."
cp packages/twenty-docker/.env.example packages/twenty-docker/.env
echo "Generating secrets..."
echo "" >> packages/twenty-docker/.env
echo "# === Randomly generated secrets ===" >> packages/twenty-docker/.env
@@ -46,24 +46,24 @@ jobs:
cd packages/twenty-docker/
docker compose build
working-directory: ./
- name: Create Tunnel
id: expose-tunnel
uses: codetalkio/[email protected]
with:
service: bore.pub
port: 3000
- name: Start services with correct SERVER_URL
run: |
cd packages/twenty-docker/
# Update the SERVER_URL with the tunnel URL
echo "Setting SERVER_URL to ${{ steps.expose-tunnel.outputs.tunnel-url }}"
sed -i '/SERVER_URL=/d' .env
echo "" >> .env
echo "SERVER_URL=${{ steps.expose-tunnel.outputs.tunnel-url }}" >> .env
# Start the services
echo "Docker compose up..."
docker compose up -d || {
@@ -71,7 +71,7 @@ jobs:
docker compose logs
exit 1
}
echo "Waiting for services to be ready..."
count=0
while [ ! $(docker inspect --format='{{.State.Health.Status}}' twenty-db-1) = "healthy" ] || [ ! $(docker inspect --format='{{.State.Health.Status}}' twenty-server-1) = "healthy" ]; do
@@ -84,7 +84,7 @@ jobs:
fi
echo "Still waiting for services... ($count/60)"
done
echo "All services are up and running!"
working-directory: ./
@@ -104,7 +104,7 @@ jobs:
echo "✅ Preview Environment Ready!"
echo "🔗 Preview URL: ${{ steps.expose-tunnel.outputs.tunnel-url }}"
echo "⏱️ This environment will be available for 5 hours"
- name: Post comment on PR
uses: actions/github-script@v6
with:
@@ -113,21 +113,21 @@ jobs:
const COMMENT_MARKER = '<!-- PR_PREVIEW_ENV -->';
const commentBody = `${COMMENT_MARKER}
🚀 **Preview Environment Ready!**
Your preview environment is available at: ${{ steps.expose-tunnel.outputs.tunnel-url }}
This environment will automatically shut down when the PR is closed or after 5 hours.`;
// Get all comments
const {data: comments} = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.client_payload.pr_number }},
});
// Find our comment
const botComment = comments.find(comment => comment.body.includes(COMMENT_MARKER));
if (botComment) {
// Update existing comment
await github.rest.issues.updateComment({
@@ -147,13 +147,13 @@ jobs:
});
console.log('Created new comment');
}
- name: Keep tunnel alive for 5 hours
run: timeout 300m sleep 18000 # Stop on whichever we reach first (300m or 5hour sleep)
- name: Cleanup
if: always()
run: |
cd packages/twenty-docker/
docker compose down -v
working-directory: ./
working-directory: ./
+2
View File
@@ -28,6 +28,8 @@ npx jest path/to/test.test.ts --config=packages/PROJECT/jest.config.mjs
npx nx test twenty-front # Frontend unit tests
npx nx test twenty-server # Backend unit tests
npx nx run twenty-server:test:integration:with-db-reset # Integration tests with DB reset
# To run an indivual test or a pattern of tests, use the following command:
cd packages/{workspace} && npx jest "pattern or filename"
# Storybook
npx nx storybook:build twenty-front
+2 -1
View File
@@ -28,7 +28,7 @@ See:
🚀 [Self-hosting](https://docs.twenty.com/developers/self-hosting/docker-compose)
🖥️ [Local Setup](https://docs.twenty.com/developers/local-setup)
# Does the world need another CRM?
# Why Twenty
We built Twenty for three reasons:
@@ -120,6 +120,7 @@ Below are a few features we have implemented to date:
<a href="https://greptile.com"><img src="./packages/twenty-website/public/images/readme/greptile.png" height="30" alt="Greptile" /></a>
<a href="https://sentry.io/"><img src="./packages/twenty-website/public/images/readme/sentry.png" height="30" alt="Sentry" /></a>
<a href="https://crowdin.com/"><img src="./packages/twenty-website/public/images/readme/crowdin.png" height="30" alt="Crowdin" /></a>
<a href="https://e2b.dev/"><img src="./packages/twenty-website/public/images/readme/e2b.svg" height="30" alt="E2B" /></a>
</p>
Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).
+4 -4
View File
@@ -91,10 +91,10 @@
"@storybook/react-vite": "^10.1.11",
"@storybook/test-runner": "^0.24.2",
"@stylistic/eslint-plugin": "^1.5.0",
"@swc-node/register": "1.8.0",
"@swc-node/register": "1.11.1",
"@swc/cli": "^0.3.12",
"@swc/core": "1.13.3",
"@swc/helpers": "~0.5.2",
"@swc/core": "1.15.11",
"@swc/helpers": "~0.5.18",
"@swc/jest": "^0.2.39",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
@@ -137,7 +137,7 @@
"@typescript-eslint/parser": "^8.39.0",
"@typescript-eslint/utils": "^8.39.0",
"@typescript/native-preview": "^7.0.0-dev.20260116.1",
"@vitejs/plugin-react-swc": "3.11.0",
"@vitejs/plugin-react-swc": "4.2.3",
"@vitest/browser-playwright": "^4.0.18",
"@vitest/coverage-istanbul": "^4.0.18",
"@vitest/coverage-v8": "^4.0.18",
+49 -7
View File
@@ -54,23 +54,65 @@ yarn twenty function:logs
# Execute a function with a JSON payload
yarn twenty function:execute -n my-function -p '{"key": "value"}'
# Execute the post-install function
yarn twenty function:execute --postInstall
# Uninstall the application from the current workspace
yarn twenty app:uninstall
```
## Scaffolding modes
Control which example files are included when creating a new app:
| Flag | Behavior |
|------|----------|
| `-e, --exhaustive` | **(default)** Creates all example files without prompting |
| `-m, --minimal` | Creates only core files (`application-config.ts` and `default-role.ts`) |
| `-i, --interactive` | Prompts you to select which examples to include |
```bash
# Default: all examples included
npx create-twenty-app@latest my-app
# Minimal: only core files
npx create-twenty-app@latest my-app -m
# Interactive: choose which examples to include
npx create-twenty-app@latest my-app -i
```
In interactive mode, you can pick from:
- **Example object** — a custom CRM object definition (`objects/example-object.ts`)
- **Example field** — a custom field on the example object (`fields/example-field.ts`)
- **Example logic function** — a server-side handler with HTTP trigger (`logic-functions/hello-world.ts`)
- **Example front component** — a React UI component (`front-components/hello-world.tsx`)
- **Example view** — a saved view for the example object (`views/example-view.ts`)
- **Example navigation menu item** — a sidebar link (`navigation-menu-items/example-navigation-menu-item.ts`)
- **Example skill** — an AI agent skill definition (`skills/example-skill.ts`)
## What gets scaffolded
- A minimal app structure ready for Twenty with example files:
- `application-config.ts` - Application metadata configuration
- `roles/default-role.ts` - Default role for logic functions
- `logic-functions/hello-world.ts` - Example logic function with HTTP trigger
- `front-components/hello-world.tsx` - Example front component
- TypeScript configuration
**Core files (always created):**
- `application-config.ts` — Application metadata configuration
- `roles/default-role.ts` — Default role for logic functions
- `logic-functions/post-install.ts` — Post-install logic function (runs after app installation)
- TypeScript configuration, ESLint, package.json, .gitignore
- A prewired `twenty` script that delegates to the `twenty` CLI from twenty-sdk
**Example files (controlled by scaffolding mode):**
- `objects/example-object.ts` — Example custom object with a text field
- `fields/example-field.ts` — Example standalone field extending the example object
- `logic-functions/hello-world.ts` — Example logic function with HTTP trigger
- `front-components/hello-world.tsx` — Example front component
- `views/example-view.ts` — Example saved view for the example object
- `navigation-menu-items/example-navigation-menu-item.ts` — Example sidebar navigation link
- `skills/example-skill.ts` — Example AI agent skill definition
## Next steps
- Run `yarn twenty help` to see all available commands.
- Use `yarn twenty auth:login` to authenticate with your Twenty workspace.
- Explore the generated project and add your first entity with `yarn twenty entity:add` (logic functions, front components, objects, roles).
- Explore the generated project and add your first entity with `yarn twenty entity:add` (logic functions, front components, objects, roles, views, navigation menu items, skills).
- Use `yarn twenty app:dev` while you iterate — it watches, builds, and syncs changes to your workspace in real time.
- Types are autogenerated by `yarn twenty app:dev` and stored in `node_modules/twenty-sdk/generated`.
+52 -11
View File
@@ -2,6 +2,7 @@
import chalk from 'chalk';
import { Command, CommanderError } from 'commander';
import { CreateAppCommand } from '@/create-app.command';
import { type ScaffoldingMode } from '@/types/scaffolding-options';
import packageJson from '../package.json';
const program = new Command(packageJson.name)
@@ -12,18 +13,58 @@ const program = new Command(packageJson.name)
'Output the current version of create-twenty-app.',
)
.argument('[directory]')
.option('-e, --exhaustive', 'Create all example entities (default)')
.option(
'-m, --minimal',
'Create only core entities (application-config and default-role)',
)
.option(
'-i, --interactive',
'Interactively choose which entity examples to include',
)
.helpOption('-h, --help', 'Display this help message.')
.action(async (directory?: string) => {
if (directory && !/^[a-z0-9-]+$/.test(directory)) {
console.error(
chalk.red(
`Invalid directory "${directory}". Must contain only lowercase letters, numbers, and hyphens`,
),
);
process.exit(1);
}
await new CreateAppCommand().execute(directory);
});
.action(
async (
directory?: string,
options?: {
exhaustive?: boolean;
minimal?: boolean;
interactive?: boolean;
},
) => {
const modeFlags = [
options?.exhaustive,
options?.minimal,
options?.interactive,
].filter(Boolean);
if (modeFlags.length > 1) {
console.error(
chalk.red(
'Error: --exhaustive, --minimal, and --interactive are mutually exclusive.',
),
);
process.exit(1);
}
if (directory && !/^[a-z0-9-]+$/.test(directory)) {
console.error(
chalk.red(
`Invalid directory "${directory}". Must contain only lowercase letters, numbers, and hyphens`,
),
);
process.exit(1);
}
const mode: ScaffoldingMode = options?.minimal
? 'minimal'
: options?.interactive
? 'interactive'
: 'exhaustive';
await new CreateAppCommand().execute(directory, mode);
},
);
program.exitOverride();
@@ -0,0 +1,9 @@
## Base documentation
- Documentation: https://docs.twenty.com/developers/extend/capabilities/apps
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-sdk/src/cli/__tests__/apps/rich-app
## Common Pitfalls
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
@@ -30,12 +30,16 @@ yarn twenty auth:list # List all configured workspaces
# Application
yarn twenty app:dev # Start dev mode (watch, build, sync, and auto-generate typed client)
yarn twenty entity:add # Add a new entity (function, front-component, object, role)
yarn twenty entity:add # Add a new entity (object, field, function, front-component, role, view, navigation-menu-item)
yarn twenty function:logs # Stream function logs
yarn twenty function:execute # Execute a function with JSON payload
yarn twenty app:uninstall # Uninstall app from workspace
```
## LLMs instructions
Main docs and pitfalls are available in LLMS.md file.
## Learn More
To learn more about Twenty applications, take a look at the following resources:
@@ -8,14 +8,24 @@ import inquirer from 'inquirer';
import kebabCase from 'lodash.kebabcase';
import * as path from 'path';
import {
type ExampleOptions,
type ScaffoldingMode,
} from '@/types/scaffolding-options';
const CURRENT_EXECUTION_DIRECTORY = process.env.INIT_CWD || process.cwd();
export class CreateAppCommand {
async execute(directory?: string): Promise<void> {
async execute(
directory?: string,
mode: ScaffoldingMode = 'exhaustive',
): Promise<void> {
try {
const { appName, appDisplayName, appDirectory, appDescription } =
await this.getAppInfos(directory);
const exampleOptions = await this.resolveExampleOptions(mode);
await this.validateDirectory(appDirectory);
this.logCreationInfo({ appDirectory, appName });
@@ -27,6 +37,7 @@ export class CreateAppCommand {
appDisplayName,
appDescription,
appDirectory,
exampleOptions,
});
await install(appDirectory);
@@ -92,6 +103,103 @@ export class CreateAppCommand {
return { appName, appDisplayName, appDirectory, appDescription };
}
private async resolveExampleOptions(
mode: ScaffoldingMode,
): Promise<ExampleOptions> {
if (mode === 'minimal') {
return {
includeExampleObject: false,
includeExampleField: false,
includeExampleLogicFunction: false,
includeExampleFrontComponent: false,
includeExampleView: false,
includeExampleNavigationMenuItem: false,
includeExampleSkill: false,
};
}
if (mode === 'exhaustive') {
return {
includeExampleObject: true,
includeExampleField: true,
includeExampleLogicFunction: true,
includeExampleFrontComponent: true,
includeExampleView: true,
includeExampleNavigationMenuItem: true,
includeExampleSkill: true,
};
}
const { selectedExamples } = await inquirer.prompt([
{
type: 'checkbox',
name: 'selectedExamples',
message: 'Select which example files to include:',
choices: [
{
name: 'Example object (custom object definition)',
value: 'object',
checked: true,
},
{
name: 'Example field (custom field on the example object)',
value: 'field',
checked: true,
},
{
name: 'Example logic function (server-side handler)',
value: 'logicFunction',
checked: true,
},
{
name: 'Example front component (React UI component)',
value: 'frontComponent',
checked: true,
},
{
name: 'Example view (saved view for the example object)',
value: 'view',
checked: true,
},
{
name: 'Example navigation menu item (sidebar link)',
value: 'navigationMenuItem',
checked: true,
},
{
name: 'Example skill (AI agent skill definition)',
value: 'skill',
checked: true,
},
],
},
]);
const includeField = selectedExamples.includes('field');
const includeView = selectedExamples.includes('view');
const includeObject =
selectedExamples.includes('object') || includeField || includeView;
if ((includeField || includeView) && !selectedExamples.includes('object')) {
console.log(
chalk.yellow(
'Note: Example object auto-included because example field/view depends on it.',
),
);
}
return {
includeExampleObject: includeObject,
includeExampleField: includeField,
includeExampleLogicFunction: selectedExamples.includes('logicFunction'),
includeExampleFrontComponent: selectedExamples.includes('frontComponent'),
includeExampleView: includeView,
includeExampleNavigationMenuItem:
selectedExamples.includes('navigationMenuItem'),
includeExampleSkill: selectedExamples.includes('skill'),
};
}
private async validateDirectory(appDirectory: string): Promise<void> {
if (!(await fs.pathExists(appDirectory))) {
return;
@@ -0,0 +1,11 @@
export type ScaffoldingMode = 'exhaustive' | 'minimal' | 'interactive';
export type ExampleOptions = {
includeExampleObject: boolean;
includeExampleField: boolean;
includeExampleLogicFunction: boolean;
includeExampleFrontComponent: boolean;
includeExampleView: boolean;
includeExampleNavigationMenuItem: boolean;
includeExampleSkill: boolean;
};
@@ -1,7 +1,9 @@
import * as fs from 'fs-extra';
import { join } from 'path';
import { tmpdir } from 'os';
import { type ExampleOptions } from '@/types/scaffolding-options';
import { GENERATED_DIR } from 'twenty-shared/application';
import { copyBaseApplicationProject } from '@/utils/app-template';
import * as fs from 'fs-extra';
import { tmpdir } from 'os';
import { join } from 'path';
// Mock fs-extra's copy function to skip copying base template (not available during tests)
jest.mock('fs-extra', () => {
@@ -15,6 +17,26 @@ jest.mock('fs-extra', () => {
const APPLICATION_FILE_NAME = 'application-config.ts';
const DEFAULT_ROLE_FILE_NAME = 'default-role.ts';
const ALL_EXAMPLES: ExampleOptions = {
includeExampleObject: true,
includeExampleField: true,
includeExampleLogicFunction: true,
includeExampleFrontComponent: true,
includeExampleView: true,
includeExampleNavigationMenuItem: true,
includeExampleSkill: true,
};
const NO_EXAMPLES: ExampleOptions = {
includeExampleObject: false,
includeExampleField: false,
includeExampleSkill: false,
includeExampleLogicFunction: false,
includeExampleFrontComponent: false,
includeExampleView: false,
includeExampleNavigationMenuItem: false,
};
describe('copyBaseApplicationProject', () => {
let testAppDirectory: string;
@@ -41,6 +63,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
// Verify src/ folder exists
@@ -62,6 +85,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const packageJsonPath = join(testAppDirectory, 'package.json');
@@ -80,6 +104,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const gitignorePath = join(testAppDirectory, '.gitignore');
@@ -87,7 +112,7 @@ describe('copyBaseApplicationProject', () => {
const gitignoreContent = await fs.readFile(gitignorePath, 'utf8');
expect(gitignoreContent).toContain('/node_modules');
expect(gitignoreContent).toContain('generated');
expect(gitignoreContent).toContain(GENERATED_DIR);
});
it('should create yarn.lock file', async () => {
@@ -96,6 +121,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const yarnLockPath = join(testAppDirectory, 'yarn.lock');
@@ -111,6 +137,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const appConfigPath = join(testAppDirectory, 'src', APPLICATION_FILE_NAME);
@@ -148,6 +175,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const roleConfigPath = join(
@@ -192,6 +220,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
// Verify fs.copy was called with correct destination
@@ -208,6 +237,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'My Test App',
appDescription: '',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const appConfigPath = join(testAppDirectory, 'src', APPLICATION_FILE_NAME);
@@ -225,6 +255,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'App One',
appDescription: 'First app',
appDirectory: firstAppDir,
exampleOptions: ALL_EXAMPLES,
});
// Create second app
@@ -235,6 +266,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'App Two',
appDescription: 'Second app',
appDirectory: secondAppDir,
exampleOptions: ALL_EXAMPLES,
});
// Read both app configs
@@ -267,6 +299,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'App One',
appDescription: 'First app',
appDirectory: firstAppDir,
exampleOptions: ALL_EXAMPLES,
});
// Create second app
@@ -277,6 +310,7 @@ describe('copyBaseApplicationProject', () => {
appDisplayName: 'App Two',
appDescription: 'Second app',
appDirectory: secondAppDir,
exampleOptions: ALL_EXAMPLES,
});
const firstRoleConfig = await fs.readFile(
@@ -299,4 +333,347 @@ describe('copyBaseApplicationProject', () => {
expect(secondUuid).toBeDefined();
expect(firstUuid).not.toBe(secondUuid);
});
describe('scaffolding modes', () => {
describe('exhaustive mode (all examples)', () => {
it('should create all example files when all options are enabled', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const srcPath = join(testAppDirectory, 'src');
expect(
await fs.pathExists(join(srcPath, 'objects', 'example-object.ts')),
).toBe(true);
expect(
await fs.pathExists(join(srcPath, 'fields', 'example-field.ts')),
).toBe(true);
expect(
await fs.pathExists(
join(srcPath, 'logic-functions', 'hello-world.ts'),
),
).toBe(true);
expect(
await fs.pathExists(
join(srcPath, 'front-components', 'hello-world.tsx'),
),
).toBe(true);
expect(
await fs.pathExists(join(srcPath, 'views', 'example-view.ts')),
).toBe(true);
expect(
await fs.pathExists(
join(
srcPath,
'navigation-menu-items',
'example-navigation-menu-item.ts',
),
),
).toBe(true);
});
});
describe('minimal mode (no examples)', () => {
it('should create only core files when no examples are enabled', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: NO_EXAMPLES,
});
const srcPath = join(testAppDirectory, 'src');
// Core files should exist
expect(await fs.pathExists(join(srcPath, APPLICATION_FILE_NAME))).toBe(
true,
);
expect(
await fs.pathExists(join(srcPath, 'roles', DEFAULT_ROLE_FILE_NAME)),
).toBe(true);
// Example files should not exist
expect(
await fs.pathExists(join(srcPath, 'objects', 'example-object.ts')),
).toBe(false);
expect(
await fs.pathExists(join(srcPath, 'fields', 'example-field.ts')),
).toBe(false);
expect(
await fs.pathExists(
join(srcPath, 'logic-functions', 'hello-world.ts'),
),
).toBe(false);
expect(
await fs.pathExists(
join(srcPath, 'front-components', 'hello-world.tsx'),
),
).toBe(false);
expect(
await fs.pathExists(join(srcPath, 'views', 'example-view.ts')),
).toBe(false);
expect(
await fs.pathExists(
join(
srcPath,
'navigation-menu-items',
'example-navigation-menu-item.ts',
),
),
).toBe(false);
});
});
describe('selective examples', () => {
it('should create only front component when only that option is enabled', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: {
includeExampleObject: false,
includeExampleField: false,
includeExampleSkill: false,
includeExampleLogicFunction: false,
includeExampleFrontComponent: true,
includeExampleView: false,
includeExampleNavigationMenuItem: false,
},
});
const srcPath = join(testAppDirectory, 'src');
expect(
await fs.pathExists(
join(srcPath, 'front-components', 'hello-world.tsx'),
),
).toBe(true);
expect(
await fs.pathExists(join(srcPath, 'objects', 'example-object.ts')),
).toBe(false);
expect(
await fs.pathExists(join(srcPath, 'fields', 'example-field.ts')),
).toBe(false);
expect(
await fs.pathExists(
join(srcPath, 'logic-functions', 'hello-world.ts'),
),
).toBe(false);
});
it('should create only logic function when only that option is enabled', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: {
includeExampleObject: false,
includeExampleSkill: false,
includeExampleField: false,
includeExampleLogicFunction: true,
includeExampleFrontComponent: false,
includeExampleView: false,
includeExampleNavigationMenuItem: false,
},
});
const srcPath = join(testAppDirectory, 'src');
expect(
await fs.pathExists(
join(srcPath, 'logic-functions', 'hello-world.ts'),
),
).toBe(true);
expect(
await fs.pathExists(join(srcPath, 'objects', 'example-object.ts')),
).toBe(false);
});
});
});
describe('example object', () => {
it('should create example-object.ts with defineObject and correct structure', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const objectPath = join(
testAppDirectory,
'src',
'objects',
'example-object.ts',
);
expect(await fs.pathExists(objectPath)).toBe(true);
const content = await fs.readFile(objectPath, 'utf8');
expect(content).toContain(
"import { defineObject, FieldType } from 'twenty-sdk'",
);
expect(content).toContain('export default defineObject({');
expect(content).toContain(
'export const EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER',
);
expect(content).toContain('export const NAME_FIELD_UNIVERSAL_IDENTIFIER');
expect(content).toContain("nameSingular: 'exampleItem'");
expect(content).toContain("namePlural: 'exampleItems'");
expect(content).toContain('FieldType.TEXT');
expect(content).toContain(
'labelIdentifierFieldMetadataUniversalIdentifier: NAME_FIELD_UNIVERSAL_IDENTIFIER',
);
});
it('should generate unique UUIDs for example objects across apps', async () => {
const firstAppDir = join(testAppDirectory, 'app1');
await fs.ensureDir(firstAppDir);
await copyBaseApplicationProject({
appName: 'app-one',
appDisplayName: 'App One',
appDescription: 'First app',
appDirectory: firstAppDir,
exampleOptions: ALL_EXAMPLES,
});
const secondAppDir = join(testAppDirectory, 'app2');
await fs.ensureDir(secondAppDir);
await copyBaseApplicationProject({
appName: 'app-two',
appDisplayName: 'App Two',
appDescription: 'Second app',
appDirectory: secondAppDir,
exampleOptions: ALL_EXAMPLES,
});
const firstContent = await fs.readFile(
join(firstAppDir, 'src', 'objects', 'example-object.ts'),
'utf8',
);
const secondContent = await fs.readFile(
join(secondAppDir, 'src', 'objects', 'example-object.ts'),
'utf8',
);
const uuidRegex =
/EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER =\s*'([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})'/;
const firstUuid = firstContent.match(uuidRegex)?.[1];
const secondUuid = secondContent.match(uuidRegex)?.[1];
expect(firstUuid).toBeDefined();
expect(secondUuid).toBeDefined();
expect(firstUuid).not.toBe(secondUuid);
});
});
describe('example field', () => {
it('should create example-field.ts with defineField referencing the object', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const fieldPath = join(
testAppDirectory,
'src',
'fields',
'example-field.ts',
);
expect(await fs.pathExists(fieldPath)).toBe(true);
const content = await fs.readFile(fieldPath, 'utf8');
expect(content).toContain(
"import { defineField, FieldType } from 'twenty-sdk'",
);
expect(content).toContain(
"import { EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/objects/example-object'",
);
expect(content).toContain('export default defineField({');
expect(content).toContain(
'objectUniversalIdentifier: EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER',
);
expect(content).toContain('FieldType.NUMBER');
expect(content).toContain("name: 'priority'");
});
});
describe('example view', () => {
it('should create example-view.ts with defineView referencing the object', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const viewPath = join(
testAppDirectory,
'src',
'views',
'example-view.ts',
);
expect(await fs.pathExists(viewPath)).toBe(true);
const content = await fs.readFile(viewPath, 'utf8');
expect(content).toContain("import { defineView } from 'twenty-sdk'");
expect(content).toContain(
"import { EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/objects/example-object'",
);
expect(content).toContain('export default defineView({');
expect(content).toContain(
'objectUniversalIdentifier: EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER',
);
expect(content).toContain("name: 'example-view'");
});
});
describe('example navigation menu item', () => {
it('should create example-navigation-menu-item.ts with defineNavigationMenuItem', async () => {
await copyBaseApplicationProject({
appName: 'my-test-app',
appDisplayName: 'My Test App',
appDescription: 'A test application',
appDirectory: testAppDirectory,
exampleOptions: ALL_EXAMPLES,
});
const navPath = join(
testAppDirectory,
'src',
'navigation-menu-items',
'example-navigation-menu-item.ts',
);
expect(await fs.pathExists(navPath)).toBe(true);
const content = await fs.readFile(navPath, 'utf8');
expect(content).toContain(
"import { defineNavigationMenuItem } from 'twenty-sdk'",
);
expect(content).toContain('export default defineNavigationMenuItem({');
expect(content).toContain("name: 'example-navigation-menu-item'");
expect(content).toContain("icon: 'IconList'");
expect(content).toContain('position: 0');
});
});
});
@@ -3,6 +3,8 @@ import { join } from 'path';
import { v4 } from 'uuid';
import { ASSETS_DIR } from 'twenty-shared/application';
import { type ExampleOptions } from '@/types/scaffolding-options';
const SRC_FOLDER = 'src';
export const copyBaseApplicationProject = async ({
@@ -10,11 +12,13 @@ export const copyBaseApplicationProject = async ({
appDisplayName,
appDescription,
appDirectory,
exampleOptions,
}: {
appName: string;
appDisplayName: string;
appDescription: string;
appDirectory: string;
exampleOptions: ExampleOptions;
}) => {
await fs.copy(join(__dirname, './constants/base-application'), appDirectory);
@@ -37,16 +41,66 @@ export const copyBaseApplicationProject = async ({
fileName: 'default-role.ts',
});
await createDefaultFrontComponent({
appDirectory: sourceFolderPath,
fileFolder: 'front-components',
fileName: 'hello-world.tsx',
});
if (exampleOptions.includeExampleObject) {
await createExampleObject({
appDirectory: sourceFolderPath,
fileFolder: 'objects',
fileName: 'example-object.ts',
});
}
await createDefaultFunction({
if (exampleOptions.includeExampleField) {
await createExampleField({
appDirectory: sourceFolderPath,
fileFolder: 'fields',
fileName: 'example-field.ts',
});
}
if (exampleOptions.includeExampleLogicFunction) {
await createDefaultFunction({
appDirectory: sourceFolderPath,
fileFolder: 'logic-functions',
fileName: 'hello-world.ts',
});
}
if (exampleOptions.includeExampleFrontComponent) {
await createDefaultFrontComponent({
appDirectory: sourceFolderPath,
fileFolder: 'front-components',
fileName: 'hello-world.tsx',
});
}
if (exampleOptions.includeExampleView) {
await createExampleView({
appDirectory: sourceFolderPath,
fileFolder: 'views',
fileName: 'example-view.ts',
});
}
if (exampleOptions.includeExampleNavigationMenuItem) {
await createExampleNavigationMenuItem({
appDirectory: sourceFolderPath,
fileFolder: 'navigation-menu-items',
fileName: 'example-navigation-menu-item.ts',
});
}
if (exampleOptions.includeExampleSkill) {
await createExampleSkill({
appDirectory: sourceFolderPath,
fileFolder: 'skills',
fileName: 'example-skill.ts',
});
}
await createDefaultPostInstallFunction({
appDirectory: sourceFolderPath,
fileFolder: 'logic-functions',
fileName: 'hello-world.ts',
fileName: 'post-install.ts',
});
await createApplicationConfig({
@@ -196,7 +250,6 @@ const handler = async (): Promise<{ message: string }> => {
return { message: 'Hello, World!' };
};
// Logic function handler - rename and implement your logic
export default defineLogicFunction({
universalIdentifier: '${universalIdentifier}',
name: 'hello-world-logic-function',
@@ -215,6 +268,200 @@ export default defineLogicFunction({
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createDefaultPostInstallFunction = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const universalIdentifier = v4();
const content = `import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '${universalIdentifier}';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createExampleObject = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const objectUniversalIdentifier = v4();
const nameFieldUniversalIdentifier = v4();
const content = `import { defineObject, FieldType } from 'twenty-sdk';
export const EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER =
'${objectUniversalIdentifier}';
export const NAME_FIELD_UNIVERSAL_IDENTIFIER =
'${nameFieldUniversalIdentifier}';
export default defineObject({
universalIdentifier: EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER,
nameSingular: 'exampleItem',
namePlural: 'exampleItems',
labelSingular: 'Example item',
labelPlural: 'Example items',
description: 'A sample custom object',
icon: 'IconBox',
labelIdentifierFieldMetadataUniversalIdentifier: NAME_FIELD_UNIVERSAL_IDENTIFIER,
fields: [
{
universalIdentifier: NAME_FIELD_UNIVERSAL_IDENTIFIER,
type: FieldType.TEXT,
name: 'name',
label: 'Name',
description: 'Name of the example item',
icon: 'IconAbc',
},
],
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createExampleField = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const universalIdentifier = v4();
const content = `import { defineField, FieldType } from 'twenty-sdk';
import { EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/objects/example-object';
export default defineField({
objectUniversalIdentifier: EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER,
universalIdentifier: '${universalIdentifier}',
type: FieldType.NUMBER,
name: 'priority',
label: 'Priority',
description: 'Priority level for the example item (1-10)',
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createExampleView = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const universalIdentifier = v4();
const content = `import { defineView } from 'twenty-sdk';
import { EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/objects/example-object';
export default defineView({
universalIdentifier: '${universalIdentifier}',
name: 'example-view',
objectUniversalIdentifier: EXAMPLE_OBJECT_UNIVERSAL_IDENTIFIER,
icon: 'IconList',
position: 0,
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createExampleNavigationMenuItem = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const universalIdentifier = v4();
const content = `import { defineNavigationMenuItem } from 'twenty-sdk';
export default defineNavigationMenuItem({
universalIdentifier: '${universalIdentifier}',
name: 'example-navigation-menu-item',
icon: 'IconList',
position: 0,
// Link to a view:
// viewUniversalIdentifier: '...',
// Or link to an object:
// targetObjectUniversalIdentifier: '...',
// Or link to an external URL:
// link: 'https://example.com',
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createExampleSkill = async ({
appDirectory,
fileFolder,
fileName,
}: {
appDirectory: string;
fileFolder?: string;
fileName: string;
}) => {
const universalIdentifier = v4();
const content = `import { defineSkill } from 'twenty-sdk';
export const EXAMPLE_SKILL_UNIVERSAL_IDENTIFIER =
'${universalIdentifier}';
export default defineSkill({
universalIdentifier: EXAMPLE_SKILL_UNIVERSAL_IDENTIFIER,
name: 'example-skill',
label: 'Example Skill',
description: 'A sample skill for your application',
icon: 'IconBrain',
content: 'Add your skill instructions here. Skills provide context and capabilities to AI agents.',
});
`;
await fs.ensureDir(join(appDirectory, fileFolder ?? ''));
await fs.writeFile(join(appDirectory, fileFolder ?? '', fileName), content);
};
const createApplicationConfig = async ({
displayName,
description,
@@ -230,12 +477,14 @@ const createApplicationConfig = async ({
}) => {
const content = `import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '${v4()}',
displayName: '${displayName}',
description: '${description ?? ''}',
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
`;
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn
# codegen
generated
# testing
/coverage
# dev
/dist/
.twenty/*
!.twenty/output/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
# typescript
*.tsbuildinfo
@@ -0,0 +1 @@
24.5.0
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
{
"name": "twentyfortwenty",
"version": "0.1.0",
"license": "MIT",
"engines": {
"node": "^24.5.0",
"npm": "please-use-yarn",
"yarn": ">=4.0.2"
},
"packageManager": "[email protected]",
"scripts": {
"twenty": "twenty",
"lint": "eslint",
"lint:fix": "eslint --fix"
},
"dependencies": {
"twenty-sdk": "latest",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^24.7.2",
"@types/react": "^18.2.0",
"eslint": "^9.32.0",
"react": "^18.2.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0"
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
nodeLinker: node-modules
@@ -0,0 +1,9 @@
## Base documentation
- Documentation: https://docs.twenty.com/developers/extend/capabilities/apps
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-sdk/src/cli/__tests__/apps/rich-app
## Common Pitfalls
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
@@ -0,0 +1,51 @@
This is a [Twenty](https://twenty.com) application project bootstrapped with [`create-twenty-app`](https://www.npmjs.com/package/create-twenty-app).
## Getting Started
First, authenticate to your workspace:
```bash
yarn twenty auth:login
```
Then, start development mode to sync your app and watch for changes:
```bash
yarn twenty app:dev
```
Open your Twenty instance and go to `/settings/applications` section to see the result.
## Available Commands
Run `yarn twenty help` to list all available commands. Common commands:
```bash
# Authentication
yarn twenty auth:login # Authenticate with Twenty
yarn twenty auth:logout # Remove credentials
yarn twenty auth:status # Check auth status
yarn twenty auth:switch # Switch default workspace
yarn twenty auth:list # List all configured workspaces
# Application
yarn twenty app:dev # Start dev mode (watch, build, sync, and auto-generate typed client)
yarn twenty entity:add # Add a new entity (object, field, function, front-component, role, view, navigation-menu-item)
yarn twenty function:logs # Stream function logs
yarn twenty function:execute # Execute a function with JSON payload
yarn twenty app:uninstall # Uninstall app from workspace
```
## LLMs instructions
Main docs and pitfalls are available in LLMS.md file.
## Learn More
To learn more about Twenty applications, take a look at the following resources:
- [twenty-sdk](https://www.npmjs.com/package/twenty-sdk) - learn about `twenty-sdk` tool.
- [Twenty doc](https://docs.twenty.com/) - Twenty's documentation.
- Join our [Discord](https://discord.gg/cx5n4Jzs57)
You can check out [the Twenty GitHub repository](https://github.com/twentyhq/twenty) - your feedback and contributions are welcome!
@@ -0,0 +1,29 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
// Base JS recommended rules
js.configs.recommended,
// TypeScript recommended rules
...tseslint.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
// Common TypeScript-friendly tweaks
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off', // handled by TS rule
},
},
];
@@ -0,0 +1,28 @@
{
"name": "twentyfortwenty",
"version": "0.1.0",
"license": "MIT",
"engines": {
"node": "^24.5.0",
"npm": "please-use-yarn",
"yarn": ">=4.0.2"
},
"packageManager": "[email protected]",
"scripts": {
"twenty": "twenty",
"lint": "eslint",
"lint:fix": "eslint --fix"
},
"dependencies": {
"twenty-sdk": "latest",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^24.7.2",
"@types/react": "^18.2.0",
"eslint": "^9.32.0",
"react": "^18.2.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0"
}
}
@@ -0,0 +1,31 @@
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { defineApplication } from 'twenty-sdk';
export default defineApplication({
universalIdentifier: '0fac8de4-9d11-492b-9e6a-577e11e1c442',
displayName: 'Twenty for Twenty',
description: '',
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
applicationVariables: {
CLICKHOUSE_URL: {
universalIdentifier: 'b204304f-d3d3-4ae2-aafa-24b21c159181',
description: 'The URL of the ClickHouse server, including the protocol and port (e.g., http://localhost:8123)',
isSecret: true,
},
CLICKHOUSE_USERNAME: {
universalIdentifier: '711e8ea8-8b19-4cf0-82ab-ab44417312bd',
description: 'The username for authenticating with the ClickHouse server',
isSecret: true,
},
CLICKHOUSE_PASSWORD: {
universalIdentifier: 'faba7ed7-9f94-4202-944b-c25c683e9504',
description: 'The password for authenticating with the ClickHouse server',
isSecret: true,
},
CLICKHOUSE_DATABASE: {
universalIdentifier: '3e6698fa-0c00-49e5-9c4d-34d5b177bff3',
description: 'The name of the ClickHouse database to connect to',
isSecret: true,
},
},
});
@@ -0,0 +1,37 @@
// Field metadata identifiers for cloudUser2 object
// These constants are used by both the object definition and views
export const CLOUD_USER_2_ACTIVITY_STATUS_FIELD_ID =
'56e3d6ce-d57e-4ded-830f-958eb18d4d36';
export const CLOUD_USER_2_AVG_DAILY_PAGEVIEWS_LAST_30D_FIELD_ID =
'1f7062c1-0e96-4599-a59c-6d7427794bb1';
export const CLOUD_USER_2_DATA_LAST_UPDATED_AT_FIELD_ID =
'e134ce6b-5ab0-4e9c-ba32-36d0851aca21';
export const CLOUD_USER_2_DAYS_SINCE_LAST_ACTIVITY_FIELD_ID =
'f305d341-7b12-4939-9299-e5e1b6d1591e';
export const CLOUD_USER_2_EMAIL_FIELD_ID =
'ee110a77-34d7-4c8b-bc10-8560b9e2333a';
export const CLOUD_USER_2_FULL_NAME_FIELD_ID =
'3c9540be-6e42-40f2-8598-973117bbe105';
export const CLOUD_USER_2_IS_ACTIVE_L24H_FIELD_ID =
'efaa6e54-8019-454c-a556-2e340f0b156d';
export const CLOUD_USER_2_IS_ACTIVE_L30D_FIELD_ID =
'86a07ca4-420e-4c82-82f8-8f8dfbfc2dc4';
export const CLOUD_USER_2_IS_ACTIVE_L7D_FIELD_ID =
'87bf8c09-1863-4c65-811f-6fb54a87238e';
export const CLOUD_USER_2_IS_TWENTY_FIELD_ID =
'f6dcd9f3-3f7e-4aea-84a5-41282a68910d';
export const CLOUD_USER_2_LAST_ACTIVITY_DATE_FIELD_ID =
'643ab4a2-b6f2-4d11-9173-6859884b8781';
export const CLOUD_USER_2_PAGE_VIEWS_L24H_FIELD_ID =
'294e95cb-13b3-4163-95f8-e4f31837cb47';
export const CLOUD_USER_2_PAGE_VIEWS_L30D_FIELD_ID =
'8dacb4f1-b4ef-42d6-a917-17c78d6273a7';
export const CLOUD_USER_2_PAGE_VIEWS_L7D_FIELD_ID =
'c7741332-d9b6-42ed-84e2-8afa184b58f3';
export const CLOUD_USER_2_UPDATED_BY_FIELD_ID =
'639c9a30-2926-44c3-ab44-100dbda91c64';
export const CLOUD_USER_2_USER_TENURE_FIELD_ID =
'0cc9ca63-c06f-4422-9325-5e99f98d05ed';
export const CLOUD_USER_2_WORKSPACE_COUNT_FIELD_ID =
'5af6ae62-b741-471b-90bb-7fb6678fc8c9';
@@ -0,0 +1,25 @@
import { defineField, FieldType, OnDeleteAction, RelationType } from 'twenty-sdk';
import {
CLOUD_USER_ON_CLOUD_USER_WORKSPACE_ID,
CLOUD_USER_WORKSPACES_ON_CLOUD_USER_ID,
} from 'src/fields/cloud-user-workspaces-on-cloud-user.field';
import { CLOUD_USER_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-2';
import { CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-workspace-2';
export default defineField({
universalIdentifier: CLOUD_USER_ON_CLOUD_USER_WORKSPACE_ID,
objectUniversalIdentifier: CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
type: FieldType.RELATION,
name: 'cloudUser2',
label: 'Cloud User 2',
relationTargetObjectMetadataUniversalIdentifier:
CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
relationTargetFieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACES_ON_CLOUD_USER_ID,
universalSettings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: OnDeleteAction.CASCADE,
joinColumnName: 'cloudUser2Id',
},
});
@@ -0,0 +1,11 @@
// Field metadata identifiers for cloudUserWorkspace2 object
// These constants are used by both the object definition and views
export const CLOUD_USER_WORKSPACE_2_TWENTY_USER_IDENTIFIER_FIELD_ID =
'ad149693-0df5-4346-90ff-39e6d945b90f';
export const CLOUD_USER_WORKSPACE_2_TWENTY_WORKSPACE_IDENTIFIER_FIELD_ID =
'c5d02b59-ebaf-4604-809c-ce3f6e50dedc';
export const CLOUD_USER_WORKSPACE_2_ID_OF_THE_USER_WORKSPACE_FIELD_ID =
'6a0f8018-be3c-49b0-bb91-8d3e6b44adec';
export const CLOUD_USER_WORKSPACE_2_UPDATED_BY_FIELD_ID =
'29d47f11-1e45-4c67-b495-fcfa45bb67e2';
@@ -0,0 +1,24 @@
import { defineField, FieldType, RelationType } from 'twenty-sdk';
import { CLOUD_USER_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-2';
import { CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-workspace-2';
export const CLOUD_USER_WORKSPACES_ON_CLOUD_USER_ID =
'2290d722-d4b1-47ab-a895-4e2c3163a541';
export const CLOUD_USER_ON_CLOUD_USER_WORKSPACE_ID =
'49b08cf9-15e1-4583-826f-943fe3c6b0e8';
export default defineField({
universalIdentifier: CLOUD_USER_WORKSPACES_ON_CLOUD_USER_ID,
objectUniversalIdentifier: CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
type: FieldType.RELATION,
name: 'cloudUserWorkspaces2',
label: 'Cloud User Workspaces 2',
relationTargetObjectMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
relationTargetFieldMetadataUniversalIdentifier:
CLOUD_USER_ON_CLOUD_USER_WORKSPACE_ID,
universalSettings: {
relationType: RelationType.ONE_TO_MANY,
},
});
@@ -0,0 +1,24 @@
import { defineField, FieldType, RelationType } from 'twenty-sdk';
import { CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-workspace-2';
import { CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-workspace-2';
export const CLOUD_USER_WORKSPACES_ON_CLOUD_WORKSPACE_ID =
'90d9dfc7-7058-4d1c-aac2-1505bd7cb827';
export const CLOUD_WORKSPACE_ON_CLOUD_USER_WORKSPACE_ID =
'7bcd2dda-d1f8-4aa7-a83f-6cf240be80b2';
export default defineField({
universalIdentifier: CLOUD_USER_WORKSPACES_ON_CLOUD_WORKSPACE_ID,
objectUniversalIdentifier: CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
type: FieldType.RELATION,
name: 'cloudUserWorkspaces2',
label: 'Cloud User Workspaces 2',
relationTargetObjectMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
relationTargetFieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_ON_CLOUD_USER_WORKSPACE_ID,
universalSettings: {
relationType: RelationType.ONE_TO_MANY,
},
});
@@ -0,0 +1,28 @@
import {
defineField,
FieldType,
RelationType,
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
} from 'twenty-sdk';
import { CLOUD_USER_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-2';
export const CLOUD_USERS_2_ON_PERSON_ID =
'f238e91c-11d8-4a27-a39b-c9fa3515d4a0';
export const PERSON_ON_CLOUD_USER_2_ID =
'08d3aff0-7548-4a99-a097-20a0ad2c9ee7';
export default defineField({
universalIdentifier: CLOUD_USERS_2_ON_PERSON_ID,
objectUniversalIdentifier:
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,
type: FieldType.RELATION,
name: 'cloudUsers2',
label: 'Cloud Users 2',
relationTargetObjectMetadataUniversalIdentifier:
CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
relationTargetFieldMetadataUniversalIdentifier: PERSON_ON_CLOUD_USER_2_ID,
universalSettings: {
relationType: RelationType.ONE_TO_MANY,
},
});
@@ -0,0 +1,83 @@
// Field metadata identifiers for cloudWorkspace2 object
// These constants are used by both the object definition and views
export const CLOUD_WORKSPACE_2_CUSTOM_DOMAIN_FIELD_ID =
'c30799d5-adc0-49be-82a1-6d41b5aa9e82';
export const CLOUD_WORKSPACE_2_WORKSPACE_BUSINESS_DOMAIN_FIELD_ID =
'bfa2f91d-1c6c-48de-bb11-ac2a1e2545a9';
export const CLOUD_WORKSPACE_2_COMPANY_LINKEDIN_FIELD_ID =
'f9f2ef3a-8235-4d21-9a45-d29cc2124456';
export const CLOUD_WORKSPACE_2_DATA_LAST_UPDATED_AT_FIELD_ID =
'fbeaab89-77e0-4e13-97ed-caeb757a38c7';
export const CLOUD_WORKSPACE_2_LAST_PAGE_VIEW_DATE_FIELD_ID =
'7d3d4ba3-5af2-4248-afc7-7f4ce7c82805';
export const CLOUD_WORKSPACE_2_TOTAL_EVER_ACTIVE_WORKSPACE_USERS_FIELD_ID =
'56e99339-dcc4-4950-ae64-1b6ae326af2c';
export const CLOUD_WORKSPACE_2_ACTIVE_USERS_L30D_FIELD_ID =
'e9c703e6-9ffc-497d-9755-018724ac8d66';
export const CLOUD_WORKSPACE_2_ACTIVE_USERS_L7D_FIELD_ID =
'81d8f622-2366-481f-b0e8-b14fb7efa4d5';
export const CLOUD_WORKSPACE_2_ACTIVE_USERS_L24H_FIELD_ID =
'3e53d606-1afa-4d49-be62-52f4bb1cb49e';
export const CLOUD_WORKSPACE_2_WORKSPACE_TENURE_FIELD_ID =
'3fdd272c-73dd-432e-99c7-782f237a7cd8';
export const CLOUD_WORKSPACE_2_PAGE_VIEWS_L30D_FIELD_ID =
'1931f3cd-a984-41e3-b8f5-510f67b508e6';
export const CLOUD_WORKSPACE_2_PAGE_VIEWS_L7D_FIELD_ID =
'1f6a0ef6-3faf-4157-88a7-f624b7655c6b';
export const CLOUD_WORKSPACE_2_PAGE_VIEWS_L24H_FIELD_ID =
'ab0f46aa-9fef-40c6-a229-6ed4e05867d4';
export const CLOUD_WORKSPACE_2_TOTAL_WORKSPACE_USERS_FIELD_ID =
'38095859-2efb-4f40-86a1-aa883fd88e3d';
export const CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_L30D_FIELD_ID =
'4ebd8329-a18c-4606-9ee0-f32fb1c4aa6f';
export const CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_TOTAL_FIELD_ID =
'754f137f-b759-47da-8b57-7de71ad34d37';
export const CLOUD_WORKSPACE_2_ALEXA_RANK_FIELD_ID =
'1627e6b8-e87a-4048-b954-8d2fe09b67c8';
export const CLOUD_WORKSPACE_2_EMPLOYEES_FIELD_ID =
'1d8bb210-b50d-4b38-a611-d78ba865cbae';
export const CLOUD_WORKSPACE_2_IS_ACTIVE_L7D_FIELD_ID =
'42879662-d4fc-4806-bcfb-fdb586827491';
export const CLOUD_WORKSPACE_2_IS_ACTIVE_L24H_FIELD_ID =
'44b2c12f-aedd-459a-848a-ade9fc4620b7';
export const CLOUD_WORKSPACE_2_IS_ACTIVE_L30D_FIELD_ID =
'cac2d3e0-c2ee-4e22-bd96-4fa051a36f73';
export const CLOUD_WORKSPACE_2_IS_ENRICHED_FIELD_ID =
'45cbddfa-54cc-4d94-88d2-db7a7a550414';
export const CLOUD_WORKSPACE_2_INDUSTRY_FIELD_ID =
'a6686308-dfcf-4abb-be0f-e8f48cc579d9';
export const CLOUD_WORKSPACE_2_COMPANY_FOUNDED_YEAR_FIELD_ID =
'0432af7e-7575-486e-a022-f4a625a8ac14';
export const CLOUD_WORKSPACE_2_DESCRIPTION_FIELD_ID =
'40854f41-4175-4b14-9567-c6bfb3f5d441';
export const CLOUD_WORKSPACE_2_LATEST_FUNDING_STAGE_FIELD_ID =
'44aba339-be2e-4364-a894-cf730081c8a6';
export const CLOUD_WORKSPACE_2_COMPANY_NAME_FIELD_ID =
'f11ddfc2-3356-453a-a6e1-494b6c6b12f6';
export const CLOUD_WORKSPACE_2_SUB_DOMAIN_FIELD_ID =
'8fb18f52-44e9-4288-87c1-9650222efb05';
export const CLOUD_WORKSPACE_2_ANNUAL_REVENUE_FIELD_ID =
'8f5dfc54-213b-43b2-a502-631f0f3240d1';
export const CLOUD_WORKSPACE_2_MRR_FIELD_ID =
'67125b6c-ff41-459f-8153-a338ed11c4f0';
export const CLOUD_WORKSPACE_2_POTENTIAL_ARR_FIELD_ID =
'0c38b297-0e9d-47cc-8f8f-a0e5402413ce';
export const CLOUD_WORKSPACE_2_ARR_FIELD_ID =
'f932f94b-c48b-4ef3-9eea-0c8dad370d89';
export const CLOUD_WORKSPACE_2_TOTAL_FUNDING_FIELD_ID =
'ae5da0c9-e9ac-401b-ad48-c37a31c6ecd1';
export const CLOUD_WORKSPACE_2_ACTIVATION_STATUS_FIELD_ID =
'ef44daa9-d272-4680-a19c-caf2bac32b70';
export const CLOUD_WORKSPACE_2_SUBSCRIPTION_STATUS_FIELD_ID =
'a88e8cab-333f-44a3-980e-f2cc22871aee';
export const CLOUD_WORKSPACE_2_PAYMENT_FREQUENCY_FIELD_ID =
'fccc73da-2b6e-434b-921b-e3bcbab1c56c';
export const CLOUD_WORKSPACE_2_NEXT_RENEWAL_DATE_FIELD_ID =
'488b38b4-971e-4c33-b60d-7e7934911579';
export const CLOUD_WORKSPACE_2_CREATOR_EMAIL_FIELD_ID =
'3815b992-a919-4c52-8629-b4b5f89a6060';
export const CLOUD_WORKSPACE_2_TAGS_FIELD_ID =
'0f41485f-4868-4bd6-8d76-709a6b7a54e3';
export const CLOUD_WORKSPACE_2_UPDATED_BY_FIELD_ID =
'252cdff1-facb-4f66-8608-6138a585d099';
@@ -0,0 +1,25 @@
import { defineField, FieldType, OnDeleteAction, RelationType } from 'twenty-sdk';
import {
CLOUD_USER_WORKSPACES_ON_CLOUD_WORKSPACE_ID,
CLOUD_WORKSPACE_ON_CLOUD_USER_WORKSPACE_ID,
} from 'src/fields/cloud-user-workspaces-on-cloud-workspace.field';
import { CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-workspace-2';
import { CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-workspace-2';
export default defineField({
universalIdentifier: CLOUD_WORKSPACE_ON_CLOUD_USER_WORKSPACE_ID,
objectUniversalIdentifier: CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
type: FieldType.RELATION,
name: 'cloudWorkspace2',
label: 'Cloud Workspace 2',
relationTargetObjectMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
relationTargetFieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACES_ON_CLOUD_WORKSPACE_ID,
universalSettings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: OnDeleteAction.CASCADE,
joinColumnName: 'cloudWorkspace2Id',
},
});
@@ -0,0 +1,29 @@
import {
defineField,
FieldType,
OnDeleteAction,
RelationType,
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
} from 'twenty-sdk';
import {
CLOUD_USERS_2_ON_PERSON_ID,
PERSON_ON_CLOUD_USER_2_ID,
} from 'src/fields/cloud-users-2-on-person.field';
import { CLOUD_USER_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-2';
export default defineField({
universalIdentifier: PERSON_ON_CLOUD_USER_2_ID,
objectUniversalIdentifier: CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
type: FieldType.RELATION,
name: 'person',
label: 'Person',
relationTargetObjectMetadataUniversalIdentifier:
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,
relationTargetFieldMetadataUniversalIdentifier: CLOUD_USERS_2_ON_PERSON_ID,
universalSettings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: OnDeleteAction.SET_NULL,
joinColumnName: 'personId',
},
});
@@ -0,0 +1,49 @@
import { defineLogicFunction } from 'twenty-sdk';
import { syncCloudUserWorkspaces } from 'src/logic-functions/sync-product-data/sync-cloud-user-workspaces';
import { syncCloudUsers } from 'src/logic-functions/sync-product-data/sync-cloud-users';
import { syncCloudWorkspaces } from 'src/logic-functions/sync-product-data/sync-cloud-workspaces';
const handler = async (): Promise<{ message: string }> => {
try {
console.log('Starting product data sync');
const cloudUsersResult = await syncCloudUsers();
console.log(
`Cloud users sync complete: ${cloudUsersResult.syncedCount} users`,
);
const cloudWorkspacesResult = await syncCloudWorkspaces();
console.log(
`Cloud workspaces sync complete: ${cloudWorkspacesResult.syncedCount} workspaces`,
);
const cloudUserWorkspacesResult = await syncCloudUserWorkspaces();
console.log(
`Cloud user workspaces sync complete: ${cloudUserWorkspacesResult.syncedCount} user workspaces`,
);
return {
message: `Product data sync complete — ${cloudUsersResult.syncedCount} users, ${cloudWorkspacesResult.syncedCount} workspaces, ${cloudUserWorkspacesResult.syncedCount} user workspaces`,
};
} catch (err) {
console.log(err);
throw err;
}
};
export default defineLogicFunction({
universalIdentifier: '3897e059-715e-4a4b-b165-c44f17d2e30a',
name: 'sync-product-data',
description:
'Syncs cloud users, cloud workspaces, and cloud user workspaces from ClickHouse',
timeoutSeconds: 120,
handler,
cronTriggerSettings: {
pattern: '*/10 * * * *',
},
});
@@ -0,0 +1,93 @@
import { z } from 'zod';
import { getApplicationConfig } from 'src/shared/application-config';
import { fetchFromClickHouse } from 'src/shared/clickhouse-client';
import { twentyClient } from 'src/shared/twenty-client';
const clickHouseUserWorkspaceSchema = z.object({
id: z.string(),
workspaceId: z.string(),
userId: z.string(),
createdAt: z.string(),
updatedAt: z.string(),
deletedAt: z.string(),
is_active_membership: z.coerce.boolean(),
});
type ClickHouseUserWorkspace = z.infer<typeof clickHouseUserWorkspaceSchema>;
const fetchUserWorkspacesFromClickHouse = async (): Promise<
ClickHouseUserWorkspace[]
> => {
const { clickHouseDatabase } = getApplicationConfig();
// const nowDate = 'now()'
const nowDate = "'2026-02-04 14:28:52.000'";
const query = `
SELECT
*
FROM (
SELECT
*,
row_number() OVER (PARTITION BY id ORDER BY updatedAt DESC) AS rn
FROM
${clickHouseDatabase}.user_workspace
WHERE
updatedAt >= ${nowDate} - INTERVAL 500 MINUTE
AND
updatedAt <= ${nowDate}
)
WHERE
rn = 1
FORMAT
JSONEachRow;
`;
return fetchFromClickHouse(query, clickHouseUserWorkspaceSchema);
};
const buildCloudUserWorkspaceInput = (
userWorkspace: ClickHouseUserWorkspace,
) => ({
id: userWorkspace.id,
twentyUserIdentifier: userWorkspace.userId,
twentyWorkspaceIdentifier: userWorkspace.workspaceId,
idOfTheUserWorkspace: userWorkspace.id,
cloudUser2Id: userWorkspace.userId,
cloudWorkspace2Id: userWorkspace.workspaceId,
});
export const syncCloudUserWorkspaces = async (): Promise<{
syncedCount: number;
}> => {
const userWorkspaces = await fetchUserWorkspacesFromClickHouse();
console.log(
`Fetched ${userWorkspaces.length} user workspaces from ClickHouse`,
);
if (userWorkspaces.length === 0) {
return { syncedCount: 0 };
}
const cloudUserWorkspaceInputs = userWorkspaces.map(
buildCloudUserWorkspaceInput,
);
console.log(
`Batch-upserting ${cloudUserWorkspaceInputs.length} cloud user workspaces`,
);
await twentyClient.mutation({
createCloudUserWorkspaces2: {
__args: {
data: cloudUserWorkspaceInputs,
upsert: true,
},
__scalar: true,
},
});
return { syncedCount: userWorkspaces.length };
};
@@ -0,0 +1,268 @@
import { enumCloudUser2ActivityStatusEnum } from 'twenty-sdk/generated';
import { z } from 'zod';
import { getApplicationConfig } from 'src/shared/application-config';
import { fetchFromClickHouse } from 'src/shared/clickhouse-client';
import { clickHouseDateToIso } from 'src/shared/clickhouse-date-to-iso';
import { twentyClient } from 'src/shared/twenty-client';
const clickHouseUserSchema = z.object({
userId: z.uuid(),
firstName: z.string(),
lastName: z.string(),
email: z.email(),
fullName: z.string(),
isEmailVerified: z.boolean(),
disabled: z.boolean(),
canImpersonate: z.boolean(),
canAccessFullAdminPanel: z.boolean(),
createdAt: z.string(),
updatedAt: z.string(),
deletedAt: z.string(),
locale: z.string(),
createdDate: z.string(),
workspaceCount: z.coerce.number(),
workspaceIds: z.string(),
workspaceDomains: z.string(),
firstActivityDate: z.string(),
lastActivityDate: z.string(),
lastWorkspaceId: z.string(),
totalPageviews: z.coerce.number(),
pageviewsLast30d: z.coerce.number(),
pageviewsLast7d: z.coerce.number(),
pageviewsLast24h: z.coerce.number(),
userAgeDays: z.coerce.number(),
daysSinceLastActivity: z.coerce.number(),
isActiveLast30d: z.boolean(),
isActiveLast7d: z.boolean(),
isActiveLast24h: z.boolean(),
activityStatus: z
.string()
.transform((val) => val.toUpperCase())
.pipe(z.enum(enumCloudUser2ActivityStatusEnum)),
avgDailyPageviewsLast30d: z.coerce.number(),
isTwenty: z.coerce.boolean(),
maxWorkspaceMembers: z.coerce.number(),
inTrial: z.boolean(),
});
type ClickHouseUser = z.infer<typeof clickHouseUserSchema>;
const fetchUsersFromClickHouse = async (): Promise<ClickHouseUser[]> => {
const { clickHouseDatabase } = getApplicationConfig();
// const nowDate = 'now()'
const nowDate = "'2026-02-04 14:28:52.000'";
const query = `
SELECT
*
FROM
${clickHouseDatabase}.user
WHERE
lastActivityDate >= ${nowDate} - INTERVAL 500 MINUTE
AND
lastActivityDate <= ${nowDate}
FORMAT
JSONEachRow;
`;
return fetchFromClickHouse(query, clickHouseUserSchema);
};
const fetchAllPeopleFromTwentyByEmail = async (emails: string[]) => {
if (emails.length === 0) {
return [];
}
const allPeople = await twentyClient.query({
people: {
edges: {
node: {
id: true,
emails: {
primaryEmail: true,
},
},
},
__args: {
filter: {
emails: {
primaryEmail: {
in: emails,
},
},
},
},
},
});
return allPeople.people?.edges.map((edge) => edge.node) ?? [];
};
const buildCloudUserInput = ({
user,
personId,
}: {
user: ClickHouseUser;
personId: string;
}) => ({
id: user.userId,
name: user.fullName,
email: {
primaryEmail: user.email,
},
personId,
fullName: {
lastName: user.lastName,
firstName: user.firstName,
},
isTwenty: user.isTwenty,
userTenure: user.userAgeDays,
isActiveL7d: user.isActiveLast7d,
isActiveL24h: user.isActiveLast24h,
isActiveL30d: user.isActiveLast30d,
pageViewsL7d: user.pageviewsLast7d,
pageViewsL24h: user.pageviewsLast24h,
pageViewsL30d: user.pageviewsLast30d,
activityStatus: user.activityStatus,
workspaceCount: user.workspaceCount,
lastActivityDate: clickHouseDateToIso(user.lastActivityDate),
dataLastUpdatedAt: new Date().toISOString(),
avgDailyPageviewsLast30d: user.avgDailyPageviewsLast30d,
daysSinceLastActivity: user.daysSinceLastActivity,
});
export const syncCloudUsers = async (): Promise<{
syncedCount: number;
}> => {
const users = await fetchUsersFromClickHouse();
console.log('Fetched users from ClickHouse', users);
const emails = users.map((user) => user.email);
console.log('Fetching people from Twenty with emails', emails);
const people = await fetchAllPeopleFromTwentyByEmail(emails);
console.log('Fetched people from Twenty', people);
// Build a map of email -> personId from existing people
const emailToPersonId = new Map<string, string>();
for (const person of people) {
if (person.emails?.primaryEmail !== undefined) {
emailToPersonId.set(person.emails.primaryEmail.toLowerCase(), person.id);
}
}
// Partition users into those with/without an existing person
const usersWithoutPerson = users.filter(
(user) => !emailToPersonId.has(user.email.toLowerCase()),
);
// Step 1: Batch-create missing people
const newlyCreatedPersonIds: string[] = [];
if (usersWithoutPerson.length > 0) {
console.log(`Batch-creating ${usersWithoutPerson.length} people records`);
const createPeopleResult = await twentyClient.mutation({
createPeople: {
__args: {
data: usersWithoutPerson.map((user) => ({
name: {
firstName: user.firstName,
lastName: user.lastName,
},
emails: {
primaryEmail: user.email,
},
})),
},
id: true,
emails: {
primaryEmail: true,
},
},
});
const createdPeople = createPeopleResult.createPeople ?? [];
for (const person of createdPeople) {
if (
person.emails?.primaryEmail === undefined ||
person.id === undefined
) {
continue;
}
newlyCreatedPersonIds.push(person.id);
emailToPersonId.set(person.emails.primaryEmail.toLowerCase(), person.id);
}
}
// Step 2: Batch-upsert all cloud users, with rollback on failure
const cloudUserInputs = users.map((user) => {
const personId = emailToPersonId.get(user.email.toLowerCase());
if (personId === undefined) {
throw new Error(
`No personId found for user ${user.email} — this should not happen`,
);
}
return buildCloudUserInput({ user, personId });
});
try {
console.log(`Batch-upserting ${cloudUserInputs.length} cloud users`);
await twentyClient.mutation({
createCloudUsers2: {
__args: {
data: cloudUserInputs,
upsert: true,
},
__scalar: true,
},
});
} catch (cloudUserError) {
console.log(
'Cloud user upsert failed, rolling back newly created people',
cloudUserError,
);
// Rollback: hard-delete people that were created in step 1
if (newlyCreatedPersonIds.length > 0) {
try {
await twentyClient.mutation({
destroyPeople: {
__args: {
filter: {
id: {
in: newlyCreatedPersonIds,
},
},
},
id: true,
},
});
console.log(
`Rolled back ${newlyCreatedPersonIds.length} newly created people`,
);
} catch (rollbackError) {
console.log(
'Rollback of newly created people also failed',
rollbackError,
);
}
}
throw cloudUserError;
}
return { syncedCount: users.length };
};
@@ -0,0 +1,201 @@
import {
enumCloudWorkspace2ActivationStatusEnum,
enumCloudWorkspace2PaymentFrequencyEnum,
enumCloudWorkspace2SubscriptionStatusEnum,
} from 'twenty-sdk/generated';
import { z } from 'zod';
import { getApplicationConfig } from 'src/shared/application-config';
import { fetchFromClickHouse } from 'src/shared/clickhouse-client';
import { clickHouseDateToIso } from 'src/shared/clickhouse-date-to-iso';
import { twentyClient } from 'src/shared/twenty-client';
const clickHouseWorkspaceSchema = z.object({
workspaceId: z.string(),
workspaceName: z.string(),
subdomain: z.string(),
customDomain: z.string(),
createdAt: z.string(),
updatedAt: z.string(),
deletedAt: z.string(),
activationStatus: z
.string()
.transform((val) => {
const upper = val.toUpperCase();
if (upper === '') return 'EMPTY';
const valid: string[] = Object.values(
enumCloudWorkspace2ActivationStatusEnum,
);
return valid.includes(upper) ? upper : 'EMPTY';
})
.pipe(z.enum(enumCloudWorkspace2ActivationStatusEnum)),
createdDate: z.string(),
lastPageviewDate: z.string(),
pageviewsLast30d: z.coerce.number(),
pageviewsLast7d: z.coerce.number(),
pageviewsLast24h: z.coerce.number(),
totalEverActiveUsers: z.coerce.number(),
totalWorkspaceUsers: z.coerce.number(),
activeUsersLast30d: z.coerce.number(),
activeUsersLast7d: z.coerce.number(),
activeUsersLast24h: z.coerce.number(),
isActiveLast30d: z.coerce.boolean(),
isActiveLast7d: z.coerce.boolean(),
isActiveLast24h: z.coerce.boolean(),
activeUserRatioLast30d: z.coerce.number(),
activeUserRatioLast7d: z.coerce.number(),
workspaceAgeDays: z.coerce.number(),
totalEvents: z.coerce.number(),
eventsLast30d: z.coerce.number(),
eventsPerUser: z.coerce.number(),
subscription_status: z
.string()
.transform((val) => {
const upper = val.toUpperCase();
if (upper === '') return 'EMPTY';
const valid: string[] = Object.values(
enumCloudWorkspace2SubscriptionStatusEnum,
);
return valid.includes(upper) ? upper : 'OTHER';
})
.pipe(z.enum(enumCloudWorkspace2SubscriptionStatusEnum)),
payment_frequency: z
.string()
.transform((val) => {
const upper = val.toUpperCase();
if (upper === '') return 'EMPTY';
const valid: string[] = Object.values(
enumCloudWorkspace2PaymentFrequencyEnum,
);
return valid.includes(upper) ? upper : 'OTHER';
})
.pipe(z.enum(enumCloudWorkspace2PaymentFrequencyEnum)),
trial_status: z.string(),
mrr: z.coerce.number(),
potential_arr: z.coerce.number(),
arr: z.coerce.number().nullable(),
next_renewal_date: z.string(),
workspace_domain: z.string(),
domain_source: z.string(),
creatorUserId: z.string(),
creatorEmail: z.string(),
creator_domain_type: z.string(),
primary_business_domain: z.string(),
business_domain_user_count: z.coerce.number(),
isTwenty: z.coerce.boolean(),
});
type ClickHouseWorkspace = z.infer<typeof clickHouseWorkspaceSchema>;
const fetchWorkspacesFromClickHouse =
async (): Promise<ClickHouseWorkspace[]> => {
const { clickHouseDatabase } = getApplicationConfig();
// const nowDate = 'now()'
const nowDate = "'2026-02-04 14:28:52.000'";
const query = `
SELECT
*
FROM (
SELECT
*,
row_number() OVER (PARTITION BY workspaceId ORDER BY updatedAt DESC) AS rn
FROM
${clickHouseDatabase}.workspace
WHERE
updatedAt >= ${nowDate} - INTERVAL 500 MINUTE
AND
updatedAt <= ${nowDate}
)
WHERE
rn = 1
FORMAT
JSONEachRow;
`;
return fetchFromClickHouse(query, clickHouseWorkspaceSchema);
};
// Convert a dollar amount to micros (1 USD = 1_000_000 micros).
const dollarsToAmountMicros = (dollars: number) =>
Math.round(dollars * 1_000_000);
const buildCloudWorkspaceInput = (workspace: ClickHouseWorkspace) => ({
id: workspace.workspaceId,
name: workspace.workspaceName,
subDomain: workspace.subdomain,
customDomain: {
primaryLinkUrl: workspace.customDomain,
primaryLinkLabel: '',
},
activationStatus: workspace.activationStatus,
subscriptionStatus: workspace.subscription_status,
paymentFrequency: workspace.payment_frequency,
lastPageViewDate: workspace.lastPageviewDate,
pageViewsL30D: workspace.pageviewsLast30d,
pageViewsL7D: workspace.pageviewsLast7d,
pageViewsL24H: workspace.pageviewsLast24h,
totalEverActiveWorkspaceUsers: workspace.totalEverActiveUsers,
totalWorkspaceUsers: workspace.totalWorkspaceUsers,
activeUsersL30D: workspace.activeUsersLast30d,
activeUsersL7D: workspace.activeUsersLast7d,
activeUsersL24H: workspace.activeUsersLast24h,
isActiveL30D: workspace.isActiveLast30d,
isActiveL7D: workspace.isActiveLast7d,
isActiveL24H: workspace.isActiveLast24h,
workspaceTenure: workspace.workspaceAgeDays,
numberOfEventsTotal: workspace.totalEvents,
numberOfEventsL30D: workspace.eventsLast30d,
mrr: {
amountMicros: dollarsToAmountMicros(workspace.mrr),
currencyCode: 'USD',
},
potentialArr: {
amountMicros: dollarsToAmountMicros(workspace.potential_arr),
currencyCode: 'USD',
},
arr: {
amountMicros: dollarsToAmountMicros(workspace.arr ?? 0),
currencyCode: 'USD',
},
nextRenewalDate: clickHouseDateToIso(workspace.next_renewal_date),
creatorEmail: {
primaryEmail: workspace.creatorEmail,
},
workspaceBusinessDomain: {
primaryLinkUrl: workspace.primary_business_domain,
primaryLinkLabel: '',
},
dataLastUpdatedAt: new Date().toISOString(),
});
export const syncCloudWorkspaces = async (): Promise<{
syncedCount: number;
}> => {
const workspaces = await fetchWorkspacesFromClickHouse();
console.log(`Fetched ${workspaces.length} workspaces from ClickHouse`);
if (workspaces.length === 0) {
return { syncedCount: 0 };
}
const cloudWorkspaceInputs = workspaces.map(buildCloudWorkspaceInput);
console.log(
`Batch-upserting ${cloudWorkspaceInputs.length} cloud workspaces`,
);
await twentyClient.mutation({
createCloudWorkspaces2: {
__args: {
data: cloudWorkspaceInputs,
upsert: true,
},
__scalar: true,
},
});
return { syncedCount: workspaces.length };
};
@@ -0,0 +1,11 @@
import { defineNavigationMenuItem } from 'twenty-sdk';
import { ALL_CLOUD_USER_2_VIEW_ID } from 'src/views/all-cloud-user-2';
export default defineNavigationMenuItem({
universalIdentifier: 'ac6df084-0f0f-404a-b3d1-b084cb624d76',
name: 'cloud-user-2',
icon: 'IconList',
position: 0,
viewUniversalIdentifier: ALL_CLOUD_USER_2_VIEW_ID,
});
@@ -0,0 +1,11 @@
import { defineNavigationMenuItem } from 'twenty-sdk';
import { ALL_CLOUD_USER_WORKSPACE_2_VIEW_ID } from 'src/views/all-cloud-user-workspace-2';
export default defineNavigationMenuItem({
universalIdentifier: 'e29251f0-78ad-493f-8f99-ec54ab0b5378',
name: 'cloud-user-workspace-2',
icon: 'IconList',
position: 0,
viewUniversalIdentifier: ALL_CLOUD_USER_WORKSPACE_2_VIEW_ID,
});
@@ -0,0 +1,11 @@
import { defineNavigationMenuItem } from 'twenty-sdk';
import { ALL_CLOUD_WORKSPACE_2_VIEW_ID } from 'src/views/all-cloud-workspace-2';
export default defineNavigationMenuItem({
universalIdentifier: '0ba6315e-0d79-47a5-8c05-29dec621a647',
name: 'cloud-workspace-2',
icon: 'IconList',
position: 0,
viewUniversalIdentifier: ALL_CLOUD_WORKSPACE_2_VIEW_ID,
});
@@ -0,0 +1,171 @@
import { defineObject, FieldType } from 'twenty-sdk';
import {
CLOUD_USER_2_ACTIVITY_STATUS_FIELD_ID,
CLOUD_USER_2_AVG_DAILY_PAGEVIEWS_LAST_30D_FIELD_ID,
CLOUD_USER_2_DATA_LAST_UPDATED_AT_FIELD_ID,
CLOUD_USER_2_DAYS_SINCE_LAST_ACTIVITY_FIELD_ID,
CLOUD_USER_2_EMAIL_FIELD_ID,
CLOUD_USER_2_FULL_NAME_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L24H_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L30D_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L7D_FIELD_ID,
CLOUD_USER_2_IS_TWENTY_FIELD_ID,
CLOUD_USER_2_LAST_ACTIVITY_DATE_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L24H_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L30D_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L7D_FIELD_ID,
CLOUD_USER_2_UPDATED_BY_FIELD_ID,
CLOUD_USER_2_USER_TENURE_FIELD_ID,
CLOUD_USER_2_WORKSPACE_COUNT_FIELD_ID,
} from 'src/fields/cloud-user-2-field-ids';
export const CLOUD_USER_2_UNIVERSAL_IDENTIFIER =
'da264c72-df22-49b3-98e3-21cf6013e671';
export default defineObject({
universalIdentifier: CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
nameSingular: 'cloudUser2',
namePlural: 'cloudUsers2',
labelSingular: 'Cloud user 2',
labelPlural: 'Cloud users 2',
icon: 'IconBox',
fields: [
{
universalIdentifier: CLOUD_USER_2_ACTIVITY_STATUS_FIELD_ID,
type: FieldType.SELECT,
name: 'activityStatus',
label: 'Activity Status',
options: [
{
id: '141d21f3-71b0-4b37-a3d2-5d91d43d0493',
value: 'ACTIVE',
label: 'Active',
position: 0,
color: 'green',
},
{
id: 'adb1d290-750f-468e-99ee-ed892bcb8974',
value: 'RECENT',
label: 'Recent',
position: 1,
color: 'blue',
},
{
id: '96f24b75-a671-4727-a78f-5a72419370ea',
value: 'DORMANT',
label: 'Dormant',
position: 2,
color: 'orange',
},
{
id: '88ddbef9-16a8-4643-9726-5b271cd477fa',
value: 'INACTIVE',
label: 'Inactive',
position: 3,
color: 'blue',
},
],
},
{
universalIdentifier: CLOUD_USER_2_AVG_DAILY_PAGEVIEWS_LAST_30D_FIELD_ID,
type: FieldType.NUMBER,
name: 'avgDailyPageviewsLast30d',
label: 'Avg Daily Page Views',
},
{
universalIdentifier: CLOUD_USER_2_DATA_LAST_UPDATED_AT_FIELD_ID,
type: FieldType.DATE_TIME,
name: 'dataLastUpdatedAt',
label: 'Data last updated at',
},
{
universalIdentifier: CLOUD_USER_2_DAYS_SINCE_LAST_ACTIVITY_FIELD_ID,
type: FieldType.NUMBER,
name: 'daysSinceLastActivity',
label: 'Days Since Last Activity',
},
{
universalIdentifier: CLOUD_USER_2_EMAIL_FIELD_ID,
type: FieldType.EMAILS,
name: 'email',
label: 'Email',
},
{
universalIdentifier: CLOUD_USER_2_FULL_NAME_FIELD_ID,
type: FieldType.FULL_NAME,
name: 'fullName',
label: 'Full Name',
},
{
universalIdentifier: CLOUD_USER_2_IS_ACTIVE_L24H_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL24h',
label: 'Is Active L24H',
defaultValue: true
},
{
universalIdentifier: CLOUD_USER_2_IS_ACTIVE_L30D_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL30d',
label: 'Is Active L30D',
defaultValue: false
},
{
universalIdentifier: CLOUD_USER_2_IS_ACTIVE_L7D_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL7d',
label: 'Is Active L7D',
defaultValue: true
},
{
universalIdentifier: CLOUD_USER_2_IS_TWENTY_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isTwenty',
label: 'Is Twenty',
defaultValue: false
},
{
universalIdentifier: CLOUD_USER_2_LAST_ACTIVITY_DATE_FIELD_ID,
type: FieldType.DATE_TIME,
name: 'lastActivityDate',
label: 'Last Activity Date',
},
{
universalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L24H_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL24h',
label: 'Page Views L24H',
},
{
universalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L30D_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL30d',
label: 'Page Views L30D',
},
{
universalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L7D_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL7d',
label: 'Page Views L7D',
},
{
universalIdentifier: CLOUD_USER_2_UPDATED_BY_FIELD_ID,
type: FieldType.ACTOR,
name: 'updatedBy',
label: 'Updated by',
},
{
universalIdentifier: CLOUD_USER_2_USER_TENURE_FIELD_ID,
type: FieldType.NUMBER,
name: 'userTenure',
label: 'User tenure',
},
{
universalIdentifier: CLOUD_USER_2_WORKSPACE_COUNT_FIELD_ID,
type: FieldType.NUMBER,
name: 'workspaceCount',
label: 'Workspace count',
},
],
});
@@ -0,0 +1,67 @@
import { defineObject, FieldType } from 'twenty-sdk';
import {
CLOUD_USER_WORKSPACE_2_ID_OF_THE_USER_WORKSPACE_FIELD_ID,
CLOUD_USER_WORKSPACE_2_TWENTY_USER_IDENTIFIER_FIELD_ID,
CLOUD_USER_WORKSPACE_2_TWENTY_WORKSPACE_IDENTIFIER_FIELD_ID,
CLOUD_USER_WORKSPACE_2_UPDATED_BY_FIELD_ID,
} from 'src/fields/cloud-user-workspace-2-field-ids';
export const CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER =
'14d6e1f4-c513-4766-9210-bc5dc8294e51';
export default defineObject({
universalIdentifier: CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
nameSingular: 'cloudUserWorkspace2',
namePlural: 'cloudUserWorkspaces2',
labelSingular: 'Cloud user workspace 2',
labelPlural: 'Cloud user workspaces 2',
icon: 'IconBox',
fields: [
{
universalIdentifier: CLOUD_USER_WORKSPACE_2_TWENTY_USER_IDENTIFIER_FIELD_ID,
type: FieldType.TEXT,
name: 'twentyUserIdentifier',
label: 'Twenty User Identifier',
icon: 'IconMan',
isNullable: true,
defaultValue: null,
universalSettings: {
displayedMaxRows: 0,
},
},
{
universalIdentifier: CLOUD_USER_WORKSPACE_2_TWENTY_WORKSPACE_IDENTIFIER_FIELD_ID,
type: FieldType.TEXT,
name: 'twentyWorkspaceIdentifier',
label: 'Twenty Workspace Identifier',
icon: 'IconScreenShare',
isNullable: true,
defaultValue: null,
universalSettings: {
displayedMaxRows: 0,
},
},
{
universalIdentifier: CLOUD_USER_WORKSPACE_2_ID_OF_THE_USER_WORKSPACE_FIELD_ID,
type: FieldType.TEXT,
name: 'idOfTheUserWorkspace',
label: 'Id of the user workspace',
icon: 'IconTypography',
isNullable: true,
defaultValue: null,
universalSettings: {
displayedMaxRows: 0,
},
},
{
universalIdentifier: CLOUD_USER_WORKSPACE_2_UPDATED_BY_FIELD_ID,
type: FieldType.ACTOR,
name: 'updatedBy',
label: 'Updated by',
description: 'The user who last updated the record',
icon: 'IconUserCircle',
isNullable: true,
},
],
});
@@ -0,0 +1,589 @@
import { defineObject, FieldType } from 'twenty-sdk';
import {
CLOUD_WORKSPACE_2_ACTIVATION_STATUS_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_ALEXA_RANK_FIELD_ID,
CLOUD_WORKSPACE_2_ANNUAL_REVENUE_FIELD_ID,
CLOUD_WORKSPACE_2_ARR_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_FOUNDED_YEAR_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_LINKEDIN_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_NAME_FIELD_ID,
CLOUD_WORKSPACE_2_CREATOR_EMAIL_FIELD_ID,
CLOUD_WORKSPACE_2_CUSTOM_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_DATA_LAST_UPDATED_AT_FIELD_ID,
CLOUD_WORKSPACE_2_DESCRIPTION_FIELD_ID,
CLOUD_WORKSPACE_2_EMPLOYEES_FIELD_ID,
CLOUD_WORKSPACE_2_INDUSTRY_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ENRICHED_FIELD_ID,
CLOUD_WORKSPACE_2_LAST_PAGE_VIEW_DATE_FIELD_ID,
CLOUD_WORKSPACE_2_LATEST_FUNDING_STAGE_FIELD_ID,
CLOUD_WORKSPACE_2_MRR_FIELD_ID,
CLOUD_WORKSPACE_2_NEXT_RENEWAL_DATE_FIELD_ID,
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_TOTAL_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_PAYMENT_FREQUENCY_FIELD_ID,
CLOUD_WORKSPACE_2_POTENTIAL_ARR_FIELD_ID,
CLOUD_WORKSPACE_2_SUB_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_SUBSCRIPTION_STATUS_FIELD_ID,
CLOUD_WORKSPACE_2_TAGS_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_EVER_ACTIVE_WORKSPACE_USERS_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_FUNDING_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_WORKSPACE_USERS_FIELD_ID,
CLOUD_WORKSPACE_2_UPDATED_BY_FIELD_ID,
CLOUD_WORKSPACE_2_WORKSPACE_BUSINESS_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_WORKSPACE_TENURE_FIELD_ID,
} from 'src/fields/cloud-workspace-2-field-ids';
export const CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER =
'77376ed3-19c1-4859-bde5-90f19ad02113';
export default defineObject({
universalIdentifier: CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
nameSingular: 'cloudWorkspace2',
namePlural: 'cloudWorkspaces2',
labelSingular: 'Cloud workspace 2',
labelPlural: 'Cloud workspaces 2',
icon: 'IconBox',
fields: [
{
universalIdentifier: CLOUD_WORKSPACE_2_CUSTOM_DOMAIN_FIELD_ID,
type: FieldType.LINKS,
name: 'customDomain',
label: 'Custom domain',
description: 'Custom domain set up by the customer to use their own.',
icon: 'IconLink',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_WORKSPACE_BUSINESS_DOMAIN_FIELD_ID,
type: FieldType.LINKS,
name: 'workspaceBusinessDomain',
label: 'Workspace Business Domain',
icon: 'IconLink',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_COMPANY_LINKEDIN_FIELD_ID,
type: FieldType.LINKS,
name: 'companyLinkedin',
label: 'Company LinkedIn',
icon: 'IconBrandLinkedin',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_DATA_LAST_UPDATED_AT_FIELD_ID,
type: FieldType.DATE,
name: 'dataLastUpdatedAt',
label: 'Data last updated at',
description: 'by workflow',
icon: 'IconCalendarEvent',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_LAST_PAGE_VIEW_DATE_FIELD_ID,
type: FieldType.DATE,
name: 'lastPageViewDate',
label: 'Last Page View Date',
icon: 'IconCalendarEvent',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_TOTAL_EVER_ACTIVE_WORKSPACE_USERS_FIELD_ID,
type: FieldType.NUMBER,
name: 'totalEverActiveWorkspaceUsers',
label: 'Total ever active workspace users',
icon: 'IconUsers',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ACTIVE_USERS_L30D_FIELD_ID,
type: FieldType.NUMBER,
name: 'activeUsersL30D',
label: 'Active Users L30D',
icon: 'IconUsersGroup',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ACTIVE_USERS_L7D_FIELD_ID,
type: FieldType.NUMBER,
name: 'activeUsersL7D',
label: 'Active Users L7D',
icon: 'IconUsersGroup',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ACTIVE_USERS_L24H_FIELD_ID,
type: FieldType.NUMBER,
name: 'activeUsersL24H',
label: 'Active Users L24H',
icon: 'IconUsersGroup',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_WORKSPACE_TENURE_FIELD_ID,
type: FieldType.NUMBER,
name: 'workspaceTenure',
label: 'Workspace tenure',
description: 'in days',
icon: 'IconCalendarHeart',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_PAGE_VIEWS_L30D_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL30D',
label: 'Page Views L30D',
icon: 'IconClick',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_PAGE_VIEWS_L7D_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL7D',
label: 'Page Views L7D',
icon: 'IconClick',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_PAGE_VIEWS_L24H_FIELD_ID,
type: FieldType.NUMBER,
name: 'pageViewsL24H',
label: 'Page Views L24H',
icon: 'IconClick',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_TOTAL_WORKSPACE_USERS_FIELD_ID,
type: FieldType.NUMBER,
name: 'totalWorkspaceUsers',
label: 'Total workspace users',
icon: 'IconUsers',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_L30D_FIELD_ID,
type: FieldType.NUMBER,
name: 'numberOfEventsL30D',
label: 'Number of events L30D',
icon: 'IconHandClick',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_TOTAL_FIELD_ID,
type: FieldType.NUMBER,
name: 'numberOfEventsTotal',
label: 'Number of events total',
icon: 'IconHandClick',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ALEXA_RANK_FIELD_ID,
type: FieldType.NUMBER,
name: 'alexaRank',
label: 'Alexa Rank',
icon: 'IconNumber9',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_EMPLOYEES_FIELD_ID,
type: FieldType.NUMBER,
name: 'employees',
label: 'Employees',
icon: 'IconUsers',
isNullable: true,
defaultValue: null,
universalSettings: {
type: 'number',
decimals: 0,
},
},
{
universalIdentifier: CLOUD_WORKSPACE_2_IS_ACTIVE_L7D_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL7D',
label: 'Is Active L7D',
icon: 'IconActivity',
isNullable: true,
defaultValue: false,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_IS_ACTIVE_L24H_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL24H',
label: 'Is Active L24H',
icon: 'IconActivity',
isNullable: true,
defaultValue: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_IS_ACTIVE_L30D_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isActiveL30D',
label: 'Is Active L30D',
icon: 'IconActivity',
isNullable: true,
defaultValue: false,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_IS_ENRICHED_FIELD_ID,
type: FieldType.BOOLEAN,
name: 'isEnriched',
label: 'Is Enriched',
icon: 'IconToggleLeft',
isNullable: true,
defaultValue: false,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_INDUSTRY_FIELD_ID,
type: FieldType.TEXT,
name: 'industry',
label: 'Industry',
icon: 'IconWorldLongitude',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_COMPANY_FOUNDED_YEAR_FIELD_ID,
type: FieldType.TEXT,
name: 'companyFoundedYear',
label: 'Company Founded Year',
icon: 'IconCalendarPlus',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_DESCRIPTION_FIELD_ID,
type: FieldType.TEXT,
name: 'description',
label: 'Description',
icon: 'IconBaselineDensitySmall',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_LATEST_FUNDING_STAGE_FIELD_ID,
type: FieldType.TEXT,
name: 'latestFundingStage',
label: 'Latest Funding Stage',
icon: 'IconBellDollar',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_COMPANY_NAME_FIELD_ID,
type: FieldType.TEXT,
name: 'companyName',
label: 'Company Name',
icon: 'IconTypography',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_SUB_DOMAIN_FIELD_ID,
type: FieldType.TEXT,
name: 'subDomain',
label: 'Sub domain',
description:
'This is the subdomain chosen by customers to access their workspace',
icon: 'IconLink',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ANNUAL_REVENUE_FIELD_ID,
type: FieldType.CURRENCY,
name: 'annualRevenue',
label: 'Annual Revenue',
icon: 'IconCurrencyDollar',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_MRR_FIELD_ID,
type: FieldType.CURRENCY,
name: 'mrr',
label: 'MRR',
icon: 'IconMoneybag',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_POTENTIAL_ARR_FIELD_ID,
type: FieldType.CURRENCY,
name: 'potentialArr',
label: 'Potential ARR',
icon: 'IconMoneybag',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ARR_FIELD_ID,
type: FieldType.CURRENCY,
name: 'arr',
label: 'ARR',
icon: 'IconMoneybag',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_TOTAL_FUNDING_FIELD_ID,
type: FieldType.CURRENCY,
name: 'totalFunding',
label: 'Total Funding',
icon: 'IconMoneybag',
isNullable: true,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_ACTIVATION_STATUS_FIELD_ID,
type: FieldType.SELECT,
name: 'activationStatus',
label: 'Activation Status',
icon: 'IconTag',
isNullable: true,
defaultValue: null,
options: [
{
id: 'c41ee49c-e629-431e-8601-183726f93315',
color: 'yellow',
label: 'Pending creation',
value: 'PENDING_CREATION',
position: 0,
},
{
id: 'cb82ad14-5fcb-4ed0-af58-c92f84b45d2b',
color: 'gray',
label: 'Suspended',
value: 'SUSPENDED',
position: 1,
},
{
id: 'b1084bc8-0efd-44ce-974c-7fb44c310be5',
color: 'green',
label: 'Active',
value: 'ACTIVE',
position: 2,
},
{
id: 'b5b33c8e-eb3f-4758-99c9-d2f39c011b96',
color: 'blue',
label: 'Ongoing creation',
value: 'ONGOING_CREATION',
position: 3,
},
{
id: '2ae41a69-c521-4545-9e0b-f1f941ceee83',
color: 'purple',
label: 'Empty',
value: 'EMPTY',
position: 4,
},
],
},
{
universalIdentifier: CLOUD_WORKSPACE_2_SUBSCRIPTION_STATUS_FIELD_ID,
type: FieldType.SELECT,
name: 'subscriptionStatus',
label: 'Subscription Status',
icon: 'IconTag',
isNullable: true,
defaultValue: null,
options: [
{
id: 'b5ee9a91-0a15-4cbe-a36e-198f5bae431d',
color: 'green',
label: 'Active',
value: 'ACTIVE',
position: 0,
},
{
id: '78837243-38d9-44d4-8b9c-a6c0ca082ba8',
color: 'blue',
label: 'Trialing',
value: 'TRIALING',
position: 1,
},
{
id: '6b27ee33-3c30-4694-a607-19264765b11c',
color: 'gray',
label: 'Canceled',
value: 'CANCELED',
position: 2,
},
{
id: '05118231-18b6-4589-be23-8f1368c0182f',
color: 'yellow',
label: 'Other',
value: 'OTHER',
position: 3,
},
{
id: 'ea83a7ff-4fe0-4c56-88f8-cf0bdf76cb08',
color: 'gray',
label: 'Empty',
value: 'EMPTY',
position: 4,
},
],
},
{
universalIdentifier: CLOUD_WORKSPACE_2_PAYMENT_FREQUENCY_FIELD_ID,
type: FieldType.SELECT,
name: 'paymentFrequency',
label: 'Payment Frequency',
icon: 'IconCurrencyDollar',
isNullable: true,
defaultValue: null,
options: [
{
id: 'fa97d4fb-12bf-4cf4-b252-14b1c657d3b6',
color: 'sky',
label: 'Month',
value: 'MONTH',
position: 0,
},
{
id: 'c09c3f1d-31e7-4b29-969a-a4304f04abe0',
color: 'purple',
label: 'Year',
value: 'YEAR',
position: 1,
},
{
id: 'a91d77ed-90ad-41fc-83ae-e688c981abb2',
color: 'gray',
label: 'Other',
value: 'OTHER',
position: 2,
},
{
id: '5c595203-1b33-430b-abd8-8bc80aeedbd7',
color: 'red',
label: 'Empty',
value: 'EMPTY',
position: 3,
},
],
},
{
universalIdentifier: CLOUD_WORKSPACE_2_NEXT_RENEWAL_DATE_FIELD_ID,
type: FieldType.DATE_TIME,
name: 'nextRenewalDate',
label: 'Next Renewal Date',
icon: 'IconCalendarClock',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_CREATOR_EMAIL_FIELD_ID,
type: FieldType.EMAILS,
name: 'creatorEmail',
label: 'Creator Email',
icon: 'IconMail',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_TAGS_FIELD_ID,
type: FieldType.ARRAY,
name: 'tags',
label: 'Tags',
icon: 'IconBracketsContain',
isNullable: true,
defaultValue: null,
},
{
universalIdentifier: CLOUD_WORKSPACE_2_UPDATED_BY_FIELD_ID,
type: FieldType.ACTOR,
name: 'updatedBy',
label: 'Updated by',
description: 'The user who last updated the record',
icon: 'IconUserCircle',
isNullable: true,
},
],
});
@@ -0,0 +1,14 @@
import { defineRole } from 'twenty-sdk';
export const DEFAULT_ROLE_UNIVERSAL_IDENTIFIER =
'4bd740cc-f6a1-40c5-b46b-e2a4dbf5af04';
export default defineRole({
universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
label: 'Twenty for Twenty default function role',
description: 'Twenty for Twenty default function role',
canReadAllObjectRecords: true,
canUpdateAllObjectRecords: true,
canSoftDeleteAllObjectRecords: true,
canDestroyAllObjectRecords: false,
});
@@ -0,0 +1,25 @@
import { z } from 'zod';
const applicationConfigSchema = z
.object({
CLICKHOUSE_DATABASE: z.string().nonempty(),
CLICKHOUSE_URL: z.url(),
CLICKHOUSE_USERNAME: z.string().nonempty(),
CLICKHOUSE_PASSWORD: z.string().nonempty(),
});
export const getApplicationConfig = () => {
const env = applicationConfigSchema.parse({
CLICKHOUSE_DATABASE: process.env.CLICKHOUSE_DATABASE,
CLICKHOUSE_URL: process.env.CLICKHOUSE_URL,
CLICKHOUSE_USERNAME: process.env.CLICKHOUSE_USERNAME,
CLICKHOUSE_PASSWORD: process.env.CLICKHOUSE_PASSWORD,
});
return {
clickHouseDatabase: env.CLICKHOUSE_DATABASE,
clickHouseUrl: env.CLICKHOUSE_URL,
clickHouseUsername: env.CLICKHOUSE_USERNAME,
clickHousePassword: env.CLICKHOUSE_PASSWORD,
};
};
@@ -0,0 +1,43 @@
import { z } from 'zod';
import { getApplicationConfig } from 'src/shared/application-config';
// Fetches rows from ClickHouse using a raw SQL query,
// parses the JSONEachRow response, and validates each row against the provided Zod schema.
export const fetchFromClickHouse = async <T>(
query: string,
schema: z.ZodType<T>,
): Promise<T[]> => {
const { clickHouseUrl, clickHouseUsername, clickHousePassword } =
getApplicationConfig();
const response = await fetch(clickHouseUrl, {
method: 'POST',
headers: {
Authorization:
'Basic ' +
Buffer.from(`${clickHouseUsername}:${clickHousePassword}`).toString(
'base64',
),
'Content-Type': 'text/plain',
},
body: query,
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`ClickHouse error: ${response.status} - ${errorText}`);
}
// Format is a list of JSON objects, one per line (JSONEachRow format).
const text = await response.text();
const rows = text
.trim()
.split('\n')
.filter((line) => line.trim())
.map((line) => JSON.parse(line));
return z.array(schema).parse(rows);
};
@@ -0,0 +1,16 @@
// ClickHouse returns DateTime64 values in the format 'YYYY-MM-DD HH:mm:ss.SSSSSS'
// (space-separated, up to 6 fractional digits). Twenty's DATE_TIME fields expect
// ISO 8601 format ('YYYY-MM-DDTHH:mm:ss.SSSZ', at most 3 fractional digits).
//
// Additionally, ClickHouse uses '1970-01-01 00:00:00.000000' as a sentinel for
// null/empty dates. We map that to null.
const CLICKHOUSE_EPOCH_SENTINEL = '1970-01-01 00:00:00.000000';
export const clickHouseDateToIso = (value: string): string | null => {
if (!value || value === CLICKHOUSE_EPOCH_SENTINEL) {
return null;
}
return new Date(value.replace(' ', 'T') + 'Z').toISOString();
};
@@ -0,0 +1,3 @@
import Twenty from 'twenty-sdk/generated';
export const twentyClient = new Twenty();
@@ -0,0 +1,159 @@
import { defineView } from 'twenty-sdk';
import { ViewType } from 'twenty-shared/types';
import {
CLOUD_USER_2_ACTIVITY_STATUS_FIELD_ID,
CLOUD_USER_2_AVG_DAILY_PAGEVIEWS_LAST_30D_FIELD_ID,
CLOUD_USER_2_DATA_LAST_UPDATED_AT_FIELD_ID,
CLOUD_USER_2_DAYS_SINCE_LAST_ACTIVITY_FIELD_ID,
CLOUD_USER_2_EMAIL_FIELD_ID,
CLOUD_USER_2_FULL_NAME_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L24H_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L30D_FIELD_ID,
CLOUD_USER_2_IS_ACTIVE_L7D_FIELD_ID,
CLOUD_USER_2_IS_TWENTY_FIELD_ID,
CLOUD_USER_2_LAST_ACTIVITY_DATE_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L24H_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L30D_FIELD_ID,
CLOUD_USER_2_PAGE_VIEWS_L7D_FIELD_ID,
CLOUD_USER_2_UPDATED_BY_FIELD_ID,
CLOUD_USER_2_USER_TENURE_FIELD_ID,
CLOUD_USER_2_WORKSPACE_COUNT_FIELD_ID,
} from 'src/fields/cloud-user-2-field-ids';
import { CLOUD_USER_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-2';
export const ALL_CLOUD_USER_2_VIEW_ID = 'd6137e11-dbcd-4824-85d3-42fe1ca48cb6';
export default defineView({
universalIdentifier: ALL_CLOUD_USER_2_VIEW_ID,
name: 'all-cloud-user-2',
objectUniversalIdentifier: CLOUD_USER_2_UNIVERSAL_IDENTIFIER,
icon: 'IconList',
position: 0,
type: ViewType.TABLE,
fields: [
{
universalIdentifier: '9e82305e-9fd9-4bf7-8cc5-098eb35a748e',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_FULL_NAME_FIELD_ID,
position: 0,
isVisible: true,
size: 180,
},
{
universalIdentifier: 'ea737839-bcb7-4da1-aaf6-79cda65e6263',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_EMAIL_FIELD_ID,
position: 1,
isVisible: true,
size: 200,
},
{
universalIdentifier: 'ccd1eca7-c851-4e97-9f0e-48c7139f3ced',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_ACTIVITY_STATUS_FIELD_ID,
position: 2,
isVisible: true,
size: 130,
},
{
universalIdentifier: 'e99c82d3-d2fe-4758-9253-ab2ca2b50ef8',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_IS_TWENTY_FIELD_ID,
position: 3,
isVisible: true,
size: 100,
},
{
universalIdentifier: 'c03da046-30b6-402e-8d4b-10799aa5102d',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_WORKSPACE_COUNT_FIELD_ID,
position: 4,
isVisible: true,
size: 130,
},
{
universalIdentifier: 'e3a787f2-77d1-4865-a5c2-c60976809d4d',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_USER_TENURE_FIELD_ID,
position: 5,
isVisible: true,
size: 110,
},
{
universalIdentifier: '352d77f2-726b-4a75-8c9d-3117cfabedc1',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_IS_ACTIVE_L24H_FIELD_ID,
position: 6,
isVisible: true,
size: 120,
},
{
universalIdentifier: 'cf06d6b0-e425-4daf-8a6d-9b66a058ae80',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_IS_ACTIVE_L7D_FIELD_ID,
position: 7,
isVisible: true,
size: 120,
},
{
universalIdentifier: '4ab63729-0b48-4b0b-ac9e-e72f5448998c',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_IS_ACTIVE_L30D_FIELD_ID,
position: 8,
isVisible: true,
size: 120,
},
{
universalIdentifier: '8c6a3315-fa47-4a12-b9fe-1775462c803d',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L24H_FIELD_ID,
position: 9,
isVisible: true,
size: 130,
},
{
universalIdentifier: '89011d63-e670-498e-bc8f-142f7ceafd04',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L7D_FIELD_ID,
position: 10,
isVisible: true,
size: 130,
},
{
universalIdentifier: '88816c57-aa5b-4efe-b53a-b288fad24ab4',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_PAGE_VIEWS_L30D_FIELD_ID,
position: 11,
isVisible: true,
size: 130,
},
{
universalIdentifier: '3b0ff937-1eaf-4589-80ec-23abb4f2e204',
fieldMetadataUniversalIdentifier:
CLOUD_USER_2_AVG_DAILY_PAGEVIEWS_LAST_30D_FIELD_ID,
position: 12,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'dee5f679-9ad9-4bc4-94a9-af28d7210699',
fieldMetadataUniversalIdentifier:
CLOUD_USER_2_DAYS_SINCE_LAST_ACTIVITY_FIELD_ID,
position: 13,
isVisible: true,
size: 150,
},
{
universalIdentifier: '25b4e175-be18-4b20-9c51-5db0a596d968',
fieldMetadataUniversalIdentifier:
CLOUD_USER_2_LAST_ACTIVITY_DATE_FIELD_ID,
position: 14,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'f1706c21-d164-414c-9cf5-4cf376584bb9',
fieldMetadataUniversalIdentifier:
CLOUD_USER_2_DATA_LAST_UPDATED_AT_FIELD_ID,
position: 15,
isVisible: true,
size: 150,
},
{
universalIdentifier: '88d0f343-42c1-4d36-82df-cfdb74e785eb',
fieldMetadataUniversalIdentifier: CLOUD_USER_2_UPDATED_BY_FIELD_ID,
position: 16,
isVisible: true,
size: 150,
},
],
});
@@ -0,0 +1,56 @@
import { defineView } from 'twenty-sdk';
import { ViewType } from 'twenty-shared/types';
import {
CLOUD_USER_WORKSPACE_2_ID_OF_THE_USER_WORKSPACE_FIELD_ID,
CLOUD_USER_WORKSPACE_2_TWENTY_USER_IDENTIFIER_FIELD_ID,
CLOUD_USER_WORKSPACE_2_TWENTY_WORKSPACE_IDENTIFIER_FIELD_ID,
CLOUD_USER_WORKSPACE_2_UPDATED_BY_FIELD_ID,
} from 'src/fields/cloud-user-workspace-2-field-ids';
import { CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-user-workspace-2';
export const ALL_CLOUD_USER_WORKSPACE_2_VIEW_ID =
'f80e44ef-43fb-409e-a003-decadaa38b3e';
export default defineView({
universalIdentifier: ALL_CLOUD_USER_WORKSPACE_2_VIEW_ID,
name: 'all-cloud-user-workspace-2',
objectUniversalIdentifier: CLOUD_USER_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
icon: 'IconList',
position: 0,
type: ViewType.TABLE,
fields: [
{
universalIdentifier: '4a0d9d93-d182-443d-8a70-3a4f25e51c50',
fieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_TWENTY_USER_IDENTIFIER_FIELD_ID,
position: 0,
isVisible: true,
size: 200,
},
{
universalIdentifier: '14b78fc4-a6a5-471b-ba87-6aebc9a3da68',
fieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_TWENTY_WORKSPACE_IDENTIFIER_FIELD_ID,
position: 1,
isVisible: true,
size: 220,
},
{
universalIdentifier: '8c9c8a1b-d511-4706-afe7-32b22cce2e7e',
fieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_ID_OF_THE_USER_WORKSPACE_FIELD_ID,
position: 2,
isVisible: true,
size: 200,
},
{
universalIdentifier: 'ee35eded-4222-4a87-b31c-69e415e331db',
fieldMetadataUniversalIdentifier:
CLOUD_USER_WORKSPACE_2_UPDATED_BY_FIELD_ID,
position: 3,
isVisible: true,
size: 150,
},
],
});
@@ -0,0 +1,368 @@
import { defineView } from 'twenty-sdk';
import { ViewType } from 'twenty-shared/types';
import {
CLOUD_WORKSPACE_2_ACTIVATION_STATUS_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_ACTIVE_USERS_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_ALEXA_RANK_FIELD_ID,
CLOUD_WORKSPACE_2_ANNUAL_REVENUE_FIELD_ID,
CLOUD_WORKSPACE_2_ARR_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_FOUNDED_YEAR_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_LINKEDIN_FIELD_ID,
CLOUD_WORKSPACE_2_COMPANY_NAME_FIELD_ID,
CLOUD_WORKSPACE_2_CREATOR_EMAIL_FIELD_ID,
CLOUD_WORKSPACE_2_CUSTOM_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_DATA_LAST_UPDATED_AT_FIELD_ID,
CLOUD_WORKSPACE_2_DESCRIPTION_FIELD_ID,
CLOUD_WORKSPACE_2_EMPLOYEES_FIELD_ID,
CLOUD_WORKSPACE_2_INDUSTRY_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ACTIVE_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_IS_ENRICHED_FIELD_ID,
CLOUD_WORKSPACE_2_LAST_PAGE_VIEW_DATE_FIELD_ID,
CLOUD_WORKSPACE_2_LATEST_FUNDING_STAGE_FIELD_ID,
CLOUD_WORKSPACE_2_MRR_FIELD_ID,
CLOUD_WORKSPACE_2_NEXT_RENEWAL_DATE_FIELD_ID,
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_TOTAL_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L24H_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L30D_FIELD_ID,
CLOUD_WORKSPACE_2_PAGE_VIEWS_L7D_FIELD_ID,
CLOUD_WORKSPACE_2_PAYMENT_FREQUENCY_FIELD_ID,
CLOUD_WORKSPACE_2_POTENTIAL_ARR_FIELD_ID,
CLOUD_WORKSPACE_2_SUB_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_SUBSCRIPTION_STATUS_FIELD_ID,
CLOUD_WORKSPACE_2_TAGS_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_EVER_ACTIVE_WORKSPACE_USERS_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_FUNDING_FIELD_ID,
CLOUD_WORKSPACE_2_TOTAL_WORKSPACE_USERS_FIELD_ID,
CLOUD_WORKSPACE_2_UPDATED_BY_FIELD_ID,
CLOUD_WORKSPACE_2_WORKSPACE_BUSINESS_DOMAIN_FIELD_ID,
CLOUD_WORKSPACE_2_WORKSPACE_TENURE_FIELD_ID,
} from 'src/fields/cloud-workspace-2-field-ids';
import { CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER } from 'src/objects/cloud-workspace-2';
export const ALL_CLOUD_WORKSPACE_2_VIEW_ID =
'3747a3a0-25a0-42f0-99d9-61a4b4a76009';
export default defineView({
universalIdentifier: ALL_CLOUD_WORKSPACE_2_VIEW_ID,
name: 'all-cloud-workspace-2',
objectUniversalIdentifier: CLOUD_WORKSPACE_2_UNIVERSAL_IDENTIFIER,
icon: 'IconList',
position: 0,
type: ViewType.TABLE,
fields: [
{
universalIdentifier: '146e3f00-8efc-46be-aafb-a6bafcefa5b0',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_COMPANY_NAME_FIELD_ID,
position: 0,
isVisible: true,
size: 180,
},
{
universalIdentifier: '10ce2149-d25b-4e21-8215-c628677bc4cb',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_SUB_DOMAIN_FIELD_ID,
position: 1,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'c8735db0-9a89-4204-ad58-b68b71c10182',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_DESCRIPTION_FIELD_ID,
position: 2,
isVisible: true,
size: 250,
},
{
universalIdentifier: 'cf3f182b-1a69-4274-a200-ef191400a9e8',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_INDUSTRY_FIELD_ID,
position: 3,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'c932adb5-129b-4457-bbfa-75baaf27707f',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_EMPLOYEES_FIELD_ID,
position: 4,
isVisible: true,
size: 110,
},
{
universalIdentifier: '5f0d33f0-60f0-442c-8c2d-19bfe1c9ea49',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_SUBSCRIPTION_STATUS_FIELD_ID,
position: 5,
isVisible: true,
size: 150,
},
{
universalIdentifier: '904e4ecd-f997-42b6-933a-1174cf2bebdc',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_ACTIVATION_STATUS_FIELD_ID,
position: 6,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'f2d919e7-f782-4edb-ad1a-b99649fbbaf9',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_MRR_FIELD_ID,
position: 7,
isVisible: true,
size: 120,
},
{
universalIdentifier: '92afa154-72f2-4b01-8376-2f5311bb40f9',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_ARR_FIELD_ID,
position: 8,
isVisible: true,
size: 120,
},
{
universalIdentifier: 'c63bcd0a-f8d3-4c86-b9c0-6d638d7e9195',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_POTENTIAL_ARR_FIELD_ID,
position: 9,
isVisible: true,
size: 130,
},
{
universalIdentifier: '8659ca48-23b0-4fb8-b588-0919169cae4d',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_ANNUAL_REVENUE_FIELD_ID,
position: 10,
isVisible: true,
size: 140,
},
{
universalIdentifier: '1524079b-0e7e-41a6-80bc-85bcdfcab537',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_TOTAL_FUNDING_FIELD_ID,
position: 11,
isVisible: true,
size: 130,
},
{
universalIdentifier: '36a755ee-903c-4c61-b091-ebc0e687333d',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_ACTIVE_USERS_L24H_FIELD_ID,
position: 12,
isVisible: true,
size: 140,
},
{
universalIdentifier: '5ac28b38-823f-421c-a177-1749b8283381',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_ACTIVE_USERS_L7D_FIELD_ID,
position: 13,
isVisible: true,
size: 140,
},
{
universalIdentifier: '6fa0bfe5-ac55-4165-8830-5c084466c7f5',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_ACTIVE_USERS_L30D_FIELD_ID,
position: 14,
isVisible: true,
size: 140,
},
{
universalIdentifier: 'bee2ed03-23c2-4c99-86db-c0dd4599c669',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_PAGE_VIEWS_L24H_FIELD_ID,
position: 15,
isVisible: true,
size: 130,
},
{
universalIdentifier: 'e8f9775b-c984-4832-800a-3dd26060c0aa',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_PAGE_VIEWS_L7D_FIELD_ID,
position: 16,
isVisible: true,
size: 130,
},
{
universalIdentifier: '95c4fdfc-8fe5-43ce-9885-3f0fc5b4756a',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_PAGE_VIEWS_L30D_FIELD_ID,
position: 17,
isVisible: true,
size: 130,
},
{
universalIdentifier: '6448c0f1-1469-466e-99ed-c7aa015d9e38',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_TOTAL_WORKSPACE_USERS_FIELD_ID,
position: 18,
isVisible: true,
size: 150,
},
{
universalIdentifier: '082ed200-9bba-444a-9b28-3a129b7ac9d8',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_TOTAL_EVER_ACTIVE_WORKSPACE_USERS_FIELD_ID,
position: 19,
isVisible: true,
size: 180,
},
{
universalIdentifier: 'd61bbf0c-48ad-428a-90a1-87b54a87bacf',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_WORKSPACE_TENURE_FIELD_ID,
position: 20,
isVisible: true,
size: 140,
},
{
universalIdentifier: '26058a5b-edde-4caa-a034-32b8edb54ce6',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_IS_ACTIVE_L24H_FIELD_ID,
position: 21,
isVisible: true,
size: 120,
},
{
universalIdentifier: '36931d2b-f250-4325-a877-3285dd8a797e',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_IS_ACTIVE_L7D_FIELD_ID,
position: 22,
isVisible: true,
size: 120,
},
{
universalIdentifier: 'c120fc92-4796-4cf4-866f-c1d8c4555321',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_IS_ACTIVE_L30D_FIELD_ID,
position: 23,
isVisible: true,
size: 120,
},
{
universalIdentifier: 'a6674592-070b-41c1-baab-f360984328cc',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_IS_ENRICHED_FIELD_ID,
position: 24,
isVisible: true,
size: 110,
},
{
universalIdentifier: 'd3701295-ef41-46c4-8dd3-b31c27663516',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_CUSTOM_DOMAIN_FIELD_ID,
position: 25,
isVisible: true,
size: 180,
},
{
universalIdentifier: 'dd22ffe7-95ed-4c67-be33-c2d1592daa32',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_WORKSPACE_BUSINESS_DOMAIN_FIELD_ID,
position: 26,
isVisible: true,
size: 200,
},
{
universalIdentifier: 'c7a9bcf8-d41d-4ded-b680-868e470e3228',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_COMPANY_LINKEDIN_FIELD_ID,
position: 27,
isVisible: true,
size: 180,
},
{
universalIdentifier: '398eb88f-0d12-446d-a486-d1fb262f82bb',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_CREATOR_EMAIL_FIELD_ID,
position: 28,
isVisible: true,
size: 200,
},
{
universalIdentifier: '52d2a1b3-e2b2-4d6b-a5dd-ea8d63c7c369',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_TAGS_FIELD_ID,
position: 29,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'f74fed2c-94dc-4954-ac27-79acd7e04103',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_PAYMENT_FREQUENCY_FIELD_ID,
position: 30,
isVisible: true,
size: 150,
},
{
universalIdentifier: '666d0cea-e50b-4cc8-9ed5-5f5c0ec7fe7e',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_NEXT_RENEWAL_DATE_FIELD_ID,
position: 31,
isVisible: true,
size: 150,
},
{
universalIdentifier: '60508519-5ac4-4f96-a30f-5c75d3ce9a93',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_L30D_FIELD_ID,
position: 32,
isVisible: true,
size: 160,
},
{
universalIdentifier: '3b1ca2b6-31a1-4755-a9a4-07ee9a9b8a33',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_NUMBER_OF_EVENTS_TOTAL_FIELD_ID,
position: 33,
isVisible: true,
size: 160,
},
{
universalIdentifier: '47ba21ab-a5c5-42b9-b1e2-7a988ece154d',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_ALEXA_RANK_FIELD_ID,
position: 34,
isVisible: true,
size: 110,
},
{
universalIdentifier: 'de5e2e42-2600-488c-81d0-f700e7dd0f67',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_COMPANY_FOUNDED_YEAR_FIELD_ID,
position: 35,
isVisible: true,
size: 160,
},
{
universalIdentifier: 'd6bec718-8b50-41e2-95d7-521151e2df82',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_LATEST_FUNDING_STAGE_FIELD_ID,
position: 36,
isVisible: true,
size: 160,
},
{
universalIdentifier: '9aaff045-64fa-4857-a8df-7394cf43a120',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_LAST_PAGE_VIEW_DATE_FIELD_ID,
position: 37,
isVisible: true,
size: 150,
},
{
universalIdentifier: 'f2cb82b9-ebb4-4258-971b-061d709f28e5',
fieldMetadataUniversalIdentifier:
CLOUD_WORKSPACE_2_DATA_LAST_UPDATED_AT_FIELD_ID,
position: 38,
isVisible: true,
size: 150,
},
{
universalIdentifier: '7e631992-3ae6-478b-9874-67c3b211f05a',
fieldMetadataUniversalIdentifier: CLOUD_WORKSPACE_2_UPDATED_BY_FIELD_ID,
position: 39,
isVisible: true,
size: 150,
},
],
});
@@ -0,0 +1,31 @@
{
"compileOnSave": false,
"compilerOptions": {
"sourceMap": true,
"declaration": true,
"outDir": "./dist",
"rootDir": ".",
"jsx": "react-jsx",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"allowUnreachableCode": false,
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"strictBindCallApply": false,
"target": "es2018",
"module": "esnext",
"lib": ["es2020", "dom"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"resolveJsonModule": true,
"paths": {
"src/*": ["./src/*"],
"~/*": ["./*"]
}
},
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
}
File diff suppressed because it is too large Load Diff
@@ -14,6 +14,7 @@ Apps let you build and manage Twenty customizations **as code**. Instead of conf
**What you can do today:**
- Define custom objects and fields as code (managed data model)
- Build logic functions with custom triggers
- Define skills for AI agents
- Deploy the same app across multiple workspaces
## Prerequisites
@@ -26,7 +27,7 @@ Apps let you build and manage Twenty customizations **as code**. Instead of conf
Create a new app using the official scaffolder, then authenticate and start developing:
```bash filename="Terminal"
# Scaffold a new app
# Scaffold a new app (includes all examples by default)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -41,6 +42,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
The scaffolder supports three modes for controlling which example files are included:
```bash filename="Terminal"
# Default (exhaustive): all examples (object, field, logic function, front component, view, navigation menu item, skill)
npx create-twenty-app@latest my-app
# Minimal: only core files (application-config.ts and default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interactive: select which examples to include
npx create-twenty-app@latest my-app --interactive
```
From here you can:
```bash filename="Terminal"
@@ -53,6 +67,9 @@ yarn twenty function:logs
# Execute a function by name
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Execute the post-install function
yarn twenty function:execute --postInstall
# Uninstall the application from the current workspace
yarn twenty app:uninstall
@@ -69,9 +86,9 @@ When you run `npx create-twenty-app@latest my-twenty-app`, the scaffolder:
- Copies a minimal base application into `my-twenty-app/`
- Adds a local `twenty-sdk` dependency and Yarn 4 configuration
- Creates config files and scripts wired to the `twenty` CLI
- Generates a default application config and a default function role
- Generates core files (application config, default function role, post-install function) plus example files based on the scaffolding mode
A freshly scaffolded app looks like this:
A freshly scaffolded app with the default `--exhaustive` mode looks like this:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -90,12 +107,25 @@ my-twenty-app/
├── application-config.ts # Required - main application configuration
├── roles/
│ └── default-role.ts # Default role for logic functions
├── objects/
│ └── example-object.ts # Example custom object definition
├── fields/
│ └── example-field.ts # Example standalone field definition
├── logic-functions/
── hello-world.ts # Example logic function
└── front-components/
└── hello-world.tsx # Example front component
── hello-world.ts # Example logic function
└── post-install.ts # Post-install logic function
├── front-components/
│ └── hello-world.tsx # Example front component
├── views/
│ └── example-view.ts # Example saved view definition
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
└── skills/
└── example-skill.ts # Example AI agent skill definition
```
With `--minimal`, only the core files are created (`application-config.ts`, `roles/default-role.ts`, and `logic-functions/post-install.ts`). With `--interactive`, you choose which example files to include.
At a high level:
- **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands.
@@ -118,6 +148,9 @@ The SDK detects entities by parsing your TypeScript files for **`export default
| `defineFrontComponent()` | Front component definitions |
| `defineRole()` | Role definitions |
| `defineField()` | Field extensions for existing objects |
| `defineView()` | Saved view definitions |
| `defineNavigationMenuItem()` | Navigation menu item definitions |
| `defineSkill()` | AI agent skill definitions |
<Note>
**File naming is flexible.** Entity detection is AST-based — the SDK scans your source files for the `export default define<Entity>({...})` pattern. You can organize your files and folders however you like. Grouping by entity type (e.g., `logic-functions/`, `roles/`) is just a convention for code organization, not a requirement.
@@ -138,7 +171,7 @@ export default defineObject({
Later commands will add more files and folders:
- `yarn twenty app:dev` will auto-generate a typed API client in `node_modules/twenty-sdk/generated` (typed Twenty client + workspace types).
- `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles.
- `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, roles, skills, and more.
## Authentication
@@ -189,6 +222,9 @@ The SDK provides helper functions for defining your app entities. As described i
| `defineFrontComponent()` | Define front components for custom UI |
| `defineRole()` | Configure role permissions and object access |
| `defineField()` | Extend existing objects with additional fields |
| `defineView()` | Define saved views for objects |
| `defineNavigationMenuItem()` | Define sidebar navigation links |
| `defineSkill()` | Define AI agent skills |
These functions validate your configuration at build time and provide IDE autocompletion and type safety.
@@ -289,6 +325,7 @@ Every app has a single `application-config.ts` file that describes:
- **Who the app is**: identifiers, display name, and description.
- **How its functions run**: which role they use for permissions.
- **(Optional) variables**: keyvalue pairs exposed to your functions as environment variables.
- **(Optional) post-install function**: a logic function that runs after the app is installed.
Use `defineApplication()` to define your application configuration:
@@ -296,6 +333,7 @@ Use `defineApplication()` to define your application configuration:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -311,6 +349,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -318,6 +357,7 @@ Notes:
- `universalIdentifier` fields are deterministic IDs you own; generate them once and keep them stable across syncs.
- `applicationVariables` become environment variables for your functions (for example, `DEFAULT_RECIPIENT_NAME` is available as `process.env.DEFAULT_RECIPIENT_NAME`).
- `defaultRoleUniversalIdentifier` must match the role file (see below).
- `postInstallLogicFunctionUniversalIdentifier` (optional) points to a logic function that runs automatically after the app is installed. See [Post-install functions](#post-install-functions).
#### Roles and permissions
@@ -450,6 +490,54 @@ Notes:
- The `triggers` array is optional. Functions without triggers can be used as utility functions called by other functions.
- You can mix multiple trigger types in a single function.
### Post-install functions
A post-install function is a logic function that runs automatically after your app is installed on a workspace. This is useful for one-time setup tasks such as seeding default data, creating initial records, or configuring workspace settings.
When you scaffold a new app with `create-twenty-app`, a post-install function is generated for you at `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
The function is wired into your app by referencing its universal identifier in `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
You can also manually execute the post-install function at any time using the CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Key points:
- Post-install functions are standard logic functions — they use `defineLogicFunction()` like any other function.
- The `postInstallLogicFunctionUniversalIdentifier` field in `defineApplication()` is optional. If omitted, no function runs after installation.
- The default timeout is set to 300 seconds (5 minutes) to allow for longer setup tasks like data seeding.
- Post-install functions do not need triggers — they are invoked by the platform during installation or manually via `function:execute --postInstall`.
### Route trigger payload
<Warning>
@@ -646,6 +734,40 @@ You can create new front components in two ways:
- **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component.
- **Manual**: Create a new `*.front-component.tsx` file and use `defineFrontComponent()`.
### Skills
Skills define reusable instructions and capabilities that AI agents can use within your workspace. Use `defineSkill()` to define skills with built-in validation:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Key points:
- `name` is a unique identifier string for the skill (kebab-case recommended).
- `label` is the human-readable display name shown in the UI.
- `content` contains the skill instructions — this is the text the AI agent uses.
- `icon` (optional) sets the icon displayed in the UI.
- `description` (optional) provides additional context about the skill's purpose.
You can create new skills in two ways:
- **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new skill.
- **Manual**: Create a new file and use `defineSkill()`, following the same pattern.
### Generated typed client
The typed client is auto-generated by `yarn twenty app:dev` and stored in `node_modules/twenty-sdk/generated` based on your workspace schema. Use it in your functions:
@@ -671,6 +793,51 @@ Notes:
- The API key's permissions are determined by the role referenced in your `application-config.ts` via `defaultRoleUniversalIdentifier`. This is the default role used by logic functions of your application.
- Applications can define roles to follow leastprivilege. Grant only the permissions your functions need, then point `defaultRoleUniversalIdentifier` to that role's universal identifier.
#### Uploading files
The generated `Twenty` client includes an `uploadFile` method for attaching files to file-type fields on your workspace objects. Because standard GraphQL clients do not support multipart file uploads natively, the client provides this dedicated method that implements the [GraphQL multipart request specification](https://github.com/jaydenseric/graphql-multipart-request-spec) under the hood.
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
The method signature:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `fileBuffer` | `Buffer` | The raw file contents |
| `filename` | `string` | The name of the file (used for storage and display) |
| `contentType` | `string` | MIME type of the file (defaults to `application/octet-stream` if omitted) |
| `fieldMetadataUniversalIdentifier` | `string` | The `universalIdentifier` of the file-type field on your object |
Key points:
- The method sends the file to the **metadata endpoint** (not the main GraphQL endpoint), where the upload mutation is resolved.
- It uses the field's `universalIdentifier` (not its workspace-specific ID), so your upload code works across any workspace where your app is installed — consistent with how apps reference fields everywhere else.
- The returned `url` is a signed URL you can use to access the uploaded file.
### Hello World example
@@ -15,6 +15,7 @@ description: أنشئ وأدِر تخصيصات Twenty على هيئة كود.
* عرِّف كائنات وحقولًا مخصصة على شكل كود (نموذج بيانات مُدار)
* أنشئ وظائف منطقية مع مشغلات مخصصة
* حدد المهارات لوكلاء الذكاء الاصطناعي
* انشر التطبيق نفسه عبر مساحات عمل متعددة
## المتطلبات الأساسية
@@ -27,7 +28,7 @@ description: أنشئ وأدِر تخصيصات Twenty على هيئة كود.
أنشئ تطبيقًا جديدًا باستخدام المُهيئ الرسمي، ثم قم بالمصادقة وابدأ التطوير:
```bash filename="Terminal"
# إنشاء تطبيق جديد
# إنشاء تطبيق جديد (يتضمن جميع الأمثلة افتراضيًا)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,22 +43,38 @@ yarn twenty auth:login
yarn twenty app:dev
```
يدعم المُنشئ ثلاثة أوضاع للتحكم في ملفات الأمثلة التي سيتم تضمينها:
```bash filename="Terminal"
# الافتراضي (شامل): جميع الأمثلة (كائن، حقل، دالة منطقية، مكوّن الواجهة الأمامية، عرض، عنصر قائمة التنقل، مهارة)
npx create-twenty-app@latest my-app
# الأدنى: الملفات الأساسية فقط (application-config.ts و default-role.ts)
npx create-twenty-app@latest my-app --minimal
# التفاعلي: اختر الأمثلة التي تريد تضمينها
npx create-twenty-app@latest my-app --interactive
```
من هنا يمكنك:
```bash filename="Terminal"
# أضف كيانًا جديدًا إلى تطبيقك (موجّه)
# Add a new entity to your application (guided)
yarn twenty entity:add
# راقب سجلات وظائف تطبيقك
# Watch your application's function logs
yarn twenty function:logs
# نفّذ وظيفة بالاسم
# Execute a function by name
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# أزل تثبيت التطبيق من مساحة العمل الحالية
# Execute the post-install function
yarn twenty function:execute --postInstall
# Uninstall the application from the current workspace
yarn twenty app:uninstall
# اعرض مساعدة الأوامر
# Display commands' help
yarn twenty help
```
@@ -70,9 +87,9 @@ yarn twenty help
* ينسخ تطبيقًا أساسيًا مصغّرًا إلى `my-twenty-app/`
* يضيف اعتمادًا محليًا `twenty-sdk` وتهيئة Yarn 4
* ينشئ ملفات ضبط ونصوصًا مرتبطة بـ `twenty` CLI
* يُولّد ضبطًا افتراضيًا للتطبيق ودورًا افتراضيًا للوظيفة
* يُنشئ الملفات الأساسية (تهيئة التطبيق، دور الدالة الافتراضي، دالة ما بعد التثبيت) بالإضافة إلى ملفات الأمثلة بحسب وضع الإنشاء
يبدو التطبيق المُنشأ حديثًا بالقالب كما يلي:
يبدو التطبيق المُنشأ حديثًا باستخدام الوضع الافتراضي `--exhaustive` كما يلي:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -88,15 +105,28 @@ my-twenty-app/
README.md
public/ # مجلد الأصول العامة (صور، خطوط، إلخ)
src/
├── application-config.ts # مطلوب - التكوين الرئيسي للتطبيق
├── application-config.ts # مطلوب - إعدادات التطبيق الرئيسية
├── roles/
│ └── default-role.ts # الدور الافتراضي لوظائف المنطق
│ └── default-role.ts # الدور الافتراضي للدوال المنطقية
├── objects/
│ └── example-object.ts # تعريف كائن مخصص — مثال
├── fields/
│ └── example-field.ts # تعريف حقل مستقل — مثال
├── logic-functions/
── hello-world.ts # مثال لوظيفة منطقية
└── front-components/
└── hello-world.tsx # مثال لمكوّن الواجهة الأمامية
── hello-world.ts # دالة منطقية — مثال
└── post-install.ts # دالة منطقية لما بعد التثبيت
├── front-components/
│ └── hello-world.tsx # مكوّن واجهة أمامية — مثال
├── views/
│ └── example-view.ts # تعريف عرض محفوظ — مثال
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # رابط تنقّل في الشريط الجانبي — مثال
└── skills/
└── example-skill.ts # تعريف مهارة لوكيل الذكاء الاصطناعي — مثال
```
مع `--minimal`، سيتم إنشاء الملفات الأساسية فقط (`application-config.ts` و`roles/default-role.ts` و`logic-functions/post-install.ts`). مع `--interactive`، تختار ملفات الأمثلة التي تريد تضمينها.
بشكل عام:
* **package.json**: يصرّح باسم التطبيق والإصدار والمحرّكات (Node 24+، Yarn 4)، ويضيف `twenty-sdk` بالإضافة إلى نص برمجي `twenty` يفوِّض إلى `twenty` CLI المحلي. شغِّل `yarn twenty help` لعرض جميع الأوامر المتاحة.
@@ -112,13 +142,16 @@ my-twenty-app/
يكتشف SDK الكيانات عبر تحليل ملفات TypeScript الخاصة بك بحثًا عن استدعاءات **`export default define<Entity>({...})`**. يحتوي كل نوع كيان على دالة مساعدة مقابلة يتم تصديرها من `twenty-sdk`:
| دالة مساعدة | نوع الكيان |
| ------------------------ | --------------------------------- |
| `defineObject()` | تعريفات كائنات مخصصة |
| `defineLogicFunction()` | تعريفات الوظائف المنطقية |
| `defineFrontComponent()` | Front component definitions |
| `defineRole()` | تعريفات الأدوار |
| `defineField()` | امتدادات الحقول للكائنات الموجودة |
| دالة مساعدة | نوع الكيان |
| ---------------------------- | ------------------------------------ |
| `defineObject()` | تعريفات كائنات مخصصة |
| `defineLogicFunction()` | تعريفات الوظائف المنطقية |
| `defineFrontComponent()` | Front component definitions |
| `defineRole()` | تعريفات الأدوار |
| `defineField()` | امتدادات الحقول للكائنات الموجودة |
| `defineView()` | تعريفات العروض المحفوظة |
| `defineNavigationMenuItem()` | تعريفات عناصر قائمة التنقل |
| `defineSkill()` | تعريفات مهارات وكيل الذكاء الاصطناعي |
<Note>
**تسمية الملفات مرنة.** يعتمد اكتشاف الكيانات على بنية الشجرة المجردة (AST) — إذ يقوم SDK بفحص ملفات المصدر لديك بحثًا عن النمط `export default define<Entity>({...})`. يمكنك تنظيم ملفاتك ومجلداتك كيفما تشاء. التجميع حسب نوع الكيان (مثلًا، `logic-functions/` و`roles/`) هو مجرد عرف لتنظيم الشيفرة، وليس مطلبًا إلزاميًا.
@@ -140,7 +173,7 @@ export default defineObject({
ستضيف الأوامر اللاحقة مزيدًا من الملفات والمجلدات:
* `yarn twenty app:dev` سيولّد تلقائيًا عميل API مضبوط الأنواع في `node_modules/twenty-sdk/generated` (عميل Twenty مضبوط الأنواع + أنواع مساحة العمل).
* `yarn twenty entity:add` سيضيف ملفات تعريف الكيانات تحت `src/` لكائناتك المخصصة أو الوظائف أو المكونات الواجهية أو الأدوار.
* `yarn twenty entity:add` سيضيف ملفات تعريف الكيانات ضمن `src/` لكائناتك المخصّصة، والوظائف، ومكوّنات الواجهة الأمامية، والأدوار، والمهارات، وغير ذلك.
## المصادقة
@@ -183,14 +216,17 @@ yarn twenty auth:status
يوفّر SDK دوالًا مساعدة لتعريف كيانات تطبيقك. كما هو موضح في [اكتشاف الكيانات](#entity-detection)، يجب استخدام `export default define<Entity>({...})` كي يتم اكتشاف كياناتك:
| دالة | الغرض |
| ------------------------ | ---------------------------------------------------- |
| `defineApplication()` | تهيئة بيانات التعريف للتطبيق (مطلوب، واحد لكل تطبيق) |
| `defineObject()` | تعريف كائنات مخصصة مع حقول |
| `defineLogicFunction()` | تعريف وظائف منطقية مع معالجات |
| `defineFrontComponent()` | عرِّف مكوّنات أمامية لواجهة مستخدم مخصّصة |
| `defineRole()` | تهيئة صلاحيات الدور والوصول إلى الكائنات |
| `defineField()` | وسّع الكائنات الموجودة بحقول إضافية |
| دالة | الغرض |
| ---------------------------- | ---------------------------------------------------- |
| `defineApplication()` | تهيئة بيانات التعريف للتطبيق (مطلوب، واحد لكل تطبيق) |
| `defineObject()` | تعريف كائنات مخصصة مع حقول |
| `defineLogicFunction()` | تعريف وظائف منطقية مع معالجات |
| `defineFrontComponent()` | عرِّف مكوّنات أمامية لواجهة مستخدم مخصّصة |
| `defineRole()` | تهيئة صلاحيات الدور والوصول إلى الكائنات |
| `defineField()` | وسّع الكائنات الموجودة بحقول إضافية |
| `defineView()` | تعريف العروض المحفوظة للكائنات |
| `defineNavigationMenuItem()` | تعريف روابط التنقل في الشريط الجانبي |
| `defineSkill()` | عرّف مهارات وكيل الذكاء الاصطناعي |
تتحقق هذه الدوال من تكوينك وقت البناء وتوفّر إكمالًا تلقائيًا في بيئة التطوير وأمان الأنواع.
@@ -290,6 +326,7 @@ export default defineObject({
* **هوية التطبيق**: المعرفات، اسم العرض، والوصف.
* **كيفية تشغيل وظائفه**: الدور الذي تستخدمه للأذونات.
* **متغيرات (اختياري)**: أزواج مفتاح-قيمة تُعرض لوظائفك كمتغيرات بيئة.
* **(Optional) post-install function**: a logic function that runs after the app is installed.
Use `defineApplication()` to define your application configuration:
@@ -297,6 +334,7 @@ Use `defineApplication()` to define your application configuration:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ export default defineApplication({
* حقول `universalIdentifier` هي معرّفات حتمية تخصك؛ أنشئها مرة واحدة واحتفظ بها ثابتة عبر عمليات المزامنة.
* `applicationVariables` تصبح متغيرات بيئة لوظائفك (على سبيل المثال، `DEFAULT_RECIPIENT_NAME` متاح كـ `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` يجب أن يطابق ملف الدور (انظر أدناه).
* `postInstallLogicFunctionUniversalIdentifier` (optional) points to a logic function that runs automatically after the app is installed. See [Post-install functions](#post-install-functions).
#### الأدوار والصلاحيات
@@ -458,6 +498,55 @@ export default defineLogicFunction({
* المصفوفة `triggers` اختيارية. يمكن استخدام الوظائف بدون مشغلات كوظائف مساعدة تُستدعى بواسطة وظائف أخرى.
* يمكنك مزج أنواع متعددة من المشغلات في وظيفة واحدة.
### Post-install functions
A post-install function is a logic function that runs automatically after your app is installed on a workspace. This is useful for one-time setup tasks such as seeding default data, creating initial records, or configuring workspace settings.
عند إنشاء هيكل تطبيق جديد باستخدام `create-twenty-app`، يتم إنشاء دالة ما بعد التثبيت لك في `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
يتم ربط الدالة بتطبيقك من خلال الإشارة إلى المعرِّف العالمي الخاص بها في `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
يمكنك أيضًا تنفيذ دالة ما بعد التثبيت يدويًا في أي وقت باستخدام CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
النقاط الرئيسية:
* دوال ما بعد التثبيت هي دوال منطقية قياسية — فهي تستخدم `defineLogicFunction()` مثل أي دالة أخرى.
* حقل `postInstallLogicFunctionUniversalIdentifier` في `defineApplication()` اختياري. إذا تم تجاهله، لن يتم تشغيل أي دالة بعد التثبيت.
* تم تعيين مهلة افتراضية إلى 300 ثانية (5 دقائق) للسماح بمهام الإعداد الأطول مثل تهيئة البيانات.
* لا تحتاج دوال ما بعد التثبيت إلى مُشغِّلات — حيث يستدعيها النظام الأساسي أثناء التثبيت أو يدويًا عبر `function:execute --postInstall`.
### حمولة مشغل المسار
<Warning>
@@ -657,6 +746,41 @@ export default defineFrontComponent({
* **مُنشأ بالقالب**: شغّل `yarn twenty entity:add` واختر خيار إضافة مكوّن أمامي جديد.
* **يدوي**: أنشئ ملفًا جديدًا `*.front-component.tsx` واستخدم `defineFrontComponent()`.
### المهارات
تُحدِّد المهارات تعليمات وإمكانات قابلة لإعادة الاستخدام يمكن لوكلاء الذكاء الاصطناعي استخدامها داخل مساحة العمل لديك. استخدم `defineSkill()` لتعريف مهارات مع تحقّق مدمج:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'التواصل البيعي',
description: 'يرشد وكيل الذكاء الاصطناعي خلال عملية منظّمة للتواصل البيعي',
icon: 'IconBrain',
content: `أنت مساعد للتواصل البيعي. عند التواصل مع عميل محتمل:
1. ابحث عن الشركة وآخر الأخبار
2. حدِّد دور العميل المحتمل ونقاط الألم المرجّحة
3. صِغ رسالة مخصّصة تشير إلى تفاصيل محدّدة
4. حافظ على نبرة احترافية ولكن حوارية`,
});
```
النقاط الرئيسية:
* `name` هي سلسلة معرّف فريدة للمهارة (يُنصَح باستخدام kebab-case).
* `label` هو اسم العرض المقروء للبشر الظاهر في واجهة المستخدم.
* `content` يحتوي على تعليمات المهارة — وهو النص الذي يستخدمه وكيل الذكاء الاصطناعي.
* `icon` (اختياري) يحدّد الأيقونة المعروضة في واجهة المستخدم.
* `description` (اختياري) يوفّر سياقًا إضافيًا حول غرض المهارة.
يمكنك إنشاء مهارات جديدة بطريقتين:
* **مُنشأ بالقالب**: شغِّل `yarn twenty entity:add` واختر خيار إضافة مهارة جديدة.
* **يدوي**: أنشئ ملفًا جديدًا واستخدم `defineSkill()` مع اتباع النمط نفسه.
### عميل مُولَّد مضبوط الأنواع
يُولَّد العميل مضبوط الأنواع تلقائيًا بواسطة `yarn twenty app:dev` ويُخزَّن في `node_modules/twenty-sdk/generated` استنادًا إلى مخطط مساحة العمل لديك. استخدمه في وظائفك:
@@ -683,6 +807,53 @@ const { me } = await client.query({ me: { id: true, displayName: true } });
* تُحدَّد أذونات مفتاح واجهة برمجة التطبيقات بواسطة الدور المشار إليه في `application-config.ts` عبر `defaultRoleUniversalIdentifier`. هذا هو الدور الافتراضي الذي تستخدمه الوظائف المنطقية في تطبيقك.
* يمكن للتطبيقات تعريف أدوار لاتباع مبدأ أقل الامتياز. امنح فقط الأذونات التي تحتاجها وظائفك، ثم وجّه `defaultRoleUniversalIdentifier` إلى المعرّف الشامل لذلك الدور.
#### رفع الملفات
يتضمن العميل `Twenty` المُولَّد طريقة `uploadFile` لإرفاق الملفات بالحقول من نوع ملف ضمن كائنات مساحة العمل الخاصة بك. نظرًا لأن عملاء GraphQL القياسيون لا يدعمون تحميل الملفات متعددة الأجزاء افتراضيًا، يوفر العميل هذه الطريقة المخصصة التي تطبق [مواصفة طلب GraphQL متعدد الأجزاء](https://github.com/jaydenseric/graphql-multipart-request-spec) في الخلفية.
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
توقيع الطريقة:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| المعلمة | النوع | الوصف |
| ---------------------------------- | -------- | ---------------------------------------------------------------------------------- |
| `fileBuffer` | `Buffer` | المحتوى الخام للملف |
| `filename` | `string` | اسم الملف (يُستخدم للتخزين والعرض) |
| `contentType` | `string` | نوع MIME للملف (القيمة الافتراضية هي `application/octet-stream` إذا لم يتم تحديده) |
| `fieldMetadataUniversalIdentifier` | `string` | قيمة `universalIdentifier` لحقل نوع الملف في كائنك |
النقاط الرئيسية:
* ترسل هذه الطريقة الملف إلى **نقطة نهاية البيانات الوصفية** (وليست نقطة النهاية الرئيسية لـ GraphQL)، حيث تُنفَّذ عملية الرفع.
* تستخدم `universalIdentifier` الخاص بالحقل (وليس المعرّف الخاص بمساحة العمل)، ليعمل كود الرفع لديك عبر أي مساحة عمل مُثبَّت فيها تطبيقك — بما يتماشى مع كيفية إشارة التطبيقات إلى الحقول في كل مكان آخر.
* العنوان `url` المُعاد هو عنوان URL موقّع يمكنك استخدامه للوصول إلى الملف المرفوع.
### مثال Hello World
استكشف مثالًا بسيطًا شاملًا من البداية إلى النهاية يوضح الكائنات والوظائف المنطقية والمكوّنات الأمامية ومشغّلات متعددة [هنا](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Aplikace vám umožňují vytvářet a spravovat přizpůsobení Twenty **jako k
* Definujte vlastní objekty a pole jako kód (spravovaný datový model)
* Vytvářejte logické funkce s vlastními spouštěči
* Definujte dovednosti agentů AI
* Nasazujte stejnou aplikaci do více pracovních prostorů
## Předpoklady
@@ -27,7 +28,7 @@ Aplikace vám umožňují vytvářet a spravovat přizpůsobení Twenty **jako k
Vytvořte novou aplikaci pomocí oficiálního scaffolderu, poté se ověřte a začněte vyvíjet:
```bash filename="Terminal"
# Vygenerujte kostru nové aplikace
# Vygenerujte kostru nové aplikace (ve výchozím nastavení zahrnuje všechny příklady)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
Nástroj pro generování kostry podporuje tři režimy pro řízení toho, které ukázkové soubory jsou zahrnuty:
```bash filename="Terminal"
# Výchozí (úplný): všechny příklady (objekt, pole, logická funkce, front-endová komponenta, zobrazení, položka navigační nabídky, dovednost)
npx create-twenty-app@latest my-app
# Minimální: pouze základní soubory (application-config.ts a default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interaktivní: vyberte, které příklady zahrnout
npx create-twenty-app@latest my-app --interactive
```
Odtud můžete:
```bash filename="Terminal"
@@ -54,6 +68,9 @@ yarn twenty function:logs
# Spusťte funkci podle názvu
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Spusťte postinstalační funkci
yarn twenty function:execute --postInstall
# Odinstalujte aplikaci z aktuálního pracovního prostoru
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Když spustíte `npx create-twenty-app@latest my-twenty-app`, scaffolder:
* Zkopíruje minimální základní aplikaci do `my-twenty-app/`
* Přidá lokální závislost `twenty-sdk` a konfiguraci pro Yarn 4
* Vytvoří konfigurační soubory a skripty napojené na `twenty` CLI
* Vygeneruje výchozí konfiguraci aplikace a výchozí roli funkcí
* Vygeneruje základní soubory (konfigurace aplikace, výchozí role funkcí, postinstalační funkce) a k nim ukázkové soubory podle zvoleného režimu generování kostry
Čerstvě vytvořená aplikace vypadá takto:
Čerstvě vygenerovaná aplikace s výchozím režimem `--exhaustive` vypadá takto:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -91,12 +108,25 @@ my-twenty-app/
├── application-config.ts # Povinné hlavní konfigurace aplikace
├── roles/
│ └── default-role.ts # Výchozí role pro logické funkce
├── objects/
│ └── example-object.ts # Ukázková definice vlastního objektu
├── fields/
│ └── example-field.ts # Ukázková samostatná definice pole
├── logic-functions/
── hello-world.ts # Ukázková logická funkce
└── front-components/
└── hello-world.tsx # Ukázková front-endová komponenta
── hello-world.ts # Ukázková logická funkce
└── post-install.ts # Postinstalační logická funkce
├── front-components/
│ └── hello-world.tsx # Ukázková front-endová komponenta
├── views/
│ └── example-view.ts # Ukázková definice uloženého zobrazení
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Ukázkový odkaz postranní navigace
└── skills/
└── example-skill.ts # Ukázková definice dovednosti agenta AI
```
S volbou `--minimal` se vytvoří pouze základní soubory (`application-config.ts`, `roles/default-role.ts` a `logic-functions/post-install.ts`). S volbou `--interactive` si vyberete, které ukázkové soubory chcete zahrnout.
V kostce:
* **package.json**: Deklaruje název aplikace, verzi, engines (Node 24+, Yarn 4) a přidává `twenty-sdk` plus skript `twenty`, který deleguje na lokální `twenty` CLI. Spusťte `yarn twenty help` pro výpis všech dostupných příkazů.
@@ -112,13 +142,16 @@ V kostce:
SDK detekuje entity analýzou vašich souborů TypeScript a hledá volání **`export default define<Entity>({...})`**. Každý typ entity má odpovídající pomocnou funkci exportovanou z `twenty-sdk`:
| Pomocná funkce | Typ entity |
| ------------------------ | ------------------------------------- |
| `defineObject()` | Definice vlastních objektů |
| `defineLogicFunction()` | Definice logických funkcí |
| `defineFrontComponent()` | Definice frontendových komponent |
| `defineRole()` | Definice rolí |
| `defineField()` | Rozšíření polí u existujících objektů |
| Pomocná funkce | Typ entity |
| ---------------------------- | ------------------------------------- |
| `defineObject()` | Definice vlastních objektů |
| `defineLogicFunction()` | Definice logických funkcí |
| `defineFrontComponent()` | Definice frontendových komponent |
| `defineRole()` | Definice rolí |
| `defineField()` | Rozšíření polí u existujících objektů |
| `defineView()` | Definice uložených zobrazení |
| `defineNavigationMenuItem()` | Definice položek navigační nabídky |
| `defineSkill()` | Definice dovedností agenta AI |
<Note>
**Pojmenování souborů je flexibilní.** Detekce entit je založená na AST — SDK prochází vaše zdrojové soubory a hledá vzor `export default define<Entity>({...})`. Soubory a složky můžete organizovat, jak chcete. Seskupování podle typu entity (např. `logic-functions/`, `roles/`) je pouze konvence pro organizaci kódu, nikoli požadavek.
@@ -140,7 +173,7 @@ export default defineObject({
Pozdější příkazy přidají další soubory a složky:
* `yarn twenty app:dev` automaticky vygeneruje typovaného klienta API v `node_modules/twenty-sdk/generated` (typovaný klient Twenty + typy pracovního prostoru).
* `yarn twenty entity:add` přidá soubory s definicemi entit do `src/` pro vaše vlastní objekty, funkce, frontové komponenty nebo role.
* `yarn twenty entity:add` přidá soubory s definicemi entit do `src/` pro vaše vlastní objekty, funkce, frontové komponenty, role, dovednosti a další.
## Ověření
@@ -183,14 +216,17 @@ twenty-sdk poskytuje typované stavební bloky a pomocné funkce, které použí
SDK poskytuje pomocné funkce pro definování entit vaší aplikace. Jak je popsáno v [Detekce entit](#entity-detection), musíte použít `export default define<Entity>({...})`, aby byly vaše entity detekovány:
| Funkce | Účel |
| ------------------------ | ----------------------------------------------------------------- |
| `defineApplication()` | Nakonfigurujte metadata aplikace (povinné, jedno na aplikaci) |
| `defineObject()` | Definice vlastních objektů s poli |
| `defineLogicFunction()` | Definice logických funkcí s obslužnými funkcemi |
| `defineFrontComponent()` | Definujte frontendové komponenty pro vlastní uživatelské rozhraní |
| `defineRole()` | Konfigurace oprávnění rolí a přístupu k objektům |
| `defineField()` | Rozšiřte existující objekty o další pole |
| Funkce | Účel |
| ---------------------------- | ----------------------------------------------------------------- |
| `defineApplication()` | Nakonfigurujte metadata aplikace (povinné, jedno na aplikaci) |
| `defineObject()` | Definice vlastních objektů s poli |
| `defineLogicFunction()` | Definice logických funkcí s obslužnými funkcemi |
| `defineFrontComponent()` | Definujte frontendové komponenty pro vlastní uživatelské rozhraní |
| `defineRole()` | Konfigurace oprávnění rolí a přístupu k objektům |
| `defineField()` | Rozšiřte existující objekty o další pole |
| `defineView()` | Definujte uložená zobrazení pro objekty |
| `defineNavigationMenuItem()` | Definujte odkazy postranní navigace |
| `defineSkill()` | Definuje dovednosti agenta AI |
Tyto funkce validují vaši konfiguraci v době sestavení a poskytují automatické doplňování v IDE a typovou bezpečnost.
@@ -290,6 +326,7 @@ Každá aplikace má jeden soubor `application-config.ts`, který popisuje:
* **Identitu aplikace**: identifikátory, zobrazovaný název a popis.
* **Jak běží její funkce**: kterou roli používají pro oprávnění.
* **(Volitelné) proměnné**: dvojice klíč–hodnota zpřístupněné vašim funkcím jako proměnné prostředí.
* **(Volitelná) postinstalační funkce**: logická funkce, která se spouští po instalaci aplikace.
Use `defineApplication()` to define your application configuration:
@@ -297,6 +334,7 @@ Use `defineApplication()` to define your application configuration:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Poznámky:
* Pole `universalIdentifier` jsou deterministická ID, která vlastníte; vygenerujte je jednou a udržujte je stabilní napříč synchronizacemi.
* `applicationVariables` se stanou proměnnými prostředí pro vaše funkce (například `DEFAULT_RECIPIENT_NAME` je dostupné jako `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` se musí shodovat se souborem role (viz níže).
* `postInstallLogicFunctionUniversalIdentifier` (volitelné) odkazuje na logickou funkci, která se automaticky spustí po instalaci aplikace. Viz [Postinstalační funkce](#post-install-functions).
#### Role a oprávnění
@@ -458,6 +498,55 @@ Poznámky:
* Pole `triggers` je volitelné. Funkce bez spouštěčů lze použít jako pomocné funkce volané jinými funkcemi.
* V jedné funkci můžete kombinovat více typů spouštěčů.
### Postinstalační funkce
Postinstalační funkce je logická funkce, která se automaticky spouští po instalaci vaší aplikace do pracovního prostoru. To je užitečné pro jednorázové úlohy nastavení, jako je naplnění výchozími daty, vytvoření počátečních záznamů nebo konfigurace nastavení pracovního prostoru.
Když vygenerujete kostru nové aplikace pomocí `create-twenty-app`, vytvoří se pro vás postinstalační funkce v `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
Funkce je připojena do vaší aplikace odkazem na její univerzální identifikátor v `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Postinstalační funkci můžete také kdykoli spustit ručně pomocí CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Hlavní body:
* Postinstalační funkce jsou standardní logické funkce — používají `defineLogicFunction()` stejně jako jakákoli jiná funkce.
* Pole `postInstallLogicFunctionUniversalIdentifier` v `defineApplication()` je volitelné. Pokud je vynecháno, po instalaci se nespustí žádná funkce.
* Výchozí časový limit je nastaven na 300 sekund (5 minut), aby umožnil delší úlohy nastavení, jako je naplnění daty.
* Postinstalační funkce nepotřebují spouštěče — jsou spouštěny platformou během instalace nebo ručně pomocí `function:execute --postInstall`.
### Payload spouštěče trasy
<Warning>
@@ -657,6 +746,41 @@ Nové frontendové komponenty můžete vytvořit dvěma způsoby:
* **Vygenerované**: Spusťte `yarn twenty entity:add` a zvolte možnost přidat novou frontendovou komponentu.
* **Ruční**: Vytvořte nový soubor `*.front-component.tsx` a použijte `defineFrontComponent()`.
### Dovednosti
Dovednosti definují znovupoužitelné pokyny a schopnosti, které mohou agenti AI používat ve vašem pracovním prostoru. K definování dovedností s vestavěnou validací použijte `defineSkill()`:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Hlavní body:
* `name` je jedinečný identifikátor dovednosti (doporučuje se kebab-case).
* `label` je uživatelsky čitelný název zobrazovaný v UI.
* `content` obsahuje pokyny dovednosti — je to text, který agent AI používá.
* `icon` (volitelné) nastavuje ikonu zobrazovanou v UI.
* `description` (volitelné) poskytuje doplňující kontext o účelu dovednosti.
Nové dovednosti můžete vytvářet dvěma způsoby:
* **Vygenerované**: Spusťte `yarn twenty entity:add` a zvolte možnost přidat novou dovednost.
* **Ruční**: Vytvořte nový soubor a použijte `defineSkill()` podle stejného vzoru.
### Generovaný typovaný klient
Typovaný klient je automaticky generován pomocí `yarn twenty app:dev` a ukládá se do `node_modules/twenty-sdk/generated` podle schématu vašeho pracovního prostoru. Použijte jej ve svých funkcích:
@@ -683,6 +807,53 @@ Poznámky:
* Oprávnění klíče API jsou určena rolí odkazovanou ve vašem `application-config.ts` prostřednictvím `defaultRoleUniversalIdentifier`. Toto je výchozí role používaná logickými funkcemi vaší aplikace.
* Aplikace mohou definovat role podle principu nejmenších oprávnění. Udělte pouze oprávnění, která vaše funkce potřebují, a poté nastavte `defaultRoleUniversalIdentifier` na univerzální identifikátor této role.
#### Nahrávání souborů
Vygenerovaný klient `Twenty` obsahuje metodu `uploadFile` pro připojování souborů k polím typu souboru u objektů ve vašem pracovním prostoru. Protože standardní klienti GraphQL nativně nepodporují nahrávání souborů pomocí multipart, klient poskytuje tuto speciální metodu, která interně implementuje [specifikaci multipart požadavků GraphQL](https://github.com/jaydenseric/graphql-multipart-request-spec).
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
Signatura metody:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parametr | Typ | Popis |
| ---------------------------------- | -------- | --------------------------------------------------------------------------- |
| `fileBuffer` | `Buffer` | Surový obsah souboru |
| `filename` | `string` | Název souboru (používá se pro ukládání a zobrazení) |
| `contentType` | `string` | Typ MIME souboru (pokud je vynechán, výchozí je `application/octet-stream`) |
| `fieldMetadataUniversalIdentifier` | `string` | `universalIdentifier` pole typu souboru ve vašem objektu |
Hlavní body:
* Metoda odešle soubor na **koncový bod metadat** (nikoli na hlavní koncový bod GraphQL), kde se provede mutace nahrání.
* Používá `universalIdentifier` pole (nikoli jeho ID specifické pro pracovní prostor), takže váš kód pro nahrávání funguje ve všech pracovních prostorech, kde je vaše aplikace nainstalována — v souladu s tím, jak aplikace odkazují na pole všude jinde.
* Vrácená hodnota `url` je podepsaná adresa URL, kterou můžete použít k přístupu k nahranému souboru.
### Příklad Hello World
Prozkoumejte minimalistický end-to-end příklad, který demonstruje objekty, logické funkce, frontendové komponenty a více spouštěčů [zde](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Mit Apps können Sie Twenty-Anpassungen **als Code** erstellen und verwalten. An
* Benutzerdefinierte Objekte und Felder als Code definieren (verwaltetes Datenmodell)
* Logikfunktionen mit benutzerdefinierten Triggern erstellen
* Fähigkeiten für KI-Agenten definieren
* Dieselbe App in mehreren Workspaces bereitstellen
## Voraussetzungen
@@ -27,7 +28,7 @@ Mit Apps können Sie Twenty-Anpassungen **als Code** erstellen und verwalten. An
Erstellen Sie mit dem offiziellen Scaffolder eine neue App, authentifizieren Sie sich und beginnen Sie mit der Entwicklung:
```bash filename="Terminal"
# Eine neue App erstellen
# Eine neue App erstellen (enthält standardmäßig alle Beispiele)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
Das Scaffolding-Tool unterstützt drei Modi, um zu steuern, welche Beispieldateien enthalten sind:
```bash filename="Terminal"
# Standard (umfassend): alle Beispiele (Objekt, Feld, Logikfunktion, Frontend-Komponente, View, Navigationsmenüeintrag, Skill)
npx create-twenty-app@latest my-app
# Minimal: nur Kerndateien (application-config.ts und default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interaktiv: wähle aus, welche Beispiele enthalten sein sollen
npx create-twenty-app@latest my-app --interactive
```
Von hier aus können Sie:
```bash filename="Terminal"
@@ -54,6 +68,9 @@ yarn twenty function:logs
# Eine Funktion anhand ihres Namens ausführen
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Die Post-Installationsfunktion ausführen
yarn twenty function:execute --postInstall
# Die Anwendung aus dem aktuellen Arbeitsbereich deinstallieren
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Wenn Sie `npx create-twenty-app@latest my-twenty-app` ausführen, erledigt der S
* Kopiert eine minimale Basisanwendung nach `my-twenty-app/`
* Fügt eine lokale `twenty-sdk`-Abhängigkeit und die Yarn-4-Konfiguration hinzu
* Erstellt Konfigurationsdateien und Skripte, die an die `twenty`-CLI angebunden sind
* Generiert eine Standard-Anwendungskonfiguration und eine Standard-Funktionsrolle
* Erzeugt Kerndateien (Anwendungskonfiguration, Standardrolle für Logikfunktionen, Post-Installationsfunktion) sowie Beispieldateien entsprechend dem Scaffolding-Modus
Eine frisch erzeugte App sieht so aus:
Eine frisch erstellte App mit dem Standardmodus `--exhaustive` sieht so aus:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -86,17 +103,30 @@ my-twenty-app/
eslint.config.mjs
tsconfig.json
README.md
public/ # Public assets folder (images, fonts, etc.)
public/ # Ordner für öffentliche Assets (Bilder, Schriftarten usw.)
src/
├── application-config.ts # Required - main application configuration
├── application-config.ts # Erforderlich - Hauptkonfiguration der Anwendung
├── roles/
│ └── default-role.ts # Default role for logic functions
│ └── default-role.ts # Standardrolle für Logikfunktionen
├── objects/
│ └── example-object.ts # Beispiel für eine benutzerdefinierte Objektdefinition
├── fields/
│ └── example-field.ts # Beispiel für eine eigenständige Felddefinition
├── logic-functions/
── hello-world.ts # Example logic function
└── front-components/
└── hello-world.tsx # Example front component
── hello-world.ts # Beispiel für eine Logikfunktion
└── post-install.ts # Post-Installations-Logikfunktion
├── front-components/
│ └── hello-world.tsx # Beispiel für eine Frontend-Komponente
├── views/
│ └── example-view.ts # Beispiel für eine gespeicherte View-Definition
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Beispiel für einen Navigationslink in der Seitenleiste
└── skills/
└── example-skill.ts # Beispiel für eine Skill-Definition eines KI-Agenten
```
Mit `--minimal` werden nur die Kerndateien erstellt (`application-config.ts`, `roles/default-role.ts` und `logic-functions/post-install.ts`). Mit `--interactive` wählst du aus, welche Beispieldateien enthalten sein sollen.
Auf hoher Ebene:
* **package.json**: Deklariert den App-Namen, die Version und die Engines (Node 24+, Yarn 4) und fügt `twenty-sdk` sowie ein `twenty`-Skript hinzu, das an die lokale `twenty`-CLI delegiert. Führe `yarn twenty help` aus, um alle verfügbaren Befehle aufzulisten.
@@ -112,13 +142,16 @@ Auf hoher Ebene:
Das SDK erkennt Entitäten, indem es Ihre TypeScript-Dateien nach Aufrufen von **`export default define<Entity>({...})`** parst. Für jeden Entitätstyp gibt es eine entsprechende Hilfsfunktion, die aus `twenty-sdk` exportiert wird:
| Hilfsfunktion | Entitätstyp |
| ------------------------ | ---------------------------------------- |
| `defineObject()` | Benutzerdefinierte Objektdefinitionen |
| `defineLogicFunction()` | Definitionen von Logikfunktionen |
| `defineFrontComponent()` | Definitionen von Frontend-Komponenten |
| `defineRole()` | Rollendefinitionen |
| `defineField()` | Felderweiterungen für bestehende Objekte |
| Hilfsfunktion | Entitätstyp |
| ---------------------------- | ----------------------------------------- |
| `defineObject()` | Benutzerdefinierte Objektdefinitionen |
| `defineLogicFunction()` | Definitionen von Logikfunktionen |
| `defineFrontComponent()` | Definitionen von Frontend-Komponenten |
| `defineRole()` | Rollendefinitionen |
| `defineField()` | Felderweiterungen für bestehende Objekte |
| `defineView()` | Gespeicherte View-Definitionen |
| `defineNavigationMenuItem()` | Definitionen von Navigationsmenüeinträgen |
| `defineSkill()` | Skill-Definitionen für KI-Agenten |
<Note>
**Dateibenennung ist flexibel.** Die Entitätserkennung ist AST-basiert — das SDK durchsucht Ihre Quelldateien nach dem Muster `export default define<Entity>({...})`. Sie können Ihre Dateien und Ordner nach Belieben organisieren. Die Gruppierung nach Entitätstyp (z. B. `logic-functions/`, `roles/`) ist lediglich eine Konvention zur Codeorganisation, keine Voraussetzung.
@@ -140,7 +173,7 @@ export default defineObject({
Spätere Befehle fügen weitere Dateien und Ordner hinzu:
* `yarn twenty app:dev` generiert automatisch einen typisierten API-Client in `node_modules/twenty-sdk/generated` (typisierter Twenty-Client + Arbeitsbereichs-Typen).
* `yarn twenty entity:add` fügt unter `src/` Entitätsdefinitionsdateien für benutzerdefinierte Objekte, Funktionen, Frontend-Komponenten oder Rollen hinzu.
* `yarn twenty entity:add` fügt unter `src/` Entitätsdefinitionsdateien für Ihre benutzerdefinierten Objekte, Funktionen, Frontend-Komponenten, Rollen, Skills und mehr hinzu.
## Authentifizierung
@@ -183,14 +216,17 @@ Das twenty-sdk stellt typisierte Bausteine und Hilfsfunktionen bereit, die Sie i
Das SDK stellt Hilfsfunktionen bereit, um die Entitäten Ihrer App zu definieren. Wie in [Entitätserkennung](#entity-detection) beschrieben, müssen Sie `export default define<Entity>({...})` verwenden, damit Ihre Entitäten erkannt werden:
| Funktion | Zweck |
| ------------------------ | -------------------------------------------------------------- |
| `defineApplication()` | Anwendungsmetadaten konfigurieren (erforderlich, eine pro App) |
| `defineObject()` | Benutzerdefinierte Objekte mit Feldern definieren |
| `defineLogicFunction()` | Logikfunktionen mit Handlern definieren |
| `defineFrontComponent()` | Frontend-Komponenten für benutzerdefinierte UI definieren |
| `defineRole()` | Rollenberechtigungen und Objektzugriff konfigurieren |
| `defineField()` | Bestehende Objekte mit zusätzlichen Feldern erweitern |
| Funktion | Zweck |
| ---------------------------- | -------------------------------------------------------------- |
| `defineApplication()` | Anwendungsmetadaten konfigurieren (erforderlich, eine pro App) |
| `defineObject()` | Benutzerdefinierte Objekte mit Feldern definieren |
| `defineLogicFunction()` | Logikfunktionen mit Handlern definieren |
| `defineFrontComponent()` | Frontend-Komponenten für benutzerdefinierte UI definieren |
| `defineRole()` | Rollenberechtigungen und Objektzugriff konfigurieren |
| `defineField()` | Bestehende Objekte mit zusätzlichen Feldern erweitern |
| `defineView()` | Gespeicherte Views für Objekte definieren |
| `defineNavigationMenuItem()` | Seitenleisten-Navigationslinks definieren |
| `defineSkill()` | Definieren Sie Skills für KI-Agenten |
Diese Funktionen validieren Ihre Konfiguration zur Build-Zeit und bieten IDE-Autovervollständigung sowie Typsicherheit.
@@ -290,6 +326,7 @@ Jede App hat eine einzelne Datei `application-config.ts`, die Folgendes beschrei
* **Was die App ist**: Bezeichner, Anzeigename und Beschreibung.
* **Wie ihre Funktionen ausgeführt werden**: welche Rolle sie für Berechtigungen verwenden.
* **(Optional) Variablen**: SchlüsselWert-Paare, die Ihren Funktionen als Umgebungsvariablen zur Verfügung gestellt werden.
* **(Optional) Post-Installationsfunktion**: eine Logikfunktion, die nach der Installation der App ausgeführt wird.
Verwenden Sie `defineApplication()`, um Ihre Anwendungskonfiguration zu definieren:
@@ -297,6 +334,7 @@ Verwenden Sie `defineApplication()`, um Ihre Anwendungskonfiguration zu definier
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Notizen:
* `universalIdentifier`-Felder sind deterministische IDs, die Sie besitzen; generieren Sie sie einmal und halten Sie sie über Synchronisierungen hinweg stabil.
* `applicationVariables` werden zu Umgebungsvariablen für Ihre Funktionen (zum Beispiel ist `DEFAULT_RECIPIENT_NAME` als `process.env.DEFAULT_RECIPIENT_NAME` verfügbar).
* `defaultRoleUniversalIdentifier` muss mit der Rollendatei übereinstimmen (siehe unten).
* `postInstallLogicFunctionUniversalIdentifier` (optional) verweist auf eine Logikfunktion, die nach der Installation der App automatisch ausgeführt wird. Siehe [Post-Installationsfunktionen](#post-install-functions).
#### Rollen und Berechtigungen
@@ -458,6 +498,55 @@ Notizen:
* Das Array `triggers` ist optional. Funktionen ohne Trigger können als von anderen Funktionen aufgerufene Utility-Funktionen verwendet werden.
* Sie können mehrere Trigger-Typen in einer Funktion kombinieren.
### Post-Installationsfunktionen
Eine Post-Installationsfunktion ist eine Logikfunktion, die automatisch ausgeführt wird, nachdem Ihre App in einem Arbeitsbereich installiert wurde. Dies ist nützlich für einmalige Einrichtungsvorgänge wie das Befüllen mit Standarddaten, das Erstellen erster Datensätze oder das Konfigurieren von Arbeitsbereichseinstellungen.
Wenn du mit `create-twenty-app` eine neue App erstellst, wird für dich eine Post-Installationsfunktion unter `src/logic-functions/post-install.ts` erzeugt:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
Die Funktion wird in deine App eingebunden, indem ihr universeller Bezeichner in `application-config.ts` referenziert wird:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Du kannst die Post-Installationsfunktion auch jederzeit manuell über die CLI ausführen:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Hauptpunkte:
* Post-Installationsfunktionen sind Standard-Logikfunktionen — sie verwenden `defineLogicFunction()` wie jede andere Funktion.
* Das Feld `postInstallLogicFunctionUniversalIdentifier` in `defineApplication()` ist optional. Wenn es weggelassen wird, wird nach der Installation keine Funktion ausgeführt.
* Das standardmäßige Timeout ist auf 300 Sekunden (5 Minuten) festgelegt, um längere Einrichtungsvorgänge wie Daten-Seeding zu ermöglichen.
* Post-Installationsfunktionen benötigen keine Trigger — sie werden von der Plattform während der Installation oder manuell über `function:execute --postInstall` aufgerufen.
### Routen-Trigger-Payload
<Warning>
@@ -657,6 +746,41 @@ Sie können neue Frontend-Komponenten auf zwei Arten erstellen:
* **Generiert**: Führen Sie `yarn twenty entity:add` aus und wählen Sie die Option zum Hinzufügen einer neuen Frontend-Komponente.
* **Manuell**: Erstellen Sie eine neue `*.front-component.tsx`-Datei und verwenden Sie `defineFrontComponent()`.
### Fähigkeiten
Skills definieren wiederverwendbare Anweisungen und Fähigkeiten, die KI-Agenten in Ihrem Arbeitsbereich verwenden können. Verwenden Sie `defineSkill()`, um Skills mit eingebauter Validierung zu definieren:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Hauptpunkte:
* `name` ist eine eindeutige Kennung (als Zeichenfolge) für den Skill (kebab-case empfohlen).
* `label` ist der menschenlesbare Anzeigename, der in der UI angezeigt wird.
* `content` enthält die Skill-Anweisungen — dies ist der Text, den der KI-Agent verwendet.
* `icon` (optional) legt das in der UI angezeigte Symbol fest.
* `description` (optional) liefert zusätzlichen Kontext zum Zweck des Skills.
Sie können neue Skills auf zwei Arten erstellen:
* **Generiert**: Führen Sie `yarn twenty entity:add` aus und wählen Sie die Option zum Hinzufügen eines neuen Skills.
* **Manuell**: Erstellen Sie eine neue Datei und verwenden Sie `defineSkill()` nach demselben Muster.
### Generierter typisierter Client
Der typisierte Client wird von `yarn twenty app:dev` automatisch generiert und basierend auf Ihrem Arbeitsbereichs-Schema in `node_modules/twenty-sdk/generated` gespeichert. Verwenden Sie ihn in Ihren Funktionen:
@@ -683,6 +807,53 @@ Notizen:
* Die Berechtigungen des API-Schlüssels werden durch die Rolle bestimmt, auf die in Ihrer `application-config.ts` über `defaultRoleUniversalIdentifier` verwiesen wird. Dies ist die Standardrolle, die von den Logikfunktionen Ihrer Anwendung verwendet wird.
* Anwendungen können Rollen definieren, um das Least-Privilege-Prinzip einzuhalten. Gewähren Sie nur die Berechtigungen, die Ihre Funktionen benötigen, und verweisen Sie dann mit `defaultRoleUniversalIdentifier` auf den universellen Bezeichner dieser Rolle.
#### Dateien hochladen
Der generierte `Twenty`-Client enthält eine Methode `uploadFile`, um Dateien an Felder des Typs Datei in Ihren Arbeitsbereichsobjekten anzuhängen. Da Standard-GraphQL-Clients Multipart-Datei-Uploads nicht nativ unterstützen, stellt der Client diese dedizierte Methode bereit, die unter der Haube die [GraphQL-Multipart-Anfragespezifikation](https://github.com/jaydenseric/graphql-multipart-request-spec) implementiert.
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
Die Methodensignatur:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parameter | Typ | Beschreibung |
| ---------------------------------- | -------- | ------------------------------------------------------------------------------- |
| `fileBuffer` | `Buffer` | Der Rohinhalt der Datei |
| `filename` | `string` | Der Name der Datei (wird für Speicherung und Anzeige verwendet) |
| `contentType` | `string` | MIME-Typ der Datei (standardmäßig `application/octet-stream`, wenn weggelassen) |
| `fieldMetadataUniversalIdentifier` | `string` | Der `universalIdentifier` des Dateityp-Felds in Ihrem Objekt |
Hauptpunkte:
* Die Methode sendet die Datei an den **metadata endpoint** (nicht den main GraphQL endpoint), wo die Upload-Mutation ausgeführt wird.
* Sie verwendet den `universalIdentifier` des Feldes (nicht dessen arbeitsbereichsspezifische ID), sodass Ihr Upload-Code in jedem Arbeitsbereich funktioniert, in dem Ihre App installiert ist — im Einklang damit, wie Apps Felder überall sonst referenzieren.
* Die zurückgegebene `url` ist eine signierte URL, mit der Sie auf die hochgeladene Datei zugreifen können.
### Hello-World-Beispiel
Ein minimales End-to-End-Beispiel, das Objekte, Logikfunktionen, Frontend-Komponenten und mehrere Trigger demonstriert, finden Sie [hier](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Le app ti consentono di creare e gestire le personalizzazioni di Twenty **come c
* Definisci oggetti e campi personalizzati come codice (modello dati gestito)
* Crea funzioni logiche con trigger personalizzati
* Definire le abilità per gli agenti IA
* Distribuisci la stessa app su più spazi di lavoro
## Prerequisiti
@@ -27,7 +28,7 @@ Le app ti consentono di creare e gestire le personalizzazioni di Twenty **come c
Crea una nuova app utilizzando lo scaffolder ufficiale, quindi autenticati e inizia a sviluppare:
```bash filename="Terminal"
# Crea lo scaffold di una nuova app
# Crea lo scaffold di una nuova app (include tutti gli esempi per impostazione predefinita)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
Lo strumento di scaffolding supporta tre modalità per controllare quali file di esempio vengono inclusi:
```bash filename="Terminal"
# Default (exhaustive): all examples (object, field, logic function, front component, view, navigation menu item, skill)
npx create-twenty-app@latest my-app
# Minimal: only core files (application-config.ts and default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interactive: select which examples to include
npx create-twenty-app@latest my-app --interactive
```
Da qui puoi:
```bash filename="Terminal"
@@ -52,7 +66,10 @@ yarn twenty entity:add
yarn twenty function:logs
# Esegui una funzione per nome
yarn twenty function:execute -n my-function -p '{\"name\": \"test\"}'
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Esegui la funzione post-installazione
yarn twenty function:execute --postInstall
# Disinstalla l'applicazione dallo spazio di lavoro corrente
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Quando esegui `npx create-twenty-app@latest my-twenty-app`, lo scaffolder:
* Copia un'applicazione base minimale in `my-twenty-app/`
* Aggiunge una dipendenza locale `twenty-sdk` e la configurazione di Yarn 4
* Crea file di configurazione e script collegati alla CLI `twenty`
* Genera una configurazione applicativa predefinita e un ruolo funzione predefinito
* Genera i file principali (configurazione dell'applicazione, ruolo predefinito per le funzioni logiche, funzione di post-installazione) più i file di esempio in base alla modalità di scaffolding
Un'app appena generata dallo scaffolder si presenta così:
Un'app appena creata con la modalità predefinita `--exhaustive` si presenta così:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -86,17 +103,30 @@ my-twenty-app/
eslint.config.mjs
tsconfig.json
README.md
public/ # Cartella delle risorse pubbliche (immagini, font, ecc.)
public/ # Public assets folder (images, fonts, etc.)
src/
├── application-config.ts # Obbligatorio - configurazione principale dell'applicazione
├── application-config.ts # Required - main application configuration
├── roles/
│ └── default-role.ts # Ruolo predefinito per le funzioni logiche
│ └── default-role.ts # Default role for logic functions
├── objects/
│ └── example-object.ts # Example custom object definition
├── fields/
│ └── example-field.ts # Example standalone field definition
├── logic-functions/
── hello-world.ts # Funzione logica di esempio
└── front-components/
└── hello-world.tsx # Componente front-end di esempio
── hello-world.ts # Example logic function
└── post-install.ts # Post-install logic function
├── front-components/
│ └── hello-world.tsx # Example front component
├── views/
│ └── example-view.ts # Example saved view definition
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
└── skills/
└── example-skill.ts # Example AI agent skill definition
```
Con `--minimal`, vengono creati solo i file principali (`application-config.ts`, `roles/default-role.ts` e `logic-functions/post-install.ts`). Con `--interactive`, scegli quali file di esempio includere.
A livello generale:
* **package.json**: Dichiara il nome dell'app, la versione, i motori (Node 24+, Yarn 4) e aggiunge `twenty-sdk` più uno script `twenty` che delega alla CLI locale `twenty`. Esegui `yarn twenty help` per elencare tutti i comandi disponibili.
@@ -112,13 +142,16 @@ A livello generale:
L'SDK rileva le entità analizzando i tuoi file TypeScript alla ricerca di chiamate **`export default define<Entity>({...})`**. Ogni tipo di entità ha una corrispondente funzione helper esportata da `twenty-sdk`:
| Funzione helper | Tipo di entità |
| ------------------------ | ----------------------------------------- |
| `defineObject()` | Definizioni di oggetti personalizzati |
| `defineLogicFunction()` | Definizioni di funzioni logiche |
| `defineFrontComponent()` | Definizioni dei componenti front-end |
| `defineRole()` | Definizioni di ruoli |
| `defineField()` | Estensioni di campo per oggetti esistenti |
| Funzione helper | Tipo di entità |
| ---------------------------- | ---------------------------------------------- |
| `defineObject()` | Definizioni di oggetti personalizzati |
| `defineLogicFunction()` | Definizioni di funzioni logiche |
| `defineFrontComponent()` | Definizioni dei componenti front-end |
| `defineRole()` | Definizioni di ruoli |
| `defineField()` | Estensioni di campo per oggetti esistenti |
| `defineView()` | Definizioni di viste salvate |
| `defineNavigationMenuItem()` | Definizioni delle voci del menu di navigazione |
| `defineSkill()` | AI agent skill definitions |
<Note>
**La denominazione dei file è flessibile.** Il rilevamento delle entità è basato sull'AST — l'SDK esegue la scansione dei file sorgente alla ricerca del pattern `export default define<Entity>({...})`. Puoi organizzare file e cartelle come preferisci. Raggruppare per tipo di entità (ad es., `logic-functions/`, `roles/`) è solo una convenzione per l'organizzazione del codice, non un requisito.
@@ -140,7 +173,7 @@ export default defineObject({
Comandi successivi aggiungeranno altri file e cartelle:
* `yarn twenty app:dev` genererà automaticamente un client API tipizzato in `node_modules/twenty-sdk/generated` (client Twenty tipizzato + tipi dell'area di lavoro).
* `yarn twenty entity:add` aggiungerà file di definizione delle entità sotto `src/` per i tuoi oggetti, funzioni, componenti front-end o ruoli personalizzati.
* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, roles, skills, and more.
## Autenticazione
@@ -183,14 +216,17 @@ Il pacchetto twenty-sdk fornisce blocchi tipizzati e funzioni helper da usare ne
L'SDK fornisce funzioni helper per definire le entità della tua app. Come descritto in [Rilevamento delle entità](#entity-detection), devi usare `export default define<Entity>({...})` affinché le tue entità vengano rilevate:
| Funzione | Scopo |
| ------------------------ | ----------------------------------------------------------------------- |
| `defineApplication()` | Configura i metadati dell'applicazione (obbligatorio, uno per app) |
| `defineObject()` | Definisci oggetti personalizzati con campi |
| `defineLogicFunction()` | Definisci funzioni logiche con handler |
| `defineFrontComponent()` | Definisci componenti front-end per un'interfaccia utente personalizzata |
| `defineRole()` | Configura i permessi dei ruoli e l'accesso agli oggetti |
| `defineField()` | Estendi gli oggetti esistenti con campi aggiuntivi |
| Funzione | Scopo |
| ---------------------------- | ----------------------------------------------------------------------- |
| `defineApplication()` | Configura i metadati dell'applicazione (obbligatorio, uno per app) |
| `defineObject()` | Definisci oggetti personalizzati con campi |
| `defineLogicFunction()` | Definisci funzioni logiche con handler |
| `defineFrontComponent()` | Definisci componenti front-end per un'interfaccia utente personalizzata |
| `defineRole()` | Configura i permessi dei ruoli e l'accesso agli oggetti |
| `defineField()` | Estendi gli oggetti esistenti con campi aggiuntivi |
| `defineView()` | Definisce viste salvate per gli oggetti |
| `defineNavigationMenuItem()` | Definisce i link di navigazione della barra laterale |
| `defineSkill()` | Define AI agent skills |
Queste funzioni convalidano la configurazione in fase di build e offrono il completamento automatico nell'IDE e la sicurezza dei tipi.
@@ -290,6 +326,7 @@ Ogni app ha un singolo file `application-config.ts` che descrive:
* **Identità dell'app**: identificatori, nome visualizzato e descrizione.
* **Come vengono eseguite le sue funzioni**: quale ruolo usano per i permessi.
* **Variabili (opzionali)**: coppie chiavevalore esposte alle funzioni come variabili d'ambiente.
* **(Opzionale) funzione post-installazione**: una funzione logica che viene eseguita dopo l'installazione dell'app.
Usa `defineApplication()` per definire la configurazione della tua applicazione:
@@ -297,6 +334,7 @@ Usa `defineApplication()` per definire la configurazione della tua applicazione:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Note:
* I campi `universalIdentifier` sono ID deterministici sotto il tuo controllo; generali una volta e mantienili stabili tra le sincronizzazioni.
* `applicationVariables` diventano variabili d'ambiente per le tue funzioni (ad esempio, `DEFAULT_RECIPIENT_NAME` è disponibile come `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` deve corrispondere al file del ruolo (vedi sotto).
* `postInstallLogicFunctionUniversalIdentifier` (opzionale) fa riferimento a una funzione logica che viene eseguita automaticamente dopo l'installazione dell'app. Vedi [Funzioni post-installazione](#post-install-functions).
#### Ruoli e permessi
@@ -458,6 +498,55 @@ Note:
* L'array `triggers` è facoltativo. Le funzioni senza trigger possono essere utilizzate come funzioni di utilità richiamate da altre funzioni.
* Puoi combinare più tipi di trigger in un'unica funzione.
### Funzioni post-installazione
Una funzione post-installazione è una funzione logica che viene eseguita automaticamente dopo che la tua app è stata installata in uno spazio di lavoro. Questo è utile per attività di configurazione una tantum come il popolamento di dati predefiniti, la creazione di record iniziali o la configurazione delle impostazioni dello spazio di lavoro.
Quando esegui lo scaffolding di una nuova app con `create-twenty-app`, viene generata automaticamente una funzione di post-installazione in `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
La funzione viene collegata alla tua app facendo riferimento al suo identificatore universale in `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Puoi anche eseguire manualmente la funzione di post-installazione in qualsiasi momento utilizzando la CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Punti chiave:
* Le funzioni di post-installazione sono funzioni logiche standard — usano `defineLogicFunction()` come qualsiasi altra funzione.
* Il campo `postInstallLogicFunctionUniversalIdentifier` in `defineApplication()` è facoltativo. Se omesso, nessuna funzione viene eseguita dopo l'installazione.
* Il timeout predefinito è impostato a 300 secondi (5 minuti) per consentire attività di configurazione più lunghe, come il popolamento dei dati.
* Le funzioni di post-installazione non necessitano di trigger — vengono invocate dalla piattaforma durante l'installazione o manualmente tramite `function:execute --postInstall`.
### Payload del trigger di route
<Warning>
@@ -657,6 +746,41 @@ Puoi creare nuovi componenti front-end in due modi:
* **Generata dallo scaffolder**: Esegui `yarn twenty entity:add` e scegli l'opzione per aggiungere un nuovo componente front-end.
* **Manuale**: Crea un nuovo file `*.front-component.tsx` e usa `defineFrontComponent()`.
### Abilità
Skills define reusable instructions and capabilities that AI agents can use within your workspace. Use `defineSkill()` to define skills with built-in validation:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Punti chiave:
* `name` is a unique identifier string for the skill (kebab-case recommended).
* `label` is the human-readable display name shown in the UI.
* `content` contains the skill instructions — this is the text the AI agent uses.
* `icon` (optional) sets the icon displayed in the UI.
* `description` (optional) provides additional context about the skill's purpose.
You can create new skills in two ways:
* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new skill.
* **Manual**: Create a new file and use `defineSkill()`, following the same pattern.
### Client tipizzato generato
Il client tipizzato è generato automaticamente da `yarn twenty app:dev` e salvato in `node_modules/twenty-sdk/generated` in base allo schema della tua area di lavoro. Usalo nelle tue funzioni:
@@ -683,6 +807,53 @@ Note:
* I permessi della chiave API sono determinati dal ruolo referenziato nel tuo `application-config.ts` tramite `defaultRoleUniversalIdentifier`. Questo è il ruolo predefinito utilizzato dalle funzioni logiche della tua applicazione.
* Le applicazioni possono definire ruoli per seguire il principio del privilegio minimo. Concedi solo i permessi necessari alle tue funzioni, quindi punta `defaultRoleUniversalIdentifier` all'identificatore universale di quel ruolo.
#### Caricamento dei file
Il client `Twenty` generato include un metodo `uploadFile` per allegare file ai campi di tipo file sugli oggetti del tuo spazio di lavoro. Poiché i client GraphQL standard non supportano nativamente il caricamento di file multipart, il client fornisce questo metodo dedicato che implementa la [specifica della richiesta GraphQL multipart](https://github.com/jaydenseric/graphql-multipart-request-spec) dietro le quinte.
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
La firma del metodo:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parametro | Tipo | Descrizione |
| ---------------------------------- | -------- | ------------------------------------------------------------------------ |
| `fileBuffer` | `Buffer` | Il contenuto grezzo del file |
| `filename` | `string` | Il nome del file (utilizzato per l'archiviazione e la visualizzazione) |
| `contentType` | `string` | Tipo MIME del file (predefinito su `application/octet-stream` se omesso) |
| `fieldMetadataUniversalIdentifier` | `string` | L'`universalIdentifier` del campo di tipo file nel tuo oggetto |
Punti chiave:
* Il metodo invia il file al **metadata endpoint** (non all'endpoint GraphQL principale), dove la mutation di upload viene risolta.
* Usa l'`universalIdentifier` del campo (non il suo ID specifico dello spazio di lavoro), quindi il tuo codice di upload funziona in qualsiasi spazio di lavoro in cui la tua app è installata — coerentemente con il modo in cui le app fanno riferimento ai campi altrove.
* L'`url` restituito è un URL firmato che puoi usare per accedere al file caricato.
### Esempio Hello World
Esplora un esempio minimale end-to-end che dimostra oggetti, funzioni logiche, componenti front-end e trigger multipli [qui](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Os aplicativos permitem criar e gerenciar personalizações do Twenty **como có
* Defina objetos e campos personalizados como código (modelo de dados gerenciado)
* Crie funções de lógica com gatilhos personalizados
* Definir habilidades para agentes de IA
* Implemente o mesmo aplicativo em vários espaços de trabalho
## Pré-requisitos
@@ -27,21 +28,34 @@ Os aplicativos permitem criar e gerenciar personalizações do Twenty **como có
Crie um novo aplicativo usando o gerador oficial, depois autentique-se e comece a desenvolver:
```bash filename="Terminal"
# Scaffold a new app
# Criar a estrutura de um novo app (inclui todos os exemplos por padrão)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
# If you don't use yarn@4
# Se você não usa yarn@4
corepack enable
yarn install
# Authenticate using your API key (you'll be prompted)
# Autentique-se usando sua chave de API (você será solicitado)
yarn twenty auth:login
# Start dev mode: automatically syncs local changes to your workspace
# Iniciar modo de desenvolvimento: sincroniza automaticamente as alterações locais com seu workspace
yarn twenty app:dev
```
O gerador de estrutura oferece suporte a três modos para controlar quais arquivos de exemplo são incluídos:
```bash filename="Terminal"
# Padrão (exhaustivo): todos os exemplos (objeto, campo, função de lógica, componente de front-end, visualização, item do menu de navegação, habilidade)
npx create-twenty-app@latest my-app
# Mínimo: apenas arquivos principais (application-config.ts e default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interativo: selecione quais exemplos incluir
npx create-twenty-app@latest my-app --interactive
```
A partir daqui você pode:
```bash filename="Terminal"
@@ -52,7 +66,10 @@ yarn twenty entity:add
yarn twenty function:logs
# Executar uma função pelo nome
yarn twenty function:execute -n my-function -p '{"name": "test"}'
yarn twenty function:execute -n my-function -p '{\"name\": \"test\"}'
# Executar a função de pós-instalação
yarn twenty function:execute --postInstall
# Desinstalar a aplicação do espaço de trabalho atual
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Ao executar `npx create-twenty-app@latest my-twenty-app`, o gerador:
* Copia um aplicativo base mínimo para `my-twenty-app/`
* Adiciona uma dependência local `twenty-sdk` e a configuração do Yarn 4
* Cria arquivos de configuração e scripts conectados à CLI `twenty`
* Gera uma configuração de aplicativo padrão e um papel padrão para as funções
* Gera arquivos principais (configuração da aplicação, papel padrão para funções de lógica, função de pós-instalação) além de arquivos de exemplo com base no modo de geração de estrutura
Um aplicativo recém-criado pelo scaffold fica assim:
Um app recém-criado com o modo padrão `--exhaustive` fica assim:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -91,12 +108,25 @@ my-twenty-app/
├── application-config.ts # Obrigatório - configuração principal da aplicação
├── roles/
│ └── default-role.ts # Papel padrão para funções de lógica
├── objects/
│ └── example-object.ts # Exemplo de definição de objeto personalizado
├── fields/
│ └── example-field.ts # Exemplo de definição de campo independente
├── logic-functions/
── hello-world.ts # Exemplo de função de lógica
└── front-components/
└── hello-world.tsx # Exemplo de componente de front-end
── hello-world.ts # Exemplo de função de lógica
└── post-install.ts # Função de lógica de pós-instalação
├── front-components/
│ └── hello-world.tsx # Exemplo de componente de front-end
├── views/
│ └── example-view.ts # Exemplo de definição de visualização salva
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Exemplo de link de navegação da barra lateral
└── skills/
└── example-skill.ts # Exemplo de definição de habilidade de agente de IA
```
Com `--minimal`, apenas os arquivos principais são criados (`application-config.ts`, `roles/default-role.ts` e `logic-functions/post-install.ts`). Com `--interactive`, você escolhe quais arquivos de exemplo incluir.
Em alto nível:
* **package.json**: Declara o nome do app, versão, engines (Node 24+, Yarn 4), e adiciona `twenty-sdk` além de um script `twenty` que delega para a CLI `twenty` local. Execute `yarn twenty help` para listar todos os comandos disponíveis.
@@ -112,13 +142,16 @@ Em alto nível:
O SDK detecta entidades analisando seus arquivos TypeScript em busca de chamadas **`export default define<Entity>({...})`**. Cada tipo de entidade tem uma função utilitária correspondente exportada de `twenty-sdk`:
| Função utilitária | Tipo de entidade |
| ------------------------ | ------------------------------------------- |
| `defineObject()` | Definições de objetos personalizados |
| `defineLogicFunction()` | Definições de funções de lógica |
| `defineFrontComponent()` | Definições de componentes de front-end |
| `defineRole()` | Definições de papéis |
| `defineField()` | Extensões de campos para objetos existentes |
| Função utilitária | Tipo de entidade |
| ---------------------------- | ------------------------------------------- |
| `defineObject()` | Definições de objetos personalizados |
| `defineLogicFunction()` | Definições de funções de lógica |
| `defineFrontComponent()` | Definições de componentes de front-end |
| `defineRole()` | Definições de papéis |
| `defineField()` | Extensões de campos para objetos existentes |
| `defineView()` | Definições de visualizações salvas |
| `defineNavigationMenuItem()` | Definições de itens do menu de navegação |
| `defineSkill()` | Definições de habilidades de agente de IA |
<Note>
**A nomeação de arquivos é flexível.** A detecção de entidades é baseada em AST — o SDK varre seus arquivos fonte em busca do padrão `export default define<Entity>({...})`. Você pode organizar seus arquivos e pastas como quiser. Agrupar por tipo de entidade (por exemplo, `logic-functions/`, `roles/`) é apenas uma convenção para organização do código, não um requisito.
@@ -140,7 +173,7 @@ export default defineObject({
Comandos posteriores adicionarão mais arquivos e pastas:
* `yarn twenty app:dev` vai gerar automaticamente um cliente de API tipado em `node_modules/twenty-sdk/generated` (cliente Twenty tipado + tipos do espaço de trabalho).
* `yarn twenty entity:add` adicionará arquivos de definição de entidade em `src/` para seus objetos, funções, componentes de front-end ou papéis personalizados.
* `yarn twenty entity:add` adicionará arquivos de definição de entidade em `src/` para seus objetos, funções, componentes de front-end, papéis e habilidades personalizados, entre outros.
## Autenticação
@@ -183,14 +216,17 @@ O twenty-sdk fornece blocos de construção tipados e funções utilitárias que
O SDK fornece funções utilitárias para definir as entidades do seu app. Conforme descrito em [Detecção de entidades](#entity-detection), você deve usar `export default define<Entity>({...})` para que suas entidades sejam detectadas:
| Função | Finalidade |
| ------------------------ | ------------------------------------------------------------ |
| `defineApplication()` | Configurar metadados do aplicativo (obrigatório, um por app) |
| `defineObject()` | Define objetos personalizados com campos |
| `defineLogicFunction()` | Defina funções de lógica com handlers |
| `defineFrontComponent()` | Definir componentes de front-end para UI personalizada |
| `defineRole()` | Configura permissões de papéis e acesso a objetos |
| `defineField()` | Estender objetos existentes com campos adicionais |
| Função | Finalidade |
| ---------------------------- | ------------------------------------------------------------ |
| `defineApplication()` | Configurar metadados do aplicativo (obrigatório, um por app) |
| `defineObject()` | Define objetos personalizados com campos |
| `defineLogicFunction()` | Defina funções de lógica com handlers |
| `defineFrontComponent()` | Definir componentes de front-end para UI personalizada |
| `defineRole()` | Configura permissões de papéis e acesso a objetos |
| `defineField()` | Estender objetos existentes com campos adicionais |
| `defineView()` | Define visualizações salvas para objetos |
| `defineNavigationMenuItem()` | Define links de navegação da barra lateral |
| `defineSkill()` | Define habilidades de agente de IA |
Essas funções validam sua configuração em tempo de compilação e oferecem autocompletar na IDE e segurança de tipos.
@@ -290,6 +326,7 @@ Todo aplicativo tem um único arquivo `application-config.ts` que descreve:
* **O que é o aplicativo**: identificadores, nome de exibição e descrição.
* **Como suas funções são executadas**: qual papel usam para permissões.
* **Variáveis (opcional)**: pares chavevalor expostos às suas funções como variáveis de ambiente.
* **(Opcional) função de pós-instalação**: uma função de lógica que é executada após a instalação da aplicação.
Use `defineApplication()` to define your application configuration:
@@ -297,6 +334,7 @@ Use `defineApplication()` to define your application configuration:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Notas:
* `universalIdentifier` são IDs determinísticos que você controla; gere-os uma vez e mantenha-os estáveis entre sincronizações.
* `applicationVariables` tornam-se variáveis de ambiente para suas funções (por exemplo, `DEFAULT_RECIPIENT_NAME` fica disponível como `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` deve corresponder ao arquivo do papel (veja abaixo).
* `postInstallLogicFunctionUniversalIdentifier` (opcional) aponta para uma função de lógica que é executada automaticamente após a instalação da aplicação. Consulte [Funções de pós-instalação](#post-install-functions).
#### Papéis e permissões
@@ -458,6 +498,55 @@ Notas:
* O array `triggers` é opcional. Funções sem gatilhos podem ser usadas como funções utilitárias chamadas por outras funções.
* Você pode misturar vários tipos de gatilho em uma única função.
### Funções de pós-instalação
Uma função de pós-instalação é uma função de lógica que é executada automaticamente após a sua aplicação ser instalada em um espaço de trabalho. Isso é útil para tarefas de configuração únicas, como preencher dados padrão, criar registros iniciais ou configurar as configurações do espaço de trabalho.
Ao criar a estrutura de um novo app com `create-twenty-app`, uma função de pós-instalação é gerada para você em `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
A função é conectada ao seu app referenciando seu identificador universal em `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Você também pode executar manualmente a função de pós-instalação a qualquer momento usando a CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Pontos-chave:
* As funções de pós-instalação são funções de lógica padrão — elas usam `defineLogicFunction()` como qualquer outra função.
* O campo `postInstallLogicFunctionUniversalIdentifier` em `defineApplication()` é opcional. Se omitido, nenhuma função é executada após a instalação.
* O tempo limite padrão é definido como 300 segundos (5 minutos) para permitir tarefas de configuração mais longas, como o pré-carregamento de dados.
* As funções de pós-instalação não precisam de gatilhos — elas são invocadas pela plataforma durante a instalação ou manualmente via `function:execute --postInstall`.
### Payload de gatilho de rota
<Warning>
@@ -657,6 +746,41 @@ Você pode criar novos componentes de front-end de duas formas:
* **Gerado automaticamente**: Execute `yarn twenty entity:add` e escolha a opção para adicionar um novo componente de front-end.
* **Manual**: Crie um novo arquivo `*.front-component.tsx` e use `defineFrontComponent()`.
### Habilidades
As habilidades definem instruções e capacidades reutilizáveis que os agentes de IA podem usar no seu espaço de trabalho. Use `defineSkill()` para definir habilidades com validação integrada:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Pontos-chave:
* `name` é uma string de identificador exclusivo para a habilidade (recomenda-se kebab-case).
* `label` é o nome de exibição legível por humanos mostrado na UI.
* `content` contém as instruções da habilidade — este é o texto que o agente de IA usa.
* `icon` (opcional) define o ícone exibido na UI.
* `description` (opcional) fornece contexto adicional sobre a finalidade da habilidade.
Você pode criar novas habilidades de duas formas:
* **Gerado automaticamente**: Execute `yarn twenty entity:add` e escolha a opção para adicionar uma nova habilidade.
* **Manual**: Crie um novo arquivo e use `defineSkill()`, seguindo o mesmo padrão.
### Cliente tipado gerado
O cliente tipado é gerado automaticamente pelo `yarn twenty app:dev` e armazenado em `node_modules/twenty-sdk/generated` com base no esquema do seu espaço de trabalho. Use-o em suas funções:
@@ -683,6 +807,53 @@ Notas:
* As permissões da chave de API são determinadas pelo papel referenciado no seu `application-config.ts` via `defaultRoleUniversalIdentifier`. Este é o papel padrão usado pelas funções de lógica do seu app.
* Os aplicativos podem definir papéis para seguir o princípio do menor privilégio. Conceda apenas as permissões de que suas funções precisam e, em seguida, aponte `defaultRoleUniversalIdentifier` para o identificador universal desse papel.
#### Carregamento de ficheiros
O cliente `Twenty` gerado inclui um método `uploadFile` para anexar ficheiros a campos do tipo ficheiro nos objetos do seu espaço de trabalho. Como os clientes GraphQL padrão não suportam nativamente o carregamento de ficheiros multipart, o cliente fornece este método dedicado que implementa, nos bastidores, a [especificação de pedidos multipart do GraphQL](https://github.com/jaydenseric/graphql-multipart-request-spec).
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
A assinatura do método:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parâmetro | Tipo | Descrição |
| ---------------------------------- | -------- | ------------------------------------------------------------------------ |
| `fileBuffer` | `Buffer` | O conteúdo bruto do arquivo |
| `filename` | `string` | O nome do arquivo (usado para armazenamento e exibição) |
| `contentType` | `string` | Tipo MIME do arquivo (padrão para `application/octet-stream` se omitido) |
| `fieldMetadataUniversalIdentifier` | `string` | O `universalIdentifier` do campo do tipo arquivo no seu objeto |
Pontos-chave:
* O método envia o arquivo para o **endpoint de metadados** (não para o endpoint GraphQL principal), onde a mutação de upload é resolvida.
* Ele usa o `universalIdentifier` do campo (não o ID específico do espaço de trabalho), de modo que seu código de upload funcione em qualquer espaço de trabalho onde seu app esteja instalado — consistente com a forma como os apps referenciam campos em qualquer outro lugar.
* A `url` retornada é um URL assinado que você pode usar para acessar o arquivo enviado.
### Exemplo Hello World
Explore um exemplo mínimo de ponta a ponta que demonstra objetos, funções de lógica, componentes de front-end e vários gatilhos [aqui](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Aplicațiile vă permit să construiți și să gestionați personalizările Twe
* Definiți obiecte și câmpuri personalizate sub formă de cod (model de date gestionat)
* Creați funcții de logică cu declanșatoare personalizate
* Definiți abilități pentru agenți de IA
* Implementați aceeași aplicație în mai multe spații de lucru
## Cerințe
@@ -27,7 +28,7 @@ Aplicațiile vă permit să construiți și să gestionați personalizările Twe
Creați o aplicație nouă folosind generatorul oficial, apoi autentificați-vă și începeți să dezvoltați:
```bash filename="Terminal"
# Creează scheletul unei aplicații noi
# Creează scheletul unei aplicații noi (include toate exemplele în mod implicit)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
Generatorul de schelet acceptă trei moduri pentru a controla ce fișiere de exemplu sunt incluse:
```bash filename="Terminal"
# Implicit (exhaustiv): toate exemplele (obiect, câmp, funcție logică, componentă de interfață, vizualizare, element de meniu de navigare, abilitate)
npx create-twenty-app@latest my-app
# Minimal: doar fișierele de bază (application-config.ts și default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Interactiv: selectezi ce exemple să incluzi
npx create-twenty-app@latest my-app --interactive
```
De aici puteți:
```bash filename="Terminal"
@@ -54,6 +68,9 @@ yarn twenty function:logs
# Execută o funcție după nume
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Execută funcția post-instalare
yarn twenty function:execute --postInstall
# Dezinstalează aplicația din spațiul de lucru curent
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Când rulați `npx create-twenty-app@latest my-twenty-app`, generatorul:
* Copiază o aplicație de bază minimală în `my-twenty-app/`
* Adaugă o dependență locală `twenty-sdk` și configurația Yarn 4
* Creează fișiere de configurare și scripturi conectate la CLI-ul `twenty`
* Generează o configurație implicită a aplicației și un rol implicit pentru funcții
* Generează fișierele de bază (configurația aplicației, rolul implicit al funcțiilor, funcția post-instalare) plus fișiere de exemplu în funcție de modul de generare a scheletului
O aplicație nou generată arată astfel:
O aplicație proaspăt generată cu modul implicit `--exhaustive` arată astfel:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -86,17 +103,30 @@ my-twenty-app/
eslint.config.mjs
tsconfig.json
README.md
public/ # Public assets folder (images, fonts, etc.)
public/ # Director pentru resurse publice (imagini, fonturi etc.)
src/
├── application-config.ts # Required - main application configuration
├── application-config.ts # Obligatoriu - configurația principală a aplicației
├── roles/
│ └── default-role.ts # Default role for logic functions
│ └── default-role.ts # Rol implicit pentru funcțiile logice
├── objects/
│ └── example-object.ts # Exemplu de definiție a unui obiect personalizat
├── fields/
│ └── example-field.ts # Exemplu de definiție de câmp independent
├── logic-functions/
── hello-world.ts # Example logic function
└── front-components/
└── hello-world.tsx # Example front component
── hello-world.ts # Exemplu de funcție logică
└── post-install.ts # Funcție logică post-instalare
├── front-components/
│ └── hello-world.tsx # Exemplu de componentă de interfață
├── views/
│ └── example-view.ts # Exemplu de definiție a unei vizualizări salvate
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Exemplu de link de navigare în bara laterală
└── skills/
└── example-skill.ts # Exemplu de definiție a unei abilități a agentului AI
```
Cu `--minimal`, sunt create doar fișierele de bază (`application-config.ts`, `roles/default-role.ts` și `logic-functions/post-install.ts`). Cu `--interactive`, alegi ce fișiere de exemplu să incluzi.
Pe scurt:
* **package.json**: Declară numele aplicației, versiunea, motoarele (Node 24+, Yarn 4) și adaugă `twenty-sdk` plus un script `twenty` care deleagă către CLI-ul local `twenty`. Rulează `yarn twenty help` pentru a lista toate comenzile disponibile.
@@ -112,13 +142,16 @@ Pe scurt:
SDK-ul detectează entitățile analizând fișierele TypeScript pentru apeluri **`export default define<Entity>({...})`**. Fiecare tip de entitate are o funcție ajutătoare corespunzătoare, exportată din `twenty-sdk`:
| Funcție ajutătoare | Tipul entității |
| ------------------------ | ------------------------------------------- |
| `defineObject()` | Definiții de obiecte personalizate |
| `defineLogicFunction()` | Definiții de funcții de logică |
| `defineFrontComponent()` | Definiții ale componentelor de interfață |
| `defineRole()` | Definiții de rol |
| `defineField()` | Extensii de câmp pentru obiectele existente |
| Funcție ajutătoare | Tipul entității |
| ---------------------------- | ---------------------------------------------- |
| `defineObject()` | Definiții de obiecte personalizate |
| `defineLogicFunction()` | Definiții de funcții de logică |
| `defineFrontComponent()` | Definiții ale componentelor de interfață |
| `defineRole()` | Definiții de rol |
| `defineField()` | Extensii de câmp pentru obiectele existente |
| `defineView()` | Definiții pentru vizualizări salvate |
| `defineNavigationMenuItem()` | Definiții pentru elemente de meniu de navigare |
| `defineSkill()` | Definiții ale abilităților agentului AI |
<Note>
**Denumirea fișierelor este flexibilă.** Detectarea entităților se bazează pe AST — SDK-ul scanează fișierele sursă pentru tiparul `export default define<Entity>({...})`. Puteți organiza fișierele și folderele cum doriți. Gruparea după tipul de entitate (de exemplu, `logic-functions/`, `roles/`) este doar o convenție pentru organizarea codului, nu o cerință.
@@ -140,7 +173,7 @@ export default defineObject({
Comenzile ulterioare vor adăuga mai multe fișiere și foldere:
* `yarn twenty app:dev` va genera automat un client API tipizat în `node_modules/twenty-sdk/generated` (client Twenty tipizat + tipuri ale spațiului de lucru).
* `yarn twenty entity:add` va adăuga fișiere de definire a entităților în `src/` pentru obiectele, funcțiile, componentele front-end sau rolurile personalizate.
* `yarn twenty entity:add` va adăuga fișiere de definire a entităților în `src/` pentru obiectele, funcțiile, componentele front-end, rolurile, abilitățile și altele.
## Autentificare
@@ -183,14 +216,17 @@ Biblioteca twenty-sdk oferă blocuri de bază tipizate și funcții ajutătoare
SDK-ul oferă funcții ajutătoare pentru definirea entităților aplicației. După cum este descris în [Detectarea entităților](#entity-detection), trebuie să folosiți `export default define<Entity>({...})` pentru ca entitățile să fie detectate:
| Funcție | Scop |
| ------------------------ | ---------------------------------------------------------------------- |
| `defineApplication()` | Configurați metadatele aplicației (obligatoriu, una per aplicație) |
| `defineObject()` | Definiți obiecte personalizate cu câmpuri |
| `defineLogicFunction()` | Definiți funcții de logică cu handleri |
| `defineFrontComponent()` | Definiți componente Front pentru interfața de utilizator personalizată |
| `defineRole()` | Configurați permisiunile rolurilor și accesul la obiecte |
| `defineField()` | Extindeți obiectele existente cu câmpuri suplimentare |
| Funcție | Scop |
| ---------------------------- | ---------------------------------------------------------------------- |
| `defineApplication()` | Configurați metadatele aplicației (obligatoriu, una per aplicație) |
| `defineObject()` | Definiți obiecte personalizate cu câmpuri |
| `defineLogicFunction()` | Definiți funcții de logică cu handleri |
| `defineFrontComponent()` | Definiți componente Front pentru interfața de utilizator personalizată |
| `defineRole()` | Configurați permisiunile rolurilor și accesul la obiecte |
| `defineField()` | Extindeți obiectele existente cu câmpuri suplimentare |
| `defineView()` | Definește vizualizări salvate pentru obiecte |
| `defineNavigationMenuItem()` | Definește linkuri de navigare în bara laterală |
| `defineSkill()` | Definiți abilități pentru agentul AI |
Aceste funcții validează configurația în timpul build-ului și oferă completare automată în IDE și siguranța tipurilor.
@@ -290,6 +326,7 @@ Fiecare aplicație are un singur fișier `application-config.ts` care descrie:
* **Cine este aplicația**: identificatori, nume de afișare și descriere.
* **Cum rulează funcțiile**: ce rol folosesc pentru permisiuni.
* **(Opțional) variabile**: perechi cheievaloare expuse funcțiilor ca variabile de mediu.
* **(Opțional) funcție post-instalare**: o funcție logică care rulează după instalarea aplicației.
Folosiți `defineApplication()` pentru a defini configurația aplicației:
@@ -297,6 +334,7 @@ Folosiți `defineApplication()` pentru a defini configurația aplicației:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Notițe:
* Câmpurile `universalIdentifier` sunt ID-uri deterministe pe care le dețineți; generați-le o singură dată și păstrați-le stabile între sincronizări.
* `applicationVariables` devin variabile de mediu pentru funcțiile dvs. (de exemplu, `DEFAULT_RECIPIENT_NAME` este disponibil ca `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` trebuie să corespundă fișierului de rol (vedeți mai jos).
* `postInstallLogicFunctionUniversalIdentifier` (opțional) indică o funcție logică care rulează automat după instalarea aplicației. Vezi [Funcții post-instalare](#post-install-functions).
#### Roluri și permisiuni
@@ -458,6 +498,55 @@ Notițe:
* Matricea `triggers` este opțională. Funcțiile fără declanșatoare pot fi folosite ca funcții utilitare apelate de alte funcții.
* Puteți combina mai multe tipuri de declanșatoare într-o singură funcție.
### Funcții post-instalare
O funcție post-instalare este o funcție logică care rulează automat după instalarea aplicației într-un spațiu de lucru. Aceasta este utilă pentru sarcini de configurare unice, cum ar fi popularea cu date implicite, crearea înregistrărilor inițiale sau configurarea setărilor spațiului de lucru.
Când creezi scheletul unei aplicații noi cu `create-twenty-app`, este generată o funcție post-instalare la `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
Funcția este integrată în aplicația ta prin referirea la identificatorul său universal în `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Poți, de asemenea, să execuți manual funcția post-instalare oricând folosind CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Puncte cheie:
* Funcțiile post-instalare sunt funcții logice standard — folosesc `defineLogicFunction()` la fel ca orice altă funcție.
* Câmpul `postInstallLogicFunctionUniversalIdentifier` din `defineApplication()` este opțional. Dacă este omis, nu rulează nicio funcție după instalare.
* Timpul de expirare implicit este setat la 300 de secunde (5 minute) pentru a permite sarcini de configurare mai lungi, cum ar fi popularea datelor.
* Funcțiile post-instalare nu au nevoie de declanșatoare — sunt invocate de platformă în timpul instalării sau manual prin `function:execute --postInstall`.
### Payload-ul declanșatorului de rută
<Warning>
@@ -657,6 +746,41 @@ Puteți crea componente Front noi în două moduri:
* **Generat**: Rulați `yarn twenty entity:add` și alegeți opțiunea de a adăuga o componentă frontend nouă.
* **Manual**: Creați un fișier nou `*.front-component.tsx` și folosiți `defineFrontComponent()`.
### Abilități
Abilitățile definesc instrucțiuni și capabilități reutilizabile pe care agenții AI le pot folosi în spațiul dvs. de lucru. Folosiți `defineSkill()` pentru a defini abilități cu validare încorporată:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Abordare de vânzări',
description: 'Ghidează agentul AI printr-un proces structurat de abordare de vânzări',
icon: 'IconBrain',
content: `Ești un asistent pentru abordare de vânzări. Când contactezi un potențial client:
1. Cercetează compania și noutățile recente
2. Identifică rolul potențialului client și probabilele puncte sensibile
3. Redactează un mesaj personalizat care face referire la detalii specifice
4. Păstrează un ton profesionist, dar conversațional`,
});
```
Puncte cheie:
* `name` este un șir identificator unic pentru abilitate (se recomandă kebab-case).
* `label` este numele lizibil afișat în interfața cu utilizatorul (UI).
* `content` conține instrucțiunile abilității — acesta este textul pe care agentul AI îl folosește.
* `icon` (opțional) setează pictograma afișată în UI.
* `description` (opțional) oferă context suplimentar despre scopul abilității.
Puteți crea abilități noi în două moduri:
* **Generat**: Rulați `yarn twenty entity:add` și alegeți opțiunea de a adăuga o abilitate nouă.
* **Manual**: Creați un fișier nou și folosiți `defineSkill()`, urmând același model.
### Client tipizat generat
Clientul tipizat este generat automat de `yarn twenty app:dev` și stocat în `node_modules/twenty-sdk/generated`, pe baza schemei spațiului tău de lucru. Folosiți-l în funcțiile dvs.:
@@ -683,6 +807,53 @@ Notițe:
* Permisiunile cheii API sunt determinate de rolul referențiat în `application-config.ts` prin `defaultRoleUniversalIdentifier`. Acesta este rolul implicit folosit de funcțiile de logică ale aplicației.
* Aplicațiile pot defini roluri pentru a urma principiul celui mai mic privilegiu. Acordați doar permisiunile de care au nevoie funcțiile, apoi setați `defaultRoleUniversalIdentifier` la identificatorul universal al acelui rol.
#### Încărcarea fișierelor
Clientul `Twenty` generat include o metodă `uploadFile` pentru atașarea fișierelor la câmpuri de tip fișier ale obiectelor din spațiul de lucru. Deoarece clienții GraphQL standard nu acceptă în mod nativ încărcarea fișierelor multipart, clientul oferă această metodă dedicată care implementează, sub capotă, [specificația cererilor GraphQL multipart](https://github.com/jaydenseric/graphql-multipart-request-spec).
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
Semnătura metodei:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parametru | Tip | Descriere |
| ---------------------------------- | -------- | ------------------------------------------------------------------------------------------- |
| `fileBuffer` | `Buffer` | Conținutul brut al fișierului |
| `filename` | `string` | Numele fișierului (folosit pentru stocare și afișare) |
| `contentType` | `string` | Tipul MIME al fișierului (are valoarea implicită `application/octet-stream` dacă este omis) |
| `fieldMetadataUniversalIdentifier` | `string` | `universalIdentifier` al câmpului de tip fișier de pe obiectul tău |
Puncte cheie:
* Metoda trimite fișierul către **metadata endpoint** (nu către endpoint-ul principal GraphQL), unde mutația de încărcare este rezolvată.
* Folosește `universalIdentifier` al câmpului (nu ID-ul specific spațiului de lucru), astfel încât codul tău de încărcare funcționează în orice spațiu de lucru în care aplicația ta este instalată — în concordanță cu modul în care aplicațiile fac referire la câmpuri în rest.
* `url` returnat este un URL semnat pe care îl poți folosi pentru a accesa fișierul încărcat.
### Exemplu Hello World
Explorați un exemplu minim, cap la cap, care demonstrează obiecte, funcții de logică, componente Front și declanșatoare multiple [aici](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ description: Создавайте и управляйте настройками
* Определяйте пользовательские объекты и поля в виде кода (управляемая модель данных)
* Создавайте логические функции с пользовательскими триггерами
* Определите навыки для ИИ-агентов
* Развёртывайте одно и то же приложение в нескольких рабочих пространствах
## Требования
@@ -27,7 +28,7 @@ description: Создавайте и управляйте настройками
Создайте новое приложение с помощью официального генератора, затем выполните аутентификацию и начните разработку:
```bash filename="Terminal"
# Создать каркас нового приложения
# Создать каркас нового приложения (по умолчанию включает все примеры)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
Генератор каркаса поддерживает три режима для управления тем, какие примерные файлы включаются:
```bash filename="Terminal"
# По умолчанию (полный набор): все примеры (объект, поле, логическая функция, фронтенд-компонент, представление, пункт меню навигации, навык)
npx create-twenty-app@latest my-app
# Минимальный: только основные файлы (application-config.ts и default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Интерактивный: выбрать, какие примеры включить
npx create-twenty-app@latest my-app --interactive
```
Отсюда вы можете:
```bash filename="Terminal"
@@ -54,6 +68,9 @@ yarn twenty function:logs
# Выполнить функцию по имени
yarn twenty function:execute -n my-function -p '{\"name\": \"test\"}'
# Выполнить послеустановочную функцию
yarn twenty function:execute --postInstall
# Удалить приложение из текущего рабочего пространства
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ yarn twenty help
* Копирует минимальное базовое приложение в `my-twenty-app/`
* Добавляет локальную зависимость `twenty-sdk` и конфигурацию Yarn 4
* Создаёт файлы конфигурации и скрипты, подключённые к CLI `twenty`
* Генерирует конфигурацию приложения по умолчанию и роль функции по умолчанию
* Генерирует основные файлы (конфигурацию приложения, роль функций по умолчанию, постустановочную функцию), а также примерные файлы в зависимости от выбранного режима создания каркаса
Свежесгенерированное приложение выглядит так:
Сгенерированное с помощью каркаса приложение с режимом по умолчанию `--exhaustive` выглядит так:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -86,17 +103,30 @@ my-twenty-app/
eslint.config.mjs
tsconfig.json
README.md
public/ # Папка общедоступных ресурсов (изображения, шрифты и т. п.)
public/ # Папка публичных ресурсов (изображения, шрифты и т. д.)
src/
├── application-config.ts # Обязательный — основная конфигурация приложения
├── roles/
│ └── default-role.ts # Роль по умолчанию для логических функций
├── objects/
│ └── example-object.ts # Пример определения пользовательского объекта
├── fields/
│ └── example-field.ts # Пример определения отдельного поля
├── logic-functions/
── hello-world.ts # Пример логической функции
└── front-components/
└── hello-world.tsx # Пример фронтенд-компонента
── hello-world.ts # Пример логической функции
└── post-install.ts # Постустановочная логическая функция
├── front-components/
│ └── hello-world.tsx # Пример фронтенд-компонента
├── views/
│ └── example-view.ts # Пример определения сохранённого представления
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Пример ссылки боковой панели навигации
└── skills/
└── example-skill.ts # Пример определения навыка агента ИИ
```
С `--minimal` создаются только основные файлы (`application-config.ts`, `roles/default-role.ts` и `logic-functions/post-install.ts`). С `--interactive` вы выбираете, какие примерные файлы включить.
В общих чертах:
* **package.json**: Объявляет имя приложения, версию, движки (Node 24+, Yarn 4) и добавляет `twenty-sdk`, а также скрипт `twenty`, который делегирует выполнение локальному CLI `twenty`. Выполните `yarn twenty help`, чтобы вывести список всех доступных команд.
@@ -112,13 +142,16 @@ my-twenty-app/
SDK обнаруживает сущности, разбирая ваши файлы TypeScript в поисках вызовов **`export default define<Entity>({...})`**. Для каждого типа сущности существует соответствующая вспомогательная функция, экспортируемая из `twenty-sdk`:
| Вспомогательная функция | Тип сущности |
| ------------------------ | ------------------------------------------ |
| `defineObject()` | Определения пользовательских объектов |
| `defineLogicFunction()` | Определения логических функций |
| `defineFrontComponent()` | Определения компонентов фронтенда |
| `defineRole()` | Определения ролей |
| `defineField()` | Расширения полей для существующих объектов |
| Вспомогательная функция | Тип сущности |
| ---------------------------- | ------------------------------------------ |
| `defineObject()` | Определения пользовательских объектов |
| `defineLogicFunction()` | Определения логических функций |
| `defineFrontComponent()` | Определения компонентов фронтенда |
| `defineRole()` | Определения ролей |
| `defineField()` | Расширения полей для существующих объектов |
| `defineView()` | Определения сохранённых представлений |
| `defineNavigationMenuItem()` | Определения пунктов меню навигации |
| `defineSkill()` | Определения навыков агента ИИ |
<Note>
**Имена файлов заданы гибко.** Обнаружение сущностей основано на AST — SDK сканирует ваши исходные файлы в поисках шаблона `export default define<Entity>({...})`. Вы можете организовывать файлы и папки как угодно. Группировка по типу сущности (например, `logic-functions/`, `roles/`) — это лишь соглашение для организации кода, а не требование.
@@ -140,7 +173,7 @@ export default defineObject({
Позднее команды добавят больше файлов и папок:
* `yarn twenty app:dev` автоматически сгенерирует типизированный клиент API в `node_modules/twenty-sdk/generated` (типизированный клиент Twenty + типы рабочего пространства).
* `yarn twenty entity:add` добавит файлы определений сущностей в `src/` для ваших пользовательских объектов, функций, фронтенд-компонентов или ролей.
* `yarn twenty entity:add` добавит файлы определений сущностей в `src/` для ваших пользовательских объектов, функций, фронтенд-компонентов, ролей, навыков и многого другого.
## Аутентификация
@@ -183,14 +216,17 @@ yarn twenty auth:status
SDK предоставляет вспомогательные функции для определения сущностей вашего приложения. Как описано в [Обнаружение сущностей](#entity-detection), вы должны использовать `export default define<Entity>({...})`, чтобы ваши сущности были обнаружены:
| Функция | Назначение |
| ------------------------ | ---------------------------------------------------------------------- |
| `defineApplication()` | Настройка метаданных приложения (обязательно, по одному на приложение) |
| `defineObject()` | Определяет пользовательские объекты с полями |
| `defineLogicFunction()` | Определение логических функций с обработчиками |
| `defineFrontComponent()` | Определение фронт-компонентов для настраиваемого интерфейса |
| `defineRole()` | Настраивает права роли и доступ к объектам |
| `defineField()` | Расширение существующих объектов дополнительными полями |
| Функция | Назначение |
| ---------------------------- | ---------------------------------------------------------------------- |
| `defineApplication()` | Настройка метаданных приложения (обязательно, по одному на приложение) |
| `defineObject()` | Определяет пользовательские объекты с полями |
| `defineLogicFunction()` | Определение логических функций с обработчиками |
| `defineFrontComponent()` | Определение фронт-компонентов для настраиваемого интерфейса |
| `defineRole()` | Настраивает права роли и доступ к объектам |
| `defineField()` | Расширение существующих объектов дополнительными полями |
| `defineView()` | Определяйте сохранённые представления для объектов |
| `defineNavigationMenuItem()` | Определяйте ссылки боковой панели навигации |
| `defineSkill()` | Определение навыков агента ИИ |
Эти функции проверяют вашу конфигурацию на этапе сборки и обеспечивают автодополнение в IDE и безопасность типов.
@@ -290,6 +326,7 @@ export default defineObject({
* **Что это за приложение**: идентификаторы, отображаемое имя и описание.
* **Как запускаются его функции**: какую роль они используют для прав доступа.
* **(Необязательно) переменные**: пары ключ-значение, предоставляемые вашим функциям как переменные окружения.
* **(Необязательно) послеустановочная функция**: функция логики, которая запускается после установки приложения.
Используйте `defineApplication()` для определения конфигурации вашего приложения:
@@ -297,6 +334,7 @@ export default defineObject({
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ export default defineApplication({
* `universalIdentifier` — это детерминированные идентификаторы, которыми вы управляете; сгенерируйте их один раз и сохраняйте стабильными между синхронизациями.
* `applicationVariables` становятся переменными окружения для ваших функций (например, `DEFAULT_RECIPIENT_NAME` доступна как `process.env.DEFAULT_RECIPIENT_NAME`).
* `defaultRoleUniversalIdentifier` должен соответствовать файлу роли (см. ниже).
* `postInstallLogicFunctionUniversalIdentifier` (необязательно) указывает на логическую функцию, которая автоматически выполняется после установки приложения. См. [Послеустановочные функции](#post-install-functions).
#### Роли и разрешения
@@ -458,6 +498,55 @@ export default defineLogicFunction({
* Массив `triggers` необязателен. Функции без триггеров можно использовать как вспомогательные, вызываемые другими функциями.
* Вы можете сочетать несколько типов триггеров в одной функции.
### Послеустановочные функции
Послеустановочная функция — это функция логики, которая автоматически выполняется после установки вашего приложения в рабочем пространстве. Это полезно для одноразовых задач настройки, таких как инициализация данных по умолчанию, создание начальных записей или настройка параметров рабочего пространства.
Когда вы создаёте каркас нового приложения с помощью `create-twenty-app`, для вас генерируется постустановочная функция по пути `src/logic-functions/post-install.ts`:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
Функция подключается к вашему приложению посредством ссылки на её универсальный идентификатор в `application-config.ts`:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Вы также можете вручную выполнить постустановочную функцию в любое время с помощью CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Основные моменты:
* Постустановочные функции — это стандартные логические функции: они используют `defineLogicFunction()` как и любые другие функции.
* Поле `postInstallLogicFunctionUniversalIdentifier` в `defineApplication()` является необязательным. Если его опустить, после установки никакая функция выполняться не будет.
* Тайм-аут по умолчанию установлен на 300 секунд (5 минут), чтобы позволить выполнять более длительные задачи настройки, такие как инициализация данных.
* Постустановочным функциям не нужны триггеры — платформа вызывает их во время установки или вручную через `function:execute --postInstall`.
### Полезная нагрузка триггера маршрута
<Warning>
@@ -657,6 +746,41 @@ export default defineFrontComponent({
* **Сгенерировано**: Запустите `yarn twenty entity:add` и выберите опцию добавления нового фронтенд-компонента.
* **Вручную**: Создайте новый файл `*.front-component.tsx` и используйте `defineFrontComponent()`.
### Навыки
Навыки определяют многократно используемые инструкции и возможности, которые агенты ИИ могут использовать в вашем рабочем пространстве. Используйте `defineSkill()` для определения навыков со встроенной валидацией:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Основные моменты:
* `name` — уникальная строка-идентификатор навыка (рекомендуется kebab-case).
* `label` — читаемое человеком отображаемое имя, показываемое в UI.
* `content` содержит инструкции навыка — это текст, который использует агент ИИ.
* `icon` (необязательно) задаёт значок, отображаемый в UI.
* `description` (необязательно) предоставляет дополнительный контекст о назначении навыка.
Вы можете создать новые навыки двумя способами:
* **Сгенерировано**: Запустите `yarn twenty entity:add` и выберите опцию добавления нового навыка.
* **Вручную**: Создайте новый файл и используйте `defineSkill()`, следуя тому же шаблону.
### Сгенерированный типизированный клиент
Типизированный клиент автоматически генерируется с помощью `yarn twenty app:dev` и сохраняется в `node_modules/twenty-sdk/generated` на основе схемы вашего рабочего пространства. Используйте его в своих функциях:
@@ -683,6 +807,53 @@ const { me } = await client.query({ me: { id: true, displayName: true } });
* Права ключа API определяются ролью, на которую ссылается ваш `application-config.ts` через `defaultRoleUniversalIdentifier`. Это роль по умолчанию, используемая логическими функциями вашего приложения.
* Приложения могут определять роли, чтобы следовать принципу наименьших привилегий. Предоставляйте только те права, которые нужны вашим функциям, затем укажите в `defaultRoleUniversalIdentifier` универсальный идентификатор этой роли.
#### Загрузка файлов
Сгенерированный клиент `Twenty` включает метод `uploadFile` для прикрепления файлов к полям типа «файл» в объектах вашего рабочего пространства. Поскольку стандартные клиенты GraphQL изначально не поддерживают многочастовую загрузку файлов, клиент предоставляет специальный метод, который под капотом реализует [спецификацию многочастных запросов GraphQL](https://github.com/jaydenseric/graphql-multipart-request-spec).
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
Сигнатура метода:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Параметр | Тип | Описание |
| ---------------------------------- | -------- | ------------------------------------------------------------------------ |
| `fileBuffer` | `Buffer` | Необработанное содержимое файла |
| `filename` | `строка` | Имя файла (используется для хранения и отображения) |
| `contentType` | `строка` | Тип MIME файла (по умолчанию `application/octet-stream`, если не указан) |
| `fieldMetadataUniversalIdentifier` | `строка` | Значение `universalIdentifier` для поля типа файла в вашем объекте |
Основные моменты:
* Метод отправляет файл на **metadata endpoint** (не на основной GraphQL endpoint), где обрабатывается мутация загрузки.
* Он использует `universalIdentifier` поля (а не его идентификатор, специфичный для рабочего пространства), поэтому ваш код загрузки будет работать в любом рабочем пространстве, где установлено ваше приложение — в соответствии с тем, как приложения ссылаются на поля повсюду.
* Возвращаемый `url` — это подписанный URL, который можно использовать для доступа к загруженному файлу.
### Пример Hello World
Ознакомьтесь с минимальным сквозным примером, демонстрирующим объекты, логические функции, фронт-компоненты и несколько триггеров, [здесь](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world):
@@ -15,6 +15,7 @@ Uygulamalar, Twenty özelleştirmelerini **kod olarak** oluşturup yönetmenizi
* Özel nesneleri ve alanları kod olarak tanımlayın (yönetilen veri modeli)
* Özel tetikleyicilerle mantık fonksiyonları oluşturun
* Yapay zekâ ajanları için becerileri tanımlayın
* Aynı uygulamayı birden çok çalışma alanına dağıtın
## Ön Gereksinimler
@@ -27,7 +28,7 @@ Uygulamalar, Twenty özelleştirmelerini **kod olarak** oluşturup yönetmenizi
Resmi scaffolder aracını kullanarak yeni bir uygulama oluşturun, ardından kimlik doğrulaması yapıp geliştirmeye başlayın:
```bash filename="Terminal"
# Scaffold a new app
# Scaffold a new app (includes all examples by default)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
@@ -42,6 +43,19 @@ yarn twenty auth:login
yarn twenty app:dev
```
İskelet oluşturucu, hangi örnek dosyaların dahil edileceğini kontrol etmek için üç modu destekler:
```bash filename="Terminal"
# Varsayılan (kapsamlı): tüm örnekler (nesne, alan, mantık fonksiyonu, ön bileşen, görünüm, gezinme menüsü öğesi, yetenek)
npx create-twenty-app@latest my-app
# Minimal: yalnızca çekirdek dosyalar (application-config.ts ve default-role.ts)
npx create-twenty-app@latest my-app --minimal
# Etkileşimli: dahil edilecek örnekleri seçin
npx create-twenty-app@latest my-app --interactive
```
Buradan şunları yapabilirsiniz:
```bash filename="Terminal"
@@ -54,6 +68,9 @@ yarn twenty function:logs
# Execute a function by name
yarn twenty function:execute -n my-function -p '{"name": "test"}'
# Execute the post-install function
yarn twenty function:execute --postInstall
# Uninstall the application from the current workspace
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ Ayrıca bkz.: [create-twenty-app](https://www.npmjs.com/package/create-twenty-ap
* Minimal bir temel uygulamayı `my-twenty-app/` içine kopyalar
* Yerel bir `twenty-sdk` bağımlılığı ve Yarn 4 yapılandırması ekler
* `twenty` CLI ile bağlantılı yapılandırma dosyaları ve betikler oluşturur
* Varsayılan bir uygulama yapılandırması ve varsayılan bir fonksiyon rolü üretir
* İskelet oluşturma moduna bağlı olarak çekirdek dosyaları (uygulama yapılandırması, varsayılan işlev rolü, kurulum sonrası işlev) ile örnek dosyaları üretir
Yeni şablondan oluşturulan bir uygulama şöyle görünür:
Varsayılan `--exhaustive` moduyla yeni oluşturulmuş bir uygulama şu şekilde görünür:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -90,13 +107,26 @@ my-twenty-app/
src/
├── application-config.ts # Gerekli - ana uygulama yapılandırması
├── roles/
│ └── default-role.ts # Mantık işlevleri için varsayılan rol
│ └── default-role.ts # Mantık fonksiyonları için varsayılan rol
├── objects/
│ └── example-object.ts # Örnek özel nesne tanımı
├── fields/
│ └── example-field.ts # Örnek bağımsız alan tanımı
├── logic-functions/
── hello-world.ts # Örnek mantık işlevi
└── front-components/
└── hello-world.tsx # Örnek ön uç bileşeni
── hello-world.ts # Örnek mantık fonksiyonu
└── post-install.ts # Kurulum sonrası mantık fonksiyonu
├── front-components/
│ └── hello-world.tsx # Örnek ön bileşen
├── views/
│ └── example-view.ts # Örnek kaydedilmiş görünüm tanımı
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Örnek kenar çubuğu gezinme bağlantısı
└── skills/
└── example-skill.ts # Örnek yapay zekâ ajanı yetenek tanımı
```
`--minimal` ile yalnızca çekirdek dosyalar oluşturulur (`application-config.ts`, `roles/default-role.ts` ve `logic-functions/post-install.ts`). `--interactive` ile hangi örnek dosyaların dahil edileceğini siz seçersiniz.
Genel hatlarıyla:
* **package.json**: Uygulama adını, sürümünü, motorları (Node 24+, Yarn 4) bildirir ve `twenty-sdk` ile yerel `twenty` CLI'sine yetki devreden bir `twenty` betiği ekler. Tüm mevcut komutları listelemek için `yarn twenty help` komutunu çalıştırın.
@@ -112,13 +142,16 @@ Genel hatlarıyla:
SDK, TypeScript dosyalarınızı **`export default define<Entity>({...})`** çağrılarını arayarak ayrıştırıp varlıkları algılar. Her varlık türünün, `twenty-sdk` tarafından dışa aktarılan karşılık gelen bir yardımcı fonksiyonu vardır:
| Yardımcı fonksiyon | Varlık türü |
| ------------------------ | ---------------------------------------- |
| `defineObject()` | Özel nesne tanımları |
| `defineLogicFunction()` | Mantık fonksiyon tanımları |
| `defineFrontComponent()` | Front component definitions |
| `defineRole()` | Rol tanımları |
| `defineField()` | Mevcut nesneler için alan genişletmeleri |
| Yardımcı fonksiyon | Varlık türü |
| ---------------------------- | ---------------------------------------- |
| `defineObject()` | Özel nesne tanımları |
| `defineLogicFunction()` | Mantık fonksiyon tanımları |
| `defineFrontComponent()` | Front component definitions |
| `defineRole()` | Rol tanımları |
| `defineField()` | Mevcut nesneler için alan genişletmeleri |
| `defineView()` | Kaydedilmiş görünüm tanımları |
| `defineNavigationMenuItem()` | Gezinme menüsü öğesi tanımları |
| `defineSkill()` | Yapay zekâ ajanı yetenek tanımları |
<Note>
**Dosya adlandırma esnektir.** Varlık algılama AST tabanlıdır — SDK, kaynak dosyalarınızı `export default define<Entity>({...})` desenini bulmak için tarar. Dosyalarınızı ve klasörlerinizi dilediğiniz gibi düzenleyebilirsiniz. Varlık türüne göre gruplama (örn. `logic-functions/`, `roles/`) bir gereklilik değil, yalnızca kod organizasyonu için bir gelenektir.
@@ -140,7 +173,7 @@ export default defineObject({
İlerideki komutlar daha fazla dosya ve klasör ekleyecektir:
* `yarn twenty app:dev`, `node_modules/twenty-sdk/generated` içinde tipli bir API istemcisini otomatik olarak oluşturur (tipli Twenty istemcisi + çalışma alanı türleri).
* `yarn twenty entity:add`, özel nesneleriniz, fonksiyonlarınız, ön bileşenleriniz veya rolleriniz için `src/` altında varlık tanım dosyaları ekler.
* `yarn twenty entity:add`, özel nesneleriniz, fonksiyonlarınız, ön bileşenleriniz, rolleriniz, yetenekleriniz ve daha fazlası için `src/` altında varlık tanım dosyaları ekler.
## Kimlik Doğrulama
@@ -183,14 +216,17 @@ twenty-sdk, uygulamanız içinde kullandığınız türlendirilmiş yapı taşla
SDK, uygulama varlıklarınızı tanımlamak için yardımcı fonksiyonlar sağlar. [Varlık algılama](#entity-detection) bölümünde açıklandığı gibi, varlıklarınızın algılanması için `export default define<Entity>({...})` kullanmalısınız:
| Fonksiyon | Amaç |
| ------------------------ | ------------------------------------------------------------------------- |
| `defineApplication()` | Uygulama meta verilerini yapılandırın (zorunlu, uygulama başına bir adet) |
| `defineObject()` | Alanlara sahip özel nesneler tanımlayın |
| `defineLogicFunction()` | İşleyicilerle mantık fonksiyonları tanımlayın |
| `defineFrontComponent()` | Özel kullanıcı arayüzü için ön uç bileşenlerini tanımlayın |
| `defineRole()` | Rol izinlerini ve nesne erişimini yapılandırın |
| `defineField()` | Mevcut nesneleri ek alanlarla genişletin |
| Fonksiyon | Amaç |
| ---------------------------- | ------------------------------------------------------------------------- |
| `defineApplication()` | Uygulama meta verilerini yapılandırın (zorunlu, uygulama başına bir adet) |
| `defineObject()` | Alanlara sahip özel nesneler tanımlayın |
| `defineLogicFunction()` | İşleyicilerle mantık fonksiyonları tanımlayın |
| `defineFrontComponent()` | Özel kullanıcı arayüzü için ön uç bileşenlerini tanımlayın |
| `defineRole()` | Rol izinlerini ve nesne erişimini yapılandırın |
| `defineField()` | Mevcut nesneleri ek alanlarla genişletin |
| `defineView()` | Nesneler için kaydedilmiş görünümler tanımlayın |
| `defineNavigationMenuItem()` | Kenar çubuğu gezinme bağlantılarını tanımlayın |
| `defineSkill()` | Yapay zekâ ajanı yeteneklerini tanımlayın |
Bu fonksiyonlar, derleme zamanında yapılandırmanızı doğrular ve IDE otomatik tamamlama ile tür güvenliği sağlar.
@@ -290,6 +326,7 @@ Her uygulamanın aşağıdakileri açıklayan tek bir `application-config.ts` do
* **Uygulamanın kim olduğu**: tanımlayıcılar, görünen ad ve açıklama.
* **Fonksiyonlarının nasıl çalıştığı**: izinler için hangi rolü kullandıkları.
* **(İsteğe bağlı) değişkenler**: fonksiyonlarınıza ortam değişkenleri olarak sunulan anahtardeğer çiftleri.
* **(İsteğe bağlı) kurulum sonrası işlev**: uygulama yüklendikten sonra çalışan bir mantık işlevi.
Uygulama yapılandırmanızı tanımlamak için `defineApplication()` kullanın:
@@ -297,6 +334,7 @@ Uygulama yapılandırmanızı tanımlamak için `defineApplication()` kullanın:
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ Notlar:
* `universalIdentifier` alanları size ait belirleyici kimliklerdir; bunları bir kez oluşturun ve eşitlemeler boyunca kararlı tutun.
* `applicationVariables`, fonksiyonlarınız için ortam değişkenlerine dönüşür (örneğin, `DEFAULT_RECIPIENT_NAME` değeri `process.env.DEFAULT_RECIPIENT_NAME` olarak kullanılabilir).
* `defaultRoleUniversalIdentifier`, rol dosyasıyla eşleşmelidir (aşağıya bakın).
* `postInstallLogicFunctionUniversalIdentifier` (isteğe bağlı), uygulama yüklendikten sonra otomatik olarak çalışan bir mantık işlevine işaret eder. Bkz. [Kurulum sonrası işlevler](#post-install-functions).
#### Roller ve izinler
@@ -458,6 +498,55 @@ Notlar:
* `triggers` dizisi isteğe bağlıdır. Tetikleyicisi olmayan fonksiyonlar, diğer fonksiyonlar tarafından çağrılan yardımcı fonksiyonlar olarak kullanılabilir.
* Tek bir fonksiyonda birden çok tetikleyici türünü birleştirebilirsiniz.
### Kurulum sonrası işlevler
Kurulum sonrası işlev, uygulamanız bir çalışma alanına yüklendikten sonra otomatik olarak çalışan bir mantık işlevidir. Bu, varsayılan verileri tohumlama, ilk kayıtları oluşturma veya çalışma alanı ayarlarını yapılandırma gibi tek seferlik kurulum görevleri için yararlıdır.
`create-twenty-app` ile yeni bir uygulama iskeleti oluşturduğunuzda, `src/logic-functions/post-install.ts` konumunda sizin için bir kurulum sonrası işlevi oluşturulur:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
İşlev, `application-config.ts` içinde evrensel tanımlayıcısına başvurularak uygulamanıza bağlanır:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
Ayrıca kurulum sonrası işlevi istediğiniz zaman CLI kullanarak manuel olarak çalıştırabilirsiniz:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
Önemli noktalar:
* Kurulum sonrası işlevleri standart mantık işlevleridir — diğer herhangi bir işlev gibi `defineLogicFunction()` kullanırlar.
* `defineApplication()` içindeki `postInstallLogicFunctionUniversalIdentifier` alanı isteğe bağlıdır. Atlanırsa, kurulumdan sonra hiçbir işlev çalıştırılmaz.
* Varsayılan zaman aşımı, veri tohumlama gibi daha uzun kurulum görevlerine izin vermek için 300 saniye (5 dakika) olarak ayarlanmıştır.
* Kurulum sonrası işlevlerin tetikleyicilere ihtiyacı yoktur — kurulum sırasında platform tarafından veya `function:execute --postInstall` aracılığıyla manuel olarak çağrılırlar.
### Rota tetikleyicisi yükü
<Warning>
@@ -657,6 +746,41 @@ Yeni ön uç bileşenlerini iki şekilde oluşturabilirsiniz:
* **Şablondan**: `yarn twenty entity:add` çalıştırın ve yeni bir ön uç bileşeni ekleme seçeneğini seçin.
* **Manuel**: Yeni bir `*.front-component.tsx` dosyası oluşturun ve `defineFrontComponent()` kullanın.
### Beceriler
Yetenekler, yapay zekâ ajanlarının çalışma alanınızda kullanabileceği yeniden kullanılabilir yönergeleri ve kabiliyetleri tanımlar. Yerleşik doğrulamayla yetenekleri tanımlamak için `defineSkill()` kullanın:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
Önemli noktalar:
* `name`, yetenek için benzersiz bir tanımlayıcı dizedir (kebab-case önerilir).
* `label`, UI'de gösterilen, insan tarafından okunabilir addır.
* `content`, yetenek yönergelerini içerir — bu, yapay zekâ ajanının kullandığı metindir.
* `icon` (isteğe bağlı), UI'de gösterilen simgeyi ayarlar.
* `description` (isteğe bağlı), yeteneğin amacı hakkında ek bağlam sağlar.
Yeni yetenekleri iki şekilde oluşturabilirsiniz:
* **Şablondan**: `yarn twenty entity:add` komutunu çalıştırın ve yeni bir yetenek ekleme seçeneğini seçin.
* **Manuel**: Yeni bir dosya oluşturun ve aynı deseni izleyerek `defineSkill()` kullanın.
### Oluşturulmuş türlendirilmiş istemci
Tipli istemci, `yarn twenty app:dev` tarafından otomatik olarak oluşturulur ve çalışma alanı şemanıza göre `node_modules/twenty-sdk/generated` içine kaydedilir. Fonksiyonlarınızda kullanın:
@@ -683,6 +807,53 @@ Notlar:
* API anahtarının izinleri, `application-config.ts` içinde `defaultRoleUniversalIdentifier` aracılığıyla referans verilen role göre belirlenir. Bu, uygulamanızın mantık fonksiyonları tarafından kullanılan varsayılan roldür.
* Uygulamalar, en az ayrıcalık ilkesini izlemek için roller tanımlayabilir. Yalnızca fonksiyonlarınızın ihtiyaç duyduğu izinleri verin ve ardından `defaultRoleUniversalIdentifier` değerini o rolün evrensel tanımlayıcısına yönlendirin.
#### Dosya yükleme
Oluşturulan `Twenty` istemcisi, çalışma alanı nesnelerinizdeki dosya türündeki alanlara dosya eklemek için bir `uploadFile` yöntemi içerir. Standart GraphQL istemcileri çok parçalı dosya yüklemelerini yerel olarak desteklemediğinden, istemci arka planda [GraphQL çok parçalı istek belirtimi](https://github.com/jaydenseric/graphql-multipart-request-spec) uygulayan bu özel yöntemi sağlar.
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
Yöntem imzası:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| Parametre | Tür | Açıklama |
| ---------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
| `fileBuffer` | `Buffer` | Dosyanın ham içeriği |
| `filename` | `string` | Dosyanın adı (depolama ve görüntüleme için kullanılır) |
| `contentType` | `string` | Dosyanın MIME türü (belirtilmezse varsayılan olarak `application/octet-stream` kullanılır) |
| `fieldMetadataUniversalIdentifier` | `string` | Nesnenizdeki dosya türü alanının `universalIdentifier` değeri |
Önemli noktalar:
* Yöntem dosyayı, yükleme mutasyonunun çözümlendiği **metadata endpoint**'e (ana GraphQL endpoint'ine değil) gönderir.
* Alan için `universalIdentifier` kullanılır (çalışma alanına özgü kimliği değil), böylece yükleme kodunuz uygulamanızın yüklü olduğu herhangi bir çalışma alanında çalışır — uygulamaların başka her yerde alanlara nasıl atıfta bulunduğuyla tutarlıdır.
* Döndürülen `url`, yüklenen dosyaya erişmek için kullanabileceğiniz imzalı bir URL'dir.
### Hello World örneği
Nesneleri, mantık fonksiyonlarını, ön uç bileşenlerini ve birden çok tetikleyiciyi gösteren minimal, uçtan uca bir örneği [buradan](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world) inceleyin:
@@ -15,6 +15,7 @@ description: 以代码的形式构建并管理 Twenty 自定义项。
* 以代码定义自定义对象和字段(受管理的数据模型)
* 构建带有自定义触发器的逻辑函数
* 为 AI 智能体定义技能
* 将同一个应用部署到多个工作空间
## 先决条件
@@ -27,21 +28,34 @@ description: 以代码的形式构建并管理 Twenty 自定义项。
使用官方脚手架创建一个新应用,然后进行身份验证并开始开发:
```bash filename="Terminal"
# 搭建一个新应用
# Scaffold a new app (includes all examples by default)
npx create-twenty-app@latest my-twenty-app
cd my-twenty-app
# 如果你不使用 yarn@4
# If you don't use yarn@4
corepack enable
yarn install
# 使用你的 API 密钥进行身份验证(系统会提示你)
# Authenticate using your API key (you'll be prompted)
yarn twenty auth:login
# 启动开发模式:会将本地更改自动同步到你的工作区
# Start dev mode: automatically syncs local changes to your workspace
yarn twenty app:dev
```
The scaffolder supports three modes for controlling which example files are included:
```bash filename="Terminal"
# 默认(完整):所有示例(对象、字段、逻辑函数、前端组件、视图、导航菜单项、技能)
npx create-twenty-app@latest my-app
# 最小化:仅核心文件(application-config.ts 和 default-role.ts
npx create-twenty-app@latest my-app --minimal
# 交互式:选择要包含的示例
npx create-twenty-app@latest my-app --interactive
```
从这里您可以:
```bash filename="Terminal"
@@ -52,7 +66,10 @@ yarn twenty entity:add
yarn twenty function:logs
# 按名称执行一个函数
yarn twenty function:execute -n my-function -p '{"name": "test"}'
yarn twenty function:execute -n my-function -p '{\"name\": \"test\"}'
# 执行安装后函数
yarn twenty function:execute --postInstall
# 从当前工作区卸载该应用
yarn twenty app:uninstall
@@ -70,9 +87,9 @@ yarn twenty help
* 将一个最小的基础应用复制到 `my-twenty-app/` 中
* 添加本地 `twenty-sdk` 依赖和 Yarn 4 配置
* 创建与 `twenty` CLI 关联的配置文件和脚本
* 生成默认的应用配置和默认的函数角色
* Generates core files (application config, default function role, post-install function) plus example files based on the scaffolding mode
一个新生成的脚手架应用如下所示:
A freshly scaffolded app with the default `--exhaustive` mode looks like this:
```text filename="my-twenty-app/"
my-twenty-app/
@@ -86,17 +103,30 @@ my-twenty-app/
eslint.config.mjs
tsconfig.json
README.md
public/ # 公共资源文件夹(图像、字体等)
public/ # Public assets folder (images, fonts, etc.)
src/
├── application-config.ts # 必需 - 主应用程序配置
├── application-config.ts # Required - main application configuration
├── roles/
│ └── default-role.ts # 用于逻辑函数的默认角色
│ └── default-role.ts # Default role for logic functions
├── objects/
│ └── example-object.ts # Example custom object definition
├── fields/
│ └── example-field.ts # Example standalone field definition
├── logic-functions/
── hello-world.ts # 示例逻辑函数
└── front-components/
└── hello-world.tsx # 示例前端组件
── hello-world.ts # Example logic function
└── post-install.ts # Post-install logic function
├── front-components/
│ └── hello-world.tsx # Example front component
├── views/
│ └── example-view.ts # Example saved view definition
├── navigation-menu-items/
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
└── skills/
└── example-skill.ts # Example AI agent skill definition
```
With `--minimal`, only the core files are created (`application-config.ts`, `roles/default-role.ts`, and `logic-functions/post-install.ts`). With `--interactive`, you choose which example files to include.
总体来说:
* **package.json**:声明应用名称、版本、引擎(Node 24+、Yarn 4),并添加 `twenty-sdk` 以及一个 `twenty` 脚本,该脚本会委托给本地的 `twenty` CLI。 运行 `yarn twenty help` 以列出所有可用命令。
@@ -112,13 +142,16 @@ my-twenty-app/
该 SDK 通过在你的 TypeScript 文件中解析 **`export default define<Entity>({...})`** 调用来检测实体。 每种实体类型都有一个从 `twenty-sdk` 导出的对应辅助函数:
| 辅助函数 | 实体类型 |
| ------------------------ | --------- |
| `defineObject()` | 自定义对象定义 |
| `defineLogicFunction()` | 逻辑函数定义 |
| `defineFrontComponent()` | 前端组件定义 |
| `defineRole()` | 角色定义 |
| `defineField()` | 现有对象的字段扩展 |
| 辅助函数 | 实体类型 |
| ---------------------------- | -------------------------------- |
| `defineObject()` | 自定义对象定义 |
| `defineLogicFunction()` | 逻辑函数定义 |
| `defineFrontComponent()` | 前端组件定义 |
| `defineRole()` | 角色定义 |
| `defineField()` | 现有对象的字段扩展 |
| `defineView()` | Saved view definitions |
| `defineNavigationMenuItem()` | Navigation menu item definitions |
| `defineSkill()` | AI agent skill definitions |
<Note>
**文件命名是灵活的。** 实体检测基于 AST — SDK 会扫描你的源文件以查找 `export default define<Entity>({...})` 模式。 你可以按照自己的喜好组织文件和文件夹。 按实体类型分组(例如 `logic-functions/`、`roles/`)只是代码组织的一种约定,并非必需。
@@ -140,7 +173,7 @@ export default defineObject({
后续命令将添加更多文件和文件夹:
* `yarn twenty app:dev` 将在 `node_modules/twenty-sdk/generated` 中自动生成一个类型化的 API 客户端(类型化的 Twenty 客户端 + 工作区类型)。
* `yarn twenty entity:add` 会在 `src/` 下为你的自定义对象、函数、前端组件或角色添加实体定义文件。
* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, roles, skills, and more.
## 身份验证
@@ -183,14 +216,17 @@ twenty-sdk 提供你在应用中使用的类型化构件和辅助函数。 以
该 SDK 提供辅助函数用于定义你的应用实体。 如 [实体检测](#entity-detection) 中所述,你必须使用 `export default define<Entity>({...})` 才能让你的实体被检测到:
| 函数 | 目的 |
| ------------------------ | ------------------ |
| `defineApplication()` | 配置应用元数据(必需,每个应用一个) |
| `defineObject()` | 定义带字段的自定义对象 |
| `defineLogicFunction()` | 定义带处理程序的逻辑函数 |
| `defineFrontComponent()` | 为自定义 UI 定义前端组件 |
| `defineRole()` | 配置角色权限和对象访问 |
| `defineField()` | 为现有对象扩展额外字段 |
| 函数 | 目的 |
| ---------------------------- | ------------------------------- |
| `defineApplication()` | 配置应用元数据(必需,每个应用一个) |
| `defineObject()` | 定义带字段的自定义对象 |
| `defineLogicFunction()` | 定义带处理程序的逻辑函数 |
| `defineFrontComponent()` | 为自定义 UI 定义前端组件 |
| `defineRole()` | 配置角色权限和对象访问 |
| `defineField()` | 为现有对象扩展额外字段 |
| `defineView()` | Define saved views for objects |
| `defineNavigationMenuItem()` | Define sidebar navigation links |
| `defineSkill()` | Define AI agent skills |
这些函数会在构建时校验你的配置,并提供 IDE 自动补全和类型安全。
@@ -290,6 +326,7 @@ export default defineObject({
* **应用的身份**:标识符、显示名称和描述。
* **函数如何运行**:它们用于权限的角色。
* **(可选)变量**:以环境变量形式提供给函数的键值对。
* **(可选)安装后函数**:在应用安装后运行的逻辑函数。
使用 `defineApplication()` 定义你的应用配置:
@@ -297,6 +334,7 @@ export default defineObject({
// src/application-config.ts
import { defineApplication } from 'twenty-sdk';
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from 'src/roles/default-role';
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
@@ -312,6 +350,7 @@ export default defineApplication({
},
},
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
@@ -320,6 +359,7 @@ export default defineApplication({
* `universalIdentifier` 字段是你拥有的确定性 ID;生成一次并在多次同步中保持稳定。
* `applicationVariables` 会变成函数可用的环境变量(例如,`DEFAULT_RECIPIENT_NAME` 可作为 `process.env.DEFAULT_RECIPIENT_NAME` 使用)。
* `defaultRoleUniversalIdentifier` 必须与角色文件一致(见下文)。
* `postInstallLogicFunctionUniversalIdentifier`(可选)指向一个在应用安装后自动运行的逻辑函数。 参见 [安装后函数](#post-install-functions)。
#### 角色和权限
@@ -458,6 +498,55 @@ export default defineLogicFunction({
* `triggers` 数组是可选的。 没有触发器的函数可作为实用函数,被其他函数调用。
* 你可以在单个函数中混用多种触发器类型。
### 安装后函数
安装后函数是在你的应用安装到工作区后自动运行的逻辑函数。 这对于一次性设置任务很有用,例如填充默认数据、创建初始记录或配置工作区设置。
当你使用 `create-twenty-app` 脚手架创建一个新应用时,会在 `src/logic-functions/post-install.ts` 为你生成一个安装后函数:
```typescript
// src/logic-functions/post-install.ts
import { defineLogicFunction } from 'twenty-sdk';
export const POST_INSTALL_UNIVERSAL_IDENTIFIER = '<generated-uuid>';
const handler = async (): Promise<void> => {
console.log('Post install logic function executed successfully!');
};
export default defineLogicFunction({
universalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
name: 'post-install',
description: 'Runs after installation to set up the application.',
timeoutSeconds: 300,
handler,
});
```
通过在 `application-config.ts` 中引用其通用标识符,可将该函数接入你的应用:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
export default defineApplication({
// ...
postInstallLogicFunctionUniversalIdentifier: POST_INSTALL_UNIVERSAL_IDENTIFIER,
});
```
You can also manually execute the post-install function at any time using the CLI:
```bash filename="Terminal"
yarn twenty function:execute --postInstall
```
关键点:
* Post-install functions are standard logic functions — they use `defineLogicFunction()` like any other function.
* The `postInstallLogicFunctionUniversalIdentifier` field in `defineApplication()` is optional. If omitted, no function runs after installation.
* The default timeout is set to 300 seconds (5 minutes) to allow for longer setup tasks like data seeding.
* Post-install functions do not need triggers — they are invoked by the platform during installation or manually via `function:execute --postInstall`.
### 路由触发器负载
<Warning>
@@ -657,6 +746,41 @@ export default defineFrontComponent({
* **脚手架生成**:运行 `yarn twenty entity:add` 并选择添加新前端组件的选项。
* **手动**:创建一个新的 `*.front-component.tsx` 文件,并使用 `defineFrontComponent()`。
### 技能
Skills define reusable instructions and capabilities that AI agents can use within your workspace. Use `defineSkill()` to define skills with built-in validation:
```typescript
// src/skills/example-skill.ts
import { defineSkill } from 'twenty-sdk';
export default defineSkill({
universalIdentifier: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
name: 'sales-outreach',
label: 'Sales Outreach',
description: 'Guides the AI agent through a structured sales outreach process',
icon: 'IconBrain',
content: `You are a sales outreach assistant. When reaching out to a prospect:
1. Research the company and recent news
2. Identify the prospect's role and likely pain points
3. Draft a personalized message referencing specific details
4. Keep the tone professional but conversational`,
});
```
关键点:
* `name` is a unique identifier string for the skill (kebab-case recommended).
* `label` is the human-readable display name shown in the UI.
* `content` contains the skill instructions — this is the text the AI agent uses.
* `icon` (optional) sets the icon displayed in the UI.
* `description` (optional) provides additional context about the skill's purpose.
You can create new skills in two ways:
* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new skill.
* **Manual**: Create a new file and use `defineSkill()`, following the same pattern.
### 生成的类型化客户端
类型化客户端由 `yarn twenty app:dev` 自动生成,并基于你的工作区架构存放在 `node_modules/twenty-sdk/generated`。 在你的函数中使用它:
@@ -683,6 +807,53 @@ const { me } = await client.query({ me: { id: true, displayName: true } });
* API 密钥的权限由 `application-config.ts` 中通过 `defaultRoleUniversalIdentifier` 引用的角色决定。 这是你的应用逻辑函数使用的默认角色。
* 应用可以定义角色以遵循最小权限原则。 仅授予函数所需的权限,然后将 `defaultRoleUniversalIdentifier` 指向该角色的通用标识符。
#### 上传文件
生成的 `Twenty` 客户端包含一个 `uploadFile` 方法,用于将文件附加到工作区对象的文件类型字段。 由于标准 GraphQL 客户端不原生支持多部分文件上传,该客户端提供了一个专用方法,在底层实现了 [GraphQL 多部分请求规范](https://github.com/jaydenseric/graphql-multipart-request-spec)。
```typescript
import Twenty from '~/generated';
import * as fs from 'fs';
const client = new Twenty();
const fileBuffer = fs.readFileSync('./invoice.pdf');
const uploadedFile = await client.uploadFile(
fileBuffer, // file contents as a Buffer
'invoice.pdf', // filename
'application/pdf', // MIME type (defaults to 'application/octet-stream')
'58a0a314-d7ea-4865-9850-7fb84e72f30b', // field universal identifier
);
console.log(uploadedFile);
// { id: '...', path: '...', size: 12345, createdAt: '...', url: 'https://...' }
```
方法签名:
```typescript
uploadFile(
fileBuffer: Buffer,
filename: string,
contentType: string,
fieldMetadataUniversalIdentifier: string,
): Promise<{ id: string; path: string; size: number; createdAt: string; url: string }>
```
| 参数 | 类型 | 描述 |
| ---------------------------------- | -------- | ------------------------------------------------ |
| `fileBuffer` | `Buffer` | 原始文件内容 |
| `filename` | `string` | 文件名称(用于存储和显示) |
| `contentType` | `string` | 文件的 MIME 类型(如果省略,默认为 `application/octet-stream` |
| `fieldMetadataUniversalIdentifier` | `string` | 你的对象上文件类型字段的 `universalIdentifier` |
关键点:
* 该方法将文件发送到**元数据端点**(而不是主 GraphQL 端点),在那里处理上传变更操作。
* 它使用该字段的 `universalIdentifier`(而不是其工作区特定的 ID),因此你的上传代码可以在安装了你的应用的任何工作区中使用——这与应用在其他地方引用字段的方式保持一致。
* 返回的 `url` 是一个签名 URL,你可以用它来访问已上传的文件。
### Hello World 示例
在[此处](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/hello-world)查看一个最小的端到端示例,展示对象、逻辑函数、前端组件和多种触发器:
+1 -1
View File
@@ -19,7 +19,7 @@
},
"devDependencies": {
"@lingui/cli": "^5.1.2",
"@lingui/swc-plugin": "^5.6.0",
"@lingui/swc-plugin": "^5.11.0",
"@lingui/vite-plugin": "^5.1.2",
"@react-email/preview-server": "5.1.0",
"@tiptap/core": "^3.4.2",
@@ -9,6 +9,8 @@ import { SOURCE_LOCALE } from 'twenty-shared/translations';
// eslint-disable-next-line no-restricted-imports
import { RootDecorator } from '../src/testing/decorators/RootDecorator';
// eslint-disable-next-line no-restricted-imports
import { resetJotaiStore } from '../src/modules/ui/utilities/state/jotai/jotaiStore';
import 'react-loading-skeleton/dist/skeleton.css';
import 'twenty-ui/style.css';
@@ -84,6 +86,10 @@ const preview: Preview = {
RootDecorator,
],
beforeEach: () => {
resetJotaiStore();
},
loaders: [mswLoader],
parameters: {
+1 -1
View File
@@ -63,7 +63,7 @@ const jestConfig = {
global: {
statements: 49.5,
lines: 48,
functions: 40,
functions: 39.5,
},
},
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
+1 -1
View File
@@ -120,7 +120,7 @@
},
"devDependencies": {
"@lingui/cli": "^5.1.2",
"@lingui/swc-plugin": "^5.6.0",
"@lingui/swc-plugin": "^5.11.0",
"@lingui/vite-plugin": "^5.1.2",
"@playwright/test": "^1.56.1",
"@tiptap/suggestion": "3.4.2",
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ import { useDefaultHomePagePath } from '@/navigation/hooks/useDefaultHomePagePat
import { useOnboardingStatus } from '@/onboarding/hooks/useOnboardingStatus';
import { useIsWorkspaceActivationStatusEqualsTo } from '@/workspace/hooks/useIsWorkspaceActivationStatusEqualsTo';
import { useParams } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { useRecoilValueV2 } from '@/ui/utilities/state/jotai/hooks/useRecoilValueV2';
import { AppPath, SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
@@ -63,14 +63,14 @@ const setupMockUseParams = (objectNamePlural?: string) => {
.mockReturnValueOnce({ objectNamePlural: objectNamePlural ?? '' });
};
jest.mock('recoil');
jest.mock('@/ui/utilities/state/jotai/hooks/useRecoilValueV2');
const setupMockRecoil = (
objectNamePlural?: string,
verifyEmailRedirectPath?: string,
calendarBookingPageId?: string | null,
) => {
jest
.mocked(useRecoilValue)
.mocked(useRecoilValueV2)
.mockReturnValueOnce(calendarBookingPageId ?? 'mock-calendar-id')
.mockReturnValueOnce([{ namePlural: objectNamePlural ?? '' }])
.mockReturnValueOnce(verifyEmailRedirectPath);
@@ -5,9 +5,9 @@ import { useIsCurrentLocationOnAWorkspace } from '@/domain-manager/hooks/useIsCu
import { useDefaultHomePagePath } from '@/navigation/hooks/useDefaultHomePagePath';
import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState';
import { useOnboardingStatus } from '@/onboarding/hooks/useOnboardingStatus';
import { useRecoilValueV2 } from '@/ui/utilities/state/jotai/hooks/useRecoilValueV2';
import { useIsWorkspaceActivationStatusEqualsTo } from '@/workspace/hooks/useIsWorkspaceActivationStatusEqualsTo';
import { useLocation, useParams } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { AppPath, SettingsPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
@@ -23,7 +23,7 @@ export const usePageChangeEffectNavigateLocation = () => {
);
const { defaultHomePagePath } = useDefaultHomePagePath();
const location = useLocation();
const calendarBookingPageId = useRecoilValue(calendarBookingPageIdState);
const calendarBookingPageId = useRecoilValueV2(calendarBookingPageIdState);
const someMatchingLocationOf = (appPaths: AppPath[]): boolean =>
appPaths.some((appPath) => isMatchingLocation(location, appPath));
@@ -45,11 +45,13 @@ export const usePageChangeEffectNavigateLocation = () => {
];
const objectNamePlural = useParams().objectNamePlural ?? '';
const objectMetadataItems = useRecoilValue(objectMetadataItemsState);
const objectMetadataItems = useRecoilValueV2(objectMetadataItemsState);
const objectMetadataItem = objectMetadataItems?.find(
(objectMetadataItem) => objectMetadataItem.namePlural === objectNamePlural,
);
const verifyEmailRedirectPath = useRecoilValue(verifyEmailRedirectPathState);
const verifyEmailRedirectPath = useRecoilValueV2(
verifyEmailRedirectPathState,
);
if (
(!isLoggedIn || (isLoggedIn && !isOnAWorkspace)) &&
+182 -74
View File
@@ -311,6 +311,11 @@ msgstr "{morphRelationCount} Objekte"
msgid "{num, selectordinal, one {{num}st} two {{num}nd} few {{num}rd} other {{num}th}}"
msgstr "{num, selectordinal, one {{num}ste} other {{num}de}}"
#. js-lingui-id: fTSz8d
#: src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownActorSelect.tsx
msgid "{numberOfSelectedItems} workspace members"
msgstr ""
#. js-lingui-id: 7kYa/u
#: src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
msgid "{objectLabelPlural} ({totalCount})"
@@ -331,6 +336,16 @@ msgstr ""
msgid "{positionLabel} record holds priority"
msgstr "{positionLabel}-rekord het voorrang"
#. js-lingui-id: YG/wl5
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — API key not configured"
msgstr ""
#. js-lingui-id: s80lrU
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — Deprecated"
msgstr ""
#. js-lingui-id: Sxx5Hr
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "{recordCount} of {totalCount} records"
@@ -770,6 +785,11 @@ msgstr "Voeg \"{trimmedName}\" by opsies"
msgid "Add a {objectLabelSingular}"
msgstr "Voeg 'n {objectLabelSingular} by"
#. js-lingui-id: 7W8nJr
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx
msgid "Add a Group"
msgstr ""
#. js-lingui-id: CZDwqQ
#: src/modules/ai/components/suggested-prompts/default-suggested-prompts.ts
msgid "Add a new company we're in touch with (e.g. name, website, industry). Details: "
@@ -786,11 +806,6 @@ msgstr "Voeg 'n nodus by"
msgid "Add a record"
msgstr ""
#. js-lingui-id: r8W+9y
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationSectionEditor.tsx
msgid "Add a Section"
msgstr ""
#. js-lingui-id: eMc2xs
#: src/modules/workflow/workflow-diagram/components/WorkflowDiagramCreateStepElement.tsx
msgid "Add a step"
@@ -1117,6 +1132,11 @@ msgstr "Stel die rolverwante instellings aan"
msgid "Admin"
msgstr ""
#. js-lingui-id: K2OX5h
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Admin Model Controls"
msgstr ""
#. js-lingui-id: g1in8j
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
@@ -1145,11 +1165,6 @@ msgstr "Gevorderde funksie om die werkverrigting van navrae te verbeter en uniek
msgid "Advanced filter"
msgstr "Gevorderde filter"
#. js-lingui-id: luNzWN
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Advanced model for complex planning"
msgstr ""
#. js-lingui-id: miuPUc
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
@@ -1252,6 +1267,7 @@ msgstr ""
#: src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
#: src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/command-menu/pages/workflow/action/components/CommandMenuWorkflowSelectAction.tsx
msgid "AI"
msgstr "KI"
@@ -1263,11 +1279,6 @@ msgstr "KI"
msgid "AI Model"
msgstr "KI Model"
#. js-lingui-id: tGx4Zn
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "AI Models"
msgstr ""
#. js-lingui-id: Sfwld8
#: src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx
msgid "AI not configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or XAI_API_KEY in your environment."
@@ -1351,6 +1362,11 @@ msgstr ""
msgid "All Metadata"
msgstr ""
#. js-lingui-id: AJgjR+
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "All Models"
msgstr ""
#. js-lingui-id: aFE/OW
#: src/pages/settings/security/event-logs/components/EventLogFilters.tsx
#: src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx
@@ -1512,6 +1528,9 @@ msgstr "'n Fout het voorgekom tydens die oplaai van die prent."
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
@@ -1608,6 +1627,11 @@ msgstr "API-sleutel"
msgid "API Key copied to clipboard"
msgstr "API-sleutel is na knipbord gekopieer"
#. js-lingui-id: jjaYji
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "API key not configured"
msgstr ""
#. js-lingui-id: Widx6n
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "API key roles"
@@ -1974,7 +1998,6 @@ msgstr "Aanhegsels"
#. js-lingui-id: EPEFrH
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "Audit Logs"
msgstr ""
@@ -2064,6 +2087,16 @@ msgstr "Outomaties skep kontakte vir mense."
msgid "Automatically create People records when receiving or sending emails"
msgstr "Outomaties skep van Persoonlike rekords by ontvang of stuur van e-posse"
#. js-lingui-id: erwsgX
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Automatically enable new models"
msgstr ""
#. js-lingui-id: fx8TeY
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Automatically mark new models as available"
msgstr ""
#. js-lingui-id: lXkUEV
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx
msgid "Availability"
@@ -2071,6 +2104,7 @@ msgstr "Beskikbaarheid"
#. js-lingui-id: csDS2L
#: src/pages/settings/applications/SettingsApplications.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectsSection.tsx
msgid "Available"
msgstr "Beskikbaar"
@@ -2251,9 +2285,9 @@ msgstr "Bruin"
msgid "Build a dashboard that shows: (1) total pipeline value by stage for the last 3 months, (2) count of deals won vs lost per month, (3) average deal size. Use our standard pipeline stages."
msgstr ""
#. js-lingui-id: 8SlslB
#. js-lingui-id: alSW5d
#: src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
msgid "Build many-to-many relations. <0>Learn more</0>"
msgid "Build many-to-many relations"
msgstr ""
#. js-lingui-id: +7fBMP
@@ -2615,7 +2649,7 @@ msgid "Choose the fields that will identify your records"
msgstr "Kies die velde wat jou rekords sal identifiseer"
#. js-lingui-id: hIJigY
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Choose the format used to display date value"
msgstr "Kies die formaat wat gebruik word om datumwaarde te vertoon"
@@ -2866,10 +2900,14 @@ msgstr "Voltooide werke behou vir {completedDuration}, mislukte werke behou vir
msgid "Conditions"
msgstr "Voorwaardes"
#. js-lingui-id: 14PdY0
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config"
msgstr ""
#. js-lingui-id: Vj43Y/
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config Variables"
msgstr "Konfig Veranderlikes"
@@ -2884,11 +2922,6 @@ msgstr "Konfigurasie"
msgid "Configure"
msgstr ""
#. js-lingui-id: 9px+al
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Configure AI models for routing and planning"
msgstr ""
#. js-lingui-id: +zUMwJ
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure an SSO connection"
@@ -2914,6 +2947,11 @@ msgstr "Stel CalDAV-instellings op om u kalendergebeurtenisse te sinchroniseer."
msgid "Configure date, time, number, timezone, and calendar start day"
msgstr "Konfigureer datum, tyd, nommer, tydsone, en kalender begin dag"
#. js-lingui-id: +SQwHr
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Configure default AI models and availability"
msgstr ""
#. js-lingui-id: utsXG8
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure fallback login methods for users with SSO bypass permissions"
@@ -3244,11 +3282,6 @@ msgstr "Kern"
msgid "Core Objects"
msgstr ""
#. js-lingui-id: cfa2VJ
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Core Schema"
msgstr "Kernskema"
#. js-lingui-id: I99Miw
#: src/modules/billing/components/SettingsBillingCreditsSection.tsx
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
@@ -4267,6 +4300,16 @@ msgstr "Verwyderde rekords"
msgid "Deleting this method will remove it permanently from your account."
msgstr "Deur hierdie metode te verwyder, sal dit permanent van u rekening verwyder word."
#. js-lingui-id: Ssdrw4
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated"
msgstr ""
#. js-lingui-id: 8OJZ/p
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated models"
msgstr ""
#. js-lingui-id: O3LJh6
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
@@ -5041,10 +5084,10 @@ msgstr ""
msgid "Enter filter"
msgstr "Voer filter in"
#. js-lingui-id: 9/30HU
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
msgid "Enter in <0>Unicode</0> format"
msgstr "Voer in <0>Unicode</0> formaat"
#. js-lingui-id: f09Lhk
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Enter in Unicode format"
msgstr ""
#. js-lingui-id: 9CjMQ7
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -5810,9 +5853,9 @@ msgstr ""
msgid "Failed to save workspace instructions"
msgstr ""
#. js-lingui-id: YMSYb+
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update fast model"
#. js-lingui-id: YzURPo
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update auto-enable setting"
msgstr ""
#. js-lingui-id: P1NmNz
@@ -5820,6 +5863,27 @@ msgstr ""
msgid "Failed to update feature flag. {errorMessage}"
msgstr "Kon nie funksievlag opdateer nie. {errorMessage}"
#. js-lingui-id: 1R13Ov
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model"
msgstr ""
#. js-lingui-id: W7Ff/4
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update model availability"
msgstr ""
#. js-lingui-id: LgZlJ7
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model availability settings"
msgstr ""
#. js-lingui-id: rCUG3c
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model selection mode"
msgstr ""
#. js-lingui-id: HnBqPY
#: src/modules/billing/components/internal/MeteredPriceSelector.tsx
msgid "Failed to update price."
@@ -5835,11 +5899,6 @@ msgstr ""
msgid "Failed to update role"
msgstr "Kon nie rol opdateer nie"
#. js-lingui-id: h/0aT5
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update smart model"
msgstr ""
#. js-lingui-id: Dzh4a2
#: src/modules/settings/admin-panel/config-variables/hooks/useConfigVariableActions.ts
msgid "Failed to update variable"
@@ -5888,15 +5947,10 @@ msgid "False"
msgstr "Vals"
#. js-lingui-id: XVIZ7v
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Fast Model"
msgstr ""
#. js-lingui-id: UJHTjm
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Fast model updated successfully"
msgstr ""
#. js-lingui-id: X9kySA
#: src/modules/navigation-menu-item/components/CurrentWorkspaceMemberNavigationMenuItemFolders.tsx
#: src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
@@ -6055,6 +6109,7 @@ msgstr ""
#: src/modules/views/components/ViewBarFilterButton.tsx
#: src/modules/settings/roles/components/SettingsRolesList.tsx
#: src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
#: src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx
#: src/modules/command-menu/pages/page-layout/constants/settings/ChartConfigurationSettingLabels.ts
#: src/modules/command-menu/pages/page-layout/components/ChartFiltersSettings.tsx
@@ -6284,7 +6339,9 @@ msgstr ""
#: src/pages/settings/SettingsWorkspace.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetEditorGroupsData.ts
#: src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuOpenContent.tsx
msgid "General"
msgstr "Algemeen"
@@ -6526,11 +6583,15 @@ msgstr ""
msgid "Heading 3"
msgstr ""
#. js-lingui-id: UPqS9C
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health"
msgstr ""
#. js-lingui-id: I1IOmb
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatus.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health Status"
msgstr "Gesondheidstatus"
@@ -7008,11 +7069,6 @@ msgstr "Instruksies vir KI"
msgid "Integrations - Settings"
msgstr "Integrasies - Instellings"
#. js-lingui-id: ntgzzG
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Interact with your workspace data"
msgstr "Interaksie met jou werkspasie-data"
#. js-lingui-id: jyjroS
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Interval switching has been cancelled."
@@ -8126,11 +8182,6 @@ msgstr "Metadata"
msgid "Metadata file generation failed"
msgstr "Metadataleêr generasie het misluk"
#. js-lingui-id: 0BF9eC
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Metadata Schema"
msgstr "Metadataskema"
#. js-lingui-id: onCJJ6
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Metered tier switching has been cancelled."
@@ -8189,6 +8240,17 @@ msgstr ""
msgid "Mission accomplished!"
msgstr "Missie voltooi!"
#. js-lingui-id: //nm2/
#: src/pages/settings/ai/SettingsAI.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models"
msgstr ""
#. js-lingui-id: oHM560
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models available in the chat model picker"
msgstr ""
#. js-lingui-id: hty0d5
#: src/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect.tsx
msgid "Monday"
@@ -8234,6 +8296,7 @@ msgid "months"
msgstr ""
#. js-lingui-id: 2FYpfJ
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
msgid "More"
msgstr "Meer"
@@ -8523,6 +8586,11 @@ msgstr "Nuwe Veld"
msgid "New folder"
msgstr ""
#. js-lingui-id: 93KA8w
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationEditor.tsx
msgid "New Group"
msgstr ""
#. js-lingui-id: o8MyXb
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "New key"
@@ -8931,7 +8999,6 @@ msgstr "Geen maatstawedata beskikbaar"
#. js-lingui-id: UWZZdQ
#: src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx
#: src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "No models available. Please configure AI models in your workspace settings."
msgstr "Geen modelle beskikbaar nie. Stel asseblief KI-modelle in jou werkruimte-instellings op."
@@ -9569,7 +9636,7 @@ msgstr ""
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/pages/settings/admin-panel/SettingsAdmin.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuNewSidebarItemMainMenu.tsx
msgid "Other"
msgstr "Ander"
@@ -10257,11 +10324,6 @@ msgstr "Wagryprestasie"
msgid "Queue: {queueName}"
msgstr "Wagry: {queueName}"
#. js-lingui-id: GaAG2G
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Quick model for routing decisions"
msgstr ""
#. js-lingui-id: opSifa
#: src/modules/ai/utils/getToolDisplayMessage.ts
msgid "Ran {formattedName}"
@@ -10738,6 +10800,11 @@ msgstr "Herstel rekords"
msgid "Restore Records"
msgstr "Herstel rekords"
#. js-lingui-id: hO3AfV
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Restrict available models to a curated list"
msgstr ""
#. js-lingui-id: RD6AE9
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx
msgid "Result"
@@ -11019,6 +11086,12 @@ msgstr "Soek 'n veld..."
msgid "Search a folder..."
msgstr ""
#. js-lingui-id: 8J0e5B
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Search a model..."
msgstr ""
#. js-lingui-id: WXvlVa
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "Search a role..."
@@ -11572,6 +11645,11 @@ msgstr "Gestuur en Ontvang"
msgid "Serbian (Cyrillic)"
msgstr "Serwies (Sirillies)"
#. js-lingui-id: 8ZSrlB
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Server-wide AI model availability settings"
msgstr ""
#. js-lingui-id: LUc0oL
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
msgid "Service Provider Details"
@@ -11654,7 +11732,6 @@ msgstr "Instelling van jou databasis..."
#: src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
#: src/pages/settings/applications/SettingsApplicationDetails.tsx
#: src/pages/settings/ai/SettingsAgentForm.tsx
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/sign-in-background-mock/components/SignInAppNavigationDrawerMock.tsx
#: src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx
#: src/modules/settings/roles/role/components/SettingsRole.tsx
@@ -11873,15 +11950,10 @@ msgid "Small section heading"
msgstr ""
#. js-lingui-id: 5J8ZFl
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Smart Model"
msgstr ""
#. js-lingui-id: qgvZ/2
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Smart model updated successfully"
msgstr ""
#. js-lingui-id: w+rJId
#: src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx
msgid "SMTP Configuration"
@@ -12960,6 +13032,11 @@ msgstr "Skakel alle voorwerpregte"
msgid "Toggle all settings permissions"
msgstr "Skakel alle instellingregte"
#. js-lingui-id: 93pMSK
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Toggle model availability across all workspaces"
msgstr ""
#. js-lingui-id: WOr+hW
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
msgid "tokens"
@@ -13257,6 +13334,11 @@ msgstr ""
msgid "Unable to Reach Back-end"
msgstr "Nie in staat om rugsteun te bereik nie"
#. js-lingui-id: EbnX+O
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Unconfigured models"
msgstr ""
#. js-lingui-id: EUHN7i
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx
msgid "Undefined"
@@ -13567,11 +13649,26 @@ msgstr "Gebruik as konsep"
msgid "Use authenticator apps and browser extensions like 1Password, Authy, Microsoft Authenticator to generate one-time passwords"
msgstr "Gebruik magtiging apps en blaaieruitbreidings soos 1Password, Authy, Microsoft Authenticator om eenmalige wagwoorde te genereer"
#. js-lingui-id: hCZsJ0
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Use best models only"
msgstr ""
#. js-lingui-id: c6uZUV
#: src/modules/object-record/record-table/empty-state/utils/getEmptyStateSubTitle.ts
msgid "Use our API or add your first {objectLabel} manually"
msgstr "Gebruik ons API of voeg jou eerste {objectLabel} handleiding by"
#. js-lingui-id: 664z2C
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for chats, agents, and complex reasoning"
msgstr ""
#. js-lingui-id: C41qgx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for lightweight tasks like title generation"
msgstr ""
#. js-lingui-id: AQVj2A
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
msgid "Useful for pivot/junction tables"
@@ -14080,6 +14177,16 @@ msgstr ""
msgid "When enabled, AI agents and workflow automations can discover and call this function"
msgstr ""
#. js-lingui-id: i2V4DO
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "When enabled, new AI models will be available to users by default"
msgstr ""
#. js-lingui-id: 01e9rV
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "When enabled, newly added models are available to all workspaces by default"
msgstr ""
#. js-lingui-id: C51ilI
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "When the API key will expire."
@@ -14212,6 +14319,7 @@ msgid "Workspace Domain"
msgstr "Werkruimte Domein"
#. js-lingui-id: J2q6WC
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx
msgid "Workspace Events"
msgstr ""
+182 -74
View File
@@ -311,6 +311,11 @@ msgstr "{morphRelationCount, plural, zero {لا كائنات} one {كائن وا
msgid "{num, selectordinal, one {{num}st} two {{num}nd} few {{num}rd} other {{num}th}}"
msgstr ""
#. js-lingui-id: fTSz8d
#: src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownActorSelect.tsx
msgid "{numberOfSelectedItems} workspace members"
msgstr ""
#. js-lingui-id: 7kYa/u
#: src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
msgid "{objectLabelPlural} ({totalCount})"
@@ -331,6 +336,16 @@ msgstr ""
msgid "{positionLabel} record holds priority"
msgstr "سجل {positionLabel} له أولوية"
#. js-lingui-id: YG/wl5
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — API key not configured"
msgstr ""
#. js-lingui-id: s80lrU
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — Deprecated"
msgstr ""
#. js-lingui-id: Sxx5Hr
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "{recordCount} of {totalCount} records"
@@ -770,6 +785,11 @@ msgstr "أضف \"{trimmedName}\" إلى الخيارات"
msgid "Add a {objectLabelSingular}"
msgstr "أضف {objectLabelSingular}"
#. js-lingui-id: 7W8nJr
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx
msgid "Add a Group"
msgstr ""
#. js-lingui-id: CZDwqQ
#: src/modules/ai/components/suggested-prompts/default-suggested-prompts.ts
msgid "Add a new company we're in touch with (e.g. name, website, industry). Details: "
@@ -786,11 +806,6 @@ msgstr "إضافة عقدة"
msgid "Add a record"
msgstr ""
#. js-lingui-id: r8W+9y
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationSectionEditor.tsx
msgid "Add a Section"
msgstr ""
#. js-lingui-id: eMc2xs
#: src/modules/workflow/workflow-diagram/components/WorkflowDiagramCreateStepElement.tsx
msgid "Add a step"
@@ -1117,6 +1132,11 @@ msgstr "ضبط الإعدادات المتعلقة بالدور"
msgid "Admin"
msgstr ""
#. js-lingui-id: K2OX5h
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Admin Model Controls"
msgstr ""
#. js-lingui-id: g1in8j
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
@@ -1145,11 +1165,6 @@ msgstr "ميزة متقدمة لتحسين أداء الاستعلامات وف
msgid "Advanced filter"
msgstr "الفلتر المتقدم"
#. js-lingui-id: luNzWN
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Advanced model for complex planning"
msgstr ""
#. js-lingui-id: miuPUc
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
@@ -1252,6 +1267,7 @@ msgstr ""
#: src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
#: src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/command-menu/pages/workflow/action/components/CommandMenuWorkflowSelectAction.tsx
msgid "AI"
msgstr "الذكاء الاصطناعي"
@@ -1263,11 +1279,6 @@ msgstr "الذكاء الاصطناعي"
msgid "AI Model"
msgstr "نموذج الذكاء الاصطناعي"
#. js-lingui-id: tGx4Zn
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "AI Models"
msgstr ""
#. js-lingui-id: Sfwld8
#: src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx
msgid "AI not configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or XAI_API_KEY in your environment."
@@ -1351,6 +1362,11 @@ msgstr ""
msgid "All Metadata"
msgstr ""
#. js-lingui-id: AJgjR+
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "All Models"
msgstr ""
#. js-lingui-id: aFE/OW
#: src/pages/settings/security/event-logs/components/EventLogFilters.tsx
#: src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx
@@ -1512,6 +1528,9 @@ msgstr "حدث خطأ أثناء تحميل الصورة."
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
@@ -1608,6 +1627,11 @@ msgstr "مفتاح واجهة برمجة التطبيقات"
msgid "API Key copied to clipboard"
msgstr "تم نسخ مفتاح API إلى الحافظة"
#. js-lingui-id: jjaYji
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "API key not configured"
msgstr ""
#. js-lingui-id: Widx6n
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "API key roles"
@@ -1974,7 +1998,6 @@ msgstr "المرفقات"
#. js-lingui-id: EPEFrH
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "Audit Logs"
msgstr ""
@@ -2064,6 +2087,16 @@ msgstr "إنشاء جهات اتصال تلقائيًا للأشخاص."
msgid "Automatically create People records when receiving or sending emails"
msgstr "إنشاء سجلات الأشخاص تلقائيًا عند استقبال أو إرسال رسائل البريد الإلكتروني"
#. js-lingui-id: erwsgX
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Automatically enable new models"
msgstr ""
#. js-lingui-id: fx8TeY
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Automatically mark new models as available"
msgstr ""
#. js-lingui-id: lXkUEV
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx
msgid "Availability"
@@ -2071,6 +2104,7 @@ msgstr "التوفر"
#. js-lingui-id: csDS2L
#: src/pages/settings/applications/SettingsApplications.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectsSection.tsx
msgid "Available"
msgstr "متاح"
@@ -2251,9 +2285,9 @@ msgstr "بني"
msgid "Build a dashboard that shows: (1) total pipeline value by stage for the last 3 months, (2) count of deals won vs lost per month, (3) average deal size. Use our standard pipeline stages."
msgstr ""
#. js-lingui-id: 8SlslB
#. js-lingui-id: alSW5d
#: src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
msgid "Build many-to-many relations. <0>Learn more</0>"
msgid "Build many-to-many relations"
msgstr ""
#. js-lingui-id: +7fBMP
@@ -2615,7 +2649,7 @@ msgid "Choose the fields that will identify your records"
msgstr "اختر الحقول التي ستحدد سجلاتك"
#. js-lingui-id: hIJigY
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Choose the format used to display date value"
msgstr "اختر التنسيق المستخدم لعرض قيمة التاريخ"
@@ -2866,10 +2900,14 @@ msgstr "تم الاحتفاظ بالوظائف المكتملة لمدة {comple
msgid "Conditions"
msgstr "الشروط"
#. js-lingui-id: 14PdY0
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config"
msgstr ""
#. js-lingui-id: Vj43Y/
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config Variables"
msgstr "متغيرات التكوين"
@@ -2884,11 +2922,6 @@ msgstr "التكوين"
msgid "Configure"
msgstr ""
#. js-lingui-id: 9px+al
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Configure AI models for routing and planning"
msgstr ""
#. js-lingui-id: +zUMwJ
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure an SSO connection"
@@ -2914,6 +2947,11 @@ msgstr "قم بتكوين إعدادات CalDAV لمزامنة أحداث الت
msgid "Configure date, time, number, timezone, and calendar start day"
msgstr "إعداد التاريخ والوقت والرقم والمنطقة الزمنية ويوم بدء التقويم"
#. js-lingui-id: +SQwHr
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Configure default AI models and availability"
msgstr ""
#. js-lingui-id: utsXG8
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure fallback login methods for users with SSO bypass permissions"
@@ -3244,11 +3282,6 @@ msgstr "النواة"
msgid "Core Objects"
msgstr ""
#. js-lingui-id: cfa2VJ
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Core Schema"
msgstr "المخطط الأساسي"
#. js-lingui-id: I99Miw
#: src/modules/billing/components/SettingsBillingCreditsSection.tsx
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
@@ -4267,6 +4300,16 @@ msgstr "السجلات المحذوفة"
msgid "Deleting this method will remove it permanently from your account."
msgstr "سيؤدي حذف هذه الطريقة إلى إزالتها نهائيًا من حسابك."
#. js-lingui-id: Ssdrw4
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated"
msgstr ""
#. js-lingui-id: 8OJZ/p
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated models"
msgstr ""
#. js-lingui-id: O3LJh6
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
@@ -5041,10 +5084,10 @@ msgstr ""
msgid "Enter filter"
msgstr "أدخل عامل تصفية"
#. js-lingui-id: 9/30HU
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
msgid "Enter in <0>Unicode</0> format"
msgstr "إدخل بصيغة <0>Unicode</0>"
#. js-lingui-id: f09Lhk
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Enter in Unicode format"
msgstr ""
#. js-lingui-id: 9CjMQ7
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -5810,9 +5853,9 @@ msgstr ""
msgid "Failed to save workspace instructions"
msgstr ""
#. js-lingui-id: YMSYb+
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update fast model"
#. js-lingui-id: YzURPo
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update auto-enable setting"
msgstr ""
#. js-lingui-id: P1NmNz
@@ -5820,6 +5863,27 @@ msgstr ""
msgid "Failed to update feature flag. {errorMessage}"
msgstr "فشل في تحديث علم الميزة. {errorMessage}"
#. js-lingui-id: 1R13Ov
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model"
msgstr ""
#. js-lingui-id: W7Ff/4
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update model availability"
msgstr ""
#. js-lingui-id: LgZlJ7
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model availability settings"
msgstr ""
#. js-lingui-id: rCUG3c
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model selection mode"
msgstr ""
#. js-lingui-id: HnBqPY
#: src/modules/billing/components/internal/MeteredPriceSelector.tsx
msgid "Failed to update price."
@@ -5835,11 +5899,6 @@ msgstr ""
msgid "Failed to update role"
msgstr "فشل في تحديث الدور"
#. js-lingui-id: h/0aT5
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update smart model"
msgstr ""
#. js-lingui-id: Dzh4a2
#: src/modules/settings/admin-panel/config-variables/hooks/useConfigVariableActions.ts
msgid "Failed to update variable"
@@ -5888,15 +5947,10 @@ msgid "False"
msgstr "خاطئ"
#. js-lingui-id: XVIZ7v
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Fast Model"
msgstr ""
#. js-lingui-id: UJHTjm
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Fast model updated successfully"
msgstr ""
#. js-lingui-id: X9kySA
#: src/modules/navigation-menu-item/components/CurrentWorkspaceMemberNavigationMenuItemFolders.tsx
#: src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
@@ -6055,6 +6109,7 @@ msgstr ""
#: src/modules/views/components/ViewBarFilterButton.tsx
#: src/modules/settings/roles/components/SettingsRolesList.tsx
#: src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
#: src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx
#: src/modules/command-menu/pages/page-layout/constants/settings/ChartConfigurationSettingLabels.ts
#: src/modules/command-menu/pages/page-layout/components/ChartFiltersSettings.tsx
@@ -6284,7 +6339,9 @@ msgstr "الرسم البياني القياسي"
#: src/pages/settings/SettingsWorkspace.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetEditorGroupsData.ts
#: src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuOpenContent.tsx
msgid "General"
msgstr "عام"
@@ -6526,11 +6583,15 @@ msgstr ""
msgid "Heading 3"
msgstr ""
#. js-lingui-id: UPqS9C
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health"
msgstr ""
#. js-lingui-id: I1IOmb
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatus.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health Status"
msgstr "الحالة الصحية"
@@ -7008,11 +7069,6 @@ msgstr "تعليمات إلى الذكاء الاصطناعي"
msgid "Integrations - Settings"
msgstr "التكاملات - إعدادات"
#. js-lingui-id: ntgzzG
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Interact with your workspace data"
msgstr "تفاعل مع بيانات مساحة العمل الخاصة بك"
#. js-lingui-id: jyjroS
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Interval switching has been cancelled."
@@ -8126,11 +8182,6 @@ msgstr "البيانات الوصفية"
msgid "Metadata file generation failed"
msgstr "فشل في توليد ملف البيانات الوصفية"
#. js-lingui-id: 0BF9eC
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Metadata Schema"
msgstr "مخطط البيانات الوصفية"
#. js-lingui-id: onCJJ6
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Metered tier switching has been cancelled."
@@ -8189,6 +8240,17 @@ msgstr ""
msgid "Mission accomplished!"
msgstr "تم إنجاز المهمة!"
#. js-lingui-id: //nm2/
#: src/pages/settings/ai/SettingsAI.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models"
msgstr ""
#. js-lingui-id: oHM560
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models available in the chat model picker"
msgstr ""
#. js-lingui-id: hty0d5
#: src/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect.tsx
msgid "Monday"
@@ -8234,6 +8296,7 @@ msgid "months"
msgstr ""
#. js-lingui-id: 2FYpfJ
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
msgid "More"
msgstr "المزيد"
@@ -8523,6 +8586,11 @@ msgstr "حقل جديد"
msgid "New folder"
msgstr ""
#. js-lingui-id: 93KA8w
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationEditor.tsx
msgid "New Group"
msgstr ""
#. js-lingui-id: o8MyXb
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "New key"
@@ -8931,7 +8999,6 @@ msgstr "لا توجد بيانات قياسات متاحة"
#. js-lingui-id: UWZZdQ
#: src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx
#: src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "No models available. Please configure AI models in your workspace settings."
msgstr "لا توجد نماذج متاحة. يرجى تهيئة نماذج الذكاء الاصطناعي في إعدادات مكان العمل الخاص بك."
@@ -9569,7 +9636,7 @@ msgstr ""
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/pages/settings/admin-panel/SettingsAdmin.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuNewSidebarItemMainMenu.tsx
msgid "Other"
msgstr "أخرى"
@@ -10257,11 +10324,6 @@ msgstr "أداء الطابور"
msgid "Queue: {queueName}"
msgstr "الطابور: {queueName}"
#. js-lingui-id: GaAG2G
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Quick model for routing decisions"
msgstr ""
#. js-lingui-id: opSifa
#: src/modules/ai/utils/getToolDisplayMessage.ts
msgid "Ran {formattedName}"
@@ -10738,6 +10800,11 @@ msgstr "استعادة السجلات"
msgid "Restore Records"
msgstr "استعادة السجلات"
#. js-lingui-id: hO3AfV
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Restrict available models to a curated list"
msgstr ""
#. js-lingui-id: RD6AE9
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx
msgid "Result"
@@ -11019,6 +11086,12 @@ msgstr "ابحث عن حقل..."
msgid "Search a folder..."
msgstr ""
#. js-lingui-id: 8J0e5B
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Search a model..."
msgstr ""
#. js-lingui-id: WXvlVa
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "Search a role..."
@@ -11572,6 +11645,11 @@ msgstr "مرسل ومستلم"
msgid "Serbian (Cyrillic)"
msgstr "الصربية (السيريلية)"
#. js-lingui-id: 8ZSrlB
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Server-wide AI model availability settings"
msgstr ""
#. js-lingui-id: LUc0oL
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
msgid "Service Provider Details"
@@ -11654,7 +11732,6 @@ msgstr "إعداد قاعدة البيانات الخاصة بك..."
#: src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
#: src/pages/settings/applications/SettingsApplicationDetails.tsx
#: src/pages/settings/ai/SettingsAgentForm.tsx
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/sign-in-background-mock/components/SignInAppNavigationDrawerMock.tsx
#: src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx
#: src/modules/settings/roles/role/components/SettingsRole.tsx
@@ -11873,15 +11950,10 @@ msgid "Small section heading"
msgstr ""
#. js-lingui-id: 5J8ZFl
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Smart Model"
msgstr ""
#. js-lingui-id: qgvZ/2
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Smart model updated successfully"
msgstr ""
#. js-lingui-id: w+rJId
#: src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx
msgid "SMTP Configuration"
@@ -12960,6 +13032,11 @@ msgstr "التبديل بين جميع أذونات الكائنات"
msgid "Toggle all settings permissions"
msgstr "تبديل جميع أذونات الإعدادات"
#. js-lingui-id: 93pMSK
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Toggle model availability across all workspaces"
msgstr ""
#. js-lingui-id: WOr+hW
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
msgid "tokens"
@@ -13257,6 +13334,11 @@ msgstr ""
msgid "Unable to Reach Back-end"
msgstr "غير قادر على الوصول إلى الخلفية"
#. js-lingui-id: EbnX+O
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Unconfigured models"
msgstr ""
#. js-lingui-id: EUHN7i
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx
msgid "Undefined"
@@ -13567,11 +13649,26 @@ msgstr "استخدم كمسودة"
msgid "Use authenticator apps and browser extensions like 1Password, Authy, Microsoft Authenticator to generate one-time passwords"
msgstr "استخدم تطبيقات المصادقة وملحقات المتصفح مثل 1Password، Authy، Microsoft Authenticator لإنشاء كلمات مرور لمرة واحدة"
#. js-lingui-id: hCZsJ0
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Use best models only"
msgstr ""
#. js-lingui-id: c6uZUV
#: src/modules/object-record/record-table/empty-state/utils/getEmptyStateSubTitle.ts
msgid "Use our API or add your first {objectLabel} manually"
msgstr "استخدم واجهة برمجة التطبيقات لدينا أو أضف {objectLabel} الأولى يدوياً"
#. js-lingui-id: 664z2C
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for chats, agents, and complex reasoning"
msgstr ""
#. js-lingui-id: C41qgx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for lightweight tasks like title generation"
msgstr ""
#. js-lingui-id: AQVj2A
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
msgid "Useful for pivot/junction tables"
@@ -14078,6 +14175,16 @@ msgstr ""
msgid "When enabled, AI agents and workflow automations can discover and call this function"
msgstr ""
#. js-lingui-id: i2V4DO
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "When enabled, new AI models will be available to users by default"
msgstr ""
#. js-lingui-id: 01e9rV
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "When enabled, newly added models are available to all workspaces by default"
msgstr ""
#. js-lingui-id: C51ilI
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "When the API key will expire."
@@ -14210,6 +14317,7 @@ msgid "Workspace Domain"
msgstr "نطاق مساحة العمل"
#. js-lingui-id: J2q6WC
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx
msgid "Workspace Events"
msgstr ""
+182 -74
View File
@@ -311,6 +311,11 @@ msgstr "{morphRelationCount} objectes"
msgid "{num, selectordinal, one {{num}st} two {{num}nd} few {{num}rd} other {{num}th}}"
msgstr "{num, selectordinal, one {{num}r} other {{num}è}}"
#. js-lingui-id: fTSz8d
#: src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownActorSelect.tsx
msgid "{numberOfSelectedItems} workspace members"
msgstr ""
#. js-lingui-id: 7kYa/u
#: src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
msgid "{objectLabelPlural} ({totalCount})"
@@ -331,6 +336,16 @@ msgstr ""
msgid "{positionLabel} record holds priority"
msgstr "El registre {positionLabel} té prioritat"
#. js-lingui-id: YG/wl5
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — API key not configured"
msgstr ""
#. js-lingui-id: s80lrU
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — Deprecated"
msgstr ""
#. js-lingui-id: Sxx5Hr
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "{recordCount} of {totalCount} records"
@@ -770,6 +785,11 @@ msgstr "Afegeix \"{trimmedName}\" a les opcions"
msgid "Add a {objectLabelSingular}"
msgstr "Afegeix un {objectLabelSingular}"
#. js-lingui-id: 7W8nJr
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx
msgid "Add a Group"
msgstr ""
#. js-lingui-id: CZDwqQ
#: src/modules/ai/components/suggested-prompts/default-suggested-prompts.ts
msgid "Add a new company we're in touch with (e.g. name, website, industry). Details: "
@@ -786,11 +806,6 @@ msgstr "Afegeix un node"
msgid "Add a record"
msgstr ""
#. js-lingui-id: r8W+9y
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationSectionEditor.tsx
msgid "Add a Section"
msgstr ""
#. js-lingui-id: eMc2xs
#: src/modules/workflow/workflow-diagram/components/WorkflowDiagramCreateStepElement.tsx
msgid "Add a step"
@@ -1117,6 +1132,11 @@ msgstr "Ajusta els paràmetres relacionats amb el rol"
msgid "Admin"
msgstr ""
#. js-lingui-id: K2OX5h
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Admin Model Controls"
msgstr ""
#. js-lingui-id: g1in8j
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
@@ -1145,11 +1165,6 @@ msgstr "Funció avançada per millorar el rendiment de les consultes i fer compl
msgid "Advanced filter"
msgstr "Filtre avançat"
#. js-lingui-id: luNzWN
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Advanced model for complex planning"
msgstr ""
#. js-lingui-id: miuPUc
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
@@ -1252,6 +1267,7 @@ msgstr ""
#: src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
#: src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/command-menu/pages/workflow/action/components/CommandMenuWorkflowSelectAction.tsx
msgid "AI"
msgstr "IA"
@@ -1263,11 +1279,6 @@ msgstr "IA"
msgid "AI Model"
msgstr "Model IA"
#. js-lingui-id: tGx4Zn
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "AI Models"
msgstr ""
#. js-lingui-id: Sfwld8
#: src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx
msgid "AI not configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or XAI_API_KEY in your environment."
@@ -1351,6 +1362,11 @@ msgstr ""
msgid "All Metadata"
msgstr ""
#. js-lingui-id: AJgjR+
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "All Models"
msgstr ""
#. js-lingui-id: aFE/OW
#: src/pages/settings/security/event-logs/components/EventLogFilters.tsx
#: src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx
@@ -1512,6 +1528,9 @@ msgstr "S'ha produït un error en carregar la imatge."
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
@@ -1608,6 +1627,11 @@ msgstr "Clau d'API"
msgid "API Key copied to clipboard"
msgstr "La clau API s'ha copiat al porta-retalls"
#. js-lingui-id: jjaYji
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "API key not configured"
msgstr ""
#. js-lingui-id: Widx6n
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "API key roles"
@@ -1974,7 +1998,6 @@ msgstr "Adjunts"
#. js-lingui-id: EPEFrH
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "Audit Logs"
msgstr ""
@@ -2064,6 +2087,16 @@ msgstr "Crea automàticament contactes per a persones."
msgid "Automatically create People records when receiving or sending emails"
msgstr "Crear automàticament registres de Persones quan es reben o s'envien correus electrònics"
#. js-lingui-id: erwsgX
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Automatically enable new models"
msgstr ""
#. js-lingui-id: fx8TeY
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Automatically mark new models as available"
msgstr ""
#. js-lingui-id: lXkUEV
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx
msgid "Availability"
@@ -2071,6 +2104,7 @@ msgstr "Disponibilitat"
#. js-lingui-id: csDS2L
#: src/pages/settings/applications/SettingsApplications.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectsSection.tsx
msgid "Available"
msgstr "Disponible"
@@ -2251,9 +2285,9 @@ msgstr "Marró"
msgid "Build a dashboard that shows: (1) total pipeline value by stage for the last 3 months, (2) count of deals won vs lost per month, (3) average deal size. Use our standard pipeline stages."
msgstr ""
#. js-lingui-id: 8SlslB
#. js-lingui-id: alSW5d
#: src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
msgid "Build many-to-many relations. <0>Learn more</0>"
msgid "Build many-to-many relations"
msgstr ""
#. js-lingui-id: +7fBMP
@@ -2615,7 +2649,7 @@ msgid "Choose the fields that will identify your records"
msgstr "Trieu els camps que identificaran els vostres registres"
#. js-lingui-id: hIJigY
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Choose the format used to display date value"
msgstr "Tria el format utilitzat per mostrar el valor de la data"
@@ -2866,10 +2900,14 @@ msgstr "Feines completades guardades per {completedDuration}, feines fallades gu
msgid "Conditions"
msgstr "Condicions"
#. js-lingui-id: 14PdY0
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config"
msgstr ""
#. js-lingui-id: Vj43Y/
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config Variables"
msgstr "Variables de Configuració"
@@ -2884,11 +2922,6 @@ msgstr "Configuració"
msgid "Configure"
msgstr ""
#. js-lingui-id: 9px+al
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Configure AI models for routing and planning"
msgstr ""
#. js-lingui-id: +zUMwJ
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure an SSO connection"
@@ -2914,6 +2947,11 @@ msgstr "Configureu la configuració de CalDAV per sincronitzar els vostres esdev
msgid "Configure date, time, number, timezone, and calendar start day"
msgstr "Configura la data, hora, número, fus horari i dia d'inici del calendari"
#. js-lingui-id: +SQwHr
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Configure default AI models and availability"
msgstr ""
#. js-lingui-id: utsXG8
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure fallback login methods for users with SSO bypass permissions"
@@ -3244,11 +3282,6 @@ msgstr "Nucli"
msgid "Core Objects"
msgstr ""
#. js-lingui-id: cfa2VJ
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Core Schema"
msgstr "Esquema del nucli"
#. js-lingui-id: I99Miw
#: src/modules/billing/components/SettingsBillingCreditsSection.tsx
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
@@ -4267,6 +4300,16 @@ msgstr "Registres suprimits"
msgid "Deleting this method will remove it permanently from your account."
msgstr "Eliminar aquest mètode el eliminarà permanentment del teu compte."
#. js-lingui-id: Ssdrw4
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated"
msgstr ""
#. js-lingui-id: 8OJZ/p
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated models"
msgstr ""
#. js-lingui-id: O3LJh6
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
@@ -5041,10 +5084,10 @@ msgstr ""
msgid "Enter filter"
msgstr "Introdueix el filtre"
#. js-lingui-id: 9/30HU
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
msgid "Enter in <0>Unicode</0> format"
msgstr "Introdueix en format <0>Unicode</0>"
#. js-lingui-id: f09Lhk
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Enter in Unicode format"
msgstr ""
#. js-lingui-id: 9CjMQ7
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -5810,9 +5853,9 @@ msgstr ""
msgid "Failed to save workspace instructions"
msgstr ""
#. js-lingui-id: YMSYb+
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update fast model"
#. js-lingui-id: YzURPo
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update auto-enable setting"
msgstr ""
#. js-lingui-id: P1NmNz
@@ -5820,6 +5863,27 @@ msgstr ""
msgid "Failed to update feature flag. {errorMessage}"
msgstr "No s'ha pogut actualitzar el feature flag. {errorMessage}"
#. js-lingui-id: 1R13Ov
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model"
msgstr ""
#. js-lingui-id: W7Ff/4
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update model availability"
msgstr ""
#. js-lingui-id: LgZlJ7
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model availability settings"
msgstr ""
#. js-lingui-id: rCUG3c
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model selection mode"
msgstr ""
#. js-lingui-id: HnBqPY
#: src/modules/billing/components/internal/MeteredPriceSelector.tsx
msgid "Failed to update price."
@@ -5835,11 +5899,6 @@ msgstr ""
msgid "Failed to update role"
msgstr "Ha fallat l'actualització del rol"
#. js-lingui-id: h/0aT5
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update smart model"
msgstr ""
#. js-lingui-id: Dzh4a2
#: src/modules/settings/admin-panel/config-variables/hooks/useConfigVariableActions.ts
msgid "Failed to update variable"
@@ -5888,15 +5947,10 @@ msgid "False"
msgstr "Fals"
#. js-lingui-id: XVIZ7v
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Fast Model"
msgstr ""
#. js-lingui-id: UJHTjm
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Fast model updated successfully"
msgstr ""
#. js-lingui-id: X9kySA
#: src/modules/navigation-menu-item/components/CurrentWorkspaceMemberNavigationMenuItemFolders.tsx
#: src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
@@ -6055,6 +6109,7 @@ msgstr ""
#: src/modules/views/components/ViewBarFilterButton.tsx
#: src/modules/settings/roles/components/SettingsRolesList.tsx
#: src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
#: src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx
#: src/modules/command-menu/pages/page-layout/constants/settings/ChartConfigurationSettingLabels.ts
#: src/modules/command-menu/pages/page-layout/components/ChartFiltersSettings.tsx
@@ -6284,7 +6339,9 @@ msgstr "Gràfic de mesurador"
#: src/pages/settings/SettingsWorkspace.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetEditorGroupsData.ts
#: src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuOpenContent.tsx
msgid "General"
msgstr "General"
@@ -6526,11 +6583,15 @@ msgstr ""
msgid "Heading 3"
msgstr ""
#. js-lingui-id: UPqS9C
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health"
msgstr ""
#. js-lingui-id: I1IOmb
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatus.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health Status"
msgstr "Estat de salut"
@@ -7008,11 +7069,6 @@ msgstr "Instruccions per a la IA"
msgid "Integrations - Settings"
msgstr "Integracions - Configuració"
#. js-lingui-id: ntgzzG
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Interact with your workspace data"
msgstr "Interactua amb les dades del teu espai de treball"
#. js-lingui-id: jyjroS
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Interval switching has been cancelled."
@@ -8126,11 +8182,6 @@ msgstr "Metadades"
msgid "Metadata file generation failed"
msgstr "Error en la generació del fitxer de metadades"
#. js-lingui-id: 0BF9eC
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Metadata Schema"
msgstr "Esquema de metadades"
#. js-lingui-id: onCJJ6
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Metered tier switching has been cancelled."
@@ -8189,6 +8240,17 @@ msgstr ""
msgid "Mission accomplished!"
msgstr "Missió acomplerta!"
#. js-lingui-id: //nm2/
#: src/pages/settings/ai/SettingsAI.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models"
msgstr ""
#. js-lingui-id: oHM560
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models available in the chat model picker"
msgstr ""
#. js-lingui-id: hty0d5
#: src/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect.tsx
msgid "Monday"
@@ -8234,6 +8296,7 @@ msgid "months"
msgstr ""
#. js-lingui-id: 2FYpfJ
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
msgid "More"
msgstr "Més"
@@ -8523,6 +8586,11 @@ msgstr "Nou camp"
msgid "New folder"
msgstr ""
#. js-lingui-id: 93KA8w
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationEditor.tsx
msgid "New Group"
msgstr ""
#. js-lingui-id: o8MyXb
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "New key"
@@ -8931,7 +8999,6 @@ msgstr "No hi ha dades de mètriques disponibles"
#. js-lingui-id: UWZZdQ
#: src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx
#: src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "No models available. Please configure AI models in your workspace settings."
msgstr "No hi ha models disponibles. Si us plau, configureu models d'IA a la configuració del vostre espai de treball."
@@ -9569,7 +9636,7 @@ msgstr ""
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/pages/settings/admin-panel/SettingsAdmin.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuNewSidebarItemMainMenu.tsx
msgid "Other"
msgstr "Altres"
@@ -10257,11 +10324,6 @@ msgstr "Rendiment de la cua"
msgid "Queue: {queueName}"
msgstr "Cua: {queueName}"
#. js-lingui-id: GaAG2G
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Quick model for routing decisions"
msgstr ""
#. js-lingui-id: opSifa
#: src/modules/ai/utils/getToolDisplayMessage.ts
msgid "Ran {formattedName}"
@@ -10738,6 +10800,11 @@ msgstr "Restaurar registres"
msgid "Restore Records"
msgstr "Restaura Registres"
#. js-lingui-id: hO3AfV
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Restrict available models to a curated list"
msgstr ""
#. js-lingui-id: RD6AE9
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx
msgid "Result"
@@ -11019,6 +11086,12 @@ msgstr "Cerca un camp..."
msgid "Search a folder..."
msgstr ""
#. js-lingui-id: 8J0e5B
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Search a model..."
msgstr ""
#. js-lingui-id: WXvlVa
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "Search a role..."
@@ -11572,6 +11645,11 @@ msgstr "Enviat i rebut"
msgid "Serbian (Cyrillic)"
msgstr "Serbi (ciríl·lic)"
#. js-lingui-id: 8ZSrlB
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Server-wide AI model availability settings"
msgstr ""
#. js-lingui-id: LUc0oL
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
msgid "Service Provider Details"
@@ -11654,7 +11732,6 @@ msgstr "Configurant la teva base de dades..."
#: src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
#: src/pages/settings/applications/SettingsApplicationDetails.tsx
#: src/pages/settings/ai/SettingsAgentForm.tsx
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/sign-in-background-mock/components/SignInAppNavigationDrawerMock.tsx
#: src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx
#: src/modules/settings/roles/role/components/SettingsRole.tsx
@@ -11873,15 +11950,10 @@ msgid "Small section heading"
msgstr ""
#. js-lingui-id: 5J8ZFl
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Smart Model"
msgstr ""
#. js-lingui-id: qgvZ/2
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Smart model updated successfully"
msgstr ""
#. js-lingui-id: w+rJId
#: src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx
msgid "SMTP Configuration"
@@ -12960,6 +13032,11 @@ msgstr "Alternar els permisos de tots els objectes"
msgid "Toggle all settings permissions"
msgstr "Alternar tots els permisos de configuració"
#. js-lingui-id: 93pMSK
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Toggle model availability across all workspaces"
msgstr ""
#. js-lingui-id: WOr+hW
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
msgid "tokens"
@@ -13257,6 +13334,11 @@ msgstr ""
msgid "Unable to Reach Back-end"
msgstr "No es pot contactar amb el backend"
#. js-lingui-id: EbnX+O
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Unconfigured models"
msgstr ""
#. js-lingui-id: EUHN7i
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx
msgid "Undefined"
@@ -13567,11 +13649,26 @@ msgstr "Utilitzar com a esborrany"
msgid "Use authenticator apps and browser extensions like 1Password, Authy, Microsoft Authenticator to generate one-time passwords"
msgstr "Utilitza aplicacions d'autenticació i extensions de navegador com 1Password, Authy, Microsoft Authenticator per generar contrasenyes d'un sol ús"
#. js-lingui-id: hCZsJ0
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Use best models only"
msgstr ""
#. js-lingui-id: c6uZUV
#: src/modules/object-record/record-table/empty-state/utils/getEmptyStateSubTitle.ts
msgid "Use our API or add your first {objectLabel} manually"
msgstr "Utilitzeu la nostra API o afegiu el vostre primer {objectLabel} manualment"
#. js-lingui-id: 664z2C
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for chats, agents, and complex reasoning"
msgstr ""
#. js-lingui-id: C41qgx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for lightweight tasks like title generation"
msgstr ""
#. js-lingui-id: AQVj2A
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
msgid "Useful for pivot/junction tables"
@@ -14080,6 +14177,16 @@ msgstr ""
msgid "When enabled, AI agents and workflow automations can discover and call this function"
msgstr ""
#. js-lingui-id: i2V4DO
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "When enabled, new AI models will be available to users by default"
msgstr ""
#. js-lingui-id: 01e9rV
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "When enabled, newly added models are available to all workspaces by default"
msgstr ""
#. js-lingui-id: C51ilI
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "When the API key will expire."
@@ -14212,6 +14319,7 @@ msgid "Workspace Domain"
msgstr "Domini de l'espai de treball"
#. js-lingui-id: J2q6WC
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx
msgid "Workspace Events"
msgstr ""
+182 -74
View File
@@ -311,6 +311,11 @@ msgstr "{morphRelationCount} objektů"
msgid "{num, selectordinal, one {{num}st} two {{num}nd} few {{num}rd} other {{num}th}}"
msgstr "{num, selectordinal, one {{num}.} few {{num}.} many {{num}.} other {{num}.}}"
#. js-lingui-id: fTSz8d
#: src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownActorSelect.tsx
msgid "{numberOfSelectedItems} workspace members"
msgstr ""
#. js-lingui-id: 7kYa/u
#: src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
msgid "{objectLabelPlural} ({totalCount})"
@@ -331,6 +336,16 @@ msgstr ""
msgid "{positionLabel} record holds priority"
msgstr "Záznam {positionLabel} má prioritu"
#. js-lingui-id: YG/wl5
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — API key not configured"
msgstr ""
#. js-lingui-id: s80lrU
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "{providerLabel} — Deprecated"
msgstr ""
#. js-lingui-id: Sxx5Hr
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "{recordCount} of {totalCount} records"
@@ -770,6 +785,11 @@ msgstr "Přidat \"{trimmedName}\" do možností"
msgid "Add a {objectLabelSingular}"
msgstr "Přidat {objectLabelSingular}"
#. js-lingui-id: 7W8nJr
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationGroupEditor.tsx
msgid "Add a Group"
msgstr ""
#. js-lingui-id: CZDwqQ
#: src/modules/ai/components/suggested-prompts/default-suggested-prompts.ts
msgid "Add a new company we're in touch with (e.g. name, website, industry). Details: "
@@ -786,11 +806,6 @@ msgstr "Přidat uzel"
msgid "Add a record"
msgstr ""
#. js-lingui-id: r8W+9y
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationSectionEditor.tsx
msgid "Add a Section"
msgstr ""
#. js-lingui-id: eMc2xs
#: src/modules/workflow/workflow-diagram/components/WorkflowDiagramCreateStepElement.tsx
msgid "Add a step"
@@ -1117,6 +1132,11 @@ msgstr "Upravit nastavení související s rolí"
msgid "Admin"
msgstr ""
#. js-lingui-id: K2OX5h
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Admin Model Controls"
msgstr ""
#. js-lingui-id: g1in8j
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
@@ -1145,11 +1165,6 @@ msgstr "Pokročilá funkce pro zlepšení výkonu dotazů a prosazení jedinečn
msgid "Advanced filter"
msgstr "Pokročilý filtr"
#. js-lingui-id: luNzWN
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Advanced model for complex planning"
msgstr ""
#. js-lingui-id: miuPUc
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
#: src/modules/command-menu/pages/page-layout/components/dropdown-content/ChartDataSourceDropdownContent.tsx
@@ -1252,6 +1267,7 @@ msgstr ""
#: src/modules/settings/roles/role-permissions/permission-flags/hooks/useSettingsRolePermissionFlagConfig.ts
#: src/modules/settings/roles/role-permissions/object-level-permissions/object-form/components/SettingsRolePermissionsObjectLevelObjectForm.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/command-menu/pages/workflow/action/components/CommandMenuWorkflowSelectAction.tsx
msgid "AI"
msgstr "AI"
@@ -1263,11 +1279,6 @@ msgstr "AI"
msgid "AI Model"
msgstr "AI Model"
#. js-lingui-id: tGx4Zn
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "AI Models"
msgstr ""
#. js-lingui-id: Sfwld8
#: src/modules/ai/components/AIChatApiKeyNotConfiguredMessage.tsx
msgid "AI not configured. Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or XAI_API_KEY in your environment."
@@ -1351,6 +1362,11 @@ msgstr ""
msgid "All Metadata"
msgstr ""
#. js-lingui-id: AJgjR+
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "All Models"
msgstr ""
#. js-lingui-id: aFE/OW
#: src/pages/settings/security/event-logs/components/EventLogFilters.tsx
#: src/modules/settings/roles/role-permissions/objects-permissions/components/SettingsRolePermissionsObjectsTableHeader.tsx
@@ -1512,6 +1528,9 @@ msgstr "Při nahrávání obrázku došlo k chybě."
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldGroupAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
#: src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts
@@ -1608,6 +1627,11 @@ msgstr "API klíč"
msgid "API Key copied to clipboard"
msgstr "Klíč API zkopírován do schránky"
#. js-lingui-id: jjaYji
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "API key not configured"
msgstr ""
#. js-lingui-id: Widx6n
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "API key roles"
@@ -1974,7 +1998,6 @@ msgstr "Přílohy"
#. js-lingui-id: EPEFrH
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/SettingsEventLogs.tsx
msgid "Audit Logs"
msgstr ""
@@ -2064,6 +2087,16 @@ msgstr "Automaticky vytvářet kontakty pro lidi."
msgid "Automatically create People records when receiving or sending emails"
msgstr "Automaticky vytvářet záznamy lidí při přijímání nebo odesílání emailů"
#. js-lingui-id: erwsgX
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Automatically enable new models"
msgstr ""
#. js-lingui-id: fx8TeY
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Automatically mark new models as available"
msgstr ""
#. js-lingui-id: lXkUEV
#: src/modules/workflow/workflow-trigger/components/WorkflowEditTriggerManual.tsx
msgid "Availability"
@@ -2071,6 +2104,7 @@ msgstr "Dostupnost"
#. js-lingui-id: csDS2L
#: src/pages/settings/applications/SettingsApplications.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/data-model/new-object/components/SettingsAvailableStandardObjectsSection.tsx
msgid "Available"
msgstr "Dostupný"
@@ -2251,9 +2285,9 @@ msgstr "Hnědá"
msgid "Build a dashboard that shows: (1) total pipeline value by stage for the last 3 months, (2) count of deals won vs lost per month, (3) average deal size. Use our standard pipeline stages."
msgstr ""
#. js-lingui-id: 8SlslB
#. js-lingui-id: alSW5d
#: src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationJunctionForm.tsx
msgid "Build many-to-many relations. <0>Learn more</0>"
msgid "Build many-to-many relations"
msgstr ""
#. js-lingui-id: +7fBMP
@@ -2615,7 +2649,7 @@ msgid "Choose the fields that will identify your records"
msgstr "Vyberte pole, která budou identifikovat vaše záznamy"
#. js-lingui-id: hIJigY
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Choose the format used to display date value"
msgstr "Vyberte formát použitý k zobrazení datumové hodnoty"
@@ -2866,10 +2900,14 @@ msgstr "Dokončené úlohy uchovány po dobu {completedDuration}, neúspěšné
msgid "Conditions"
msgstr "Podmínky"
#. js-lingui-id: 14PdY0
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config"
msgstr ""
#. js-lingui-id: Vj43Y/
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Config Variables"
msgstr "Konfigurační proměnné"
@@ -2884,11 +2922,6 @@ msgstr "Konfigurace"
msgid "Configure"
msgstr ""
#. js-lingui-id: 9px+al
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Configure AI models for routing and planning"
msgstr ""
#. js-lingui-id: +zUMwJ
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure an SSO connection"
@@ -2914,6 +2947,11 @@ msgstr "Konfigurujte nastavení CalDAV pro synchronizaci událostí kalendáře.
msgid "Configure date, time, number, timezone, and calendar start day"
msgstr "Nastavit datum, čas, číslo, časovou zónu a počáteční den kalendáře"
#. js-lingui-id: +SQwHr
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Configure default AI models and availability"
msgstr ""
#. js-lingui-id: utsXG8
#: src/pages/settings/security/SettingsSecurity.tsx
msgid "Configure fallback login methods for users with SSO bypass permissions"
@@ -3244,11 +3282,6 @@ msgstr "Jádro"
msgid "Core Objects"
msgstr ""
#. js-lingui-id: cfa2VJ
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Core Schema"
msgstr "Základní schéma"
#. js-lingui-id: I99Miw
#: src/modules/billing/components/SettingsBillingCreditsSection.tsx
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
@@ -4267,6 +4300,16 @@ msgstr "Smazané záznamy"
msgid "Deleting this method will remove it permanently from your account."
msgstr "Smazáním této metody ji trvale odeberete ze svého účtu."
#. js-lingui-id: Ssdrw4
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated"
msgstr ""
#. js-lingui-id: 8OJZ/p
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Deprecated models"
msgstr ""
#. js-lingui-id: O3LJh6
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
#: src/modules/command-menu/pages/page-layout/utils/getSortLabelSuffixForFieldType.ts
@@ -5041,10 +5084,10 @@ msgstr ""
msgid "Enter filter"
msgstr "Zadejte filtr"
#. js-lingui-id: 9/30HU
#: src/modules/settings/data-model/fields/forms/date/utils/getDisplayFormatSelectDescription.tsx
msgid "Enter in <0>Unicode</0> format"
msgstr "Zadejte v <0>Unicode</0> formátu"
#. js-lingui-id: f09Lhk
#: src/modules/settings/data-model/fields/forms/date/components/SettingsDataModelFieldDateForm.tsx
msgid "Enter in Unicode format"
msgstr ""
#. js-lingui-id: 9CjMQ7
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -5810,9 +5853,9 @@ msgstr ""
msgid "Failed to save workspace instructions"
msgstr ""
#. js-lingui-id: YMSYb+
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update fast model"
#. js-lingui-id: YzURPo
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update auto-enable setting"
msgstr ""
#. js-lingui-id: P1NmNz
@@ -5820,6 +5863,27 @@ msgstr ""
msgid "Failed to update feature flag. {errorMessage}"
msgstr "Nepodařilo se aktualizovat příznak funkce. {errorMessage}"
#. js-lingui-id: 1R13Ov
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model"
msgstr ""
#. js-lingui-id: W7Ff/4
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Failed to update model availability"
msgstr ""
#. js-lingui-id: LgZlJ7
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model availability settings"
msgstr ""
#. js-lingui-id: rCUG3c
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Failed to update model selection mode"
msgstr ""
#. js-lingui-id: HnBqPY
#: src/modules/billing/components/internal/MeteredPriceSelector.tsx
msgid "Failed to update price."
@@ -5835,11 +5899,6 @@ msgstr ""
msgid "Failed to update role"
msgstr "Nepodařilo se aktualizovat roli"
#. js-lingui-id: h/0aT5
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Failed to update smart model"
msgstr ""
#. js-lingui-id: Dzh4a2
#: src/modules/settings/admin-panel/config-variables/hooks/useConfigVariableActions.ts
msgid "Failed to update variable"
@@ -5888,15 +5947,10 @@ msgid "False"
msgstr "Nepravdivé"
#. js-lingui-id: XVIZ7v
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Fast Model"
msgstr ""
#. js-lingui-id: UJHTjm
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Fast model updated successfully"
msgstr ""
#. js-lingui-id: X9kySA
#: src/modules/navigation-menu-item/components/CurrentWorkspaceMemberNavigationMenuItemFolders.tsx
#: src/modules/favorites/components/CurrentWorkspaceMemberFavoritesFolders.tsx
@@ -6055,6 +6109,7 @@ msgstr ""
#: src/modules/views/components/ViewBarFilterButton.tsx
#: src/modules/settings/roles/components/SettingsRolesList.tsx
#: src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
#: src/modules/object-record/record-table/record-table-header/components/RecordTableColumnHeadDropdownMenu.tsx
#: src/modules/command-menu/pages/page-layout/constants/settings/ChartConfigurationSettingLabels.ts
#: src/modules/command-menu/pages/page-layout/components/ChartFiltersSettings.tsx
@@ -6284,7 +6339,9 @@ msgstr "Ukazatelový graf"
#: src/pages/settings/SettingsWorkspace.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetEditorGroupsData.ts
#: src/modules/keyboard-shortcut-menu/components/KeyboardShortcutMenuOpenContent.tsx
msgid "General"
msgstr "Obecné"
@@ -6526,11 +6583,15 @@ msgstr ""
msgid "Heading 3"
msgstr ""
#. js-lingui-id: UPqS9C
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health"
msgstr ""
#. js-lingui-id: I1IOmb
#: src/pages/settings/admin-panel/SettingsAdminQueueDetail.tsx
#: src/pages/settings/admin-panel/SettingsAdminIndicatorHealthStatus.tsx
#: src/modules/settings/admin-panel/health-status/components/SettingsAdminHealthStatus.tsx
#: src/modules/settings/admin-panel/components/SettingsAdminContent.tsx
msgid "Health Status"
msgstr "Zdravotní stav"
@@ -7008,11 +7069,6 @@ msgstr "Pokyny pro AI"
msgid "Integrations - Settings"
msgstr "Integrace - Nastavení"
#. js-lingui-id: ntgzzG
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Interact with your workspace data"
msgstr "Interakce s daty vašeho pracovního prostoru"
#. js-lingui-id: jyjroS
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Interval switching has been cancelled."
@@ -8126,11 +8182,6 @@ msgstr "Metadata"
msgid "Metadata file generation failed"
msgstr "Generování souboru metadat selhalo"
#. js-lingui-id: 0BF9eC
#: src/pages/settings/ai/components/SettingsAIMCP.tsx
msgid "Metadata Schema"
msgstr "Schéma metadat"
#. js-lingui-id: onCJJ6
#: src/modules/billing/components/SettingsBillingSubscriptionInfo.tsx
msgid "Metered tier switching has been cancelled."
@@ -8189,6 +8240,17 @@ msgstr ""
msgid "Mission accomplished!"
msgstr "Mise splněna!"
#. js-lingui-id: //nm2/
#: src/pages/settings/ai/SettingsAI.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models"
msgstr ""
#. js-lingui-id: oHM560
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Models available in the chat model picker"
msgstr ""
#. js-lingui-id: hty0d5
#: src/pages/settings/profile/appearance/components/DateTimeSettingsCalendarStartDaySelect.tsx
msgid "Monday"
@@ -8234,6 +8296,7 @@ msgid "months"
msgstr ""
#. js-lingui-id: 2FYpfJ
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/ui/layout/tab-list/components/TabMoreButton.tsx
msgid "More"
msgstr "Více"
@@ -8523,6 +8586,11 @@ msgstr "Nové pole"
msgid "New folder"
msgstr ""
#. js-lingui-id: 93KA8w
#: src/modules/page-layout/widgets/fields/components/FieldsConfigurationEditor.tsx
msgid "New Group"
msgstr ""
#. js-lingui-id: o8MyXb
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "New key"
@@ -8931,7 +8999,6 @@ msgstr "Žádná data metrik nejsou k dispozici"
#. js-lingui-id: UWZZdQ
#: src/pages/settings/ai/forms/components/SettingsAIAgentForm.tsx
#: src/pages/settings/ai/components/SettingsAgentSettingsTab.tsx
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "No models available. Please configure AI models in your workspace settings."
msgstr "Nejsou dostupné žádné modely. Prosím, nakonfigurujte AI modely v nastavení vašeho pracovního prostoru."
@@ -9569,7 +9636,7 @@ msgstr ""
#: src/pages/settings/admin-panel/SettingsAdminConfigVariableDetails.tsx
#: src/pages/settings/admin-panel/SettingsAdmin.tsx
#: src/modules/settings/hooks/useSettingsNavigationItems.tsx
#: src/modules/page-layout/hooks/useTemporaryFieldsConfiguration.ts
#: src/modules/page-layout/widgets/fields/hooks/useFieldsWidgetGroups.ts
#: src/modules/command-menu/pages/navigation-menu-item/components/CommandMenuNewSidebarItemMainMenu.tsx
msgid "Other"
msgstr "Ostatní"
@@ -10257,11 +10324,6 @@ msgstr "Výkon fronty"
msgid "Queue: {queueName}"
msgstr "Fronta: {queueName}"
#. js-lingui-id: GaAG2G
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Quick model for routing decisions"
msgstr ""
#. js-lingui-id: opSifa
#: src/modules/ai/utils/getToolDisplayMessage.ts
msgid "Ran {formattedName}"
@@ -10738,6 +10800,11 @@ msgstr "Obnovit záznamy"
msgid "Restore Records"
msgstr "Obnovit záznamy"
#. js-lingui-id: hO3AfV
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Restrict available models to a curated list"
msgstr ""
#. js-lingui-id: RD6AE9
#: src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx
msgid "Result"
@@ -11019,6 +11086,12 @@ msgstr "Hledat ve sloupci..."
msgid "Search a folder..."
msgstr ""
#. js-lingui-id: 8J0e5B
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Search a model..."
msgstr ""
#. js-lingui-id: WXvlVa
#: src/modules/settings/roles/components/SettingsRolesList.tsx
msgid "Search a role..."
@@ -11572,6 +11645,11 @@ msgstr "Odesláno a přijato"
msgid "Serbian (Cyrillic)"
msgstr "Srbština (cyrilice)"
#. js-lingui-id: 8ZSrlB
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Server-wide AI model availability settings"
msgstr ""
#. js-lingui-id: LUc0oL
#: src/modules/settings/security/components/SSO/SettingsSSOSAMLForm.tsx
msgid "Service Provider Details"
@@ -11654,7 +11732,6 @@ msgstr "Nastavení vaší databáze..."
#: src/pages/settings/applications/SettingsAvailableApplicationDetails.tsx
#: src/pages/settings/applications/SettingsApplicationDetails.tsx
#: src/pages/settings/ai/SettingsAgentForm.tsx
#: src/pages/settings/ai/SettingsAI.tsx
#: src/modules/sign-in-background-mock/components/SignInAppNavigationDrawerMock.tsx
#: src/modules/settings/roles/role-permissions/permission-flags/components/SettingsRolePermissionsSettingsSection.tsx
#: src/modules/settings/roles/role/components/SettingsRole.tsx
@@ -11873,15 +11950,10 @@ msgid "Small section heading"
msgstr ""
#. js-lingui-id: 5J8ZFl
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Smart Model"
msgstr ""
#. js-lingui-id: qgvZ/2
#: src/pages/settings/ai/components/SettingsAIRouterSettings.tsx
msgid "Smart model updated successfully"
msgstr ""
#. js-lingui-id: w+rJId
#: src/modules/settings/accounts/components/SettingsAccountsConnectionForm.tsx
msgid "SMTP Configuration"
@@ -12960,6 +13032,11 @@ msgstr "Přepnout oprávnění všech objektů"
msgid "Toggle all settings permissions"
msgstr "Přepnout všechna oprávnění nastavení"
#. js-lingui-id: 93pMSK
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Toggle model availability across all workspaces"
msgstr ""
#. js-lingui-id: WOr+hW
#: src/modules/ai/components/internal/AIChatContextUsageButton.tsx
msgid "tokens"
@@ -13257,6 +13334,11 @@ msgstr ""
msgid "Unable to Reach Back-end"
msgstr "Nepodařilo se dosáhnout zadního konce"
#. js-lingui-id: EbnX+O
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "Unconfigured models"
msgstr ""
#. js-lingui-id: EUHN7i
#: src/modules/settings/admin-panel/config-variables/components/ConfigVariableValueInput.tsx
msgid "Undefined"
@@ -13567,11 +13649,26 @@ msgstr "Použít jako koncept"
msgid "Use authenticator apps and browser extensions like 1Password, Authy, Microsoft Authenticator to generate one-time passwords"
msgstr "Používejte autentizační aplikace a rozšíření prohlížeče jako 1Password, Authy, Microsoft Authenticator pro generování jednorázových hesel"
#. js-lingui-id: hCZsJ0
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Use best models only"
msgstr ""
#. js-lingui-id: c6uZUV
#: src/modules/object-record/record-table/empty-state/utils/getEmptyStateSubTitle.ts
msgid "Use our API or add your first {objectLabel} manually"
msgstr "Použijte naše API nebo ručně přidejte první {objectLabel}"
#. js-lingui-id: 664z2C
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for chats, agents, and complex reasoning"
msgstr ""
#. js-lingui-id: C41qgx
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "Used for lightweight tasks like title generation"
msgstr ""
#. js-lingui-id: AQVj2A
#: src/modules/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm.tsx
msgid "Useful for pivot/junction tables"
@@ -14080,6 +14177,16 @@ msgstr ""
msgid "When enabled, AI agents and workflow automations can discover and call this function"
msgstr ""
#. js-lingui-id: i2V4DO
#: src/pages/settings/ai/components/SettingsAIModelsTab.tsx
msgid "When enabled, new AI models will be available to users by default"
msgstr ""
#. js-lingui-id: 01e9rV
#: src/modules/settings/admin-panel/ai/components/SettingsAdminAI.tsx
msgid "When enabled, newly added models are available to all workspaces by default"
msgstr ""
#. js-lingui-id: C51ilI
#: src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx
msgid "When the API key will expire."
@@ -14212,6 +14319,7 @@ msgid "Workspace Domain"
msgstr "Doména pracovního prostoru"
#. js-lingui-id: J2q6WC
#: src/pages/settings/security/SettingsSecurity.tsx
#: src/pages/settings/security/event-logs/components/EventLogTableSelector.tsx
msgid "Workspace Events"
msgstr ""

Some files were not shown because too many files have changed in this diff Show More