The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add Document Generator SDK app + step-by-step tutorial (#22522)
martmull07a921f8ca89
diff --git a/packages/twenty-apps/examples/document-generator/.gitignore b/packages/twenty-apps/examples/document-generator/.gitignorenew file mode 100644index 00000000000..6cd06106246--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/.gitignore@@ -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++# 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+*.d.tsdiff --git a/packages/twenty-apps/examples/document-generator/.nvmrc b/packages/twenty-apps/examples/document-generator/.nvmrcnew file mode 100644index 00000000000..341cb50613a--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/.nvmrc@@ -0,0 +1 @@+24.5.0diff --git a/packages/twenty-apps/examples/document-generator/.oxlintrc.json b/packages/twenty-apps/examples/document-generator/.oxlintrc.jsonnew file mode 100644index 00000000000..2c2035b0fe3--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/.oxlintrc.json@@ -0,0 +1,58 @@+{+ "$schema": "./node_modules/oxlint/configuration_schema.json",+ "extends": ["../../.oxlintrc.base.json"],+ "plugins": ["react", "typescript", "import", "unicorn"],+ "categories": {+ "correctness": "off"+ },+ "ignorePatterns": ["node_modules", "dist"],+ "rules": {+ "func-style": ["error", "declaration", { "allowArrowFunctions": true }],+ "no-console": "off",+ "no-control-regex": "off",+ "no-debugger": "error",+ "no-duplicate-imports": "error",+ "no-undef": "off",+ "no-unused-vars": "off",+ "no-redeclare": "off",+ "import/no-duplicates": "error",+ "typescript/no-redeclare": "error",+ "typescript/ban-ts-comment": "error",+ "typescript/consistent-type-imports": [+ "error",+ {+ "prefer": "type-imports",+ "fixStyle": "inline-type-imports"+ }+ ],+ "typescript/explicit-function-return-type": "off",+ "typescript/explicit-module-boundary-types": "off",+ "typescript/no-empty-object-type": [+ "error",+ {+ "allowInterfaces": "with-single-extends"+ }+ ],+ "typescript/no-empty-function": "off",+ "typescript/no-explicit-any": "off",+ "typescript/no-unused-vars": [+ "warn",+ {+ "vars": "all",+ "varsIgnorePattern": "^_",+ "args": "after-used",+ "argsIgnorePattern": "^_"+ }+ ],+ "react/no-unescaped-entities": "off",+ "react/prop-types": "off",+ "react/jsx-key": "off",+ "react/display-name": "off",+ "react/jsx-uses-react": "off",+ "react/react-in-jsx-scope": "off",+ "react/jsx-no-useless-fragment": "off",+ "react/jsx-props-no-spreading": ["error", { "explicitSpread": "ignore" }],+ "react-hooks/rules-of-hooks": "error",+ "react-hooks/exhaustive-deps": "warn"+ }+}diff --git a/packages/twenty-apps/examples/document-generator/.yarnrc.yml b/packages/twenty-apps/examples/document-generator/.yarnrc.ymlnew file mode 100644index 00000000000..3186f3f0795--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/.yarnrc.yml@@ -0,0 +1 @@+nodeLinker: node-modulesdiff --git a/packages/twenty-apps/examples/document-generator/README.md b/packages/twenty-apps/examples/document-generator/README.mdnew file mode 100644index 00000000000..693652fffbc--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/README.md@@ -0,0 +1,16 @@+# Document Generator++**Turn your CRM data into finished documents — in one click.**++## ✨ What you get++- **Reusable templates** — write once with `{{placeholders}}` like `{{name.firstName}}` or `{{company.name}}`+- **Generate anywhere** — from the command menu on a record, a workflow step, or AI chat+- **Polished PDFs** — every document is saved to the record with a downloadable PDF+- **Shareable links** — open any document as a standalone, printable web page+- **Native rich-text editor** — author templates in the same editor as Notes and Tasks++## 📌 Heads up++- **Free to run** — generation uses no external API, so there's no per-document charge.+- **A hands-on reference** — this is the app built in the [Document Generator tutorial](https://docs.twenty.com/developers/extend/apps/tutorials/document-generator/overview), a tour through most of the Twenty SDK.diff --git a/packages/twenty-apps/examples/document-generator/package.json b/packages/twenty-apps/examples/document-generator/package.jsonnew file mode 100644index 00000000000..0855f512334--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/package.json@@ -0,0 +1,41 @@+{+ "name": "@twentyhq/document-generator",+ "version": "0.1.0",+ "description": "Create reusable document templates and generate personalized documents from your CRM records",+ "license": "MIT",+ "engines": {+ "node": "^24.5.0",+ "npm": "please-use-yarn",+ "yarn": ">=4.0.2"+ },+ "keywords": [+ "twenty-app"+ ],+ "packageManager": "[email protected]",+ "scripts": {+ "twenty": "twenty",+ "lint": "oxlint -c .oxlintrc.json .",+ "lint:fix": "oxlint --fix -c .oxlintrc.json .",+ "typecheck": "tsgo --noEmit -p tsconfig.spec.json",+ "test": "vitest run",+ "test:watch": "vitest",+ "test:unit": "vitest run --config vitest.unit.config.ts"+ },+ "devDependencies": {+ "@types/node": "^24.7.2",+ "@types/react": "^18.2.0",+ "@typescript/native-preview": "^7.0.0-dev.20260116.1",+ "oxlint": "^0.16.0",+ "react": "^18.2.0",+ "react-dom": "^18.2.0",+ "twenty-client-sdk": "^2.16.0",+ "twenty-sdk": "^2.16.0",+ "typescript": "^5.9.3",+ "vite-tsconfig-paths": "^4.2.1",+ "vitest": "^4.0.0"+ },+ "dependencies": {+ "marked": "^18.0.5",+ "pdf-lib": "^1.17.1"+ }+}diff --git a/packages/twenty-apps/examples/document-generator/public/document-generator.svg b/packages/twenty-apps/examples/document-generator/public/document-generator.svgnew file mode 100644index 00000000000..d653615696d--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/public/document-generator.svg@@ -0,0 +1,8 @@+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">+ <rect width="64" height="64" rx="14" fill="#1961ED"/>+ <path d="M22 16h14l10 10v22a2 2 0 0 1-2 2H22a2 2 0 0 1-2-2V18a2 2 0 0 1 2-2Z" fill="#fff"/>+ <path d="M36 16v9a1 1 0 0 0 1 1h9" fill="#C9DCFF"/>+ <rect x="26" y="32" width="14" height="2.4" rx="1.2" fill="#1961ED"/>+ <rect x="26" y="38" width="14" height="2.4" rx="1.2" fill="#1961ED"/>+ <rect x="26" y="44" width="9" height="2.4" rx="1.2" fill="#1961ED"/>+</svg>diff --git a/packages/twenty-apps/examples/document-generator/public/gallery/01-template-editor.png b/packages/twenty-apps/examples/document-generator/public/gallery/01-template-editor.pngnew file mode 100644index 00000000000..1301140d490Binary files /dev/null and b/packages/twenty-apps/examples/document-generator/public/gallery/01-template-editor.png differdiff --git a/packages/twenty-apps/examples/document-generator/public/gallery/02-command-menu.png b/packages/twenty-apps/examples/document-generator/public/gallery/02-command-menu.pngnew file mode 100644index 00000000000..7ddd2fe9869Binary files /dev/null and b/packages/twenty-apps/examples/document-generator/public/gallery/02-command-menu.png differdiff --git a/packages/twenty-apps/examples/document-generator/public/gallery/03-documents.png b/packages/twenty-apps/examples/document-generator/public/gallery/03-documents.pngnew file mode 100644index 00000000000..d6457672f43Binary files /dev/null and b/packages/twenty-apps/examples/document-generator/public/gallery/03-documents.png differdiff --git a/packages/twenty-apps/examples/document-generator/public/gallery/04-generated-document.png b/packages/twenty-apps/examples/document-generator/public/gallery/04-generated-document.pngnew file mode 100644index 00000000000..4a05a7948d1Binary files /dev/null and b/packages/twenty-apps/examples/document-generator/public/gallery/04-generated-document.png differdiff --git a/packages/twenty-apps/examples/document-generator/src/__tests__/document-generator.integration-test.ts b/packages/twenty-apps/examples/document-generator/src/__tests__/document-generator.integration-test.tsnew file mode 100644index 00000000000..b6ea83f6d36--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/__tests__/document-generator.integration-test.ts@@ -0,0 +1,27 @@+import { MetadataApiClient } from 'twenty-client-sdk/metadata';+import { describe, expect, it } from 'vitest';++import { APPLICATION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';++// The app is synced once in src/__tests__/global-setup.ts and uninstalled on+// teardown, so this test just asserts the install succeeded.+describe('Document Generator installation', () => {+ it('should install the application onto the workspace', async () => {+ const metadataClient = new MetadataApiClient();++ const result = await metadataClient.query({+ findManyApplications: {+ id: true,+ name: true,+ universalIdentifier: true,+ },+ });++ const installedApp = result.findManyApplications.find(+ (application: { universalIdentifier: string }) =>+ application.universalIdentifier === APPLICATION_UNIVERSAL_IDENTIFIER,+ );++ expect(installedApp).toBeDefined();+ });+});diff --git a/packages/twenty-apps/examples/document-generator/src/__tests__/global-setup.ts b/packages/twenty-apps/examples/document-generator/src/__tests__/global-setup.tsnew file mode 100644index 00000000000..e0f8c23b054--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/__tests__/global-setup.ts@@ -0,0 +1,87 @@+import * as fs from 'fs';+import * as os from 'os';+import * as path from 'path';++import { appDevOnce, appUninstall } from 'twenty-sdk/cli';++const APP_PATH = process.cwd();+const CONFIG_DIR = path.join(os.homedir(), '.twenty');++function validateEnv(): { apiUrl: string; apiKey: string } {+ const apiUrl = process.env.TWENTY_API_URL;+ const apiKey = process.env.TWENTY_API_KEY;++ if (!apiUrl || !apiKey) {+ throw new Error(+ 'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' ++ 'Start a local server: yarn twenty docker:start\n' ++ 'Or set them in vitest env config.',+ );+ }++ return { apiUrl, apiKey };+}++async function checkServer(apiUrl: string) {+ let response: Response;++ try {+ response = await fetch(`${apiUrl}/healthz`);+ } catch {+ throw new Error(+ `Twenty server is not reachable at ${apiUrl}. ` ++ 'Make sure the server is running before executing integration tests.',+ );+ }++ if (!response.ok) {+ throw new Error(`Server at ${apiUrl} returned ${response.status}`);+ }+}++function writeConfig(apiUrl: string, apiKey: string) {+ const payload = JSON.stringify(+ {+ remotes: {+ local: { apiUrl, apiKey, accessToken: apiKey },+ },+ defaultRemote: 'local',+ },+ null,+ 2,+ );++ fs.mkdirSync(CONFIG_DIR, { recursive: true });+ fs.writeFileSync(path.join(CONFIG_DIR, 'config.test.json'), payload);+}++export async function setup() {+ const { apiUrl, apiKey } = validateEnv();++ await checkServer(apiUrl);++ writeConfig(apiUrl, apiKey);++ await appUninstall({ appPath: APP_PATH }).catch(() => {});++ const result = await appDevOnce({+ appPath: APP_PATH,+ onProgress: (message: string) => console.log(`[dev] ${message}`),+ });++ if (!result.success) {+ throw new Error(+ `Dev sync failed: ${result.error?.message ?? 'Unknown error'}`,+ );+ }+}++export async function teardown() {+ const uninstallResult = await appUninstall({ appPath: APP_PATH });++ if (!uninstallResult.success) {+ console.warn(+ `App uninstall failed: ${uninstallResult.error?.message ?? 'Unknown error'}`,+ );+ }+}diff --git a/packages/twenty-apps/examples/document-generator/src/agents/document-assistant.agent.ts b/packages/twenty-apps/examples/document-generator/src/agents/document-assistant.agent.tsnew file mode 100644index 00000000000..d7c4c0d1dd6--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/agents/document-assistant.agent.ts@@ -0,0 +1,18 @@+import { defineAgent } from 'twenty-sdk/define';++import { DOCUMENT_AGENT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';++export default defineAgent({+ universalIdentifier: DOCUMENT_AGENT_UNIVERSAL_IDENTIFIER,+ name: 'document-assistant',+ label: 'Document Assistant',+ description: 'Generates documents from your templates and CRM records.',+ icon: 'IconFileText',+ responseFormat: { type: 'text' },+ prompt: [+ 'You are the Document Assistant for a CRM.',+ 'You help users generate personalized documents (proposals, letters, contracts)',+ 'from reusable templates and the data already in their CRM.',+ 'Use the generate-document tool to produce documents, and always confirm what you created.',+ ].join(' '),+});diff --git a/packages/twenty-apps/examples/document-generator/src/application-config.ts b/packages/twenty-apps/examples/document-generator/src/application-config.tsnew file mode 100644index 00000000000..15f734cf7c4--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/application-config.ts@@ -0,0 +1,29 @@+import { defineApplication } from 'twenty-sdk/define';++import {+ APP_DESCRIPTION,+ APP_DISPLAY_NAME,+ APPLICATION_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// The default role is declared with defineApplicationRole() in+// src/roles/default-role.ts and picked up automatically.+export default defineApplication({+ universalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,+ displayName: APP_DISPLAY_NAME,+ description: APP_DESCRIPTION,+ logoUrl: 'public/document-generator.svg',+ screenshots: [+ 'public/gallery/01-template-editor.png',+ 'public/gallery/02-command-menu.png',+ 'public/gallery/03-documents.png',+ 'public/gallery/04-generated-document.png',+ ],+ author: 'Twenty',+ category: 'Productivity',+ websiteUrl:+ 'https://docs.twenty.com/developers/extend/apps/tutorials/document-generator/overview',+ termsUrl: 'https://www.twenty.com/terms',+ emailSupport: '[email protected]',+ issueReportUrl: 'https://github.com/twentyhq/twenty/issues',+});diff --git a/packages/twenty-apps/examples/document-generator/src/command-menu-items/generate-document.command-menu-item.ts b/packages/twenty-apps/examples/document-generator/src/command-menu-items/generate-document.command-menu-item.tsnew file mode 100644index 00000000000..b66d3fc38b6--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/command-menu-items/generate-document.command-menu-item.ts@@ -0,0 +1,23 @@+import {+ defineCommandMenuItem,+ STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,+} from 'twenty-sdk/define';++import {+ GENERATE_DOCUMENT_COMMAND_UNIVERSAL_IDENTIFIER,+ GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// Shows up in the command menu when a Person record is selected, opening the+// "Generate document" form in the side panel.+export default defineCommandMenuItem({+ universalIdentifier: GENERATE_DOCUMENT_COMMAND_UNIVERSAL_IDENTIFIER,+ label: 'Generate document',+ shortLabel: 'Generate',+ isPinned: false,+ availabilityType: 'RECORD_SELECTION',+ availabilityObjectUniversalIdentifier:+ STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,+ frontComponentUniversalIdentifier:+ GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+});diff --git a/packages/twenty-apps/examples/document-generator/src/constants/universal-identifiers.ts b/packages/twenty-apps/examples/document-generator/src/constants/universal-identifiers.tsnew file mode 100644index 00000000000..944eec7d832--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/constants/universal-identifiers.ts@@ -0,0 +1,126 @@+// Central registry of the app's universal identifiers.+// Every entity in a Twenty app carries a stable UUID (its `universalIdentifier`).+// Keeping them in one file makes cross-references (relations, views, layouts)+// easy to follow and guarantees they stay stable across syncs and versions.++export const APP_DISPLAY_NAME = 'Document Generator';+export const APP_DESCRIPTION =+ 'Create reusable document templates and generate personalized documents from your CRM records.';++export const APPLICATION_UNIVERSAL_IDENTIFIER =+ '10812367-41ef-42a3-814b-ee12d69bb88c';+export const DEFAULT_ROLE_UNIVERSAL_IDENTIFIER =+ '9f13095f-7448-415e-bd85-f4e65d684fb0';++// Document template object + fields+export const DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER =+ '79a17fab-7846-401e-b5b0-968d30a9e8da';+export const TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER =+ '5964460e-8b27-4e24-9285-21837d63c51c';+export const TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER =+ 'e17cbc62-b6e0-4606-adeb-029d25c33b60';+export const TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER =+ '29a89aec-4f75-4e5a-aee7-f23ab6a91b1c';+export const TEMPLATE_TARGET_OPTION_PERSON_UNIVERSAL_IDENTIFIER =+ '21cb2f05-d35e-41f8-95ab-470f55e6eaa4';+export const TEMPLATE_TARGET_OPTION_COMPANY_UNIVERSAL_IDENTIFIER =+ 'dbea00f7-66cd-43d5-995e-d7731a761a72';+export const TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER =+ 'dddf334c-7e0c-4282-851d-d4447556e467';++// Document object + fields+export const DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER =+ '052930e6-57bb-4ff5-b996-04a27e6d36fc';+export const DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER =+ 'be732f60-c301-4202-a45b-ecbc4dad36eb';+export const DOCUMENT_CONTENT_FIELD_UNIVERSAL_IDENTIFIER =+ '602d7dfd-a2e1-48c0-8f20-257fdb5c69ab';+export const DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER =+ '93b3ee71-f8a1-4eb5-8c6e-842b95f5db04';+export const DOCUMENT_STATUS_OPTION_DRAFT_UNIVERSAL_IDENTIFIER =+ '6724f4a5-ee81-4c81-8fe3-06a3ffd075db';+export const DOCUMENT_STATUS_OPTION_GENERATED_UNIVERSAL_IDENTIFIER =+ 'e11ae1bd-834d-438e-a26d-a74026250619';+export const DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER =+ 'b6da07ba-60d4-426b-b28f-17020e94d777';+export const DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER =+ '60168c70-b842-4d14-a73f-120ac05e1576';++// Logic functions+export const GENERATE_DOCUMENT_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER =+ 'e2f80832-07a4-408f-b9d4-55f47e188516';+export const GENERATE_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER =+ 'c88bf870-df0c-4b27-96b9-290b1b257cf6';+export const VIEW_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER =+ 'b7d2eff6-d150-4f49-b0e6-9a1952a5928b';++// Front component + command+export const GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER =+ 'd6a82a87-f44b-4a12-9ea6-6da91b32f023';+export const GENERATE_DOCUMENT_COMMAND_UNIVERSAL_IDENTIFIER =+ 'e98f0501-68ee-4fd4-9af7-c741026189fe';++// Views + view fields+export const TEMPLATES_VIEW_UNIVERSAL_IDENTIFIER =+ 'b7fa76ab-0e68-4792-9ef1-597d5644fcbf';+export const TEMPLATES_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER =+ 'c42b9ad3-d018-4a6f-979d-1d764937ddbe';+export const TEMPLATES_VIEW_TARGET_FIELD_UNIVERSAL_IDENTIFIER =+ 'e09e0f92-912d-4239-a64f-f26c0282e725';+export const DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER =+ '4373afdc-0cc8-4875-bd00-f444b4eb7601';+export const DOCUMENTS_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER =+ '929a17d1-6328-4506-90b0-8cb8fd5113d3';+export const DOCUMENTS_VIEW_STATUS_FIELD_UNIVERSAL_IDENTIFIER =+ 'b0e995a3-2778-4f59-b0e0-bbcdb762e508';+export const DOCUMENTS_VIEW_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER =+ '18c8a6df-4d34-40b4-a35c-ee246a62fa1d';++// Navigation menu items+export const TEMPLATES_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER =+ '3f771e0b-389a-4d6a-9cca-0cd5cc80f794';+export const DOCUMENTS_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER =+ '3249fdb2-8edb-41ac-b3ae-510fe4d0a099';++// Document viewer front component + the document and template record page layouts+// (the template body is edited with Twenty's native RICH_TEXT editor)+export const DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER =+ '2c95f42a-cc54-4016-b26a-4d044ce15ae1';+export const DOCUMENT_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER =+ '5299b588-96f4-453f-a8b4-796b3f57090b';+export const DOCUMENT_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER =+ '1b3d2f4a-9c6e-4b2a-8f1d-7e5c0a9b4d31';+export const DOCUMENT_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =+ '2c4e3a5b-0d7f-4c3b-9a2e-8f6d1b0c5e42';+export const DOCUMENT_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER =+ 'fc275829-b201-4e44-b1e8-22c55daed5b4';+export const DOCUMENT_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =+ 'fdefbf77-6bb4-450a-a40c-de1168193444';+export const TEMPLATE_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER =+ 'c87b5d7c-419f-4f53-b08a-5a0f975d4415';+export const TEMPLATE_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER =+ '3d5f4b6c-1e8a-4d4c-ab3f-9a7e2c1d6f53';+export const TEMPLATE_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =+ '4e6a5c7d-2f9b-4e5d-bc4a-0b8f3d2e7a64';+export const TEMPLATE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER =+ '2a8cdc7c-f5f8-47d5-aa29-0630c9f43430';+export const TEMPLATE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =+ 'ba980ce0-a230-49cd-951a-9981e72af9c4';+export const TIMELINE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER =+ 'a518d6e2-6079-4d10-85e3-c81ba2c0a0d3';+export const TIMELINE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER =+ '065002ea-b44e-49e4-8dda-a1591d6f010b';++// Agent + skill+export const DOCUMENT_AGENT_UNIVERSAL_IDENTIFIER =+ '08eaaa8c-2f70-45e6-bfd1-403d5c24850e';+export const DOCUMENT_SKILL_UNIVERSAL_IDENTIFIER =+ 'b2e2d896-d76d-4012-b2f3-7bb1809a450c';++// Select option values must be UPPER_CASE. Centralized so the object metadata+// and the handler that writes them can never drift apart.+export const TEMPLATE_TARGET_PERSON = 'PERSON';+export const TEMPLATE_TARGET_COMPANY = 'COMPANY';++export const DOCUMENT_STATUS_DRAFT = 'DRAFT';+export const DOCUMENT_STATUS_GENERATED = 'GENERATED';diff --git a/packages/twenty-apps/examples/document-generator/src/fields/document-template-relation.field.ts b/packages/twenty-apps/examples/document-generator/src/fields/document-template-relation.field.tsnew file mode 100644index 00000000000..44c51758060--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/fields/document-template-relation.field.ts@@ -0,0 +1,34 @@+import {+ defineField,+ FieldType,+ OnDeleteAction,+ RelationType,+} from 'twenty-sdk/define';++import {+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// The "many" side: each document points to the template it was generated from.+export default defineField({+ universalIdentifier: DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ type: FieldType.RELATION,+ name: 'template',+ label: 'Template',+ description: 'The template this document was generated from.',+ icon: 'IconFileText',+ isNullable: true,+ relationTargetObjectMetadataUniversalIdentifier:+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ relationTargetFieldMetadataUniversalIdentifier:+ TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER,+ universalSettings: {+ relationType: RelationType.MANY_TO_ONE,+ onDelete: OnDeleteAction.SET_NULL,+ joinColumnName: 'templateId',+ },+});diff --git a/packages/twenty-apps/examples/document-generator/src/fields/template-documents-relation.field.ts b/packages/twenty-apps/examples/document-generator/src/fields/template-documents-relation.field.tsnew file mode 100644index 00000000000..1781bdc42a6--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/fields/template-documents-relation.field.ts@@ -0,0 +1,27 @@+import { defineField, FieldType, RelationType } from 'twenty-sdk/define';++import {+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// The "one" side: a template lists every document generated from it.+export default defineField({+ universalIdentifier: TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER,+ objectUniversalIdentifier: DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ type: FieldType.RELATION,+ name: 'documents',+ label: 'Documents',+ description: 'Documents generated from this template.',+ icon: 'IconFile',+ isNullable: true,+ relationTargetObjectMetadataUniversalIdentifier:+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ relationTargetFieldMetadataUniversalIdentifier:+ DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ universalSettings: {+ relationType: RelationType.ONE_TO_MANY,+ },+});diff --git a/packages/twenty-apps/examples/document-generator/src/front-components/document-viewer.front-component.tsx b/packages/twenty-apps/examples/document-generator/src/front-components/document-viewer.front-component.tsxnew file mode 100644index 00000000000..85285b7aac7--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/front-components/document-viewer.front-component.tsx@@ -0,0 +1,124 @@+import { type CSSProperties, useEffect, useState } from 'react';+import { CoreApiClient } from 'twenty-client-sdk/core';+import { defineFrontComponent } from 'twenty-sdk/define';+import { useFrontComponentExecutionContext } from 'twenty-sdk/front-component';++import { DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';+import { Markdown } from 'src/utils/markdown-to-react';++const useCurrentRecordId = (): string | null =>+ useFrontComponentExecutionContext((context) =>+ context.recordId ??+ (context.selectedRecordIds.length === 1+ ? context.selectedRecordIds[0]+ : null),+ );++const styles: Record<string, CSSProperties> = {+ scroll: { height: '100%', overflow: 'auto', background: '#eef1f6', padding: '24px' },+ paper: {+ maxWidth: '720px',+ margin: '0 auto',+ background: '#ffffff',+ borderRadius: '10px',+ boxShadow: '0 10px 40px rgba(24, 39, 75, 0.08)',+ overflow: 'hidden',+ fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif",+ },+ body: { padding: '48px 56px 56px' },+ empty: { padding: '40px', textAlign: 'center', color: '#6b7280', fontFamily: 'sans-serif' },+ actions: {+ maxWidth: '720px',+ margin: '0 auto 16px',+ display: 'flex',+ gap: '10px',+ justifyContent: 'flex-end',+ fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif",+ },+ actionLink: {+ fontSize: '13px',+ fontWeight: 500,+ color: '#1961ed',+ background: '#ffffff',+ border: '1px solid #d7deee',+ borderRadius: '6px',+ padding: '6px 12px',+ textDecoration: 'none',+ },+};++type LoadedDocument = { name: string; content: string; pdfUrl?: string };++const DocumentViewer = () => {+ const recordId = useCurrentRecordId();+ const [document, setDocument] = useState<LoadedDocument | null>(null);+ const [loading, setLoading] = useState(true);++ useEffect(() => {+ if (!recordId) {+ setLoading(false);+ return;+ }+ // Reset while the newly-selected document loads, so the previous one isn't+ // shown against the new record.+ setLoading(true);+ setDocument(null);+ let cancelled = false;+ const load = async () => {+ const { documents } = await new CoreApiClient().query({+ documents: {+ __args: { filter: { id: { eq: recordId } }, first: 1 },+ edges: {+ node: { id: true, name: true, content: true, file: { url: true } },+ },+ },+ });+ if (cancelled) return;+ const node = documents?.edges?.[0]?.node;+ setDocument({+ name: node?.name ?? 'Document',+ content: node?.content ?? '',+ pdfUrl: node?.file?.[0]?.url ?? undefined,+ });+ };+ load().finally(() => {+ if (!cancelled) setLoading(false);+ });+ return () => {+ cancelled = true;+ };+ }, [recordId]);++ if (loading || !document) {+ return <div style={styles.empty}>{loading ? 'Loading…' : 'Open a document to preview it here.'}</div>;+ }++ const webUrl = `${process.env.TWENTY_API_URL ?? ''}/s/documents/view?id=${recordId}`;++ return (+ <div style={styles.scroll}>+ <div style={styles.actions}>+ <a style={styles.actionLink} href={webUrl} target="_blank" rel="noopener noreferrer">+ Open web page+ </a>+ {document.pdfUrl ? (+ <a style={styles.actionLink} href={document.pdfUrl} target="_blank" rel="noopener noreferrer">+ Download PDF+ </a>+ ) : null}+ </div>+ <div style={styles.paper}>+ <div style={styles.body}>+ <Markdown content={document.content} />+ </div>+ </div>+ </div>+ );+};++export default defineFrontComponent({+ universalIdentifier: DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ name: 'document-viewer',+ description: 'Renders a generated document as a styled, printable preview.',+ component: DocumentViewer,+});diff --git a/packages/twenty-apps/examples/document-generator/src/front-components/generate-document-form.front-component.tsx b/packages/twenty-apps/examples/document-generator/src/front-components/generate-document-form.front-component.tsxnew file mode 100644index 00000000000..541b5086eb3--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/front-components/generate-document-form.front-component.tsx@@ -0,0 +1,353 @@+import {+ type CSSProperties,+ type SyntheticEvent,+ useCallback,+ useEffect,+ useState,+} from 'react';+import { CoreApiClient } from 'twenty-client-sdk/core';+import { defineFrontComponent } from 'twenty-sdk/define';+import {+ closeSidePanel,+ enqueueSnackbar,+ unmountFrontComponent,+ useSelectedRecordIds,+} from 'twenty-sdk/front-component';++import { GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';++// Theme tokens are inlined as CSS-variable values: the SDK mocks the UI package+// during manifest extraction, so importing them at module level would be undefined.+const theme = {+ spacing2: 'var(--t-spacing-2)',+ spacing3: 'var(--t-spacing-3)',+ spacing4: 'var(--t-spacing-4)',+ spacing8: 'var(--t-spacing-8)',+ bgPrimary: 'var(--t-background-primary)',+ bgSecondary: 'var(--t-background-secondary)',+ borderMedium: 'var(--t-border-color-medium)',+ borderLight: 'var(--t-border-color-light)',+ radiusSm: 'var(--t-border-radius-sm)',+ fontPrimary: 'var(--t-font-color-primary)',+ fontSecondary: 'var(--t-font-color-secondary)',+ fontTertiary: 'var(--t-font-color-tertiary)',+ fontInverted: 'var(--t-font-color-inverted)',+ fontFamily: 'var(--t-font-family)',+ sizeXs: 'var(--t-font-size-xs)',+ sizeSm: 'var(--t-font-size-sm)',+ sizeMd: 'var(--t-font-size-md)',+ weightMedium: 'var(--t-font-weight-medium)',+ weightSemiBold: 'var(--t-font-weight-semi-bold)',+ blue: 'var(--t-color-blue)',+ accent: 'var(--t-accent-accent4060)',+};++type Template = { id: string; name: string };++type GenerateResponse = {+ success: boolean;+ message?: string;+ documentId?: string;+ missingTokens?: string[];+ error?: string;+};++const readValue = (event: SyntheticEvent<HTMLElement>): string | undefined => {+ const object = event as {+ detail?: { value?: string };+ target?: { value?: string };+ };++ return object.detail?.value ?? object.target?.value;+};++const callAppRoute = async <TResponse,>(+ path: string,+ method: 'GET' | 'POST',+ body?: Record<string, unknown>,+): Promise<TResponse> => {+ const apiBaseUrl = process.env.TWENTY_API_URL;+ const token =+ process.env.TWENTY_APP_ACCESS_TOKEN ?? process.env.TWENTY_API_KEY;++ if (!apiBaseUrl || !token) {+ throw new Error('App is missing API URL or access token configuration.');+ }++ const response = await fetch(`${apiBaseUrl}/s${path}`, {+ method,+ headers: {+ 'Content-Type': 'application/json',+ Authorization: `Bearer ${token}`,+ },+ ...(body ? { body: JSON.stringify(body) } : {}),+ });++ if (!response.ok) {+ const errorBody = (await response.json().catch(() => null)) as {+ message?: string;+ } | null;++ throw new Error(+ errorBody?.message ?? `Request failed with status ${response.status}.`,+ );+ }++ return response.json() as Promise<TResponse>;+};++const styles: Record<string, CSSProperties> = {+ container: {+ fontFamily: theme.fontFamily,+ fontSize: theme.sizeSm,+ color: theme.fontPrimary,+ background: theme.bgPrimary,+ display: 'flex',+ flexDirection: 'column',+ height: '100%',+ boxSizing: 'border-box',+ },+ header: {+ padding: theme.spacing4,+ borderBottom: `1px solid ${theme.borderLight}`,+ },+ title: {+ fontSize: theme.sizeMd,+ fontWeight: theme.weightSemiBold,+ margin: 0,+ },+ subtitle: {+ fontSize: theme.sizeSm,+ color: theme.fontTertiary,+ margin: `${theme.spacing2} 0 0`,+ },+ body: {+ flex: 1,+ padding: theme.spacing4,+ display: 'flex',+ flexDirection: 'column',+ gap: theme.spacing2,+ },+ label: {+ fontSize: theme.sizeXs,+ fontWeight: theme.weightMedium,+ color: theme.fontSecondary,+ },+ select: {+ appearance: 'none',+ WebkitAppearance: 'none',+ background: theme.bgSecondary,+ border: `1px solid ${theme.borderMedium}`,+ borderRadius: theme.radiusSm,+ padding: `${theme.spacing2} ${theme.spacing3}`,+ color: theme.fontPrimary,+ fontSize: theme.sizeSm,+ fontFamily: theme.fontFamily,+ height: theme.spacing8,+ width: '100%',+ boxSizing: 'border-box',+ cursor: 'pointer',+ },+ footer: {+ display: 'flex',+ justifyContent: 'flex-end',+ gap: theme.spacing2,+ padding: theme.spacing3,+ borderTop: `1px solid ${theme.borderLight}`,+ },+ button: {+ height: theme.spacing8,+ padding: `0 ${theme.spacing3}`,+ borderRadius: theme.radiusSm,+ fontSize: theme.sizeSm,+ fontFamily: theme.fontFamily,+ fontWeight: theme.weightMedium,+ cursor: 'pointer',+ border: '1px solid transparent',+ },+ secondary: {+ background: theme.bgSecondary,+ color: theme.fontSecondary,+ border: `1px solid ${theme.borderMedium}`,+ },+ primary: { background: theme.blue, color: theme.fontInverted },+ primaryDisabled: { background: theme.accent, cursor: 'not-allowed' },+ helper: { fontSize: theme.sizeXs, color: theme.fontTertiary },+};++const GenerateDocumentForm = () => {+ const selectedRecordIds = useSelectedRecordIds();+ const recordId = selectedRecordIds.length === 1 ? selectedRecordIds[0] : null;++ const [templates, setTemplates] = useState<Template[]>([]);+ const [templateId, setTemplateId] = useState('');+ const [loading, setLoading] = useState(true);+ const [submitting, setSubmitting] = useState(false);++ const loadTemplates = useCallback(async () => {+ setLoading(true);++ try {+ const client = new CoreApiClient();+ const { documentTemplates } = await client.query({+ documentTemplates: {+ __args: { filter: { target: { eq: 'PERSON' } }, first: 100 },+ edges: { node: { id: true, name: true } },+ },+ });++ const list: Template[] =+ documentTemplates?.edges?.map(+ (edge: { node: { id: string; name?: string | null } }) => ({+ id: edge.node.id,+ name: edge.node.name ?? 'Untitled template',+ }),+ ) ?? [];++ setTemplates(list);++ if (list.length > 0) {+ setTemplateId(list[0].id);+ }+ } catch {+ await enqueueSnackbar({+ message: 'Failed to load templates.',+ variant: 'error',+ });+ } finally {+ setLoading(false);+ }+ }, []);++ useEffect(() => {+ loadTemplates();+ }, [loadTemplates]);++ const handleClose = () => {+ unmountFrontComponent();+ closeSidePanel();+ };++ const handleGenerate = async () => {+ if (!templateId || !recordId) {+ return;+ }++ setSubmitting(true);++ try {+ const result = await callAppRoute<GenerateResponse>(+ '/documents/generate',+ 'POST',+ { templateId, recordId },+ );++ if (!result.success) {+ await enqueueSnackbar({+ message: result.message ?? result.error ?? 'Generation failed.',+ variant: 'error',+ });++ return;+ }++ const missing = result.missingTokens?.length+ ? ` (${result.missingTokens.length} placeholder(s) had no value)`+ : '';++ await enqueueSnackbar({+ message: `Document generated${missing}. Find it in the Documents view.`,+ variant: 'success',+ });++ handleClose();+ } catch (error) {+ await enqueueSnackbar({+ message:+ error instanceof Error ? error.message : 'Generation failed.',+ variant: 'error',+ });+ } finally {+ setSubmitting(false);+ }+ };++ const canSubmit =+ templateId !== '' && recordId !== null && !submitting && !loading;++ return (+ <div style={styles.container}>+ <div style={styles.header}>+ <h2 style={styles.title}>Generate document</h2>+ <p style={styles.subtitle}>+ Pick a template; it will be filled with this person's data.+ </p>+ </div>++ <div style={styles.body}>+ <label htmlFor="template-select" style={styles.label}>+ Template+ </label>+ <select+ id="template-select"+ value={templateId}+ onChange={(event) => {+ const value = readValue(event);++ if (typeof value === 'string') {+ setTemplateId(value);+ }+ }}+ style={styles.select}+ disabled={loading || templates.length === 0}+ >+ {templates.length === 0 ? (+ <option value="">No person templates yet</option>+ ) : (+ templates.map((template) => (+ <option key={template.id} value={template.id}>+ {template.name}+ </option>+ ))+ )}+ </select>+ {recordId === null && (+ <span style={styles.helper}>+ Select a single person to generate a document.+ </span>+ )}+ </div>++ <div style={styles.footer}>+ <button+ type="button"+ style={{ ...styles.button, ...styles.secondary }}+ onClick={handleClose}+ disabled={submitting}+ >+ Cancel+ </button>+ <button+ type="button"+ style={{+ ...styles.button,+ ...styles.primary,+ ...(canSubmit ? {} : styles.primaryDisabled),+ }}+ onClick={handleGenerate}+ disabled={!canSubmit}+ >+ {submitting ? 'Generating…' : 'Generate'}+ </button>+ </div>+ </div>+ );+};++export default defineFrontComponent({+ universalIdentifier:+ GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ name: 'generate-document-form',+ description: 'Form to generate a document from a template for a person.',+ component: GenerateDocumentForm,+});diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document-route.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document-route.tsnew file mode 100644index 00000000000..dd31ddef0eb--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document-route.ts@@ -0,0 +1,35 @@+import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';+import { Response } from 'twenty-sdk/logic-function';++import { GENERATE_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';+import { generateDocumentHandler } from 'src/logic-functions/handlers/generate-document-handler';++// HTTP entry point used by the "Generate document" front component. The shared+// handler returns a suggested HTTP status on failure (400/404/500); map it onto+// the response so callers get proper status codes instead of a 200 with an error.+const handler = async (event: RoutePayload): Promise<Response> => {+ const body = event.body as Record<string, unknown> | null;++ const result = await generateDocumentHandler({+ templateId: (body?.templateId as string | undefined) ?? '',+ recordId: (body?.recordId as string | undefined) ?? '',+ });++ return new Response(JSON.stringify(result), {+ status: result.success ? 200 : (result.status ?? 400),+ headers: { 'Content-Type': 'application/json' },+ });+};++export default defineLogicFunction({+ universalIdentifier: GENERATE_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER,+ name: 'generate-document-route',+ description: 'HTTP endpoint that generates a document for the given record.',+ timeoutSeconds: 30,+ handler,+ httpRouteTriggerSettings: {+ path: '/documents/generate',+ httpMethod: 'POST',+ isAuthRequired: true,+ },+});diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document.tsnew file mode 100644index 00000000000..dd8dda48dcd--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/generate-document.ts@@ -0,0 +1,38 @@+import { defineLogicFunction } from 'twenty-sdk/define';+import { jsonSchemaToInputSchema } from 'twenty-sdk/logic-function';++import { GENERATE_DOCUMENT_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';+import { generateDocumentHandler } from 'src/logic-functions/handlers/generate-document-handler';+import { generateDocumentInputSchema } from 'src/logic-functions/schemas/generate-document-input.schema';++// Same function, exposed two ways:+// - as an AI tool, so agents can call it,+// - as a workflow action, so it can be dropped into the visual workflow builder.+export default defineLogicFunction({+ universalIdentifier: GENERATE_DOCUMENT_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER,+ name: 'generate-document',+ description:+ 'Generate a document from a template and a CRM record, filling the template placeholders with the record data.',+ timeoutSeconds: 30,+ toolTriggerSettings: {+ inputSchema: generateDocumentInputSchema,+ },+ workflowActionTriggerSettings: {+ label: 'Generate Document',+ icon: 'IconFileText',+ inputSchema: jsonSchemaToInputSchema(generateDocumentInputSchema),+ outputSchema: [+ {+ type: 'object',+ properties: {+ success: { type: 'boolean' },+ message: { type: 'string' },+ documentId: { type: 'string' },+ content: { type: 'string' },+ missingTokens: { type: 'array', items: { type: 'string' } },+ },+ },+ ],+ },+ handler: generateDocumentHandler,+});diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/handlers/generate-document-handler.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/handlers/generate-document-handler.tsnew file mode 100644index 00000000000..e29dbe4a965--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/handlers/generate-document-handler.ts@@ -0,0 +1,198 @@+import { CoreApiClient } from 'twenty-client-sdk/core';+import { MetadataApiClient } from 'twenty-client-sdk/metadata';++import {+ DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_STATUS_GENERATED,+} from 'src/constants/universal-identifiers';+import { generateDocumentPdf } from 'src/logic-functions/utils/generate-document-pdf';+import {+ isSupportedTarget,+ loadRecordValues,+} from 'src/logic-functions/utils/load-record-values';+import { renderTemplate } from 'src/logic-functions/utils/render-template';++// Builds a filesystem-safe PDF filename from the document name.+const toPdfFileName = (documentName: string): string => {+ const slug = documentName+ .normalize('NFKD')+ .replace(/[^a-z0-9]+/gi, '-')+ .replace(/^-+|-+$/g, '')+ .toLowerCase();++ return `${slug || 'document'}.pdf`;+};++// Generates the PDF, uploads it to the app-owned `file` field, and stores the+// reference on the document so the record shows a downloadable PDF.+const attachGeneratedPdf = async (+ client: CoreApiClient,+ documentId: string,+ documentName: string,+ content: string,+): Promise<void> => {+ const bytes = await generateDocumentPdf(content);+ const fileName = toPdfFileName(documentName);++ const uploaded = await new MetadataApiClient().uploadFile(+ Buffer.from(bytes),+ fileName,+ 'application/pdf',+ DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+ );++ await client.mutation({+ updateDocument: {+ __args: {+ id: documentId,+ data: { file: [{ fileId: uploaded.id, label: fileName }] },+ },+ id: true,+ },+ });+};++export type GenerateDocumentInput = {+ templateId: string;+ recordId: string;+};++export type GenerateDocumentResult = {+ success: boolean;+ message: string;+ // Suggested HTTP status for the route trigger. Ignored by the tool and+ // workflow-action triggers, which only care about `success`.+ status?: number;+ documentId?: string;+ content?: string;+ missingTokens?: string[];+};++// Shared business logic behind every trigger (AI tool, workflow action, HTTP+// route). It loads a template + a CRM record, fills the placeholders, and+// stores the result as a `document` record.+export const generateDocumentHandler = async (+ input: GenerateDocumentInput,+): Promise<GenerateDocumentResult> => {+ const { templateId, recordId } = input;++ if (!templateId || !recordId) {+ return {+ success: false,+ status: 400,+ message: 'Both templateId and recordId are required.',+ };+ }++ const client = new CoreApiClient();++ // Use a filtered list query rather than the singular lookup: the singular+ // query throws when no record matches, which would surface as a 500 instead+ // of our intended 404.+ const { documentTemplates } = await client.query({+ documentTemplates: {+ __args: { filter: { id: { eq: templateId } }, first: 1 },+ edges: {+ // `body` is a RICH_TEXT field: request its Markdown projection. The+ // generated client only types the composite after+ // `twenty dev:generate-client` is re-run against a remote that has this+ // field; until then the cast bridges the lag (drop it after regen).+ node: {+ id: true,+ name: true,+ target: true,+ body: { markdown: true } as unknown as true,+ },+ },+ },+ });++ const documentTemplate = documentTemplates?.edges?.[0]?.node;++ if (!documentTemplate?.id) {+ return {+ success: false,+ status: 404,+ message: `No document template found with id ${templateId}.`,+ };+ }++ const target = documentTemplate.target ?? '';++ if (!isSupportedTarget(target)) {+ return {+ success: false,+ status: 400,+ message: `Template target "${target}" is not supported.`,+ };+ }++ const record = await loadRecordValues(client, target, recordId);++ if (!record.found) {+ return {+ success: false,+ status: 404,+ message: `No ${target} found with id ${recordId}.`,+ };+ }++ // RICH_TEXT stores { blocknote, markdown }; the Markdown projection feeds the+ // existing placeholder + PDF/HTML pipeline unchanged.+ const bodyMarkdown =+ (documentTemplate.body as unknown as { markdown: string | null } | null)+ ?.markdown ?? '';++ const { content, missingTokens } = renderTemplate(bodyMarkdown, record.values);++ const documentName = `${documentTemplate.name ?? 'Document'} — ${record.displayName}`;++ const { createDocument } = await client.mutation({+ createDocument: {+ __args: {+ data: {+ name: documentName,+ content,+ status: DOCUMENT_STATUS_GENERATED,+ templateId: documentTemplate.id,+ },+ },+ id: true,+ name: true,+ },+ });++ if (!createDocument?.id) {+ return {+ success: false,+ status: 500,+ message: 'Failed to create the document.',+ };+ }++ // Best-effort: the document already exists, so a PDF/upload failure shouldn't+ // discard it — surface a warning instead.+ let message = `Generated "${createDocument.name}".`;++ try {+ await attachGeneratedPdf(+ client,+ createDocument.id,+ createDocument.name ?? documentName,+ content,+ );+ } catch (error) {+ // Log the real cause server-side, but keep the caller-facing message+ // generic — this handler is exposed via HTTP, AI tool, and workflow action.+ console.warn('[document-generator] PDF attachment failed:', error);+ message += ' (PDF file could not be attached)';+ }++ return {+ success: true,+ message,+ documentId: createDocument.id,+ content,+ missingTokens,+ };+};diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/schemas/generate-document-input.schema.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/schemas/generate-document-input.schema.tsnew file mode 100644index 00000000000..4de7716be57--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/schemas/generate-document-input.schema.ts@@ -0,0 +1,20 @@+import { type InputJsonSchema } from 'twenty-sdk/logic-function';++export const generateDocumentInputSchema: InputJsonSchema = {+ type: 'object',+ properties: {+ templateId: {+ type: 'string',+ label: 'Document template',+ description: 'The id of the document template to render.',+ },+ recordId: {+ type: 'string',+ label: 'Record',+ description:+ 'The id of the Person or Company whose data fills the template placeholders.',+ },+ },+ required: ['templateId', 'recordId'],+ additionalProperties: false,+};diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/generate-document-pdf.test.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/generate-document-pdf.test.tsnew file mode 100644index 00000000000..d0682f2d02e--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/generate-document-pdf.test.ts@@ -0,0 +1,43 @@+import { PDFDocument } from 'pdf-lib';+import { describe, expect, it } from 'vitest';++import { generateDocumentPdf } from '../generate-document-pdf';++const MARKDOWN = `## Introduction++Dear **Jeffery Griffin**, here is our _proposal_.++- First point+- Second point++> A closing note.`;++describe('generateDocumentPdf', () => {+ it('should produce a valid PDF from markdown', async () => {+ const bytes = await generateDocumentPdf(MARKDOWN);++ expect(bytes.byteLength).toBeGreaterThan(0);+ expect(Buffer.from(bytes.slice(0, 5)).toString()).toBe('%PDF-');+ expect(Buffer.from(bytes).toString('latin1')).toContain('%%EOF');+ });++ it('should paginate long content across multiple pages', async () => {+ const long = Array.from({ length: 120 }, (_, i) => `Paragraph number ${i} with some text.`).join('\n\n');++ const bytes = await generateDocumentPdf(long);+ const loaded = await PDFDocument.load(bytes);++ expect(loaded.getPageCount()).toBeGreaterThan(1);+ });++ it('should render explicit line breaks and non-Latin characters without throwing', async () => {+ // The body fonts use WinAnsi encoding: a naive sanitizer would either+ // throw on unencodable characters or swallow the `\n` line breaks.+ const content = 'Bonjour **José**,\nRendez-vous à 20€ le 5 — merci.\n\n世界 dropped gracefully.';++ const bytes = await generateDocumentPdf(content);++ expect(bytes.byteLength).toBeGreaterThan(0);+ expect(Buffer.from(bytes.slice(0, 5)).toString()).toBe('%PDF-');+ });+});diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/render-template.test.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/render-template.test.tsnew file mode 100644index 00000000000..7e934483b23--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/__tests__/render-template.test.ts@@ -0,0 +1,64 @@+import { describe, expect, it } from 'vitest';++import { flattenRecord, renderTemplate } from '../render-template';++describe('flattenRecord', () => {+ it('should flatten nested objects into dot paths', () => {+ const result = flattenRecord({+ name: { firstName: 'Ada', lastName: 'Lovelace' },+ jobTitle: 'Engineer',+ });++ expect(result).toEqual({+ 'name.firstName': 'Ada',+ 'name.lastName': 'Lovelace',+ jobTitle: 'Engineer',+ });+ });++ it('should coerce nullish leaves to empty strings', () => {+ const result = flattenRecord({ jobTitle: null, city: undefined });++ expect(result).toEqual({ jobTitle: '', city: '' });+ });++ it('should stringify number and boolean leaves', () => {+ const result = flattenRecord({ employees: 42, isActive: true });++ expect(result).toEqual({ employees: '42', isActive: 'true' });+ });+});++describe('renderTemplate', () => {+ it('should replace placeholders with matching values', () => {+ const result = renderTemplate('Hi {{name.firstName}}!', {+ 'name.firstName': 'Ada',+ });++ expect(result.content).toBe('Hi Ada!');+ expect(result.missingTokens).toEqual([]);+ });++ it('should tolerate whitespace inside placeholders', () => {+ const result = renderTemplate('Hi {{ name.firstName }}', {+ 'name.firstName': 'Ada',+ });++ expect(result.content).toBe('Hi Ada');+ });++ it('should render unknown placeholders as empty and report them', () => {+ const result = renderTemplate('Hi {{firstName}} from {{city}}', {+ firstName: 'Ada',+ });++ expect(result.content).toBe('Hi Ada from ');+ expect(result.missingTokens).toEqual(['city']);+ });++ it('should not report the same missing token twice', () => {+ const result = renderTemplate('{{x}} {{x}}', {});++ expect(result.missingTokens).toEqual(['x']);+ });+});diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/generate-document-pdf.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/generate-document-pdf.tsnew file mode 100644index 00000000000..3ea1975e75a--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/generate-document-pdf.ts@@ -0,0 +1,327 @@+import { marked, type Token, type Tokens } from 'marked';+import {+ type PDFFont,+ type PDFPage,+ PDFDocument,+ rgb,+ StandardFonts,+} from 'pdf-lib';++// Renders a document (title + Markdown body) into a marketable, multi-page A4+// PDF using pdf-lib: a coloured header band, real typography, bold/italic runs,+// headings and lists.++const PAGE_WIDTH = 595.28; // A4+const PAGE_HEIGHT = 841.89;+const MARGIN = 64;+const BODY_SIZE = 11;+const LINE_HEIGHT = 16;++const ACCENT = rgb(0.098, 0.38, 0.929); // #1961ED+const INK = rgb(0.06, 0.08, 0.16);+const MUTED = rgb(0.28, 0.31, 0.42);++type Fonts = {+ regular: PDFFont;+ bold: PDFFont;+ italic: PDFFont;+ boldItalic: PDFFont;+ mono: PDFFont;+};++type Ctx = {+ pdf: PDFDocument;+ page: PDFPage;+ y: number;+ fonts: Fonts;+};++type Run = { text: string; bold: boolean; italic: boolean; code: boolean; link: boolean };++// The built-in fonts use WinAnsi encoding and throw on characters they can't+// encode. Map common punctuation and drop anything outside Latin-1 so the PDF+// never fails (HTML surfaces still render the full text). Non-Latin scripts+// (CJK, Arabic, Cyrillic) would need an embedded Unicode font.+const toWinAnsi = (text: string): string =>+ text+ .replace(/[‐-―]/g, '-')+ .replace(/[‘’]/g, "'")+ .replace(/[“”]/g, '"')+ .replace(/…/g, '...')+ .replace(/[^ -~ -ÿ]/g, '');++const pickFont = (fonts: Fonts, run: Run): PDFFont => {+ if (run.code) return fonts.mono;+ if (run.bold && run.italic) return fonts.boldItalic;+ if (run.bold) return fonts.bold;+ if (run.italic) return fonts.italic;+ return fonts.regular;+};++// Flatten marked inline tokens into styled runs.+const toRuns = (+ tokens: Token[] | undefined,+ style: Omit<Run, 'text'>,+): Run[] => {+ if (!tokens) return [];++ return tokens.flatMap((token): Run[] => {+ switch (token.type) {+ case 'strong':+ return toRuns((token as Tokens.Strong).tokens, { ...style, bold: true });+ case 'em':+ return toRuns((token as Tokens.Em).tokens, { ...style, italic: true });+ case 'link':+ return toRuns((token as Tokens.Link).tokens, { ...style, link: true });+ case 'codespan':+ return [{ ...style, code: true, text: (token as Tokens.Codespan).text }];+ case 'br':+ return [{ ...style, text: '\n' }];+ default: {+ // List items (and other block wrappers) expose their inline formatting+ // via nested `.tokens`; recurse so bold/italic inside them still render.+ const nested = (token as Tokens.Text).tokens;+ if (Array.isArray(nested) && nested.length > 0) {+ return toRuns(nested, style);+ }+ const text = (token as Tokens.Text).text ?? (token as { raw?: string }).raw ?? '';+ return text ? [{ ...style, text }] : [];+ }+ }+ });+};++const EMPTY_STYLE = { bold: false, italic: false, code: false, link: false };++const newPage = (ctx: Ctx) => {+ ctx.page = ctx.pdf.addPage([PAGE_WIDTH, PAGE_HEIGHT]);+ ctx.y = PAGE_HEIGHT - MARGIN;+};++const ensureSpace = (ctx: Ctx, needed: number) => {+ if (ctx.y - needed < MARGIN) newPage(ctx);+};++// Word-wraps styled runs across lines, switching font per run, and draws them.+const drawRuns = (+ ctx: Ctx,+ runs: Run[],+ options: { size: number; indent?: number; lineHeight?: number },+) => {+ const { size } = options;+ const indent = options.indent ?? 0;+ const lineHeight = options.lineHeight ?? LINE_HEIGHT;+ const left = MARGIN + indent;+ const maxRight = PAGE_WIDTH - MARGIN;++ type Word = { text: string; font: PDFFont; color: ReturnType<typeof rgb> };+ const words: (Word | 'break')[] = [];+ const lineWidth = maxRight - left;++ // Break a token that is wider than a whole line into chunks that fit, so long+ // URLs or identifiers wrap instead of overflowing the right margin.+ const pushWord = (text: string, font: PDFFont, color: ReturnType<typeof rgb>) => {+ if (text.length <= 1 || font.widthOfTextAtSize(text, size) <= lineWidth) {+ words.push({ text, font, color });+ return;+ }+ let chunk = '';+ for (const char of text) {+ if (chunk !== '' && font.widthOfTextAtSize(chunk + char, size) > lineWidth) {+ words.push({ text: chunk, font, color });+ chunk = char;+ } else {+ chunk += char;+ }+ }+ if (chunk !== '') words.push({ text: chunk, font, color });+ };++ for (const run of runs) {+ const font = pickFont(ctx.fonts, run);+ const color = run.link ? ACCENT : run.code ? MUTED : INK;+ // Split on newlines first: `toWinAnsi` drops the `\n`, so sanitizing before+ // splitting would swallow explicit line breaks.+ const segments = run.text.split('\n');++ segments.forEach((segment, index) => {+ if (index > 0) words.push('break');+ for (const word of toWinAnsi(segment).split(/(\s+)/)) {+ if (word === '') continue;+ if (/^\s+$/.test(word)) {+ words.push({ text: word, font, color });+ } else {+ pushWord(word, font, color);+ }+ }+ });+ }++ ensureSpace(ctx, lineHeight);+ let cursorX = left;++ const wrap = () => {+ ctx.y -= lineHeight;+ ensureSpace(ctx, 0);+ if (ctx.y < MARGIN) newPage(ctx);+ cursorX = left;+ };++ for (const word of words) {+ if (word === 'break') {+ wrap();+ continue;+ }+ const isSpace = /^\s+$/.test(word.text);+ const width = word.font.widthOfTextAtSize(word.text, size);++ if (!isSpace && cursorX + width > maxRight && cursorX > left) {+ wrap();+ }+ if (isSpace && cursorX === left) continue;++ if (!isSpace) {+ ctx.page.drawText(word.text, {+ x: cursorX,+ y: ctx.y,+ size,+ font: word.font,+ color: word.color,+ });+ }+ cursorX += width;+ }++ ctx.y -= lineHeight;+};++const drawBlocks = (ctx: Ctx, tokens: Token[], indent = 0) => {+ for (const token of tokens) {+ switch (token.type) {+ case 'heading': {+ const heading = token as Tokens.Heading;+ const size = heading.depth === 1 ? 18 : heading.depth === 2 ? 15 : 13;+ ctx.y -= 8;+ drawRuns(+ ctx,+ toRuns(heading.tokens, { ...EMPTY_STYLE, bold: true }),+ { size, indent, lineHeight: size + 6 },+ );+ break;+ }+ case 'paragraph': {+ drawRuns(ctx, toRuns((token as Tokens.Paragraph).tokens, EMPTY_STYLE), {+ size: BODY_SIZE,+ indent,+ });+ ctx.y -= 6;+ break;+ }+ case 'list': {+ const list = token as Tokens.List;+ list.items.forEach((item, index) => {+ const marker = list.ordered ? `${(list.start || 1) + index}.` : '•';+ ensureSpace(ctx, LINE_HEIGHT);+ ctx.page.drawText(marker, {+ x: MARGIN + indent + 8,+ y: ctx.y,+ size: BODY_SIZE,+ font: ctx.fonts.regular,+ color: MUTED,+ });+ drawRuns(ctx, toRuns(item.tokens, EMPTY_STYLE), {+ size: BODY_SIZE,+ indent: indent + 28,+ });+ });+ ctx.y -= 6;+ break;+ }+ case 'blockquote': {+ const startPage = ctx.page;+ const startY = ctx.y;+ drawBlocks(ctx, (token as Tokens.Blockquote).tokens, indent + 20);+ const barX = MARGIN + indent;++ // Draw the accent bar on every page the quote occupies. On the first+ // page it starts at `startY`; on later pages at the top margin. It ends+ // at the final position on the last page, and at the bottom margin on+ // earlier pages. Deriving each page's own coordinates avoids the+ // cross-page/negative-height bug of reusing `startY` on a new page.+ const pages = ctx.pdf.getPages();+ const startIndex = pages.indexOf(startPage);+ const endIndex = pages.indexOf(ctx.page);+ for (let index = startIndex; index <= endIndex; index += 1) {+ const barTop = index === startIndex ? startY : PAGE_HEIGHT - MARGIN;+ const barBottom = index === endIndex ? ctx.y : MARGIN;+ if (barTop > barBottom) {+ pages[index].drawRectangle({+ x: barX,+ y: barBottom,+ width: 3,+ height: barTop - barBottom,+ color: ACCENT,+ });+ }+ }+ break;+ }+ case 'code': {+ for (const line of (token as Tokens.Code).text.split('\n')) {+ drawRuns(ctx, [{ ...EMPTY_STYLE, code: true, text: line || ' ' }], {+ size: BODY_SIZE - 1,+ indent: indent + 8,+ lineHeight: 14,+ });+ }+ ctx.y -= 6;+ break;+ }+ case 'hr': {+ ensureSpace(ctx, 20);+ ctx.y -= 8;+ ctx.page.drawLine({+ start: { x: MARGIN, y: ctx.y },+ end: { x: PAGE_WIDTH - MARGIN, y: ctx.y },+ thickness: 1,+ color: rgb(0.9, 0.92, 0.96),+ });+ ctx.y -= 16;+ break;+ }+ case 'space':+ ctx.y -= 8;+ break;+ default: {+ const text = (token as { text?: string }).text;+ if (text) {+ drawRuns(ctx, [{ ...EMPTY_STYLE, text }], { size: BODY_SIZE, indent });+ }+ }+ }+ }+};++export const generateDocumentPdf = async (+ content: string,+): Promise<Uint8Array> => {+ const pdf = await PDFDocument.create();+ const fonts: Fonts = {+ regular: await pdf.embedFont(StandardFonts.Helvetica),+ bold: await pdf.embedFont(StandardFonts.HelveticaBold),+ italic: await pdf.embedFont(StandardFonts.HelveticaOblique),+ boldItalic: await pdf.embedFont(StandardFonts.HelveticaBoldOblique),+ mono: await pdf.embedFont(StandardFonts.Courier),+ };++ const ctx: Ctx = { pdf, page: pdf.addPage([PAGE_WIDTH, PAGE_HEIGHT]), y: 0, fonts };++ // Render the template content only — no title header or footer.+ ctx.y = PAGE_HEIGHT - MARGIN;++ // Match the HTML renderer (breaks: true) so a single newline in a template+ // becomes a line break in the PDF too.+ drawBlocks(ctx, marked.lexer(content, { breaks: true, gfm: true }));++ return pdf.save();+};diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/load-record-values.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/load-record-values.tsnew file mode 100644index 00000000000..211a72d1873--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/load-record-values.ts@@ -0,0 +1,92 @@+import { type CoreApiClient } from 'twenty-client-sdk/core';++import {+ TEMPLATE_TARGET_COMPANY,+ TEMPLATE_TARGET_PERSON,+} from 'src/constants/universal-identifiers';+import { flattenRecord } from 'src/logic-functions/utils/render-template';++export type LoadedRecord = {+ found: boolean;+ displayName: string;+ values: Record<string, string>;+};++// Loads a Person or Company by id and returns its fields flattened into the+// dot-path tokens that templates reference (e.g. `name.firstName`, `jobTitle`).+export const loadRecordValues = async (+ client: CoreApiClient,+ target: string,+ recordId: string,+): Promise<LoadedRecord> => {+ // Filtered list queries (not the singular lookup) so a missing record+ // returns empty instead of throwing, letting the caller answer 404.+ if (target === TEMPLATE_TARGET_COMPANY) {+ const { companies } = await client.query({+ companies: {+ __args: { filter: { id: { eq: recordId } }, first: 1 },+ edges: {+ node: {+ id: true,+ name: true,+ employees: true,+ domainName: { primaryLinkUrl: true },+ address: { addressCity: true, addressCountry: true },+ },+ },+ },+ });++ const company = companies?.edges?.[0]?.node;++ if (!company?.id) {+ return { found: false, displayName: '', values: {} };+ }++ const { id: _id, ...fields } = company;++ return {+ found: true,+ displayName: company.name ?? 'Company',+ values: flattenRecord(fields as Record<string, unknown>),+ };+ }++ const { people } = await client.query({+ people: {+ __args: { filter: { id: { eq: recordId } }, first: 1 },+ edges: {+ node: {+ id: true,+ jobTitle: true,+ city: true,+ name: { firstName: true, lastName: true },+ emails: { primaryEmail: true },+ phones: { primaryPhoneNumber: true },+ linkedinLink: { primaryLinkUrl: true },+ company: { name: true },+ },+ },+ },+ });++ const person = people?.edges?.[0]?.node;++ if (!person?.id) {+ return { found: false, displayName: '', values: {} };+ }++ const { id: _id, ...fields } = person;+ const fullName = [person.name?.firstName, person.name?.lastName]+ .filter(Boolean)+ .join(' ');++ return {+ found: true,+ displayName: fullName.length > 0 ? fullName : 'Person',+ values: flattenRecord(fields as Record<string, unknown>),+ };+};++export const isSupportedTarget = (target: string): boolean =>+ target === TEMPLATE_TARGET_PERSON || target === TEMPLATE_TARGET_COMPANY;diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/render-template.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/render-template.tsnew file mode 100644index 00000000000..ff6ef2817a5--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/render-template.ts@@ -0,0 +1,58 @@+// Flattens a nested record into dot-path keys, e.g.+// { name: { firstName: 'Ada' } } -> { 'name.firstName': 'Ada' }.+// Only string/number/boolean leaves are kept; nullish values become ''.+export const flattenRecord = (+ input: Record<string, unknown>,+ prefix = '',+): Record<string, string> => {+ return Object.entries(input).reduce<Record<string, string>>(+ (accumulator, [key, value]) => {+ const path = prefix ? `${prefix}.${key}` : key;++ if (value === null || value === undefined) {+ accumulator[path] = '';+ } else if (typeof value === 'object' && !Array.isArray(value)) {+ Object.assign(+ accumulator,+ flattenRecord(value as Record<string, unknown>, path),+ );+ } else if (typeof value !== 'object') {+ accumulator[path] = String(value);+ }++ return accumulator;+ },+ {},+ );+};++const PLACEHOLDER_PATTERN = /\{\{\s*([\w.]+)\s*\}\}/g;++export type RenderResult = {+ content: string;+ missingTokens: string[];+};++// Replaces every {{token}} in the template body with the matching value from+// the flattened record. Unknown tokens are rendered empty and reported so the+// caller can warn the user about placeholders that did not resolve.+export const renderTemplate = (+ body: string,+ values: Record<string, string>,+): RenderResult => {+ const missingTokens = new Set<string>();++ const content = body.replace(PLACEHOLDER_PATTERN, (_match, token: string) => {+ const value = values[token];++ if (value === undefined || value === '') {+ missingTokens.add(token);++ return '';+ }++ return value;+ });++ return { content, missingTokens: [...missingTokens] };+};diff --git a/packages/twenty-apps/examples/document-generator/src/logic-functions/view-document.ts b/packages/twenty-apps/examples/document-generator/src/logic-functions/view-document.tsnew file mode 100644index 00000000000..be0ae88fc80--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/logic-functions/view-document.ts@@ -0,0 +1,64 @@+import { CoreApiClient } from 'twenty-client-sdk/core';+import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';+import { Response } from 'twenty-sdk/logic-function';++import { VIEW_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';+import { documentHtmlPage } from 'src/utils/render-document';++const htmlResponse = (html: string, status = 200): Response =>+ new Response(html, {+ status,+ headers: { 'Content-Type': 'text/html; charset=utf-8' },+ });++// Renders a generated document as a standalone, printable web page.+// Open it at: <server>/s/documents/view?id=<documentId>+const handler = async (event: RoutePayload): Promise<Response> => {+ const documentId = event.queryStringParameters?.id;++ if (!documentId) {+ return htmlResponse(+ documentHtmlPage('Missing document id', 'Provide ?id=<documentId>.'),+ 400,+ );+ }++ const client = new CoreApiClient();++ // Filtered list query so an unknown id renders a clean 404 page instead of+ // throwing.+ const { documents } = await client.query({+ documents: {+ __args: { filter: { id: { eq: documentId } }, first: 1 },+ edges: {+ node: { id: true, name: true, content: true },+ },+ },+ });++ const document = documents?.edges?.[0]?.node;++ if (!document?.id) {+ return htmlResponse(+ documentHtmlPage('Document not found', `No document with id ${documentId}.`),+ 404,+ );+ }++ return htmlResponse(+ documentHtmlPage(document.name ?? 'Document', document.content ?? ''),+ );+};++export default defineLogicFunction({+ universalIdentifier: VIEW_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER,+ name: 'view-document',+ description: 'Renders a generated document as a printable HTML page.',+ timeoutSeconds: 15,+ handler,+ httpRouteTriggerSettings: {+ path: '/documents/view',+ httpMethod: 'GET',+ isAuthRequired: false,+ },+});diff --git a/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/documents.navigation-menu-item.ts b/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/documents.navigation-menu-item.tsnew file mode 100644index 00000000000..6878f2142f1--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/documents.navigation-menu-item.ts@@ -0,0 +1,19 @@+import {+ defineNavigationMenuItem,+ NavigationMenuItemType,+} from 'twenty-sdk/define';++import {+ DOCUMENTS_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER,+ DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default defineNavigationMenuItem({+ universalIdentifier: DOCUMENTS_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER,+ name: 'Documents',+ icon: 'IconFile',+ color: 'green',+ position: 1,+ type: NavigationMenuItemType.VIEW,+ viewUniversalIdentifier: DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+});diff --git a/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/templates.navigation-menu-item.ts b/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/templates.navigation-menu-item.tsnew file mode 100644index 00000000000..d878feb1804--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/navigation-menu-items/templates.navigation-menu-item.ts@@ -0,0 +1,19 @@+import {+ defineNavigationMenuItem,+ NavigationMenuItemType,+} from 'twenty-sdk/define';++import {+ TEMPLATES_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER,+ TEMPLATES_VIEW_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default defineNavigationMenuItem({+ universalIdentifier: TEMPLATES_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER,+ name: 'Templates',+ icon: 'IconFileText',+ color: 'blue',+ position: 0,+ type: NavigationMenuItemType.VIEW,+ viewUniversalIdentifier: TEMPLATES_VIEW_UNIVERSAL_IDENTIFIER,+});diff --git a/packages/twenty-apps/examples/document-generator/src/objects/document-template.object.ts b/packages/twenty-apps/examples/document-generator/src/objects/document-template.object.tsnew file mode 100644index 00000000000..083faae8565--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/objects/document-template.object.ts@@ -0,0 +1,69 @@+import { defineObject, FieldType } from 'twenty-sdk/define';++import {+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATE_TARGET_OPTION_COMPANY_UNIVERSAL_IDENTIFIER,+ TEMPLATE_TARGET_OPTION_PERSON_UNIVERSAL_IDENTIFIER,+ TEMPLATE_TARGET_COMPANY,+ TEMPLATE_TARGET_PERSON,+} from 'src/constants/universal-identifiers';++export default defineObject({+ universalIdentifier: DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ nameSingular: 'documentTemplate',+ namePlural: 'documentTemplates',+ labelSingular: 'Document template',+ labelPlural: 'Document templates',+ description:+ 'A reusable document with placeholders like {{name.firstName}} that get filled from a CRM record.',+ icon: 'IconFileText',+ labelIdentifierFieldMetadataUniversalIdentifier:+ TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fields: [+ {+ universalIdentifier: TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.TEXT,+ name: 'name',+ label: 'Name',+ description: 'Template name, e.g. "Sales proposal".',+ icon: 'IconAbc',+ },+ {+ universalIdentifier: TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.RICH_TEXT,+ name: 'body',+ label: 'Body',+ description:+ 'Template edited with the rich-text editor. Type {{placeholders}} such as {{name.firstName}} or {{jobTitle}}; they are replaced with values from the selected record when a document is generated.',+ icon: 'IconFileText',+ },+ {+ universalIdentifier: TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.SELECT,+ name: 'target',+ label: 'Target',+ description: 'Which kind of CRM record this template is written for.',+ icon: 'IconTarget',+ defaultValue: `'${TEMPLATE_TARGET_PERSON}'`,+ options: [+ {+ id: TEMPLATE_TARGET_OPTION_PERSON_UNIVERSAL_IDENTIFIER,+ value: TEMPLATE_TARGET_PERSON,+ label: 'Person',+ color: 'blue',+ position: 0,+ },+ {+ id: TEMPLATE_TARGET_OPTION_COMPANY_UNIVERSAL_IDENTIFIER,+ value: TEMPLATE_TARGET_COMPANY,+ label: 'Company',+ color: 'green',+ position: 1,+ },+ ],+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/src/objects/document.object.ts b/packages/twenty-apps/examples/document-generator/src/objects/document.object.tsnew file mode 100644index 00000000000..875b66e6de6--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/objects/document.object.ts@@ -0,0 +1,77 @@+import { defineObject, FieldType } from 'twenty-sdk/define';++import {+ DOCUMENT_CONTENT_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_STATUS_DRAFT,+ DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_STATUS_GENERATED,+ DOCUMENT_STATUS_OPTION_DRAFT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_STATUS_OPTION_GENERATED_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default defineObject({+ universalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ nameSingular: 'document',+ namePlural: 'documents',+ labelSingular: 'Document',+ labelPlural: 'Documents',+ description: 'A generated document produced from a template and a CRM record.',+ icon: 'IconFile',+ labelIdentifierFieldMetadataUniversalIdentifier:+ DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fields: [+ {+ universalIdentifier: DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.TEXT,+ name: 'name',+ label: 'Name',+ description: 'Document name.',+ icon: 'IconAbc',+ },+ {+ universalIdentifier: DOCUMENT_CONTENT_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.TEXT,+ name: 'content',+ label: 'Content',+ description: 'The rendered document text, with all placeholders filled.',+ icon: 'IconFileText',+ },+ {+ universalIdentifier: DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.SELECT,+ name: 'status',+ label: 'Status',+ description: 'Where this document is in its lifecycle.',+ icon: 'IconProgress',+ defaultValue: `'${DOCUMENT_STATUS_DRAFT}'`,+ options: [+ {+ id: DOCUMENT_STATUS_OPTION_DRAFT_UNIVERSAL_IDENTIFIER,+ value: DOCUMENT_STATUS_DRAFT,+ label: 'Draft',+ color: 'gray',+ position: 0,+ },+ {+ id: DOCUMENT_STATUS_OPTION_GENERATED_UNIVERSAL_IDENTIFIER,+ value: DOCUMENT_STATUS_GENERATED,+ label: 'Generated',+ color: 'green',+ position: 1,+ },+ ],+ },+ {+ universalIdentifier: DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.FILES,+ name: 'file',+ label: 'File',+ description: 'The generated document as a downloadable PDF.',+ icon: 'IconFileTypePdf',+ universalSettings: { maxNumberOfValues: 1 },+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/src/page-layouts/document-record.page-layout.ts b/packages/twenty-apps/examples/document-generator/src/page-layouts/document-record.page-layout.tsnew file mode 100644index 00000000000..fa3479933f5--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/page-layouts/document-record.page-layout.ts@@ -0,0 +1,61 @@+import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';++import {+ DOCUMENT_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ DOCUMENT_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ DOCUMENT_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// A "Fields" tab so the record's own fields always render, plus a "Preview" tab+// that renders the styled document via the document-viewer front component. An+// app-defined record page replaces the object's default layout, so it must+// carry its own fields tab or the record shows "No Data".+export default definePageLayout({+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER,+ name: 'Document record page',+ type: 'RECORD_PAGE',+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ tabs: [+ {+ universalIdentifier: DOCUMENT_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Fields',+ position: 0,+ icon: 'IconList',+ layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,+ widgets: [+ {+ universalIdentifier:+ DOCUMENT_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Document fields',+ type: 'FIELDS',+ configuration: {+ configurationType: 'FIELDS',+ },+ },+ ],+ },+ {+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Preview',+ position: 50,+ icon: 'IconEye',+ layoutMode: PageLayoutTabLayoutMode.CANVAS,+ widgets: [+ {+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Document preview',+ type: 'FRONT_COMPONENT',+ configuration: {+ configurationType: 'FRONT_COMPONENT',+ frontComponentUniversalIdentifier:+ DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ },+ },+ ],+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/src/page-layouts/template-record.page-layout.ts b/packages/twenty-apps/examples/document-generator/src/page-layouts/template-record.page-layout.tsnew file mode 100644index 00000000000..3e49a2f8542--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/page-layouts/template-record.page-layout.ts@@ -0,0 +1,76 @@+import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';++import {+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATE_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ TEMPLATE_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ TEMPLATE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ TEMPLATE_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ TIMELINE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ TIMELINE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default definePageLayout({+ universalIdentifier: TEMPLATE_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER,+ name: 'Template record page',+ type: 'RECORD_PAGE',+ objectUniversalIdentifier: DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ tabs: [+ {+ universalIdentifier: TEMPLATE_FIELDS_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Fields',+ position: 0,+ icon: 'IconList',+ layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,+ widgets: [+ {+ universalIdentifier:+ TEMPLATE_FIELDS_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Fields',+ type: 'FIELDS',+ configuration: {+ configurationType: 'FIELDS',+ },+ },+ ],+ },+ {+ layoutMode: PageLayoutTabLayoutMode.GRID,+ position: 1,+ title: 'Template',+ universalIdentifier: TEMPLATE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ widgets: [+ {+ universalIdentifier: TEMPLATE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Template',+ type: 'FIELD',+ gridPosition: { row: 0, column: 0, rowSpan: 12, columnSpan: 12 },+ configuration: {+ configurationType: 'FIELD',+ fieldMetadataId: TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ fieldDisplayMode: 'EDITOR',+ },+ },+ ],+ },+ {+ universalIdentifier: TIMELINE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Timeline',+ position: 100,+ icon: 'IconTimelineEvent',+ layoutMode: PageLayoutTabLayoutMode.CANVAS,+ widgets: [+ {+ universalIdentifier: TIMELINE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Timeline',+ type: 'TIMELINE',+ configuration: {+ configurationType: 'TIMELINE',+ },+ },+ ],+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/src/roles/default-role.ts b/packages/twenty-apps/examples/document-generator/src/roles/default-role.tsnew file mode 100644index 00000000000..1520b82dcd1--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/roles/default-role.ts@@ -0,0 +1,22 @@+import { defineApplicationRole, SystemPermissionFlag } from 'twenty-sdk/define';++import {+ APP_DISPLAY_NAME,+ DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++// The role the app's logic functions and agent run as. Scoped to least+// privilege: it reads templates and CRM records, creates documents, and uploads+// the generated PDF — it never deletes records, so delete capabilities stay off.+export default defineApplicationRole({+ universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,+ label: `${APP_DISPLAY_NAME} default role`,+ description: `${APP_DISPLAY_NAME} default role`,+ canReadAllObjectRecords: true,+ canUpdateAllObjectRecords: true,+ canSoftDeleteAllObjectRecords: false,+ canDestroyAllObjectRecords: false,+ canAccessAllTools: true,+ canBeAssignedToAgents: true,+ permissionFlagUniversalIdentifiers: [SystemPermissionFlag.UPLOAD_FILE],+});diff --git a/packages/twenty-apps/examples/document-generator/src/skills/document-drafting.skill.ts b/packages/twenty-apps/examples/document-generator/src/skills/document-drafting.skill.tsnew file mode 100644index 00000000000..494760e2672--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/skills/document-drafting.skill.ts@@ -0,0 +1,24 @@+import { defineSkill } from 'twenty-sdk/define';++import { DOCUMENT_SKILL_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';++export default defineSkill({+ universalIdentifier: DOCUMENT_SKILL_UNIVERSAL_IDENTIFIER,+ name: 'document-drafting',+ label: 'Document drafting',+ description: 'Knows how to turn templates and CRM records into documents.',+ icon: 'IconFileText',+ content: [+ 'You help users generate documents from templates.',+ '',+ 'To generate a document, call the `generate-document` tool with:',+ '- `templateId`: the id of the document template to use.',+ '- `recordId`: the id of the Person or Company the document is for.',+ '',+ 'Guidelines:',+ '- If the user names a template or a person/company instead of an id, first find the matching record, then pass its id.',+ '- If more than one record matches the name, list the candidates and ask the user to pick one before generating — never guess.',+ '- Make sure the template target (person or company) matches the record type.',+ '- After generating, report the document name and share that it can be opened from the Documents view.',+ ].join('\n'),+});diff --git a/packages/twenty-apps/examples/document-generator/src/utils/__tests__/render-document.test.ts b/packages/twenty-apps/examples/document-generator/src/utils/__tests__/render-document.test.tsnew file mode 100644index 00000000000..053125e6237--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/utils/__tests__/render-document.test.ts@@ -0,0 +1,56 @@+import { describe, expect, it } from 'vitest';++import { documentContentToHtml, documentHtmlPage } from '../render-document';++describe('documentContentToHtml', () => {+ it('should render markdown to html', () => {+ const html = documentContentToHtml('# Hi\n\n**bold** and a list:\n\n- one\n- two');++ expect(html).toContain('<h1>Hi</h1>');+ expect(html).toContain('<strong>bold</strong>');+ expect(html).toContain('<li>one</li>');+ });++ it('should drop raw html to prevent injection', () => {+ const html = documentContentToHtml('Hello <script>alert(1)</script>');++ expect(html).not.toContain('<script>');+ });++ it('should neutralize unsafe link protocols', () => {+ const html = documentContentToHtml('[x](javascript:alert(1))');++ expect(html).not.toContain('javascript:');+ });++ it('should drop images so no external <img> is emitted', () => {+ const html = documentContentToHtml('');++ expect(html).not.toContain('<img');+ expect(html).not.toContain('evil.example');+ });++ it('should escape link href and text', () => {+ const html = documentContentToHtml('[a"b](https://example.com/?x="y"&z=1)');++ expect(html).not.toContain('="y"');+ expect(html).toContain('"');+ expect(html).toContain('&');+ });+});++describe('documentHtmlPage', () => {+ it('should wrap content in a titled, styled page', () => {+ const page = documentHtmlPage('Proposal', 'Body text');++ expect(page).toContain('<!doctype html>');+ expect(page).toContain('<title>Proposal</title>');+ expect(page).toContain('doc-paper');+ });++ it('should escape the title', () => {+ const page = documentHtmlPage('<script>', 'x');++ expect(page).toContain('<script>');+ });+});diff --git a/packages/twenty-apps/examples/document-generator/src/utils/markdown-to-react.tsx b/packages/twenty-apps/examples/document-generator/src/utils/markdown-to-react.tsxnew file mode 100644index 00000000000..2dee991e45f--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/utils/markdown-to-react.tsx@@ -0,0 +1,161 @@+import { type CSSProperties, type ReactNode } from 'react';+import { marked, type Token, type Tokens } from 'marked';++// Front components run in a remote-DOM sandbox: raw HTML injection is not+// allowed, so Markdown is rendered as real React elements with inline styles.++const INK = '#1f2430';+const HEADING = '#10152a';+const ACCENT = '#1961ed';++const styles: Record<string, CSSProperties> = {+ h1: { fontSize: '22px', fontWeight: 700, color: HEADING, margin: '28px 0 12px', lineHeight: 1.3 },+ h2: { fontSize: '18px', fontWeight: 700, color: HEADING, margin: '24px 0 10px', lineHeight: 1.3 },+ h3: { fontSize: '15px', fontWeight: 700, color: HEADING, margin: '20px 0 8px', lineHeight: 1.3 },+ p: { margin: '0 0 14px', lineHeight: 1.7, color: INK },+ ul: { margin: '0 0 14px', paddingLeft: '22px' },+ ol: { margin: '0 0 14px', paddingLeft: '22px' },+ li: { margin: '4px 0', lineHeight: 1.6, color: INK },+ a: { color: ACCENT, textDecoration: 'none' },+ code: {+ fontFamily: "'SFMono-Regular', Menlo, monospace",+ fontSize: '0.9em',+ background: '#f1f3f9',+ padding: '2px 6px',+ borderRadius: '4px',+ },+ blockquote: {+ margin: '14px 0',+ padding: '4px 18px',+ borderLeft: `3px solid ${ACCENT}`,+ background: '#f6f8fd',+ color: '#47506a',+ },+ hr: { border: 0, borderTop: '1px solid #e6e9f2', margin: '24px 0' },+ pre: {+ background: '#f1f3f9',+ padding: '14px 16px',+ borderRadius: '6px',+ overflowX: 'auto',+ fontFamily: "'SFMono-Regular', Menlo, monospace",+ fontSize: '12px',+ lineHeight: 1.5,+ margin: '0 0 14px',+ },+};++const BLOCK_TOKEN_TYPES = new Set([+ 'list',+ 'paragraph',+ 'code',+ 'blockquote',+ 'heading',+ 'hr',+ 'space',+]);++const renderInline = (tokens: Token[] | undefined, keyPrefix: string): ReactNode[] => {+ if (!tokens) return [];++ return tokens.map((token, index): ReactNode => {+ const key = `${keyPrefix}-${index}`;+ switch (token.type) {+ case 'strong':+ return <strong key={key}>{renderInline((token as Tokens.Strong).tokens, key)}</strong>;+ case 'em':+ return <em key={key}>{renderInline((token as Tokens.Em).tokens, key)}</em>;+ case 'codespan':+ return <code key={key} style={styles.code}>{(token as Tokens.Codespan).text}</code>;+ case 'br':+ return <br key={key} />;+ case 'link': {+ const link = token as Tokens.Link;+ const safe = /^(https?:|mailto:)/i.test(link.href ?? '');+ return safe ? (+ <a key={key} href={link.href} style={styles.a} target="_blank" rel="noopener noreferrer">+ {renderInline(link.tokens, key)}+ </a>+ ) : (+ <span key={key}>{renderInline(link.tokens, key)}</span>+ );+ }+ default: {+ const nested = (token as Tokens.Text).tokens;+ if (Array.isArray(nested) && nested.length > 0) {+ return <span key={key}>{renderInline(nested, key)}</span>;+ }+ return <span key={key}>{(token as Tokens.Text).text ?? ''}</span>;+ }+ }+ });+};++const renderBlocks = (tokens: Token[]): ReactNode[] =>+ tokens.map((token, index): ReactNode => {+ const key = `b-${index}`;+ switch (token.type) {+ case 'heading': {+ const heading = token as Tokens.Heading;+ const Tag = (['h1', 'h2', 'h3', 'h3'][heading.depth - 1] ?? 'h3') as 'h1' | 'h2' | 'h3';+ return (+ <Tag key={key} style={styles[Tag]}>+ {renderInline(heading.tokens, key)}+ </Tag>+ );+ }+ case 'paragraph':+ return <p key={key} style={styles.p}>{renderInline((token as Tokens.Paragraph).tokens, key)}</p>;+ case 'list': {+ const list = token as Tokens.List;+ const items = list.items.map((item, itemIndex) => {+ // List items can hold block-level tokens (nested lists, extra+ // paragraphs, code). Render those as blocks; keep simple items inline.+ const hasBlock = item.tokens?.some((child) => BLOCK_TOKEN_TYPES.has(child.type));+ return (+ <li key={`${key}-${itemIndex}`} style={styles.li}>+ {hasBlock+ ? renderBlocks(item.tokens)+ : renderInline(item.tokens, `${key}-${itemIndex}`)}+ </li>+ );+ });+ return list.ordered ? (+ <ol key={key} style={styles.ol}>{items}</ol>+ ) : (+ <ul key={key} style={styles.ul}>{items}</ul>+ );+ }+ case 'blockquote':+ return (+ <blockquote key={key} style={styles.blockquote}>+ {renderBlocks((token as Tokens.Blockquote).tokens)}+ </blockquote>+ );+ case 'code':+ return <pre key={key} style={styles.pre}>{(token as Tokens.Code).text}</pre>;+ case 'hr':+ return <hr key={key} style={styles.hr} />;+ case 'space':+ return null;+ case 'text': {+ // Loose list items expose their content as a `text` block token with+ // nested inline tokens — render those so bold/italic/links survive.+ const textToken = token as Tokens.Text;+ return (+ <span key={key}>+ {textToken.tokens+ ? renderInline(textToken.tokens, key)+ : textToken.text}+ </span>+ );+ }+ default: {+ const text = (token as { text?: string }).text;+ return text ? <p key={key} style={styles.p}>{text}</p> : null;+ }+ }+ });++export const Markdown = ({ content }: { content: string }): ReactNode => (+ <div>{renderBlocks(marked.lexer(content))}</div>+);diff --git a/packages/twenty-apps/examples/document-generator/src/utils/render-document.ts b/packages/twenty-apps/examples/document-generator/src/utils/render-document.tsnew file mode 100644index 00000000000..c0cb3edc7fd--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/utils/render-document.ts@@ -0,0 +1,108 @@+import { Marked } from 'marked';++// A Markdown renderer hardened for untrusted template content: raw HTML is+// dropped and only http(s)/mailto links survive, so the output is safe to+// inject into the page or the front-end viewer.+const escapeHtml = (value: string): string =>+ value+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>')+ .replace(/"/g, '"');++const markdown = new Marked({ async: false, gfm: true, breaks: true });++markdown.use({+ renderer: {+ html() {+ return '';+ },+ // Drop images entirely — they would emit <img> tags pointing at arbitrary+ // external URLs, which the "no raw HTML" contract is meant to prevent.+ image() {+ return '';+ },+ link({ href, text }: { href: string; text: string }) {+ const isSafe = /^(https?:|mailto:)/i.test(href ?? '');+ // Escape both values: href lands in an attribute and text in element+ // content, so unescaped input would otherwise inject markup.+ const safeText = escapeHtml(text ?? '');++ return isSafe+ ? `<a href="${escapeHtml(href)}" target="_blank" rel="noopener noreferrer">${safeText}</a>`+ : safeText;+ },+ },+});++export const documentContentToHtml = (content: string): string =>+ markdown.parse(content) as string;++// The "paper" styling only (no `body` rules), so it is safe to inject inside a+// front component without leaking styles onto the host page.+export const DOCUMENT_PAPER_CSS = `+ .doc-paper {+ color: #1f2430;+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;+ line-height: 1.7;+ max-width: 720px;+ margin: 48px auto;+ background: #ffffff;+ border-radius: 10px;+ box-shadow: 0 10px 40px rgba(24, 39, 75, 0.08);+ overflow: hidden;+ }+ .doc-body { padding: 64px 72px 72px; }+ .doc-body h1, .doc-body h2, .doc-body h3 { color: #10152a; line-height: 1.3; margin: 32px 0 12px; }+ .doc-body h1 { font-size: 24px; } .doc-body h2 { font-size: 20px; } .doc-body h3 { font-size: 16px; }+ .doc-body p { margin: 0 0 16px; }+ .doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 24px; }+ .doc-body li { margin: 4px 0; }+ .doc-body a { color: #1961ed; text-decoration: none; }+ .doc-body a:hover { text-decoration: underline; }+ .doc-body blockquote {+ margin: 16px 0; padding: 4px 20px; border-left: 3px solid #1961ed;+ color: #47506a; background: #f6f8fd;+ }+ .doc-body code {+ font-family: 'SFMono-Regular', Menlo, monospace; font-size: 0.9em;+ background: #f1f3f9; padding: 2px 6px; border-radius: 4px;+ }+ .doc-body hr { border: 0; border-top: 1px solid #e6e9f2; margin: 32px 0; }+ @media print {+ body { background: #fff; }+ .doc-paper { box-shadow: none; margin: 0; border-radius: 0; max-width: none; }+ }+`;++// Inner markup for the styled "paper": renders the template content only, with+// no title header or footer chrome.+export const documentPaperHtml = (content: string): string =>+ `<article class="doc-paper">+ <div class="doc-body">+ ${documentContentToHtml(content)}+ </div>+ </article>`;++const PAGE_BODY_CSS = `+ :root { color-scheme: light; }+ * { box-sizing: border-box; }+ body {+ margin: 0; background: #eef1f6;+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;+ }+`;++// A complete, printable HTML page for the public view route.+export const documentHtmlPage = (title: string, content: string): string => `<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>${escapeHtml(title)}</title>+ <style>${PAGE_BODY_CSS}${DOCUMENT_PAPER_CSS}</style>+ </head>+ <body>+ ${documentPaperHtml(content)}+ </body>+</html>`;diff --git a/packages/twenty-apps/examples/document-generator/src/views/documents.view.ts b/packages/twenty-apps/examples/document-generator/src/views/documents.view.tsnew file mode 100644index 00000000000..260d3fc5323--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/views/documents.view.ts@@ -0,0 +1,47 @@+import { defineView, ViewKey } from 'twenty-sdk/define';++import {+ DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENTS_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENTS_VIEW_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENTS_VIEW_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default defineView({+ universalIdentifier: DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+ name: 'All documents',+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ icon: 'IconFile',+ key: ViewKey.INDEX,+ position: 0,+ fields: [+ {+ universalIdentifier: DOCUMENTS_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier:+ DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ position: 0,+ isVisible: true,+ size: 280,+ },+ {+ universalIdentifier: DOCUMENTS_VIEW_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier:+ DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ position: 1,+ isVisible: true,+ size: 120,+ },+ {+ universalIdentifier: DOCUMENTS_VIEW_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier:+ DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ position: 2,+ isVisible: true,+ size: 200,+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/src/views/templates.view.ts b/packages/twenty-apps/examples/document-generator/src/views/templates.view.tsnew file mode 100644index 00000000000..d32feca6d19--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/src/views/templates.view.ts@@ -0,0 +1,37 @@+import { defineView, ViewKey } from 'twenty-sdk/define';++import {+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATES_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATES_VIEW_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ TEMPLATES_VIEW_UNIVERSAL_IDENTIFIER,+} from 'src/constants/universal-identifiers';++export default defineView({+ universalIdentifier: TEMPLATES_VIEW_UNIVERSAL_IDENTIFIER,+ name: 'All templates',+ objectUniversalIdentifier: DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ icon: 'IconFileText',+ key: ViewKey.INDEX,+ position: 0,+ fields: [+ {+ universalIdentifier: TEMPLATES_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier:+ TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ position: 0,+ isVisible: true,+ size: 240,+ },+ {+ universalIdentifier: TEMPLATES_VIEW_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier:+ TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ position: 1,+ isVisible: true,+ size: 140,+ },+ ],+});diff --git a/packages/twenty-apps/examples/document-generator/tsconfig.json b/packages/twenty-apps/examples/document-generator/tsconfig.jsonnew file mode 100644index 00000000000..abacf4dcf6d--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/tsconfig.json@@ -0,0 +1,42 @@+{+ "compileOnSave": false,+ "compilerOptions": {+ "sourceMap": true,+ "declaration": true,+ "outDir": "./dist",+ "rootDir": ".",+ "jsx": "react-jsx",+ "moduleResolution": "bundler",+ "allowSyntheticDefaultImports": true,+ "emitDecoratorMetadata": true,+ "experimentalDecorators": true,+ "importHelpers": true,+ "allowUnreachableCode": false,+ "strict": true,+ "alwaysStrict": true,+ "noImplicitAny": true,+ "strictBindCallApply": false,+ "target": "es2020",+ "module": "esnext",+ "lib": ["es2020", "dom"],+ "skipLibCheck": true,+ "skipDefaultLibCheck": true,+ "resolveJsonModule": true,+ "paths": {+ "src/*": ["./src/*"],+ "~/*": ["./*"]+ }+ },+ "exclude": [+ "node_modules",+ "dist",+ "**/*.test.ts",+ "**/*.spec.ts",+ "**/*.integration-test.ts"+ ],+ "references": [+ {+ "path": "./tsconfig.spec.json"+ }+ ]+}diff --git a/packages/twenty-apps/examples/document-generator/tsconfig.spec.json b/packages/twenty-apps/examples/document-generator/tsconfig.spec.jsonnew file mode 100644index 00000000000..ea69a6c0105--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/tsconfig.spec.json@@ -0,0 +1,9 @@+{+ "extends": "./tsconfig.json",+ "compilerOptions": {+ "composite": true,+ "types": ["vitest/globals", "node"]+ },+ "include": ["src/**/*.ts", "src/**/*.tsx"],+ "exclude": ["node_modules", "dist"]+}diff --git a/packages/twenty-apps/examples/document-generator/vitest.config.ts b/packages/twenty-apps/examples/document-generator/vitest.config.tsnew file mode 100644index 00000000000..055af77dbec--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/vitest.config.ts@@ -0,0 +1,31 @@+import tsconfigPaths from 'vite-tsconfig-paths';+import { defineConfig } from 'vitest/config';++const TWENTY_API_URL = process.env.TWENTY_API_URL ?? 'http://localhost:2020';+const TWENTY_API_KEY =+ process.env.TWENTY_API_KEY ??+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyMDIwMjAyMC0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJ0eXBlIjoiQVBJX0tFWSIsIndvcmtzcGFjZUlkIjoiMjAyMDIwMjAtMWMyNS00ZDAyLWJmMjUtNmFlY2NmN2VhNDE5IiwiaWF0IjoxNzM1Njg5NjAwLCJleHAiOjQ4OTE0NDk2MDAsImp0aSI6IjIwMjAyMDIwLWY0MDEtNGQ4YS1hNzMxLTY0ZDAwN2MyN2JhZCJ9.bfQjfyN0NEtTCLE_xPyNcwonDzlSXFoP8kdCQTdnuDc';++// Make env vars available to globalSetup (test.env only applies to workers)+process.env.TWENTY_API_URL = TWENTY_API_URL;+process.env.TWENTY_API_KEY = TWENTY_API_KEY;++export default defineConfig({+ plugins: [+ tsconfigPaths({+ projects: ['tsconfig.spec.json'],+ ignoreConfigErrors: true,+ }),+ ],+ test: {+ testTimeout: 120_000,+ hookTimeout: 120_000,+ fileParallelism: false,+ include: ['src/**/*.integration-test.ts'],+ globalSetup: ['src/__tests__/global-setup.ts'],+ env: {+ TWENTY_API_URL,+ TWENTY_API_KEY,+ },+ },+});diff --git a/packages/twenty-apps/examples/document-generator/vitest.unit.config.ts b/packages/twenty-apps/examples/document-generator/vitest.unit.config.tsnew file mode 100644index 00000000000..e0d140015bb--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/vitest.unit.config.ts@@ -0,0 +1,14 @@+import tsconfigPaths from 'vite-tsconfig-paths';+import { defineConfig } from 'vitest/config';++export default defineConfig({+ plugins: [+ tsconfigPaths({+ projects: ['tsconfig.spec.json'],+ ignoreConfigErrors: true,+ }),+ ],+ test: {+ include: ['src/**/*.test.ts'],+ },+});diff --git a/packages/twenty-apps/examples/document-generator/yarn.lock b/packages/twenty-apps/examples/document-generator/yarn.locknew file mode 100644index 00000000000..b06e0e8338c--- /dev/null+++ b/packages/twenty-apps/examples/document-generator/yarn.lock@@ -0,0 +1,3289 @@+# This file is generated by running "yarn install" inside your project.+# Manual changes might be lost - proceed with caution!++__metadata:+ version: 8+ cacheKey: 10c0++"@alcalzone/ansi-tokenize@npm:^0.2.4":+ version: 0.2.5+ resolution: "@alcalzone/ansi-tokenize@npm:0.2.5"+ dependencies:+ ansi-styles: "npm:^6.2.1"+ is-fullwidth-code-point: "npm:^5.0.0"+ checksum: 10c0/dd8622288426b5b7dbf8b68d51d4b930cea591d0e3b9dbc3f523131464d78ac922c165fcb7ba5307f133d35dbcaa0e6648a1c3fb6a0dc2725546d6f867b70af4+ languageName: node+ linkType: hard++"@emnapi/core@npm:1.11.1":+ version: 1.11.1+ resolution: "@emnapi/core@npm:1.11.1"+ dependencies:+ "@emnapi/wasi-threads": "npm:1.2.2"+ tslib: "npm:^2.4.0"+ checksum: 10c0/2c6defdac2d1d26090384655d7d6c9614fa553853b1760597686749e9375dc2aa0dae80a2615b81c254600f5d531d07d8466cde0d331a8caae64b93f3ca5937e+ languageName: node+ linkType: hard++"@emnapi/runtime@npm:1.11.1, @emnapi/runtime@npm:^1.7.0":+ version: 1.11.1+ resolution: "@emnapi/runtime@npm:1.11.1"+ dependencies:+ tslib: "npm:^2.4.0"+ checksum: 10c0/04332fb62076afc440aa23316c04bec42f584ca8b074e5507d08e2b33a47cbe0493b1aadb8f3c1057b64ae1e17f5bde1a7bc37f7facc9d0bc25c18197cbd366f+ languageName: node+ linkType: hard++"@emnapi/wasi-threads@npm:1.2.2":+ version: 1.2.2+ resolution: "@emnapi/wasi-threads@npm:1.2.2"+ dependencies:+ tslib: "npm:^2.4.0"+ checksum: 10c0/f0dc8269d6b20ae5a7c7b36e7a6a333452009d461038ef4febb29da2f3f78c1e2b1576d7e8970a5c5789ed3caedc1f80f5b0c2a5373bdaf8d03b20432bb55747+ languageName: node+ linkType: hard++"@esbuild/aix-ppc64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/aix-ppc64@npm:0.28.1"+ conditions: os=aix & cpu=ppc64+ languageName: node+ linkType: hard++"@esbuild/android-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/android-arm64@npm:0.28.1"+ conditions: os=android & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/android-arm@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/android-arm@npm:0.28.1"+ conditions: os=android & cpu=arm+ languageName: node+ linkType: hard++"@esbuild/android-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/android-x64@npm:0.28.1"+ conditions: os=android & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/darwin-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/darwin-arm64@npm:0.28.1"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/darwin-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/darwin-x64@npm:0.28.1"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/freebsd-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/freebsd-arm64@npm:0.28.1"+ conditions: os=freebsd & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/freebsd-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/freebsd-x64@npm:0.28.1"+ conditions: os=freebsd & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/linux-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-arm64@npm:0.28.1"+ conditions: os=linux & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/linux-arm@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-arm@npm:0.28.1"+ conditions: os=linux & cpu=arm+ languageName: node+ linkType: hard++"@esbuild/linux-ia32@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-ia32@npm:0.28.1"+ conditions: os=linux & cpu=ia32+ languageName: node+ linkType: hard++"@esbuild/linux-loong64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-loong64@npm:0.28.1"+ conditions: os=linux & cpu=loong64+ languageName: node+ linkType: hard++"@esbuild/linux-mips64el@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-mips64el@npm:0.28.1"+ conditions: os=linux & cpu=mips64el+ languageName: node+ linkType: hard++"@esbuild/linux-ppc64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-ppc64@npm:0.28.1"+ conditions: os=linux & cpu=ppc64+ languageName: node+ linkType: hard++"@esbuild/linux-riscv64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-riscv64@npm:0.28.1"+ conditions: os=linux & cpu=riscv64+ languageName: node+ linkType: hard++"@esbuild/linux-s390x@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-s390x@npm:0.28.1"+ conditions: os=linux & cpu=s390x+ languageName: node+ linkType: hard++"@esbuild/linux-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/linux-x64@npm:0.28.1"+ conditions: os=linux & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/netbsd-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/netbsd-arm64@npm:0.28.1"+ conditions: os=netbsd & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/netbsd-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/netbsd-x64@npm:0.28.1"+ conditions: os=netbsd & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/openbsd-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/openbsd-arm64@npm:0.28.1"+ conditions: os=openbsd & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/openbsd-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/openbsd-x64@npm:0.28.1"+ conditions: os=openbsd & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/openharmony-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/openharmony-arm64@npm:0.28.1"+ conditions: os=openharmony & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/sunos-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/sunos-x64@npm:0.28.1"+ conditions: os=sunos & cpu=x64+ languageName: node+ linkType: hard++"@esbuild/win32-arm64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/win32-arm64@npm:0.28.1"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"@esbuild/win32-ia32@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/win32-ia32@npm:0.28.1"+ conditions: os=win32 & cpu=ia32+ languageName: node+ linkType: hard++"@esbuild/win32-x64@npm:0.28.1":+ version: 0.28.1+ resolution: "@esbuild/win32-x64@npm:0.28.1"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"@genql/runtime@npm:^2.10.0":+ version: 2.10.0+ resolution: "@genql/runtime@npm:2.10.0"+ dependencies:+ "@types/qs": "npm:^6.9.0"+ "@types/ws": "npm:^6.0.1"+ graphql-query-batcher: "npm:^1.0.1"+ isomorphic-unfetch: "npm:^3.0.0"+ lodash: "npm:^4.17.20"+ subscriptions-transport-ws: "npm:^0.9.16"+ tslib: "npm:^2.0.0"+ utility-types: "npm:^3.10.0"+ ws: "npm:^6.1.4"+ zen-observable-ts: "npm:^0.8.21"+ peerDependencies:+ graphql: "*"+ checksum: 10c0/e2a886c2469c933681e2b0ddd6a5b7f4cb12932251ba460e3cf2db4246817da79313ea4ba9769ec7cbe53ab9c1cb81ad8fcce6a969cd241185b79398d2a4f3c6+ languageName: node+ linkType: hard++"@img/colour@npm:^1.0.0":+ version: 1.1.0+ resolution: "@img/colour@npm:1.1.0"+ checksum: 10c0/2ebea2c0bbaee73b99badcefa04e1e71d83f36e5369337d3121dca841f4569533c4e2faddda6d62dd247f0d5cca143711f9446c59bcce81e427ba433a7a94a17+ languageName: node+ linkType: hard++"@img/sharp-darwin-arm64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-darwin-arm64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-darwin-arm64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-darwin-arm64":+ optional: true+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@img/sharp-darwin-x64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-darwin-x64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-darwin-x64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-darwin-x64":+ optional: true+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@img/sharp-libvips-darwin-arm64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-darwin-arm64@npm:1.2.4"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@img/sharp-libvips-darwin-x64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-darwin-x64@npm:1.2.4"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-arm64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-arm64@npm:1.2.4"+ conditions: os=linux & cpu=arm64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-arm@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-arm@npm:1.2.4"+ conditions: os=linux & cpu=arm & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-ppc64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-ppc64@npm:1.2.4"+ conditions: os=linux & cpu=ppc64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-riscv64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-riscv64@npm:1.2.4"+ conditions: os=linux & cpu=riscv64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-s390x@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-s390x@npm:1.2.4"+ conditions: os=linux & cpu=s390x & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linux-x64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linux-x64@npm:1.2.4"+ conditions: os=linux & cpu=x64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-libvips-linuxmusl-arm64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.2.4"+ conditions: os=linux & cpu=arm64 & libc=musl+ languageName: node+ linkType: hard++"@img/sharp-libvips-linuxmusl-x64@npm:1.2.4":+ version: 1.2.4+ resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.2.4"+ conditions: os=linux & cpu=x64 & libc=musl+ languageName: node+ linkType: hard++"@img/sharp-linux-arm64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-arm64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-arm64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-arm64":+ optional: true+ conditions: os=linux & cpu=arm64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linux-arm@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-arm@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-arm": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-arm":+ optional: true+ conditions: os=linux & cpu=arm & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linux-ppc64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-ppc64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-ppc64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-ppc64":+ optional: true+ conditions: os=linux & cpu=ppc64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linux-riscv64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-riscv64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-riscv64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-riscv64":+ optional: true+ conditions: os=linux & cpu=riscv64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linux-s390x@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-s390x@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-s390x": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-s390x":+ optional: true+ conditions: os=linux & cpu=s390x & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linux-x64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linux-x64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linux-x64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linux-x64":+ optional: true+ conditions: os=linux & cpu=x64 & libc=glibc+ languageName: node+ linkType: hard++"@img/sharp-linuxmusl-arm64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linuxmusl-arm64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linuxmusl-arm64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linuxmusl-arm64":+ optional: true+ conditions: os=linux & cpu=arm64 & libc=musl+ languageName: node+ linkType: hard++"@img/sharp-linuxmusl-x64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-linuxmusl-x64@npm:0.34.5"+ dependencies:+ "@img/sharp-libvips-linuxmusl-x64": "npm:1.2.4"+ dependenciesMeta:+ "@img/sharp-libvips-linuxmusl-x64":+ optional: true+ conditions: os=linux & cpu=x64 & libc=musl+ languageName: node+ linkType: hard++"@img/sharp-wasm32@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-wasm32@npm:0.34.5"+ dependencies:+ "@emnapi/runtime": "npm:^1.7.0"+ conditions: cpu=wasm32+ languageName: node+ linkType: hard++"@img/sharp-win32-arm64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-win32-arm64@npm:0.34.5"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"@img/sharp-win32-ia32@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-win32-ia32@npm:0.34.5"+ conditions: os=win32 & cpu=ia32+ languageName: node+ linkType: hard++"@img/sharp-win32-x64@npm:0.34.5":+ version: 0.34.5+ resolution: "@img/sharp-win32-x64@npm:0.34.5"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"@inquirer/ansi@npm:^2.0.7":+ version: 2.0.7+ resolution: "@inquirer/ansi@npm:2.0.7"+ checksum: 10c0/a574f97a899f0d9346fa26b528b3f4a9ba6dcb9172288efb6b4314d8486470ed53d2f538200f66a25b843c6e0cbf83688c6d5174a8dc6eca853b291b09609c5a+ languageName: node+ linkType: hard++"@inquirer/checkbox@npm:^5.2.1":+ version: 5.2.1+ resolution: "@inquirer/checkbox@npm:5.2.1"+ dependencies:+ "@inquirer/ansi": "npm:^2.0.7"+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/figures": "npm:^2.0.7"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/e3a845156c718fbbec228a0e7fd2a4f10775185615eac1f405b3a2bb2ae607dda6baf178fbd6487db0e12e5e33014536e81acefe65de57cd476a7aeaea6fb35d+ languageName: node+ linkType: hard++"@inquirer/confirm@npm:^6.1.1":+ version: 6.1.1+ resolution: "@inquirer/confirm@npm:6.1.1"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/4684406161c09327df830b4026f3165b31e13831276d215051586408ed434423263b15686393ce95a4b55058c1b7f9b08aa4b66f5ac930b47523fff75051d36f+ languageName: node+ linkType: hard++"@inquirer/core@npm:^11.2.1":+ version: 11.2.1+ resolution: "@inquirer/core@npm:11.2.1"+ dependencies:+ "@inquirer/ansi": "npm:^2.0.7"+ "@inquirer/figures": "npm:^2.0.7"+ "@inquirer/type": "npm:^4.0.7"+ cli-width: "npm:^4.1.0"+ fast-wrap-ansi: "npm:^0.2.0"+ mute-stream: "npm:^3.0.0"+ signal-exit: "npm:^4.1.0"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/b5be386cecd9e441ac2f9d3417a6ae1c4658b3ee6cdf5dae791211400f4de158851f81fca2245e2062833716f95366b9e1717770828cb7365e756c16e822f0d2+ languageName: node+ linkType: hard++"@inquirer/editor@npm:^5.2.2":+ version: 5.2.2+ resolution: "@inquirer/editor@npm:5.2.2"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/external-editor": "npm:^3.0.3"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/a75e7012aad3ccc3ec84893463ed689924515a6cbaee8e2a475769fb27c12bcf359fcdd5f62e92107fc4be88fd69444c15adf13071982efc140c7015a6604d9a+ languageName: node+ linkType: hard++"@inquirer/expand@npm:^5.1.1":+ version: 5.1.1+ resolution: "@inquirer/expand@npm:5.1.1"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/4de661a042147759ce351971a4f92010ab66cb76450424e7d8aec5de79b449d14e8751f54f557d0b047180bca2b76707626f4835ee46603c6200139c31b59652+ languageName: node+ linkType: hard++"@inquirer/external-editor@npm:^3.0.3":+ version: 3.0.3+ resolution: "@inquirer/external-editor@npm:3.0.3"+ dependencies:+ chardet: "npm:^2.1.1"+ iconv-lite: "npm:^0.7.2"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/fc24ddbff15f0874db6498c16d2fe153bb19a670d83605f480486d6ff0ea872ae2f32a548fd555797989db09850fa019a6b5e49a8d40cfee0d7deacad17edc1e+ languageName: node+ linkType: hard++"@inquirer/figures@npm:^2.0.7":+ version: 2.0.7+ resolution: "@inquirer/figures@npm:2.0.7"+ checksum: 10c0/e0573dc9ad25fa3628d5164745e52852d8cd832a9918605b7716df2e37a0005a0aaf40b6d81cef2ca09cb708b200e61b82d1dcd17003f572577e233c19a9ec7b+ languageName: node+ linkType: hard++"@inquirer/input@npm:^5.1.2":+ version: 5.1.2+ resolution: "@inquirer/input@npm:5.1.2"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/9c3614f8d79fc2bec07a088858a58967a162046c9292b0c6f0c6f63396cf391181cfb54bb636f5b3dce8d23924c24ee4a0310183a493c94190e4750218f3744d+ languageName: node+ linkType: hard++"@inquirer/number@npm:^4.1.1":+ version: 4.1.1+ resolution: "@inquirer/number@npm:4.1.1"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/06210dd70bf89d35242af43009b5e3f76a5f07d6275a9d842bbed61536032f5f349ecba1c20012975d7b0362deb89746d5903e90f21516da10bfd8c2055829a9+ languageName: node+ linkType: hard++"@inquirer/password@npm:^5.1.1":+ version: 5.1.1+ resolution: "@inquirer/password@npm:5.1.1"+ dependencies:+ "@inquirer/ansi": "npm:^2.0.7"+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/e4cb3a53b56743808f83958a8fe85738d721599690a4bc7640eaa07fb8f4765bc6f174e40c16efcc8a5958a7169667e240714a706a36e831f9c7a6822cbe8b55+ languageName: node+ linkType: hard++"@inquirer/prompts@npm:^8.5.2":+ version: 8.5.2+ resolution: "@inquirer/prompts@npm:8.5.2"+ dependencies:+ "@inquirer/checkbox": "npm:^5.2.1"+ "@inquirer/confirm": "npm:^6.1.1"+ "@inquirer/editor": "npm:^5.2.2"+ "@inquirer/expand": "npm:^5.1.1"+ "@inquirer/input": "npm:^5.1.2"+ "@inquirer/number": "npm:^4.1.1"+ "@inquirer/password": "npm:^5.1.1"+ "@inquirer/rawlist": "npm:^5.3.1"+ "@inquirer/search": "npm:^4.2.1"+ "@inquirer/select": "npm:^5.2.1"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/253b92e31c6a1f8f00a778eda8196bb53fc931723f7db4a03937f38ccd4d07c987766d4f60b9250b5d90bfe30b04747dfa73927a9f6fb886bd48091ccb202535+ languageName: node+ linkType: hard++"@inquirer/rawlist@npm:^5.3.1":+ version: 5.3.1+ resolution: "@inquirer/rawlist@npm:5.3.1"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/a05eb6a16633bd7b32b3b6b2c1f645e6e28d955475b21ba7222e7e66806b1be15be9f91235b2933e8d27e04fdad81ebfb2d64fc1fc0d4b8d82dcd2718817b2b9+ languageName: node+ linkType: hard++"@inquirer/search@npm:^4.2.1":+ version: 4.2.1+ resolution: "@inquirer/search@npm:4.2.1"+ dependencies:+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/figures": "npm:^2.0.7"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/eae9b2d524aae58266f96987696be22ad62f608661d28763c413f2560094d571a39d72a40630d2470f503ad5e6e50d8c574a653cc028bf79b51104fa91f59a67+ languageName: node+ linkType: hard++"@inquirer/select@npm:^5.2.1":+ version: 5.2.1+ resolution: "@inquirer/select@npm:5.2.1"+ dependencies:+ "@inquirer/ansi": "npm:^2.0.7"+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/figures": "npm:^2.0.7"+ "@inquirer/type": "npm:^4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/3c6d0151b5a29111254a58eaf8b93bb4c476e68b0751526d8bff61a4bea457bdbe782890ae33977c5d2015f436596b5d32a8bb0677bfdf610f5f5998e65f5a92+ languageName: node+ linkType: hard++"@inquirer/type@npm:^4.0.7":+ version: 4.0.7+ resolution: "@inquirer/type@npm:4.0.7"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/80678ac1c6e19ce309909e4a54a69adc95697ea3abc2cb92f17b1bc52f4caadbcb4003ae7339fb5a70c0d36d3bde975e1bb4450069662f41c953a0d28695bb70+ languageName: node+ linkType: hard++"@isaacs/fs-minipass@npm:^4.0.0":+ version: 4.0.1+ resolution: "@isaacs/fs-minipass@npm:4.0.1"+ dependencies:+ minipass: "npm:^7.0.4"+ checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2+ languageName: node+ linkType: hard++"@jridgewell/sourcemap-codec@npm:^1.5.5":+ version: 1.5.5+ resolution: "@jridgewell/sourcemap-codec@npm:1.5.5"+ checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0+ languageName: node+ linkType: hard++"@napi-rs/wasm-runtime@npm:^1.1.6":+ version: 1.1.6+ resolution: "@napi-rs/wasm-runtime@npm:1.1.6"+ dependencies:+ "@tybys/wasm-util": "npm:^0.10.3"+ peerDependencies:+ "@emnapi/core": ^1.7.1+ "@emnapi/runtime": ^1.7.1+ checksum: 10c0/344518bf3ef65051dda4c00969f293aa4a21ab7dc7822b3f48519b17cd5eaa3f0bc34898d115d50ba59b1817a0cb905d46f7a7223c8249239cd14c28db388e10+ languageName: node+ linkType: hard++"@oxc-project/types@npm:=0.137.0":+ version: 0.137.0+ resolution: "@oxc-project/types@npm:0.137.0"+ checksum: 10c0/5a6a50174e5ac79aebf38a120fe57be7a84c8bb0c77117f30de15183aa5ab0161e78364d2d3725397090e362e5c5f6eda754b53057b0b63983e3ee604f888aca+ languageName: node+ linkType: hard++"@oxlint/darwin-arm64@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/darwin-arm64@npm:0.16.12"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@oxlint/darwin-x64@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/darwin-x64@npm:0.16.12"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@oxlint/linux-arm64-gnu@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/linux-arm64-gnu@npm:0.16.12"+ conditions: os=linux & cpu=arm64 & libc=glibc+ languageName: node+ linkType: hard++"@oxlint/linux-arm64-musl@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/linux-arm64-musl@npm:0.16.12"+ conditions: os=linux & cpu=arm64 & libc=musl+ languageName: node+ linkType: hard++"@oxlint/linux-x64-gnu@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/linux-x64-gnu@npm:0.16.12"+ conditions: os=linux & cpu=x64 & libc=glibc+ languageName: node+ linkType: hard++"@oxlint/linux-x64-musl@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/linux-x64-musl@npm:0.16.12"+ conditions: os=linux & cpu=x64 & libc=musl+ languageName: node+ linkType: hard++"@oxlint/win32-arm64@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/win32-arm64@npm:0.16.12"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"@oxlint/win32-x64@npm:0.16.12":+ version: 0.16.12+ resolution: "@oxlint/win32-x64@npm:0.16.12"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"@pdf-lib/standard-fonts@npm:^1.0.0":+ version: 1.0.0+ resolution: "@pdf-lib/standard-fonts@npm:1.0.0"+ dependencies:+ pako: "npm:^1.0.6"+ checksum: 10c0/c683adfb764cd235a8370a0c1d5a8d7e90e3499ad33cdecfb92e4d48b0d36cfd038e3a875ebd0937a5646ee1578d793ab98f9c374be360c9a05d2699c1caedf4+ languageName: node+ linkType: hard++"@pdf-lib/upng@npm:^1.0.1":+ version: 1.0.1+ resolution: "@pdf-lib/upng@npm:1.0.1"+ dependencies:+ pako: "npm:^1.0.10"+ checksum: 10c0/9c300c513c1089e561c0cccac01f396a24efb9b0e9c922a39248cb09dfced70c05b9facdfce11a7f22cbedb4129593630a18111b90a57ef34ea4c3df98f2ac1d+ languageName: node+ linkType: hard++"@rolldown/binding-android-arm64@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-android-arm64@npm:1.1.3"+ conditions: os=android & cpu=arm64+ languageName: node+ linkType: hard++"@rolldown/binding-darwin-arm64@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-darwin-arm64@npm:1.1.3"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@rolldown/binding-darwin-x64@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-darwin-x64@npm:1.1.3"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@rolldown/binding-freebsd-x64@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-freebsd-x64@npm:1.1.3"+ conditions: os=freebsd & cpu=x64+ languageName: node+ linkType: hard++"@rolldown/binding-linux-arm-gnueabihf@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.1.3"+ conditions: os=linux & cpu=arm+ languageName: node+ linkType: hard++"@rolldown/binding-linux-arm64-gnu@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.1.3"+ conditions: os=linux & cpu=arm64 & libc=glibc+ languageName: node+ linkType: hard++"@rolldown/binding-linux-arm64-musl@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-arm64-musl@npm:1.1.3"+ conditions: os=linux & cpu=arm64 & libc=musl+ languageName: node+ linkType: hard++"@rolldown/binding-linux-ppc64-gnu@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-ppc64-gnu@npm:1.1.3"+ conditions: os=linux & cpu=ppc64 & libc=glibc+ languageName: node+ linkType: hard++"@rolldown/binding-linux-s390x-gnu@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-s390x-gnu@npm:1.1.3"+ conditions: os=linux & cpu=s390x & libc=glibc+ languageName: node+ linkType: hard++"@rolldown/binding-linux-x64-gnu@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-x64-gnu@npm:1.1.3"+ conditions: os=linux & cpu=x64 & libc=glibc+ languageName: node+ linkType: hard++"@rolldown/binding-linux-x64-musl@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-linux-x64-musl@npm:1.1.3"+ conditions: os=linux & cpu=x64 & libc=musl+ languageName: node+ linkType: hard++"@rolldown/binding-openharmony-arm64@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-openharmony-arm64@npm:1.1.3"+ conditions: os=openharmony & cpu=arm64+ languageName: node+ linkType: hard++"@rolldown/binding-wasm32-wasi@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-wasm32-wasi@npm:1.1.3"+ dependencies:+ "@emnapi/core": "npm:1.11.1"+ "@emnapi/runtime": "npm:1.11.1"+ "@napi-rs/wasm-runtime": "npm:^1.1.6"+ conditions: cpu=wasm32+ languageName: node+ linkType: hard++"@rolldown/binding-win32-arm64-msvc@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.1.3"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"@rolldown/binding-win32-x64-msvc@npm:1.1.3":+ version: 1.1.3+ resolution: "@rolldown/binding-win32-x64-msvc@npm:1.1.3"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"@rolldown/pluginutils@npm:^1.0.0":+ version: 1.0.1+ resolution: "@rolldown/pluginutils@npm:1.0.1"+ checksum: 10c0/99d9b06d90196823e4d8c841f258db7a16e5dbba5824a2962b05d907b79f1ba929d56f22dd744fd530936e568c865ee56a719dc31e57e13bc0a8eb4764a8d8dd+ languageName: node+ linkType: hard++"@sniptt/guards@npm:^0.2.0":+ version: 0.2.0+ resolution: "@sniptt/guards@npm:0.2.0"+ checksum: 10c0/749bb0f550d1ddd4abdb23dc1076cba26e977659922b73d000bceeb253c09270aaced0d18e92f09d4ce2fdaae33e55f60f2142f5359bc90ba505422af0873526+ languageName: node+ linkType: hard++"@standard-schema/spec@npm:^1.1.0":+ version: 1.1.0+ resolution: "@standard-schema/spec@npm:1.1.0"+ checksum: 10c0/d90f55acde4b2deb983529c87e8025fa693de1a5e8b49ecc6eb84d1fd96328add0e03d7d551442156c7432fd78165b2c26ff561b970a9a881f046abb78d6a526+ languageName: node+ linkType: hard++"@twentyhq/document-generator@workspace:.":+ version: 0.0.0-use.local+ resolution: "@twentyhq/document-generator@workspace:."+ dependencies:+ "@types/node": "npm:^24.7.2"+ "@types/react": "npm:^18.2.0"+ "@typescript/native-preview": "npm:^7.0.0-dev.20260116.1"+ marked: "npm:^18.0.5"+ oxlint: "npm:^0.16.0"+ pdf-lib: "npm:^1.17.1"+ react: "npm:^18.2.0"+ react-dom: "npm:^18.2.0"+ twenty-client-sdk: "npm:^2.16.0"+ twenty-sdk: "npm:^2.16.0"+ typescript: "npm:^5.9.3"+ vite-tsconfig-paths: "npm:^4.2.1"+ vitest: "npm:^4.0.0"+ languageName: unknown+ linkType: soft++"@tybys/wasm-util@npm:^0.10.3":+ version: 0.10.3+ resolution: "@tybys/wasm-util@npm:0.10.3"+ dependencies:+ tslib: "npm:^2.4.0"+ checksum: 10c0/fd2bd2a79c6cd8c79ed1cf7a0fa375c64589264c88a27acaf9756d556b453ea222b62a4f68dd2fbb8b3a78b6bab3b1f4fb2431b6afc6aeda8344b53a521a1cd3+ languageName: node+ linkType: hard++"@types/chai@npm:^5.2.2":+ version: 5.2.3+ resolution: "@types/chai@npm:5.2.3"+ dependencies:+ "@types/deep-eql": "npm:*"+ assertion-error: "npm:^2.0.1"+ checksum: 10c0/e0ef1de3b6f8045a5e473e867c8565788c444271409d155588504840ad1a53611011f85072188c2833941189400228c1745d78323dac13fcede9c2b28bacfb2f+ languageName: node+ linkType: hard++"@types/deep-eql@npm:*":+ version: 4.0.2+ resolution: "@types/deep-eql@npm:4.0.2"+ checksum: 10c0/bf3f811843117900d7084b9d0c852da9a044d12eb40e6de73b552598a6843c21291a8a381b0532644574beecd5e3491c5ff3a0365ab86b15d59862c025384844+ languageName: node+ linkType: hard++"@types/estree@npm:^1.0.0":+ version: 1.0.9+ resolution: "@types/estree@npm:1.0.9"+ checksum: 10c0/3ad3286ca2988cd550dafb8f2ad599c8474868e954fa601a36655bdfefd8039f7c714b8c1c7f2ae219ffbd58bd4660e66fa7479a0120fc02d4777057d4865387+ languageName: node+ linkType: hard++"@types/node@npm:*":+ version: 26.0.1+ resolution: "@types/node@npm:26.0.1"+ dependencies:+ undici-types: "npm:~8.3.0"+ checksum: 10c0/31d204333c70124da6bcac7d1f27d8980149fe3f95a8419bfcd19c3e5823705c0e370d71ac34399352e1263b2d5fc41c87af964ec81e5a05a32224d65d8d224e+ languageName: node+ linkType: hard++"@types/node@npm:^24.7.2":+ version: 24.13.2+ resolution: "@types/node@npm:24.13.2"+ dependencies:+ undici-types: "npm:~7.18.0"+ checksum: 10c0/d7d48a88a4feb0a6aac3cbfaf9ef3b12752b4b09447f88dd0b4c77c03b281e3d4330fe6982a99aedcd63fc16c7540a0c248b91eb2abb0b3edd884d7fe684e9ea+ languageName: node+ linkType: hard++"@types/prop-types@npm:*":+ version: 15.7.15+ resolution: "@types/prop-types@npm:15.7.15"+ checksum: 10c0/b59aad1ad19bf1733cf524fd4e618196c6c7690f48ee70a327eb450a42aab8e8a063fbe59ca0a5701aebe2d92d582292c0fb845ea57474f6a15f6994b0e260b2+ languageName: node+ linkType: hard++"@types/qs@npm:^6.9.0":+ version: 6.15.1+ resolution: "@types/qs@npm:6.15.1"+ checksum: 10c0/1dfdbcb4cf2a8f66d57f0b9a9fe6b1c7091cb816687b6698c1351eaf31f62e412cea9b7453a9637b570cd5fad8dced527e5a9e69b4fcc6e318daacd8b749f094+ languageName: node+ linkType: hard++"@types/react@npm:^18.2.0":+ version: 18.3.31+ resolution: "@types/react@npm:18.3.31"+ dependencies:+ "@types/prop-types": "npm:*"+ csstype: "npm:^3.2.2"+ checksum: 10c0/44180549dd045f536ececd39e39aacdf828e76adc1c4a90b132f453e23cc370c4648d9102ae401172ebd8fd8b1977a901a39e214e53ec77171b27514b588c179+ languageName: node+ linkType: hard++"@types/ws@npm:^6.0.1":+ version: 6.0.4+ resolution: "@types/ws@npm:6.0.4"+ dependencies:+ "@types/node": "npm:*"+ checksum: 10c0/fa958e64596ca9487c3ed6012834de70b47f25d971f1950cfb8e6a99cb77ff340ae82ac7627744e01b58010674ef8ede07d5a2ac29ca9ad0d67a430fcc69ae14+ languageName: node+ linkType: hard++"@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20260630.1"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20260630.1"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20260630.1"+ conditions: os=linux & cpu=arm64+ languageName: node+ linkType: hard++"@typescript/native-preview-linux-arm@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-linux-arm@npm:7.0.0-dev.20260630.1"+ conditions: os=linux & cpu=arm+ languageName: node+ linkType: hard++"@typescript/native-preview-linux-x64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-linux-x64@npm:7.0.0-dev.20260630.1"+ conditions: os=linux & cpu=x64+ languageName: node+ linkType: hard++"@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20260630.1"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"@typescript/native-preview-win32-x64@npm:7.0.0-dev.20260630.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview-win32-x64@npm:7.0.0-dev.20260630.1"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"@typescript/native-preview@npm:^7.0.0-dev.20260116.1":+ version: 7.0.0-dev.20260630.1+ resolution: "@typescript/native-preview@npm:7.0.0-dev.20260630.1"+ dependencies:+ "@typescript/native-preview-darwin-arm64": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-darwin-x64": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-linux-arm": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-linux-arm64": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-linux-x64": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-win32-arm64": "npm:7.0.0-dev.20260630.1"+ "@typescript/native-preview-win32-x64": "npm:7.0.0-dev.20260630.1"+ dependenciesMeta:+ "@typescript/native-preview-darwin-arm64":+ optional: true+ "@typescript/native-preview-darwin-x64":+ optional: true+ "@typescript/native-preview-linux-arm":+ optional: true+ "@typescript/native-preview-linux-arm64":+ optional: true+ "@typescript/native-preview-linux-x64":+ optional: true+ "@typescript/native-preview-win32-arm64":+ optional: true+ "@typescript/native-preview-win32-x64":+ optional: true+ bin:+ tsgo: bin/tsgo+ checksum: 10c0/477c47bf2f590fd29c5611cf96eb4ccfcf90b814aff5d8dab51574e44d051f512bb5debdd9a323ec038902ce7bc2e0e52370bb060bae8da395cca4001e3a668d+ languageName: node+ linkType: hard++"@vitest/expect@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/expect@npm:4.1.9"+ dependencies:+ "@standard-schema/spec": "npm:^1.1.0"+ "@types/chai": "npm:^5.2.2"+ "@vitest/spy": "npm:4.1.9"+ "@vitest/utils": "npm:4.1.9"+ chai: "npm:^6.2.2"+ tinyrainbow: "npm:^3.1.0"+ checksum: 10c0/243bacaed2cba5e0ea4ec7465662fcec465a358a0e06381e337fac49426aa67a73b104fbb9d65d8bccadfba8f70e27f57ffb897aacfa140f579a556367357875+ languageName: node+ linkType: hard++"@vitest/mocker@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/mocker@npm:4.1.9"+ dependencies:+ "@vitest/spy": "npm:4.1.9"+ estree-walker: "npm:^3.0.3"+ magic-string: "npm:^0.30.21"+ peerDependencies:+ msw: ^2.4.9+ vite: ^6.0.0 || ^7.0.0 || ^8.0.0+ peerDependenciesMeta:+ msw:+ optional: true+ vite:+ optional: true+ checksum: 10c0/707353b7435bbfd441cc754e4ee7bc5921b70d07b051c6e414b6bbe4ca369154702b0ddeb603389469fe87ca1983e002eb2d55044582661f54a1945dd27e5c82+ languageName: node+ linkType: hard++"@vitest/pretty-format@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/pretty-format@npm:4.1.9"+ dependencies:+ tinyrainbow: "npm:^3.1.0"+ checksum: 10c0/5b96295f25ab885616230ad1355fc82f490bebb39cc707688d7c8969c08270d7e076ed8a10af4e762ed57145193c6061a1f549f136f0ded344f8db0c2b3fb3de+ languageName: node+ linkType: hard++"@vitest/runner@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/runner@npm:4.1.9"+ dependencies:+ "@vitest/utils": "npm:4.1.9"+ pathe: "npm:^2.0.3"+ checksum: 10c0/d206b4891a64b1f55c346f832b0a7b489108094d8ae34438d3b53e78be7b45b139fa95ffa027c98c357bd532268ee573168de1943235b7eed32a9236ed5978bb+ languageName: node+ linkType: hard++"@vitest/snapshot@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/snapshot@npm:4.1.9"+ dependencies:+ "@vitest/pretty-format": "npm:4.1.9"+ "@vitest/utils": "npm:4.1.9"+ magic-string: "npm:^0.30.21"+ pathe: "npm:^2.0.3"+ checksum: 10c0/c3099df12ad1f9c1e180441856c9eb82f1990f87ff16aafedd6fa19978eaff20bc59220b692a99fcc822daef86eab256ba3dadb49544b7bd625b57c49cd9d995+ languageName: node+ linkType: hard++"@vitest/spy@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/spy@npm:4.1.9"+ checksum: 10c0/e51f328f55b76e8ba66e5e18f183484a8dc0a092685b101112d3e9fb8e989ddca162c98ddf00254476502c25bc05c4ec1e277fd6ad8bfc702464c08f6b5dd115+ languageName: node+ linkType: hard++"@vitest/utils@npm:4.1.9":+ version: 4.1.9+ resolution: "@vitest/utils@npm:4.1.9"+ dependencies:+ "@vitest/pretty-format": "npm:4.1.9"+ convert-source-map: "npm:^2.0.0"+ tinyrainbow: "npm:^3.1.0"+ checksum: 10c0/d55506c077fd72c091eb66f02926f0abf72801c87a085f565698289562f47befa114ae2c680ab8736dfe46abab0cfd6b8031f2ac519bafeb37578aa6e5ad03c5+ languageName: node+ linkType: hard++"abbrev@npm:^5.0.0":+ version: 5.0.0+ resolution: "abbrev@npm:5.0.0"+ checksum: 10c0/8e88f5c798ea4562d28c5a3e9ad69e3879890bc5d695d8f2dffb8609be4c890aacc8f80ef4553fdd2c6a62d70c2ce8bc57b38074e383beb7487bdafa9ed42ea5+ languageName: node+ linkType: hard++"agent-base@npm:6":+ version: 6.0.2+ resolution: "agent-base@npm:6.0.2"+ dependencies:+ debug: "npm:4"+ checksum: 10c0/dc4f757e40b5f3e3d674bc9beb4f1048f4ee83af189bae39be99f57bf1f48dde166a8b0a5342a84b5944ee8e6ed1e5a9d801858f4ad44764e84957122fe46261+ languageName: node+ linkType: hard++"ansi-escapes@npm:^7.3.0":+ version: 7.3.0+ resolution: "ansi-escapes@npm:7.3.0"+ dependencies:+ environment: "npm:^1.0.0"+ checksum: 10c0/068961d99f0ef28b661a4a9f84a5d645df93ccf3b9b93816cc7d46bbe1913321d4cdf156bb842a4e1e4583b7375c631fa963efb43001c4eb7ff9ab8f78fc0679+ languageName: node+ linkType: hard++"ansi-regex@npm:^6.2.2":+ version: 6.2.2+ resolution: "ansi-regex@npm:6.2.2"+ checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f+ languageName: node+ linkType: hard++"ansi-styles@npm:^6.2.1, ansi-styles@npm:^6.2.3":+ version: 6.2.3+ resolution: "ansi-styles@npm:6.2.3"+ checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868+ languageName: node+ linkType: hard++"assertion-error@npm:^2.0.1":+ version: 2.0.1+ resolution: "assertion-error@npm:2.0.1"+ checksum: 10c0/bbbcb117ac6480138f8c93cf7f535614282dea9dc828f540cdece85e3c665e8f78958b96afac52f29ff883c72638e6a87d469ecc9fe5bc902df03ed24a55dba8+ languageName: node+ linkType: hard++"async-function@npm:^1.0.0":+ version: 1.0.0+ resolution: "async-function@npm:1.0.0"+ checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73+ languageName: node+ linkType: hard++"async-generator-function@npm:^1.0.0":+ version: 1.0.0+ resolution: "async-generator-function@npm:1.0.0"+ checksum: 10c0/2c50ef856c543ad500d8d8777d347e3c1ba623b93e99c9263ecc5f965c1b12d2a140e2ab6e43c3d0b85366110696f28114649411cbcd10b452a92a2318394186+ languageName: node+ linkType: hard++"async-limiter@npm:~1.0.0":+ version: 1.0.1+ resolution: "async-limiter@npm:1.0.1"+ checksum: 10c0/0693d378cfe86842a70d4c849595a0bb50dc44c11649640ca982fa90cbfc74e3cc4753b5a0847e51933f2e9c65ce8e05576e75e5e1fd963a086e673735b35969+ languageName: node+ linkType: hard++"asynckit@npm:^0.4.0":+ version: 0.4.0+ resolution: "asynckit@npm:0.4.0"+ checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d+ languageName: node+ linkType: hard++"auto-bind@npm:^5.0.1":+ version: 5.0.1+ resolution: "auto-bind@npm:5.0.1"+ checksum: 10c0/a703375350ea7b6e92405d8e6bcc6dbfb84b0d7c7172b33e5788a7593929a18227999ff9aa9c32436741d06d021e6672457b1cec73287efe3fab95cff6627eaf+ languageName: node+ linkType: hard++"axios@npm:^1.16.0":+ version: 1.18.1+ resolution: "axios@npm:1.18.1"+ dependencies:+ follow-redirects: "npm:^1.16.0"+ form-data: "npm:^4.0.5"+ https-proxy-agent: "npm:^5.0.1"+ proxy-from-env: "npm:^2.1.0"+ checksum: 10c0/9d9378a3af0d0ad730a52ad9d15ec7201f3926ad6e7e8bbffc5ae21ca2835ad11d1d9598698f5dd9718917486039f55ea1d7dc23d8e44fa827a55cc3262c02fc+ languageName: node+ linkType: hard++"backo2@npm:^1.0.2":+ version: 1.0.2+ resolution: "backo2@npm:1.0.2"+ checksum: 10c0/a9e825a6a38a6d1c4a94476eabc13d6127dfaafb0967baf104affbb67806ae26abbb58dab8d572d2cd21ef06634ff57c3ad48dff14b904e18de1474cc2f22bf3+ languageName: node+ linkType: hard++"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2":+ version: 1.0.2+ resolution: "call-bind-apply-helpers@npm:1.0.2"+ dependencies:+ es-errors: "npm:^1.3.0"+ function-bind: "npm:^1.1.2"+ checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938+ languageName: node+ linkType: hard++"chai@npm:^6.2.2":+ version: 6.2.2+ resolution: "chai@npm:6.2.2"+ checksum: 10c0/e6c69e5f0c11dffe6ea13d0290936ebb68fcc1ad688b8e952e131df6a6d5797d5e860bc55cef1aca2e950c3e1f96daf79e9d5a70fb7dbaab4e46355e2635ed53+ languageName: node+ linkType: hard++"chalk@npm:^5.3.0, chalk@npm:^5.6.0":+ version: 5.6.2+ resolution: "chalk@npm:5.6.2"+ checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976+ languageName: node+ linkType: hard++"chardet@npm:^2.1.1":+ version: 2.2.0+ resolution: "chardet@npm:2.2.0"+ checksum: 10c0/8d43a1dd3ce535aa070d04139fae62f879b4388394eb1d857364ce416675a1f0f63974fba8208e9cd11b49e1a6da3e65ea6393d0fc654a8c4217c0d74c16b1b4+ languageName: node+ linkType: hard++"chokidar@npm:^4.0.0":+ version: 4.0.3+ resolution: "chokidar@npm:4.0.3"+ dependencies:+ readdirp: "npm:^4.0.1"+ checksum: 10c0/a58b9df05bb452f7d105d9e7229ac82fa873741c0c40ddcc7bb82f8a909fbe3f7814c9ebe9bc9a2bef9b737c0ec6e2d699d179048ef06ad3ec46315df0ebe6ad+ languageName: node+ linkType: hard++"chownr@npm:^3.0.0":+ version: 3.0.0+ resolution: "chownr@npm:3.0.0"+ checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10+ languageName: node+ linkType: hard++"cli-boxes@npm:^3.0.0":+ version: 3.0.0+ resolution: "cli-boxes@npm:3.0.0"+ checksum: 10c0/4db3e8fbfaf1aac4fb3a6cbe5a2d3fa048bee741a45371b906439b9ffc821c6e626b0f108bdcd3ddf126a4a319409aedcf39a0730573ff050fdd7b6731e99fb9+ languageName: node+ linkType: hard++"cli-cursor@npm:^4.0.0":+ version: 4.0.0+ resolution: "cli-cursor@npm:4.0.0"+ dependencies:+ restore-cursor: "npm:^4.0.0"+ checksum: 10c0/e776e8c3c6727300d0539b0d25160b2bb56aed1a63942753ba1826b012f337a6f4b7ace3548402e4f2f13b5e16bfd751be672c44b203205e7eca8be94afec42c+ languageName: node+ linkType: hard++"cli-truncate@npm:^5.1.1":+ version: 5.2.0+ resolution: "cli-truncate@npm:5.2.0"+ dependencies:+ slice-ansi: "npm:^8.0.0"+ string-width: "npm:^8.2.0"+ checksum: 10c0/0d4ec94702ca85b64522ac93633837fb5ea7db17b79b1322a60f6045e6ae2b8cd7bd4c1d19ac7d1f9e10e3bbda1112e172e439b68c02b785ee00da8d6a5c5471+ languageName: node+ linkType: hard++"cli-width@npm:^4.1.0":+ version: 4.1.0+ resolution: "cli-width@npm:4.1.0"+ checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f+ languageName: node+ linkType: hard++"code-excerpt@npm:^4.0.0":+ version: 4.0.0+ resolution: "code-excerpt@npm:4.0.0"+ dependencies:+ convert-to-spaces: "npm:^2.0.1"+ checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773+ languageName: node+ linkType: hard++"combined-stream@npm:^1.0.8":+ version: 1.0.8+ resolution: "combined-stream@npm:1.0.8"+ dependencies:+ delayed-stream: "npm:~1.0.0"+ checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5+ languageName: node+ linkType: hard++"commander@npm:^12.0.0":+ version: 12.1.0+ resolution: "commander@npm:12.1.0"+ checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9+ languageName: node+ linkType: hard++"convert-source-map@npm:^2.0.0":+ version: 2.0.0+ resolution: "convert-source-map@npm:2.0.0"+ checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b+ languageName: node+ linkType: hard++"convert-to-spaces@npm:^2.0.1":+ version: 2.0.1+ resolution: "convert-to-spaces@npm:2.0.1"+ checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46+ languageName: node+ linkType: hard++"csstype@npm:^3.2.2":+ version: 3.2.3+ resolution: "csstype@npm:3.2.3"+ checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce+ languageName: node+ linkType: hard++"debug@npm:4, debug@npm:^4.1.1":+ version: 4.4.3+ resolution: "debug@npm:4.4.3"+ dependencies:+ ms: "npm:^2.1.3"+ peerDependenciesMeta:+ supports-color:+ optional: true+ checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6+ languageName: node+ linkType: hard++"delayed-stream@npm:~1.0.0":+ version: 1.0.0+ resolution: "delayed-stream@npm:1.0.0"+ checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19+ languageName: node+ linkType: hard++"detect-libc@npm:^2.0.3, detect-libc@npm:^2.1.2":+ version: 2.1.2+ resolution: "detect-libc@npm:2.1.2"+ checksum: 10c0/acc675c29a5649fa1fb6e255f993b8ee829e510b6b56b0910666949c80c364738833417d0edb5f90e4e46be17228b0f2b66a010513984e18b15deeeac49369c4+ languageName: node+ linkType: hard++"dunder-proto@npm:^1.0.1":+ version: 1.0.1+ resolution: "dunder-proto@npm:1.0.1"+ dependencies:+ call-bind-apply-helpers: "npm:^1.0.1"+ es-errors: "npm:^1.3.0"+ gopd: "npm:^1.2.0"+ checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031+ languageName: node+ linkType: hard++"emoji-regex@npm:^10.3.0":+ version: 10.6.0+ resolution: "emoji-regex@npm:10.6.0"+ checksum: 10c0/1e4aa097bb007301c3b4b1913879ae27327fdc48e93eeefefe3b87e495eb33c5af155300be951b4349ff6ac084f4403dc9eff970acba7c1c572d89396a9a32d7+ languageName: node+ linkType: hard++"env-paths@npm:^2.2.0":+ version: 2.2.1+ resolution: "env-paths@npm:2.2.1"+ checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4+ languageName: node+ linkType: hard++"environment@npm:^1.0.0":+ version: 1.1.0+ resolution: "environment@npm:1.1.0"+ checksum: 10c0/fb26434b0b581ab397039e51ff3c92b34924a98b2039dcb47e41b7bca577b9dbf134a8eadb364415c74464b682e2d3afe1a4c0eb9873dc44ea814c5d3103331d+ languageName: node+ linkType: hard++"es-define-property@npm:^1.0.1":+ version: 1.0.1+ resolution: "es-define-property@npm:1.0.1"+ checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c+ languageName: node+ linkType: hard++"es-errors@npm:^1.3.0":+ version: 1.3.0+ resolution: "es-errors@npm:1.3.0"+ checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85+ languageName: node+ linkType: hard++"es-module-lexer@npm:^2.0.0":+ version: 2.2.0+ resolution: "es-module-lexer@npm:2.2.0"+ checksum: 10c0/a20547903d389031f383afe2c4770e5402f70afb8e5c69562427cb4c384bfb806aa24e8b719b75f432bae327c9db2abb1f227c907bb3bc3d9d9350d42d6f91a3+ languageName: node+ linkType: hard++"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1":+ version: 1.1.2+ resolution: "es-object-atoms@npm:1.1.2"+ dependencies:+ es-errors: "npm:^1.3.0"+ checksum: 10c0/1772861f094f739d6f41b579cfb9a18579daffeb434552a370a5fbef50a32d22227e27b63fdbb757b7ddd429d1b42fe52ccae7966d9302a2ec221b6f1b41bbc4+ languageName: node+ linkType: hard++"es-set-tostringtag@npm:^2.1.0":+ version: 2.1.0+ resolution: "es-set-tostringtag@npm:2.1.0"+ dependencies:+ es-errors: "npm:^1.3.0"+ get-intrinsic: "npm:^1.2.6"+ has-tostringtag: "npm:^1.0.2"+ hasown: "npm:^2.0.2"+ checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af+ languageName: node+ linkType: hard++"es-toolkit@npm:^1.39.10":+ version: 1.49.0+ resolution: "es-toolkit@npm:1.49.0"+ dependenciesMeta:+ "@trivago/[email protected]":+ unplugged: true+ unplugged: true+ unplugged: true+ checksum: 10c0/ab0864bb0c5c494ed09043d53a74b58a0ab9df1b89b9b54bce72a63de2869152d7d65e489dc89ab671f0fea243728922c8a8f8c873f1b2a53350a23360b3e2df+ languageName: node+ linkType: hard++"esbuild@npm:^0.28.1":+ version: 0.28.1+ resolution: "esbuild@npm:0.28.1"+ dependencies:+ "@esbuild/aix-ppc64": "npm:0.28.1"+ "@esbuild/android-arm": "npm:0.28.1"+ "@esbuild/android-arm64": "npm:0.28.1"+ "@esbuild/android-x64": "npm:0.28.1"+ "@esbuild/darwin-arm64": "npm:0.28.1"+ "@esbuild/darwin-x64": "npm:0.28.1"+ "@esbuild/freebsd-arm64": "npm:0.28.1"+ "@esbuild/freebsd-x64": "npm:0.28.1"+ "@esbuild/linux-arm": "npm:0.28.1"+ "@esbuild/linux-arm64": "npm:0.28.1"+ "@esbuild/linux-ia32": "npm:0.28.1"+ "@esbuild/linux-loong64": "npm:0.28.1"+ "@esbuild/linux-mips64el": "npm:0.28.1"+ "@esbuild/linux-ppc64": "npm:0.28.1"+ "@esbuild/linux-riscv64": "npm:0.28.1"+ "@esbuild/linux-s390x": "npm:0.28.1"+ "@esbuild/linux-x64": "npm:0.28.1"+ "@esbuild/netbsd-arm64": "npm:0.28.1"+ "@esbuild/netbsd-x64": "npm:0.28.1"+ "@esbuild/openbsd-arm64": "npm:0.28.1"+ "@esbuild/openbsd-x64": "npm:0.28.1"+ "@esbuild/openharmony-arm64": "npm:0.28.1"+ "@esbuild/sunos-x64": "npm:0.28.1"+ "@esbuild/win32-arm64": "npm:0.28.1"+ "@esbuild/win32-ia32": "npm:0.28.1"+ "@esbuild/win32-x64": "npm:0.28.1"+ dependenciesMeta:+ "@esbuild/aix-ppc64":+ optional: true+ "@esbuild/android-arm":+ optional: true+ "@esbuild/android-arm64":+ optional: true+ "@esbuild/android-x64":+ optional: true+ "@esbuild/darwin-arm64":+ optional: true+ "@esbuild/darwin-x64":+ optional: true+ "@esbuild/freebsd-arm64":+ optional: true+ "@esbuild/freebsd-x64":+ optional: true+ "@esbuild/linux-arm":+ optional: true+ "@esbuild/linux-arm64":+ optional: true+ "@esbuild/linux-ia32":+ optional: true+ "@esbuild/linux-loong64":+ optional: true+ "@esbuild/linux-mips64el":+ optional: true+ "@esbuild/linux-ppc64":+ optional: true+ "@esbuild/linux-riscv64":+ optional: true+ "@esbuild/linux-s390x":+ optional: true+ "@esbuild/linux-x64":+ optional: true+ "@esbuild/netbsd-arm64":+ optional: true+ "@esbuild/netbsd-x64":+ optional: true+ "@esbuild/openbsd-arm64":+ optional: true+ "@esbuild/openbsd-x64":+ optional: true+ "@esbuild/openharmony-arm64":+ optional: true+ "@esbuild/sunos-x64":+ optional: true+ "@esbuild/win32-arm64":+ optional: true+ "@esbuild/win32-ia32":+ optional: true+ "@esbuild/win32-x64":+ optional: true+ bin:+ esbuild: bin/esbuild+ checksum: 10c0/29cd456a79ce35ac2c7e05fe871330416b2c395c045d849653f843e51378d6e0d6e774d6dcd01b35f4e83238a29bf8decd04fcd34b3780c589a250b21e5f92bb+ languageName: node+ linkType: hard++"escape-string-regexp@npm:^2.0.0":+ version: 2.0.0+ resolution: "escape-string-regexp@npm:2.0.0"+ checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507+ languageName: node+ linkType: hard++"estree-walker@npm:^3.0.3":+ version: 3.0.3+ resolution: "estree-walker@npm:3.0.3"+ dependencies:+ "@types/estree": "npm:^1.0.0"+ checksum: 10c0/c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d+ languageName: node+ linkType: hard++"eventemitter3@npm:^3.1.0":+ version: 3.1.2+ resolution: "eventemitter3@npm:3.1.2"+ checksum: 10c0/c67262eccbf85848b7cc6d4abb6c6e34155e15686db2a01c57669fd0d44441a574a19d44d25948b442929e065774cbe5003d8e77eed47674fbf876ac77887793+ languageName: node+ linkType: hard++"expect-type@npm:^1.3.0":+ version: 1.4.0+ resolution: "expect-type@npm:1.4.0"+ checksum: 10c0/d40d76b8570695d36587beb3cc28494da2ca3ec8f04e67f5622ed2d372d850e401a9adef19c6835e1a8173903f157c79540b34c7b3fbd7cd8ce726cc903c57b7+ languageName: node+ linkType: hard++"exponential-backoff@npm:^3.1.1":+ version: 3.1.3+ resolution: "exponential-backoff@npm:3.1.3"+ checksum: 10c0/77e3ae682b7b1f4972f563c6dbcd2b0d54ac679e62d5d32f3e5085feba20483cf28bd505543f520e287a56d4d55a28d7874299941faf637e779a1aa5994d1267+ languageName: node+ linkType: hard++"fast-string-truncated-width@npm:^3.0.2":+ version: 3.0.3+ resolution: "fast-string-truncated-width@npm:3.0.3"+ checksum: 10c0/043b8663397d14a3880ce4f3407bcda60b40db9bbeafe62863a35d1f9c69ea17c8da3fcd72de235553e6c9cd053128cde9e24ca0d4a7463208f48db3cd23d981+ languageName: node+ linkType: hard++"fast-string-width@npm:^3.0.2":+ version: 3.0.2+ resolution: "fast-string-width@npm:3.0.2"+ dependencies:+ fast-string-truncated-width: "npm:^3.0.2"+ checksum: 10c0/c8822d175315bb353ebe782b65214ac53b13e3bf704e03b132ea7bdfa8de6a636375b3ab7a4097545393d109381c37c4f387c72a462c90b61412dbc4632f39a7+ languageName: node+ linkType: hard++"fast-wrap-ansi@npm:^0.2.0":+ version: 0.2.2+ resolution: "fast-wrap-ansi@npm:0.2.2"+ dependencies:+ fast-string-width: "npm:^3.0.2"+ checksum: 10c0/1aa7be4f7cb86f4bdb14691cb6bcc0b8df8b3b89df142ade3ae1602332dcf6f990cd750a923cd581ca0847808cb4ec1aa5afaafa7a72f849e87a2a62c98fa370+ languageName: node+ linkType: hard++"fdir@npm:^6.5.0":+ version: 6.5.0+ resolution: "fdir@npm:6.5.0"+ peerDependencies:+ picomatch: ^3 || ^4+ peerDependenciesMeta:+ picomatch:+ optional: true+ checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f+ languageName: node+ linkType: hard++"follow-redirects@npm:^1.16.0":+ version: 1.16.0+ resolution: "follow-redirects@npm:1.16.0"+ peerDependenciesMeta:+ debug:+ optional: true+ checksum: 10c0/a1e2900163e6f1b4d1ed5c221b607f41decbab65534c63fe7e287e40a5d552a6496e7d9d7d976fa4ba77b4c51c11e5e9f683f10b43011ea11e442ff128d0e181+ languageName: node+ linkType: hard++"form-data@npm:^4.0.5":+ version: 4.0.6+ resolution: "form-data@npm:4.0.6"+ dependencies:+ asynckit: "npm:^0.4.0"+ combined-stream: "npm:^1.0.8"+ es-set-tostringtag: "npm:^2.1.0"+ hasown: "npm:^2.0.4"+ mime-types: "npm:^2.1.35"+ checksum: 10c0/43947a77bf0ff45c6ceed789778982d47a3f3e720a74b71721174ebf3310a5f1a8be1d6b38a3ee3688e8a18a2c4273073ec0844cd37efda3eaf46d41c9c318ff+ languageName: node+ linkType: hard++"fsevents@npm:~2.3.3":+ version: 2.3.3+ resolution: "fsevents@npm:2.3.3"+ dependencies:+ node-gyp: "npm:latest"+ checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60+ conditions: os=darwin+ languageName: node+ linkType: hard++"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin<compat/fsevents>":+ version: 2.3.3+ resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1"+ dependencies:+ node-gyp: "npm:latest"+ conditions: os=darwin+ languageName: node+ linkType: hard++"function-bind@npm:^1.1.2":+ version: 1.1.2+ resolution: "function-bind@npm:1.1.2"+ checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5+ languageName: node+ linkType: hard++"generator-function@npm:^2.0.0":+ version: 2.0.1+ resolution: "generator-function@npm:2.0.1"+ checksum: 10c0/8a9f59df0f01cfefafdb3b451b80555e5cf6d76487095db91ac461a0e682e4ff7a9dbce15f4ecec191e53586d59eece01949e05a4b4492879600bbbe8e28d6b8+ languageName: node+ linkType: hard++"get-east-asian-width@npm:^1.0.0, get-east-asian-width@npm:^1.3.1, get-east-asian-width@npm:^1.5.0":+ version: 1.6.0+ resolution: "get-east-asian-width@npm:1.6.0"+ checksum: 10c0/7e72e9550fd49ca5b246f9af6bb2afc129c96412845ff6556b3274fd44817a381702ca17028efe9866b261a3d44254cbf21e6c90cf05b4b61675630af776d431+ languageName: node+ linkType: hard++"get-intrinsic@npm:^1.2.6":+ version: 1.3.1+ resolution: "get-intrinsic@npm:1.3.1"+ dependencies:+ async-function: "npm:^1.0.0"+ async-generator-function: "npm:^1.0.0"+ call-bind-apply-helpers: "npm:^1.0.2"+ es-define-property: "npm:^1.0.1"+ es-errors: "npm:^1.3.0"+ es-object-atoms: "npm:^1.1.1"+ function-bind: "npm:^1.1.2"+ generator-function: "npm:^2.0.0"+ get-proto: "npm:^1.0.1"+ gopd: "npm:^1.2.0"+ has-symbols: "npm:^1.1.0"+ hasown: "npm:^2.0.2"+ math-intrinsics: "npm:^1.1.0"+ checksum: 10c0/9f4ab0cf7efe0fd2c8185f52e6f637e708f3a112610c88869f8f041bb9ecc2ce44bf285dfdbdc6f4f7c277a5b88d8e94a432374d97cca22f3de7fc63795deb5d+ languageName: node+ linkType: hard++"get-proto@npm:^1.0.1":+ version: 1.0.1+ resolution: "get-proto@npm:1.0.1"+ dependencies:+ dunder-proto: "npm:^1.0.1"+ es-object-atoms: "npm:^1.0.0"+ checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c+ languageName: node+ linkType: hard++"globrex@npm:^0.1.2":+ version: 0.1.2+ resolution: "globrex@npm:0.1.2"+ checksum: 10c0/a54c029520cf58bda1d8884f72bd49b4cd74e977883268d931fd83bcbd1a9eb96d57c7dbd4ad80148fb9247467ebfb9b215630b2ed7563b2a8de02e1ff7f89d1+ languageName: node+ linkType: hard++"gopd@npm:^1.2.0":+ version: 1.2.0+ resolution: "gopd@npm:1.2.0"+ checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead+ languageName: node+ linkType: hard++"graceful-fs@npm:^4.2.6":+ version: 4.2.11+ resolution: "graceful-fs@npm:4.2.11"+ checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2+ languageName: node+ linkType: hard++"graphql-query-batcher@npm:^1.0.1":+ version: 1.0.1+ resolution: "graphql-query-batcher@npm:1.0.1"+ checksum: 10c0/804d0f4064721a2116a16b9eac422e9233e85f4ab5b250cb8f83662725658ffde35779a8ae8211037f3dd2f9717de8cb63b394ad8057ce22171a83db2471196a+ languageName: node+ linkType: hard++"graphql-sse@npm:^2.5.4":+ version: 2.6.0+ resolution: "graphql-sse@npm:2.6.0"+ peerDependencies:+ graphql: ">=0.11 <=16"+ checksum: 10c0/e05f0b5c8539d61e5ce34af8e0bb418c02bf922d6a7f9232a9abd53c77df5654684ca14f674ac771645c8fba9c37ce666c5d06f46eef54ea07e63653468065b0+ languageName: node+ linkType: hard++"graphql@npm:^16.8.1":+ version: 16.14.2+ resolution: "graphql@npm:16.14.2"+ checksum: 10c0/a95a96961eaff55cc9fe9d31fae6f33499ac988b972d07ea5085024cb1333f515b902f376e7393a5489aa82200a8aff3eb96580e4d1b69d702ed19b6eb1ce97a+ languageName: node+ linkType: hard++"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0":+ version: 1.1.0+ resolution: "has-symbols@npm:1.1.0"+ checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e+ languageName: node+ linkType: hard++"has-tostringtag@npm:^1.0.2":+ version: 1.0.2+ resolution: "has-tostringtag@npm:1.0.2"+ dependencies:+ has-symbols: "npm:^1.0.3"+ checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c+ languageName: node+ linkType: hard++"hasown@npm:^2.0.2, hasown@npm:^2.0.4":+ version: 2.0.4+ resolution: "hasown@npm:2.0.4"+ dependencies:+ function-bind: "npm:^1.1.2"+ checksum: 10c0/2d8de939e270b70618f8cebb69746620db10617dbb495bc66ddad326955ea24d3ca4af133aff3eb7c1853e0218f867bc2b050ec26fe02e3aea58f880ffc5e506+ languageName: node+ linkType: hard++"https-proxy-agent@npm:^5.0.1":+ version: 5.0.1+ resolution: "https-proxy-agent@npm:5.0.1"+ dependencies:+ agent-base: "npm:6"+ debug: "npm:4"+ checksum: 10c0/6dd639f03434003577c62b27cafdb864784ef19b2de430d8ae2a1d45e31c4fd60719e5637b44db1a88a046934307da7089e03d6089ec3ddacc1189d8de8897d1+ languageName: node+ linkType: hard++"iconv-lite@npm:^0.7.2":+ version: 0.7.2+ resolution: "iconv-lite@npm:0.7.2"+ dependencies:+ safer-buffer: "npm:>= 2.1.2 < 3.0.0"+ checksum: 10c0/3c228920f3bd307f56bf8363706a776f4a060eb042f131cd23855ceca962951b264d0997ab38a1ad340e1c5df8499ed26e1f4f0db6b2a2ad9befaff22f14b722+ languageName: node+ linkType: hard++"indent-string@npm:^5.0.0":+ version: 5.0.0+ resolution: "indent-string@npm:5.0.0"+ checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220+ languageName: node+ linkType: hard++"ink@npm:^6.8.0":+ version: 6.8.0+ resolution: "ink@npm:6.8.0"+ dependencies:+ "@alcalzone/ansi-tokenize": "npm:^0.2.4"+ ansi-escapes: "npm:^7.3.0"+ ansi-styles: "npm:^6.2.1"+ auto-bind: "npm:^5.0.1"+ chalk: "npm:^5.6.0"+ cli-boxes: "npm:^3.0.0"+ cli-cursor: "npm:^4.0.0"+ cli-truncate: "npm:^5.1.1"+ code-excerpt: "npm:^4.0.0"+ es-toolkit: "npm:^1.39.10"+ indent-string: "npm:^5.0.0"+ is-in-ci: "npm:^2.0.0"+ patch-console: "npm:^2.0.0"+ react-reconciler: "npm:^0.33.0"+ scheduler: "npm:^0.27.0"+ signal-exit: "npm:^3.0.7"+ slice-ansi: "npm:^8.0.0"+ stack-utils: "npm:^2.0.6"+ string-width: "npm:^8.1.1"+ terminal-size: "npm:^4.0.1"+ type-fest: "npm:^5.4.1"+ widest-line: "npm:^6.0.0"+ wrap-ansi: "npm:^9.0.0"+ ws: "npm:^8.18.0"+ yoga-layout: "npm:~3.2.1"+ peerDependencies:+ "@types/react": ">=19.0.0"+ react: ">=19.0.0"+ react-devtools-core: ">=6.1.2"+ peerDependenciesMeta:+ "@types/react":+ optional: true+ react-devtools-core:+ optional: true+ checksum: 10c0/50500e547fdf6a1f1d836d6befbd4770e3ab649ef0be1884500a6da411fb68a90e22dd7dcc9c404911d30e9f87506b3b9d8e997c6c6ceac85ee054b4dadefaff+ languageName: node+ linkType: hard++"inquirer@npm:^14.0.0":+ version: 14.0.2+ resolution: "inquirer@npm:14.0.2"+ dependencies:+ "@inquirer/ansi": "npm:^2.0.7"+ "@inquirer/core": "npm:^11.2.1"+ "@inquirer/prompts": "npm:^8.5.2"+ "@inquirer/type": "npm:^4.0.7"+ mute-stream: "npm:^3.0.0"+ run-async: "npm:^4.0.6"+ peerDependencies:+ "@types/node": ">=18"+ peerDependenciesMeta:+ "@types/node":+ optional: true+ checksum: 10c0/31ec80b7d599dcb19568540d694865b1da116f701b75503a23ed38189d96fca70eb1fb6ccb1dbd994f6f79d407d51dc1a94d06dcef5370644ce736792414781b+ languageName: node+ linkType: hard++"is-fullwidth-code-point@npm:^5.0.0, is-fullwidth-code-point@npm:^5.1.0":+ version: 5.1.0+ resolution: "is-fullwidth-code-point@npm:5.1.0"+ dependencies:+ get-east-asian-width: "npm:^1.3.1"+ checksum: 10c0/c1172c2e417fb73470c56c431851681591f6a17233603a9e6f94b7ba870b2e8a5266506490573b607fb1081318589372034aa436aec07b465c2029c0bc7f07a4+ languageName: node+ linkType: hard++"is-in-ci@npm:^2.0.0":+ version: 2.0.0+ resolution: "is-in-ci@npm:2.0.0"+ bin:+ is-in-ci: cli.js+ checksum: 10c0/1e1d1056939a681e8206035de5ad84e0404556eaa7622bb55f0f1868b9788bff3df427bc0b1ed5a172623154a90fcb1e759a230817cd73d09435543ae3c71feb+ languageName: node+ linkType: hard++"isexe@npm:^4.0.0":+ version: 4.0.0+ resolution: "isexe@npm:4.0.0"+ checksum: 10c0/5884815115bceac452877659a9c7726382531592f43dc29e5d48b7c4100661aed54018cb90bd36cb2eaeba521092570769167acbb95c18d39afdccbcca06c5ce+ languageName: node+ linkType: hard++"isomorphic-unfetch@npm:^3.0.0":+ version: 3.1.0+ resolution: "isomorphic-unfetch@npm:3.1.0"+ dependencies:+ node-fetch: "npm:^2.6.1"+ unfetch: "npm:^4.2.0"+ checksum: 10c0/d3b61fca06304db692b7f76bdfd3a00f410e42cfa7403c3b250546bf71589d18cf2f355922f57198e4cc4a9872d3647b20397a5c3edf1a347c90d57c83cf2a89+ languageName: node+ linkType: hard++"iterall@npm:^1.2.1":+ version: 1.3.0+ resolution: "iterall@npm:1.3.0"+ checksum: 10c0/40de624e5fe937c4c0e511981b91caea9ff2142bfc0316cccc8506eaa03aa253820cc17c5bc5f0a98706c7268a373e5ebee9af9a0c8a359730cf7c05938b57b5+ languageName: node+ linkType: hard++"js-tokens@npm:^3.0.0 || ^4.0.0":+ version: 4.0.0+ resolution: "js-tokens@npm:4.0.0"+ checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed+ languageName: node+ linkType: hard++"jsonc-parser@npm:^3.2.0":+ version: 3.3.1+ resolution: "jsonc-parser@npm:3.3.1"+ checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6+ languageName: node+ linkType: hard++"lightningcss-android-arm64@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-android-arm64@npm:1.32.0"+ conditions: os=android & cpu=arm64+ languageName: node+ linkType: hard++"lightningcss-darwin-arm64@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-darwin-arm64@npm:1.32.0"+ conditions: os=darwin & cpu=arm64+ languageName: node+ linkType: hard++"lightningcss-darwin-x64@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-darwin-x64@npm:1.32.0"+ conditions: os=darwin & cpu=x64+ languageName: node+ linkType: hard++"lightningcss-freebsd-x64@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-freebsd-x64@npm:1.32.0"+ conditions: os=freebsd & cpu=x64+ languageName: node+ linkType: hard++"lightningcss-linux-arm-gnueabihf@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-linux-arm-gnueabihf@npm:1.32.0"+ conditions: os=linux & cpu=arm+ languageName: node+ linkType: hard++"lightningcss-linux-arm64-gnu@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-linux-arm64-gnu@npm:1.32.0"+ conditions: os=linux & cpu=arm64 & libc=glibc+ languageName: node+ linkType: hard++"lightningcss-linux-arm64-musl@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-linux-arm64-musl@npm:1.32.0"+ conditions: os=linux & cpu=arm64 & libc=musl+ languageName: node+ linkType: hard++"lightningcss-linux-x64-gnu@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-linux-x64-gnu@npm:1.32.0"+ conditions: os=linux & cpu=x64 & libc=glibc+ languageName: node+ linkType: hard++"lightningcss-linux-x64-musl@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-linux-x64-musl@npm:1.32.0"+ conditions: os=linux & cpu=x64 & libc=musl+ languageName: node+ linkType: hard++"lightningcss-win32-arm64-msvc@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-win32-arm64-msvc@npm:1.32.0"+ conditions: os=win32 & cpu=arm64+ languageName: node+ linkType: hard++"lightningcss-win32-x64-msvc@npm:1.32.0":+ version: 1.32.0+ resolution: "lightningcss-win32-x64-msvc@npm:1.32.0"+ conditions: os=win32 & cpu=x64+ languageName: node+ linkType: hard++"lightningcss@npm:^1.32.0":+ version: 1.32.0+ resolution: "lightningcss@npm:1.32.0"+ dependencies:+ detect-libc: "npm:^2.0.3"+ lightningcss-android-arm64: "npm:1.32.0"+ lightningcss-darwin-arm64: "npm:1.32.0"+ lightningcss-darwin-x64: "npm:1.32.0"+ lightningcss-freebsd-x64: "npm:1.32.0"+ lightningcss-linux-arm-gnueabihf: "npm:1.32.0"+ lightningcss-linux-arm64-gnu: "npm:1.32.0"+ lightningcss-linux-arm64-musl: "npm:1.32.0"+ lightningcss-linux-x64-gnu: "npm:1.32.0"+ lightningcss-linux-x64-musl: "npm:1.32.0"+ lightningcss-win32-arm64-msvc: "npm:1.32.0"+ lightningcss-win32-x64-msvc: "npm:1.32.0"+ dependenciesMeta:+ lightningcss-android-arm64:+ optional: true+ lightningcss-darwin-arm64:+ optional: true+ lightningcss-darwin-x64:+ optional: true+ lightningcss-freebsd-x64:+ optional: true+ lightningcss-linux-arm-gnueabihf:+ optional: true+ lightningcss-linux-arm64-gnu:+ optional: true+ lightningcss-linux-arm64-musl:+ optional: true+ lightningcss-linux-x64-gnu:+ optional: true+ lightningcss-linux-x64-musl:+ optional: true+ lightningcss-win32-arm64-msvc:+ optional: true+ lightningcss-win32-x64-msvc:+ optional: true+ checksum: 10c0/70945bd55097af46fc9fab7f5ed09cd5869d85940a2acab7ee06d0117004a1d68155708a2d462531cea2fc3c67aefc9333a7068c80b0b78dd404c16838809e03+ languageName: node+ linkType: hard++"lodash@npm:^4.17.20, lodash@npm:^4.17.21":+ version: 4.18.1+ resolution: "lodash@npm:4.18.1"+ checksum: 10c0/757228fc68805c59789e82185135cf85f05d0b2d3d54631d680ca79ec21944ec8314d4533639a14b8bcfbd97a517e78960933041a5af17ecb693ec6eecb99a27+ languageName: node+ linkType: hard++"loose-envify@npm:^1.1.0":+ version: 1.4.0+ resolution: "loose-envify@npm:1.4.0"+ dependencies:+ js-tokens: "npm:^3.0.0 || ^4.0.0"+ bin:+ loose-envify: cli.js+ checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e+ languageName: node+ linkType: hard++"magic-string@npm:^0.30.21":+ version: 0.30.21+ resolution: "magic-string@npm:0.30.21"+ dependencies:+ "@jridgewell/sourcemap-codec": "npm:^1.5.5"+ checksum: 10c0/299378e38f9a270069fc62358522ddfb44e94244baa0d6a8980ab2a9b2490a1d03b236b447eee309e17eb3bddfa482c61259d47960eb018a904f0ded52780c4a+ languageName: node+ linkType: hard++"marked@npm:^18.0.5":+ version: 18.0.5+ resolution: "marked@npm:18.0.5"+ bin:+ marked: bin/marked.js+ checksum: 10c0/22763935a0a243c41851b010a086ea85a09951e379948b6aa629b6cecdcd66e3a5e8c4acac2f6b29c183c20609d3e5102495270207dfd5f4c46ddd773a4ddb9b+ languageName: node+ linkType: hard++"math-intrinsics@npm:^1.1.0":+ version: 1.1.0+ resolution: "math-intrinsics@npm:1.1.0"+ checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f+ languageName: node+ linkType: hard++"mime-db@npm:1.52.0":+ version: 1.52.0+ resolution: "mime-db@npm:1.52.0"+ checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa+ languageName: node+ linkType: hard++"mime-types@npm:^2.1.35":+ version: 2.1.35+ resolution: "mime-types@npm:2.1.35"+ dependencies:+ mime-db: "npm:1.52.0"+ checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2+ languageName: node+ linkType: hard++"mimic-fn@npm:^2.1.0":+ version: 2.1.0+ resolution: "mimic-fn@npm:2.1.0"+ checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4+ languageName: node+ linkType: hard++"minipass@npm:^7.0.4, minipass@npm:^7.1.2":+ version: 7.1.3+ resolution: "minipass@npm:7.1.3"+ checksum: 10c0/539da88daca16533211ea5a9ee98dc62ff5742f531f54640dd34429e621955e91cc280a91a776026264b7f9f6735947629f920944e9c1558369e8bf22eb33fbb+ languageName: node+ linkType: hard++"minizlib@npm:^3.1.0":+ version: 3.1.0+ resolution: "minizlib@npm:3.1.0"+ dependencies:+ minipass: "npm:^7.1.2"+ checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec+ languageName: node+ linkType: hard++"ms@npm:^2.1.3":+ version: 2.1.3+ resolution: "ms@npm:2.1.3"+ checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48+ languageName: node+ linkType: hard++"mute-stream@npm:^3.0.0":+ version: 3.0.0+ resolution: "mute-stream@npm:3.0.0"+ checksum: 10c0/12cdb36a101694c7a6b296632e6d93a30b74401873cf7507c88861441a090c71c77a58f213acadad03bc0c8fa186639dec99d68a14497773a8744320c136e701+ languageName: node+ linkType: hard++"nanoid@npm:^3.3.12":+ version: 3.3.15+ resolution: "nanoid@npm:3.3.15"+ bin:+ nanoid: bin/nanoid.cjs+ checksum: 10c0/e0b12e3a1d361f74150fa4b25631d0ae29f7162dab01a12f0f1be1f53b7a2a219f9b729504e474d4821207d0fe349bd3c97569ab5cf7ec2fff6aa94711956c93+ languageName: node+ linkType: hard++"node-fetch@npm:^2.6.1":+ version: 2.7.0+ resolution: "node-fetch@npm:2.7.0"+ dependencies:+ whatwg-url: "npm:^5.0.0"+ peerDependencies:+ encoding: ^0.1.0+ peerDependenciesMeta:+ encoding:+ optional: true+ checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8+ languageName: node+ linkType: hard++"node-gyp@npm:latest":+ version: 13.0.0+ resolution: "node-gyp@npm:13.0.0"+ dependencies:+ env-paths: "npm:^2.2.0"+ exponential-backoff: "npm:^3.1.1"+ graceful-fs: "npm:^4.2.6"+ nopt: "npm:^10.0.0"+ proc-log: "npm:^7.0.0"+ semver: "npm:^7.3.5"+ tar: "npm:^7.5.4"+ tinyglobby: "npm:^0.2.12"+ undici: "npm:^6.25.0"+ which: "npm:^7.0.0"+ bin:+ node-gyp: bin/node-gyp.js+ checksum: 10c0/e7525c427db2d16aa368b8947187de83083d2a8dda23e3e096a71c22ae637ac5bb8ed7cf6c871f1b9118cd2729dbfee4ff3a4245e2b79226900227b15831b492+ languageName: node+ linkType: hard++"nopt@npm:^10.0.0":+ version: 10.0.1+ resolution: "nopt@npm:10.0.1"+ dependencies:+ abbrev: "npm:^5.0.0"+ bin:+ nopt: bin/nopt.js+ checksum: 10c0/980d89257f9587f3e1f77877ddbf905d6aa3b738ec33e49a4fa1a059a0dd82eb28063982b150654a7ae9de386f2ead60e56172db7d37cf56de545f7392a2a26a+ languageName: node+ linkType: hard++"obug@npm:^2.1.1":+ version: 2.1.3+ resolution: "obug@npm:2.1.3"+ checksum: 10c0/cb8187fed0a5fc8445507c950e89f3c1bd43895658c398b5803f6b7804dfa0c562975ecce1e67f3d9247d521452a5bfade9e0e951cc0326b7444272f7c24d25f+ languageName: node+ linkType: hard++"onetime@npm:^5.1.0":+ version: 5.1.2+ resolution: "onetime@npm:5.1.2"+ dependencies:+ mimic-fn: "npm:^2.1.0"+ checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f+ languageName: node+ linkType: hard++"oxlint@npm:^0.16.0":+ version: 0.16.12+ resolution: "oxlint@npm:0.16.12"+ dependencies:+ "@oxlint/darwin-arm64": "npm:0.16.12"+ "@oxlint/darwin-x64": "npm:0.16.12"+ "@oxlint/linux-arm64-gnu": "npm:0.16.12"+ "@oxlint/linux-arm64-musl": "npm:0.16.12"+ "@oxlint/linux-x64-gnu": "npm:0.16.12"+ "@oxlint/linux-x64-musl": "npm:0.16.12"+ "@oxlint/win32-arm64": "npm:0.16.12"+ "@oxlint/win32-x64": "npm:0.16.12"+ dependenciesMeta:+ "@oxlint/darwin-arm64":+ optional: true+ "@oxlint/darwin-x64":+ optional: true+ "@oxlint/linux-arm64-gnu":+ optional: true+ "@oxlint/linux-arm64-musl":+ optional: true+ "@oxlint/linux-x64-gnu":+ optional: true+ "@oxlint/linux-x64-musl":+ optional: true+ "@oxlint/win32-arm64":+ optional: true+ "@oxlint/win32-x64":+ optional: true+ bin:+ oxc_language_server: bin/oxc_language_server+ oxlint: bin/oxlint+ checksum: 10c0/209c3484039c4f1fdd340689e81be93a70fdf74e8c111731e70d81580d223b0029439107c95fa4118cec3c9b03ba6c56624d3dcb8cdc79af222da3561122b3e7+ languageName: node+ linkType: hard++"pako@npm:^1.0.10, pako@npm:^1.0.11, pako@npm:^1.0.6":+ version: 1.0.11+ resolution: "pako@npm:1.0.11"+ checksum: 10c0/86dd99d8b34c3930345b8bbeb5e1cd8a05f608eeb40967b293f72fe469d0e9c88b783a8777e4cc7dc7c91ce54c5e93d88ff4b4f060e6ff18408fd21030d9ffbe+ languageName: node+ linkType: hard++"patch-console@npm:^2.0.0":+ version: 2.0.0+ resolution: "patch-console@npm:2.0.0"+ checksum: 10c0/486602591a0af7af8d4c76d8eea42cad32b6de7200488819c6383c75e43733ca7bdc80e30f2e68ce05f06a1607cce1683a1706c6672ca27dada1921b366e8f1c+ languageName: node+ linkType: hard++"pathe@npm:^2.0.3":+ version: 2.0.3+ resolution: "pathe@npm:2.0.3"+ checksum: 10c0/c118dc5a8b5c4166011b2b70608762e260085180bb9e33e80a50dcdb1e78c010b1624f4280c492c92b05fc276715a4c357d1f9edc570f8f1b3d90b6839ebaca1+ languageName: node+ linkType: hard++"pdf-lib@npm:^1.17.1":+ version: 1.17.1+ resolution: "pdf-lib@npm:1.17.1"+ dependencies:+ "@pdf-lib/standard-fonts": "npm:^1.0.0"+ "@pdf-lib/upng": "npm:^1.0.1"+ pako: "npm:^1.0.11"+ tslib: "npm:^1.11.1"+ checksum: 10c0/a9489a402880dacd1389a3e14ff8f6139d58e3bc82f26b0fcbd0798b841aee6ccb7fcfab0992b574e57b40404ced0330a7170b3c6467363461a9df5d9daec489+ languageName: node+ linkType: hard++"picocolors@npm:^1.1.1":+ version: 1.1.1+ resolution: "picocolors@npm:1.1.1"+ checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58+ languageName: node+ linkType: hard++"picomatch@npm:^4.0.3, picomatch@npm:^4.0.4":+ version: 4.0.4+ resolution: "picomatch@npm:4.0.4"+ checksum: 10c0/e2c6023372cc7b5764719a5ffb9da0f8e781212fa7ca4bd0562db929df8e117460f00dff3cb7509dacfc06b86de924b247f504d0ce1806a37fac4633081466b0+ languageName: node+ linkType: hard++"postcss@npm:^8.5.15":+ version: 8.5.16+ resolution: "postcss@npm:8.5.16"+ dependencies:+ nanoid: "npm:^3.3.12"+ picocolors: "npm:^1.1.1"+ source-map-js: "npm:^1.2.1"+ checksum: 10c0/625de7a02f662f3a340964d14b487bd5097adf16f5f171e257d19005ba37aea8768ee446557500e88e91ca46b4d14d6cb4a0bf033c6ec0c8c0b660d85719f1ef+ languageName: node+ linkType: hard++"preact@npm:^10.28.3":+ version: 10.29.3+ resolution: "preact@npm:10.29.3"+ checksum: 10c0/deede846649c6f31888d36b60de2d2433a85c533268b328af82da11a5c1d9b6f12439bdab6dca3cf7a20720b4137c2f1644c12db21b30b18360766ab70c8fe06+ languageName: node+ linkType: hard++"prettier@npm:^3.8.3":+ version: 3.9.4+ resolution: "prettier@npm:3.9.4"+ bin:+ prettier: bin/prettier.cjs+ checksum: 10c0/dc6ec13d692745c6b7e7bf39beda9eb1b3b76c619118319bce393928c392264b1273337c75f80499695e165affefc7b3a9d2ebb18983af0a8f4dfbb2f45f6ff3+ languageName: node+ linkType: hard++"proc-log@npm:^7.0.0":+ version: 7.0.0+ resolution: "proc-log@npm:7.0.0"+ checksum: 10c0/b89c2d862604f35fec795477b0c7e376feab3ba0d4f4d291c4e959567442697cf451ac557d0623c1cc38af45a78128b983410f397a10c5d3a67f76c33de4754b+ languageName: node+ linkType: hard++"proxy-from-env@npm:^2.1.0":+ version: 2.1.0+ resolution: "proxy-from-env@npm:2.1.0"+ checksum: 10c0/ed01729fd4d094eab619cd7e17ce3698b3413b31eb102c4904f9875e677cd207392795d5b4adee9cec359dfd31c44d5ad7595a3a3ad51c40250e141512281c58+ languageName: node+ linkType: hard++"react-dom@npm:^18.2.0":+ version: 18.3.1+ resolution: "react-dom@npm:18.3.1"+ dependencies:+ loose-envify: "npm:^1.1.0"+ scheduler: "npm:^0.23.2"+ peerDependencies:+ react: ^18.3.1+ checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85+ languageName: node+ linkType: hard++"react-dom@npm:^19.2.0":+ version: 19.2.7+ resolution: "react-dom@npm:19.2.7"+ dependencies:+ scheduler: "npm:^0.27.0"+ peerDependencies:+ react: ^19.2.7+ checksum: 10c0/970ff600f6e80d47d39e2f226f12f226173b3cba3382efc97c5f0cd663de9af38c7a4c11c213fb936094faeac83060d660247accaa96b752180d5b951b9cfecb+ languageName: node+ linkType: hard++"react-reconciler@npm:^0.33.0":+ version: 0.33.0+ resolution: "react-reconciler@npm:0.33.0"+ dependencies:+ scheduler: "npm:^0.27.0"+ peerDependencies:+ react: ^19.2.0+ checksum: 10c0/3f7b27ea8d0ff4c8bf0e402a285e1af9b7d0e6f4c1a70a28f4384938bc1130bc82a90a31df0b79ef5e380e2e55e2598bd90b4dbf802b1203d735ba0355817d3a+ languageName: node+ linkType: hard++"react@npm:^18.2.0":+ version: 18.3.1+ resolution: "react@npm:18.3.1"+ dependencies:+ loose-envify: "npm:^1.1.0"+ checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3+ languageName: node+ linkType: hard++"react@npm:^19.2.0":+ version: 19.2.7+ resolution: "react@npm:19.2.7"+ checksum: 10c0/0bd0e2f1bbd4ba97561c6597bf8a5fec05e6476fe61e165c1065598d16668efc6715205599c94d3ddd49d36cb0f21cbf1b9bcc18ee840b805ce222c3e8d558ac+ languageName: node+ linkType: hard++"readdirp@npm:^4.0.1":+ version: 4.1.2+ resolution: "readdirp@npm:4.1.2"+ checksum: 10c0/60a14f7619dec48c9c850255cd523e2717001b0e179dc7037cfa0895da7b9e9ab07532d324bfb118d73a710887d1e35f79c495fa91582784493e085d18c72c62+ languageName: node+ linkType: hard++"restore-cursor@npm:^4.0.0":+ version: 4.0.0+ resolution: "restore-cursor@npm:4.0.0"+ dependencies:+ onetime: "npm:^5.1.0"+ signal-exit: "npm:^3.0.2"+ checksum: 10c0/6f7da8c5e422ac26aa38354870b1afac09963572cf2879443540449068cb43476e9cbccf6f8de3e0171e0d6f7f533c2bc1a0a008003c9a525bbc098e89041318+ languageName: node+ linkType: hard++"rolldown@npm:~1.1.2":+ version: 1.1.3+ resolution: "rolldown@npm:1.1.3"+ dependencies:+ "@oxc-project/types": "npm:=0.137.0"+ "@rolldown/binding-android-arm64": "npm:1.1.3"+ "@rolldown/binding-darwin-arm64": "npm:1.1.3"+ "@rolldown/binding-darwin-x64": "npm:1.1.3"+ "@rolldown/binding-freebsd-x64": "npm:1.1.3"+ "@rolldown/binding-linux-arm-gnueabihf": "npm:1.1.3"+ "@rolldown/binding-linux-arm64-gnu": "npm:1.1.3"+ "@rolldown/binding-linux-arm64-musl": "npm:1.1.3"+ "@rolldown/binding-linux-ppc64-gnu": "npm:1.1.3"+ "@rolldown/binding-linux-s390x-gnu": "npm:1.1.3"+ "@rolldown/binding-linux-x64-gnu": "npm:1.1.3"+ "@rolldown/binding-linux-x64-musl": "npm:1.1.3"+ "@rolldown/binding-openharmony-arm64": "npm:1.1.3"+ "@rolldown/binding-wasm32-wasi": "npm:1.1.3"+ "@rolldown/binding-win32-arm64-msvc": "npm:1.1.3"+ "@rolldown/binding-win32-x64-msvc": "npm:1.1.3"+ "@rolldown/pluginutils": "npm:^1.0.0"+ dependenciesMeta:+ "@rolldown/binding-android-arm64":+ optional: true+ "@rolldown/binding-darwin-arm64":+ optional: true+ "@rolldown/binding-darwin-x64":+ optional: true+ "@rolldown/binding-freebsd-x64":+ optional: true+ "@rolldown/binding-linux-arm-gnueabihf":+ optional: true+ "@rolldown/binding-linux-arm64-gnu":+ optional: true+ "@rolldown/binding-linux-arm64-musl":+ optional: true+ "@rolldown/binding-linux-ppc64-gnu":+ optional: true+ "@rolldown/binding-linux-s390x-gnu":+ optional: true+ "@rolldown/binding-linux-x64-gnu":+ optional: true+ "@rolldown/binding-linux-x64-musl":+ optional: true+ "@rolldown/binding-openharmony-arm64":+ optional: true+ "@rolldown/binding-wasm32-wasi":+ optional: true+ "@rolldown/binding-win32-arm64-msvc":+ optional: true+ "@rolldown/binding-win32-x64-msvc":+ optional: true+ bin:+ rolldown: ./bin/cli.mjs+ checksum: 10c0/6dae11bee45c56d000d5d2608ac78b2c7125b7f10337e0b0bbdee7290c352104f1f76072f8c0e6ccad331f51f1a131fc37faa179d9c4a10cc16abc87f85f6e86+ languageName: node+ linkType: hard++"run-async@npm:^4.0.6":+ version: 4.0.6+ resolution: "run-async@npm:4.0.6"+ checksum: 10c0/3e512c689d356238a06a59839deddeb09aec23bc66f780fe970fcf12b64bfc00c6880e9530ea22b8cf88a927145561f5a43343d8be87166e849ec0daaa3d4cf4+ languageName: node+ linkType: hard++"safer-buffer@npm:>= 2.1.2 < 3.0.0":+ version: 2.1.2+ resolution: "safer-buffer@npm:2.1.2"+ checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4+ languageName: node+ linkType: hard++"scheduler@npm:^0.23.2":+ version: 0.23.2+ resolution: "scheduler@npm:0.23.2"+ dependencies:+ loose-envify: "npm:^1.1.0"+ checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78+ languageName: node+ linkType: hard++"scheduler@npm:^0.27.0":+ version: 0.27.0+ resolution: "scheduler@npm:0.27.0"+ checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452+ languageName: node+ linkType: hard++"semver@npm:7.6.3":+ version: 7.6.3+ resolution: "semver@npm:7.6.3"+ bin:+ semver: bin/semver.js+ checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf+ languageName: node+ linkType: hard++"semver@npm:^7.3.5, semver@npm:^7.7.3":+ version: 7.8.5+ resolution: "semver@npm:7.8.5"+ bin:+ semver: bin/semver.js+ checksum: 10c0/b1f3127a5be8125a94f37188b361c212466c292c6910adce3ec106cff5dc211ccaedc4739c11bb70fda59d6fc1f040a9bca289f4e093451521a2372e5231fe0c+ languageName: node+ linkType: hard++"sharp@npm:^0.34.5":+ version: 0.34.5+ resolution: "sharp@npm:0.34.5"+ dependencies:+ "@img/colour": "npm:^1.0.0"+ "@img/sharp-darwin-arm64": "npm:0.34.5"+ "@img/sharp-darwin-x64": "npm:0.34.5"+ "@img/sharp-libvips-darwin-arm64": "npm:1.2.4"+ "@img/sharp-libvips-darwin-x64": "npm:1.2.4"+ "@img/sharp-libvips-linux-arm": "npm:1.2.4"+ "@img/sharp-libvips-linux-arm64": "npm:1.2.4"+ "@img/sharp-libvips-linux-ppc64": "npm:1.2.4"+ "@img/sharp-libvips-linux-riscv64": "npm:1.2.4"+ "@img/sharp-libvips-linux-s390x": "npm:1.2.4"+ "@img/sharp-libvips-linux-x64": "npm:1.2.4"+ "@img/sharp-libvips-linuxmusl-arm64": "npm:1.2.4"+ "@img/sharp-libvips-linuxmusl-x64": "npm:1.2.4"+ "@img/sharp-linux-arm": "npm:0.34.5"+ "@img/sharp-linux-arm64": "npm:0.34.5"+ "@img/sharp-linux-ppc64": "npm:0.34.5"+ "@img/sharp-linux-riscv64": "npm:0.34.5"+ "@img/sharp-linux-s390x": "npm:0.34.5"+ "@img/sharp-linux-x64": "npm:0.34.5"+ "@img/sharp-linuxmusl-arm64": "npm:0.34.5"+ "@img/sharp-linuxmusl-x64": "npm:0.34.5"+ "@img/sharp-wasm32": "npm:0.34.5"+ "@img/sharp-win32-arm64": "npm:0.34.5"+ "@img/sharp-win32-ia32": "npm:0.34.5"+ "@img/sharp-win32-x64": "npm:0.34.5"+ detect-libc: "npm:^2.1.2"+ semver: "npm:^7.7.3"+ dependenciesMeta:+ "@img/sharp-darwin-arm64":+ optional: true+ "@img/sharp-darwin-x64":+ optional: true+ "@img/sharp-libvips-darwin-arm64":+ optional: true+ "@img/sharp-libvips-darwin-x64":+ optional: true+ "@img/sharp-libvips-linux-arm":+ optional: true+ "@img/sharp-libvips-linux-arm64":+ optional: true+ "@img/sharp-libvips-linux-ppc64":+ optional: true+ "@img/sharp-libvips-linux-riscv64":+ optional: true+ "@img/sharp-libvips-linux-s390x":+ optional: true+ "@img/sharp-libvips-linux-x64":+ optional: true+ "@img/sharp-libvips-linuxmusl-arm64":+ optional: true+ "@img/sharp-libvips-linuxmusl-x64":+ optional: true+ "@img/sharp-linux-arm":+ optional: true+ "@img/sharp-linux-arm64":+ optional: true+ "@img/sharp-linux-ppc64":+ optional: true+ "@img/sharp-linux-riscv64":+ optional: true+ "@img/sharp-linux-s390x":+ optional: true+ "@img/sharp-linux-x64":+ optional: true+ "@img/sharp-linuxmusl-arm64":+ optional: true+ "@img/sharp-linuxmusl-x64":+ optional: true+ "@img/sharp-wasm32":+ optional: true+ "@img/sharp-win32-arm64":+ optional: true+ "@img/sharp-win32-ia32":+ optional: true+ "@img/sharp-win32-x64":+ optional: true+ checksum: 10c0/fd79e29df0597a7d5704b8461c51f944ead91a5243691697be6e8243b966402beda53ddc6f0a53b96ea3cb8221f0b244aa588114d3ebf8734fb4aefd41ab802f+ languageName: node+ linkType: hard++"siginfo@npm:^2.0.0":+ version: 2.0.0+ resolution: "siginfo@npm:2.0.0"+ checksum: 10c0/3def8f8e516fbb34cb6ae415b07ccc5d9c018d85b4b8611e3dc6f8be6d1899f693a4382913c9ed51a06babb5201639d76453ab297d1c54a456544acf5c892e34+ languageName: node+ linkType: hard++"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7":+ version: 3.0.7+ resolution: "signal-exit@npm:3.0.7"+ checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912+ languageName: node+ linkType: hard++"signal-exit@npm:^4.1.0":+ version: 4.1.0+ resolution: "signal-exit@npm:4.1.0"+ checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83+ languageName: node+ linkType: hard++"slice-ansi@npm:^8.0.0":+ version: 8.0.0+ resolution: "slice-ansi@npm:8.0.0"+ dependencies:+ ansi-styles: "npm:^6.2.3"+ is-fullwidth-code-point: "npm:^5.1.0"+ checksum: 10c0/0ce4aa91febb7cea4a00c2c27bb820fa53b6d2862ce0f80f7120134719f7914fc416b0ed966cf35250a3169e152916392f35917a2d7cad0fcc5d8b841010fa9a+ languageName: node+ linkType: hard++"source-map-js@npm:^1.2.1":+ version: 1.2.1+ resolution: "source-map-js@npm:1.2.1"+ checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf+ languageName: node+ linkType: hard++"stack-utils@npm:^2.0.6":+ version: 2.0.6+ resolution: "stack-utils@npm:2.0.6"+ dependencies:+ escape-string-regexp: "npm:^2.0.0"+ checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a+ languageName: node+ linkType: hard++"stackback@npm:0.0.2":+ version: 0.0.2+ resolution: "stackback@npm:0.0.2"+ checksum: 10c0/89a1416668f950236dd5ac9f9a6b2588e1b9b62b1b6ad8dff1bfc5d1a15dbf0aafc9b52d2226d00c28dffff212da464eaeebfc6b7578b9d180cef3e3782c5983+ languageName: node+ linkType: hard++"std-env@npm:^4.0.0-rc.1":+ version: 4.1.0+ resolution: "std-env@npm:4.1.0"+ checksum: 10c0/2e14b6b490db34cb969a48d9cf7c35bca4a47653914aac2814221baae7b867a5b15940d133625c391621971f98cd2266a5dc7036669960e883f1081db2a56558+ languageName: node+ linkType: hard++"string-width@npm:^7.0.0":+ version: 7.2.0+ resolution: "string-width@npm:7.2.0"+ dependencies:+ emoji-regex: "npm:^10.3.0"+ get-east-asian-width: "npm:^1.0.0"+ strip-ansi: "npm:^7.1.0"+ checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9+ languageName: node+ linkType: hard++"string-width@npm:^8.1.0, string-width@npm:^8.1.1, string-width@npm:^8.2.0":+ version: 8.2.1+ resolution: "string-width@npm:8.2.1"+ dependencies:+ get-east-asian-width: "npm:^1.5.0"+ strip-ansi: "npm:^7.1.2"+ checksum: 10c0/d467b4eaf4c40a01bb438a2620e77badd2456ffd5131c9973abe4f3acf7c802d5b21f3b6a00a5e33a7fc28ca8f9c103226e01bac61e9f259659c6f46d78e353a+ languageName: node+ linkType: hard++"strip-ansi@npm:^7.1.0, strip-ansi@npm:^7.1.2":+ version: 7.2.0+ resolution: "strip-ansi@npm:7.2.0"+ dependencies:+ ansi-regex: "npm:^6.2.2"+ checksum: 10c0/544d13b7582f8254811ea97db202f519e189e59d35740c46095897e254e4f1aa9fe1524a83ad6bc5ad67d4dd6c0281d2e0219ed62b880a6238a16a17d375f221+ languageName: node+ linkType: hard++"subscriptions-transport-ws@npm:^0.9.16":+ version: 0.9.19+ resolution: "subscriptions-transport-ws@npm:0.9.19"+ dependencies:+ backo2: "npm:^1.0.2"+ eventemitter3: "npm:^3.1.0"+ iterall: "npm:^1.2.1"+ symbol-observable: "npm:^1.0.4"+ ws: "npm:^5.2.0 || ^6.0.0 || ^7.0.0"+ peerDependencies:+ graphql: ">=0.10.0"+ checksum: 10c0/6f2ade56865f0ba291d3ff82c79781b051c2374873bac853286fedfdbc05001b8c4018ab7cba44af667ead7f573e48d18892d58a8f9ca8d90dfb4bff5c125045+ languageName: node+ linkType: hard++"symbol-observable@npm:^1.0.4":+ version: 1.2.0+ resolution: "symbol-observable@npm:1.2.0"+ checksum: 10c0/009fee50798ef80ed4b8195048288f108b03de162db07493f2e1fd993b33fafa72d659e832b584da5a2427daa78e5a738fb2a9ab027ee9454252e0bedbcd1fdc+ languageName: node+ linkType: hard++"tagged-tag@npm:^1.0.0":+ version: 1.0.0+ resolution: "tagged-tag@npm:1.0.0"+ checksum: 10c0/91d25c9ffb86a91f20522cefb2cbec9b64caa1febe27ad0df52f08993ff60888022d771e868e6416cf2e72dab68449d2139e8709ba009b74c6c7ecd4000048d1+ languageName: node+ linkType: hard++"tar@npm:^7.5.4":+ version: 7.5.19+ resolution: "tar@npm:7.5.19"+ dependencies:+ "@isaacs/fs-minipass": "npm:^4.0.0"+ chownr: "npm:^3.0.0"+ minipass: "npm:^7.1.2"+ minizlib: "npm:^3.1.0"+ yallist: "npm:^5.0.0"+ checksum: 10c0/7022e8cb04a8ceccc0689f2c731743fa2aab2e3c3f559f7dbc37b65ef7d5913049b427284eded2ec0765c5db5ff72dd7939fe2ae15785ff422cef2116c95d798+ languageName: node+ linkType: hard++"terminal-size@npm:^4.0.1":+ version: 4.0.1+ resolution: "terminal-size@npm:4.0.1"+ checksum: 10c0/89afd9d816dd9dbfe4499da9aeea70491bbde4ff4592226a9c8ac71074a7580afead6a78e95ecc35f6d42e09087b55ffcb1019302cd55e0cc957b6ce5c4847e8+ languageName: node+ linkType: hard++"tinybench@npm:^2.9.0":+ version: 2.9.0+ resolution: "tinybench@npm:2.9.0"+ checksum: 10c0/c3500b0f60d2eb8db65250afe750b66d51623057ee88720b7f064894a6cb7eb93360ca824a60a31ab16dab30c7b1f06efe0795b352e37914a9d4bad86386a20c+ languageName: node+ linkType: hard++"tinyexec@npm:^1.0.2":+ version: 1.2.4+ resolution: "tinyexec@npm:1.2.4"+ checksum: 10c0/153b8db6b080194b558ff145b9cffc36b80a6e07babd644dcfbe49c807eee668c876049d28bdee90b96304476f883352f2dad91b3f86bc23832532f4363e66ff+ languageName: node+ linkType: hard++"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.15, tinyglobby@npm:^0.2.17":+ version: 0.2.17+ resolution: "tinyglobby@npm:0.2.17"+ dependencies:+ fdir: "npm:^6.5.0"+ picomatch: "npm:^4.0.4"+ checksum: 10c0/7f7bb0f197c88bc4b20c231e0deca4240ca3bf313a88f5a7fee93a872b84966a4d50220947c0455ad07a60b3b360961c5b7fd979222aeb716a9f99b412002e4c+ languageName: node+ linkType: hard++"tinyrainbow@npm:^3.1.0":+ version: 3.1.0+ resolution: "tinyrainbow@npm:3.1.0"+ checksum: 10c0/f11cf387a26c5c9255bec141a90ac511b26172981b10c3e50053bc6700ea7d2336edcc4a3a21dbb8412fe7c013477d2ba4d7e4877800f3f8107be5105aad6511+ languageName: node+ linkType: hard++"tr46@npm:~0.0.3":+ version: 0.0.3+ resolution: "tr46@npm:0.0.3"+ checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11+ languageName: node+ linkType: hard++"tsconfck@npm:^3.0.3":+ version: 3.1.6+ resolution: "tsconfck@npm:3.1.6"+ peerDependencies:+ typescript: ^5.0.0+ peerDependenciesMeta:+ typescript:+ optional: true+ bin:+ tsconfck: bin/tsconfck.js+ checksum: 10c0/269c3c513540be44844117bb9b9258fe6f8aeab026d32aeebf458d5299125f330711429dbb556dbf125a0bc25f4a81e6c24ac96de2740badd295c3fb400f66c4+ languageName: node+ linkType: hard++"tslib@npm:^1.11.1, tslib@npm:^1.9.3":+ version: 1.14.1+ resolution: "tslib@npm:1.14.1"+ checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2+ languageName: node+ linkType: hard++"tslib@npm:^2.0.0, tslib@npm:^2.4.0":+ version: 2.8.1+ resolution: "tslib@npm:2.8.1"+ checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62+ languageName: node+ linkType: hard++"twenty-client-sdk@npm:2.18.0, twenty-client-sdk@npm:^2.16.0":+ version: 2.18.0+ resolution: "twenty-client-sdk@npm:2.18.0"+ dependencies:+ "@genql/runtime": "npm:^2.10.0"+ esbuild: "npm:^0.28.1"+ graphql: "npm:^16.8.1"+ lodash: "npm:^4.17.21"+ prettier: "npm:^3.8.3"+ checksum: 10c0/3b7d6ca4e7b59c04cd2348af0f2ba8de153e70d565b4a38c2744b44998dfcc6c2bdb84ba6315cec208953d8c6fa7573ab33c17355f971f279299d470c57be06e+ languageName: node+ linkType: hard++"twenty-sdk@npm:^2.16.0":+ version: 2.18.0+ resolution: "twenty-sdk@npm:2.18.0"+ dependencies:+ "@sniptt/guards": "npm:^0.2.0"+ axios: "npm:^1.16.0"+ chalk: "npm:^5.3.0"+ chokidar: "npm:^4.0.0"+ commander: "npm:^12.0.0"+ esbuild: "npm:^0.28.1"+ graphql: "npm:^16.8.1"+ graphql-sse: "npm:^2.5.4"+ ink: "npm:^6.8.0"+ inquirer: "npm:^14.0.0"+ jsonc-parser: "npm:^3.2.0"+ preact: "npm:^10.28.3"+ react: "npm:^19.2.0"+ react-dom: "npm:^19.2.0"+ semver: "npm:7.6.3"+ sharp: "npm:^0.34.5"+ tinyglobby: "npm:^0.2.15"+ twenty-client-sdk: "npm:2.18.0"+ typescript: "npm:^5.9.3"+ uuid: "npm:^13.0.2"+ bin:+ twenty: dist/cli.cjs+ checksum: 10c0/7e6d300894c427029e4124047614b55988671c914332613acb38f830cee11ecc480ff2a586b6153756aab1b7fa7f4520cf072c9db1428cd9ce9b9f7a62dfcd64+ languageName: node+ linkType: hard++"type-fest@npm:^5.4.1":+ version: 5.7.0+ resolution: "type-fest@npm:5.7.0"+ dependencies:+ tagged-tag: "npm:^1.0.0"+ checksum: 10c0/f71ed17b753649421e419db8cc2e140f930333a1467b1d9cca2e0e4052900fd442f2360bae73f3a6bf9340d949ac46d9a1598c709b4c8089272e7624df9c8716+ languageName: node+ linkType: hard++"typescript@npm:^5.9.3":+ version: 5.9.3+ resolution: "typescript@npm:5.9.3"+ bin:+ tsc: bin/tsc+ tsserver: bin/tsserver+ checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5+ languageName: node+ linkType: hard++"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin<compat/typescript>":+ version: 5.9.3+ resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin<compat/typescript>::version=5.9.3&hash=5786d5"+ bin:+ tsc: bin/tsc+ tsserver: bin/tsserver+ checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430+ languageName: node+ linkType: hard++"undici-types@npm:~7.18.0":+ version: 7.18.2+ resolution: "undici-types@npm:7.18.2"+ checksum: 10c0/85a79189113a238959d7a647368e4f7c5559c3a404ebdb8fc4488145ce9426fcd82252a844a302798dfc0e37e6fb178ff481ed03bc4caf634c5757d9ef43521d+ languageName: node+ linkType: hard++"undici-types@npm:~8.3.0":+ version: 8.3.0+ resolution: "undici-types@npm:8.3.0"+ checksum: 10c0/c8aa7e2fbebfce519654dafadc0ece59be888d2ccaf180fb4495da875e7b536d2456345c384069c7e6f3e9c9ab7435f074957da306f142343eee86ff8048855a+ languageName: node+ linkType: hard++"undici@npm:^6.25.0":+ version: 6.27.0+ resolution: "undici@npm:6.27.0"+ checksum: 10c0/f88c3dae3957dbf9d93cb481440aced317bd3c4941b5914fea5efba516d51138988cdb5c76006f0bb1337e41d56c3443351055d492e73af2428521c37ba2a76f+ languageName: node+ linkType: hard++"unfetch@npm:^4.2.0":+ version: 4.2.0+ resolution: "unfetch@npm:4.2.0"+ checksum: 10c0/a5c0a896a6f09f278b868075aea65652ad185db30e827cb7df45826fe5ab850124bf9c44c4dafca4bf0c55a0844b17031e8243467fcc38dd7a7d435007151f1b+ languageName: node+ linkType: hard++"utility-types@npm:^3.10.0":+ version: 3.11.0+ resolution: "utility-types@npm:3.11.0"+ checksum: 10c0/2f1580137b0c3e6cf5405f37aaa8f5249961a76d26f1ca8efc0ff49a2fc0e0b2db56de8e521a174d075758e0c7eb3e590edec0832eb44478b958f09914920f19+ languageName: node+ linkType: hard++"uuid@npm:^13.0.2":+ version: 13.0.2+ resolution: "uuid@npm:13.0.2"+ bin:+ uuid: dist-node/bin/uuid+ checksum: 10c0/32c7ee84fa7c7966cc09b3a1514a752a8e2f609f15c00033fbaedc0255d577d1877b839f11ee537f37e587bbc620bbb98c3b3a1482931b8ed47d79497cd7a7cd+ languageName: node+ linkType: hard++"vite-tsconfig-paths@npm:^4.2.1":+ version: 4.3.2+ resolution: "vite-tsconfig-paths@npm:4.3.2"+ dependencies:+ debug: "npm:^4.1.1"+ globrex: "npm:^0.1.2"+ tsconfck: "npm:^3.0.3"+ peerDependencies:+ vite: "*"+ peerDependenciesMeta:+ vite:+ optional: true+ checksum: 10c0/f390ac1d1c3992fc5ac50f9274c1090f8b55ab34a89ea88893db9a6924a3b26c9f64bc1163615150ad100749db73b6b2cf1d57f6cd60df6e762ceb5b8ad30024+ languageName: node+ linkType: hard++"vite@npm:^6.0.0 || ^7.0.0 || ^8.0.0":+ version: 8.1.0+ resolution: "vite@npm:8.1.0"+ dependencies:+ fsevents: "npm:~2.3.3"+ lightningcss: "npm:^1.32.0"+ picomatch: "npm:^4.0.4"+ postcss: "npm:^8.5.15"+ rolldown: "npm:~1.1.2"+ tinyglobby: "npm:^0.2.17"+ peerDependencies:+ "@types/node": ^20.19.0 || >=22.12.0+ "@vitejs/devtools": ^0.3.0+ esbuild: ^0.27.0 || ^0.28.0+ jiti: ">=1.21.0"+ less: ^4.0.0+ sass: ^1.70.0+ sass-embedded: ^1.70.0+ stylus: ">=0.54.8"+ sugarss: ^5.0.0+ terser: ^5.16.0+ tsx: ^4.8.1+ yaml: ^2.4.2+ dependenciesMeta:+ fsevents:+ optional: true+ peerDependenciesMeta:+ "@types/node":+ optional: true+ "@vitejs/devtools":+ optional: true+ esbuild:+ optional: true+ jiti:+ optional: true+ less:+ optional: true+ sass:+ optional: true+ sass-embedded:+ optional: true+ stylus:+ optional: true+ sugarss:+ optional: true+ terser:+ optional: true+ tsx:+ optional: true+ yaml:+ optional: true+ bin:+ vite: bin/vite.js+ checksum: 10c0/d7e2da70169a7d93c68f5d0e246bdf2fb35d8835170663a28f01191d73e16b80322b5f229973ce754de80136be843481b0afa616bb8530b51e7454e4887c4b45+ languageName: node+ linkType: hard++"vitest@npm:^4.0.0":+ version: 4.1.9+ resolution: "vitest@npm:4.1.9"+ dependencies:+ "@vitest/expect": "npm:4.1.9"+ "@vitest/mocker": "npm:4.1.9"+ "@vitest/pretty-format": "npm:4.1.9"+ "@vitest/runner": "npm:4.1.9"+ "@vitest/snapshot": "npm:4.1.9"+ "@vitest/spy": "npm:4.1.9"+ "@vitest/utils": "npm:4.1.9"+ es-module-lexer: "npm:^2.0.0"+ expect-type: "npm:^1.3.0"+ magic-string: "npm:^0.30.21"+ obug: "npm:^2.1.1"+ pathe: "npm:^2.0.3"+ picomatch: "npm:^4.0.3"+ std-env: "npm:^4.0.0-rc.1"+ tinybench: "npm:^2.9.0"+ tinyexec: "npm:^1.0.2"+ tinyglobby: "npm:^0.2.15"+ tinyrainbow: "npm:^3.1.0"+ vite: "npm:^6.0.0 || ^7.0.0 || ^8.0.0"+ why-is-node-running: "npm:^2.3.0"+ peerDependencies:+ "@edge-runtime/vm": "*"+ "@opentelemetry/api": ^1.9.0+ "@types/node": ^20.0.0 || ^22.0.0 || >=24.0.0+ "@vitest/browser-playwright": 4.1.9+ "@vitest/browser-preview": 4.1.9+ "@vitest/browser-webdriverio": 4.1.9+ "@vitest/coverage-istanbul": 4.1.9+ "@vitest/coverage-v8": 4.1.9+ "@vitest/ui": 4.1.9+ happy-dom: "*"+ jsdom: "*"+ vite: ^6.0.0 || ^7.0.0 || ^8.0.0+ peerDependenciesMeta:+ "@edge-runtime/vm":+ optional: true+ "@opentelemetry/api":+ optional: true+ "@types/node":+ optional: true+ "@vitest/browser-playwright":+ optional: true+ "@vitest/browser-preview":+ optional: true+ "@vitest/browser-webdriverio":+ optional: true+ "@vitest/coverage-istanbul":+ optional: true+ "@vitest/coverage-v8":+ optional: true+ "@vitest/ui":+ optional: true+ happy-dom:+ optional: true+ jsdom:+ optional: true+ vite:+ optional: false+ bin:+ vitest: ./vitest.mjs+ checksum: 10c0/1ac80ef4991be82822a52aea48415f1bc64ddf8fd88ee24c172ec368f1d480fefacbde622c3c951982f7961a1d07313e18deaafc774d29e42ad6f6ffa63334a7+ languageName: node+ linkType: hard++"webidl-conversions@npm:^3.0.0":+ version: 3.0.1+ resolution: "webidl-conversions@npm:3.0.1"+ checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db+ languageName: node+ linkType: hard++"whatwg-url@npm:^5.0.0":+ version: 5.0.0+ resolution: "whatwg-url@npm:5.0.0"+ dependencies:+ tr46: "npm:~0.0.3"+ webidl-conversions: "npm:^3.0.0"+ checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5+ languageName: node+ linkType: hard++"which@npm:^7.0.0":+ version: 7.0.0+ resolution: "which@npm:7.0.0"+ dependencies:+ isexe: "npm:^4.0.0"+ bin:+ node-which: bin/which.js+ checksum: 10c0/ca0b54f198f78bbc4b7c02e34bda8d335cb352e0adb4cbca1c37b1a957af3a879a82c4c27ca6525bc942f548d8b64f816ef6528360af9f3de55ffb9b979b620d+ languageName: node+ linkType: hard++"why-is-node-running@npm:^2.3.0":+ version: 2.3.0+ resolution: "why-is-node-running@npm:2.3.0"+ dependencies:+ siginfo: "npm:^2.0.0"+ stackback: "npm:0.0.2"+ bin:+ why-is-node-running: cli.js+ checksum: 10c0/1cde0b01b827d2cf4cb11db962f3958b9175d5d9e7ac7361d1a7b0e2dc6069a263e69118bd974c4f6d0a890ef4eedfe34cf3d5167ec14203dbc9a18620537054+ languageName: node+ linkType: hard++"widest-line@npm:^6.0.0":+ version: 6.0.0+ resolution: "widest-line@npm:6.0.0"+ dependencies:+ string-width: "npm:^8.1.0"+ checksum: 10c0/735f1fdcd97fe765a07bb8b5e73c020bed8e53ab34e83ce0ef01693ba3c914d9e7977fe5f5facf0d0b670297a82dd5e376d3efa0896860dfcdaf7cd6924c0fb7+ languageName: node+ linkType: hard++"wrap-ansi@npm:^9.0.0":+ version: 9.0.2+ resolution: "wrap-ansi@npm:9.0.2"+ dependencies:+ ansi-styles: "npm:^6.2.1"+ string-width: "npm:^7.0.0"+ strip-ansi: "npm:^7.1.0"+ checksum: 10c0/3305839b9a0d6fb930cb63a52f34d3936013d8b0682ff3ec133c9826512620f213800ffa19ea22904876d5b7e9a3c1f40682f03597d986a4ca881fa7b033688c+ languageName: node+ linkType: hard++"ws@npm:^5.2.0 || ^6.0.0 || ^7.0.0":+ version: 7.5.11+ resolution: "ws@npm:7.5.11"+ peerDependencies:+ bufferutil: ^4.0.1+ utf-8-validate: ^5.0.2+ peerDependenciesMeta:+ bufferutil:+ optional: true+ utf-8-validate:+ optional: true+ checksum: 10c0/7972670b676fb1ccba73b0899ca3c2e04e8c2075629c2614cced7f556536f96a672bbf4619fc5a06c8b8720bb839a47ca88c69c95dc14c9c61a99fbecba1c866+ languageName: node+ linkType: hard++"ws@npm:^6.1.4":+ version: 6.2.4+ resolution: "ws@npm:6.2.4"+ dependencies:+ async-limiter: "npm:~1.0.0"+ checksum: 10c0/5c2b9474164f9cb68c7776a1d10b0461c186f3a69bffb1028fca33eba5ab7206a09173fb0b311d6c5a81c8cf148406f8deb0b7d899542ab8ca67407d99717dad+ languageName: node+ linkType: hard++"ws@npm:^8.18.0":+ version: 8.21.0+ resolution: "ws@npm:8.21.0"+ peerDependencies:+ bufferutil: ^4.0.1+ utf-8-validate: ">=5.0.2"+ peerDependenciesMeta:+ bufferutil:+ optional: true+ utf-8-validate:+ optional: true+ checksum: 10c0/ef4a243476283fc49bc7550966c4af4aa0eef56273837211e700de3b664e08604a760cdddcb5ba43c049140e74ccfec5b0ee0bb439e08c2adf9138902fdde5f9+ languageName: node+ linkType: hard++"yallist@npm:^5.0.0":+ version: 5.0.0+ resolution: "yallist@npm:5.0.0"+ checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416+ languageName: node+ linkType: hard++"yoga-layout@npm:~3.2.1":+ version: 3.2.1+ resolution: "yoga-layout@npm:3.2.1"+ checksum: 10c0/9001e51be993c85e03757e5a04a2b61b8b30c9e5a7865d0156ca87a6431a3b717d51eb4990bfe588189fcfeac688dd9c3de707bbd50d1c344a84e63974cc54a8+ languageName: node+ linkType: hard++"zen-observable-ts@npm:^0.8.21":+ version: 0.8.21+ resolution: "zen-observable-ts@npm:0.8.21"+ dependencies:+ tslib: "npm:^1.9.3"+ zen-observable: "npm:^0.8.0"+ checksum: 10c0/fe4a02f862b5f7e8ae0f86230c37b84c7d5611f5c206981afb4043e732d04cf7067a6cbe1ba82d20f18b735a3387937195a12542158a631d308ae3959a1d93c4+ languageName: node+ linkType: hard++"zen-observable@npm:^0.8.0":+ version: 0.8.15+ resolution: "zen-observable@npm:0.8.15"+ checksum: 10c0/71cc2f2bbb537300c3f569e25693d37b3bc91f225cefce251a71c30bc6bb3e7f8e9420ca0eb57f2ac9e492b085b8dfa075fd1e8195c40b83c951dd59c6e4fbf8+ languageName: node+ linkType: harddiff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/ai-agent.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/ai-agent.mdxnew file mode 100644index 00000000000..2450f3cd999--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/ai-agent.mdx@@ -0,0 +1,81 @@+---+title: 5. An AI agent+icon: "robot"+description: Let an agent generate documents from a chat, using your tool.+---++Because `generate-document` is exposed as a **tool**, an AI agent can call it.+Let's add an agent and a skill so users can just say *"generate a proposal for+Jeffery Griffin"*.++## The skill++A [skill](/developers/extend/apps/logic/skills-and-agents) is reusable+instructions — knowledge you attach to agents. Ours teaches the model how to use+the tool.++```ts filename="src/skills/document-drafting.skill.ts"+import { defineSkill } from 'twenty-sdk/define';++export default defineSkill({+ universalIdentifier: DOCUMENT_SKILL_UNIVERSAL_IDENTIFIER,+ name: 'document-drafting',+ label: 'Document drafting',+ icon: 'IconFileText',+ content: [+ 'To generate a document, call the `generate-document` tool with:',+ '- `templateId`: the id of the document template to use.',+ '- `recordId`: the id of the Person or Company the document is for.',+ '',+ 'If the user names a template or person instead of an id, find the record first,',+ 'then pass its id. Make sure the template target matches the record type.',+ ].join('\n'),+});+```++## The agent++An [agent](/developers/extend/apps/logic/skills-and-agents) pairs a prompt with a+model. Set `responseFormat` explicitly to avoid a build warning.++```ts filename="src/agents/document-assistant.agent.ts"+import { defineAgent } from 'twenty-sdk/define';++export default defineAgent({+ universalIdentifier: DOCUMENT_AGENT_UNIVERSAL_IDENTIFIER,+ name: 'document-assistant',+ label: 'Document Assistant',+ description: 'Generates documents from your templates and CRM records.',+ icon: 'IconFileText',+ responseFormat: { type: 'text' },+ prompt: [+ 'You are the Document Assistant for a CRM.',+ 'You help users generate personalized documents from reusable templates',+ 'and the data already in their CRM. Use the generate-document tool, and',+ 'always confirm what you created.',+ ].join(' '),+});+```++<Note>+The agent can only call the tool if its role allows it. We already set+`canAccessAllTools: true` and `canBeAssignedToAgents: true` on the app's role in+[Chapter 2](/developers/extend/apps/tutorials/document-generator/generating-documents#grant-it-access).+</Note>++## Try it++Open a chat with **Document Assistant** and ask it to draft a document for a+person in your CRM. It finds the record, calls `generate-document`, and reports+back the document it created — which now appears in your **Documents** view,+exactly like the command-menu and workflow paths.++That's the payoff of exposing logic as a tool: **one function, many front doors** —+command menu, HTTP, workflow step, and now natural language.++**After this step:** the app is feature-complete and genuinely useful. Time to+ship it.++<Card title="Next: publishing →" icon="rocket" href="/developers/extend/apps/tutorials/document-generator/publishing">+ Add marketplace metadata and publish.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/building-the-ui.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/building-the-ui.mdxnew file mode 100644index 00000000000..7e9b85289ee--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/building-the-ui.mdx@@ -0,0 +1,305 @@+---+title: 4. Building the UI+icon: "table-columns"+description: Views, sidebar navigation, a command, and front components.+---++Right now the objects are only reachable through Settings. Let's give the app a+real presence in the UI: list views, sidebar entries, a one-click+**Generate document** command, a record-page front component to **preview** a+document, and a native rich-text **editor** tab for templates.++## Views and navigation++A [view](/developers/extend/apps/layout/views) is a saved list of a given object.+A [navigation menu item](/developers/extend/apps/layout/navigation-menu-items)+puts that view in the sidebar.++```ts filename="src/views/documents.view.ts"+import { defineView, ViewKey } from 'twenty-sdk/define';++export default defineView({+ universalIdentifier: DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+ name: 'All documents',+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ icon: 'IconFile',+ key: ViewKey.INDEX,+ position: 0,+ fields: [+ { universalIdentifier: DOCUMENTS_VIEW_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier: DOCUMENT_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ position: 0, isVisible: true, size: 280 },+ { universalIdentifier: DOCUMENTS_VIEW_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier: DOCUMENT_STATUS_FIELD_UNIVERSAL_IDENTIFIER,+ position: 1, isVisible: true, size: 120 },+ { universalIdentifier: DOCUMENTS_VIEW_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ fieldMetadataUniversalIdentifier: DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ position: 2, isVisible: true, size: 200 },+ ],+});+```++```ts filename="src/navigation-menu-items/documents.navigation-menu-item.ts"+import { defineNavigationMenuItem, NavigationMenuItemType } from 'twenty-sdk/define';++export default defineNavigationMenuItem({+ universalIdentifier: DOCUMENTS_NAVIGATION_MENU_ITEM_UNIVERSAL_IDENTIFIER,+ name: 'Documents',+ icon: 'IconFile',+ color: 'green',+ position: 1,+ type: NavigationMenuItemType.VIEW,+ viewUniversalIdentifier: DOCUMENTS_VIEW_UNIVERSAL_IDENTIFIER,+});+```++Add the same pair for templates. Both now show in the sidebar:++<Frame caption="Documents and Templates in the sidebar, with the generated document listed.">+ <img src="/images/docs/developers/extends/apps/document-generator/04-documents-view.png" alt="Documents view with a generated document" />+</Frame>++## A front component++A [front component](/developers/extend/apps/layout/front-components) is a React+component sandboxed inside Twenty. Ours reads the selected record, loads the+person templates via `CoreApiClient`, and POSTs to the route from the last+chapter.++```tsx filename="src/front-components/generate-document-form.front-component.tsx"+import { useEffect, useState } from 'react';+import { CoreApiClient } from 'twenty-client-sdk/core';+import { defineFrontComponent } from 'twenty-sdk/define';+import { enqueueSnackbar, useSelectedRecordIds } from 'twenty-sdk/front-component';++const GenerateDocumentForm = () => {+ const selectedRecordIds = useSelectedRecordIds();+ const recordId = selectedRecordIds.length === 1 ? selectedRecordIds[0] : null;+ const [templates, setTemplates] = useState<{ id: string; name: string }[]>([]);+ const [templateId, setTemplateId] = useState('');++ useEffect(() => {+ new CoreApiClient()+ .query({ documentTemplates: {+ __args: { filter: { target: { eq: 'PERSON' } }, first: 100 },+ edges: { node: { id: true, name: true } } } })+ .then(({ documentTemplates }) => {+ const list = documentTemplates?.edges?.map((e) => e.node) ?? [];+ setTemplates(list);+ if (list[0]) setTemplateId(list[0].id);+ });+ }, []);++ const generate = async () => {+ const apiBaseUrl = process.env.TWENTY_API_URL;+ const token = process.env.TWENTY_APP_ACCESS_TOKEN ?? process.env.TWENTY_API_KEY;+ const res = await fetch(`${apiBaseUrl}/s/documents/generate`, {+ method: 'POST',+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },+ body: JSON.stringify({ templateId, recordId }),+ }).then((r) => r.json());+ await enqueueSnackbar({+ message: res.success ? 'Document generated.' : 'Generation failed.',+ variant: res.success ? 'success' : 'error',+ });+ };++ // ...render a <select> of templates and a Generate button+};++export default defineFrontComponent({+ universalIdentifier: GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ name: 'generate-document-form',+ component: GenerateDocumentForm,+});+```++<Warning>+Style with inline CSS variables (`var(--t-color-blue)`), not values imported from+`twenty-ui`. The SDK mocks that package during build, so module-level imports of+theme constants would be `undefined`. See the+[full component](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/front-components/generate-document-form.front-component.tsx).+</Warning>++## A command to open it++A [command menu item](/developers/extend/apps/layout/command-menu-items) with+`availabilityType: 'RECORD_SELECTION'` shows up when a Person is selected, and+opens the component in the side panel.++```ts filename="src/command-menu-items/generate-document.command-menu-item.ts"+import { defineCommandMenuItem, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';++export default defineCommandMenuItem({+ universalIdentifier: GENERATE_DOCUMENT_COMMAND_UNIVERSAL_IDENTIFIER,+ label: 'Generate document',+ availabilityType: 'RECORD_SELECTION',+ availabilityObjectUniversalIdentifier:+ STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,+ frontComponentUniversalIdentifier:+ GENERATE_DOCUMENT_FORM_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+});+```++## Try the whole flow++Open **People**, tick a person, and press <kbd>⌘K</kbd> / <kbd>Ctrl K</kbd>.+"Generate document" appears, tagged with your app:++<Frame caption="The command shows up when a Person is selected.">+ <img src="/images/docs/developers/extends/apps/document-generator/06-command-menu.png" alt="Command menu with Generate document" />+</Frame>++Run it — your component opens in the side panel. Pick a template, click+**Generate**, and a new record lands in **Documents**.++<Frame caption="The front component, loading templates and generating on click.">+ <img src="/images/docs/developers/extends/apps/document-generator/06b-front-component.png" alt="Generate document side panel" />+</Frame>++Every generated document records your app as its author:++<Frame caption="Created by Document Generator, status Generated.">+ <img src="/images/docs/developers/extends/apps/document-generator/05-document-record.png" alt="A generated document record" />+</Frame>++## Preview a document on its record page++A front component isn't only for command menus — you can mount one as a **tab on a+record page**. Let's add a *Preview* tab to the document record that renders the+Markdown body as a polished, printable page.++The component reads the current record id from its execution context, loads the+document, and renders it. Front components run in a **sandbox** that only allows a+whitelist of HTML tags — raw HTML injection (`dangerouslySetInnerHTML`) and+`<style>` are blocked — so we render the Markdown as React elements with inline+styles via a small [`Markdown`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/utils/markdown-to-react.tsx)+helper.++```tsx filename="src/front-components/document-viewer.front-component.tsx"+import { CoreApiClient } from 'twenty-client-sdk/core';+import { defineFrontComponent } from 'twenty-sdk/define';+import { useFrontComponentExecutionContext } from 'twenty-sdk/front-component';+import { Markdown } from 'src/utils/markdown-to-react';++const DocumentViewer = () => {+ const recordId = useFrontComponentExecutionContext((c) => c.recordId ?? null);+ // ...load { content, file } for recordId, then derive the links:+ const pdfUrl = document.file?.[0]?.url;+ const webUrl = `${process.env.TWENTY_API_URL ?? ''}/s/documents/view?id=${recordId}`;++ // Render the template body, plus quick links to the web page and the PDF.+ // Links open in a new tab so they don't navigate the embedded component.+ return (+ <div style={styles.scroll}>+ <div style={styles.actions}>+ <a style={styles.actionLink} href={webUrl} target="_blank" rel="noopener noreferrer">+ Open web page+ </a>+ {pdfUrl ? (+ <a style={styles.actionLink} href={pdfUrl} target="_blank" rel="noopener noreferrer">+ Download PDF+ </a>+ ) : null}+ </div>+ <div style={styles.paper}>+ <div style={styles.body}>+ <Markdown content={document.content} />+ </div>+ </div>+ </div>+ );+};++export default defineFrontComponent({+ universalIdentifier: DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ name: 'document-viewer',+ component: DocumentViewer,+});+```++Mount it with a [page layout](/developers/extend/apps/layout/page-layouts). A+`RECORD_PAGE` layout adds tabs to an object's record view; a `FRONT_COMPONENT`+widget in a `CANVAS` tab hosts the component:++```ts filename="src/page-layouts/document-record.page-layout.ts"+import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';++export default definePageLayout({+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_UNIVERSAL_IDENTIFIER,+ name: 'Document record page',+ type: 'RECORD_PAGE',+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ tabs: [{+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Preview',+ icon: 'IconEye',+ position: 50,+ layoutMode: PageLayoutTabLayoutMode.CANVAS,+ widgets: [{+ universalIdentifier: DOCUMENT_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Document preview',+ type: 'FRONT_COMPONENT',+ configuration: {+ configurationType: 'FRONT_COMPONENT',+ frontComponentUniversalIdentifier: DOCUMENT_VIEWER_FRONT_COMPONENT_UNIVERSAL_IDENTIFIER,+ },+ }],+ }],+});+```++Open any document — a **Preview** tab renders it beautifully, with links to the+shareable web page and the PDF:++<Frame caption="The Preview tab renders the document with inline styles, plus quick links.">+ <img src="/images/docs/developers/extends/apps/document-generator/09-document-viewer.png" alt="Document viewer front component in a record-page tab" />+</Frame>++## Edit a template with the rich-text editor++Templates don't need a custom component at all. Because the `body` is a+`RICH_TEXT` field, Twenty already provides a full rich-text editor for it — the+same one the standard Note and Task objects use. We just surface it on the+template record page.++Add a tab with a `FIELD` widget in `EDITOR` display mode, pointing at the `body`+field via `fieldMetadataId`:++```ts filename="src/page-layouts/template-record.page-layout.ts"+{+ universalIdentifier: TEMPLATE_PAGE_LAYOUT_TAB_UNIVERSAL_IDENTIFIER,+ title: 'Template',+ position: 1,+ layoutMode: PageLayoutTabLayoutMode.GRID,+ widgets: [{+ universalIdentifier: TEMPLATE_PAGE_LAYOUT_WIDGET_UNIVERSAL_IDENTIFIER,+ title: 'Template',+ type: 'FIELD',+ gridPosition: { row: 0, column: 0, rowSpan: 6, columnSpan: 12 },+ configuration: {+ configurationType: 'FIELD',+ fieldMetadataId: TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ fieldDisplayMode: 'EDITOR',+ },+ }],+}+```++A `RICH_TEXT` field stores both the editor's block JSON and a Markdown+projection. The generation pipeline reads that Markdown projection, so+placeholders, the PDF, and the shareable web page all keep working unchanged —+see the full+[`template-record.page-layout.ts`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/page-layouts/template-record.page-layout.ts).+Now editors write templates in a proper rich-text editor:++<Frame caption="The Template tab: Twenty's native rich-text editor bound to the body field.">+ <img src="/images/docs/developers/extends/apps/document-generator/10-template-editor.png" alt="Template record with the native rich-text editor tab" />+</Frame>++**After this step:** documents preview beautifully and templates are editable+in-app. Next, let an AI agent generate them from a chat.++<Card title="Next: an AI agent →" icon="robot" href="/developers/extend/apps/tutorials/document-generator/ai-agent">+ Add an agent and a skill that call your tool.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/data-model.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/data-model.mdxnew file mode 100644index 00000000000..6a3c4cc90d9--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/data-model.mdx@@ -0,0 +1,135 @@+---+title: 1. Data model+icon: "database"+description: Model documents and templates with objects, fields, and a relation.+---++Our app needs two custom objects: **document templates** (what to write) and+**documents** (the generated result). Let's define them.++Scaffold each entity file with the CLI — it generates a valid UUID and the right+folder for you:++```bash filename="Terminal"+yarn twenty dev:add object+```++Below we show the finished files.++<Note>+Every `*_UNIVERSAL_IDENTIFIER` constant lives in+`src/constants/universal-identifiers.ts` and is imported where used. The snippets+below omit those imports for brevity — keep them in your own files.+</Note>++## The template object++A template has a `name`, a `body` with `{{placeholders}}`, and a `target` that+says whether it's written for a Person or a Company. The `body` is a+`RICH_TEXT` field, so Twenty gives it a full rich-text editor.++```ts filename="src/objects/document-template.object.ts"+import { defineObject, FieldType } from 'twenty-sdk/define';++export default defineObject({+ universalIdentifier: DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ nameSingular: 'documentTemplate',+ namePlural: 'documentTemplates',+ labelSingular: 'Document template',+ labelPlural: 'Document templates',+ icon: 'IconFileText',+ labelIdentifierFieldMetadataUniversalIdentifier:+ TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ fields: [+ { universalIdentifier: TEMPLATE_NAME_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.TEXT, name: 'name', label: 'Name', icon: 'IconAbc' },+ { universalIdentifier: TEMPLATE_BODY_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.RICH_TEXT, name: 'body', label: 'Body', icon: 'IconFileText',+ description: 'Use {{placeholders}} like {{name.firstName}} or {{jobTitle}}.' },+ { universalIdentifier: TEMPLATE_TARGET_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.SELECT, name: 'target', label: 'Target', icon: 'IconTarget',+ defaultValue: `'PERSON'`,+ options: [+ { id: TEMPLATE_TARGET_OPTION_PERSON_UNIVERSAL_IDENTIFIER,+ value: 'PERSON', label: 'Person', color: 'blue', position: 0 },+ { id: TEMPLATE_TARGET_OPTION_COMPANY_UNIVERSAL_IDENTIFIER,+ value: 'COMPANY', label: 'Company', color: 'green', position: 1 },+ ] },+ ],+});+```++<Warning>+`SELECT` option **values** must be `UPPER_CASE` (`PERSON`, not `person`), and the+`defaultValue` is wrapped in extra quotes: `` `'PERSON'` ``. The `label` is what+users see.+</Warning>++## The document object++The generated document stores the rendered `content` and a `status`. Define it+the same way, with a `status` select of `DRAFT` / `GENERATED`. Full file:+[`document.object.ts`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/objects/document.object.ts).++## Linking them with a relation++Each document should point back to the template it came from. Relations are+**bidirectional** — you define both sides, each in its own field file.++```ts filename="src/fields/document-template-relation.field.ts"+import { defineField, FieldType, OnDeleteAction, RelationType } from 'twenty-sdk/define';++// The "many" side: each document belongs to one template.+export default defineField({+ universalIdentifier: DOCUMENT_TEMPLATE_FIELD_UNIVERSAL_IDENTIFIER,+ objectUniversalIdentifier: DOCUMENT_OBJECT_UNIVERSAL_IDENTIFIER,+ type: FieldType.RELATION,+ name: 'template',+ label: 'Template',+ relationTargetObjectMetadataUniversalIdentifier:+ DOCUMENT_TEMPLATE_OBJECT_UNIVERSAL_IDENTIFIER,+ relationTargetFieldMetadataUniversalIdentifier:+ TEMPLATE_DOCUMENTS_FIELD_UNIVERSAL_IDENTIFIER,+ universalSettings: {+ relationType: RelationType.MANY_TO_ONE,+ onDelete: OnDeleteAction.SET_NULL,+ joinColumnName: 'templateId',+ },+});+```++The other side (`template-documents-relation.field.ts`) is a+`RelationType.ONE_TO_MANY` field named `documents` that points the opposite way.+See [Relations](/developers/extend/apps/data/relations) for the full pattern.++## See it in Twenty++With `yarn twenty dev` running, open **Settings → Data model**. Both objects+appear, tagged with your app.++<Frame caption="Both custom objects, owned by the Document Generator app.">+ <img src="/images/docs/developers/extends/apps/document-generator/01-data-model.png" alt="Data model settings showing Documents and Document templates" />+</Frame>++Create one template to test with — name it *Sales proposal*, set **Target** to+*Person*, and paste a body with a few placeholders:++```text+Dear {{name.firstName}} {{name.lastName}},++As {{jobTitle}} at {{company.name}}, we think you'll love our product.++Best,+The Team+```++<Frame caption="A template record. The body keeps its placeholders until a document is generated.">+ <img src="/images/docs/developers/extends/apps/document-generator/03-template-record.png" alt="A Sales proposal template record with placeholder body" />+</Frame>++**After this step:** you have `documentTemplate` and `document` objects, linked by+a relation, and one template to generate from. Next, the logic that fills it in.++<Card title="Next: generating documents →" icon="bolt" href="/developers/extend/apps/tutorials/document-generator/generating-documents">+ Write the logic function that fills the template.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/generating-documents.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/generating-documents.mdxnew file mode 100644index 00000000000..8d441392a96--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/generating-documents.mdx@@ -0,0 +1,239 @@+---+title: 2. Generating documents+icon: "bolt"+description: One logic function, exposed as an AI tool and a workflow action.+---++Now the core: a [logic function](/developers/extend/apps/logic/logic-functions)+that loads a template and a record, fills the placeholders, and saves a new+document.++We'll write the business logic once as a **handler**, then expose it through+several triggers. This chapter wires up two of them — an **AI tool** and a+**workflow action**.++## The rendering helper++Keep pure logic in its own file so it's easy to unit-test. This flattens a record+into `{{dot.path}}` tokens and substitutes them.++```ts filename="src/logic-functions/utils/render-template.ts"+const PLACEHOLDER_PATTERN = /\{\{\s*([\w.]+)\s*\}\}/g;++export const renderTemplate = (body: string, values: Record<string, string>) => {+ const missingTokens = new Set<string>();+ const content = body.replace(PLACEHOLDER_PATTERN, (_m, token: string) => {+ const value = values[token];+ if (value === undefined || value === '') { missingTokens.add(token); return ''; }+ return value;+ });+ return { content, missingTokens: [...missingTokens] };+};+```++<Tip>+Because this file has no side effects, you can cover it with fast unit tests+(`yarn test:unit`). See [Testing](/developers/extend/apps/operations/testing).+</Tip>++## The handler++The handler uses the generated [`CoreApiClient`](/developers/extend/apps/logic/logic-functions)+to read and write CRM data. It loads the template, loads the target record, fills+the body, and creates a `document`.++```ts filename="src/logic-functions/handlers/generate-document-handler.ts"+import { CoreApiClient } from 'twenty-client-sdk/core';+import { loadRecordValues } from 'src/logic-functions/utils/load-record-values';+import { renderTemplate } from 'src/logic-functions/utils/render-template';++export const generateDocumentHandler = async (+ input: { templateId: string; recordId: string },+) => {+ const client = new CoreApiClient();++ // Use a filtered list query, not the singular lookup: the singular query+ // throws when nothing matches, which would become a 500 instead of a 404.+ const { documentTemplates } = await client.query({+ documentTemplates: {+ __args: { filter: { id: { eq: input.templateId } }, first: 1 },+ edges: { node: { id: true, name: true, body: true, target: true } },+ },+ });+ const documentTemplate = documentTemplates?.edges?.[0]?.node;+ if (!documentTemplate?.id) return { success: false, status: 404, message: 'Template not found.' };++ const record = await loadRecordValues(client, documentTemplate.target, input.recordId);+ if (!record.found) return { success: false, status: 404, message: 'Record not found.' };++ const { content, missingTokens } = renderTemplate(documentTemplate.body ?? '', record.values);++ const { createDocument } = await client.mutation({+ createDocument: {+ __args: { data: {+ name: `${documentTemplate.name} — ${record.displayName}`,+ content, status: 'GENERATED', templateId: documentTemplate.id,+ } },+ id: true, name: true,+ },+ });++ return { success: true, documentId: createDocument.id, content, missingTokens };+};+```++`loadRecordValues` runs a different query for a Person vs. a Company and flattens+the result — see+[`load-record-values.ts`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/load-record-values.ts).++## Expose it as a tool and a workflow action++A single `defineLogicFunction` can carry several triggers. Here, `toolTriggerSettings`+makes it callable by AI agents, and `workflowActionTriggerSettings` turns it into a+step in the visual workflow builder. Both describe their input with a JSON schema.++```ts filename="src/logic-functions/generate-document.ts"+import { defineLogicFunction } from 'twenty-sdk/define';+import { jsonSchemaToInputSchema } from 'twenty-sdk/logic-function';+import { GENERATE_DOCUMENT_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';+import { generateDocumentHandler } from 'src/logic-functions/handlers/generate-document-handler';+import { generateDocumentInputSchema } from 'src/logic-functions/schemas/generate-document-input.schema';++export default defineLogicFunction({+ universalIdentifier: GENERATE_DOCUMENT_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER,+ name: 'generate-document',+ description: 'Generate a document from a template and a CRM record.',+ timeoutSeconds: 30,+ toolTriggerSettings: {+ inputSchema: generateDocumentInputSchema,+ },+ workflowActionTriggerSettings: {+ label: 'Generate Document',+ icon: 'IconFileText',+ inputSchema: jsonSchemaToInputSchema(generateDocumentInputSchema),+ outputSchema: [{ type: 'object', properties: {+ success: { type: 'boolean' }, documentId: { type: 'string' },+ } }],+ },+ handler: generateDocumentHandler,+});+```++The input schema is a plain JSON schema describing `templateId` and `recordId` —+see [`generate-document-input.schema.ts`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/logic-functions/schemas/generate-document-input.schema.ts).++## Grant it access++Logic functions run as the app's role. It needs to read templates and records+and create documents, so allow that in `src/roles/default-role.ts`:++```ts+export default defineApplicationRole({+ universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,+ label: 'Document Generator default role',+ canReadAllObjectRecords: true,+ canUpdateAllObjectRecords: true,+ canAccessAllTools: true,+ canBeAssignedToAgents: true,+ permissionFlagUniversalIdentifiers: [SystemPermissionFlag.UPLOAD_FILE],+});+```++`UPLOAD_FILE` lets the function upload the generated PDF in the next section.+See [Roles](/developers/extend/apps/config/roles) for finer-grained permissions.++## Attach a real PDF file++A rendered text field is useful, but users want a real document. Let's generate a+**PDF** and store it on the record as a downloadable file.++First, give the `document` object a `FILES` field to hold the PDF. Apps upload+into their **own** files fields, so this field is what routes the upload:++```ts filename="src/objects/document.object.ts"+{+ universalIdentifier: DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+ type: FieldType.FILES,+ name: 'file',+ label: 'File',+ icon: 'IconFileTypePdf',+ universalSettings: { maxNumberOfValues: 1 },+}+```++Now render that PDF. An app is a real Node project, so you can add any npm+package you need and import it like anywhere else. We use **[pdf-lib](https://pdf-lib.js.org/)**+to draw the PDF and **[marked](https://marked.js.org/)** to parse the Markdown+body — the CLI installs them into the function's runtime for you:++```bash filename="Terminal"+yarn add pdf-lib marked+```++The full helper is+[`generate-document-pdf.ts`](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/logic-functions/utils/generate-document-pdf.ts).+It parses the Markdown into tokens with `marked.lexer`, then lays them out with+pdf-lib: real headings, **bold**/*italic* runs, bullet and numbered lists,+blockquotes and rules — a polished, multi-page A4 rendering of the template+itself, rather than a wall of text.++<Frame caption="The generated PDF: real typography and Markdown formatting, rendering the template body.">+ <img src="/images/docs/developers/extends/apps/document-generator/07b-generated-pdf.png" alt="A polished, marketable generated PDF" />+</Frame>++<Note>+pdf-lib's built-in fonts use WinAnsi encoding, so Western-European accents render+out of the box; the helper maps smart quotes and dashes and drops characters it+can't encode. Rendering non-Latin scripts (Chinese, Arabic, Cyrillic) would mean+embedding a Unicode font.+</Note>++Then upload it and store the reference on the record. `uploadFile` routes bytes+to your app-owned files field; the returned `id` is what you save:++```ts filename="src/logic-functions/handlers/generate-document-handler.ts"+import { MetadataApiClient } from 'twenty-client-sdk/metadata';+import { generateDocumentPdf } from 'src/logic-functions/utils/generate-document-pdf';++const documentName = `${documentTemplate.name} — ${record.displayName}`;+const bytes = await generateDocumentPdf(documentName, content);+const fileName = 'proposal.pdf';++const uploaded = await new MetadataApiClient().uploadFile(+ Buffer.from(bytes),+ fileName,+ 'application/pdf',+ DOCUMENT_FILE_FIELD_UNIVERSAL_IDENTIFIER,+);++await client.mutation({+ updateDocument: {+ __args: {+ id: documentId,+ data: { file: [{ fileId: uploaded.id, label: fileName }] },+ },+ id: true,+ },+});+```++The generated document now carries a downloadable PDF:++<Frame caption="The generated PDF, stored on the document's File field.">+ <img src="/images/docs/developers/extends/apps/document-generator/08-document-with-pdf.png" alt="A document record with a generated PDF file" />+</Frame>++<Note>+`uploadFile` only targets **app-owned** files fields (so uploads always require an+app that owns the field, plus the `UPLOAD_FILE` role flag). That's why the PDF+lands on the record's own `file` field — the same pattern the+[call-recorder app](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/public/call-recorder)+uses for recordings.+</Note>++**After this step:** each generated document has a real, downloadable PDF. But+nothing can *call* the generator from the UI yet — for that we need an HTTP route.++<Card title="Next: HTTP routes →" icon="globe" href="/developers/extend/apps/tutorials/document-generator/http-routes">+ Serve the function over HTTP and render documents as web pages.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdxnew file mode 100644index 00000000000..1b12b86cd39--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/http-routes.mdx@@ -0,0 +1,148 @@+---+title: 3. HTTP routes+icon: "globe"+description: Trigger the function over HTTP and render documents as web pages.+---++The same handler can also answer HTTP requests. We'll add two routes:++- a **POST** endpoint the UI calls to generate a document, and+- a public **GET** endpoint that renders a document as a printable web page.++Both use `httpRouteTriggerSettings`. App routes are served under `/s` on your+Twenty server (e.g. `http://localhost:2020/s/documents/generate`).++## POST route — generate on demand++This reuses `generateDocumentHandler`, so there's no logic to repeat — just a thin+adapter that reads the request body.++```ts filename="src/logic-functions/generate-document-route.ts"+import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';+import { Response } from 'twenty-sdk/logic-function';+import { generateDocumentHandler } from 'src/logic-functions/handlers/generate-document-handler';++const handler = async (event: RoutePayload): Promise<Response> => {+ const body = event.body as Record<string, unknown> | null;++ const result = await generateDocumentHandler({+ templateId: (body?.templateId as string) ?? '',+ recordId: (body?.recordId as string) ?? '',+ });++ // Map the handler's failure reason onto a real HTTP status (400/404/500)+ // instead of always returning 200.+ return new Response(JSON.stringify(result), {+ status: result.success ? 200 : (result.status ?? 400),+ headers: { 'Content-Type': 'application/json' },+ });+};++export default defineLogicFunction({+ universalIdentifier: GENERATE_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER,+ name: 'generate-document-route',+ timeoutSeconds: 30,+ handler,+ httpRouteTriggerSettings: {+ path: '/documents/generate',+ httpMethod: 'POST',+ isAuthRequired: true,+ },+});+```++The shared handler returns a suggested `status` on failure, so the route can+answer with a proper `4xx`/`5xx` code. `isAuthRequired: true` means the caller+must present a valid token — the front component in the next chapter passes the+user's access token automatically.++## GET route — render as a web page++To return HTML instead of JSON, wrap the body in a `Response` with a+`Content-Type` header. This route is public (`isAuthRequired: false`) so a+generated document can be shared as a link.++```ts filename="src/logic-functions/view-document.ts"+import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';+import { Response } from 'twenty-sdk/logic-function';+import { CoreApiClient } from 'twenty-client-sdk/core';+import { documentHtmlPage } from 'src/utils/render-document';++const htmlResponse = (html: string, status = 200): Response =>+ new Response(html, { status, headers: { 'Content-Type': 'text/html; charset=utf-8' } });++const handler = async (event: RoutePayload): Promise<Response> => {+ const documentId = event.queryStringParameters?.id;++ if (!documentId) {+ return htmlResponse(documentHtmlPage('Missing document id', 'Provide ?id=<documentId>.'), 400);+ }++ // Filtered list query so an unknown id renders a clean 404 page instead of throwing.+ const { documents } = await new CoreApiClient().query({+ documents: {+ __args: { filter: { id: { eq: documentId } }, first: 1 },+ edges: { node: { id: true, name: true, content: true } },+ },+ });++ const document = documents?.edges?.[0]?.node;+ if (!document?.id) {+ return htmlResponse(documentHtmlPage('Document not found', `No document with id ${documentId}.`), 404);+ }++ return htmlResponse(documentHtmlPage(document.name ?? 'Document', document.content ?? ''));+};++export default defineLogicFunction({+ universalIdentifier: VIEW_DOCUMENT_ROUTE_UNIVERSAL_IDENTIFIER,+ name: 'view-document',+ timeoutSeconds: 15,+ handler,+ httpRouteTriggerSettings: {+ path: '/documents/view',+ httpMethod: 'GET',+ isAuthRequired: false,+ },+});+```++`documentHtmlPage` renders the Markdown body to HTML (with [marked](https://marked.js.org/),+sanitized) and drops it into a clean, printable page that shows just the template+content — the same look as the PDF and the in-app preview.+[See the helper](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/examples/document-generator/src/utils/render-document.ts).++## Try it++With a template and a Person in your workspace, call the route (grab a token from+**Settings → APIs & Webhooks**):++```bash filename="Terminal"+curl -X POST http://localhost:2020/s/documents/generate \+ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \+ -d '{"templateId":"<templateId>","recordId":"<personId>"}'+# → {"success":true,"documentId":"...","content":"Dear Jeffery Griffin, ..."}+```++Open the returned document in your browser:++```+http://localhost:2020/s/documents/view?id=<documentId>+```++<Frame caption="The public GET route renders the document as a printable page.">+ <img src="/images/docs/developers/extends/apps/document-generator/07-rendered-document.png" alt="A rendered document web page" />+</Frame>++<Tip>+You can also stream a function's logs while testing with+`yarn twenty dev:function:logs`, or invoke it directly with+`yarn twenty dev:function:exec`.+</Tip>++**After this step:** the app can generate documents over HTTP and serve them as+web pages. Now let's make it usable without `curl`.++<Card title="Next: building the UI →" icon="table-columns" href="/developers/extend/apps/tutorials/document-generator/building-the-ui">+ Views, navigation, a command, and a front component.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/overview.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/overview.mdxnew file mode 100644index 00000000000..50388f27ea5--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/overview.mdx@@ -0,0 +1,70 @@+---+title: "Tutorial: Document Generator"+icon: "wand-magic-sparkles"+description: Build a real Twenty app that generates personalized documents from your CRM data.+---++In this tutorial you'll build **Document Generator** — an app that turns reusable+templates into personalized documents using the data already in your CRM.++Write a template once with `{{placeholders}}`, then generate a filled-in+document for any Person or Company in one click — from the command menu, from an+AI agent, or from a workflow.++<Frame caption="One template, generated for a specific person, opened as a printable page.">+ <img src="/images/docs/developers/extends/apps/document-generator/07-rendered-document.png" alt="A generated Sales proposal document" />+</Frame>++## What you'll learn++Each chapter adds one capability. By the end you'll have touched most of the SDK.++| Chapter | Capability | Reference |+|---|---|---|+| [1. Data model](/developers/extend/apps/tutorials/document-generator/data-model) | Objects, fields, and a relation | [Data](/developers/extend/apps/data/overview) |+| [2. Generating documents](/developers/extend/apps/tutorials/document-generator/generating-documents) | A logic function (AI tool + workflow action) that fills a Markdown template and attaches a polished PDF | [Logic functions](/developers/extend/apps/logic/logic-functions) |+| [3. HTTP routes](/developers/extend/apps/tutorials/document-generator/http-routes) | Serving JSON and a shareable HTML page from routes | [Logic functions](/developers/extend/apps/logic/logic-functions) |+| [4. Building the UI](/developers/extend/apps/tutorials/document-generator/building-the-ui) | Views, navigation, command menu, and front components that preview a document and edit a template | [Layout](/developers/extend/apps/layout/overview) |+| [5. An AI agent](/developers/extend/apps/tutorials/document-generator/ai-agent) | Agent + skill | [Skills & agents](/developers/extend/apps/logic/skills-and-agents) |+| [6. Publishing](/developers/extend/apps/tutorials/document-generator/publishing) | Ship it to the marketplace | [Publishing](/developers/extend/apps/operations/publishing) |++## Prerequisites++You should have finished the [Quick Start](/developers/extend/apps/getting-started/quick-start):+a local Twenty server running on port `2020` and the CLI authenticated to it.++If not, scaffold and start one now:++```bash filename="Terminal"+npx create-twenty-app@latest document-generator+cd document-generator+yarn twenty dev+```++<Note>+Prefer to read the finished code? The complete app lives in+[`packages/twenty-apps/examples/document-generator`](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/document-generator).+Every snippet below is copied from it.+</Note>++## How the app fits together++<Frame>+ <img src="/images/docs/developers/extends/apps/document-generator/how-it-fits.svg" alt="A template with placeholders is generated into a polished document with a PDF, triggered from the command menu, an AI agent, a workflow, or a shareable link" />+</Frame>++You write a **template** once in a rich-text editor, with `{{placeholders}}`. Picking a+template and a CRM record fills the placeholders and stores a polished+**document** (with a PDF file). Everything else — the command menu, the AI agent,+the workflow step, the shareable link — is just a different way to trigger that+one generator.++## Keep this loop running++Leave `yarn twenty dev` running in a terminal for the whole tutorial. Every time+you add or edit a file under `src/`, it re-syncs to your server within a few+seconds, so you can watch each capability appear in the UI as you build it.++<Card title="Start building →" icon="database" href="/developers/extend/apps/tutorials/document-generator/data-model">+ Chapter 1: model documents and templates.+</Card>diff --git a/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/publishing.mdx b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/publishing.mdxnew file mode 100644index 00000000000..0dd05ae0ad8--- /dev/null+++ b/packages/twenty-docs/developers/extend/apps/tutorials/document-generator/publishing.mdx@@ -0,0 +1,137 @@+---+title: 6. Publishing+icon: "rocket"+description: Add marketplace metadata and publish your app.+---++Your app works. The last step is to describe it for the marketplace and publish.++## Add marketplace metadata++The [application config](/developers/extend/apps/config/application) carries the+identity that shows up in the marketplace: author, category, logo, and support+links. Put a logo in `public/` and reference it with `logoUrl`.++```ts filename="src/application-config.ts"+import { defineApplication } from 'twenty-sdk/define';++export default defineApplication({+ universalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,+ displayName: 'Document Generator',+ description:+ 'Create reusable document templates and generate personalized documents from your CRM records.',+ logoUrl: 'public/document-generator.svg',+ author: 'Twenty',+ category: 'Productivity',+ websiteUrl: 'https://docs.twenty.com/developers/extend/apps',+ termsUrl: 'https://www.twenty.com/terms',+ emailSupport: '[email protected]',+ issueReportUrl: 'https://github.com/twentyhq/twenty/issues',+});+```++<Tip>+The default role is declared with `defineApplicationRole()` in its own file — you+don't pass `defaultRoleUniversalIdentifier` here anymore.+</Tip>++Also add the `twenty-app` keyword to `package.json` so the app is discoverable:++```json filename="package.json"+{ "keywords": ["twenty-app"] }+```++## Add gallery screenshots++A marketplace listing sells itself with screenshots. Drop a few PNGs in+`public/gallery/` and reference them with `screenshots` — they render as a gallery+on the listing page.++```ts filename="src/application-config.ts"+export default defineApplication({+ // ...identity from above+ screenshots: [+ 'public/gallery/01-generated-document.png',+ 'public/gallery/02-command-menu.png',+ 'public/gallery/03-template-editor.png',+ 'public/gallery/04-documents.png',+ ],+});+```++<Tip>+Lead with the payoff: make the first screenshot the finished result (a generated+document), then show how it's triggered and authored. Use crisp, high-resolution+captures — they're the first thing a user sees.+</Tip>++Give `README.md` the same treatment — it's the front page on npm and GitHub.+Open with the value proposition and a screenshot, list the headline features,+then keep the build details below the fold.++## Check before you ship++Run the same gates CI does:++```bash filename="Terminal"+yarn lint # oxlint+yarn typecheck # tsgo+yarn test:unit # unit tests+yarn twenty dev --once --dry-run # preview the metadata diff+```++The dry run prints exactly what would change on the server without applying it —+a good final sanity check. See+[Testing](/developers/extend/apps/operations/testing) and+[Syncing & recovery](/developers/extend/apps/operations/sync-and-recovery).++## Publish++```bash filename="Terminal"+# Public app → npm (default)+yarn twenty app:publish++# Or deploy privately to a specific server's registry+yarn twenty app:publish --private -r <remote>+```++`app:publish` builds and publishes to npm by default; `--private` uploads a+tarball to a Twenty server's private registry instead. To surface a published app+in an instance's marketplace, trigger a catalog sync:++```bash filename="Terminal"+yarn twenty dev:catalog-sync -r <remote>+```++Full details and the release checklist:+[Publishing](/developers/extend/apps/operations/publishing).++## You built an app 🎉++In six chapters you used most of the SDK surface:++- **Objects, fields, and a relation** to model the data+- A **logic function** exposed as an **AI tool**, a **workflow action**, and **HTTP routes**+- **Views, navigation, a command, and a front component** for the UI+- An **agent + skill** for natural-language generation+- **Marketplace metadata** and the publish flow++The finished app is at+[`packages/twenty-apps/examples/document-generator`](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/document-generator).++## Where to go next++<CardGroup cols={2}>+ <Card title="Data reference" icon="database" href="/developers/extend/apps/data/overview">+ Every field type, relation, and index option.+ </Card>+ <Card title="Logic reference" icon="bolt" href="/developers/extend/apps/logic/overview">+ Cron and database-event triggers, the key-value store, OAuth connections.+ </Card>+ <Card title="Layout reference" icon="table-columns" href="/developers/extend/apps/layout/overview">+ Page layouts, dashboard widgets, and more UI surfaces.+ </Card>+ <Card title="Operations" icon="rocket" href="/developers/extend/apps/operations/overview">+ CLI, testing, remotes, and CI.+ </Card>+</CardGroup>diff --git a/packages/twenty-docs/docs.json b/packages/twenty-docs/docs.jsonindex 92473df237e..86191838ef4 100644--- a/packages/twenty-docs/docs.json+++ b/packages/twenty-docs/docs.json@@ -385,6 +385,18 @@"developers/extend/apps/getting-started/troubleshooting"]},+ {+ "group": "Tutorial",+ "pages": [+ "developers/extend/apps/tutorials/document-generator/overview",+ "developers/extend/apps/tutorials/document-generator/data-model",+ "developers/extend/apps/tutorials/document-generator/generating-documents",+ "developers/extend/apps/tutorials/document-generator/http-routes",+ "developers/extend/apps/tutorials/document-generator/building-the-ui",+ "developers/extend/apps/tutorials/document-generator/ai-agent",+ "developers/extend/apps/tutorials/document-generator/publishing"+ ]+ },{"group": "Config","pages": [diff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/01-data-model.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/01-data-model.pngnew file mode 100644index 00000000000..db52855dbd1Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/01-data-model.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/02-templates-view.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/02-templates-view.pngnew file mode 100644index 00000000000..2fe5b76cd42Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/02-templates-view.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/03-template-record.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/03-template-record.pngnew file mode 100644index 00000000000..0ebf28402f6Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/03-template-record.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/04-documents-view.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/04-documents-view.pngnew file mode 100644index 00000000000..d6457672f43Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/04-documents-view.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/05-document-record.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/05-document-record.pngnew file mode 100644index 00000000000..3bd3e733fe1Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/05-document-record.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06-command-menu.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06-command-menu.pngnew file mode 100644index 00000000000..7ddd2fe9869Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06-command-menu.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06b-front-component.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06b-front-component.pngnew file mode 100644index 00000000000..85868b21eccBinary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/06b-front-component.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07-rendered-document.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07-rendered-document.pngnew file mode 100644index 00000000000..4a05a7948d1Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07-rendered-document.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07b-generated-pdf.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07b-generated-pdf.pngnew file mode 100644index 00000000000..b3912b6bc90Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/07b-generated-pdf.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/08-document-with-pdf.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/08-document-with-pdf.pngnew file mode 100644index 00000000000..43d7e4c3509Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/08-document-with-pdf.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/09-document-viewer.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/09-document-viewer.pngnew file mode 100644index 00000000000..adfa5915eb1Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/09-document-viewer.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/10-template-editor.png b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/10-template-editor.pngnew file mode 100644index 00000000000..1301140d490Binary files /dev/null and b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/10-template-editor.png differdiff --git a/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/how-it-fits.svg b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/how-it-fits.svgnew file mode 100644index 00000000000..80d4223e3c9--- /dev/null+++ b/packages/twenty-docs/images/docs/developers/extends/apps/document-generator/how-it-fits.svg@@ -0,0 +1,76 @@+<svg width="900" height="380" viewBox="0 0 900 380" fill="none" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif">+ <defs>+ <linearGradient id="band" x1="0" y1="0" x2="1" y2="0">+ <stop offset="0" stop-color="#1961ED"/>+ <stop offset="1" stop-color="#6B9BFF"/>+ </linearGradient>+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="150%">+ <feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#18274B" flood-opacity="0.10"/>+ </filter>+ </defs>++ <!-- Template card -->+ <g filter="url(#shadow)">+ <rect x="40" y="70" width="200" height="180" rx="14" fill="#FFFFFF" stroke="#E4E9F4"/>+ <rect x="40" y="70" width="200" height="8" rx="4" fill="#C4A2E0"/>+ <text x="64" y="112" font-size="15" font-weight="700" fill="#10152A">Template</text>+ <text x="64" y="140" font-size="12" fill="#7A46C6" font-family="monospace">Dear {{firstName}},</text>+ <rect x="64" y="152" width="150" height="9" rx="4.5" fill="#EEF1F6"/>+ <rect x="64" y="170" width="120" height="9" rx="4.5" fill="#EEF1F6"/>+ <text x="64" y="200" font-size="12" fill="#7A46C6" font-family="monospace">{{company.name}}</text>+ <rect x="64" y="212" width="140" height="9" rx="4.5" fill="#EEF1F6"/>+ </g>+ <text x="140" y="278" font-size="12.5" fill="#6B7280" text-anchor="middle">Write once, with placeholders</text>++ <!-- Generate hub -->+ <g>+ <circle cx="450" cy="160" r="46" fill="#1961ED"/>+ <circle cx="450" cy="160" r="46" fill="none" stroke="#1961ED" stroke-opacity="0.25" stroke-width="10"/>+ <path d="M436 160l9 9 18-19" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>+ <text x="450" y="230" font-size="14" font-weight="700" fill="#10152A" text-anchor="middle">Generate</text>+ </g>++ <!-- arrows -->+ <path d="M248 160H392" stroke="#C4C9D6" stroke-width="2.5" stroke-linecap="round"/>+ <path d="M384 154l10 6-10 6" fill="#C4C9D6"/>+ <path d="M504 160H648" stroke="#C4C9D6" stroke-width="2.5" stroke-linecap="round"/>+ <path d="M640 154l10 6-10 6" fill="#C4C9D6"/>++ <!-- Document card -->+ <g filter="url(#shadow)">+ <rect x="660" y="60" width="200" height="200" rx="14" fill="#FFFFFF" stroke="#E4E9F4"/>+ <rect x="660" y="60" width="200" height="8" rx="4" fill="url(#band)"/>+ <text x="684" y="102" font-size="15" font-weight="700" fill="#10152A">Dear Ada,</text>+ <rect x="684" y="116" width="150" height="9" rx="4.5" fill="#EEF1F6"/>+ <rect x="684" y="134" width="150" height="9" rx="4.5" fill="#EEF1F6"/>+ <rect x="684" y="152" width="110" height="9" rx="4.5" fill="#EEF1F6"/>+ <rect x="684" y="178" width="60" height="9" rx="4.5" fill="#EEF1F6"/>+ <rect x="684" y="196" width="140" height="9" rx="4.5" fill="#EEF1F6"/>+ <g>+ <rect x="756" y="216" width="80" height="26" rx="13" fill="#FDECEC"/>+ <text x="796" y="233" font-size="12" font-weight="700" fill="#D6455D" text-anchor="middle">PDF file</text>+ </g>+ </g>+ <text x="760" y="288" font-size="12.5" fill="#6B7280" text-anchor="middle">A polished, shareable document</text>++ <!-- Trigger pills -->+ <text x="450" y="312" font-size="12.5" fill="#6B7280" text-anchor="middle">Trigger it from anywhere</text>+ <g font-size="12.5" font-weight="600" fill="#3A4256">+ <g>+ <rect x="196" y="330" width="120" height="34" rx="17" fill="#F4F6FB" stroke="#E4E9F4"/>+ <text x="256" y="352" text-anchor="middle">Command menu</text>+ </g>+ <g>+ <rect x="330" y="330" width="92" height="34" rx="17" fill="#F4F6FB" stroke="#E4E9F4"/>+ <text x="376" y="352" text-anchor="middle">AI agent</text>+ </g>+ <g>+ <rect x="436" y="330" width="128" height="34" rx="17" fill="#F4F6FB" stroke="#E4E9F4"/>+ <text x="500" y="352" text-anchor="middle">Workflow step</text>+ </g>+ <g>+ <rect x="578" y="330" width="126" height="34" rx="17" fill="#F4F6FB" stroke="#E4E9F4"/>+ <text x="641" y="352" text-anchor="middle">Shareable link</text>+ </g>+ </g>+</svg>diff --git a/packages/twenty-docs/navigation/base-structure.json b/packages/twenty-docs/navigation/base-structure.jsonindex 0da72673160..08261a0ce3a 100644--- a/packages/twenty-docs/navigation/base-structure.json+++ b/packages/twenty-docs/navigation/base-structure.json@@ -382,6 +382,19 @@"developers/extend/apps/getting-started/troubleshooting"]},+ {+ "key": "appsTutorial",+ "label": "Tutorial",+ "pages": [+ "developers/extend/apps/tutorials/document-generator/overview",+ "developers/extend/apps/tutorials/document-generator/data-model",+ "developers/extend/apps/tutorials/document-generator/generating-documents",+ "developers/extend/apps/tutorials/document-generator/http-routes",+ "developers/extend/apps/tutorials/document-generator/building-the-ui",+ "developers/extend/apps/tutorials/document-generator/ai-agent",+ "developers/extend/apps/tutorials/document-generator/publishing"+ ]+ },{"key": "appsConfig","label": "Config",diff --git a/packages/twenty-docs/navigation/navigation.template.json b/packages/twenty-docs/navigation/navigation.template.jsonindex 99f5ef4df9e..5f5d9fa8d3f 100644--- a/packages/twenty-docs/navigation/navigation.template.json+++ b/packages/twenty-docs/navigation/navigation.template.json@@ -160,6 +160,9 @@"appsGettingStarted": {"label": "Getting Started"},+ "appsTutorial": {+ "label": "Tutorial"+ },"appsConfig": {"label": "Config"},diff --git a/packages/twenty-shared/src/constants/DocumentationPaths.ts b/packages/twenty-shared/src/constants/DocumentationPaths.tsindex 4104068ce25..96d4f6f4e67 100644--- a/packages/twenty-shared/src/constants/DocumentationPaths.ts+++ b/packages/twenty-shared/src/constants/DocumentationPaths.ts@@ -77,6 +77,20 @@ export const DOCUMENTATION_PATHS = {'/developers/extend/apps/operations/testing',DEVELOPERS_EXTEND_APPS_TRANSLATIONS_OVERVIEW:'/developers/extend/apps/translations/overview',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_AI_AGENT:+ '/developers/extend/apps/tutorials/document-generator/ai-agent',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_BUILDING_THE_UI:+ '/developers/extend/apps/tutorials/document-generator/building-the-ui',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_DATA_MODEL:+ '/developers/extend/apps/tutorials/document-generator/data-model',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_GENERATING_DOCUMENTS:+ '/developers/extend/apps/tutorials/document-generator/generating-documents',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_HTTP_ROUTES:+ '/developers/extend/apps/tutorials/document-generator/http-routes',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_OVERVIEW:+ '/developers/extend/apps/tutorials/document-generator/overview',+ DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_PUBLISHING:+ '/developers/extend/apps/tutorials/document-generator/publishing',DEVELOPERS_EXTEND_OAUTH: '/developers/extend/oauth',DEVELOPERS_EXTEND_WEBHOOKS: '/developers/extend/webhooks',DEVELOPERS_INTRODUCTION: '/developers/introduction',