From e1c90dcb42ff94425572d47d777469fda9803d25 Mon Sep 17 00:00:00 2001 From: cxy251 Date: Mon, 7 Jul 2025 11:15:52 +0800 Subject: [PATCH 1/4] phase1&2 Signed-off-by: cxy251 --- .../component/ets/form_component.d.ts | 212 ++++--- api/@internal/component/ets/form_link.d.ts | 41 +- ...hos.app.form.FormEditExtensionAbility.d.ts | 3 +- api/@ohos.app.form.FormExtensionAbility.d.ts | 30 +- ...hos.app.form.LiveFormExtensionAbility.d.ts | 5 +- api/@ohos.app.form.formBindingData.d.ts | 20 +- api/@ohos.app.form.formHost.d.ts | 8 +- api/@ohos.app.form.formInfo.d.ts | 587 ++++++++++-------- api/@ohos.app.form.formProvider.d.ts | 23 +- api/@ohos.application.formError.d.ts | 77 ++- api/application/FormEditExtensionContext.d.ts | 3 +- api/application/FormExtensionContext.d.ts | 9 +- api/application/LiveFormExtensionContext.d.ts | 5 +- 13 files changed, 629 insertions(+), 394 deletions(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 0b44fe424c..f8ef354114 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -17,14 +17,20 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod,Callback } from './common'; +import Want from '../../@ohos.app.ability.Want'; +import { Visibility } from './enums' +import { VoidCallback } from './units'; +/*** endif */ /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormDimension { /** @@ -32,36 +38,40 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_1_2, + Dimension_1_2 = 0, /** * 2 x 2 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_2, + Dimension_2_2 = 1, /** * 2 x 4 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_4, + Dimension_2_4 = 2, /** * 4 x 4 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_4_4, + Dimension_4_4 = 3, /** * 2 x 1 cards @@ -71,7 +81,7 @@ declare enum FormDimension { * @since 9 * @deprecated since 20 */ - Dimension_2_1, + Dimension_2_1 = 4, /** * 1 x 1 cards @@ -79,7 +89,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_1_1 = 6, @@ -88,16 +99,18 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_6_4, + DIMENSION_6_4 = 7, /** * 2 x 3 cards used for wearable devices * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -106,18 +119,20 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_3 = 9, + DIMENSION_3_3 = 9 } /** * Defines the FormRenderingMode enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormRenderingMode { @@ -126,7 +141,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_COLOR, @@ -135,7 +151,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE_COLOR, } @@ -143,10 +160,11 @@ declare enum FormRenderingMode { /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormShape { /** @@ -154,7 +172,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -163,7 +182,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE, } @@ -174,18 +194,20 @@ declare enum FormShape { * @interface FormInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FormInfo { /** * The id the form. * - * @type { number | string } + * @type { long | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number | string; + id: long | string; /** * The name of the form. @@ -193,7 +215,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -203,7 +226,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bundle: string; @@ -213,7 +237,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ability: string; @@ -223,7 +248,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ module: string; @@ -233,7 +259,8 @@ declare interface FormInfo { * @type { ?FormDimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dimension?: FormDimension; @@ -243,7 +270,8 @@ declare interface FormInfo { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ temporary?: boolean; @@ -257,13 +285,25 @@ declare interface FormInfo { */ want?: import('../api/@ohos.app.ability.Want').default; + /** + * The want of the form. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + want?: Want; + /** * The renderingMode of the form. * * @type { ?FormRenderingMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingMode?: FormRenderingMode; @@ -273,7 +313,8 @@ declare interface FormInfo { * @type { ?FormShape } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: FormShape; } @@ -284,14 +325,15 @@ declare interface FormInfo { * @interface FormComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormComponentInterface { /** * Set a new value. * * @param { { - * id: number; + * id: long; * name: string; * bundle: string; * ability: string; @@ -330,7 +372,8 @@ interface FormComponentInterface { * @returns { FormComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (value: FormInfo): FormComponentAttribute; } @@ -341,18 +384,20 @@ interface FormComponentInterface { * @interface FormCallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormCallbackInfo { /** * The id of the form. * - * @type { number } + * @type { long } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: long; /** * The string id of the form. @@ -360,41 +405,43 @@ interface FormCallbackInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ idString: string; } - /** * Defines the size of Form. * - * @typedef FormSize + * @interface FormSize * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormSize { /** * The width of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; - + width: double; /** * The height of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** @@ -403,19 +450,21 @@ interface FormSize { * @typedef ErrorInformation * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ErrorInformation { /** * Error code. * Anonymous Object Rectification * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - errcode: number; + errcode: int; /** * Error information. @@ -424,7 +473,8 @@ interface ErrorInformation { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ msg: string; } @@ -433,7 +483,8 @@ interface ErrorInformation { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FormComponentAttribute extends CommonMethod { /** @@ -447,13 +498,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -534,13 +590,13 @@ declare class FormComponentAttribute extends CommonMethod } callback * @returns { FormComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: Callback): FormComponentAttribute; @@ -561,7 +617,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -581,7 +638,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -596,13 +654,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; } diff --git a/api/@internal/component/ets/form_link.d.ts b/api/@internal/component/ets/form_link.d.ts index 8647932350..700211a7b8 100644 --- a/api/@internal/component/ets/form_link.d.ts +++ b/api/@internal/component/ets/form_link.d.ts @@ -17,7 +17,9 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Defines the FormLink options. * @@ -25,7 +27,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 10 -*/ + */ /** * Defines the FormLink options. * @@ -33,8 +35,9 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 -*/ + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ declare interface FormLinkOptions { /** * Action types: "router" and "message". @@ -51,7 +54,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ action: string; @@ -70,7 +74,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -89,7 +94,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; @@ -108,7 +114,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName?: string; @@ -119,7 +126,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ uri?: string; @@ -138,7 +146,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ params?: Object; } @@ -158,7 +167,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormLinkInterface { /** @@ -178,7 +188,8 @@ interface FormLinkInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (options: FormLinkOptions): FormLinkAttribute; } @@ -198,10 +209,10 @@ interface FormLinkInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -declare class FormLinkAttribute extends CommonMethod { -} +declare class FormLinkAttribute extends CommonMethod {} /** * Defines FormLink component. diff --git a/api/@ohos.app.form.FormEditExtensionAbility.d.ts b/api/@ohos.app.form.FormEditExtensionAbility.d.ts index a89e2c08d0..975799bfc6 100644 --- a/api/@ohos.app.form.FormEditExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormEditExtensionAbility.d.ts @@ -28,7 +28,7 @@ import FormEditExtensionContext from './application/FormEditExtensionContext'; * @stagemodelonly * @since 18 */ -export default class FormEditExtensionAbility extends UIExtensionAbility { +declare class FormEditExtensionAbility extends UIExtensionAbility { /** * Indicates configuration infomation about an form edit extension ability context. * @@ -39,3 +39,4 @@ export default class FormEditExtensionAbility extends UIExtensionAbility { */ context: FormEditExtensionContext; } +export default FormEditExtensionAbility; diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index f106f0c109..c7321cf67f 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -24,7 +24,21 @@ import formInfo from './@ohos.app.form.formInfo'; /*** endif */ import FormExtensionContext from './application/FormExtensionContext'; import Want from './@ohos.app.ability.Want'; +/*** if arkts 1.1 */ import { Configuration } from './@ohos.app.ability.Configuration'; +/*** endif */ + +/** + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. + * + * @typedef { function } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnStopFn = () => void; /** * class of form extension. @@ -159,7 +173,7 @@ declare class FormExtensionAbility { /** * Called when the form provider receives form events from the system. * - * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} + * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} * object indicates the form ID, and the value indicates the event * type, which can be either * {@link formInfo#VisibilityType#FORM_VISIBLE} or @@ -173,7 +187,7 @@ declare class FormExtensionAbility { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onChangeFormVisibility(newStatus: Record): void; + onChangeFormVisibility(newStatus: Record): void; /** * Called when a specified message event defined by the form provider is triggered. This method is valid only for @@ -327,6 +341,18 @@ declare class FormExtensionAbility { */ onStop?(): void; + /** + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. + * + * @type { ?OnStopFn } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStop?: OnStopFn; + /** * Called to notify the form provider that the form location of the form has been changed. * diff --git a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts index 88ad4daeaa..8a47a1405c 100644 --- a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts +++ b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts @@ -75,7 +75,7 @@ export interface LiveFormInfo { * @atomicservice * @since 20 */ -export default class LiveFormExtensionAbility extends ExtensionAbility { +declare class LiveFormExtensionAbility extends ExtensionAbility { /** * Indicates configuration information about a live form extension ability context. * @@ -109,4 +109,5 @@ export default class LiveFormExtensionAbility extends ExtensionAbility { * @since 20 */ onLiveFormDestroy(liveFormInfo: LiveFormInfo): void; -} \ No newline at end of file +} +export default LiveFormExtensionAbility; diff --git a/api/@ohos.app.form.formBindingData.d.ts b/api/@ohos.app.form.formBindingData.d.ts index 3cdd10aaac..356ef5858a 100644 --- a/api/@ohos.app.form.formBindingData.d.ts +++ b/api/@ohos.app.form.formBindingData.d.ts @@ -16,12 +16,9 @@ /** * @file * @kit FormKit + * @arkts 1.1&1.2 */ -/*** if arkts 1.1 */ -import { BusinessError } from './@ohos.base'; -/*** endif */ - /** * Interface of formBindingData. * @@ -93,7 +90,8 @@ declare namespace formBindingData { * @type { Object } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Object; @@ -112,7 +110,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ proxies?: Array; } @@ -132,7 +131,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ProxyData { /** @@ -150,7 +150,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; @@ -169,7 +170,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ subscriberId?: string; } diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index 421eb36c6e..5e9c209421 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -617,7 +617,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted + * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted * by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. @@ -630,7 +630,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; + function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; /** * Deletes invalid forms of the application in the Form Manager Service based on the list of. @@ -638,7 +638,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. + * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -650,7 +650,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array): Promise; + function deleteInvalidForms(formIds: Array): Promise; /** * Obtains the Form state. diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index f6f9d43c38..0bbc7cda32 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -33,7 +33,8 @@ import Want from './@ohos.app.ability.Want'; * @namespace formInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formInfo { /** @@ -49,7 +50,8 @@ declare namespace formInfo { * @typedef FormInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfo { /** @@ -65,7 +67,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -82,7 +85,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -99,7 +103,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -116,7 +121,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -126,19 +132,21 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayName: string; /** * Obtains the displayName resource id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - displayNameId: number; + displayNameId: int; /** * Obtains the description of this form. @@ -153,26 +161,28 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - descriptionId: number; + descriptionId: int; /** * Obtains the type of this form. Currently, JS forms are supported. @@ -187,7 +197,8 @@ declare namespace formInfo { * @type { FormType } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: FormType; @@ -204,7 +215,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ jsComponentName: string; @@ -226,17 +238,6 @@ declare namespace formInfo { */ colorMode: ColorMode; - /** - * Obtains the rendering mode of the form. - * - * @type { ?RenderingMode } - * @readonly - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - readonly renderingMode?: RenderingMode; - /** * Checks whether this form is a default form. * @@ -250,7 +251,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDefault: boolean; @@ -267,7 +269,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ updateEnabled: boolean; @@ -284,7 +287,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formVisibleNotify: boolean; @@ -301,7 +305,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ scheduledUpdateTime: string; @@ -318,60 +323,64 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formConfigAbility: string; /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - updateDuration: number; + updateDuration: int; /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - defaultDimension: number; + defaultDimension: int; /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportDimensions: Array; + supportDimensions: Array; /** * Obtains the custom data defined in this form. @@ -386,7 +395,8 @@ declare namespace formInfo { * @type { Record } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ customizeData: Record; @@ -403,7 +413,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDynamic: boolean; @@ -414,31 +425,34 @@ declare namespace formInfo { * @default false * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ transparencyEnabled: boolean; /** * Obtains the shape supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes: Array; + supportedShapes: Array; /** * Indicates the form previewImage IDs map corresponds to the \"supportDimensions\". * - * @type { ?Array } + * @type { ?Array } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly previewImages?: Array; + readonly previewImages?: Array; /** * Indicates whether the form uses a blur background provided by the form host. @@ -447,47 +461,78 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly enableBlurBackground?: boolean; /** - * Indicates the fun interaction form params + * Obtains the rendering mode of the form. * - * @type { ?FunInteractionParams } + * @type { ?RenderingMode } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly funInteractionParams?: FunInteractionParams; + readonly renderingMode?: RenderingMode; + } + /** + * Rendering mode. + * + * @enum { int } + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum RenderingMode { /** - * Indicates the scene animation form params + * Auto color mode. * - * @type { ?SceneAnimationParams } - * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AUTO_COLOR = 0, + /** + * Full color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly sceneAnimationParams?: SceneAnimationParams; + FULL_COLOR = 1, + /** + * Single color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SINGLE_COLOR = 2 } /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormType { /** @@ -501,7 +546,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ JS = 1, @@ -516,7 +562,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ eTS = 2 } @@ -524,14 +571,14 @@ declare namespace formInfo { /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 @@ -550,6 +597,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_AUTO = -1, @@ -565,6 +613,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_DARK = 0, @@ -580,47 +629,11 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_LIGHT = 1 } - /** - * Rendering mode. - * - * @enum { number } - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - enum RenderingMode { - /** - * Auto color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - AUTO_COLOR = 0, - - /** - * Full color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - FULL_COLOR = 1, - - /** - * Single color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - SINGLE_COLOR = 2 - } - /** * Provides state information about a form. * @@ -634,7 +647,8 @@ declare namespace formInfo { * @typedef FormStateInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormStateInfo { /** @@ -650,7 +664,8 @@ declare namespace formInfo { * @type { FormState } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formState: FormState; @@ -667,7 +682,8 @@ declare namespace formInfo { * @type { Want } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; } @@ -675,17 +691,18 @@ declare namespace formInfo { /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormState { /** @@ -699,7 +716,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = -1, @@ -714,7 +732,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -729,7 +748,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1 } @@ -747,7 +767,8 @@ declare namespace formInfo { * @enum { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormParam { /** @@ -771,9 +792,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - IDENTITY_KEY = 'ohos.extra.param.key.form_identity', + IDENTITY_KEY = "ohos.extra.param.key.form_identity", /** * Indicates the key specifying the grid style of the form to be obtained, which is represented as @@ -796,9 +818,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_KEY = 'ohos.extra.param.key.form_dimension', + DIMENSION_KEY = "ohos.extra.param.key.form_dimension", /** * Indicates the key specifying the name of the form to be obtained, which is represented as @@ -821,9 +844,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - NAME_KEY = 'ohos.extra.param.key.form_name', + NAME_KEY = "ohos.extra.param.key.form_name", /** * Indicates the key specifying the name of the module to which the form to be obtained belongs, which is @@ -850,9 +874,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - MODULE_NAME_KEY = 'ohos.extra.param.key.module_name', + MODULE_NAME_KEY = "ohos.extra.param.key.module_name", /** * Indicates the key specifying the width of the form to be obtained, which is represented as @@ -875,9 +900,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - WIDTH_KEY = 'ohos.extra.param.key.form_width', + WIDTH_KEY = "ohos.extra.param.key.form_width", /** * Indicates the key specifying the height of the form to be obtained, which is represented as @@ -900,9 +926,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - HEIGHT_KEY = 'ohos.extra.param.key.form_height', + HEIGHT_KEY = "ohos.extra.param.key.form_height", /** * Indicates the key specifying whether a form is temporary, which is represented as @@ -925,9 +952,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - TEMPORARY_KEY = 'ohos.extra.param.key.form_temporary', + TEMPORARY_KEY = "ohos.extra.param.key.form_temporary", /** * Indicates the key specifying the name of the bundle to be obtained, which is represented as @@ -950,9 +978,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - BUNDLE_NAME_KEY = 'ohos.extra.param.key.bundle_name', + BUNDLE_NAME_KEY = "ohos.extra.param.key.bundle_name", /** * Indicates the key specifying the name of the ability to be obtained, which is represented as @@ -975,9 +1004,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - ABILITY_NAME_KEY = 'ohos.extra.param.key.ability_name', + ABILITY_NAME_KEY = "ohos.extra.param.key.ability_name", /** * Indicates the key specifying whether a form type is theme, which is represented as @@ -989,7 +1019,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ THEME_KEY = 'ohos.extra.param.key.form_is_theme', @@ -1003,9 +1034,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - DEVICE_ID_KEY = 'ohos.extra.param.key.device_id', + DEVICE_ID_KEY = "ohos.extra.param.key.device_id", /** * Indicates the key specifying the launch reason of the form to be obtained, which is represented as @@ -1028,9 +1060,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - LAUNCH_REASON_KEY = 'ohos.extra.param.key.form_launch_reason', + LAUNCH_REASON_KEY = "ohos.extra.param.key.form_launch_reason", /** * Indicates the key specifying the custom data of the form to be obtained, which is represented as @@ -1057,9 +1090,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - PARAM_FORM_CUSTOMIZE_KEY = 'ohos.extra.param.key.form_customize', + PARAM_FORM_CUSTOMIZE_KEY = "ohos.extra.param.key.form_customize", /** * Indicates the key specifying the form location, which is represented as @@ -1070,7 +1104,8 @@ declare namespace formInfo { * }. * * @syscap SystemCapability.Ability.Form - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_LOCATION_KEY = 'ohos.extra.param.key.form_location', @@ -1095,7 +1130,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_RENDERING_MODE_KEY = 'ohos.extra.param.key.form_rendering_mode', @@ -1109,7 +1145,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HOST_BG_INVERSE_COLOR_KEY = 'ohos.extra.param.key.host_bg_inverse_color', @@ -1123,7 +1160,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_NAME_KEY = 'ohos.extra.param.key.permission_name', @@ -1137,7 +1175,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_GRANTED_KEY = 'ohos.extra.param.key.permission_granted', } @@ -1157,7 +1196,8 @@ declare namespace formInfo { * @typedef FormInfoFilter * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfoFilter { /** @@ -1167,7 +1207,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; @@ -1186,7 +1227,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -1194,39 +1236,42 @@ declare namespace formInfo { * optional supportedDimensions that used to ask getFormsInfo to return * form infos with the same supportedDimensions. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedDimensions?: Array; + supportedDimensions?: Array; /** * optional supportedShapes that used to ask getFormsInfo to return * form infos with the same supportedShapes. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes?: Array; + supportedShapes?: Array; } /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormDimension { /** @@ -1240,7 +1285,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_1_2 = 1, @@ -1255,9 +1301,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_2, + Dimension_2_2 = 2, /** * 2 x 4 form @@ -1270,9 +1317,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_4, + Dimension_2_4 = 3, /** * 4 x 4 form @@ -1285,9 +1333,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_4_4, + Dimension_4_4 = 4, /** * 2 x 1 form @@ -1303,32 +1352,35 @@ declare namespace formInfo { * @since 11 * @deprecated since 20 */ - Dimension_2_1, + Dimension_2_1 = 5, /** * 1 x 1 form * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_1_1, + DIMENSION_1_1 = 6, /** * 6 x 4 form * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_6_4, + DIMENSION_6_4 = 7, /** * 2 x 3 form used for wearable devices * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -1337,18 +1389,20 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_3 = 9, + DIMENSION_3_3 = 9 } - /** + /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormShape { /** @@ -1356,7 +1410,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -1365,25 +1420,27 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - CIRCLE, + CIRCLE = 2 } /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VisibilityType { /** @@ -1401,7 +1458,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, /** @@ -1419,7 +1477,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_VISIBLE = 1, /** @@ -1437,25 +1496,27 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_INVISIBLE + FORM_INVISIBLE = 2 } /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum LaunchReason { /** @@ -1469,7 +1530,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_DEFAULT = 1, /** @@ -1483,9 +1545,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_SHARE + FORM_SHARE = 2 } /** @@ -1495,7 +1558,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PublishFormResult { /** @@ -1505,7 +1569,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ code: PublishFormErrorCode; @@ -1516,7 +1581,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; } @@ -1524,11 +1590,12 @@ declare namespace formInfo { /** * The error code of publish form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PublishFormErrorCode { /** @@ -1537,9 +1604,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - SUCCESS, + SUCCESS = 0, /** * Host has no space to publish form. @@ -1547,9 +1615,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - NO_SPACE, + NO_SPACE = 1, /** * Check param failed. @@ -1557,9 +1626,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - PARAM_ERROR, + PARAM_ERROR = 2, /** * Internal error occurs during form processing. @@ -1567,9 +1637,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - INTERNAL_ERROR, + INTERNAL_ERROR = 3 } /** @@ -1579,7 +1650,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormProviderFilter { /** @@ -1589,7 +1661,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -1600,9 +1673,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - formName?: string; + formName ?: string; /** * Obtains the module name of the provider application module. @@ -1611,9 +1685,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - moduleName?: string; + moduleName ?: string; /** * Obtains the ability name of the provider application module. @@ -1622,9 +1697,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - abilityName?: string; + abilityName ?: string; /** * Indicates whether to include unused form. @@ -1634,7 +1710,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isUnusedIncluded?: boolean; } @@ -1645,7 +1722,8 @@ declare namespace formInfo { * @typedef RunningFormInfo * @syscap SystemCapability.Ability.Form * @systemapi hide this for inner system use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RunningFormInfo { /** @@ -1656,7 +1734,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formId: string; @@ -1668,7 +1747,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -1680,7 +1760,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly hostBundleName: string; @@ -1692,7 +1773,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formLocation: FormLocation; @@ -1704,7 +1786,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly visibilityType: VisibilityType; @@ -1716,7 +1799,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly moduleName: string; @@ -1728,7 +1812,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -1740,21 +1825,23 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formName: string; /** * Obtains the grid style of this form. * - * @type { number } - * @readonly + * @type { int } * @default - + * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dimension: number; + readonly dimension: int; /** * Obtains the stage of form use. @@ -1764,7 +1851,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formUsageState: FormUsageState; @@ -1775,7 +1863,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formDescription: string; @@ -1787,7 +1876,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly extraData?: Record; } @@ -1795,10 +1885,11 @@ declare namespace formInfo { /** * The stage of form use. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormUsageState { /** @@ -1806,7 +1897,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ USED = 0, /** @@ -1814,15 +1906,16 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - UNUSED = 1, + UNUSED = 1 } /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi * @since 12 @@ -1830,9 +1923,10 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ enum FormLocation { /** @@ -1840,7 +1934,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = -1, @@ -1856,6 +1951,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ DESKTOP = 0, @@ -1871,6 +1967,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_CENTER = 1, @@ -1886,6 +1983,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_MANAGER = 2, @@ -1901,6 +1999,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ NEGATIVE_SCREEN = 3, @@ -1909,7 +2008,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_CENTER_NEGATIVE_SCREEN = 4, @@ -1918,7 +2018,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_MANAGER_NEGATIVE_SCREEN = 5, @@ -1934,6 +2035,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ SCREEN_LOCK = 6, @@ -1949,6 +2051,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ AI_SUGGESTION = 7, } diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 7bd2de5b9b..845e954e05 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -20,7 +20,9 @@ import { AsyncCallback } from './@ohos.base'; import formBindingData from './@ohos.app.form.formBindingData'; +/*** if arkts 1.1 */ import formInfo from './@ohos.app.form.formInfo'; +/*** if arkts 1.1 */ import Want from './@ohos.app.ability.Want'; /** @@ -36,14 +38,15 @@ import Want from './@ohos.app.ability.Want'; * @namespace formProvider * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formProvider { /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -61,7 +64,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -74,15 +77,16 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback): void; + function setFormNextRefreshTime(formId: string, minute: int, callback: AsyncCallback): void; /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -100,7 +104,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -113,9 +117,10 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: number): Promise; + function setFormNextRefreshTime(formId: string, minute: int): Promise; /** * Update a specified form. diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 41eedb7197..e0a3fd4698 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -23,22 +23,25 @@ * * @namespace formError * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formError { /** * Error of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormError { /** * A common internal error occurs during form processing. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_COMMON = 1, @@ -48,7 +51,8 @@ declare namespace formError { * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PERMISSION_DENY = 2, @@ -58,7 +62,8 @@ declare namespace formError { * consistent with those provided by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_INFO_FAILED = 4, @@ -67,7 +72,8 @@ declare namespace formError { * Ensure that the bundle to which the form to be added belongs is available. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_BUNDLE_FAILED = 5, @@ -76,7 +82,8 @@ declare namespace formError { * Ensure that the grid style of the form is supported by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_LAYOUT_FAILED = 6, @@ -85,7 +92,8 @@ declare namespace formError { * parameters are valid. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_ADD_INVALID_PARAM = 7, @@ -94,7 +102,8 @@ declare namespace formError { * different from that obtained for the first time. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CFG_NOT_MATCH_ID = 8, @@ -102,7 +111,8 @@ declare namespace formError { * The ID of the form to be operated does not exist in the Form Manager Service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_NOT_EXIST_ID = 9, @@ -110,7 +120,8 @@ declare namespace formError { * Failed to bind the Form Manager Service to the provider service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_BIND_PROVIDER_FAILED = 10, @@ -118,7 +129,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_FORMS = 11, @@ -127,7 +139,8 @@ declare namespace formError { * exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_INSTANCES_PER_FORM = 12, @@ -136,7 +149,8 @@ declare namespace formError { * operated by the current application. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_OPERATION_FORM_NOT_SELF = 13, @@ -144,7 +158,8 @@ declare namespace formError { * The Form Manager Service failed to instruct the form provider to delete the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PROVIDER_DEL_FAIL = 14, @@ -152,7 +167,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum per client. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_FORMS_PER_CLIENT = 15, @@ -160,7 +176,8 @@ declare namespace formError { * The total number of added temp forms exceeds the maximum in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_TEMP_FORMS = 16, @@ -168,7 +185,8 @@ declare namespace formError { * The module can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_MODULE = 17, @@ -176,7 +194,8 @@ declare namespace formError { * The ability can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_ABILITY = 18, @@ -184,7 +203,8 @@ declare namespace formError { * The dimension is not exist in the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_DIMENSION = 19, @@ -192,7 +212,8 @@ declare namespace formError { * The ability is not installed. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_FA_NOT_INSTALLED = 20, @@ -201,7 +222,8 @@ declare namespace formError { * the service is not started.Please try again after the service is started. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_SYSTEM_RESPONSES_FAILED = 30, @@ -213,7 +235,8 @@ declare namespace formError { * the request parameters. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_DUPLICATE_ADDED = 31, @@ -222,7 +245,8 @@ declare namespace formError { * the restoration is complete. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_IN_RECOVERY = 36, @@ -231,7 +255,8 @@ declare namespace formError { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_DISTRIBUTED_SCHEDULE_FAILED = 37 } diff --git a/api/application/FormEditExtensionContext.d.ts b/api/application/FormEditExtensionContext.d.ts index c236f8d1a0..c68e508f21 100644 --- a/api/application/FormEditExtensionContext.d.ts +++ b/api/application/FormEditExtensionContext.d.ts @@ -31,7 +31,7 @@ import type { AbilityResult } from '../ability/abilityResult'; * @stagemodelonly * @since 18 */ -export default class FormEditExtensionContext extends UIExtensionContext { +declare class FormEditExtensionContext extends UIExtensionContext { /** * Start second editor extension ability. * @@ -47,3 +47,4 @@ export default class FormEditExtensionContext extends UIExtensionContext { */ startSecondPage(want: Want): Promise; } +export default FormEditExtensionContext; diff --git a/api/application/FormExtensionContext.d.ts b/api/application/FormExtensionContext.d.ts index a07bd0a86d..9fd93c140d 100644 --- a/api/application/FormExtensionContext.d.ts +++ b/api/application/FormExtensionContext.d.ts @@ -21,11 +21,9 @@ /*** if arkts 1.1 */ import { AsyncCallback } from '../@ohos.base'; import type { ConnectOptions } from '../ability/connectOptions'; -/*** endif */ -import ExtensionContext from './ExtensionContext'; -/*** if arkts 1.1 */ import Want from '../@ohos.app.ability.Want'; /*** endif */ +import ExtensionContext from './ExtensionContext'; /** * The context of form extension. It allows access to @@ -47,7 +45,7 @@ import Want from '../@ohos.app.ability.Want'; * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ -export default class FormExtensionContext extends ExtensionContext { +declare class FormExtensionContext extends ExtensionContext { /** * Start an ability within the same bundle. * @@ -136,7 +134,7 @@ export default class FormExtensionContext extends ExtensionContext { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 16000001 - The specified ability does not exist. * @throws { BusinessError } 16000002 - Incorrect ability type. - * @throws { BusinessError } 16000004 - Cannot start an invisible component. + * @throws { BusinessError } 16000004 - Can not start invisible component. * @throws { BusinessError } 16000005 - The specified process does not have the permission. * @throws { BusinessError } 16000006 - Cross-user operations are not allowed. * @throws { BusinessError } 16000008 - The crowdtesting application expires. @@ -183,3 +181,4 @@ export default class FormExtensionContext extends ExtensionContext { */ disconnectServiceExtensionAbility(connection: number): Promise; } +export default FormExtensionContext; diff --git a/api/application/LiveFormExtensionContext.d.ts b/api/application/LiveFormExtensionContext.d.ts index 511119bf69..e78efb661a 100644 --- a/api/application/LiveFormExtensionContext.d.ts +++ b/api/application/LiveFormExtensionContext.d.ts @@ -30,5 +30,6 @@ import ExtensionContext from './ExtensionContext'; * @atomicservice * @since 20 */ -export default class LiveFormExtensionContext extends ExtensionContext { -} \ No newline at end of file +declare class LiveFormExtensionContext extends ExtensionContext { +} +export default LiveFormExtensionContext; -- Gitee From 0853cd9e5244e7768dc592b03c4b480a9423827e Mon Sep 17 00:00:00 2001 From: cxy251 Date: Mon, 7 Jul 2025 18:30:27 +0800 Subject: [PATCH 2/4] phase1&2 Signed-off-by: cxy251 --- .../component/ets/form_component.d.ts | 1 - api/@ohos.app.form.formInfo.d.ts | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index f8ef354114..116f72de69 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -671,7 +671,6 @@ declare class FormComponentAttribute extends CommonMethod Date: Tue, 8 Jul 2025 11:13:15 +0800 Subject: [PATCH 3/4] phase1&2 Signed-off-by: cxy251 --- .../component/ets/form_component.d.ts | 28 +++---- api/@ohos.app.form.FormExtensionAbility.d.ts | 4 +- api/@ohos.app.form.formHost.d.ts | 8 +- api/@ohos.app.form.formInfo.d.ts | 84 +++++++++---------- api/@ohos.app.form.formProvider.d.ts | 12 +-- api/@ohos.application.formError.d.ts | 2 +- 6 files changed, 69 insertions(+), 69 deletions(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 116f72de69..e360e1bf6f 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -26,7 +26,7 @@ import { VoidCallback } from './units'; /** * Defines the FormDimension enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts {'1.1':'7','1.2':'20'} @@ -128,7 +128,7 @@ declare enum FormDimension { /** * Defines the FormRenderingMode enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -160,7 +160,7 @@ declare enum FormRenderingMode { /** * Defines the FormShape enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -201,13 +201,13 @@ declare interface FormInfo { /** * The id the form. * - * @type { long | string } + * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - id: long | string; + id: number | string; /** * The name of the form. @@ -333,7 +333,7 @@ interface FormComponentInterface { * Set a new value. * * @param { { - * id: long; + * id: number; * name: string; * bundle: string; * ability: string; @@ -391,13 +391,13 @@ interface FormCallbackInfo { /** * The id of the form. * - * @type { long } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - id: long; + id: number; /** * The string id of the form. @@ -424,24 +424,24 @@ interface FormSize { * The width of the form. * Anonymous Object Rectification * - * @type { double } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts{ '1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - width: double; + width: number; /** * The height of the form. * Anonymous Object Rectification * - * @type { double } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts{ '1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - height: double; + height: number; } /** @@ -458,13 +458,13 @@ interface ErrorInformation { * Error code. * Anonymous Object Rectification * - * @type { int } + * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since arkts{ '1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - errcode: int; + errcode: number; /** * Error information. diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index c7321cf67f..ce5e4333d4 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -173,7 +173,7 @@ declare class FormExtensionAbility { /** * Called when the form provider receives form events from the system. * - * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} + * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} * object indicates the form ID, and the value indicates the event * type, which can be either * {@link formInfo#VisibilityType#FORM_VISIBLE} or @@ -187,7 +187,7 @@ declare class FormExtensionAbility { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onChangeFormVisibility(newStatus: Record): void; + onChangeFormVisibility(newStatus: Record): void; /** * Called when a specified message event defined by the form provider is triggered. This method is valid only for diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index 5e9c209421..421eb36c6e 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -617,7 +617,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted + * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted * by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. @@ -630,7 +630,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; + function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; /** * Deletes invalid forms of the application in the Form Manager Service based on the list of. @@ -638,7 +638,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. + * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -650,7 +650,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array): Promise; + function deleteInvalidForms(formIds: Array): Promise; /** * Obtains the Form state. diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index d66a2cc430..c5135db3c4 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -140,13 +140,13 @@ declare namespace formInfo { /** * Obtains the displayName resource id of this form. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - displayNameId: int; + displayNameId: number; /** * Obtains the description of this form. @@ -169,20 +169,20 @@ declare namespace formInfo { /** * Obtains the description id of this form. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Obtains the description id of this form. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - descriptionId: int; + descriptionId: number; /** * Obtains the type of this form. Currently, JS forms are supported. @@ -331,56 +331,56 @@ declare namespace formInfo { /** * Obtains the updateDuration. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the updateDuration. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - updateDuration: int; + updateDuration: number; /** * Obtains the default grid style of this form. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the default grid style of this form. * - * @type { int } + * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - defaultDimension: int; + defaultDimension: number; /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - supportDimensions: Array; + supportDimensions: Array; /** * Obtains the custom data defined in this form. @@ -433,18 +433,18 @@ declare namespace formInfo { /** * Obtains the shape supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - supportedShapes: Array; + supportedShapes: Array; /** * Indicates the form previewImage IDs map corresponds to the \"supportDimensions\". * - * @type { ?Array } + * @type { ?Array } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi @@ -452,7 +452,7 @@ declare namespace formInfo { * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - readonly previewImages?: Array; + readonly previewImages?: Array; /** * Indicates whether the form uses a blur background provided by the form host. @@ -504,7 +504,7 @@ declare namespace formInfo { /** * Rendering mode. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @systemapi * @since arkts {'1.1':'18', '1.2':'20'} @@ -543,14 +543,14 @@ declare namespace formInfo { /** * Type of form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Type of form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -593,14 +593,14 @@ declare namespace formInfo { /** * Color mode. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Color mode. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 @@ -713,14 +713,14 @@ declare namespace formInfo { /** * Provides state about a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Provides state about a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1258,38 +1258,38 @@ declare namespace formInfo { * optional supportedDimensions that used to ask getFormsInfo to return * form infos with the same supportedDimensions. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - supportedDimensions?: Array; + supportedDimensions?: Array; /** * optional supportedShapes that used to ask getFormsInfo to return * form infos with the same supportedShapes. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - supportedShapes?: Array; + supportedShapes?: Array; } /** * Defines the FormDimension enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Defines the FormDimension enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1420,7 +1420,7 @@ declare namespace formInfo { /** * Defines the FormShape enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} @@ -1451,14 +1451,14 @@ declare namespace formInfo { /** * The visibility of a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * The visibility of a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1527,14 +1527,14 @@ declare namespace formInfo { /** * Indicates the launch reason of a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Indicates the launch reason of a form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1612,7 +1612,7 @@ declare namespace formInfo { /** * The error code of publish form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly @@ -1855,7 +1855,7 @@ declare namespace formInfo { /** * Obtains the grid style of this form. * - * @type { int } + * @type { number } * @default - * @readonly * @syscap SystemCapability.Ability.Form @@ -1863,7 +1863,7 @@ declare namespace formInfo { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - readonly dimension: int; + readonly dimension: number; /** * Obtains the stage of form use. @@ -1907,7 +1907,7 @@ declare namespace formInfo { /** * The stage of form use. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @systemapi * @since arkts {'1.1':'11', '1.2':'20'} @@ -1937,7 +1937,7 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @systemapi * @since 12 @@ -1945,7 +1945,7 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since 20 * @arkts 1.1&1.2 diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 845e954e05..601e1b016d 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -46,7 +46,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { int } minute - Indicates duration minute before next update. + * @param { number } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -64,7 +64,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { int } minute - Indicates duration minute before next update. + * @param { number } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -80,13 +80,13 @@ declare namespace formProvider { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: int, callback: AsyncCallback): void; + function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback): void; /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { int } minute - Indicates duration minute before next update. + * @param { number } minute - Indicates duration minute before next update. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -104,7 +104,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { int } minute - Indicates duration minute before next update. + * @param { number } minute - Indicates duration minute before next update. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -120,7 +120,7 @@ declare namespace formProvider { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function setFormNextRefreshTime(formId: string, minute: int): Promise; + function setFormNextRefreshTime(formId: string, minute: number): Promise; /** * Update a specified form. diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index e0a3fd4698..2bdd74bd99 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -30,7 +30,7 @@ declare namespace formError { /** * Error of form. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.Ability.Form * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 -- Gitee From a6bbdb8f1f769ec31ccdae8de452bb7945e1d2fb Mon Sep 17 00:00:00 2001 From: cxy251 Date: Tue, 8 Jul 2025 12:01:15 +0800 Subject: [PATCH 4/4] phase1&2 Signed-off-by: cxy251 --- api/@internal/component/ets/form_component.d.ts | 2 +- api/@ohos.app.form.formInfo.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index e360e1bf6f..0fb69082d6 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -81,7 +81,7 @@ declare enum FormDimension { * @since 9 * @deprecated since 20 */ - Dimension_2_1 = 4, + Dimension_2_1, /** * 1 x 1 cards diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index c5135db3c4..4175546586 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -1374,7 +1374,7 @@ declare namespace formInfo { * @since 11 * @deprecated since 20 */ - Dimension_2_1 = 5, + Dimension_2_1, /** * 1 x 1 form -- Gitee