From a48b69d1e54a732a238d4bdf54a1319b732c5a2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:33:48 +0100 Subject: [PATCH] i18n - docs translations (#17930) Created by Github action Co-authored-by: github-actions --- .../developers/extend/capabilities/apps.mdx | 83 ++++++-------- .../developers/extend/capabilities/apps.mdx | 95 +++++++--------- .../developers/extend/capabilities/apps.mdx | 87 +++++++------- .../developers/extend/capabilities/apps.mdx | 95 +++++++--------- .../developers/extend/capabilities/apps.mdx | 107 ++++++++---------- .../developers/extend/capabilities/apps.mdx | 87 +++++++------- .../developers/extend/capabilities/apps.mdx | 99 +++++++--------- .../developers/extend/capabilities/apps.mdx | 75 ++++++------ .../developers/extend/capabilities/apps.mdx | 83 ++++++-------- 9 files changed, 356 insertions(+), 455 deletions(-) diff --git a/packages/twenty-docs/l/ar/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/ar/developers/extend/capabilities/apps.mdx index 18b04922a2..97a7952148 100644 --- a/packages/twenty-docs/l/ar/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/ar/developers/extend/capabilities/apps.mdx @@ -27,41 +27,41 @@ description: أنشئ وأدِر تخصيصات Twenty على هيئة كود. أنشئ تطبيقًا جديدًا باستخدام المُهيئ الرسمي، ثم قم بالمصادقة وابدأ التطوير: ```bash filename="Terminal" -# إنشاء تطبيق جديد +# Scaffold a new app npx create-twenty-app@latest my-twenty-app cd my-twenty-app -# إذا كنت لا تستخدم yarn@4 +# If you don't use yarn@4 corepack enable yarn install -# قم بالمصادقة باستخدام مفتاح واجهة برمجة التطبيقات الخاص بك (سيُطلب منك ذلك) -yarn auth:login +# Authenticate using your API key (you'll be prompted) +yarn twenty auth:login -# ابدأ وضع التطوير: يُزامن التغييرات المحلية تلقائيًا مع مساحة العمل الخاصة بك -yarn app:dev +# Start dev mode: automatically syncs local changes to your workspace +yarn twenty app:dev ``` من هنا يمكنك: ```bash filename="Terminal" # Add a new entity to your application (guided) -yarn entity:add +yarn twenty entity:add # Generate a typed Twenty client and workspace entity types -yarn app:generate +yarn twenty app:generate # Watch your application's function logs -yarn function:logs +yarn twenty function:logs # Execute a function by name -yarn function:execute -n my-function -p '{"name": "test"}' +yarn twenty function:execute -n my-function -p '{"name": "test"}' # Uninstall the application from the current workspace -yarn app:uninstall +yarn twenty app:uninstall # Display commands' help -yarn help +yarn twenty help ``` راجع أيضًا: صفحات مرجع CLI لـ [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) و[twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ بشكل عام: -* **package.json**: يصرّح باسم التطبيق والإصدار والمحرّكات (Node 24+، Yarn 4)، ويضيف `twenty-sdk` فضلًا عن نصوص مثل `app:dev` و`app:generate` و`entity:add` و`function:logs` و`function:execute` و`app:uninstall` وأوامر المصادقة التي تُفوِّض إلى `twenty` CLI المحلي. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: يتجاهل العناصر الشائعة مثل `node_modules` و`.yarn` و`generated/` (عميل مضبوط الأنواع) و`dist/` و`build/` ومجلدات التغطية وملفات السجلات وملفات `.env*`. * **yarn.lock**، **.yarnrc.yml**، **.yarn/**: تقوم بقفل وتكوين حزمة أدوات Yarn 4 المستخدمة في المشروع. * **.nvmrc**: يثبّت إصدار Node.js المتوقع للمشروع. @@ -142,12 +142,12 @@ export default defineObject({ ستضيف الأوامر اللاحقة مزيدًا من الملفات والمجلدات: -* `yarn app:generate` سيُنشئ مجلدًا `generated/` (عميل Twenty مضبوط الأنواع + أنواع مساحة العمل). -* `yarn entity:add` سيضيف ملفات تعريف الكيانات تحت `src/` لكائناتك المخصصة أو الوظائف أو المكونات الواجهية أو الأدوار. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## المصادقة -في المرة الأولى التي تشغّل فيها `yarn auth:login`، سيُطلب منك إدخال: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * عنوان URL لواجهة برمجة التطبيقات (الافتراضي http://localhost:3000 أو ملف تعريف مساحة العمل الحالية لديك) * مفتاح واجهة برمجة التطبيقات @@ -158,25 +158,25 @@ export default defineObject({ ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -Once you've switched workspaces with `auth:switch`, all subsequent commands will use that workspace by default. You can still override it temporarily with `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. You can still override it temporarily with `--workspace `. ## استخدم موارد SDK (الأنواع والتكوين) @@ -276,7 +276,7 @@ export default defineObject({ * `universalIdentifier` يجب أن يكون فريدًا وثابتًا عبر عمليات النشر. * يتطلب كل حقل `name` و`type` و`label` ومعرّف `universalIdentifier` ثابتًا خاصًا به. * المصفوفة `fields` اختيارية — يمكنك تعريف كائنات بدون حقول مخصصة. -* يمكنك إنشاء كائنات جديدة باستخدام `yarn entity:add`، والذي يرشدك خلال التسمية والحقول والعلاقات. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **يتم إنشاء الحقول الأساسية تلقائيًا.** عند تعريف كائن مخصص، يضيف Twenty تلقائيًا حقولًا قياسية مثل `name` و`createdAt` و`updatedAt` و`createdBy` و`position` و`deletedAt`. لا تحتاج إلى تعريف هذه في مصفوفة `fields` — أضف فقط حقولك المخصصة. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { يمكنك إنشاء وظائف جديدة بطريقتين: -* **مُنشأ بالقالب**: شغّل `yarn entity:add` واختر خيار إضافة وظيفة منطقية جديدة. يُولّد هذا ملفًا مبدئيًا مع معالج وتكوين. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. يُولّد هذا ملفًا مبدئيًا مع معالج وتكوين. * **يدوي**: أنشئ ملفًا جديدًا `*.logic-function.ts` واستخدم `defineLogicFunction()` مع اتباع النمط نفسه. ### المكوّنات الأمامية @@ -584,16 +584,16 @@ export default defineFrontComponent({ * المكوّنات الأمامية هي مكوّنات React تُعرَض ضمن سياقات معزولة داخل Twenty. * استخدم لاحقة الملف `*.front-component.tsx` للاكتشاف التلقائي. * يشير الحقل `component` إلى مكوّن React الخاص بك. -* يتم بناء المكوّنات ومزامنتها تلقائيًا أثناء `yarn app:dev`. +* Components are built and synced automatically during `yarn twenty app:dev`. يمكنك إنشاء مكوّنات أمامية جديدة بطريقتين: -* **مُنشأ بالقالب**: شغّل `yarn entity:add` واختر خيار إضافة مكوّن أمامي جديد. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **يدوي**: أنشئ ملفًا جديدًا `*.front-component.tsx` واستخدم `defineFrontComponent()`. ### عميل مُولَّد مضبوط الأنواع -شغّل yarn app:generate لإنشاء عميل محلي مضبوط الأنواع في generated/ استنادًا إلى مخطط مساحة العمل لديك. استخدمه في وظائفك: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. استخدمه في وظائفك: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -يُعاد توليد العميل بواسطة `yarn app:generate`. أعِد التشغيل بعد تغيير كائناتك أو عند الانضمام إلى مساحة عمل جديدة. +The client is re-generated by `yarn twenty app:generate`. أعِد التشغيل بعد تغيير كائناتك أو عند الانضمام إلى مساحة عمل جديدة. #### بيانات الاعتماد وقت التشغيل في الوظائف المنطقية @@ -623,40 +623,29 @@ const { me } = await client.query({ me: { id: true, displayName: true } }); ## إعداد يدوي (بدون المهيئ) -بينما نوصي باستخدام `create-twenty-app` للحصول على أفضل تجربة للبدء، يمكنك أيضًا إعداد مشروع يدويًا. لا تثبّت CLI عالميًا. بدل ذلك، أضف `twenty-sdk` كاعتماد محلي ووصل السكربتات في ملف package.json لديك: +بينما نوصي باستخدام `create-twenty-app` للحصول على أفضل تجربة للبدء، يمكنك أيضًا إعداد مشروع يدويًا. لا تثبّت CLI عالميًا. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -ثم أضف نصوصًا مثل هذه: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -يمكنك الآن تشغيل الأوامر نفسها عبر Yarn، مثل `yarn app:dev` و`yarn app:generate`، إلخ. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## استكشاف الأخطاء وإصلاحها -* أخطاء المصادقة: شغّل `yarn auth:login` وتأكد من أن مفتاح واجهة برمجة التطبيقات لديك يمتلك الأذونات المطلوبة. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * يتعذّر الاتصال بالخادم: تحقق من عنوان URL لواجهة البرمجة وأن خادم Twenty قابل للوصول. -* الأنواع أو العميل مفقود/قديم: شغّل `yarn app:generate`. -* وضع التطوير لا يزامن: تأكد من أن `yarn app:dev` قيد التشغيل وأن التغييرات ليست متجاهلة من بيئتك. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. قناة المساعدة على Discord: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/cs/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/cs/developers/extend/capabilities/apps.mdx index 5cf18330fb..82f1fcf583 100644 --- a/packages/twenty-docs/l/cs/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/cs/developers/extend/capabilities/apps.mdx @@ -27,41 +27,41 @@ Aplikace vám umožňují vytvářet a spravovat přizpůsobení Twenty **jako k Vytvořte novou aplikaci pomocí oficiálního scaffolderu, poté se ověřte a začněte vyvíjet: ```bash filename="Terminal" -# Vygenerujte kostru nové aplikace +# Scaffold a new app npx create-twenty-app@latest my-twenty-app cd my-twenty-app -# Pokud nepoužíváte yarn@4 +# If you don't use yarn@4 corepack enable yarn install -# Přihlaste se pomocí svého API klíče (budete vyzváni) -yarn auth:login +# Authenticate using your API key (you'll be prompted) +yarn twenty auth:login -# Spusťte vývojový režim: automaticky synchronizuje místní změny s vaším pracovním prostorem -yarn app:dev +# Start dev mode: automatically syncs local changes to your workspace +yarn twenty app:dev ``` Odtud můžete: ```bash filename="Terminal" -# Přidejte do vaší aplikace novou entitu (s průvodcem) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Vygenerujte typovaného klienta Twenty a typy entit pracovního prostoru -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Sledujte logy funkcí vaší aplikace -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Spusťte funkci podle názvu -yarn function:execute -n my-function -p '{"name": "test"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Odinstalujte aplikaci z aktuálního pracovního prostoru -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Zobrazte nápovědu k příkazům -yarn help +# Display commands' help +yarn twenty help ``` Viz také: referenční stránky CLI pro [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) a [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ V kostce: -* **package.json**: Deklaruje název aplikace, verzi, engines (Node 24+, Yarn 4) a přidává `twenty-sdk` plus skripty jako `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` a autentizační příkazy, které delegují na lokální `twenty` CLI. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: Ignoruje běžné artefakty jako `node_modules`, `.yarn`, `generated/` (typovaný klient), `dist/`, `build/`, složky s coverage, logy a soubory `.env*`. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Zamykají a konfigurují nástrojový řetězec Yarn 4 používaný projektem. * **.nvmrc**: Fixuje verzi Node.js požadovanou projektem. @@ -142,12 +142,12 @@ export default defineObject({ Pozdější příkazy přidají další soubory a složky: -* `yarn app:generate` vytvoří složku `generated/` (typovaný klient Twenty + typy pracovního prostoru). -* `yarn entity:add` přidá soubory s definicemi entit do `src/` pro vaše vlastní objekty, funkce, frontové komponenty nebo role. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Ověření -Při prvním spuštění `yarn auth:login` budete vyzváni k zadání: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * URL API (výchozí je http://localhost:3000 nebo váš aktuální profil pracovního prostoru) * Klíč API @@ -158,25 +158,25 @@ Vaše přihlašovací údaje se ukládají pro jednotlivé uživatele do `~/.twe ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -Jakmile přepnete pracovní prostor pomocí `auth:switch`, všechny následující příkazy budou tento pracovní prostor používat jako výchozí. Můžete jej stále dočasně přepsat pomocí `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Můžete jej stále dočasně přepsat pomocí `--workspace `. ## Používejte zdroje SDK (typy a konfiguraci) @@ -276,7 +276,7 @@ Hlavní body: * Hodnota `universalIdentifier` musí být jedinečná a stabilní napříč nasazeními. * Každé pole vyžaduje `name`, `type`, `label` a svůj vlastní stabilní `universalIdentifier`. * Pole `fields` je volitelné — objekty můžete definovat i bez vlastních polí. -* Nové objekty můžete vygenerovat pomocí `yarn entity:add`, který vás provede pojmenováním, poli a vztahy. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Základní pole jsou vytvořena automaticky.** Když definujete vlastní objekt, Twenty automaticky přidá standardní pole jako `name`, `createdAt`, `updatedAt`, `createdBy`, `position` a `deletedAt`. Nemusíte je definovat v poli `fields` — přidejte pouze svá vlastní pole. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Nové funkce můžete vytvářet dvěma způsoby: -* **Vygenerované**: Spusťte `yarn entity:add` a zvolte možnost přidat novou logickou funkci. Tím se vygeneruje startovací soubor s obslužnou funkcí a konfigurací. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Tím se vygeneruje startovací soubor s obslužnou funkcí a konfigurací. * **Ruční**: Vytvořte nový soubor `*.logic-function.ts` a použijte `defineLogicFunction()` podle stejného vzoru. ### Frontendové komponenty @@ -584,16 +584,16 @@ Hlavní body: * Frontendové komponenty jsou React komponenty, které se vykreslují v izolovaných kontextech v rámci Twenty. * Pro automatickou detekci použijte příponu souboru `*.front-component.tsx`. * Pole `component` odkazuje na vaši React komponentu. -* Komponenty se během `yarn app:dev` automaticky sestaví a synchronizují. +* Components are built and synced automatically during `yarn twenty app:dev`. Nové frontendové komponenty můžete vytvořit dvěma způsoby: -* **Vygenerované**: Spusťte `yarn entity:add` a zvolte možnost přidat novou frontendovou komponentu. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Ruční**: Vytvořte nový soubor `*.front-component.tsx` a použijte `defineFrontComponent()`. ### Generovaný typovaný klient -Spusťte yarn app:generate a vytvořte lokálního typovaného klienta v generated/ na základě schématu vašeho pracovního prostoru. Použijte jej ve svých funkcích: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Použijte jej ve svých funkcích: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -Klient je znovu generován příkazem `yarn app:generate`. Spusťte znovu po změně vašich objektů nebo při připojování k novému pracovnímu prostoru. +The client is re-generated by `yarn twenty app:generate`. Spusťte znovu po změně vašich objektů nebo při připojování k novému pracovnímu prostoru. #### Běhové přihlašovací údaje v logických funkcích @@ -623,40 +623,29 @@ Prozkoumejte minimalistický end-to-end příklad, který demonstruje objekty, l ## Ruční nastavení (bez scaffolderu) -Ačkoli pro nejlepší začátky doporučujeme použít `create-twenty-app`, projekt můžete nastavit i ručně. Neinstalujte CLI globálně. Místo toho přidejte `twenty-sdk` jako lokální závislost a propojte skripty v souboru package.json: +Ačkoli pro nejlepší začátky doporučujeme použít `create-twenty-app`, projekt můžete nastavit i ručně. Neinstalujte CLI globálně. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Poté přidejte skripty jako tyto: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Nyní můžete spouštět stejné příkazy přes Yarn, např. `yarn app:dev`, `yarn app:generate` atd. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Řešení potíží -* Chyby ověření: spusťte `yarn auth:login` a ujistěte se, že váš klíč API má požadovaná oprávnění. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Nelze se připojit k serveru: ověřte URL API a že je server Twenty dosažitelný. -* Typy nebo klient chybí nebo jsou zastaralé: spusťte `yarn app:generate`. -* Režim vývoje nesynchronizuje: ujistěte se, že běží `yarn app:dev` a že vaše prostředí změny neignoruje. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Kanál podpory na Discordu: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/de/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/de/developers/extend/capabilities/apps.mdx index 5559a25310..ab57ef4661 100644 --- a/packages/twenty-docs/l/de/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/de/developers/extend/capabilities/apps.mdx @@ -36,32 +36,32 @@ corepack enable yarn install # Authenticate using your API key (you'll be prompted) -yarn auth:login +yarn twenty auth:login # Start dev mode: automatically syncs local changes to your workspace -yarn app:dev +yarn twenty app:dev ``` Von hier aus können Sie: ```bash filename="Terminal" -# Eine neue Entität zu deiner Anwendung hinzufügen (geführt) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Einen typisierten Twenty-Client und Entitätstypen für den Arbeitsbereich generieren -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Die Funktionsprotokolle deiner Anwendung überwachen -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Eine Funktion anhand ihres Namens ausführen -yarn function:execute -n my-function -p '{"name": "test"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Die Anwendung aus dem aktuellen Arbeitsbereich deinstallieren -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Hilfe zu Befehlen anzeigen -yarn help +# Display commands' help +yarn twenty help ``` Siehe auch: die CLI-Referenzseiten für [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) und [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ Auf hoher Ebene: -* **package.json**: Deklariert den App-Namen, die Version, Engines (Node 24+, Yarn 4) und fügt `twenty-sdk` sowie Skripte wie `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` sowie Authentifizierungsbefehle hinzu, die an die lokale `twenty`-CLI delegieren. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: Ignoriert übliche Artefakte wie `node_modules`, `.yarn`, `generated/` (typisierter Client), `dist/`, `build/`, Coverage-Ordner, Logdateien und `.env*`-Dateien. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Fixieren und konfigurieren die vom Projekt verwendete Yarn-4-Toolchain. * **.nvmrc**: Legt die vom Projekt erwartete Node.js-Version fest. @@ -142,12 +142,12 @@ export default defineObject({ Spätere Befehle fügen weitere Dateien und Ordner hinzu: -* `yarn app:generate` erstellt einen `generated/`-Ordner (typisierter Twenty-Client + Workspace-Typen). -* `yarn entity:add` fügt unter `src/` Entitätsdefinitionsdateien für Ihre benutzerdefinierten Objekte, Funktionen, Front-Komponenten oder Rollen hinzu. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Authentifizierung -Wenn Sie `yarn auth:login` zum ersten Mal ausführen, werden Sie nach Folgendem gefragt: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * API-URL (standardmäßig http://localhost:3000 oder Ihr aktuelles Workspace-Profil) * API-Schlüssel @@ -158,25 +158,25 @@ Ihre Anmeldedaten werden pro Benutzer in `~/.twenty/config.json` gespeichert. Si ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -Sobald Sie mit `auth:switch` den Arbeitsbereich gewechselt haben, verwenden alle nachfolgenden Befehle standardmäßig diesen Arbeitsbereich. Sie können es weiterhin vorübergehend mit `--workspace ` überschreiben. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Sie können es weiterhin vorübergehend mit `--workspace ` überschreiben. ## SDK-Ressourcen verwenden (Typen & Konfiguration) @@ -276,7 +276,7 @@ Hauptpunkte: * Der `universalIdentifier` muss eindeutig und über Deployments hinweg stabil sein. * Jedes Feld benötigt `name`, `type`, `label` und einen eigenen stabilen `universalIdentifier`. * Das Array `fields` ist optional — Sie können Objekte ohne benutzerdefinierte Felder definieren. -* Sie können mit `yarn entity:add` neue Objekte erzeugen; der Assistent führt Sie durch Benennung, Felder und Beziehungen. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Basisfelder werden automatisch erstellt.** Wenn Sie ein benutzerdefiniertes Objekt definieren, fügt Twenty automatisch Standardfelder wie `name`, `createdAt`, `updatedAt`, `createdBy`, `position` und `deletedAt` hinzu. Sie müssen diese nicht in Ihrem `fields`-Array definieren — fügen Sie nur Ihre benutzerdefinierten Felder hinzu. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Sie können neue Funktionen auf zwei Arten erstellen: -* **Generiert**: Führen Sie `yarn entity:add` aus und wählen Sie die Option zum Hinzufügen einer neuen Logikfunktion. Dadurch wird eine Starterdatei mit Handler und Konfiguration erzeugt. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Dadurch wird eine Starterdatei mit Handler und Konfiguration erzeugt. * **Manuell**: Erstellen Sie eine neue `*.logic-function.ts`-Datei und verwenden Sie `defineLogicFunction()` nach demselben Muster. ### Frontend-Komponenten @@ -584,16 +584,16 @@ Hauptpunkte: * Frontend-Komponenten sind React-Komponenten, die in isolierten Kontexten innerhalb von Twenty gerendert werden. * Verwenden Sie die Dateiendung `*.front-component.tsx` für die automatische Erkennung. * Das Feld `component` verweist auf Ihre React-Komponente. -* Komponenten werden während `yarn app:dev` automatisch gebaut und synchronisiert. +* Components are built and synced automatically during `yarn twenty app:dev`. Sie können neue Frontend-Komponenten auf zwei Arten erstellen: -* **Generiert**: Führen Sie `yarn entity:add` aus und wählen Sie die Option zum Hinzufügen einer neuen Frontend-Komponente. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Manuell**: Erstellen Sie eine neue `*.front-component.tsx`-Datei und verwenden Sie `defineFrontComponent()`. ### Generierter typisierter Client -Führen Sie yarn app:generate aus, um einen lokalen typisierten Client in generated/ basierend auf Ihrem Workspace-Schema zu erstellen. Verwenden Sie ihn in Ihren Funktionen: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Verwenden Sie ihn in Ihren Funktionen: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -Der Client wird durch `yarn app:generate` erneut generiert. Führen Sie ihn nach Änderungen an Ihren Objekten oder beim Onboarding in einen neuen Workspace erneut aus. +The client is re-generated by `yarn twenty app:generate`. Führen Sie ihn nach Änderungen an Ihren Objekten oder beim Onboarding in einen neuen Workspace erneut aus. #### Laufzeit-Anmeldedaten in Logikfunktionen @@ -623,40 +623,29 @@ Ein minimales End-to-End-Beispiel, das Objekte, Logikfunktionen, Frontend-Kompon ## Manuelle Einrichtung (ohne Scaffolder) -Wir empfehlen zwar `create-twenty-app` für das beste Einstiegserlebnis, Sie können ein Projekt aber auch manuell einrichten. Installieren Sie die CLI nicht global. Fügen Sie stattdessen `twenty-sdk` als lokale Abhängigkeit hinzu und binden Sie Skripte in Ihrer package.json ein: +Wir empfehlen zwar `create-twenty-app` für das beste Einstiegserlebnis, Sie können ein Projekt aber auch manuell einrichten. Installieren Sie die CLI nicht global. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Fügen Sie dann Skripte wie diese hinzu: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Jetzt können Sie dieselben Befehle über Yarn ausführen, z. B. `yarn app:dev`, `yarn app:generate` usw. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Fehlerbehebung -* Authentifizierungsfehler: Führen Sie `yarn auth:login` aus und stellen Sie sicher, dass Ihr API-Schlüssel die erforderlichen Berechtigungen hat. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Verbindung zum Server nicht möglich: Überprüfen Sie die API-URL und dass der Twenty-Server erreichbar ist. -* Typen oder Client fehlen/veraltet: Führen Sie `yarn app:generate` aus. -* Dev-Modus synchronisiert nicht: Stellen Sie sicher, dass `yarn app:dev` läuft und dass Änderungen von Ihrer Umgebung nicht ignoriert werden. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Discord-Hilfekanal: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/it/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/it/developers/extend/capabilities/apps.mdx index 61d6fd1be9..db38a44de9 100644 --- a/packages/twenty-docs/l/it/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/it/developers/extend/capabilities/apps.mdx @@ -27,41 +27,41 @@ Le app ti consentono di creare e gestire le personalizzazioni di Twenty **come c Crea una nuova app utilizzando lo scaffolder ufficiale, quindi autenticati e inizia a sviluppare: ```bash filename="Terminal" -# Crea lo scaffold di una nuova app +# Scaffold a new app npx create-twenty-app@latest my-twenty-app cd my-twenty-app -# Se non usi yarn@4 +# If you don't use yarn@4 corepack enable yarn install -# Autenticati usando la tua API key (ti verrà richiesto) -yarn auth:login +# Authenticate using your API key (you'll be prompted) +yarn twenty auth:login -# Avvia la modalità di sviluppo: sincronizza automaticamente le modifiche locali con il tuo workspace -yarn app:dev +# Start dev mode: automatically syncs local changes to your workspace +yarn twenty app:dev ``` Da qui puoi: ```bash filename="Terminal" -# Aggiungi una nuova entità alla tua applicazione (guidata) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Genera un client Twenty tipizzato e i tipi di entità dell'area di lavoro -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Monitora i log delle funzioni della tua applicazione -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Esegui una funzione per nome -yarn function:execute -n my-function -p '{"name": "test"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Disinstalla l'applicazione dallo spazio di lavoro corrente -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Mostra l'aiuto dei comandi -yarn help +# Display commands' help +yarn twenty help ``` Vedi anche: le pagine di riferimento della CLI per [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) e [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ A livello generale: -* **package.json**: Dichiara il nome dell'app, la versione, i motori (Node 24+, Yarn 4) e aggiunge `twenty-sdk`, oltre a script come `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` e comandi di autenticazione che delegano alla CLI locale `twenty`. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: Ignora i file generati comuni come `node_modules`, `.yarn`, `generated/` (client tipizzato), `dist/`, `build/`, cartelle di coverage, file di log e file `.env*`. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Bloccano e configurano la toolchain Yarn 4 utilizzata dal progetto. * **.nvmrc**: Fissa la versione di Node.js prevista dal progetto. @@ -142,12 +142,12 @@ export default defineObject({ Comandi successivi aggiungeranno altri file e cartelle: -* `yarn app:generate` creerà una cartella `generated/` (client Twenty tipizzato + tipi dello spazio di lavoro). -* `yarn entity:add` aggiungerà file di definizione delle entità sotto `src/` per i tuoi oggetti, funzioni, componenti front-end o ruoli personalizzati. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Autenticazione -La prima volta che esegui `yarn auth:login`, ti verranno richiesti: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * URL dell'API (predefinito a http://localhost:3000 o al profilo dello spazio di lavoro corrente) * Chiave API @@ -158,25 +158,25 @@ Le tue credenziali sono archiviate per utente in `~/.twenty/config.json`. Puoi m ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -Una volta che hai cambiato area di lavoro con `auth:switch`, tutti i comandi successivi utilizzeranno quell'area di lavoro per impostazione predefinita. Puoi comunque sovrascriverla temporaneamente con `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Puoi comunque sovrascriverla temporaneamente con `--workspace `. ## Usa le risorse dell'SDK (tipi e configurazione) @@ -276,7 +276,7 @@ Punti chiave: * Il `universalIdentifier` deve essere univoco e stabile tra i deployment. * Ogni campo richiede un `name`, `type`, `label` e il proprio `universalIdentifier` stabile. * L'array `fields` è facoltativo: puoi definire oggetti senza campi personalizzati. -* Puoi generare nuovi oggetti con `yarn entity:add`, che ti guida nella denominazione, nei campi e nelle relazioni. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **I campi base vengono creati automaticamente.** Quando definisci un oggetto personalizzato, Twenty aggiunge automaticamente i campi standard come `name`, `createdAt`, `updatedAt`, `createdBy`, `position` e `deletedAt`. Non è necessario definirli nel tuo array `fields` — aggiungi solo i tuoi campi personalizzati. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Puoi creare nuove funzioni in due modi: -* **Generata dallo scaffolder**: Esegui `yarn entity:add` e scegli l'opzione per aggiungere una nuova funzione logica. Questo genera un file iniziale con un handler e una configurazione. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Questo genera un file iniziale con un handler e una configurazione. * **Manuale**: Crea un nuovo file `*.logic-function.ts` e usa `defineLogicFunction()`, seguendo lo stesso schema. ### Componenti front-end @@ -584,16 +584,16 @@ Punti chiave: * I componenti front-end sono componenti React che eseguono il rendering in contesti isolati all'interno di Twenty. * Usa il suffisso di file `*.front-component.tsx` per il rilevamento automatico. * Il campo `component` fa riferimento al tuo componente React. -* I componenti vengono compilati e sincronizzati automaticamente durante `yarn app:dev`. +* Components are built and synced automatically during `yarn twenty app:dev`. Puoi creare nuovi componenti front-end in due modi: -* **Generata dallo scaffolder**: Esegui `yarn entity:add` e scegli l'opzione per aggiungere un nuovo componente front-end. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Manuale**: Crea un nuovo file `*.front-component.tsx` e usa `defineFrontComponent()`. ### Client tipizzato generato -Esegui yarn app:generate per creare un client tipizzato locale in generated/ basato sullo schema del tuo spazio di lavoro. Usalo nelle tue funzioni: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Usalo nelle tue funzioni: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -Il client viene rigenerato da `yarn app:generate`. Eseguilo nuovamente dopo aver modificato i tuoi oggetti oppure quando effettui l'onboarding su un nuovo spazio di lavoro. +The client is re-generated by `yarn twenty app:generate`. Eseguilo nuovamente dopo aver modificato i tuoi oggetti oppure quando effettui l'onboarding su un nuovo spazio di lavoro. #### Credenziali di runtime nelle funzioni logiche @@ -623,40 +623,29 @@ Esplora un esempio minimale end-to-end che dimostra oggetti, funzioni logiche, c ## Configurazione manuale (senza lo scaffolder) -Sebbene consigliamo di utilizzare `create-twenty-app` per la migliore esperienza iniziale, puoi anche configurare un progetto manualmente. Non installare la CLI globalmente. Invece, aggiungi `twenty-sdk` come dipendenza locale e collega gli script nel tuo package.json: +Sebbene consigliamo di utilizzare `create-twenty-app` per la migliore esperienza iniziale, puoi anche configurare un progetto manualmente. Non installare la CLI globalmente. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Quindi aggiungi script come questi: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Ora puoi eseguire gli stessi comandi tramite Yarn, ad esempio `yarn app:dev`, `yarn app:generate`, ecc. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Risoluzione dei problemi -* Errori di autenticazione: esegui `yarn auth:login` e assicurati che la tua chiave API abbia i permessi richiesti. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Impossibile connettersi al server: verifica l'URL dell'API e che il server Twenty sia raggiungibile. -* Tipi o client mancanti/obsoleti: esegui `yarn app:generate`. -* Modalità di sviluppo non in sincronizzazione: assicurati che `yarn app:dev` sia in esecuzione e che le modifiche non vengano ignorate dal tuo ambiente. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Canale di supporto su Discord: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/pt/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/pt/developers/extend/capabilities/apps.mdx index efb1b5dc51..18b336e5a5 100644 --- a/packages/twenty-docs/l/pt/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/pt/developers/extend/capabilities/apps.mdx @@ -27,41 +27,41 @@ Os aplicativos permitem criar e gerenciar personalizações do Twenty **como có Crie um novo aplicativo usando o gerador oficial, depois autentique-se e comece a desenvolver: ```bash filename="Terminal" -# Criar a estrutura de um novo app +# Scaffold a new app npx create-twenty-app@latest my-twenty-app cd my-twenty-app -# Se você não usa yarn@4 +# If you don't use yarn@4 corepack enable yarn install -# Autentique-se usando sua chave de API (você será solicitado) -yarn auth:login +# Authenticate using your API key (you'll be prompted) +yarn twenty auth:login -# Iniciar modo de desenvolvimento: sincroniza automaticamente as alterações locais com seu workspace -yarn app:dev +# Start dev mode: automatically syncs local changes to your workspace +yarn twenty app:dev ``` A partir daqui você pode: ```bash filename="Terminal" -# Adicionar uma nova entidade à sua aplicação (assistido) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Gerar um cliente Twenty tipado e tipos de entidades do espaço de trabalho -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Acompanhar os logs das funções da sua aplicação -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Executar uma função pelo nome -yarn function:execute -n my-function -p '{\"name\": \"test\"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Desinstalar a aplicação do espaço de trabalho atual -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Exibir a ajuda dos comandos -yarn help +# Display commands' help +yarn twenty help ``` Veja também: as páginas de referência da CLI para [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) e [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ Em alto nível: -* **package.json**: Declara o nome do app, versão, engines (Node 24+, Yarn 4) e adiciona `twenty-sdk`, além de scripts como `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` e comandos de autenticação que delegam para a CLI local `twenty`. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: Ignora artefatos comuns como `node_modules`, `.yarn`, `generated/` (cliente tipado), `dist/`, `build/`, pastas de cobertura, arquivos de log e arquivos `.env*`. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Bloqueiam e configuram a ferramenta Yarn 4 usada pelo projeto. * **.nvmrc**: Fixa a versão do Node.js esperada pelo projeto. @@ -142,12 +142,12 @@ export default defineObject({ Comandos posteriores adicionarão mais arquivos e pastas: -* `yarn app:generate` criará uma pasta `generated/` (cliente tipado do Twenty + tipos do workspace). -* `yarn entity:add` adicionará arquivos de definição de entidade em `src/` para seus objetos, funções, componentes de front-end ou papéis personalizados. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Autenticação -Na primeira vez que você executar `yarn auth:login`, será solicitado o seguinte: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * URL da API (padrão: http://localhost:3000 ou o perfil do seu espaço de trabalho atual) * Chave de API @@ -157,26 +157,26 @@ Suas credenciais são armazenadas por usuário em `~/.twenty/config.json`. Você ### Gerenciando espaços de trabalho ```bash filename="Terminal" -# Fazer login interativamente (recomendado) -yarn auth:login +# Login interactively (recommended) +yarn twenty auth:login -# Fazer login em um perfil de espaço de trabalho específico -yarn auth:login --workspace my-custom-workspace +# Login to a specific workspace profile +yarn twenty auth:login --workspace my-custom-workspace -# Listar todos os espaços de trabalho configurados -yarn auth:list +# List all configured workspaces +yarn twenty auth:list -# Alterar o espaço de trabalho padrão (interativo) -yarn auth:switch +# Switch the default workspace (interactive) +yarn twenty auth:switch -# Alternar para um espaço de trabalho específico -yarn auth:switch production +# Switch to a specific workspace +yarn twenty auth:switch production -# Verificar o status atual da autenticação -yarn auth:status +# Check current authentication status +yarn twenty auth:status ``` -Depois que você alternar os espaços de trabalho com `auth:switch`, todos os comandos subsequentes usarão esse espaço de trabalho por padrão. Você ainda pode substituí-lo temporariamente com `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Você ainda pode substituí-lo temporariamente com `--workspace `. ## Use os recursos do SDK (tipos e configuração) @@ -276,7 +276,7 @@ Pontos-chave: * O `universalIdentifier` deve ser exclusivo e estável entre implantações. * Cada campo requer `name`, `type`, `label` e seu próprio `universalIdentifier` estável. * O array `fields` é opcional — você pode definir objetos sem campos personalizados. -* Você pode criar novos objetos usando `yarn entity:add`, que orienta você sobre nomeação, campos e relacionamentos. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Os campos base são criados automaticamente.** Quando você define um objeto personalizado, o Twenty adiciona automaticamente campos padrão como `name`, `createdAt`, `updatedAt`, `createdBy`, `position` e `deletedAt`. Você não precisa definir esses no seu array `fields` — adicione apenas seus campos personalizados. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Você pode criar novas funções de duas formas: -* **Gerado automaticamente**: Execute `yarn entity:add` e escolha a opção para adicionar uma nova função de lógica. Isso gera um arquivo inicial com um handler e configuração. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Isso gera um arquivo inicial com um handler e configuração. * **Manual**: Crie um novo arquivo `*.logic-function.ts` e use `defineLogicFunction()`, seguindo o mesmo padrão. ### Componentes de front-end @@ -584,16 +584,16 @@ Pontos-chave: * Componentes de front-end são componentes React que renderizam em contextos isolados dentro do Twenty. * Use o sufixo de arquivo `*.front-component.tsx` para detecção automática. * O campo `component` faz referência ao seu componente React. -* Os componentes são compilados e sincronizados automaticamente durante `yarn app:dev`. +* Components are built and synced automatically during `yarn twenty app:dev`. Você pode criar novos componentes de front-end de duas formas: -* **Gerado automaticamente**: Execute `yarn entity:add` e escolha a opção para adicionar um novo componente de front-end. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Manual**: Crie um novo arquivo `*.front-component.tsx` e use `defineFrontComponent()`. ### Cliente tipado gerado -Execute yarn app:generate para criar um cliente tipado local em generated/ com base no esquema do seu workspace. Use-o em suas funções: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Use-o em suas funções: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -O cliente é regenerado pelo `yarn app:generate`. Execute novamente após alterar seus objetos ou ao ingressar em um novo workspace. +The client is re-generated by `yarn twenty app:generate`. Execute novamente após alterar seus objetos ou ao ingressar em um novo workspace. #### Credenciais em tempo de execução em funções de lógica @@ -623,40 +623,29 @@ Explore um exemplo mínimo de ponta a ponta que demonstra objetos, funções de ## Configuração manual (sem o gerador) -Embora recomendemos usar `create-twenty-app` para a melhor experiência inicial, você também pode configurar um projeto manualmente. Não instale a CLI globalmente. Em vez disso, adicione `twenty-sdk` como uma dependência local e conecte scripts no seu package.json: +Embora recomendemos usar `create-twenty-app` para a melhor experiência inicial, você também pode configurar um projeto manualmente. Não instale a CLI globalmente. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Em seguida, adicione scripts como estes: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Agora você pode executar os mesmos comandos via Yarn, por exemplo, `yarn app:dev`, `yarn app:generate`, etc. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Resolução de Problemas -* Erros de autenticação: execute `yarn auth:login` e certifique-se de que sua chave de API tenha as permissões necessárias. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Não é possível conectar ao servidor: verifique a URL da API e se o servidor do Twenty está acessível. -* Tipos ou cliente ausentes/desatualizados: execute `yarn app:generate`. -* Modo de desenvolvimento não sincronizando: certifique-se de que `yarn app:dev` esteja em execução e de que as alterações não estejam sendo ignoradas pelo seu ambiente. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Canal de ajuda no Discord: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/ro/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/ro/developers/extend/capabilities/apps.mdx index 8362eca759..ee1f1a4a04 100644 --- a/packages/twenty-docs/l/ro/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/ro/developers/extend/capabilities/apps.mdx @@ -36,32 +36,32 @@ corepack enable yarn install # Autentifică-te folosind cheia ta API (ți se va solicita) -yarn auth:login +yarn twenty auth:login # Pornește modul de dezvoltare: sincronizează automat modificările locale cu spațiul tău de lucru -yarn app:dev +yarn twenty app:dev},{ ``` De aici puteți: ```bash filename="Terminal" -# Adaugă o entitate nouă în aplicația ta (ghidat) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Generează un client Twenty tipat și tipurile de entități ale spațiului de lucru -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Urmărește jurnalele funcțiilor aplicației tale -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Execută o funcție după nume -yarn function:execute -n my-function -p '{"name": "test"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Dezinstalează aplicația din spațiul de lucru curent -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Afișează ajutorul pentru comenzi -yarn help},{ +# Display commands' help +yarn twenty help) ``` Consultați și: paginile de referință CLI pentru [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) și [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ Pe scurt: -* **package.json**: Declară numele aplicației, versiunea, motoarele (Node 24+, Yarn 4) și adaugă `twenty-sdk` plus scripturi precum `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall`, precum și comenzi de autentificare care deleagă către CLI-ul local `twenty`. +* **package.json**: Declară numele aplicației, versiunea, motoarele (Node 24+, Yarn 4) și adaugă `twenty-sdk` plus un script `twenty` care deleagă către CLI-ul local `twenty`. Rulează `yarn twenty help` pentru a lista toate comenzile disponibile. * **.gitignore**: Ignoră artefacte comune precum `node_modules`, `.yarn`, `generated/` (client tipizat), `dist/`, `build/`, foldere de coverage, fișiere jurnal și fișiere `.env*`. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Blochează și configurează lanțul de instrumente Yarn 4 folosit de proiect. * **.nvmrc**: Fixează versiunea Node.js așteptată de proiect. @@ -142,12 +142,12 @@ export default defineObject({ Comenzile ulterioare vor adăuga mai multe fișiere și foldere: -* `yarn app:generate` va crea un folder `generated/` (client Twenty tipizat + tipuri pentru spațiul de lucru). -* `yarn entity:add` va adăuga fișiere de definire a entităților în `src/` pentru obiectele, funcțiile, componentele front-end sau rolurile personalizate. +* `yarn twenty app:generate` va crea un folder `generated/` (client Twenty tipizat + tipuri pentru spațiul de lucru). +* `yarn twenty entity:add` va adăuga fișiere de definire a entităților în `src/` pentru obiectele, funcțiile, componentele front-end sau rolurile personalizate. ## Autentificare -Prima dată când rulați `yarn auth:login`, vi se vor solicita: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * URL-ul API (implicit http://localhost:3000 sau profilul spațiului de lucru curent) * Cheie API @@ -158,25 +158,25 @@ Acreditările dvs. sunt stocate per utilizator în `~/.twenty/config.json`. Pute ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -După ce ați schimbat spațiul de lucru cu `auth:switch`, toate comenzile ulterioare vor folosi implicit acel spațiu de lucru. Îl puteți totuși suprascrie temporar cu `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Îl puteți totuși suprascrie temporar cu `--workspace `. ## Utilizați resursele SDK (tipuri și configurare) @@ -276,7 +276,7 @@ Puncte cheie: * `universalIdentifier` trebuie să fie unic și stabil între implementări. * Fiecare câmp necesită un `name`, un `type`, un `label` și propriul `universalIdentifier` stabil. * Matricea `fields` este opțională — puteți defini obiecte fără câmpuri personalizate. -* Puteți genera obiecte noi folosind `yarn entity:add`, care vă ghidează prin denumire, câmpuri și relații. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Câmpurile de bază sunt create automat.** Când definiți un obiect personalizat, Twenty adaugă automat câmpuri standard precum `name`, `createdAt`, `updatedAt`, `createdBy`, `position` și `deletedAt`. Nu trebuie să le definiți în tabloul `fields` — adăugați doar câmpurile personalizate proprii. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Puteți crea funcții noi în două moduri: -* **Generat**: Rulați `yarn entity:add` și alegeți opțiunea de a adăuga o funcție de logică nouă. Aceasta generează un fișier inițial cu un handler și o configurație. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Aceasta generează un fișier inițial cu un handler și o configurație. * **Manual**: Creați un fișier nou `*.logic-function.ts` și folosiți `defineLogicFunction()`, urmând același model. ### Componente Front @@ -584,16 +584,16 @@ Puncte cheie: * Componentele Front sunt componente React care sunt randate în contexte izolate în cadrul Twenty. * Folosiți sufixul de fișier `*.front-component.tsx` pentru detectare automată. * Câmpul `component` face referire la componenta React. -* Componentele sunt construite și sincronizate automat în timpul `yarn app:dev`. +* Components are built and synced automatically during `yarn twenty app:dev`. Puteți crea componente Front noi în două moduri: -* **Generat**: Rulați `yarn entity:add` și alegeți opțiunea de a adăuga o componentă Front nouă. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Manual**: Creați un fișier nou `*.front-component.tsx` și folosiți `defineFrontComponent()`. ### Client tipizat generat -Rulați yarn app:generate pentru a crea un client tipizat local în generated/, pe baza schemei spațiului de lucru. Folosiți-l în funcțiile dvs.: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Folosiți-l în funcțiile dvs.: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -Clientul este regenerat de `yarn app:generate`. Rulați din nou după ce vă modificați obiectele sau când vă integrați într-un spațiu de lucru nou. +The client is re-generated by `yarn twenty app:generate`. Rulați din nou după ce vă modificați obiectele sau când vă integrați într-un spațiu de lucru nou. #### Acreditări la runtime în funcțiile de logică @@ -623,40 +623,29 @@ Explorați un exemplu minim, cap la cap, care demonstrează obiecte, funcții de ## Configurare manuală (fără generator) -Deși recomandăm utilizarea `create-twenty-app` pentru cea mai bună experiență de început, puteți configura și un proiect manual. Nu instalați CLI-ul global. În schimb, adăugați `twenty-sdk` ca dependență locală și conectați scripturile în package.json-ul dvs.: +Deși recomandăm utilizarea `create-twenty-app` pentru cea mai bună experiență de început, puteți configura și un proiect manual. Nu instalați CLI-ul global. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Apoi adăugați scripturi ca acestea: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Acum puteți rula aceleași comenzi prin Yarn, de ex. `yarn app:dev`, `yarn app:generate`, etc. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Depanare -* Erori de autentificare: rulați `yarn auth:login` și asigurați-vă că cheia API are permisiunile necesare. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Nu se poate conecta la server: verificați URL-ul API și că serverul Twenty este accesibil. -* Tipuri sau client lipsă/învechite: rulați `yarn app:generate`. -* Modul dev nu sincronizează: asigurați-vă că `yarn app:dev` rulează și că modificările nu sunt ignorate de mediul dvs. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Canal de ajutor pe Discord: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/ru/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/ru/developers/extend/capabilities/apps.mdx index 770b9d371d..a31d7e1d05 100644 --- a/packages/twenty-docs/l/ru/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/ru/developers/extend/capabilities/apps.mdx @@ -36,32 +36,32 @@ corepack enable yarn install # Authenticate using your API key (you'll be prompted) -yarn auth:login +yarn twenty auth:login # Start dev mode: automatically syncs local changes to your workspace -yarn app:dev +yarn twenty app:dev ``` Отсюда вы можете: ```bash filename="Terminal" -# Добавить новую сущность в ваше приложение (с мастером) -yarn entity:add +# Add a new entity to your application (guided) +yarn twenty entity:add -# Сгенерировать типизированный клиент Twenty и типы сущностей рабочего пространства -yarn app:generate +# Generate a typed Twenty client and workspace entity types +yarn twenty app:generate -# Просматривать логи функций вашего приложения -yarn function:logs +# Watch your application's function logs +yarn twenty function:logs -# Выполнить функцию по имени -yarn function:execute -n my-function -p '{"name": "test"}' +# Execute a function by name +yarn twenty function:execute -n my-function -p '{"name": "test"}' -# Удалить приложение из текущего рабочего пространства -yarn app:uninstall +# Uninstall the application from the current workspace +yarn twenty app:uninstall -# Показать справку по командам -yarn help +# Display commands' help +yarn twenty help ``` Смотрите также: страницы справки CLI для [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) и [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk). @@ -102,7 +102,7 @@ my-twenty-app/ В общих чертах: -* **package.json**: Объявляет имя приложения, версию, движки (Node 24+, Yarn 4) и добавляет `twenty-sdk`, а также скрипты вроде `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` и команды аутентификации, которые делегируют выполнение локальному CLI `twenty`. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: Игнорирует распространённые артефакты, такие как `node_modules`, `.yarn`, `generated/` (типизированный клиент), `dist/`, `build/`, каталоги coverage, файлы журналов и файлы `.env*`. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Фиксируют и настраивают используемый в проекте инструментарий Yarn 4. * **.nvmrc**: Фиксирует версию Node.js, ожидаемую проектом. @@ -142,12 +142,12 @@ export default defineObject({ Позднее команды добавят больше файлов и папок: -* `yarn app:generate` создаст папку `generated/` (типизированный клиент Twenty + типы рабочего пространства). -* `yarn entity:add` добавит файлы определений сущностей в `src/` для ваших пользовательских объектов, функций, фронтенд-компонентов или ролей. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Аутентификация -При первом запуске `yarn auth:login` вам будет предложено указать: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * URL API (по умолчанию http://localhost:3000 или текущий профиль рабочего пространства) * Ключ API @@ -157,26 +157,26 @@ export default defineObject({ ### Управление рабочими пространствами ```bash filename="Terminal" -# Войти в интерактивном режиме (рекомендуется) -yarn auth:login +# Login interactively (recommended) +yarn twenty auth:login -# Войти в профиль конкретного рабочего пространства -yarn auth:login --workspace my-custom-workspace +# Login to a specific workspace profile +yarn twenty auth:login --workspace my-custom-workspace -# Показать список всех настроенных рабочих пространств -yarn auth:list +# List all configured workspaces +yarn twenty auth:list -# Переключить рабочее пространство по умолчанию (в интерактивном режиме) -yarn auth:switch +# Switch the default workspace (interactive) +yarn twenty auth:switch -# Переключиться на определённое рабочее пространство -yarn auth:switch production +# Switch to a specific workspace +yarn twenty auth:switch production -# Проверить текущий статус аутентификации -yarn auth:status +# Check current authentication status +yarn twenty auth:status ``` -После переключения рабочего пространства с помощью `auth:switch` все последующие команды по умолчанию будут использовать это рабочее пространство. Вы по-прежнему можете временно переопределить это с помощью `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. Вы по-прежнему можете временно переопределить это с помощью `--workspace `. ## Используйте ресурсы SDK (типы и конфигурация) @@ -276,7 +276,7 @@ export default defineObject({ * `universalIdentifier` должен быть уникальным и стабильным между развёртываниями. * Каждому полю требуются `name`, `type`, `label` и собственный стабильный `universalIdentifier`. * Массив `fields` необязателен — вы можете определять объекты без пользовательских полей. -* Вы можете сгенерировать новые объекты с помощью `yarn entity:add`, который проведёт вас через выбор именования, полей и связей. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Базовые поля создаются автоматически.** Когда вы определяете пользовательский объект, Twenty автоматически добавляет стандартные поля, такие как `name`, `createdAt`, `updatedAt`, `createdBy`, `position` и `deletedAt`. Вам не нужно определять их в массиве `fields` — добавляйте только свои пользовательские поля. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Вы можете создать новые функции двумя способами: -* **Сгенерировано**: Запустите `yarn entity:add` и выберите опцию добавления новой логической функции. Это создаёт стартовый файл с обработчиком и конфигурацией. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Это создаёт стартовый файл с обработчиком и конфигурацией. * **Вручную**: Создайте новый файл `*.logic-function.ts` и используйте `defineLogicFunction()`, следуя тому же шаблону. ### Фронт-компоненты @@ -584,16 +584,16 @@ export default defineFrontComponent({ * Фронт-компоненты — это компоненты React, которые рендерятся в изолированных контекстах внутри Twenty. * Используйте суффикс файла `*.front-component.tsx` для автоматического обнаружения. * Поле `component` ссылается на ваш компонент React. -* Компоненты автоматически собираются и синхронизируются во время `yarn app:dev`. +* Components are built and synced automatically during `yarn twenty app:dev`. Вы можете создать новые фронт-компоненты двумя способами: -* **Сгенерировано**: Запустите `yarn entity:add` и выберите опцию добавления нового фронт-компонента. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Вручную**: Создайте новый файл `*.front-component.tsx` и используйте `defineFrontComponent()`. ### Сгенерированный типизированный клиент -Запустите yarn app:generate, чтобы создать локальный типизированный клиент в generated/ на основе схемы вашего рабочего пространства. Используйте его в своих функциях: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Используйте его в своих функциях: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -Клиент повторно генерируется командой `yarn app:generate`. Запускайте повторно после изменения ваших объектов или при подключении к новому рабочему пространству. +The client is re-generated by `yarn twenty app:generate`. Запускайте повторно после изменения ваших объектов или при подключении к новому рабочему пространству. #### Учётные данные времени выполнения в логических функциях @@ -623,40 +623,29 @@ const { me } = await client.query({ me: { id: true, displayName: true } }); ## Ручная настройка (без генератора) -Хотя мы рекомендуем использовать `create-twenty-app` для наилучшего старта, вы также можете настроить проект вручную. Не устанавливайте CLI глобально. Вместо этого добавьте `twenty-sdk` как локальную зависимость и настройте скрипты в вашем package.json: +Хотя мы рекомендуем использовать `create-twenty-app` для наилучшего старта, вы также можете настроить проект вручную. Не устанавливайте CLI глобально. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Затем добавьте скрипты, подобные этим: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Теперь вы можете запускать те же команды через Yarn, например, `yarn app:dev`, `yarn app:generate` и т. д. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Устранение неполадок -* Ошибки аутентификации: выполните `yarn auth:login` и убедитесь, что у вашего ключа API есть необходимые права. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Не удаётся подключиться к серверу: проверьте URL API и доступность сервера Twenty. -* Типы или клиент отсутствуют/устарели: выполните `yarn app:generate`. -* Режим разработки не синхронизируется: убедитесь, что запущен `yarn app:dev`, и что ваша среда не игнорирует изменения. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Канал помощи в Discord: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/tr/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/tr/developers/extend/capabilities/apps.mdx index 19a031e9d9..a26dededd9 100644 --- a/packages/twenty-docs/l/tr/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/tr/developers/extend/capabilities/apps.mdx @@ -36,32 +36,32 @@ corepack enable yarn install # Authenticate using your API key (you'll be prompted) -yarn auth:login +yarn twenty auth:login # Start dev mode: automatically syncs local changes to your workspace -yarn app:dev +yarn twenty app:dev ``` Buradan şunları yapabilirsiniz: ```bash filename="Terminal" # Add a new entity to your application (guided) -yarn entity:add +yarn twenty entity:add # Generate a typed Twenty client and workspace entity types -yarn app:generate +yarn twenty app:generate # Watch your application's function logs -yarn function:logs +yarn twenty function:logs # Execute a function by name -yarn function:execute -n my-function -p '{"name": "test"}' +yarn twenty function:execute -n my-function -p '{"name": "test"}' # Uninstall the application from the current workspace -yarn app:uninstall +yarn twenty app:uninstall # Display commands' help -yarn help +yarn twenty help ``` Ayrıca bkz.: [create-twenty-app](https://www.npmjs.com/package/create-twenty-app) ve [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk) için CLI başvuru sayfaları. @@ -102,7 +102,7 @@ my-twenty-app/ Genel hatlarıyla: -* **package.json**: Uygulama adını, sürümünü, motorları (Node 24+, Yarn 4) bildirir ve `twenty-sdk` ile `app:dev`, `app:generate`, `entity:add`, `function:logs`, `function:execute`, `app:uninstall` gibi betikleri ve yerel `twenty` CLI’sine yetki devreden kimlik doğrulama komutlarını ekler. +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**: `node_modules`, `.yarn`, `generated/` (türlendirilmiş istemci), `dist/`, `build/`, kapsam klasörleri, günlük dosyaları ve `.env*` dosyaları gibi yaygın artifaktları yok sayar. * **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Proje tarafından kullanılan Yarn 4 araç zincirini kilitler ve yapılandırır. * **.nvmrc**: Projenin beklediği Node.js sürümünü sabitler. @@ -142,12 +142,12 @@ export default defineObject({ İlerideki komutlar daha fazla dosya ve klasör ekleyecektir: -* `yarn app:generate`, `generated/` klasörünü oluşturur (türlendirilmiş Twenty istemcisi + çalışma alanı türleri). -* `yarn entity:add`, özel nesneleriniz, fonksiyonlarınız, ön bileşenleriniz veya rolleriniz için `src/` altında varlık tanım dosyaları ekler. +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## Kimlik Doğrulama -`yarn auth:login` komutunu ilk kez çalıştırdığınızda, sizden şunlar istenir: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * API URL’si (varsayılan: http://localhost:3000 veya mevcut çalışma alanı profiliniz) * API anahtarı @@ -158,25 +158,25 @@ Kimlik bilgileriniz kullanıcı başına `~/.twenty/config.json` içinde saklan ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -Once you've switched workspaces with `auth:switch`, all subsequent commands will use that workspace by default. You can still override it temporarily with `--workspace `. +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. You can still override it temporarily with `--workspace `. ## SDK kaynaklarını kullanın (türler ve yapılandırma) @@ -276,7 +276,7 @@ export default defineObject({ * `universalIdentifier` dağıtımlar arasında benzersiz ve kararlı olmalıdır. * Her alan bir `name`, `type`, `label` ve kendi kararlı `universalIdentifier` değerini gerektirir. * `fields` dizisi isteğe bağlıdır — özel alanlar olmadan da nesneler tanımlayabilirsiniz. -* `yarn entity:add` kullanarak, adlandırma, alanlar ve ilişkiler konusunda sizi yönlendirerek yeni nesneler oluşturabilirsiniz. +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **Temel alanlar otomatik olarak oluşturulur.** Özel bir nesne tanımladığınızda Twenty, `name`, `createdAt`, `updatedAt`, `createdBy`, `position` ve `deletedAt` gibi standart alanları otomatik olarak ekler. Bunları `fields` dizinizde tanımlamanız gerekmez — yalnızca özel alanlarınızı ekleyin. @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { Yeni fonksiyonları iki şekilde oluşturabilirsiniz: -* **Şablondan**: `yarn entity:add` çalıştırın ve yeni bir mantık fonksiyonu ekleme seçeneğini seçin. Bu, bir işleyici ve yapılandırma içeren bir başlangıç dosyası oluşturur. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. Bu, bir işleyici ve yapılandırma içeren bir başlangıç dosyası oluşturur. * **Manuel**: Yeni bir `*.logic-function.ts` dosyası oluşturun ve aynı deseni izleyerek `defineLogicFunction()` kullanın. ### Ön uç bileşenleri @@ -584,16 +584,16 @@ export default defineFrontComponent({ * Ön uç bileşenleri, Twenty içinde yalıtılmış bağlamlarda görüntülenen React bileşenleridir. * Otomatik algılama için `*.front-component.tsx` dosya soneğini kullanın. * `component` alanı, React bileşeninize referans verir. -* Bileşenler, `yarn app:dev` sırasında otomatik olarak oluşturulur ve senkronize edilir. +* Components are built and synced automatically during `yarn twenty app:dev`. Yeni ön uç bileşenlerini iki şekilde oluşturabilirsiniz: -* **Şablondan**: `yarn entity:add` çalıştırın ve yeni bir ön uç bileşeni ekleme seçeneğini seçin. +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **Manuel**: Yeni bir `*.front-component.tsx` dosyası oluşturun ve `defineFrontComponent()` kullanın. ### Oluşturulmuş türlendirilmiş istemci -Çalışma alanı şemanıza göre generated/ içinde yerel bir türlendirilmiş istemci oluşturmak için yarn app:generate çalıştırın. Fonksiyonlarınızda kullanın: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. Fonksiyonlarınızda kullanın: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -İstemci `yarn app:generate` tarafından yeniden oluşturulur. Nesnelerinizi değiştirdikten sonra veya yeni bir çalışma alanına katılırken yeniden çalıştırın. +The client is re-generated by `yarn twenty app:generate`. Nesnelerinizi değiştirdikten sonra veya yeni bir çalışma alanına katılırken yeniden çalıştırın. #### Mantık fonksiyonlarında çalışma zamanı kimlik bilgileri @@ -623,40 +623,29 @@ Nesneleri, mantık fonksiyonlarını, ön uç bileşenlerini ve birden çok teti ## Manuel kurulum (scaffolder olmadan) -En iyi başlangıç deneyimi için `create-twenty-app` kullanmanızı önersek de, bir projeyi manuel olarak da kurabilirsiniz. CLI'yi global olarak kurmayın. Bunun yerine `twenty-sdk`'yi yerel bir bağımlılık olarak ekleyin ve package.json içinde betikleri bağlayın: +En iyi başlangıç deneyimi için `create-twenty-app` kullanmanızı önersek de, bir projeyi manuel olarak da kurabilirsiniz. CLI'yi global olarak kurmayın. Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -Ardından şu gibi betikler ekleyin: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -Artık aynı komutları Yarn üzerinden çalıştırabilirsiniz; örn. `yarn app:dev`, `yarn app:generate` vb. +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## Sorun Giderme -* Kimlik doğrulama hataları: `yarn auth:login` çalıştırın ve API anahtarınızın gerekli izinlere sahip olduğundan emin olun. +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * Sunucuya bağlanılamıyor: API URL’sini ve Twenty sunucusunun erişilebilir olduğunu doğrulayın. -* Türler veya istemci eksik/eski: `yarn app:generate` çalıştırın. -* Geliştirme modu eşitlenmiyor: `yarn app:dev`'in çalıştığından ve değişikliklerin ortamınız tarafından yok sayılmadığından emin olun. +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Discord Yardım Kanalı: https://discord.com/channels/1130383047699738754/1130386664812982322 diff --git a/packages/twenty-docs/l/zh/developers/extend/capabilities/apps.mdx b/packages/twenty-docs/l/zh/developers/extend/capabilities/apps.mdx index 3c6ca46a44..4948ec1922 100644 --- a/packages/twenty-docs/l/zh/developers/extend/capabilities/apps.mdx +++ b/packages/twenty-docs/l/zh/developers/extend/capabilities/apps.mdx @@ -27,41 +27,41 @@ description: 以代码的形式构建并管理 Twenty 自定义项。 使用官方脚手架创建一个新应用,然后进行身份验证并开始开发: ```bash filename="Terminal" -# 搭建一个新应用 +# Scaffold a new app npx create-twenty-app@latest my-twenty-app cd my-twenty-app -# 如果你不使用 yarn@4 +# If you don't use yarn@4 corepack enable yarn install -# 使用你的 API 密钥进行身份验证(系统会提示你) -yarn auth:login +# Authenticate using your API key (you'll be prompted) +yarn twenty auth:login -# 启动开发模式:会将本地更改自动同步到你的工作区 -yarn app:dev +# Start dev mode: automatically syncs local changes to your workspace +yarn twenty app:dev ``` 从这里您可以: ```bash filename="Terminal" # Add a new entity to your application (guided) -yarn entity:add +yarn twenty entity:add # Generate a typed Twenty client and workspace entity types -yarn app:generate +yarn twenty app:generate # Watch your application's function logs -yarn function:logs +yarn twenty function:logs # Execute a function by name -yarn function:execute -n my-function -p '{\"name\": \"test\"}' +yarn twenty function:execute -n my-function -p '{"name": "test"}' # Uninstall the application from the current workspace -yarn app:uninstall +yarn twenty app:uninstall # Display commands' help -yarn help +yarn twenty help ``` 另请参阅:[create-twenty-app](https://www.npmjs.com/package/create-twenty-app) 和 [twenty-sdk CLI](https://www.npmjs.com/package/twenty-sdk) 的 CLI 参考页面。 @@ -102,7 +102,7 @@ my-twenty-app/ 总体来说: -* **package.json**:声明应用名称、版本、运行时(Node 24+、Yarn 4),并添加 `twenty-sdk`,以及诸如 `app:dev`、`app:generate`、`entity:add`、`function:logs`、`function:execute`、`app:uninstall` 等脚本和认证命令,它们都会委托给本地的 `twenty` CLI。 +* **package.json**: Declares the app name, version, engines (Node 24+, Yarn 4), and adds `twenty-sdk` plus a `twenty` script that delegates to the local `twenty` CLI. Run `yarn twenty help` to list all available commands. * **.gitignore**:忽略常见产物,如 `node_modules`、`.yarn`、`generated/`(类型化客户端)、`dist/`、`build/`、覆盖率文件夹、日志文件以及 `.env*` 文件。 * **yarn.lock**、**.yarnrc.yml**、**.yarn/**:锁定并配置项目使用的 Yarn 4 工具链。 * **.nvmrc**:固定项目期望的 Node.js 版本。 @@ -142,12 +142,12 @@ export default defineObject({ 后续命令将添加更多文件和文件夹: -* `yarn app:generate` 将创建一个 `generated/` 文件夹(类型化 Twenty 客户端 + 工作空间类型)。 -* `yarn entity:add` 会在 `src/` 下为你的自定义对象、函数、前端组件或角色添加实体定义文件。 +* `yarn twenty app:generate` will create a `generated/` folder (typed Twenty client + workspace types). +* `yarn twenty entity:add` will add entity definition files under `src/` for your custom objects, functions, front components, or roles. ## 身份验证 -首次运行 `yarn auth:login` 时,你将被提示输入: +The first time you run `yarn twenty auth:login`, you'll be prompted for: * API URL(默认为 http://localhost:3000 或你当前的工作空间配置) * API 密钥 @@ -158,25 +158,25 @@ export default defineObject({ ```bash filename="Terminal" # Login interactively (recommended) -yarn auth:login +yarn twenty auth:login # Login to a specific workspace profile -yarn auth:login --workspace my-custom-workspace +yarn twenty auth:login --workspace my-custom-workspace # List all configured workspaces -yarn auth:list +yarn twenty auth:list # Switch the default workspace (interactive) -yarn auth:switch +yarn twenty auth:switch # Switch to a specific workspace -yarn auth:switch production +yarn twenty auth:switch production # Check current authentication status -yarn auth:status +yarn twenty auth:status ``` -使用 `auth:switch` 切换工作空间后,后续所有命令将默认使用该工作空间。 你仍可通过 `--workspace ` 临时覆盖。 +Once you've switched workspaces with `yarn twenty auth:switch`, all subsequent commands will use that workspace by default. 你仍可通过 `--workspace ` 临时覆盖。 ## 使用 SDK 资源(类型与配置) @@ -276,7 +276,7 @@ export default defineObject({ * `universalIdentifier` 必须在各次部署间保持唯一且稳定。 * 每个字段都需要 `name`、`type`、`label` 以及其自身稳定的 `universalIdentifier`。 * `fields` 数组是可选的——你可以定义没有自定义字段的对象。 -* 你可以使用 `yarn entity:add` 脚手架创建新对象,它会引导你完成命名、字段和关系。 +* You can scaffold new objects using `yarn twenty entity:add`, which guides you through naming, fields, and relationships. **基础字段会自动创建。** 当你定义自定义对象时,Twenty 会自动添加 `name`、`createdAt`、`updatedAt`、`createdBy`、`position`、`deletedAt` 等标准字段。 你无需在 `fields` 数组中定义这些字段——只需添加你的自定义字段。 @@ -551,7 +551,7 @@ const handler = async (event: RoutePayload) => { 你可以通过两种方式创建新函数: -* **脚手架生成**:运行 `yarn entity:add` 并选择添加新逻辑函数的选项。 这将生成一个包含处理程序和配置的入门文件。 +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new logic function. 这将生成一个包含处理程序和配置的入门文件。 * **手动**:创建一个新的 `*.logic-function.ts` 文件,并使用 `defineLogicFunction()`,遵循相同的模式。 ### 前端组件 @@ -584,16 +584,16 @@ export default defineFrontComponent({ * 前端组件是在 Twenty 中的隔离上下文中渲染的 React 组件。 * 使用 `*.front-component.tsx` 文件后缀以便自动检测。 * `component` 字段引用你的 React 组件。 -* 组件会在 `yarn app:dev` 期间自动构建并同步。 +* Components are built and synced automatically during `yarn twenty app:dev`. 你可以通过两种方式创建新的前端组件: -* **脚手架生成**:运行 `yarn entity:add` 并选择添加新前端组件的选项。 +* **Scaffolded**: Run `yarn twenty entity:add` and choose the option to add a new front component. * **手动**:创建一个新的 `*.front-component.tsx` 文件,并使用 `defineFrontComponent()`。 ### 生成的类型化客户端 -运行 yarn app:generate,根据你的工作空间模式在 generated/ 中创建本地类型化客户端。 在你的函数中使用它: +Run `yarn twenty app:generate` to create a local typed client in `generated/` based on your workspace schema. 在你的函数中使用它: ```typescript import Twenty from '~/generated'; @@ -602,7 +602,7 @@ const client = new Twenty(); const { me } = await client.query({ me: { id: true, displayName: true } }); ``` -客户端会通过 `yarn app:generate` 重新生成。 在更改对象之后或接入新工作空间时,请重新运行。 +The client is re-generated by `yarn twenty app:generate`. 在更改对象之后或接入新工作空间时,请重新运行。 #### 逻辑函数中的运行时凭据 @@ -623,40 +623,29 @@ const { me } = await client.query({ me: { id: true, displayName: true } }); ## 手动设置(不使用脚手架) -虽然我们建议使用 `create-twenty-app` 以获得最佳的上手体验,但你也可以手动设置项目。 不要全局安装 CLI。 相反,请将 `twenty-sdk` 添加为本地依赖,并在你的 package.json 中连接相关脚本: +虽然我们建议使用 `create-twenty-app` 以获得最佳的上手体验,但你也可以手动设置项目。 不要全局安装 CLI。 Instead, add `twenty-sdk` as a local dependency and wire a single script in your package.json: ```bash filename="Terminal" yarn add -D twenty-sdk ``` -然后添加如下脚本: +Then add a `twenty` script: ```json filename="package.json" { "scripts": { - "auth:login": "twenty auth:login", - "auth:logout": "twenty auth:logout", - "auth:status": "twenty auth:status", - "auth:switch": "twenty auth:switch", - "auth:list": "twenty auth:list", - "app:dev": "twenty app:dev", - "app:generate": "twenty app:generate", - "app:uninstall": "twenty app:uninstall", - "entity:add": "twenty entity:add", - "function:logs": "twenty function:logs", - "function:execute": "twenty function:execute", - "help": "twenty help" + "twenty": "twenty" } } ``` -现在你可以通过 Yarn 运行相同的命令,例如 `yarn app:dev`、`yarn app:generate` 等。 +Now you can run all commands via `yarn twenty `, e.g. `yarn twenty app:dev`, `yarn twenty app:generate`, `yarn twenty help`, etc. ## 故障排除 -* 身份验证错误:运行 `yarn auth:login`,并确保你的 API 密钥具有所需权限。 +* Authentication errors: run `yarn twenty auth:login` and ensure your API key has the required permissions. * 无法连接到服务器:请验证 API URL,并确保 Twenty 服务器可达。 -* 类型或客户端缺失/过期:运行 `yarn app:generate`。 -* 开发模式未同步:确保 `yarn app:dev` 正在运行,并且你的环境不会忽略变更。 +* Types or client missing/outdated: run `yarn twenty app:generate`. +* Dev mode not syncing: ensure `yarn twenty app:dev` is running and that changes are not ignored by your environment. Discord 帮助频道:https://discord.com/channels/1130383047699738754/1130386664812982322