i18n - docs translations (#19983)

Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
This commit is contained in:
github-actions[bot]
2026-04-22 16:50:26 +02:00
committed by GitHub
parent f0a625c3f8
commit f34ba6ac12
18 changed files with 308 additions and 308 deletions
@@ -1,35 +1,35 @@
---
title: API
icon: plug
description: REST and GraphQL APIs generated from your workspace schema.
description: API REST e GraphQL generate dallo schema del tuo spazio di lavoro.
---
import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
## Schema-per-tenant APIs
## API con schema per tenant
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Non esiste un riferimento API statico per Twenty. Ogni spazio di lavoro ha il proprio schema — quando aggiungi un oggetto personalizzato (ad esempio `Invoice`), ottiene immediatamente endpoint REST e GraphQL identici a quelli degli oggetti integrati come `Company` o `Person`. L'API è generata dallo schema, quindi gli endpoint usano direttamente i nomi dei tuoi oggetti e campi — niente ID opachi.
Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
La documentazione delle API specifica del tuo spazio di lavoro è disponibile in **Impostazioni → API & Webhooks** dopo aver creato una chiave API. Include un playground interattivo in cui puoi eseguire chiamate reali sui tuoi dati.
## Two APIs
## Due API
**Core API** — `/rest/` and `/graphql/`
**API principale** — `/rest/` e `/graphql/`
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
CRUD sui record: Persone, Aziende, Opportunità, i tuoi oggetti personalizzati. Esegui query, filtra, attraversa le relazioni.
**Metadata API** — `/rest/metadata/` and `/metadata/`
**API dei metadati** — `/rest/metadata/` e `/metadata/`
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model.
Gestione dello schema: crea/modifica/elimina oggetti, campi e relazioni. Questo è il modo per modificare in modo programmatico il tuo modello di dati.
Both are available as REST and GraphQL. GraphQL adds batch upserts and the ability to traverse relations in a single query. Same underlying data either way.
Entrambe sono disponibili in REST e GraphQL. GraphQL aggiunge upsert in batch e la possibilità di attraversare le relazioni in un'unica query. I dati sottostanti sono gli stessi in entrambi i casi.
## Base URLs
## URL di base
| Ambiente | URL di base |
| ----------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Self-Hosted | `https://{your-domain}/` |
| Ambiente | URL di base |
| ------------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Auto-ospitato | `https://{your-domain}/` |
## Autenticazione
@@ -37,19 +37,19 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Roles → Assignment tab** to limit what they can access.
Crea una chiave API in **Impostazioni → API & Webhooks → + Crea chiave**. Copiala immediatamente — viene mostrata una sola volta. Le chiavi possono essere limitate a un ruolo specifico in **Impostazioni → Ruoli scheda Assegnazione** per limitare ciò a cui possono accedere.
<VimeoEmbed videoId="928786722" title="Creazione della chiave API" />
For OAuth-based access (external apps acting on behalf of users), see [OAuth](/l/it/developers/extend/oauth).
Per l'accesso basato su OAuth (app esterne che agiscono per conto degli utenti), vedi [OAuth](/l/it/developers/extend/oauth).
## Batch operations
## Operazioni batch
Both REST and GraphQL support batching up to 60 records per request — create, update, or delete. GraphQL also supports batch upsert (create-or-update in one call) using plural names like `CreateCompanies`.
Sia REST che GraphQL supportano il batching fino a 60 record per richiesta — creazione, aggiornamento o eliminazione. GraphQL supporta anche l'upsert in batch (crea o aggiorna in una sola chiamata) usando nomi plurali come `CreateCompanies`.
## Rate limits
## Limiti di frequenza delle API
| Limite | Valore |
| ---------- | ---------------------- |
| Requests | 100 per minute |
| Batch size | 60 record per chiamata |
| Limite | Valore |
| ---------------- | ---------------------- |
| Richieste | 100 al minuto |
| Dimensione batch | 60 record per chiamata |
@@ -1,6 +1,6 @@
---
title: Componenti front-end
description: Build React components that render inside Twenty's UI with sandboxed isolation.
description: Crea componenti React che vengono renderizzati all'interno della UI di Twenty con isolamento in sandbox.
icon: window-maximize
---
@@ -1,23 +1,23 @@
---
title: Layout
description: Define views, navigation menu items, and page layouts to shape how your app appears in Twenty.
description: Definisci viste, voci del menu di navigazione e layout di pagina per determinare come la tua app appare in Twenty.
icon: table-columns
---
Layout entities control how your app surfaces inside Twenty's UI — what lives in the sidebar, which saved views ship with the app, and how a record detail page is arranged.
Le entità di layout controllano come la tua app si presenta all'interno dell'interfaccia utente di Twenty — ciò che è presente nella barra laterale, quali viste salvate sono incluse con l'app e come è organizzata la pagina dei dettagli di un record.
## Layout concepts
## Concetti di layout
| Concept | What it controls | Entità |
| ------------------------ | --------------------------------------------------------------------------------- | -------------------------- |
| **View** | A saved list configuration for an object — visible fields, order, filters, groups | `defineView` |
| **Navigation Menu Item** | An entry in the left sidebar that links to a view or an external URL | `defineNavigationMenuItem` |
| **Page Layout** | The tabs and widgets that make up a record's detail page | `definePageLayout` |
| Concetto | Cosa controlla | Entità |
| -------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------- |
| **Vista** | Una configurazione di elenco salvata per un oggetto — campi visibili, ordine, filtri, gruppi | `defineView` |
| **Voce del menu di navigazione** | Una voce nella barra laterale sinistra che collega a una vista o a un URL esterno | `defineNavigationMenuItem` |
| **Layout di pagina** | Le schede e i widget che compongono la pagina dei dettagli di un record | `definePageLayout` |
Views, navigation items, and page layouts reference each other by `universalIdentifier`:
Le viste, le voci del menu di navigazione e i layout di pagina fanno riferimento tra loro tramite `universalIdentifier`:
* A **navigation menu item** of type `VIEW` points at a `defineView` identifier, so the sidebar link opens that saved view.
* A **page layout** of type `RECORD_PAGE` targets an object and can embed [front components](/l/it/developers/extend/apps/front-components) inside its tabs as widgets.
* Una **voce del menu di navigazione** di tipo `VIEW` punta a un identificatore `defineView`, quindi il link nella barra laterale apre quella vista salvata.
* Un **layout di pagina** di tipo `RECORD_PAGE` si applica a un oggetto e può incorporare [front components](/l/it/developers/extend/apps/front-components) all'interno delle sue schede come widget.
<AccordionGroup>
<Accordion title="defineView" description="Definisci viste salvate per gli oggetti">
@@ -1,35 +1,35 @@
---
title: APIs
icon: plug
description: REST and GraphQL APIs generated from your workspace schema.
description: APIs REST e GraphQL geradas a partir do esquema do seu espaço de trabalho.
---
import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
## Schema-per-tenant APIs
## APIs com esquema por locatário
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Não há uma referência de API estática para o Twenty. Cada espaço de trabalho tem seu próprio esquema — quando você adiciona um objeto personalizado (por exemplo, `Invoice`), ele imediatamente recebe endpoints REST e GraphQL idênticos aos dos objetos nativos, como `Company` ou `Person`. A API é gerada a partir do esquema, então os endpoints usam diretamente os nomes dos seus objetos e campos — sem IDs opacos.
Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
Sua documentação de API específica do seu espaço de trabalho fica disponível em **Configurações → API & Webhooks** após criar uma chave de API. Ela inclui um playground interativo onde você pode executar chamadas reais contra seus dados.
## Two APIs
## Duas APIs
**Core API** — `/rest/` and `/graphql/`
**API principal** — `/rest/` e `/graphql/`
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
CRUD em registros: Pessoas, Empresas, Oportunidades, seus objetos personalizados. Consultar, filtrar, percorrer relações.
**Metadata API** — `/rest/metadata/` and `/metadata/`
**API de Metadados** — `/rest/metadata/` e `/metadata/`
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model.
Gerenciamento de esquema: criar/modificar/excluir objetos, campos e relações. É assim que você altera programaticamente seu modelo de dados.
Both are available as REST and GraphQL. GraphQL adds batch upserts and the ability to traverse relations in a single query. Same underlying data either way.
Ambas estão disponíveis como REST e GraphQL. GraphQL adiciona upserts em lote e a capacidade de percorrer relações em uma única consulta. Os mesmos dados subjacentes em ambos os casos.
## Base URLs
## URLs base
| Ambiente | URL base |
| ----------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Self-Hosted | `https://{your-domain}/` |
| Ambiente | URL base |
| -------------- | ------------------------- |
| Nuvem | `https://api.twenty.com/` |
| Auto-hospedado | `https://{your-domain}/` |
## Autenticação
@@ -37,19 +37,19 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Roles → Assignment tab** to limit what they can access.
Crie uma chave de API em **Settings → API & Webhooks → + Create key**. Copie-a imediatamente — ela é exibida apenas uma vez. As chaves podem ter escopo para uma função específica em **Settings → Roles → Assignment tab** para limitar o que podem acessar.
<VimeoEmbed videoId="928786722" title="Criando chave de API" />
For OAuth-based access (external apps acting on behalf of users), see [OAuth](/l/pt/developers/extend/oauth).
Para acesso baseado em OAuth (aplicativos externos atuando em nome dos usuários), veja [OAuth](/l/pt/developers/extend/oauth).
## Batch operations
## Operações em lote
Both REST and GraphQL support batching up to 60 records per request — create, update, or delete. GraphQL also supports batch upsert (create-or-update in one call) using plural names like `CreateCompanies`.
Tanto REST quanto GraphQL suportam processamento em lote de até 60 registros por solicitação — criar, atualizar ou excluir. O GraphQL também oferece suporte a upsert em lote (criar ou atualizar em uma única chamada) usando nomes no plural como `CreateCompanies`.
## Rate limits
## Limites de taxa
| Limite | Valor |
| ---------- | ------------------------ |
| Requests | 100 per minute |
| Batch size | 60 registros por chamada |
| Limite | Valor |
| --------------- | ------------------------ |
| Solicitações | 100 por minuto |
| Tamanho do lote | 60 registros por chamada |
@@ -1,23 +1,23 @@
---
title: Layout
description: Define views, navigation menu items, and page layouts to shape how your app appears in Twenty.
description: Defina vistas, itens do menu de navegação e layouts de página para moldar como seu app aparece no Twenty.
icon: table-columns
---
Layout entities control how your app surfaces inside Twenty's UI — what lives in the sidebar, which saved views ship with the app, and how a record detail page is arranged.
As entidades de layout controlam como seu app aparece na UI do Twenty — o que fica na barra lateral, quais vistas salvas acompanham o app e como uma página de detalhes de registro é organizada.
## Layout concepts
## Conceitos de layout
| Concept | What it controls | Entidade |
| ------------------------ | --------------------------------------------------------------------------------- | -------------------------- |
| **View** | A saved list configuration for an object — visible fields, order, filters, groups | `defineView` |
| **Navigation Menu Item** | An entry in the left sidebar that links to a view or an external URL | `defineNavigationMenuItem` |
| **Page Layout** | The tabs and widgets that make up a record's detail page | `definePageLayout` |
| Conceito | O que controla | Entidade |
| ----------------------------- | ---------------------------------------------------------------------------------------- | -------------------------- |
| **Vista** | Uma configuração de lista salva para um objetocampos visíveis, ordem, filtros, grupos | `defineView` |
| **Item do menu de navegação** | Uma entrada na barra lateral esquerda que aponta para uma vista ou uma URL externa | `defineNavigationMenuItem` |
| **Layout da Página** | As abas e widgets que compõem a página de detalhes de um registro | `definePageLayout` |
Views, navigation items, and page layouts reference each other by `universalIdentifier`:
Vistas, itens de navegação e layouts de página referenciam-se mutuamente por `universalIdentifier`:
* A **navigation menu item** of type `VIEW` points at a `defineView` identifier, so the sidebar link opens that saved view.
* A **page layout** of type `RECORD_PAGE` targets an object and can embed [front components](/l/pt/developers/extend/apps/front-components) inside its tabs as widgets.
* Um **item do menu de navegação** do tipo `VIEW` aponta para um identificador `defineView`, assim o link da barra lateral abre essa vista salva.
* Um **layout de página** do tipo `RECORD_PAGE` destina-se a um objeto e pode incorporar [front components](/l/pt/developers/extend/apps/front-components) em suas abas como widgets.
<AccordionGroup>
<Accordion title="defineView" description="Defina visualizações salvas para objetos">
@@ -1,35 +1,35 @@
---
title: API
icon: plug
description: REST and GraphQL APIs generated from your workspace schema.
description: REST и GraphQL API, сгенерированные на основе схемы вашего рабочего пространства.
---
import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
## Schema-per-tenant APIs
## API с отдельной схемой для каждого тенанта
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Для Twenty нет статической документации по API. У каждого рабочего пространства своя схема — когда вы добавляете пользовательский объект (например, `Invoice`), он сразу получает эндпоинты REST и GraphQL, идентичные встроенным объектам, таким как `Company` или `Person`. API генерируется из схемы, поэтому эндпоинты напрямую используют названия ваших объектов и полей — никаких непрозрачных идентификаторов.
Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
Документация по API для вашего рабочего пространства доступна в разделе **Настройки → API и вебхуки** после создания ключа API. Она включает интерактивную песочницу, где вы можете выполнять реальные вызовы к своим данным.
## Two APIs
## Два API
**Core API** — `/rest/` and `/graphql/`
**Основное API** — `/rest/` и `/graphql/`
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
CRUD над записями: Люди, Компании, Сделки, ваши пользовательские объекты. Запросы, фильтрация, переход по связям.
**Metadata API** — `/rest/metadata/` and `/metadata/`
**API метаданных** — `/rest/metadata/` и `/metadata/`
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model.
Управление схемой: создание/изменение/удаление объектов, полей и связей. Так вы программно изменяете свою модель данных.
Both are available as REST and GraphQL. GraphQL adds batch upserts and the ability to traverse relations in a single query. Same underlying data either way.
Оба доступны как REST и GraphQL. GraphQL добавляет пакетные upsert-операции и возможность переходить по связям в одном запросе. В обоих случаях используются одни и те же базовые данные.
## Base URLs
## Базовые URL-адреса
| Среда | Базовый URL |
| ----------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Self-Hosted | `https://{your-domain}/` |
| Среда | Базовый URL |
| ----------------------- | ------------------------- |
| Облако | `https://api.twenty.com/` |
| Самостоятельный хостинг | `https://{your-domain}/` |
## Аутентификация
@@ -37,19 +37,19 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Roles → Assignment tab** to limit what they can access.
Создайте ключ API в **Settings → API & Webhooks → + Create key**. Сразу скопируйте его — он показывается только один раз. Ключам можно задать область действия для конкретной роли в разделе **Settings → Roles → Assignment tab**, чтобы ограничить их доступ.
<VimeoEmbed videoId="928786722" title="Создание ключа API" />
For OAuth-based access (external apps acting on behalf of users), see [OAuth](/l/ru/developers/extend/oauth).
Для доступа на основе OAuth (внешние приложения, действующие от имени пользователей), см. [OAuth](/l/ru/developers/extend/oauth).
## Batch operations
## Пакетные операции
Both REST and GraphQL support batching up to 60 records per request — create, update, or delete. GraphQL also supports batch upsert (create-or-update in one call) using plural names like `CreateCompanies`.
И REST, и GraphQL поддерживают пакетную обработку до 60 записей за один запрос — создание, обновление или удаление. GraphQL также поддерживает пакетный upsert (создание или обновление за один вызов), используя имена во множественном числе, например `CreateCompanies`.
## Rate limits
## Лимиты скорости
| Лимит | Значение |
| ---------- | ------------------------- |
| Requests | 100 per minute |
| Batch size | 60 записей за один запрос |
| Лимит | Значение |
| ------------- | ------------------------- |
| Запросы | 100 запросов в минуту |
| Размер пакета | 60 записей за один запрос |
@@ -1,6 +1,6 @@
---
title: Компоненты фронтенда
description: Build React components that render inside Twenty's UI with sandboxed isolation.
description: Создавайте компоненты React, которые отображаются внутри интерфейса Twenty в изолированной песочнице.
icon: window-maximize
---
@@ -1,23 +1,23 @@
---
title: Макет
description: Define views, navigation menu items, and page layouts to shape how your app appears in Twenty.
description: Определите представления, пункты меню навигации и макеты страниц, чтобы сформировать внешний вид вашего приложения в Twenty.
icon: table-columns
---
Layout entities control how your app surfaces inside Twenty's UI — what lives in the sidebar, which saved views ship with the app, and how a record detail page is arranged.
Сущности макета определяют, как ваше приложение представлено в интерфейсе Twenty — что находится в боковой панели, какие сохранённые представления поставляются с приложением и как устроена страница сведений о записи.
## Layout concepts
## Концепции макета
| Concept | What it controls | Сущность |
| ------------------------ | --------------------------------------------------------------------------------- | -------------------------- |
| **View** | A saved list configuration for an object — visible fields, order, filters, groups | `defineView` |
| **Navigation Menu Item** | An entry in the left sidebar that links to a view or an external URL | `defineNavigationMenuItem` |
| **Page Layout** | The tabs and widgets that make up a record's detail page | `definePageLayout` |
| Понятие | Что определяет | Сущность |
| ------------------------ | ------------------------------------------------------------------------------------ | -------------------------- |
| **Представление** | Сохранённая конфигурация списка для объекта — видимые поля, порядок, фильтры, группы | `defineView` |
| **Пункт меню навигации** | Элемент в левой боковой панели, который ссылается на представление или внешний URL | `defineNavigationMenuItem` |
| **Макет страницы** | Вкладки и виджеты, из которых состоит страница сведений о записи | `definePageLayout` |
Views, navigation items, and page layouts reference each other by `universalIdentifier`:
Представления, пункты меню навигации и макеты страниц ссылаются друг на друга по `universalIdentifier`:
* A **navigation menu item** of type `VIEW` points at a `defineView` identifier, so the sidebar link opens that saved view.
* A **page layout** of type `RECORD_PAGE` targets an object and can embed [front components](/l/ru/developers/extend/apps/front-components) inside its tabs as widgets.
* **Пункт меню навигации** типа `VIEW` указывает на идентификатор `defineView`, поэтому ссылка в боковой панели открывает это сохранённое представление.
* **Макет страницы** типа `RECORD_PAGE` ориентирован на объект и может встраивать [фронт-компоненты](/l/ru/developers/extend/apps/front-components) во вкладки в качестве виджетов.
<AccordionGroup>
<Accordion title="defineView" description="Определяйте сохранённые представления для объектов">
@@ -1,28 +1,28 @@
---
title: Разработчики
description: Build apps, use the API, self-host, or contribute to the codebase.
description: Создавайте приложения, используйте API, разворачивайте у себя или вносите вклад в кодовую базу.
---
import { CardTitle } from "/snippets/card-title.mdx"
<CardGroup cols={3}>
<Card href="/l/ru/developers/extend/apps/getting-started" img="/images/user-guide/halftone/dev-apps.png">
<CardTitle>Apps</CardTitle>
Extend Twenty with custom objects, server-side logic, UI components, and AI agents — all as TypeScript packages.
<CardTitle>Приложения</CardTitle>
Расширяйте Twenty с помощью пользовательских объектов, серверной логики, UI-компонентов и ИИ-агентов — всё в виде пакетов TypeScript.
</Card>
<Card href="/l/ru/developers/extend/api" img="/images/user-guide/halftone/dev-api.png">
<CardTitle>API</CardTitle>
REST and GraphQL APIs, webhooks, and OAuth.
REST и GraphQL API, вебхуки и OAuth.
</Card>
<Card href="/l/ru/developers/self-host/capabilities/docker-compose" img="/images/user-guide/halftone/dev-self-host.png">
<CardTitle>Self-Host</CardTitle>
Run Twenty on your own infrastructure.
<CardTitle>Развертывайте у себя</CardTitle>
Запускайте Twenty в собственной инфраструктуре.
</Card>
<Card href="/l/ru/developers/contribute/capabilities/local-setup" img="/images/user-guide/halftone/dev-contribute.png">
<CardTitle>Contribute</CardTitle>
Set up the monorepo locally and submit PRs.
<CardTitle>Вносите вклад</CardTitle>
Настройте монорепозиторий локально и отправляйте PR.
</Card>
</CardGroup>
@@ -1,35 +1,35 @@
---
title: API'ler
icon: plug
description: REST and GraphQL APIs generated from your workspace schema.
description: Çalışma alanı şemanızdan oluşturulan REST ve GraphQL API'leri.
---
import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
## Schema-per-tenant APIs
## Kiracı başına şema API'leri
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Twenty için statik bir API referansı yoktur. Her çalışma alanının kendine ait bir şeması vardır — özel bir nesne (ör. `Invoice`) eklediğinizde, `Company` veya `Person` gibi yerleşik nesnelerle aynı olan REST ve GraphQL uç noktalarını anında edinir. API şemadan oluşturulur, bu nedenle uç noktalar nesne ve alan adlarınızı doğrudan kullanır — anlaşılmaz kimlikler yoktur.
Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
Bir API anahtarı oluşturduktan sonra çalışma alanınıza özel API dokümantasyonu **Ayarlar → API ve Webhook'lar** altında mevcuttur. Verilerinize karşı gerçek çağrılar çalıştırabileceğiniz etkileşimli bir deneme alanı içerir.
## Two APIs
## İki API
**Core API** — `/rest/` and `/graphql/`
**Çekirdek API** — `/rest/` ve `/graphql/`
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
Kayıtlar üzerinde CRUD: Kişiler, Şirketler, Fırsatlar ve özel nesneleriniz. Sorgulama, filtreleme, ilişkilerde gezinme.
**Metadata API** — `/rest/metadata/` and `/metadata/`
**Meta veri API'si** — `/rest/metadata/` ve `/metadata/`
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model.
Şema yönetimi: nesneleri, alanları ve ilişkileri oluşturma/değiştirme/silme. Programatik olarak veri modelinizi bu şekilde değiştirirsiniz.
Both are available as REST and GraphQL. GraphQL adds batch upserts and the ability to traverse relations in a single query. Same underlying data either way.
Her ikisi de REST ve GraphQL olarak mevcuttur. GraphQL, toplu upsert işlemleri ve ilişkilerde tek bir sorguda gezinme olanağı sağlar. Her iki yöntemde de aynı temel veri kullanılır.
## Base URLs
## Temel URL'ler
| Ortam | Temel URL |
| ----------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Self-Hosted | `https://{your-domain}/` |
| Ortam | Temel URL |
| ------------------ | ------------------------- |
| Bulut | `https://api.twenty.com/` |
| Kendi barındırmalı | `https://{your-domain}/` |
## Kimlik Doğrulama
@@ -37,19 +37,19 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Roles → Assignment tab** to limit what they can access.
**Settings → API & Webhooks → + Create key** bölümünde bir API anahtarı oluşturun. Hemen kopyalayın — yalnızca bir kez gösterilir. Anahtarlar, erişebilecekleri alanları sınırlamak için **Settings → Roles → Assignment** sekmesi altında belirli bir role bağlanabilir.
<VimeoEmbed videoId="928786722" title="API anahtarı oluşturma" />
For OAuth-based access (external apps acting on behalf of users), see [OAuth](/l/tr/developers/extend/oauth).
OAuth tabanlı erişim (kullanıcılar adına hareket eden harici uygulamalar) için bkz. [OAuth](/l/tr/developers/extend/oauth).
## Batch operations
## Toplu işlemler
Both REST and GraphQL support batching up to 60 records per request — create, update, or delete. GraphQL also supports batch upsert (create-or-update in one call) using plural names like `CreateCompanies`.
Hem REST hem de GraphQL, istek başına 60 kayda kadar toplu işlemeyi destekler — oluşturma, güncelleme veya silme. GraphQL ayrıca `CreateCompanies` gibi çoğul adlar kullanarak toplu upsert'i (tek çağrıda oluşturma veya güncelleme) destekler.
## Rate limits
## Hız sınırları
| Sınır | Değer |
| ---------- | --------------------- |
| Requests | 100 per minute |
| Batch size | Çağrı başına 60 kayıt |
| Sınır | Değer |
| ------------ | --------------------- |
| İstekler | Dakikada 100 |
| Toplu boyutu | Çağrı başına 60 kayıt |
@@ -1,6 +1,6 @@
---
title: Ön uç bileşenleri
description: Build React components that render inside Twenty's UI with sandboxed isolation.
description: Twenty'nin UI'si içinde, korumalı alan (sandbox) izolasyonu ile görüntülenen React bileşenleri oluşturun.
icon: window-maximize
---
@@ -1,23 +1,23 @@
---
title: Düzen
description: Define views, navigation menu items, and page layouts to shape how your app appears in Twenty.
description: Uygulamanızın Twenty içinde nasıl görüneceğini şekillendirmek için görünümleri, gezinme menüsü öğelerini ve sayfa düzenlerini tanımlayın.
icon: table-columns
---
Layout entities control how your app surfaces inside Twenty's UI — what lives in the sidebar, which saved views ship with the app, and how a record detail page is arranged.
Düzen varlıkları, uygulamanızın Twenty arayüzünde nasıl göründüğünü kontrol eder — kenar çubuğunda nelerin yer aldığı, uygulamayla birlikte hangi kayıtlı görünümlerin geldiği ve bir kayıt ayrıntı sayfasının nasıl düzenlendiği.
## Layout concepts
## Düzen kavramları
| Concept | What it controls | Varlık |
| ------------------------ | --------------------------------------------------------------------------------- | -------------------------- |
| **View** | A saved list configuration for an object — visible fields, order, filters, groups | `defineView` |
| **Navigation Menu Item** | An entry in the left sidebar that links to a view or an external URL | `defineNavigationMenuItem` |
| **Page Layout** | The tabs and widgets that make up a record's detail page | `definePageLayout` |
| Kavram | Neyi kontrol eder | Varlık |
| ------------------------ | ----------------------------------------------------------------------------------------------- | -------------------------- |
| **Görünüm** | Bir nesne için kaydedilmiş liste yapılandırması — görünür alanlar, sıralama, filtreler, gruplar | `defineView` |
| **Gezinme Menüsü Öğesi** | Sol kenar çubuğunda, bir görünüme veya harici bir URL'ye bağlanan bir öğe | `defineNavigationMenuItem` |
| **Sayfa Düzeni** | Bir kaydın ayrıntı sayfasını oluşturan sekmeler ve widget'lar | `definePageLayout` |
Views, navigation items, and page layouts reference each other by `universalIdentifier`:
Görünümler, gezinme menüsü öğeleri ve sayfa düzenleri birbirlerine `universalIdentifier` ile başvurur:
* A **navigation menu item** of type `VIEW` points at a `defineView` identifier, so the sidebar link opens that saved view.
* A **page layout** of type `RECORD_PAGE` targets an object and can embed [front components](/l/tr/developers/extend/apps/front-components) inside its tabs as widgets.
* Türü `VIEW` olan bir **gezinme menüsü öğesi**, bir `defineView` tanımlayıcısını işaret eder; böylece kenar çubuğu bağlantısı o kayıtlı görünümü açar.
* Türü `RECORD_PAGE` olan bir **sayfa düzeni**, bir nesneyi hedefler ve sekmelerinin içine widget'lar olarak [ön uç bileşenleri](/l/tr/developers/extend/apps/front-components) gömebilir.
<AccordionGroup>
<Accordion title="defineView" description="Nesneler için kaydedilmiş görünümler tanımlayın">
@@ -1,28 +1,28 @@
---
title: Geliştiriciler
description: Build apps, use the API, self-host, or contribute to the codebase.
description: Uygulamalar geliştirin, API'yi kullanın, kendi altyapınızda barındırın ya da kod tabanına katkıda bulunun.
---
import { CardTitle } from "/snippets/card-title.mdx"
<CardGroup cols={3}>
<Card href="/l/tr/developers/extend/apps/getting-started" img="/images/user-guide/halftone/dev-apps.png">
<CardTitle>Apps</CardTitle>
Extend Twenty with custom objects, server-side logic, UI components, and AI agents — all as TypeScript packages.
<CardTitle>Uygulamalar</CardTitle>
Özel nesneler, sunucu tarafı mantık, UI bileşenleri ve yapay zeka ajanlarıyla Twenty'yi genişletin — hepsi TypeScript paketleri olarak.
</Card>
<Card href="/l/tr/developers/extend/api" img="/images/user-guide/halftone/dev-api.png">
<CardTitle>API</CardTitle>
REST and GraphQL APIs, webhooks, and OAuth.
REST ve GraphQL API'leri, webhook'lar ve OAuth.
</Card>
<Card href="/l/tr/developers/self-host/capabilities/docker-compose" img="/images/user-guide/halftone/dev-self-host.png">
<CardTitle>Self-Host</CardTitle>
Run Twenty on your own infrastructure.
Twenty'yi kendi altyapınızda çalıştırın.
</Card>
<Card href="/l/tr/developers/contribute/capabilities/local-setup" img="/images/user-guide/halftone/dev-contribute.png">
<CardTitle>Contribute</CardTitle>
Set up the monorepo locally and submit PRs.
<CardTitle>Katkıda Bulunun</CardTitle>
Monorepo'yu yerel olarak kurun ve PR'ler gönderin.
</Card>
</CardGroup>
@@ -1,35 +1,35 @@
---
title: 接口
icon: plug
description: REST and GraphQL APIs generated from your workspace schema.
description: 由你的工作区架构生成的 REST GraphQL API
---
import { VimeoEmbed } from '/snippets/vimeo-embed.mdx';
## Schema-per-tenant APIs
## 租户级架构 API
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (say `Invoice`), it immediately gets REST and GraphQL endpoints identical to built-in objects like `Company` or `Person`. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Twenty 没有静态 API 参考文档。 每个工作区都有自己的架构——当你添加一个自定义对象(例如 `Invoice`)时,它会立即获得与内置对象(如 `Company` `Person`)相同的 REST 和 GraphQL 端点。 API 根据架构生成,因此端点会直接使用你的对象和字段名称——没有不透明的 ID
Your workspace-specific API documentation is available under **Settings → API & Webhooks** after creating an API key. It includes an interactive playground where you can execute real calls against your data.
创建 API 密钥后,可在 **设置 → API & Webhooks** 中查看你的工作区专属 API 文档。 其中包含交互式 Playground,可对你的数据执行真实调用。
## Two APIs
## 两种 API
**Core API** — `/rest/` and `/graphql/`
**核心 API** — `/rest/` `/graphql/`
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
对记录执行 CRUD:人员、公司、商机,以及你的自定义对象。 查询、筛选、遍历关系。
**Metadata API** — `/rest/metadata/` and `/metadata/`
**元数据 API** — `/rest/metadata/` `/metadata/`
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model.
架构管理:创建/修改/删除对象、字段和关系。 这是以编程方式更改数据模型的方法。
Both are available as REST and GraphQL. GraphQL adds batch upserts and the ability to traverse relations in a single query. Same underlying data either way.
两者均提供 REST GraphQL GraphQL 还提供批量 upsert,以及在单个查询中遍历关系的能力。 无论哪种方式,底层数据相同。
## Base URLs
## 基础 URL
| 环境 | 基础 URL |
| ----------- | ------------------------- |
| Cloud | `https://api.twenty.com/` |
| Self-Hosted | `https://{your-domain}/` |
| 环境 | 基础 URL |
| --- | ------------------------- |
| 云端 | `https://api.twenty.com/` |
| 自托管 | `https://{your-domain}/` |
## 身份验证
@@ -37,19 +37,19 @@ Both are available as REST and GraphQL. GraphQL adds batch upserts and the abili
Authorization: Bearer YOUR_API_KEY
```
Create an API key in **Settings → API & Webhooks → + Create key**. Copy it immediately — it's shown once. Keys can be scoped to a specific role under **Settings → Roles → Assignment tab** to limit what they can access.
**Settings → API & Webhooks → + Create key** 中创建 API 密钥。 请立即复制——仅显示一次。 可在 **Settings → Roles → Assignment 选项卡** 下将密钥限定到特定角色,以限制其可访问的范围。
<VimeoEmbed videoId="928786722" title="创建 API 密钥" />
For OAuth-based access (external apps acting on behalf of users), see [OAuth](/l/zh/developers/extend/oauth).
对于基于 OAuth 的访问(外部应用代表用户执行操作),请参见 [OAuth](/l/zh/developers/extend/oauth)
## Batch operations
## 批量操作
Both REST and GraphQL support batching up to 60 records per request — create, update, or delete. GraphQL also supports batch upsert (create-or-update in one call) using plural names like `CreateCompanies`.
REST GraphQL 均支持每个请求最多批量处理 60 条记录——创建、更新或删除。 GraphQL 还支持批量 upsert(一次调用即可创建或更新),使用诸如 `CreateCompanies` 之类的复数名称。
## Rate limits
## 速率限制
| 限制 | 值 |
| ---------- | -------------- |
| Requests | 100 per minute |
| Batch size | 每次调用 60 条记录 |
| 限制 | 值 |
| ---- | ----------- |
| 请求 | 每分钟 100 次请求 |
| 批量大小 | 每次调用 60 条记录 |
@@ -116,7 +116,7 @@ export default defineFrontComponent({
**前端组件** 运行在 Web Worker 中。 Node 内置模块不可用——仅可使用浏览器 API 以及可在浏览器环境中运行的 npm 包。
Both environments have `twenty-client-sdk/core` and `twenty-client-sdk/metadata` available as pre-provided modules — these are not bundled but resolved at runtime by the server.
两个环境都将 `twenty-client-sdk/core` `twenty-client-sdk/metadata` 作为预置模块提供 — 这些模块不会被打包,而是在运行时由服务器解析。
## 测试你的应用
@@ -1,6 +1,6 @@
---
title: 前端组件
description: Build React components that render inside Twenty's UI with sandboxed isolation.
description: 构建可在 Twenty UI 中渲染并具备沙盒隔离的 React 组件。
icon: window-maximize
---
@@ -55,18 +55,18 @@ export default defineFrontComponent({
## 配置字段
| 字段 | 必填 | 描述 |
| --------------------- | -- | ----------------------------------------------------------------------------------- |
| `universalIdentifier` | 是 | 该组件的稳定唯一 ID |
| `component` | 是 | 一个 React 组件函数 |
| `name` | 否 | 显示名称 |
| `description` | 否 | 组件的功能描述 |
| `isHeadless` | 否 | Set to `true` if the component has no visible UI (see below) |
| `command` | 否 | Register the component as a command (see [command options](#command-options) below) |
| 字段 | 必填 | 描述 |
| --------------------- | -- | ---------------------------------------- |
| `universalIdentifier` | 是 | 该组件的稳定唯一 ID |
| `component` | 是 | 一个 React 组件函数 |
| `name` | 否 | 显示名称 |
| `description` | 否 | 组件的功能描述 |
| `isHeadless` | 否 | 如果组件没有可见的 UI,则设为 `true`(见下文) |
| `command` | 否 | 将该组件注册为命令(参见下文的[命令选项](#command-options) |
## Placing a front component on a page
## 在页面上放置前端组件
Beyond commands, you can embed a front component directly into a record page by adding it as a widget in a **page layout**. See the [definePageLayout](/l/zh/developers/extend/apps/skills-and-agents#definepagelayout) section for details.
除了命令之外,您还可以在**页面布局**中将其添加为小部件,从而将前端组件直接嵌入记录页面。 详情请参见[definePageLayout](/l/zh/developers/extend/apps/skills-and-agents#definepagelayout)部分。
## 无头与非无头
@@ -100,7 +100,7 @@ export default defineFrontComponent({
});
```
Because the component returns `null`, Twenty skips rendering a container for it — no empty space appears in the layout. The component still has access to all hooks and the host communication API.
由于该组件返回 `null`Twenty 会跳过为其渲染容器——布局中不会出现空白区域。 该组件仍可访问所有 hooks 和宿主通信 API
## SDK Command 组件
@@ -185,9 +185,9 @@ export default defineFrontComponent({
});
```
## Accessing runtime context
## 访问运行时上下文
Inside your component, use SDK hooks to access the current user, record, and component instance:
在组件内部,使用 SDK hooks 获取当前用户、记录和组件实例:
```tsx src/front-components/record-info.tsx
import { defineFrontComponent } from 'twenty-sdk/define';
@@ -218,28 +218,28 @@ export default defineFrontComponent({
});
```
Available hooks:
可用的 hooks
| 钩子 | Returns | 描述 |
| --------------------------------------------- | ------------------ | ---------------------------------------------------------- |
| `useUserId()` | `string` or `null` | The current user's ID |
| `useRecordId()` | `string` or `null` | The current record's ID (when placed on a record page) |
| `useFrontComponentId()` | `string` | This component instance's ID |
| `useFrontComponentExecutionContext(selector)` | 因情况而异 | Access the full execution context with a selector function |
| 钩子 | 返回值 | 描述 |
| --------------------------------------------- | ----------------- | ------------------- |
| `useUserId()` | `string` `null` | 当前用户的 ID |
| `useRecordId()` | `string` `null` | 当前记录的 ID(当放置在记录页面时) |
| `useFrontComponentId()` | `string` | 此组件实例的 ID |
| `useFrontComponentExecutionContext(selector)` | 因情况而异 | 使用选择器函数访问完整的执行上下文 |
## Host communication API
## 宿主通信 API
Front components can trigger navigation, modals, and notifications using functions from `twenty-sdk`:
前端组件可以使用来自 `twenty-sdk` 的函数触发导航、模态框和通知:
| 函数 | 描述 |
| ----------------------------------------------- | ----------------------------- |
| `navigate(to, params?, queryParams?, options?)` | Navigate to a page in the app |
| `openSidePanelPage(params)` | Open a side panel |
| `closeSidePanel()` | 关闭侧边栏 |
| `openCommandConfirmationModal(params)` | Show a confirmation dialog |
| `enqueueSnackbar(params)` | Show a toast notification |
| `unmountFrontComponent()` | Unmount the component |
| `updateProgress(progress)` | Update a progress indicator |
| 函数 | 描述 |
| ----------------------------------------------- | ------------- |
| `navigate(to, params?, queryParams?, options?)` | 在应用中导航到某个页面 |
| `openSidePanelPage(params)` | 打开侧边栏 |
| `closeSidePanel()` | 关闭侧边栏 |
| `openCommandConfirmationModal(params)` | 显示确认对话框 |
| `enqueueSnackbar(params)` | 显示一条 Toast 通知 |
| `unmountFrontComponent()` | 卸载该组件 |
| `updateProgress(progress)` | 更新进度指示器 |
下面是一个示例,使用宿主 API 在操作完成后显示一条 snackbar 并关闭侧边栏:
@@ -286,24 +286,24 @@ export default defineFrontComponent({
});
```
## Command options
## 命令选项
Adding a `command` field to `defineFrontComponent` registers the component in the command menu (Cmd+K). If `isPinned` is `true`, it also appears as a quick-action button in the top-right corner of the page.
在 `defineFrontComponent` 中添加一个 `command` 字段会将该组件注册到命令菜单(Cmd+K)中。 如果 `isPinned` `true`,它还会显示为页面右上角的快速操作按钮。
| 字段 | 必填 | 描述 |
| --------------------------------------- | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `universalIdentifier` | 是 | Stable unique ID for the command |
| `label` | 是 | Full label shown in the command menu (Cmd+K) |
| `shortLabel` | 否 | Shorter label displayed on the pinned quick-action button |
| `icon` | 否 | Icon name displayed next to the label (e.g. `'IconBolt'`, `'IconSend'`) |
| `isPinned` | 否 | When `true`, shows the command as a quick-action button in the top-right corner of the page |
| `availabilityType` | 否 | Controls where the command appears: `'GLOBAL'` (always available), `'RECORD_SELECTION'` (only when records are selected), or `'FALLBACK'` (shown when no other commands match) |
| `availabilityObjectUniversalIdentifier` | 否 | Restrict the command to pages of a specific object type (e.g. only on Company records) |
| `conditionalAvailabilityExpression` | 否 | A boolean expression to dynamically control whether the command is visible (see below) |
| 字段 | 必填 | 描述 |
| --------------------------------------- | -- | -------------------------------------------------------------------------------- |
| `universalIdentifier` | 是 | 该命令的稳定唯一 ID |
| `label` | 是 | 在命令菜单(Cmd+K)中显示的完整标签 |
| `shortLabel` | 否 | 固定的快速操作按钮上显示的较短标签 |
| `icon` | 否 | 显示在标签旁边的图标名称(例如 `'IconBolt'``'IconSend'` |
| `isPinned` | 否 | `true` 时,会将该命令显示为页面右上角的快速操作按钮 |
| `availabilityType` | 否 | 控制命令出现的位置:'GLOBAL'(始终可用)、'RECORD_SELECTION'(仅在选择了记录时),或 'FALLBACK'(当没有其他命令匹配时显示) |
| `availabilityObjectUniversalIdentifier` | 否 | 将该命令限制在特定对象类型的页面上(例如仅在 Company 记录上) |
| `conditionalAvailabilityExpression` | 否 | 用于动态控制命令是否可见的布尔表达式(见下文) |
## Conditional availability expressions
## 条件可用性表达式
The `conditionalAvailabilityExpression` field lets you control when a command is visible based on the current page context. Import typed variables and operators from `twenty-sdk` to build expressions:
通过 `conditionalAvailabilityExpression` 字段,您可以基于当前页面上下文控制命令何时可见。 从 `twenty-sdk` 导入带类型的变量和运算符来构建表达式:
```tsx
import { defineFrontComponent } from 'twenty-sdk/define';
@@ -332,45 +332,45 @@ export default defineFrontComponent({
});
```
**Context variables** — these represent the current state of the page:
**上下文变量** — 表示页面的当前状态:
| 变量 | 类型 | 描述 |
| ------------------------------ | --------- | ---------------------------------------------------------------- |
| `pageType` | `string` | Current page type (e.g. `'RecordIndexPage'`, `'RecordShowPage'`) |
| `isInSidePanel` | `boolean` | Whether the component is rendered in a side panel |
| `numberOfSelectedRecords` | `number` | Number of currently selected records |
| `isSelectAll` | `boolean` | Whether "select all" is active |
| `selectedRecords` | `array` | The selected record objects |
| `favoriteRecordIds` | `array` | IDs of favorited records |
| `objectPermissions` | `object` | Permissions for the current object type |
| `targetObjectReadPermissions` | `object` | Read permissions for the target object |
| `targetObjectWritePermissions` | `object` | Write permissions for the target object |
| `featureFlags` | `object` | Active feature flags |
| `objectMetadataItem` | `object` | Metadata of the current object type |
| `hasAnySoftDeleteFilterOnView` | `boolean` | Whether the current view has a soft-delete filter |
| 变量 | 类型 | 描述 |
| ------------------------------ | --------- | --------------------------------------------- |
| `pageType` | `string` | 当前页面类型(例如 'RecordIndexPage''RecordShowPage' |
| `isInSidePanel` | `boolean` | 组件是否在侧边栏中渲染 |
| `numberOfSelectedRecords` | `number` | 当前选中的记录数量 |
| `isSelectAll` | `boolean` | “全选”是否已激活 |
| `selectedRecords` | `array` | 已选记录对象 |
| `favoriteRecordIds` | `array` | 已收藏记录的 ID |
| `objectPermissions` | `object` | 当前对象类型的权限 |
| `targetObjectReadPermissions` | `object` | 目标对象的读取权限 |
| `targetObjectWritePermissions` | `object` | 目标对象的写入权限 |
| `featureFlags` | `object` | 当前启用的功能标志 |
| `objectMetadataItem` | `object` | 当前对象类型的元数据 |
| `hasAnySoftDeleteFilterOnView` | `boolean` | 当前视图是否包含软删除筛选器 |
**Operators** — combine variables into boolean expressions:
**运算符** — 将变量组合为布尔表达式:
| Operator | 描述 |
| ----------------------------------- | ----------------------------------------------------------------- |
| `isDefined(value)` | `true` if the value is not null/undefined |
| `isNonEmptyString(value)` | `true` if the value is a non-empty string |
| `includes(array, value)` | `true` if the array contains the value |
| `includesEvery(array, prop, value)` | `true` if every item's property includes the value |
| `every(array, prop)` | `true` if the property is truthy on every item |
| `everyDefined(array, prop)` | `true` if the property is defined on every item |
| `everyEquals(array, prop, value)` | `true` if the property equals the value on every item |
| `some(array, prop)` | `true` if the property is truthy on at least one item |
| `someDefined(array, prop)` | `true` if the property is defined on at least one item |
| `someEquals(array, prop, value)` | `true` if the property equals the value on at least one item |
| `someNonEmptyString(array, prop)` | `true` if the property is a non-empty string on at least one item |
| `none(array, prop)` | `true` if the property is falsy on every item |
| `noneDefined(array, prop)` | `true` if the property is undefined on every item |
| `noneEquals(array, prop, value)` | `true` if the property does not equal the value on any item |
| 运算符 | 描述 |
| ----------------------------------- | -------------------------------- |
| `isDefined(value)` | 当该值不是 null/undefined 时为 `true` |
| `isNonEmptyString(value)` | 当该值为非空字符串时为 `true` |
| `includes(array, value)` | 当数组包含该值时为 `true` |
| `includesEvery(array, prop, value)` | 当每个条目的属性都包含该值时为 `true` |
| `every(array, prop)` | 当该属性在每个条目上都为 truthy 时为 `true` |
| `everyDefined(array, prop)` | 当该属性在每个条目上都已定义时为 `true` |
| `everyEquals(array, prop, value)` | 当该属性在每个条目上都等于该值时为 `true` |
| `some(array, prop)` | 当至少一个条目上的该属性为 truthy 时为 `true` |
| `someDefined(array, prop)` | 当至少一个条目上的该属性已定义时为 `true` |
| `someEquals(array, prop, value)` | 当至少一个条目上的该属性等于该值时为 `true` |
| `someNonEmptyString(array, prop)` | 当至少一个条目上的该属性为非空字符串时为 `true` |
| `none(array, prop)` | 当该属性在每个条目上都为 falsy 时为 `true` |
| `noneDefined(array, prop)` | 当该属性在每个条目上都为 undefined 时为 `true` |
| `noneEquals(array, prop, value)` | 当该属性在任意条目上都不等于该值时为 `true` |
## Public assets
## 公共资源
Front components can access files from the app's `public/` directory using `getPublicAssetUrl`:
前端组件可以使用 `getPublicAssetUrl` 访问应用的 `public/` 目录中的文件:
```tsx
import { defineFrontComponent, getPublicAssetUrl } from 'twenty-sdk/define';
@@ -384,18 +384,18 @@ export default defineFrontComponent({
});
```
See the [public assets section](/l/zh/developers/extend/apps/cli-and-testing#public-assets-public-folder) for details.
详情请参见[公共资源部分](/l/zh/developers/extend/apps/cli-and-testing#public-assets-public-folder)
## 样式
Front components support multiple styling approaches. You can use:
前端组件支持多种样式方案。 您可以使用:
* **Inline styles** — `style={{ color: 'red' }}`
* **Twenty UI components** — import from `twenty-sdk/ui` (Button, Tag, Status, Chip, Avatar, and more)
* **Emotion** — CSS-in-JS with `@emotion/react`
* **Styled-components** — `styled.div` patterns
* **Tailwind CSS** — utility classes
* **Any CSS-in-JS library** compatible with React
* **内联样式** — `style={{ color: 'red' }}`
* **Twenty UI 组件** — 从 `twenty-sdk/ui` 导入(ButtonTagStatusChipAvatar 等)
* **Emotion** — 使用 `@emotion/react` 的 CSS-in-JS
* **Styled-components** — `styled.div` 模式
* **Tailwind CSS** — 工具类
* **任何 CSS-in-JS 库**(与 React 兼容)
```tsx
import { defineFrontComponent } from 'twenty-sdk/define';
@@ -1,28 +1,28 @@
---
title: 布局
description: Define views, navigation menu items, and page layouts to shape how your app appears in Twenty.
description: 定义视图、导航菜单项和页面布局,以塑造你的应用在 Twenty 中的呈现方式。
icon: table-columns
---
Layout entities control how your app surfaces inside Twenty's UI — what lives in the sidebar, which saved views ship with the app, and how a record detail page is arranged.
布局实体控制你的应用如何在 Twenty UI 中呈现——侧边栏中有哪些内容、应用随附哪些已保存的视图,以及记录详情页如何排布。
## Layout concepts
## 布局概念
| Concept | What it controls | 实体 |
| ------------------------ | --------------------------------------------------------------------------------- | -------------------------- |
| **View** | A saved list configuration for an object — visible fields, order, filters, groups | `defineView` |
| **Navigation Menu Item** | An entry in the left sidebar that links to a view or an external URL | `defineNavigationMenuItem` |
| **Page Layout** | The tabs and widgets that make up a record's detail page | `definePageLayout` |
| 概念 | 控制内容 | 实体 |
| --------- | -------------------------- | -------------------------- |
| **视图** | 对象的已保存列表配置——可见字段、顺序、筛选器、分组 | `defineView` |
| **导航菜单项** | 左侧侧边栏中的一项,链接到某个视图或外部 URL | `defineNavigationMenuItem` |
| **页面布局** | 构成记录详情页的选项卡和小部件 | `definePageLayout` |
Views, navigation items, and page layouts reference each other by `universalIdentifier`:
视图、导航菜单项和页面布局通过 `universalIdentifier` 相互引用:
* A **navigation menu item** of type `VIEW` points at a `defineView` identifier, so the sidebar link opens that saved view.
* A **page layout** of type `RECORD_PAGE` targets an object and can embed [front components](/l/zh/developers/extend/apps/front-components) inside its tabs as widgets.
* 类型为 `VIEW` 的**导航菜单项**指向一个 `defineView` 标识符,因此侧边栏链接会打开该已保存视图。
* 类型为 `RECORD_PAGE` 的**页面布局**面向某个对象,并可在其选项卡内嵌入[前端组件](/l/zh/developers/extend/apps/front-components)作为小部件。
<AccordionGroup>
<Accordion title="defineView" description="为对象定义已保存的视图">
Views are saved configurations for how records of an object are displayed — including which fields are visible, their order, and any filters or groups applied. Use `defineView()` to ship pre-configured views with your app:
视图是关于对象记录如何显示的已保存配置——包括哪些字段可见、它们的顺序,以及应用的任何筛选器或分组。 使用 `defineView()` 随你的应用一起提供预配置的视图:
```ts src/views/example-view.ts
import { defineView, ViewKey } from 'twenty-sdk/define';
@@ -49,16 +49,16 @@ export default defineView({
```
关键点:
* `objectUniversalIdentifier` specifies which object this view applies to.
* `key` determines the view type (e.g., `ViewKey.INDEX` for the main list view).
* `fields` controls which columns appear and their order. Each field references a `fieldMetadataUniversalIdentifier`.
* You can also define `filters`, `filterGroups`, `groups`, and `fieldGroups` for more advanced configurations.
* `position` controls the ordering when multiple views exist for the same object.
* `objectUniversalIdentifier` 指定此视图适用于哪个对象。
* `key` 决定视图类型(例如,主列表视图使用 `ViewKey.INDEX`)。
* `fields` 控制显示哪些列及其顺序。 每个字段引用一个 `fieldMetadataUniversalIdentifier`
* 你还可以定义 `filters``filterGroups``groups` `fieldGroups` 以进行更高级的配置。
* `position` 在同一对象存在多个视图时控制其排序。
</Accordion>
<Accordion title="defineNavigationMenuItem" description="定义侧边栏导航链接">
Navigation menu items add custom entries to the workspace sidebar. Use `defineNavigationMenuItem()` to link to views, external URLs, or objects:
导航菜单项会在工作区侧边栏中添加自定义条目。 使用 `defineNavigationMenuItem()` 链接到视图、外部 URL 或对象:
```ts src/navigation-menu-items/example-navigation-menu-item.ts
import { defineNavigationMenuItem, NavigationMenuItemType } from 'twenty-sdk/define';
@@ -76,15 +76,15 @@ export default defineNavigationMenuItem({
```
关键点:
* `type` determines what the menu item links to: `NavigationMenuItemType.VIEW` for a saved view, or `NavigationMenuItemType.LINK` for an external URL.
* For view links, set `viewUniversalIdentifier`. For external links, set `link`.
* `position` controls the ordering in the sidebar.
* `icon` and `color` (optional) customize the appearance.
* `type` 决定菜单项链接到的目标:`NavigationMenuItemType.VIEW` 表示已保存视图,`NavigationMenuItemType.LINK` 表示外部 URL
* 对于视图链接,设置 `viewUniversalIdentifier`。 对于外部链接,设置 `link`
* `position` 控制在侧边栏中的排序。
* `icon` `color`(可选)用于自定义外观。
</Accordion>
<Accordion title="definePageLayout" description="Define custom page layouts for record views">
<Accordion title="definePageLayout" description="为记录视图定义自定义页面布局">
Page layouts let you customize how a record detail page looks — which tabs appear, what widgets are inside each tab, and how they are arranged. Use `definePageLayout()` to ship custom layouts with your app:
页面布局使你可以自定义记录详情页的外观——显示哪些选项卡、每个选项卡内有哪些小部件,以及它们如何排列。 使用 `definePageLayout()` 随你的应用一起提供自定义布局:
```ts src/page-layouts/example-record-page-layout.ts
import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';
@@ -121,11 +121,11 @@ export default definePageLayout({
```
关键点:
* `type` is typically `'RECORD_PAGE'` to customize the detail view of a specific object.
* `objectUniversalIdentifier` specifies which object this layout applies to.
* Each `tab` defines a section of the page with a `title`, `position`, and `layoutMode` (`CANVAS` for free-form layout).
* Each `widget` inside a tab can render a front component, a relation list, or other built-in widget types.
* `position` on tabs controls their order. Use higher values (e.g., 50) to place custom tabs after built-in ones.
* `type` 通常为 'RECORD_PAGE',用于自定义特定对象的详情视图。
* `objectUniversalIdentifier` 指定此布局适用于哪个对象。
* 每个 `tab` 使用 `title``position` `layoutMode` 定义页面的一个部分(`CANVAS` 表示自由布局)。
* 选项卡内的每个 `widget` 可以渲染一个前端组件、关系列表或其他内置小部件类型。
* 选项卡上的 `position` 控制其顺序。 使用更高的值(例如 50)可将自定义选项卡放在内置选项卡之后。
</Accordion>
</AccordionGroup>
@@ -1,28 +1,28 @@
---
title: 开发者
description: Build apps, use the API, self-host, or contribute to the codebase.
description: 构建应用、使用 API、进行自托管,或为代码库做出贡献。
---
import { CardTitle } from "/snippets/card-title.mdx"
<CardGroup cols={3}>
<Card href="/l/zh/developers/extend/apps/getting-started" img="/images/user-guide/halftone/dev-apps.png">
<CardTitle>Apps</CardTitle>
Extend Twenty with custom objects, server-side logic, UI components, and AI agents — all as TypeScript packages.
<CardTitle>应用</CardTitle>
使用自定义对象、服务器端逻辑、UI 组件和 AI 代理扩展 Twenty——全部以 TypeScript 软件包形式提供。
</Card>
<Card href="/l/zh/developers/extend/api" img="/images/user-guide/halftone/dev-api.png">
<CardTitle>API</CardTitle>
REST and GraphQL APIs, webhooks, and OAuth.
REST GraphQL API、Webhook 回调和 OAuth
</Card>
<Card href="/l/zh/developers/self-host/capabilities/docker-compose" img="/images/user-guide/halftone/dev-self-host.png">
<CardTitle>Self-Host</CardTitle>
Run Twenty on your own infrastructure.
<CardTitle>自托管</CardTitle>
在您自己的基础设施上运行 Twenty。
</Card>
<Card href="/l/zh/developers/contribute/capabilities/local-setup" img="/images/user-guide/halftone/dev-contribute.png">
<CardTitle>Contribute</CardTitle>
Set up the monorepo locally and submit PRs.
<CardTitle>参与贡献</CardTitle>
在本地设置 monorepo 并提交 PR
</Card>
</CardGroup>