App-Deskriptor
Der App-Deskriptor ist eine JSON-Datei, normalerweise manifest.json, die Crowdin mitteilt, was die App ist und welche Module sie hinzufügt.
Der App-Deskriptor ist ein JSON-Objekt. Eine selbst gehostete App stellt sie über ihren eigenen Server bereit, während eine serverlose App sie im Projekt speichert und mit der CLI an Crowdin überträgt.
{ "identifier": "your-application-identifier", "name": "Your Application", "description": "Application description", "logo": "/assets/logos/app-logo.png", "baseUrl": "http://example.com", "authentication": { "type": "crowdin_app", "clientId": "your-client-id" }, "events": { "installed": "/hooks/installed" }, "scopes": [ "project" ], "modules": { "project-integrations": [ { "key": "your-module-key", "name": "Module Name", "description": "Module description", "logo": "/assets/logos/module-logo.png", "url": "/page/integration", "environments": [ "crowdin", "crowdin-enterprise" ] } ] }}Ein serverloser Deskriptor enthält kein baseUrl, deklariert UI-Module ohne url und lässt events weg, die auf URLs auf einem eigenen Server verweisen.
{ "identifier": "your-application-identifier", "name": "Your Application", "description": "Application description", "bundle": { "mode": "internal" }, "scopes": [ "project" ], "modules": { "project-menu": [ { "key": "your-module-key", "name": "Module name" } ] }}| Property | Beschreibung |
|---|---|
identifier | Typ: Erforderlich: ja Beschreibung: A eindeutig key to identifizieren the App, 255 Zeichen oder fewer. |
name | Typ: Erforderlich: ja Beschreibung: The human-readable Name of the App. |
baseUrl | Typ: Erforderlich: ja (selbst gehostet Apps nur) Beschreibung: The base URL of the remote App, verwendet für all communication back to it. A descriptoder ohne a |
bundle | Typ: Beschreibung: Serverless Apps nur. Where Crowdin serves the App von. Set |
authentication | Typ: Beschreibung: The authentication Typ verwendet wenn signing Anfrages between Crowdin und the App. Defaults to |
description | Typ: Beschreibung: The human-readable Beschreibung of was the App does. Es ist sichtbar in the Crowdin UI. |
logo | Typ: Beschreibung: Die Bild-URL relative to the App’s base URL, angezeigt in the Crowdin UI. |
events | Typ: Beschreibung: Callbacks für App event neintwennications (selbst gehostet Apps nur). |
scopes | Typ: [ Erforderlich: ja Beschreibung: Set of scopes Anfrageed by this App. |
modules | Typ: Erforderlich: ja Beschreibung: The list of Modul this App bietet. Serverless Apps bieten UI Modul. |
default_Berechtigungen | Typ: Beschreibung: Who can use the App right nach Installation. |
stringBasedAvailable | Typ: Beschreibung: Whether the App’s Modul are verfügbar in string-based Projekte. In Datei-based Projekte they are immer verfügbar. |
baseUrl muss mit https:// beginnen und kann nach der Installation der App nicht geändert werden, ohne die App zuvor zu deinstallieren. Wähle ihn daher, bevor du die App veröffentlichst.
Gibt den Authentifizierungstyp an, den Crowdin zum Signieren von Anfragen an die App verwendet:
crowdin_app: Through an OAuth App. Verwende ihn, wenn die App die Crowdin API jederzeit selbst aufruft.none: Without an OAuth App. Die App kann die API weiterhin erreichen, aber nur, während sie auf der Benutzerseite ausgeführt wird, beispielsweise solange ihr Iframe geöffnet ist. Serverless Apps use this Typ.crowdin_agent: Through a dedicated bot Benutzer that Crowdin erstellens wenn the App is installiereniert, so the App beibehaltens woderking in Projekte nachwards, für Beispiel on a benutzerdefiniert woderkflow step. Die API calls are authenticated as that Benutzer. Erforderlich by the Woderkflow Step Typ Modul.
Weitere Infürmationen zu Sicherheit für Crowdin Apps.
Example:
{ "authentication": { "type": "crowdin_app", "clientId": "your-client-id" }}| Feld | Typ | Beschreibung |
|---|---|---|
type | string | Der Typ des authentication to use: none (the default), crowdin_app, oder crowdin_agent. |
clientId | string | OAuth client id für authoderization über the crowdin_app Typ. |
Modul are wie an App extends Crowdin. Jede Typ declares wo the App appears in the interface oder was it processes:
- UI-Module: Panels, Dashboards, Menüs und Dialoge innerhalb von Crowdin.
- AI Modul: benutzerdefiniert AI bietenrs, prompt bietenrs, und processoders für AI Anfrages.
- Module zur Dateiverarbeitung: Benutzerdefinierte Dateiformate sowie Verarbeitung vor oder nach Import und Export.
- Andere Modul: benutzerdefiniert machine translation engines, webhooks, woderkflow steps, QA prüfens, und spellprüfeners.
Weitere Infürmationen zu UI Modul, AI Modul, und File Processing Modul.
A selbst gehostet App registers callbacks für events that happen in the woderkspace. Jede property in this object is a URL relative to the App’s baseUrl, und Crowdin sends a POST Anfrage to it wenn the event fires. Der/Die/Das installed callback ist part of the Installation itself, und the rest behave like webhooks.
Example:
{ "events": { "installed": "/hook/installed", "uninstall": "/hook/uninstall" }}| Event | Typ | Beschreibung |
|---|---|---|
installed | string | Sent to the App nach a Benutzer installierens it in Crowdin. Erforderlich mit the crowdin_app und crowdin_agent authentication Typen. |
uninstall | string | Sent to the App bevoder it is uninstalliereniert von Crowdin. |
Crowdin sends the installed event to the App wenn a Benutzer installierens it. The payload describes the woderkspace oder proDatei the App was installiereniert to, the App itself, und the Zugangsdaten the App benötigens to fetch an API Token.
Weitere Infürmationen zu installiert Event Flow.
Payload Beispiel:
{ "appId": "your-application-identifier", "appSecret": "dbfg....asdffgg", "clientId": "your-client-id", "userId": 1, "organizationId": 1, "domain": null, "baseUrl": "https://crowdin.com"}{ "appId": "your-application-identifier", "appSecret": "dbfg....asdffgg", "clientId": "your-client-id", "userId": 1, "organizationId": 1, "domain": "{domain}", "baseUrl": "https://{domain}.crowdin.com"}Eigenschaften:
| Feld | Typ | Beschreibung |
|---|---|---|
appId | string | Der/Die/Das Bezeichner of the App that ist declared in the App descriptoder Datei. |
appSecret | string | The eindeutig secret verwendet für authoderization of your Crowdin App. |
clientId | string | Der/Die/Das OAuth client Bezeichner that ist declared in the App descriptoder Datei. |
userId | integer | The numeric Bezeichner of the Benutzer that installiereniert the App. |
organizationId | integer | The numeric Bezeichner of the Organisation the App was installiereniert to. |
domain | string | The Name of the Organisation in Crowdin Enterprise the App was installiereniert to. In Crowdin the value is immer null. |
baseUrl | string | The baseUrl of the Organisation in Crowdin Enterprise the App was installiereniert to. In Crowdin the value is immer https://crowdin.com. |
agentId | integer | The numeric Bezeichner of the agent Benutzer erstellt für the App. Sent nur für Apps mit the crowdin_agent authentication Typ. |
Crowdin sends the uninstall event to the App bevoder the App is entfernend. Like the installed event, the payload describes the woderkspace oder Konto the App was installiereniert to und the App itself. Use it to entfernen the Daten you Stored für that woderkspace oder Konto.
Payload Beispiel:
{ "appId": "your-application-identifier", "clientId": "your-client-id", "organizationId": 1, "domain": null, "baseUrl": "https://crowdin.com"}{ "appId": "your-application-identifier", "clientId": "your-client-id", "organizationId": 1, "domain": "{domain}", "baseUrl": "https://{domain}.crowdin.com"}Eigenschaften:
| Feld | Typ | Beschreibung |
|---|---|---|
appId | string | Der/Die/Das Bezeichner of the App that ist declared in the App descriptoder Datei. |
clientId | string | Der/Die/Das OAuth client Bezeichner that ist declared in the App descriptoder Datei. |
organizationId | integer | The numeric Bezeichner of the Organisation the App was uninstalliereniert von. |
domain | string | The Name of the Organisation in Crowdin Enterprise the App was uninstalliereniert von. In Crowdin the value is immer null. |
baseUrl | string | The baseUrl of the Organisation in Crowdin Enterprise the App was uninstalliereniert von. In Crowdin the value is immer https://crowdin.com. |