diff --git a/api/@ohos.app.ability.AtomicServiceOptions.d.ts b/api/@ohos.app.ability.AtomicServiceOptions.d.ts index 11e0f24b8c577f79578e530497cb87669a0c9589..c546facc740214a65b048479db08762e103a725c 100644 --- a/api/@ohos.app.ability.AtomicServiceOptions.d.ts +++ b/api/@ohos.app.ability.AtomicServiceOptions.d.ts @@ -20,6 +20,18 @@ import StartOptions from './@ohos.app.ability.StartOptions'; +/** + * RecordData is used for input parameter obj of the parameters function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * AtomicServiceOptions is the basic communication component of the system. * @@ -50,8 +62,19 @@ export default class AtomicServiceOptions extends StartOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ parameters?: Record; + + /** + * The description of the WantParams object in an AtomicServiceOptions + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + parameters?: RecordData; } \ No newline at end of file diff --git a/api/@ohos.app.ability.InsightIntentExecutor.d.ts b/api/@ohos.app.ability.InsightIntentExecutor.d.ts index c96abb0f0aba40a2000adcc5b70da206e728d947..d667214a9d4fc964f11574fb70ea159533b03596 100644 --- a/api/@ohos.app.ability.InsightIntentExecutor.d.ts +++ b/api/@ohos.app.ability.InsightIntentExecutor.d.ts @@ -23,6 +23,18 @@ import type insightIntent from './@ohos.app.ability.insightIntent'; import type InsightIntentContext from './@ohos.app.ability.InsightIntentContext'; import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession'; +/** + * RecordData is used for input parameter obj of functions + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * The class of insight intent executor. * @@ -55,12 +67,27 @@ declare class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onExecuteInUIAbilityForegroundMode(name: string, param: Record, pageLoader: window.WindowStage): insightIntent.ExecuteResult | Promise; + /** + * Called when a UIAbility executes the insight intent in the foreground. + * + * @param { string } name - Indicates the insight intent name. + * @param { RecordData } param - Indicates the insight intent parameters. + * @param { window.WindowStage } pageLoader - Indicates the page loader. + * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onExecuteInUIAbilityForegroundMode(name: string, param: RecordData, pageLoader: window.WindowStage): + insightIntent.ExecuteResult | Promise; + /** * Called when a UIAbility executes the insight intent in the background. * @@ -70,12 +97,26 @@ declare class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onExecuteInUIAbilityBackgroundMode(name: string, param: Record): insightIntent.ExecuteResult | Promise; + /** + * Called when a UIAbility executes the insight intent in the background. + * + * @param { string } name - Indicates the insight intent name. + * @param { RecordData } param - Indicates the insight intent parameters. + * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onExecuteInUIAbilityBackgroundMode(name: string, param: RecordData): + insightIntent.ExecuteResult | Promise; + /** * Called when a UIExtensionAbility executes the insight intent. * @@ -85,12 +126,26 @@ declare class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onExecuteInUIExtensionAbility(name: string, param: Record, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult | Promise; + /** + * Called when a UIExtensionAbility executes the insight intent. + * + * @param { string } name - Indicates the insight intent name. + * @param { RecordData } param - Indicates the insight intent parameters. + * @param { UIExtensionContentSession } pageLoader - Indicates the page loader. + * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @since 20 + * @arkts 1.2 + */ + onExecuteInUIExtensionAbility(name: string, param: RecordData, pageLoader: UIExtensionContentSession): + insightIntent.ExecuteResult | Promise; + /** * Called when a ServiceExtensionAbility executes the insight intent. * @@ -99,11 +154,24 @@ declare class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onExecuteInServiceExtensionAbility(name: string, param: Record): insightIntent.ExecuteResult | Promise; + + /** + * Called when a ServiceExtensionAbility executes the insight intent. + * + * @param { string } name - Indicates the insight intent name. + * @param { RecordData } param - Indicates the insight intent parameters. + * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @since 20 + * @arkts 1.2 + */ + onExecuteInServiceExtensionAbility(name: string, param: RecordData): + insightIntent.ExecuteResult | Promise; } export default InsightIntentExecutor; \ No newline at end of file diff --git a/api/@ohos.app.ability.OpenLinkOptions.d.ts b/api/@ohos.app.ability.OpenLinkOptions.d.ts index 63873b4f2c5d3eedc833a89db84a6641e0c077fe..af62dc8d927003630ae95e5dc523dd7499a8579c 100644 --- a/api/@ohos.app.ability.OpenLinkOptions.d.ts +++ b/api/@ohos.app.ability.OpenLinkOptions.d.ts @@ -18,6 +18,18 @@ * @kit AbilityKit */ +/** + * RecordData is used for input parameter obj of the parameters function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * Define the available options for openLink API. * @@ -49,8 +61,19 @@ export default interface OpenLinkOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ parameters?: Record; + + /** + * OpenLinkOptions parameters in the form of custom key-value pairs. + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + parameters?: RecordData; } diff --git a/api/@ohos.app.ability.UIExtensionContentSession.d.ts b/api/@ohos.app.ability.UIExtensionContentSession.d.ts index bd9c0479e1aa5758540a2694d00fbf27beaad389..59d9d019f54fc954c523da37fca522096d190d77 100644 --- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts +++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts @@ -32,6 +32,18 @@ import { AbilityResult } from './ability/abilityResult'; import { LocalStorage } from '@ohos.arkui.stateManagement'; /*** endif */ +/** + * RecordData is used for input parameter obj of functions + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * class of ui extension content session. * @@ -65,11 +77,26 @@ declare class UIExtensionContentSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sendData(data: Record): void; + /** + * Send data from an ui extension to an ui extension component. + * + * @param { RecordData } data - Indicates the data send to ui extension component. + * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + sendData(data: RecordData): void; + /** * Sets the callback for the ui extension to receive data from an ui extension component. * @@ -81,11 +108,26 @@ declare class UIExtensionContentSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ setReceiveDataCallback(callback: (data: Record) => void): void; + /** + * Sets the callback for the ui extension to receive data from an ui extension component. + * + * @param { function } callback - Indicates the receive data callback to set. + * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + setReceiveDataCallback(callback: (data: RecordData) => void): void; + /** * Sets the callback with return value for the ui extension to receive data from an ui extension component. * @@ -97,11 +139,26 @@ declare class UIExtensionContentSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setReceiveDataForResultCallback(callback: (data: Record) => Record): void; + /** + * Sets the callback with return value for the ui extension to receive data from an ui extension component. + * + * @param { function } callback - Indicates the receive data callback to set. + * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + setReceiveDataForResultCallback(callback: (data: RecordData) => Record): void; + /** * Loads an UI extension content. * @@ -587,12 +644,30 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void; + /** + * Starts the UIAbility or UIExtensionAbility by type. + * If the caller application is in the background, it is not allowed to call this interface. + * + * @param { string } type - The type of target ability. + * @param { RecordData } wantParam - Indicates the want parameter. + * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback. + * @param { AsyncCallback } callback - The callback of startAbility. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + startAbilityByType(type: string, wantParam: RecordData, + abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void; + /** * Starts the UIAbility or UIExtensionAbility by type. * If the target ability is visible, you can start the target ability; If the target ability is invisible, @@ -627,12 +702,30 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback): Promise; + /** + * Starts the UIAbility or UIExtensionAbility by type. + * If the caller application is in the background, it is not allowed to call this interface. + * + * @param { string } type - The type of target ability. + * @param { RecordData } wantParam - Indicates the want parameter. + * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback. + * @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. + * @throws { BusinessError } 16000050 - Internal error. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + startAbilityByType(type: string, wantParam: RecordData, + abilityStartCallback: AbilityStartCallback): Promise; + /** * Get the UIExtension Host Window proxy. * diff --git a/api/@ohos.app.ability.Want.d.ts b/api/@ohos.app.ability.Want.d.ts index 3f97d2f34cfd195d3061e8bc90abcce50481422e..057b18586b3fd4f510b83ce033f342789a1440ac 100644 --- a/api/@ohos.app.ability.Want.d.ts +++ b/api/@ohos.app.ability.Want.d.ts @@ -18,6 +18,18 @@ * @kit AbilityKit */ +/** + * RecordData is used for input parameter obj of the parameters function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * Want is the basic communication component of the system. * @@ -298,11 +310,81 @@ export default class Want { * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ parameters?: Record; + /** + * List of parameters in the Want object. + * + *

**NOTE**: + *
1. The values of the following keys are assigned by the system. Manual settings do not take effect, since the + * system automatically changes the values to the actual values during data transfer. + * -ohos.aafwk.param.callerPid: PID of the caller. The value is a string. + * -ohos.aafwk.param.callerBundleName: bundle name of the caller. The value is a string. + * -ohos.aafwk.param.callerAbilityName: ability name of the caller. The value is a string. + * -ohos.aafwk.param.callerNativeName: process name of the caller when the native method is called. The value is + * a string. + * -ohos.aafwk.param.callerAppId: appId of the caller. The value is a string. + * -ohos.aafwk.param.callerAppIdentifier: appIdentifier of the caller. The value is a string. + * -ohos.aafwk.param.callerToken: token of the caller. The value is a string. + * -ohos.aafwk.param.callerUid: UID in BundleInfo, that is, the application's UID in the bundle information. The + * value is a number. + * -ohos.param.callerAppCloneIndex: clone index of the caller. The value is of the numeric type. + * -component.startup.newRules: enabled status of the new control rule. The value is of the Boolean type. + * -moduleName: module name of the caller. The value is a string. + * -ability.params.backToOtherMissionStack: support for redirection back across mission stacks. The value is of + * the Boolean type. + * -ohos.ability.params.abilityRecoveryRestart: support for ability restart upon fault recovery. The value is of + * the Boolean type. + * -ohos.extra.param.key.contentTitle: title that can be shared by the atomic service. The value is a string. + * -ohos.extra.param.key.shareAbstract: content that can be shared by the atomic service. The value is a string. + * -ohos.extra.param.key.shareUrl: URL of the content that can be shared by the atomic service. The value is + * a string. + * -ohos.extra.param.key.supportContinuePageStack: support for migration of page stack information during + * cross-device migration. The value is of the Boolean type. The default value is true, indicating that page stack + * information is automatically migrated. + * -ohos.extra.param.key.supportContinueSourceExit: support for application exit on the source device during + * cross-device migration. The value is of the Boolean type. The default value is true, indicating that the + * application on the source device automatically exits. + * -ohos.extra.param.key.showMode: mode to show the atomic service startup. The value is an enumerated value of + * wantConstant.ShowMode. + * -ohos.dlp.params.sandbox: available only for DLP files. This key is involved only in system applications. + * -ohos.dlp.params.bundleName: bundle name of DLP. The value is a string. This key is involved only in system + * applications. + * -ohos.dlp.params.moduleName: module name of DLP. The value is a string. This key is involved only in system + * applications. + * -ohos.dlp.params.abilityName: ability name of DLP. The value is a string. This key is involved only in system + * applications. + * -ohos.dlp.params.index: DLP index. The value is a number. This key is involved only in system applications. + * -ohos.ability.params.asssertFaultSessionId: session ID of the fault assertion. The value is a string. This key + * is involved only in system applications. + * + *
2. The following keys are defined by the system, and their values need to be manually assigned. + * -ability.params.stream: File URIs to be authorized to the target ability. The value is a file URI array of the + * string type. + * -ohos.extra.param.key.appCloneIndex: index of the application clone. + * + *
3. In addition to the foregoing cases, applications may further agree on the key-value pairs to transfer. + *

+ * + *

**NOTE**: + *
For details about the constants of Params in want, see wantConstant. + *
Note that a maximum of 200 KB data that can be transferred by using WantParams. If the data volume exceeds + * 200 KB, transfer data in WriteRawDataBuffer or uri mode. + *
The values of parameters must be of the following basic data types: String, Number, Boolean, Object, + * undefined, and null. Functions in an object cannot be transferred. + *

+ * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityBase + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + parameters?: RecordData; + /** * The description of a entities in a Want. * diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts index 0937b499060c3a0f1aaa9e5af5ac810410fea73b..e917b51b4807ec78a8f51050fa0dd9785ab755aa 100644 --- a/api/@ohos.app.ability.insightIntent.d.ts +++ b/api/@ohos.app.ability.insightIntent.d.ts @@ -21,6 +21,18 @@ import Want from './@ohos.app.ability.Want'; import type wantConstant from './@ohos.app.ability.wantConstant'; +/** + * RecordData is used for input parameter obj of the result function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * interface of insightIntent. * @@ -117,11 +129,22 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ result?: Record; + /** + * Indicates execute result. + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + result?: RecordData; + /** * Indicates the URIs will be authorized to the insight intent driver. * diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts index 7aac48bfcb970470be261e5f3d6e05d0f831a2e5..538dec692130cc25c2db95dfa448deb7ec8890ce 100644 --- a/api/@ohos.app.ability.insightIntentDriver.d.ts +++ b/api/@ohos.app.ability.insightIntentDriver.d.ts @@ -23,6 +23,18 @@ import wantConstant from './@ohos.app.ability.wantConstant'; import type { AsyncCallback } from './@ohos.base'; import type insightIntent from './@ohos.app.ability.insightIntent'; +/** + * RecordData is used for input parameter obj of the insightIntentParam function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * Insight intent driver. * @@ -100,11 +112,22 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ insightIntentParam: Record; + /** + * Indicates the insight intent param. + * + * @type { RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @StageModelOnly + * @since 20 + * @arkts 1.2 + */ + insightIntentParam: RecordData; + /** * Indicates the execute mode. * diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index c06e02e9fb1616b147e9c5ff6c813ad855eefd23..17a5a395d7a9c92038790d0e82e52b910626427b 100644 --- a/api/@ohos.app.ability.wantAgent.d.ts +++ b/api/@ohos.app.ability.wantAgent.d.ts @@ -27,6 +27,17 @@ import Context from './application/Context'; import { LocalWantAgentInfo as _LocalWantAgentInfo } from './wantAgent/wantAgentInfo'; /*** endif */ +/** + * RecordData is used for input parameter obj of functions + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * Provide the method obtain trigger, cancel, and compare and to obtain * the bundle name, UID of an WantAgent object. @@ -970,10 +981,20 @@ declare namespace wantAgent { * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ extraInfo?: Record; + + /** + * Extra information. + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + extraInfo?: RecordData; } /** diff --git a/api/application/CustomData.d.ts b/api/application/CustomData.d.ts index e05cd5db66fc43e05f4997ea22c335c61733221f..1ebce327a9d51cd7eb13676cd9ebc9d37bf6be1b 100644 --- a/api/application/CustomData.d.ts +++ b/api/application/CustomData.d.ts @@ -18,6 +18,18 @@ * @kit AbilityKit */ +/** + * RecordData is used for input parameter obj of the parameters function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * User defined data. When the modal window of AutoFillExtension needs to be raised again, * pass this parameter to the application framework and bring it back to the developer through FillRequest. @@ -27,7 +39,8 @@ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi * @stagemodelonly - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ export default interface CustomData { /** @@ -41,4 +54,17 @@ export default interface CustomData { * @since 13 */ data: Record; + + /** + * User defined data. When the modal window of AutoFillExtension needs to be raised again, + * pass this parameter to the application framework. + * + * @type { RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @systemapi + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + data: RecordData; } \ No newline at end of file diff --git a/api/application/UIAbilityContext.d.ts b/api/application/UIAbilityContext.d.ts index 235db32ce69a05f29e705ead6205b4057c3a768f..28bea7c3ad53813995a549ffadfc5e52150b379b 100644 --- a/api/application/UIAbilityContext.d.ts +++ b/api/application/UIAbilityContext.d.ts @@ -44,6 +44,18 @@ import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectC import { LocalStorage } from '@ohos.arkui.stateManagement'; /*** endif */ +/** + * RecordData is used for input parameter obj of functions + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * The context of an ability. It allows access to ability-specific resources. * @@ -4508,12 +4520,37 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void; + /** + * Starts the UIAbility or UIExtensionAbility by type. + * If the target ability is visible, you can start the target ability; If the target ability is invisible, + * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability. + * + * @param { string } type - The type of target ability. + * @param { RecordData } wantParam - Indicates the want parameter. + * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback. + * @param { AsyncCallback } callback - The callback of startAbility. + * @throws { BusinessError } 201 - The application does not have permission to call the interface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. + *
2.Incorrect parameter types. + * @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 } 16000050 - Internal error. + * @throws { BusinessError } 16200001 - The caller has been released. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startAbilityByType(type: string, wantParam: RecordData, + abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void; + /** * Starts the UIAbility or UIExtensionAbility by type. * If the target ability is visible, you can start the target ability; If the target ability is invisible, @@ -4550,12 +4587,37 @@ declare class UIAbilityContext extends Context { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback): Promise; + /** + * Starts the UIAbility or UIExtensionAbility by type. + * If the target ability is visible, you can start the target ability; If the target ability is invisible, + * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability. + * + * @param { string } type - The type of target ability. + * @param { RecordData } wantParam - Indicates the want parameter. + * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - The application does not have permission to call the interface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. + *
2.Incorrect parameter types. + * @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 } 16000050 - Internal error. + * @throws { BusinessError } 16200001 - The caller has been released. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startAbilityByType(type: string, wantParam: RecordData, + abilityStartCallback: AbilityStartCallback): Promise; + /** * Requests the Modal UIExtensionAbility. * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible, diff --git a/api/wantAgent/triggerInfo.d.ts b/api/wantAgent/triggerInfo.d.ts index 8562e2f9dc7334ef36eb48cba40cd88f86871d41..1e441041e5e3b9fb229208dbcebb28829207b55b 100644 --- a/api/wantAgent/triggerInfo.d.ts +++ b/api/wantAgent/triggerInfo.d.ts @@ -21,6 +21,17 @@ import Want from '../@ohos.app.ability.Want'; import StartOptions from '../@ohos.app.ability.StartOptions'; +/** + * RecordData is used for input parameter obj of the extraInfos function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; + /** * Provides the information required for triggering a WantAgent. * @@ -126,12 +137,12 @@ export interface TriggerInfo { /** * Custom extra data you want to add for triggering a WantAgent. * - * @type { ?Record } + * @type { ?RecordData } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 20 * @arkts 1.2 */ - extraInfo?: Record; + extraInfo?: RecordData; /** * Custom extra data you want to add for triggering a WantAgent. @@ -148,11 +159,22 @@ export interface TriggerInfo { * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ extraInfos?: Record; + /** + * Custom extra data you want to add for triggering a WantAgent. + * The ability of this property is same as extraInfo. If both are set, this property will be used. + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + extraInfos?: RecordData; + /** * Specific options for triggering a wantagent which is used for starting an ability. * diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts index 7f5bcb93ba4963b32e7a37ce315dfb6ee6cd7482..e64ae93f056da6554da7aa471352b5507a7f3f56 100644 --- a/api/wantAgent/wantAgentInfo.d.ts +++ b/api/wantAgent/wantAgentInfo.d.ts @@ -24,6 +24,16 @@ import wantAgent from '../@ohos.wantAgent'; /*** endif */ import type abilityWantAgent from '../@ohos.app.ability.wantAgent'; +/** + * RecordData is used for input parameter obj of the extraInfos function + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type RecordData = undefined | null | Object | Record | Array; /** * Provides the information required for triggering a WantAgent. @@ -179,12 +189,12 @@ export interface WantAgentInfo { * Extra information about how the Want starts an ability. * If there is no extra information to set, this constant can be left empty. * - * @type { ?Record } + * @type { ?RecordData } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @since 20 * @arkts 1.2 */ - extraInfo?: Record; + extraInfo?: RecordData; /** * Extra information about how the Want starts an ability. @@ -203,10 +213,22 @@ export interface WantAgentInfo { * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ extraInfos?: Record; + + /** + * Extra information about how the Want starts an ability. + * If there is no extra information to set, this constant can be left empty. + * The ability of this property is same as extraInfo. If both are set, this property will be used. + * + * @type { ?RecordData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + extraInfos?: RecordData; } /**