161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkUI
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * Enumeration of different types of DpiFollowStrategy.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @enum { number }
2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
2661847f8eSopenharmony_ci * @systemapi
2761847f8eSopenharmony_ci * @since 12
2861847f8eSopenharmony_ci */
2961847f8eSopenharmony_cideclare enum DpiFollowStrategy {
3061847f8eSopenharmony_ci  /**
3161847f8eSopenharmony_ci   * Followed the host DPI.
3261847f8eSopenharmony_ci   *
3361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
3461847f8eSopenharmony_ci   * @systemapi
3561847f8eSopenharmony_ci   * @since 12
3661847f8eSopenharmony_ci   */
3761847f8eSopenharmony_ci  FOLLOW_HOST_DPI = 0,
3861847f8eSopenharmony_ci
3961847f8eSopenharmony_ci  /**
4061847f8eSopenharmony_ci   * Followed the UIExtensionAbility.
4161847f8eSopenharmony_ci   *
4261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
4361847f8eSopenharmony_ci   * @systemapi
4461847f8eSopenharmony_ci   * @since 12
4561847f8eSopenharmony_ci   */
4661847f8eSopenharmony_ci  FOLLOW_UI_EXTENSION_ABILITY_DPI = 1,
4761847f8eSopenharmony_ci}
4861847f8eSopenharmony_ci
4961847f8eSopenharmony_ci/**
5061847f8eSopenharmony_ci * This interface is used to set the options for UIExtensionComponentAttribute during construction
5161847f8eSopenharmony_ci *
5261847f8eSopenharmony_ci * @interface UIExtensionOptions
5361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
5461847f8eSopenharmony_ci * @systemapi
5561847f8eSopenharmony_ci * @since 11
5661847f8eSopenharmony_ci */
5761847f8eSopenharmony_cideclare interface UIExtensionOptions {
5861847f8eSopenharmony_ci  /**
5961847f8eSopenharmony_ci   * Set whether the current capability is used as a Caller.<br/>
6061847f8eSopenharmony_ci   * If set to true, as a Caller, the current token of UIExtensionComponent is set to rootToken.
6161847f8eSopenharmony_ci   *
6261847f8eSopenharmony_ci   * @type { ?boolean }
6361847f8eSopenharmony_ci   * @default false
6461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
6561847f8eSopenharmony_ci   * @systemapi
6661847f8eSopenharmony_ci   * @since 11
6761847f8eSopenharmony_ci   */
6861847f8eSopenharmony_ci  isTransferringCaller?: boolean;
6961847f8eSopenharmony_ci
7061847f8eSopenharmony_ci  /**
7161847f8eSopenharmony_ci   * Set placeholder.
7261847f8eSopenharmony_ci   * If set placeholder ComponentContent, show placeholder node when connection is not established.
7361847f8eSopenharmony_ci   *
7461847f8eSopenharmony_ci   * @type { ?ComponentContent }
7561847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
7661847f8eSopenharmony_ci   * @systemapi
7761847f8eSopenharmony_ci   * @since 12
7861847f8eSopenharmony_ci   */
7961847f8eSopenharmony_ci  placeholder?: ComponentContent;
8061847f8eSopenharmony_ci
8161847f8eSopenharmony_ci  /**
8261847f8eSopenharmony_ci   * Set Areachange placeholder.
8361847f8eSopenharmony_ci   * If the Areachange placeholder ComponentContent is set, the placeholder node is displayed until
8461847f8eSopenharmony_ci   * the UIExtensionComponent size change is complete.
8561847f8eSopenharmony_ci   *
8661847f8eSopenharmony_ci   * @type { ?Record<string, ComponentContent> }
8761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
8861847f8eSopenharmony_ci   * @systemapi
8961847f8eSopenharmony_ci   * @since 13
9061847f8eSopenharmony_ci   */
9161847f8eSopenharmony_ci  areaChangePlaceholder?: Record<string, ComponentContent>;
9261847f8eSopenharmony_ci
9361847f8eSopenharmony_ci  /**
9461847f8eSopenharmony_ci   * Set UIExtensionComponent Content Dpi Follow Strategy.
9561847f8eSopenharmony_ci   *
9661847f8eSopenharmony_ci   * @type { ?DpiFollowStrategy }
9761847f8eSopenharmony_ci   * @default DpiFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_DPI
9861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
9961847f8eSopenharmony_ci   * @systemapi
10061847f8eSopenharmony_ci   * @since 12
10161847f8eSopenharmony_ci   */
10261847f8eSopenharmony_ci  dpiFollowStrategy?: DpiFollowStrategy;
10361847f8eSopenharmony_ci}
10461847f8eSopenharmony_ci
10561847f8eSopenharmony_ci/**
10661847f8eSopenharmony_ci * Indicates the information when the provider of the embedded UI is terminated.
10761847f8eSopenharmony_ci *
10861847f8eSopenharmony_ci * @interface TerminationInfo
10961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
11061847f8eSopenharmony_ci * @systemapi
11161847f8eSopenharmony_ci * @since 12
11261847f8eSopenharmony_ci */
11361847f8eSopenharmony_cideclare interface TerminationInfo {
11461847f8eSopenharmony_ci  /**
11561847f8eSopenharmony_ci   * Defines the termination code.
11661847f8eSopenharmony_ci   *
11761847f8eSopenharmony_ci   * @type { number }
11861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
11961847f8eSopenharmony_ci   * @systemapi
12061847f8eSopenharmony_ci   * @since 12
12161847f8eSopenharmony_ci   */
12261847f8eSopenharmony_ci   code: number;
12361847f8eSopenharmony_ci
12461847f8eSopenharmony_ci  /**
12561847f8eSopenharmony_ci   * Defines the additional termination information.
12661847f8eSopenharmony_ci   *
12761847f8eSopenharmony_ci   * @type { ?import('../api/@ohos.app.ability.Want').default }
12861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
12961847f8eSopenharmony_ci   * @systemapi
13061847f8eSopenharmony_ci   * @since 12
13161847f8eSopenharmony_ci   */
13261847f8eSopenharmony_ci   want?: import('../api/@ohos.app.ability.Want').default;
13361847f8eSopenharmony_ci}
13461847f8eSopenharmony_ci
13561847f8eSopenharmony_ci/**
13661847f8eSopenharmony_ci * Get Callback from @ohos.base.
13761847f8eSopenharmony_ci *
13861847f8eSopenharmony_ci * @typedef { import('../api/@ohos.base').Callback<Record<string, Object>> }
13961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
14061847f8eSopenharmony_ci * @systemapi
14161847f8eSopenharmony_ci * @since 14
14261847f8eSopenharmony_ci */
14361847f8eSopenharmony_cideclare type ReceiveCallback = import('../api/@ohos.base').Callback<Record<string, Object>>;
14461847f8eSopenharmony_ci
14561847f8eSopenharmony_ci/**
14661847f8eSopenharmony_ci * This interface is used for send data to the UIExtensionAbility.<br/>
14761847f8eSopenharmony_ci * It is returned from onRemoteReady callback of UIExtensionComponent<br/>
14861847f8eSopenharmony_ci * when UIExtensionAbility connects successfully
14961847f8eSopenharmony_ci *
15061847f8eSopenharmony_ci * @interface UIExtensionProxy
15161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
15261847f8eSopenharmony_ci * @systemapi
15361847f8eSopenharmony_ci * @since 10
15461847f8eSopenharmony_ci */
15561847f8eSopenharmony_cideclare interface UIExtensionProxy {
15661847f8eSopenharmony_ci  /**
15761847f8eSopenharmony_ci   * This function is for sending data to the UIExtensionAbility.
15861847f8eSopenharmony_ci   *
15961847f8eSopenharmony_ci   * @param { object } data
16061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
16161847f8eSopenharmony_ci   * @systemapi
16261847f8eSopenharmony_ci   * @since 10
16361847f8eSopenharmony_ci   */
16461847f8eSopenharmony_ci  /**
16561847f8eSopenharmony_ci   * This function is for sending data to the UIExtensionAbility.
16661847f8eSopenharmony_ci   *
16761847f8eSopenharmony_ci   * @param { Record<string, Object> } data
16861847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
16961847f8eSopenharmony_ci   * @systemapi
17061847f8eSopenharmony_ci   * @since 14
17161847f8eSopenharmony_ci   */
17261847f8eSopenharmony_ci  send(data: Record<string, Object>): void;
17361847f8eSopenharmony_ci
17461847f8eSopenharmony_ci  /**
17561847f8eSopenharmony_ci   * This function is for sending data to the UIExtensionAbility and waiting the result in blocking mode.
17661847f8eSopenharmony_ci   *
17761847f8eSopenharmony_ci   * @param { object } data - data send to the UIExtensionAbility
17861847f8eSopenharmony_ci   * @returns { object } data - data transferred from the UIExtensionAbility
17961847f8eSopenharmony_ci   * @throws { BusinessError } 100011 - No callback has been registered to response this request.
18061847f8eSopenharmony_ci   * @throws { BusinessError } 100012 - Transferring data failed.
18161847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
18261847f8eSopenharmony_ci   * @systemapi
18361847f8eSopenharmony_ci   * @since 11
18461847f8eSopenharmony_ci   */
18561847f8eSopenharmony_ci  /**
18661847f8eSopenharmony_ci   * This function is for sending data to the UIExtensionAbility and waiting the result in blocking mode.
18761847f8eSopenharmony_ci   *
18861847f8eSopenharmony_ci   * @param { Record<string, Object> } data - Data send to the UIExtensionAbility.
18961847f8eSopenharmony_ci   * @returns { Record<string, Object> } data - Data transferred from the UIExtensionAbility.
19061847f8eSopenharmony_ci   * @throws { BusinessError } 100011 - No callback has been registered to response this request.
19161847f8eSopenharmony_ci   * @throws { BusinessError } 100012 - Transferring data failed.
19261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
19361847f8eSopenharmony_ci   * @systemapi
19461847f8eSopenharmony_ci   * @since 14
19561847f8eSopenharmony_ci   */
19661847f8eSopenharmony_ci  sendSync(data: Record<string, Object>): Record<string, Object>;
19761847f8eSopenharmony_ci
19861847f8eSopenharmony_ci  /**
19961847f8eSopenharmony_ci   * Register the listener that watches for async data receiver callback being registered by UIExtensionAbility.
20061847f8eSopenharmony_ci   *
20161847f8eSopenharmony_ci   * @param { 'asyncReceiverRegister' } type - Indicates the type of event.
20261847f8eSopenharmony_ci   * @param { function } callback - callback of the listened event.
20361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
20461847f8eSopenharmony_ci   * @systemapi
20561847f8eSopenharmony_ci   * @since 11
20661847f8eSopenharmony_ci   */
20761847f8eSopenharmony_ci  /**
20861847f8eSopenharmony_ci   * Register the listener that watches for async data receiver callback being registered by UIExtensionAbility.
20961847f8eSopenharmony_ci   *
21061847f8eSopenharmony_ci   * @param { 'asyncReceiverRegister' } type - Indicates the type of event.
21161847f8eSopenharmony_ci   * @param { Callback<UIExtensionProxy> } callback - Callback of the listened event.
21261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
21361847f8eSopenharmony_ci   * @systemapi
21461847f8eSopenharmony_ci   * @since 14
21561847f8eSopenharmony_ci   */
21661847f8eSopenharmony_ci  on(type: 'asyncReceiverRegister', callback: Callback<UIExtensionProxy>): void;
21761847f8eSopenharmony_ci
21861847f8eSopenharmony_ci  /**
21961847f8eSopenharmony_ci   * Register the listener that watches for sync data receiver callback being registered by UIExtensionAbility.
22061847f8eSopenharmony_ci   *
22161847f8eSopenharmony_ci   * @param { 'syncReceiverRegister' } type - Indicates the type of event.
22261847f8eSopenharmony_ci   * @param { function } callback - callback of the listened event.
22361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
22461847f8eSopenharmony_ci   * @systemapi
22561847f8eSopenharmony_ci   * @since 11
22661847f8eSopenharmony_ci   */
22761847f8eSopenharmony_ci  /**
22861847f8eSopenharmony_ci   * Register the listener that watches for sync data receiver callback being registered by UIExtensionAbility.
22961847f8eSopenharmony_ci   *
23061847f8eSopenharmony_ci   * @param { 'syncReceiverRegister' } type - Indicates the type of event.
23161847f8eSopenharmony_ci   * @param { Callback<UIExtensionProxy> } callback - Callback of the listened event.
23261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
23361847f8eSopenharmony_ci   * @systemapi
23461847f8eSopenharmony_ci   * @since 14
23561847f8eSopenharmony_ci   */
23661847f8eSopenharmony_ci  on(type: 'syncReceiverRegister', callback: Callback<UIExtensionProxy>): void;
23761847f8eSopenharmony_ci
23861847f8eSopenharmony_ci  /**
23961847f8eSopenharmony_ci   * Deregisters the listener that watches for async data receiver callback being registered by UIExtensionAbility.
24061847f8eSopenharmony_ci   *
24161847f8eSopenharmony_ci   * @param { 'asyncReceiverRegister' } type - type of the listened event.
24261847f8eSopenharmony_ci   * @param { function } callback - callback of the listened event.
24361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
24461847f8eSopenharmony_ci   * @systemapi
24561847f8eSopenharmony_ci   * @since 11
24661847f8eSopenharmony_ci   */
24761847f8eSopenharmony_ci  /**
24861847f8eSopenharmony_ci   * Deregisters the listener that watches for async data receiver callback being registered by UIExtensionAbility.
24961847f8eSopenharmony_ci   *
25061847f8eSopenharmony_ci   * @param { 'asyncReceiverRegister' } type - Type of the listened event.
25161847f8eSopenharmony_ci   * @param { Callback<UIExtensionProxy> } [callback] - Callback of the listened event.
25261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
25361847f8eSopenharmony_ci   * @systemapi
25461847f8eSopenharmony_ci   * @since 14
25561847f8eSopenharmony_ci   */
25661847f8eSopenharmony_ci  off(type: 'asyncReceiverRegister', callback?: Callback<UIExtensionProxy>): void;
25761847f8eSopenharmony_ci
25861847f8eSopenharmony_ci  /**
25961847f8eSopenharmony_ci   * Deregisters the listener that watches for sync data receiver callback being registered by UIExtensionAbility.
26061847f8eSopenharmony_ci   *
26161847f8eSopenharmony_ci   * @param { 'syncReceiverRegister' } type - type of the listened event.
26261847f8eSopenharmony_ci   * @param { function } callback - callback of the listened event.
26361847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
26461847f8eSopenharmony_ci   * @systemapi
26561847f8eSopenharmony_ci   * @since 11
26661847f8eSopenharmony_ci   */
26761847f8eSopenharmony_ci  /**
26861847f8eSopenharmony_ci   * Deregisters the listener that watches for sync data receiver callback being registered by UIExtensionAbility.
26961847f8eSopenharmony_ci   *
27061847f8eSopenharmony_ci   * @param { 'syncReceiverRegister' } type - Type of the listened event.
27161847f8eSopenharmony_ci   * @param { Callback<UIExtensionProxy> } [callback] - Callback of the listened event.
27261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
27361847f8eSopenharmony_ci   * @systemapi
27461847f8eSopenharmony_ci   * @since 14
27561847f8eSopenharmony_ci   */
27661847f8eSopenharmony_ci  off(type: 'syncReceiverRegister', callback?: Callback<UIExtensionProxy>): void;
27761847f8eSopenharmony_ci}
27861847f8eSopenharmony_ci
27961847f8eSopenharmony_ci/**
28061847f8eSopenharmony_ci * Provide an interface for the UIExtensionComponent, which is used
28161847f8eSopenharmony_ci * <br/>to render UI of a remote UIExtensionAbility
28261847f8eSopenharmony_ci *
28361847f8eSopenharmony_ci * @interface UIExtensionComponentInterface
28461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
28561847f8eSopenharmony_ci * @systemapi
28661847f8eSopenharmony_ci * @since 10
28761847f8eSopenharmony_ci */
28861847f8eSopenharmony_ciinterface UIExtensionComponentInterface {
28961847f8eSopenharmony_ci  /**
29061847f8eSopenharmony_ci   * Construct the UIExtensionComponent.<br/>
29161847f8eSopenharmony_ci   * Called when the UIExtensionComponent is used.
29261847f8eSopenharmony_ci   *
29361847f8eSopenharmony_ci   * @param { import('../api/@ohos.app.ability.Want').default } want - indicates the want of UIExtensionAbility
29461847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
29561847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
29661847f8eSopenharmony_ci   * @systemapi
29761847f8eSopenharmony_ci   * @since 10
29861847f8eSopenharmony_ci   */
29961847f8eSopenharmony_ci  /**
30061847f8eSopenharmony_ci   * Construct the UIExtensionComponent.<br/>
30161847f8eSopenharmony_ci   * Called when the UIExtensionComponent is used.
30261847f8eSopenharmony_ci   *
30361847f8eSopenharmony_ci   * @param { import('../api/@ohos.app.ability.Want').default } want - indicates the want of UIExtensionAbility
30461847f8eSopenharmony_ci   * @param { UIExtensionOptions } [options] - Construction configuration of UIExtensionComponentAttribute
30561847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
30661847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
30761847f8eSopenharmony_ci   * @systemapi
30861847f8eSopenharmony_ci   * @since 11
30961847f8eSopenharmony_ci   */
31061847f8eSopenharmony_ci  (
31161847f8eSopenharmony_ci    want: import('../api/@ohos.app.ability.Want').default,
31261847f8eSopenharmony_ci    options?: UIExtensionOptions
31361847f8eSopenharmony_ci  ): UIExtensionComponentAttribute;
31461847f8eSopenharmony_ci}
31561847f8eSopenharmony_ci
31661847f8eSopenharmony_ci/**
31761847f8eSopenharmony_ci * Define the attribute functions of UIExtensionComponent.
31861847f8eSopenharmony_ci *
31961847f8eSopenharmony_ci * @extends CommonMethod<UIExtensionComponentAttribute>
32061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
32161847f8eSopenharmony_ci * @systemapi
32261847f8eSopenharmony_ci * @since 10
32361847f8eSopenharmony_ci */
32461847f8eSopenharmony_cideclare class UIExtensionComponentAttribute extends CommonMethod<UIExtensionComponentAttribute> {
32561847f8eSopenharmony_ci  /**
32661847f8eSopenharmony_ci   * @param { import('../api/@ohos.base').Callback<UIExtensionProxy> } callback
32761847f8eSopenharmony_ci   * - callback called when remote UIExtensionAbility object is
32861847f8eSopenharmony_ci   * <br/>ready for receive data
32961847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
33061847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
33161847f8eSopenharmony_ci   * @systemapi
33261847f8eSopenharmony_ci   * @since 10
33361847f8eSopenharmony_ci   */
33461847f8eSopenharmony_ci  onRemoteReady(
33561847f8eSopenharmony_ci    callback: import('../api/@ohos.base').Callback<UIExtensionProxy>
33661847f8eSopenharmony_ci  ): UIExtensionComponentAttribute;
33761847f8eSopenharmony_ci
33861847f8eSopenharmony_ci  /**
33961847f8eSopenharmony_ci   * @param { import('../api/@ohos.base').Callback<{ [key: string]: Object }> } callback
34061847f8eSopenharmony_ci   * - called when data received from UIExtensionAbility
34161847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
34261847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
34361847f8eSopenharmony_ci   * @systemapi
34461847f8eSopenharmony_ci   * @since 10
34561847f8eSopenharmony_ci   */
34661847f8eSopenharmony_ci  /**
34761847f8eSopenharmony_ci   * @param { ReceiveCallback } callback - Called when data received from UIExtensionAbility
34861847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
34961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
35061847f8eSopenharmony_ci   * @systemapi
35161847f8eSopenharmony_ci   * @since 14
35261847f8eSopenharmony_ci   */
35361847f8eSopenharmony_ci  onReceive(callback: ReceiveCallback): UIExtensionComponentAttribute;
35461847f8eSopenharmony_ci
35561847f8eSopenharmony_ci  /**
35661847f8eSopenharmony_ci   * @param { import('../api/@ohos.base').Callback<{code: number;want?: import('../api/@ohos.app.ability.Want').default;}> } callback 
35761847f8eSopenharmony_ci   * - called when the UIExtensionAbility is terminated with result data.
35861847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
35961847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
36061847f8eSopenharmony_ci   * @systemapi
36161847f8eSopenharmony_ci   * @since 10
36261847f8eSopenharmony_ci   * @deprecated since 12
36361847f8eSopenharmony_ci   * @useinstead UIExtensionComponentAttribute#onTerminated
36461847f8eSopenharmony_ci   */
36561847f8eSopenharmony_ci  onResult(
36661847f8eSopenharmony_ci    callback: import('../api/@ohos.base').Callback<{
36761847f8eSopenharmony_ci      code: number;
36861847f8eSopenharmony_ci      want?: import('../api/@ohos.app.ability.Want').default;
36961847f8eSopenharmony_ci    }>
37061847f8eSopenharmony_ci  ): UIExtensionComponentAttribute;
37161847f8eSopenharmony_ci
37261847f8eSopenharmony_ci  /**
37361847f8eSopenharmony_ci   * @param { import('../api/@ohos.base').Callback<number> } callback
37461847f8eSopenharmony_ci   * - number returned from callback function if disconnected from UIExtensionAbility, 0 means the
37561847f8eSopenharmony_ci   * <br/>UIExtensionAbility is terminate by itself, otherwise the connect is broken abnormal.
37661847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
37761847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
37861847f8eSopenharmony_ci   * @systemapi
37961847f8eSopenharmony_ci   * @since 10
38061847f8eSopenharmony_ci   * @deprecated since 12
38161847f8eSopenharmony_ci   * @useinstead UIExtensionComponentAttribute#onTerminated or UIExtensionComponentAttribute#onError
38261847f8eSopenharmony_ci   */
38361847f8eSopenharmony_ci  onRelease(
38461847f8eSopenharmony_ci    callback: import('../api/@ohos.base').Callback<number>
38561847f8eSopenharmony_ci  ): UIExtensionComponentAttribute;
38661847f8eSopenharmony_ci
38761847f8eSopenharmony_ci  /**
38861847f8eSopenharmony_ci   * @param { import('../api/@ohos.base').ErrorCallback } callback
38961847f8eSopenharmony_ci   * - called when some error occurred except disconnected from UIExtensionAbility.
39061847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
39161847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
39261847f8eSopenharmony_ci   * @systemapi
39361847f8eSopenharmony_ci   * @since 10
39461847f8eSopenharmony_ci   */
39561847f8eSopenharmony_ci  onError(
39661847f8eSopenharmony_ci    callback: import('../api/@ohos.base').ErrorCallback
39761847f8eSopenharmony_ci  ): UIExtensionComponentAttribute;
39861847f8eSopenharmony_ci
39961847f8eSopenharmony_ci  /**
40061847f8eSopenharmony_ci   * Called when the provider of the embedded UI is terminated.
40161847f8eSopenharmony_ci   *
40261847f8eSopenharmony_ci   * @param { Callback<TerminationInfo> } callback
40361847f8eSopenharmony_ci   * @returns { UIExtensionComponentAttribute }
40461847f8eSopenharmony_ci   * @syscap SystemCapability.ArkUI.ArkUI.Full
40561847f8eSopenharmony_ci   * @systemapi
40661847f8eSopenharmony_ci   * @since 12
40761847f8eSopenharmony_ci   */
40861847f8eSopenharmony_ci  onTerminated(callback: Callback<TerminationInfo>): UIExtensionComponentAttribute;
40961847f8eSopenharmony_ci}
41061847f8eSopenharmony_ci
41161847f8eSopenharmony_ci/**
41261847f8eSopenharmony_ci * Defines UIExtensionComponent Component.
41361847f8eSopenharmony_ci *
41461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
41561847f8eSopenharmony_ci * @systemapi
41661847f8eSopenharmony_ci * @since 10
41761847f8eSopenharmony_ci */
41861847f8eSopenharmony_cideclare const UIExtensionComponent: UIExtensionComponentInterface;
41961847f8eSopenharmony_ci
42061847f8eSopenharmony_ci/**
42161847f8eSopenharmony_ci * Defines UIExtensionComponent Component instance.
42261847f8eSopenharmony_ci *
42361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
42461847f8eSopenharmony_ci * @systemapi
42561847f8eSopenharmony_ci * @since 10
42661847f8eSopenharmony_ci */
42761847f8eSopenharmony_cideclare const UIExtensionComponentInstance: UIExtensionComponentAttribute;
428