Is it fine to rely on undocumented Custom UI context properties?

The context object returned by view.getContext() does not match the current documentation or TypeScript types. We see additional properties that are not documented.

In my particular case, I am looking at the permissions property and wonder if:

  1. Is it fine to rely on undocumented Custom UI context properties?
  2. Is it safe to build code that relies on the permission data provided?
  3. Is this property always available with the structure and properties shown below (scopes, external, etc.)?
  4. Why does the read:app-system-token scope appear twice? Appears to be a bug.

Below is an extract of the context object, including the permission object that I get in my Custom UI.

{
    ...
    "permissions": {
        "scopes": [
            "read:app-system-token",
            "read:app-system-token",
            "read:connect-jira",
            "read:jira-user",
            "read:jira-work",
            "storage:app",
            "write:jira-work"
        ],
        "external": {
            "fetch": {
                "backend": [
                    "https://example.com"
                ],
                "client": [
                    "https://example.com"
                ]
            },
            "fonts": [],
            "styles": [],
            "frames": [],
            "images": [
                "*.example.com"
            ],
            "media": [],
            "scripts": [
                "https://example.com"
            ]
        }
    }
}
1 Like