diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index 824932e5a..82d4c0bde 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -32,6 +32,26 @@ import formInfo from './@ohos.app.form.formInfo'; * @since 9 */ declare namespace formHost { + /** + * Add a form. + *

You can use this method to create a theme form.

+ * + * @permission ohos.permission.REQUIRE_FORM + * @param { Want } want - Indicates want of the form. + * @returns { Promise } Return the form info. + * @throws { BusinessError } 201 - Permissions denied. + * @throws { BusinessError } 202 - The application is not a system application. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @throws { BusinessError } 16500050 - An IPC connection error happened. + * @throws { BusinessError } 16500060 - A service connection error happened, please try again later. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @syscap SystemCapability.Ability.Form + * @systemapi + * @stagemodelonly + * @since 12 + */ + function addForm(want: Want): Promise; + /** * Deletes an obtained form by its ID. *

After this method is called, the form won't be available for use by the application and the Form Manager diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index c37d1aefa..c6f905eef 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -874,6 +874,20 @@ declare namespace formInfo { */ ABILITY_NAME_KEY = 'ohos.extra.param.key.ability_name', + /** + * Indicates the key specifying whether a form type is theme, which is represented as + * want: { + * "parameters": { + * THEME_KEY: true + * } + * } + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 12 + */ + THEME_KEY = 'ohos.extra.param.key.form_is_theme', + /** * Indicates the key specifying the the device ID, which is represented as * want: { @@ -1528,6 +1542,18 @@ declare namespace formInfo { * @since 11 */ readonly formDescription: string; + + /** + * Obtains the extra data of the this form. + * + * @type { ?Record } + * @default - + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 12 + */ + readonly extraData?: Record; } /**