_root

_root properties

ParameterData typeDescriptionRequired
name****stringThe name of the specified micro application. It is used as the default menu name.✓ Yes
type****stringThe file type and version. The current version is micro-apps/v1.1.✓ Yes
descriptionstringThe simple description that supports multilingual settings.No
defaultMenuIconIconThe icon object.No
privilegesarray[]The list of permissions.No
apisApi []A list of all dependent APIs for the specified micro application.No
appNamestringThe name of the specified micro application. It is unique under one developer account.✓ Yes
annotationsAnnotationsThe annotations. Provide remarks and ad hoc feature support based on conventions.No
supportedPlatformstring []The supported platform. DESKTOP indicates a desktop web application and MOBILE indicates a mobile application. Currently, both platforms are not supported simultaneously. You can only choose ["DESKTOP"] or ["MOBILE"].No
universalIdstringThe globally unique ID of a micro application, which is used for micro application navigation. The ID cannot be changed after it is generated.No
appEnginestringThe engine that runs the micro application.
  • MICRO-FRONTEND: A micro application is loaded as a micro frontend. Currently, qiankun is used.
  • WEB: Currently, it is used for web-native mobile micro applications only. Optional.
  • NATIVE: Reserved for mobile platform of native applications. It is not currently supported.
  • TUYA-MINI-PROGRAM: The engine of Tuya MiniApp. Reserved for mobile platforms. It is not currently supported.
  • WX-MINI-PROGRAM: WeChat mini program.
✓ Yes
dependenciesstring []The list of micro applications on which this micro application depends. If the current micro application has dependencies on other micro applications, we recommend adding the universalID of the depended micro applications. Prompts will be added if necessary.No
entriesAppEntry []The entry to an application. A micro application can have one or more entries.No

Additional properties are allowed.

_root.name

The name of the specified micro application. It is used as the default menu name.

  • Type: string
  • Required: ✓ Yes

_root.type

The file type and version. The current version is micro-apps/v1.1.

  • Type: string
  • Required: ✓ Yes

_root.description

The simple description that supports multilingual settings.

  • Type: string
  • Required: No

_root.defaultMenuIcon

The icon object.

  • Type: Icon
  • Required: No

_root.privileges

The list of permissions.

  • Type: array[]
  • Required: No

_root.apis

A list of all dependent APIs for the specified micro application.

  • Type: Api []
  • Required: No

_root.appName

The name of the specified micro application. It is unique under one developer account.

  • Type: string
  • Required: ✓ Yes
  • Pattern: ^([a-z]|[0-9])[a-z0-9]?
  • Maximum Length: <= 100

_root.annotations

The annotations. Provide remarks and ad hoc feature support based on conventions.

  • Type: Annotations
  • Required: No

_root.supportedPlatform

The supported platform. DESKTOP indicates a desktop web application and MOBILE indicates a mobile application. Currently, both platforms are not supported simultaneously. You can only choose ["DESKTOP"] or ["MOBILE"].

  • Type: string []
    • Each element in the array must be one of the following values:
      • DESKTOP
      • MOBILE
  • Required: No

_root.universalId

The globally unique ID of a micro application, which is used for micro application navigation. The ID cannot be changed after it is generated.

  • Type: string
  • Required: No

_root.appEngine

The engine that runs the micro application.

  • MICRO-FRONTEND: A micro application is loaded as a micro frontend. Currently, qiankun is used.
  • WEB: Currently, it is used for web-native mobile micro applications only. Optional.
  • NATIVE: Reserved for mobile platform of native applications. It is not currently supported.
  • TUYA-MINI-PROGRAM: The engine of Tuya MiniApp. Reserved for mobile platforms. It is not currently supported.
  • WX-MINI-PROGRAM: WeChat mini program.
  • Type: string
  • Required: ✓ Yes
  • Allowed values:
    • "MICRO_FRONTEND"
    • "WEB"
    • "NATIVE"
    • "TUYA-MINI-PROGRAM"
    • "WX-MINI-PROGRAM"

_root.dependencies

The list of micro applications on which this micro application depends. If the current micro application has dependencies on other micro applications, we recommend that you add the universalID of the depended micro applications. Prompts will be added if necessary.

  • Type: string []
  • Required: No

_root.entries

The entry to an application. A micro application can have one or more entries.

  • Type: AppEntry []
  • Required: No

API

A list of all dependent APIs for the specified micro application.

Api properties

ParameterData typeDescriptionRequired
namespacestringThe HTTP header of namespace. Currently, it is used for the OpenAPI interface to distinguish interfaces that are accessed through the same route.No
methodstringThe HTTP method of the specified API.✓ Yes
pathstringThe description of an API path, such as /v1.0/users/{user_id}.✓ Yes
type****stringThe API type.
  • Open API corresponds to Tuya Open API Gateway. It can be accessed through the /open-api/ prefix in the micro application.
  • CustomAPI corresponds to the internal API entry of the user-deployed service. It can be accessed through the custom-api prefix in the micro application.
No
privilegeCodestringThe code of the associated permission. For more information, see #privileges.No

Additional properties are allowed.

Api.namespace

The HTTP header of namespace. Currently, it is used for the OpenAPI interface to distinguish interfaces that are accessed through the same route.

  • Type: string
  • Required: No

Api.method

The HTTP method of the specified API.

  • Type: string
  • Required: ✓ Yes
  • Allowed values:
    • "get"
    • "post"
    • "put"
    • "delete"
    • "GET"
    • "POST"
    • "PUT"
    • "DELETE"

Api.path

The description of an API path, such as /v1.0/users/{user_id}.

  • Type: string
  • Required: ✓ Yes

Api.type

The API type.

  • Open API corresponds to Tuya Open API Gateway. It can be accessed through the /open-api/ prefix in the micro application.
  • CustomAPI corresponds to the internal API entry of the user-deployed service. It can be accessed through the custom-api prefix in the micro application.
  • Type: string
  • Required: No
  • Allowed values:
    • "OpenAPI"
    • "CustomerAPI"

Api.privilegeCode

The code of the associated permission. For more information, see #privileges.

  • Type: string
  • Required: No

AppEntry

The entry to an application.

AppEntry properties

ParameterData typeDescriptionRequired
type****stringThe type of the specified entry.
  • QuickEntry: a quick entry to a mobile application.
  • Widget: a mobile component.
  • Menu: a menu.
✓ Yes
name****stringThe name of the specified entry that supports multilingual settings.✓ Yes
pathstringThe route of the specified entry.✓ Yes
code****stringThe ID of the specified entry. It is unique in a micro application.✓ Yes
appIconAppIconThe icon of the specified application. It is used for a mobile micro application. The size is 40 × 40 pixels and the bleed is 3 pixels. A @2x or @3x image is recommended.No
rationumberThe ratio of the display size, also known as the aspect ratio. It is required when the entry is Widget type.No

Additional properties are allowed.

AppEntry.type

The type of the specified entry.

  • QuickEntry: a quick entry to a mobile application.

  • Widget: a mobile component.

  • Menu: a menu.

  • Type: string

  • Required: ✓ Yes

  • Allowed values:

    • "QuickEntry"
    • "Widget"
    • "Menu"

AppEntry.name

The name of the specified entry that supports multilingual settings.

  • Type: string
  • Required: ✓ Yes

AppEntry.path

The route of the specified entry.

  • Type: string
  • Required: ✓ Yes

AppEntry.code

The ID of the specified entry. It is unique in a micro application.

  • Type: string
  • Required: ✓ Yes

AppEntry.appIcon

The icon of the specified application. It is used for a mobile micro application. The size is 40 × 40 pixels and the bleed is 3 pixels. A @2x or @3x image is recommended.

  • Type: AppIcon
  • Required: No

AppEntry.ratio

The ratio of the display size, also known as the aspect ratio. It is required when the entry is Widget type.

  • Type: number
  • Required: No
  • Minimum: >= 0.5
  • Maximum: < 2

AppIcon

The icon of the specified application. It is used for a mobile micro application. The size is 40 × 40 pixels and the bleed is 3 pixels. A @2x or @3x image is recommended.

AppIcon properties

ParameterData typeDescriptionRequired
type****stringIcon type: cdn. URL is required.✓ Yes
urlstringThe URL of the specified file.✓ Yes
size****stringThe size of the specified file, in pixels. For example, 120×120.✓ Yes

Additional properties are allowed.

AppIcon.type

Icon type: cdn. URL is required.

  • Type: string
  • Required: ✓ Yes
  • Allowed values:
    • "cdn"

AppIcon.url

The URL of the specified file.

  • Type: string
  • Required: ✓ Yes

AppIcon.size

The size of the specified file, in pixels. For example, 120×120.

  • Type: string
  • Required: ✓ Yes

Icon

The icon object.

Icon properties

ParameterData typeDescriptionRequired
type****stringThe icon type. Available values: URL and tuyaIcon. tuyaIcon is recommended.✓ Yes
name****stringIt is required when Icon.type is tuyaIcon. You can go to TuyaIcon to view all available icons. It is recommended.No
urlstringThe URL of the specified icon. It is required when Icon.type is URL. It will no longer be supported in the future. tuyaIcon is recommended.No

Additional properties are allowed.

Icon.type

The icon type. Available values: URL and tuyaIcon. tuyaIcon is recommended.

  • Type: string
  • Required: ✓ Yes
  • Allowed values:
    • "URL"
    • "tuyaIcon"

Icon.name

It is required when Icon.type is tuyaIcon. You can go to TuyaIcon to view all available icons. It is recommended.

  • Type: string
  • Required: No

Icon.url

The URL of the specified icon. It is required when Icon.type is URL. It will no longer be supported in the future. tuyaIcon is recommended.

  • Type: string
  • Required: No
  • Pattern: ^(http://|https://)

Privilege

The custom permission of the specified micro application.

Privilege properties

ParameterData typeDescriptionRequired
name****stringThe display name of the specified permission that supports multilingual settings.✓ Yes
code****stringThe code of the specified permission. It is unique in a micro application. If the code is changed, the previously configured permission information will be lost, and the user needs to reconfigure the permission.✓ Yes

Additional properties are allowed.

Privilege.name

The display name of the specified permission that supports multilingual settings.

  • Type: string
  • Required: ✓ Yes

Privilege.code

The code of the specified permission. It is unique in a micro application. If the code is changed, the previously configured permission information will be lost, and the user needs to reconfigure the permission.

  • Type: string
  • Required: ✓ Yes

Annotations

Provide remarks and ad hoc feature support based on conventions. Developers are allowed to add attributes other than the following.

Annotations Properties

参数TypeDescriptionRequired
sdf.cli:microFrameworkstringFramework type✓ Yes
sdf.feat:colorThemebooleanWhether to support theme colorNo
sdf.feat:i18nbooleanEnable multil languageNo
sdf.accessTypePUBLICSigns that microapps do not require loginNo
sdf.main-app.menu.hide_in_menubooleanHide menu entries for microappsNo

Annotations.sdf.cli:microFramework

Framework type.

  • Type: string
  • Required: ✓ Yes
  • Allowed values:
    • "REACT_TS"
    • "REACT_JS"
    • "VUE_TS"
    • "VUE_JS"

Annotations.sdf.feat:colorTheme

Whether to support theme color.

  • Type: boolean
  • Required: No

Annotations.sdf.feat:i18n

Enable multil language. Multilingual information can be managed on the SaaS No-Code Platform -- My Applications

  • Type: boolean
  • Required: No

Annotations.sdf.main-app.menu.hide_in_menu

Hide menu entries for microapps.

  • Type: boolean
  • Required: No