diff --git a/src/content/docs/developer/crowdin-apps/apps-js.mdx b/src/content/docs/developer/crowdin-apps/apps-js.mdx index 75f98d6d..0f652900 100644 --- a/src/content/docs/developer/crowdin-apps/apps-js.mdx +++ b/src/content/docs/developer/crowdin-apps/apps-js.mdx @@ -36,7 +36,8 @@ These methods allow your app to get essential information about its environment, Retrieves a `ContextDataObject` containing key information about the environment where the app is currently running (e.g., project ID, user, and file data). **Example:** @@ -69,10 +70,14 @@ AP.getContext(function(contextData) { ##### Response Payload Example -```json collapse={12-21,25-59,62-64} +```json collapse={16-25,29-63,66-68} { + "user_id": 15, + "user_login": "john.smith", "project_id": 123, + "project_identifier": "docs-portal", "organization_id": 100001, + "organization_domain": "acme", "editor": { "mode": "translate", "theme": "dark", @@ -144,6 +149,20 @@ AP.getContext(function(contextData) {
user_id |
+
+ Type: Description: The unique numeric ID of the user the app is currently displayed to. Present only for authenticated users. + |
+
user_login |
+
+ Type: Description: The username of the user the app is currently displayed to. Present only for authenticated users. + |
+
project_id |
@@ -151,6 +170,13 @@ AP.getContext(function(contextData) {
Description: The unique numeric ID of the current project. |
project_identifier |
+
+ Type: Description: The identifier of the project the module is opened in. Present when the module runs in a project context and the identifier is available. + |
+
organization_id |
@@ -158,6 +184,13 @@ AP.getContext(function(contextData) {
Description: The unique numeric ID of the organization (Crowdin Enterprise only). |
organization_domain |
+
+ Type: Description: The domain of the organization the app is installed in (Crowdin Enterprise only). + |
+
editor |