From 97d834cd36b26e95bb79add0f6b7bfaa2302eebe Mon Sep 17 00:00:00 2001 From: cxy251 Date: Sat, 5 Jul 2025 16:19:02 +0800 Subject: [PATCH 1/4] sync0328 Signed-off-by: cxy251 --- api/@internal/component/ets/form_link.d.ts | 41 +- api/@ohos.app.form.FormExtensionAbility.d.ts | 26 +- api/@ohos.app.form.formInfo.d.ts | 597 +++++++++++-------- api/@ohos.app.form.formProvider.d.ts | 49 +- api/@ohos.application.formError.d.ts | 75 ++- 5 files changed, 472 insertions(+), 316 deletions(-) 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.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index f106f0c109..7faef1c38f 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -19,13 +19,23 @@ */ import formBindingData from './@ohos.app.form.formBindingData'; -/*** if arkts 1.1 */ import formInfo from './@ohos.app.form.formInfo'; -/*** endif */ import FormExtensionContext from './application/FormExtensionContext'; import Want from './@ohos.app.ability.Want'; import { Configuration } from './@ohos.app.ability.Configuration'; +/** + * 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. * @@ -327,6 +337,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.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index 72db9a2b37..a1d033a4df 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 */ - readonly sceneAnimationParams?: SceneAnimationParams; + AUTO_COLOR = 0, + /** + * Full color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + 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 @@ -1301,33 +1350,37 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @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, @@ -1336,27 +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, - - /** - * 3 x 4 form used for tv devices - * - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 18 - */ - DIMENSION_3_4 = 10, + 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 { /** @@ -1364,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, @@ -1373,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 { /** @@ -1409,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, /** @@ -1427,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, /** @@ -1445,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 { /** @@ -1477,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, /** @@ -1491,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 } /** @@ -1503,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 { /** @@ -1513,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; @@ -1524,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; } @@ -1532,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 { /** @@ -1545,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. @@ -1555,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. @@ -1565,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. @@ -1575,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 } /** @@ -1587,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 { /** @@ -1597,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; @@ -1608,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. @@ -1619,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. @@ -1630,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. @@ -1642,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; } @@ -1653,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 { /** @@ -1664,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; @@ -1676,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; @@ -1688,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; @@ -1700,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; @@ -1712,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; @@ -1724,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; @@ -1736,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; @@ -1748,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. @@ -1772,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; @@ -1783,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; @@ -1795,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; } @@ -1803,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 { /** @@ -1814,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, /** @@ -1822,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 @@ -1838,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 { /** @@ -1848,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, @@ -1864,6 +1951,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ DESKTOP = 0, @@ -1879,6 +1967,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_CENTER = 1, @@ -1894,6 +1983,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_MANAGER = 2, @@ -1909,6 +1999,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ NEGATIVE_SCREEN = 3, @@ -1917,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, @@ -1926,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, @@ -1942,6 +2035,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ SCREEN_LOCK = 6, @@ -1957,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..969b7cda1b 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -36,14 +36,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 +62,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 +75,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 +102,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 +115,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. @@ -404,20 +407,6 @@ declare namespace formProvider { */ function getPublishedFormInfos(): Promise>; - /** - * Open the view of forms belonging to current bundle. - * Client to communication with FormManagerService. - * - * @param { Want } want - The want of the form to open. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 18 - */ - function openFormManager(want: Want): void; - /** * Open the view of forms belonging to the specified bundle. * Client to communication with FormManagerService. @@ -452,6 +441,20 @@ declare namespace formProvider { */ function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void; + /** + * Open the view of forms belonging to current bundle. + * Client to communication with FormManagerService. + * + * @param { Want } want - The want of the form to open. + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 18 + */ + function openFormManager(want: Want): void; + /** * Activate scene animation * diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 41eedb7197..2bdd74bd99 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -23,7 +23,8 @@ * * @namespace formError * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formError { /** @@ -31,14 +32,16 @@ declare namespace formError { * * @enum { number } * @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 } -- Gitee From c1cefdadf9566e1dfbcbbaa6a7f28433ed07a4e0 Mon Sep 17 00:00:00 2001 From: cxy251 Date: Sun, 6 Jul 2025 15:43:39 +0800 Subject: [PATCH 2/4] sync0328 Signed-off-by: cxy251 --- .../component/ets/form_component.d.ts | 222 +++++++++++------- ...hos.app.form.FormEditExtensionAbility.d.ts | 3 +- api/@ohos.app.form.FormExtensionAbility.d.ts | 8 +- ...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.formProvider.d.ts | 2 + api/@ohos.application.formError.d.ts | 2 +- api/application/FormEditExtensionContext.d.ts | 4 +- api/application/FormExtensionContext.d.ts | 10 +- api/application/LiveFormExtensionContext.d.ts | 5 +- 11 files changed, 177 insertions(+), 112 deletions(-) diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index a0a4f51d16..3e9d4c6c3d 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 @@ -69,8 +79,9 @@ declare enum FormDimension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @deprecated since 20 */ - Dimension_2_1, + Dimension_2_1 = 4, /** * 1 x 1 cards @@ -78,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, @@ -87,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, @@ -105,27 +119,20 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 - */ - DIMENSION_3_3 = 9, - - /** - * 3 x 4 cards used for tv devices - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_4 = 10, + 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 { @@ -134,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, @@ -143,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, } @@ -151,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 { /** @@ -162,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, @@ -171,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, } @@ -182,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. @@ -201,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; @@ -211,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; @@ -221,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; @@ -231,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; @@ -241,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; @@ -251,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; @@ -265,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; @@ -281,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; } @@ -292,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; @@ -338,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; } @@ -349,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. @@ -368,7 +405,8 @@ 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; } @@ -376,33 +414,35 @@ interface FormCallbackInfo { /** * 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; } /** @@ -411,19 +451,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. @@ -432,7 +474,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; } @@ -441,7 +484,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 { /** @@ -455,13 +499,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -542,13 +591,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; @@ -569,7 +618,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -589,7 +639,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -604,13 +655,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; } 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 7faef1c38f..c7321cf67f 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -19,10 +19,14 @@ */ import formBindingData from './@ohos.app.form.formBindingData'; +/*** if arkts 1.1 */ 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. @@ -169,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 @@ -183,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.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 ab3638953e..12eb8ddc62 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.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 969b7cda1b..cfecd4eb15 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'; +/*** endif */ import Want from './@ohos.app.ability.Want'; /** diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 2bdd74bd99..e0a3fd4698 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 { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 diff --git a/api/application/FormEditExtensionContext.d.ts b/api/application/FormEditExtensionContext.d.ts index c236f8d1a0..86daad8f29 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,5 @@ 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..17b56c331f 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,5 @@ export default class FormExtensionContext extends ExtensionContext { */ disconnectServiceExtensionAbility(connection: number): Promise; } + +export default FormExtensionContext; \ No newline at end of file diff --git a/api/application/LiveFormExtensionContext.d.ts b/api/application/LiveFormExtensionContext.d.ts index dbc3bab3d5..9dbc7890d5 100644 --- a/api/application/LiveFormExtensionContext.d.ts +++ b/api/application/LiveFormExtensionContext.d.ts @@ -30,7 +30,7 @@ import ExtensionContext from './ExtensionContext'; * @atomicservice * @since 20 */ -export default class LiveFormExtensionContext extends ExtensionContext { +declare class LiveFormExtensionContext extends ExtensionContext { /** * Set the background image of the live form. * @@ -44,4 +44,5 @@ export default class LiveFormExtensionContext extends ExtensionContext { * @since 20 */ setBackgroundImage(res: Resource): Promise; -} \ No newline at end of file +} +export default LiveFormExtensionContext; -- Gitee From 13b0e77ede2f8e075a1be4d0f6685d5a21f5624d Mon Sep 17 00:00:00 2001 From: cxy251 Date: Mon, 7 Jul 2025 09:17:46 +0800 Subject: [PATCH 3/4] sync0328 Signed-off-by: cxy251 --- api/@ohos.app.form.formProvider.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index cfecd4eb15..02cf9ea01f 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -409,6 +409,20 @@ declare namespace formProvider { */ function getPublishedFormInfos(): Promise>; + /** + * Open the view of forms belonging to current bundle. + * Client to communication with FormManagerService. + * + * @param { Want } want - The want of the form to open. + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 18 + */ + function openFormManager(want: Want): void; + /** * Open the view of forms belonging to the specified bundle. * Client to communication with FormManagerService. @@ -443,20 +457,6 @@ declare namespace formProvider { */ function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void; - /** - * Open the view of forms belonging to current bundle. - * Client to communication with FormManagerService. - * - * @param { Want } want - The want of the form to open. - * @throws { BusinessError } 16500050 - IPC connection error. - * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. - * @throws { BusinessError } 16501000 - An internal functional error occurred. - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 18 - */ - function openFormManager(want: Want): void; - /** * Activate scene animation * -- Gitee From 5ebeb2ec4700d6021a47091ddebb3e8107c1f9de Mon Sep 17 00:00:00 2001 From: gaosix Date: Mon, 7 Jul 2025 17:06:04 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E9=9D=99=E6=80=81?= =?UTF-8?q?=E5=8C=96=E5=9B=9E=E5=90=880702=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gaosix --- api/@ohos.configPolicy.d.ts | 61 ++++++++++++----------- api/@ohos.customization.customConfig.d.ts | 5 +- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/api/@ohos.configPolicy.d.ts b/api/@ohos.configPolicy.d.ts index 30a15b2ab8..2bffaa511e 100644 --- a/api/@ohos.configPolicy.d.ts +++ b/api/@ohos.configPolicy.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ import { AsyncCallback } from './@ohos.base'; @@ -26,7 +27,7 @@ import { AsyncCallback } from './@ohos.base'; * @namespace configPolicy * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ declare namespace configPolicy { /** @@ -35,7 +36,7 @@ declare namespace configPolicy { * @enum { number } * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ export enum FollowXMode { /** @@ -43,7 +44,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ DEFAULT = 0, @@ -52,7 +53,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ NO_RULE_FOLLOWED = 1, @@ -61,7 +62,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_DEFAULT = 10, @@ -70,7 +71,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_1 = 11, @@ -79,7 +80,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_2 = 12, @@ -89,7 +90,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ USER_DEFINED = 100 } @@ -103,9 +104,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getOneCfgFile(relPath: string, callback: AsyncCallback); + function getOneCfgFile(relPath: string, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name in follow mode. @@ -117,9 +118,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getOneCfgFile(relPath: string, followMode: FollowXMode, callback: AsyncCallback); + function getOneCfgFile(relPath: string, followMode: FollowXMode, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name in follow mode. @@ -132,9 +133,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getOneCfgFile(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback); + function getOneCfgFile(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name. @@ -145,7 +146,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ function getOneCfgFile(relPath: string): Promise; @@ -160,7 +161,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getOneCfgFile(relPath: string, followMode: FollowXMode, extra?: string): Promise; @@ -175,7 +176,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getOneCfgFileSync(relPath: string, followMode?: FollowXMode, extra?: string): string; @@ -188,9 +189,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getCfgFiles(relPath: string, callback: AsyncCallback>); + function getCfgFiles(relPath: string, callback: AsyncCallback>): void; /** * Gets the config files in device architecture in follow mode, ordered by priority from low to high. @@ -202,9 +203,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getCfgFiles(relPath: string, followMode: FollowXMode, callback: AsyncCallback>); + function getCfgFiles(relPath: string, followMode: FollowXMode, callback: AsyncCallback>): void; /** * Gets the config files in device architecture in follow mode, ordered by priority from low to high. @@ -217,9 +218,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getCfgFiles(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback>); + function getCfgFiles(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback>): void; /** * Gets the config files in device architecture, ordered by priority from low to high. @@ -230,7 +231,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ function getCfgFiles(relPath: string): Promise>; @@ -245,7 +246,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getCfgFiles(relPath: string, followMode: FollowXMode, extra?: string): Promise>; @@ -260,7 +261,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getCfgFilesSync(relPath: string, followMode?: FollowXMode, extra?: string): Array; @@ -272,9 +273,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getCfgDirList(callback: AsyncCallback>); + function getCfgDirList(callback: AsyncCallback>): void; /** * Gets the config directory in the device architecture, ordered by priority from low to high. @@ -291,7 +292,7 @@ declare namespace configPolicy { * @returns { Promise> } the promise returns the list of configuration level directories. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ function getCfgDirList(): Promise>; @@ -310,7 +311,7 @@ declare namespace configPolicy { * @returns { Array } the list of configuration level directories. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ function getCfgDirListSync(): Array; } diff --git a/api/@ohos.customization.customConfig.d.ts b/api/@ohos.customization.customConfig.d.ts index 2717e05114..0dfc711b0c 100644 --- a/api/@ohos.customization.customConfig.d.ts +++ b/api/@ohos.customization.customConfig.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ /** @@ -31,7 +32,7 @@ * @namespace customConfig * @syscap SystemCapability.Customization.CustomConfig * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} */ declare namespace customConfig { @@ -48,7 +49,7 @@ declare namespace customConfig { * @returns { string } the channelId or empty if not exist. * @syscap SystemCapability.Customization.CustomConfig * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} */ function getChannelId(): string; -- Gitee