Merge branch 'master' of gitee.com:openharmony/interface_sdk-js into master

Signed-off-by: wind <youziting@huawei.com>
This commit is contained in:
wind 2024-03-04 02:16:35 +00:00 committed by Gitee
commit abff804f3a
337 changed files with 9343 additions and 1820 deletions

View File

@ -117,6 +117,36 @@ interface SheetInfo {
action: () => void;
}
/**
* Component dialog dismiss
*
* @interface DismissDialog
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface DismissDialog {
/**
* Defines dialog dismiss function.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
dismiss: () => void;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
reason: DismissReason;
}
/**
* The options of ActionSheet.
*
@ -538,6 +568,16 @@ interface ActionSheetOptions
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the actionSheet interactive dismiss
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
}
/**

View File

@ -782,6 +782,16 @@ declare interface AlertDialogParam {
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the dialog interactive dismiss
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
}
/**
@ -997,6 +1007,36 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam {
};
}
/**
* Component dialog dismiss
*
* @interface DismissDialog
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface DismissDialog {
/**
* Defines dialog dismiss function.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
dismiss: () => void;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
reason: DismissReason;
}
/**
* Defines the dialog param with buttons.
*

View File

@ -754,6 +754,54 @@ declare class AlphabetIndexerAttribute extends CommonMethod<AlphabetIndexerAttri
* @since 11
*/
autoCollapse(value: boolean): AlphabetIndexerAttribute;
/**
* Set the radius of the item of the pop-up window.
*
* @param { number } value
* @returns { AlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
popupItemBorderRadius(value: number): AlphabetIndexerAttribute;
/**
* Set the radius of the item of the indexer.
*
* @param { number } value
* @returns { AlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
itemBorderRadius(value: number): AlphabetIndexerAttribute;
/**
* Set the background blurStyle of title of the pop-up window.
*
* @param { BlurStyle } value
* @returns { AlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
popupBackgroundBlurStyle(value: BlurStyle): AlphabetIndexerAttribute;
/**
* Set the background color of title of the pop-up window.
*
* @param { ResourceColor } value
* @returns { AlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
popupTitleBackground(value: ResourceColor): AlphabetIndexerAttribute;
}
/**

View File

@ -324,6 +324,48 @@ declare interface CalendarDialogOptions extends CalendarOptions {
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the dialog appears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidAppear?: () => void;
/**
* Callback function when the dialog disappears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidDisappear?: () => void;
/**
* Callback function before the dialog openAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillAppear?: () => void;
/**
* Callback function before the dialog closeAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDisappear?: () => void;
}
/**

View File

@ -9298,6 +9298,43 @@ declare interface PopupMessageOptions {
font?: Font;
}
/**
* Dismiss reason type.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare enum DismissReason {
/**
* Press back
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
PRESS_BACK = 0,
/**
* Touch component outside
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
TOUCH_OUTSIDE = 1,
/**
* Close button
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
CLOSE_BUTTON = 2
}
/**
* Defines the popup options.
*
@ -17793,6 +17830,31 @@ declare class ScrollableCommonMethod<T> extends CommonMethod<T> {
*/
onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): T;
/**
* Called when the scrollable will scroll.
*
* @param { OnScrollCallback } handler - callback of scrollable,
* scrollOffset is offset this frame will scroll, which may or may not be reached.
* scrollState is current scroll state.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillScroll(handler: OnScrollCallback): T;
/**
* Called when the scrollable did scroll.
*
* @param { OnScrollCallback } handler - callback of scrollable,
* scrollOffset is offset this frame did scroll, scrollState is current scroll state.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onDidScroll(handler: OnScrollCallback): T;
/**
* Called when the scrollable reaches the start position.
*
@ -17855,6 +17917,15 @@ declare class ScrollableCommonMethod<T> extends CommonMethod<T> {
flingSpeedLimit(speedLimit: number): T;
}
/**
* on scroll callback using in scrollable onWillScroll and onDidScroll.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare type OnScrollCallback = (scrollOffset: number, scrollState: ScrollState) => void;
declare module "SpecialEvent" {
module "SpecialEvent" {
// @ts-ignore

View File

@ -363,6 +363,46 @@ declare interface CustomDialogControllerOptions {
* @since 11
*/
isModal?: boolean;
/**
* Callback function when the CustomDialog interactive dismiss.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
}
/**
* Component dialog dismiss
*
* @interface DismissDialog
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface DismissDialog {
/**
* Defines dialog dismiss function
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
dismiss: () => void;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
reason: DismissReason;
}
/**

View File

@ -756,6 +756,48 @@ declare interface DatePickerDialogOptions extends DatePickerOptions {
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the dialog appears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidAppear?: () => void;
/**
* Callback function when the dialog disappears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidDisappear?: () => void;
/**
* Callback function before the dialog openAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillAppear?: () => void;
/**
* Callback function before the dialog closeAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDisappear?: () => void;
}
/**

View File

@ -8990,6 +8990,48 @@ declare enum FoldStatus {
FOLD_STATUS_HALF_FOLDED = 3,
}
/**
* Enumerates the app rotation.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
declare enum AppRotation {
/**
* App does not rotate to display vertically.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
ROTATION_0 = 0,
/**
* App rotates 90 degrees clockwise to display horizontally.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
ROTATION_90 = 1,
/**
* App rotates 180 degrees clockwise to display vertically in reverse.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
ROTATION_180 = 2,
/**
* App rotates 270 degrees clockwise to display horizontally in reverse.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
ROTATION_270 = 3
}
declare module 'borderStyle' {
module 'borderStyle' {
// @ts-ignore

View File

@ -13,6 +13,14 @@
* limitations under the License.
*/
/**
* Import the WindowMode type object for onHoverStatusChange.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
declare type WindowMode = import('../api/@ohos.window').WindowMode;
/**
* Provides ports for stacking containers.
*
@ -75,6 +83,17 @@ declare class FolderStackAttribute extends CommonMethod<FolderStackAttribute> {
foldStatus: FoldStatus
}) => void): FolderStackAttribute;
/**
* Callback hoverStatus|folderStatus|rotation|windowMode when the hoverStatus changes
*
* @param { function } handler - executed when hoverStatus changed
* @returns { FolderStackAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
onHoverStatusChange(handler: (param: HoverEventParam) => void): FolderStackAttribute;
/**
* Enable the animation of folderStack.
*
@ -98,6 +117,50 @@ declare class FolderStackAttribute extends CommonMethod<FolderStackAttribute> {
autoHalfFold(value: boolean): FolderStackAttribute;
}
/**
* Defines the Embed Data info.
*
* @interface HoverEventParam
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
declare interface HoverEventParam {
/**
* Folder state.
*
* @type { FoldStatus }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
foldStatus: FoldStatus
/**
* Is hover mode
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
isHoverMode: boolean
/**
* App rotation
*
* @type { AppRotation }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
appRotation: AppRotation
/**
* Window mode
*
* @type { WindowMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 12
*/
windowMode: WindowMode
}
/**
* Defines FolderStack Component.
*

View File

@ -1112,6 +1112,8 @@ declare class GridAttribute extends ScrollableCommonMethod<GridAttribute> {
* @crossplatform
* @atomicservice
* @since 11
* @deprecated since 12
* @useinstead common.ScrollableCommonMethod#onDidScroll
*/
onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): GridAttribute;

View File

@ -60,6 +60,7 @@
/// <reference path="./location_button.d.ts" />
/// <reference path="./matrix2d.d.ts" />
/// <reference path="./marquee.d.ts" />
/// <reference path="./media_cached_image.d.ts" />
/// <reference path="./menu.d.ts" />
/// <reference path="./menu_item.d.ts" />
/// <reference path="./menu_item_group.d.ts" />

View File

@ -1275,6 +1275,8 @@ declare class ListAttribute extends ScrollableCommonMethod<ListAttribute> {
* @crossplatform
* @atomicservice
* @since 11
* @deprecated since 12
* @useinstead common.ScrollableCommonMethod#onDidScroll
* @form
*/
onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): ListAttribute;

View File

@ -0,0 +1,88 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Defines the resource which can use ASTC.
*
* @interface ASTCResource
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
interface ASTCResource {
/**
* Array of ASTC uri resources, indicating the range of ASTC data to be obtained.
* @type { Array<string> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
sources: Array<string>;
/**
* Column size, indicating the number of ASTC resources to splice per row.
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
column: number;
}
/**
* @interface MediaCachedImageInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
interface MediaCachedImageInterface {
/**
* Image resource to be obtained.
*
* @param { PixelMap | ResourceStr | DrawableDescriptor | ASTCResource } src
* @returns { MediaCachedImageAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
(src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute;
}
/**
* Attributes of MediaCachedImage inherited from ImageAttribute.
*
* @extends ImageAttribute
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
declare class MediaCachedImageAttribute extends ImageAttribute {}
/**
* MediaCachedImage component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
declare const MediaCachedImage: MediaCachedImageInterface;
/**
* Instance of MediaCachedImage component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @systemapi
* @since 12
*/
declare const MediaCachedImageInstance: MediaCachedImageAttribute;

View File

@ -1121,6 +1121,84 @@ declare class NavPathStack {
* @since 11
*/
disableAnimation(value: boolean): void;
/**
* set navigation transition interception.It will be called in navPathStack changes or navigation mode changes.
*
* @param { NavigationInterception } interception - the instance to intercept in navigation changes.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
setInterception(interception: NavigationInterception): void;
}
/**
* Navigation home name
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare type NavBar = 'navBar'
/**
* navigation interception callback using in willShow and didShow
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: NavDestinationContext|NavBar, operation: NavigationOperation, isAnimated: boolean) => void;
/**
* navigation interception callback using in navigation mode change
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare type InterceptionModeCallback = (mode: NavigationMode) => void;
/**
* Provide navigation transition interception
*
* @interface NavigationInterception
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface NavigationInterception {
/**
* Called before destination transition.NavPathStack can be changed in this callback,
* it will takes effect during this transition.For details, see { @Link InterceptionShowCallback}.
*
* @type { ?InterceptionShowCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
willShow?: InterceptionShowCallback;
/**
* Called after destination transition.For details, see { @Link InterceptionShowCallback}.
*
* @type { ?InterceptionShowCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
didShow?: InterceptionShowCallback;
/**
* Called when navigation mode changed.For details, see { @Link InterceptionModeCallback}.
*
* @type { ?InterceptionModeCallback }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
modeChange?: InterceptionModeCallback;
}
/**

View File

@ -254,6 +254,16 @@ interface RefreshOptions {
*/
friction?: number | string;
/**
* The text displayed during refreshing
*
* @type { ?ResourceStr }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
promptText?: ResourceStr;
/**
* Custom component to display during dragging.
*

View File

@ -1507,6 +1507,38 @@ declare interface RichEditorBuilderSpanOptions {
offset?: number;
}
/**
* Defines the placeholder style.
*
* @interface PlaceholderStyle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface PlaceholderStyle {
/**
* font.
*
* @type { ?Font }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
font?: Font;
/**
* fontColor.
*
* @type { ?ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontColor?: ResourceColor;
}
/**
* Defines span style option of RichEditor.
*
@ -2465,6 +2497,18 @@ declare class RichEditorAttribute extends CommonMethod<RichEditorAttribute> {
* @since 11
*/
dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute;
/**
* Set richEditor placeholder.
*
* @param { ResourceStr } value - The value of placeholder.
* @param { PlaceholderStyle } options - The style of placeholder.
* @returns { RichEditorAttribute } The attribute of the rich editor.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute;
}
/**

View File

@ -237,6 +237,51 @@ declare interface OffsetResult {
yOffset: number;
}
/**
* Provides custom animation parameters.
*
* @interface ScrollAnimationOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface ScrollAnimationOptions {
/**
* Set the duration of the animation.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
duration?: number;
/**
* Set the curve of the animation.
*
* @type { ?(Curve | ICurve) }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
curve?: Curve | ICurve;
/**
* Set whether the animation can over the boundary.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
canOverScroll?: boolean;
}
/**
* Scroller
*
@ -364,7 +409,17 @@ declare class Scroller {
* @atomicservice
* @since 11
*/
animation?: { duration?: number; curve?: Curve | ICurve } | boolean;
/**
* Descriptive animation.
*
* @type { ?( ScrollAnimationOptions | boolean) } The ScrollAnimationOptions type provides custom animation parameters
* and the boolean type enables default spring animation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
animation?: ScrollAnimationOptions | boolean;
});
/**
@ -777,9 +832,37 @@ declare class ScrollAttribute extends ScrollableCommonMethod<ScrollAttribute> {
* @crossplatform
* @atomicservice
* @since 11
* @deprecated since 12
* @useinstead scroll/Scroll#onWillScroll
*
*/
onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
/**
* Called when the Scroll will scroll.
*
* @param { ScrollOnScrollCallback } handler - callback of Scroll,
* xOffset and yOffset are offsets this frame will scroll, which may or may not be reached.
* scrollState is current scroll state.
* @returns { ScrollAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillScroll(handler: ScrollOnScrollCallback): ScrollAttribute;
/**
* Called when the Scroll did scroll.
*
* @param { ScrollOnScrollCallback } handler - callback of Scroll,
* xOffset and yOffset are offsets this frame did scroll, scrollState is current scroll state.
* @returns { ScrollAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onDidScroll(handler: ScrollOnScrollCallback): ScrollAttribute;
/**
* Called when scrolling to the edge of the container.
*
@ -1118,6 +1201,15 @@ declare class ScrollAttribute extends ScrollableCommonMethod<ScrollAttribute> {
enablePaging(value: boolean): ScrollAttribute;
}
/**
* callback of Scroll, using in onWillScroll and onDidScroll.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void;
/**
* Defines Scroll Component.
*

View File

@ -956,6 +956,28 @@ declare class TabContentAttribute extends CommonMethod<TabContentAttribute> {
* @since 11
*/
tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute;
/**
* Called when the tab content will show.
* @param { VoidCallback } event
* @returns { TabContentAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onWillShow(event: VoidCallback): TabContentAttribute;
/**
* Called when the tab content will hide.
* @param { VoidCallback } event
* @returns { TabContentAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onWillHide(event: VoidCallback): TabContentAttribute;
}
/**

View File

@ -770,7 +770,7 @@ declare class TextAreaAttribute extends CommonMethod<TextAreaAttribute> {
* @param { function } callback
* @returns { TextAreaAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @since 8
*/
/**
* Called when using the Clipboard menu
@ -799,7 +799,7 @@ declare class TextAreaAttribute extends CommonMethod<TextAreaAttribute> {
* @param { function } callback
* @returns { TextAreaAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @since 8
*/
/**
* Called when using the Clipboard menu

View File

@ -863,6 +863,48 @@ declare interface TextPickerDialogOptions extends TextPickerOptions {
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the dialog appears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidAppear?: () => void;
/**
* Callback function when the dialog disappears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidDisappear?: () => void;
/**
* Callback function before the dialog openAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillAppear?: () => void;
/**
* Callback function before the dialog closeAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDisappear?: () => void;
}
/**

View File

@ -666,6 +666,48 @@ declare interface TimePickerDialogOptions extends TimePickerOptions {
* @since 11
*/
backgroundBlurStyle?: BlurStyle;
/**
* Callback function when the dialog appears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidAppear?: () => void;
/**
* Callback function when the dialog disappears.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
onDidDisappear?: () => void;
/**
* Callback function before the dialog openAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillAppear?: () => void;
/**
* Callback function before the dialog closeAnimation starts.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDisappear?: () => void;
}
/**

View File

@ -1362,6 +1362,16 @@ declare type LengthConstrain = {
maxLength: Length;
};
/**
* Defines VoidCallback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
declare type VoidCallback = () => void;
/**
* Defines the font used for text.
*

View File

@ -45,6 +45,26 @@ declare type WebviewController = import('../api/@ohos.web.webview').default.Webv
*/
type OnNavigationEntryCommittedCallback = (loadCommittedDetails: LoadCommittedDetails) => void;
/**
* The callback of largestContentfulPaint.
*
* @typedef OnLargestContentfulPaintCallback
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentfulPaint) => void;
/**
* The callback of firstMeaningfulPaint.
*
* @typedef OnFirstMeaningfulPaintCallback
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPaint) => void;
/**
* Enum type supplied to {@link getMessageLevel} for receiving the console log level of JavaScript.
*
@ -2234,6 +2254,35 @@ declare enum WebNavigationType {
NAVIGATION_TYPE_AUTO_SUBFRAME = 5,
}
/**
* Defines the web render mode, related to {@link RenderMode}.
*
* @enum { number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
declare enum RenderMode {
/**
* Web and arkui render asynchronously
*
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
ASYNC_RENDER = 0,
/**
* Web and arkui render synchronously
*
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
SYNC_RENDER = 1,
}
/**
* Defines the context menu param, related to {@link WebContextMenuParam} method.
*
@ -3704,6 +3753,16 @@ declare interface WebOptions {
*/
controller: WebController | WebviewController;
/**
* Sets the render mode of the web.
*
* @type { ?RenderMode }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
renderMode? : RenderMode;
/**
* Sets the incognito mode of the Web, the parameter is optional and default value is false.
* When the Web is in incognito mode, cookies, records of websites, geolocation permissions
@ -4008,6 +4067,106 @@ declare interface NativeEmbedTouchInfo {
touchEvent?: TouchEvent;
}
/**
* Defines the first content paint rendering of web page.
*
* @interface FirstMeaningfulPaint
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
declare interface FirstMeaningfulPaint {
/**
* Start time of navigation.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
navigationStartTime?: number;
/**
* Paint time of first meaningful content.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
firstMeaningfulPaintTime?: number;
}
/**
* Defines the largest content paint rendering of web page.
*
* @interface LargestContentfulPaint
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
declare interface LargestContentfulPaint {
/**
* Start time of navigation.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
navigationStartTime?: number;
/**
* Paint time of largest image.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
largestImagePaintTime?: number;
/**
* Paint time of largest text.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
largestTextPaintTime?: number;
/**
* Bits per pixel of image.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
imageBPP?: number;
/**
* Load start time of largest image.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
largestImageLoadStartTime?: number;
/**
* Load end time of largest image.
*
* @type { ?number }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
largestImageLoadEndTime?: number;
}
/**
* Defines the Web attribute functions.
*
@ -6026,6 +6185,17 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
*/
minLogicalFontSize(size: number): WebAttribute;
/**
* Set the default text encodingFormat value of webview. The default value is UTF-8.
*
* @param { string } default text encodingFormat.
* @returns { WebAttribute }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
defaultTextEncodingFormat(textEncodingFormat: string): WebAttribute;
/**
* Whether web component can load resource from network.
*
@ -6319,6 +6489,28 @@ declare class WebAttribute extends CommonMethod<WebAttribute> {
firstContentfulPaintMs: number
}) => void): WebAttribute;
/**
* Called when the First rendering of meaningful content time(FMP)
*
* @param { OnFirstMeaningfulPaintCallback } callback Function Triggered when the firstMeaningfulPaint.
* @returns { WebAttribute }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
onFirstMeaningfulPaint(callback: OnFirstMeaningfulPaintCallback): WebAttribute;
/**
* Called when the Maximum content rendering time(LCP).
*
* @param { OnLargestContentfulPaintCallback } callback Function Triggered when the largestContentfulPaint.
* @returns { WebAttribute }
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
onLargestContentfulPaint(callback: OnLargestContentfulPaintCallback): WebAttribute;
/**
* Triggered when the resources loading is intercepted.
*

View File

@ -185,6 +185,14 @@ declare namespace config {
* @since 11
*/
const repeatClickInterval: Config<RepeatClickInterval>;
/**
* Indicates the configuration of screen magnification.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @systemapi
* @since 12
*/
const screenMagnification: Config<boolean>;
/**
* Enable the accessibility extension ability.

View File

@ -55,24 +55,53 @@ declare namespace accessibility {
/**
* The action that the ability can execute.
* value range: { 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' |
* 'click' | 'longClick' | 'cut' | 'copy' | 'paste' | 'select' | 'setText' | 'delete' |
* 'scrollForward' | 'scrollBackward' | 'setSelection' }
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
/**
* The action that the ability can execute.
* value range: { 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' |
* 'click' | 'longClick' | 'cut' | 'copy' | 'paste' | 'select' | 'setText' | 'delete' |
* 'scrollForward' | 'scrollBackward' | 'setSelection' | 'setCursorPosition' | 'home' |
* 'back' | 'recentTask' | 'notificationCenter' | 'controlCenter' | 'common' }
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
type Action = 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' |
'click' | 'longClick' | 'cut' | 'copy' | 'paste' | 'select' | 'setText' | 'delete' |
'scrollForward' | 'scrollBackward' | 'setSelection';
'scrollForward' | 'scrollBackward' | 'setSelection' | 'setCursorPosition' | 'home' |
'back' | 'recentTask' | 'notificationCenter' | 'controlCenter' | 'common';
/**
* The type of the accessibility event.
* windowsChange/windowContentChange/windowStateChange/announcement/notificationChange/textTraversedAtMove
* value range: { 'accessibilityFocus' | 'accessibilityFocusClear' |
* 'click' | 'longClick' | 'focus' | 'select' | 'hoverEnter' | 'hoverExit' |
* 'textUpdate' | 'textSelectionUpdate' | 'scroll' }
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
*/
/**
* The type of the accessibility event.
* windowsChange/windowContentChange/windowStateChange/announcement/notificationChange/textTraversedAtMove
* value range: { 'accessibilityFocus' | 'accessibilityFocusClear' |
* 'click' | 'longClick' | 'focus' | 'select' | 'hoverEnter' | 'hoverExit' |
* 'textUpdate' | 'textSelectionUpdate' | 'scroll' | 'requestFocusForAccessibility'|
* 'announceForAccessibility' }
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
type EventType = 'accessibilityFocus' | 'accessibilityFocusClear' |
'click' | 'longClick' | 'focus' | 'select' | 'hoverEnter' | 'hoverExit' |
'textUpdate' | 'textSelectionUpdate' | 'scroll';
'textUpdate' | 'textSelectionUpdate' | 'scroll' | 'requestFocusForAccessibility'|
'announceForAccessibility';
/**
* The change type of the windowsChange event.
@ -708,6 +737,22 @@ declare namespace accessibility {
* @since 7
*/
itemCount?: number;
/**
* The id of element.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
elementId?: number;
/**
* The content of announce accessibility text.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
textAnnouncedForAccessibility?: string;
}
}
export default accessibility;

View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIAbility from './@ohos.app.ability.UIAbility';
import type EmbeddableUIAbilityContext from './application/EmbeddableUIAbilityContext';
/**
* class of embeddable UIAbility.
*
* @extends UIAbility
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 12
*/
export default class EmbeddableUIAbility extends UIAbility {
/**
* Indicates accessibility embeddable UIAbility context.
*
* @type { EmbeddableUIAbilityContext }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 12
*/
context: EmbeddableUIAbilityContext;
}

View File

@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
/**
* The class of embedded UI extension ability.
*
* @extends UIExtensionAbility
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
export default class EmbeddedUIExtensionAbility extends UIExtensionAbility {
}

View File

@ -21,6 +21,7 @@
import { AbilityResult } from './ability/abilityResult';
import { AsyncCallback } from './@ohos.base';
import { Configuration } from './@ohos.app.ability.Configuration';
import Context from './application/Context';
import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo';
import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo';
import { ElementName } from './bundleManager/ElementName';
@ -365,6 +366,21 @@ declare namespace abilityManager {
*/
function getForegroundUIAbilities(): Promise<Array<AbilityStateData>>;
/**
* Querying whether to allow embedded startup of atomic service.
*
* @param { Context } context - The context that initiates the query request.
* @param { string } appId - The ID of the application to which this bundle belongs.
* @returns { Promise<boolean> } Returns the result in the form of callback.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly
* @since 12
*/
function isEmbeddedOpenAllowed(context: Context, appId: string): Promise<boolean>;
/**
* The class of an ability running information.
*

View File

@ -140,6 +140,33 @@ declare namespace errorManager {
*/
function off(type: 'loopObserver', observer?: LoopObserver): void;
/**
* Register unhandled rejection observer.
*
* @param { 'unhandledRejection' } type - 'unhandledRejection'.
* @param { UnhandledRejectionObserver } observer - The unhandled rejection observer.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 12
*/
function on(type: 'unhandledRejection', observer: UnhandledRejectionObserver): void;
/**
* Unregister unhandled rejection observer.
*
* @param { 'unhandledRejection' } type - error.
* @param { UnhandledRejectionObserver } [observer] - the registered observer
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @throws { BusinessError } 16300004 - If the observer does not exist
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 12
*/
function off(type: 'unhandledRejection', observer?: UnhandledRejectionObserver): void;
/**
* The observer will be called by system when an error occurs.
*
@ -162,6 +189,16 @@ declare namespace errorManager {
* @since 12
*/
export type LoopObserver = _LoopObserver.default;
/**
* The observer will be called by system when an unhandled rejection occurs.
*
* { Error | any } reason - the reason of the rejection, typically of Error type
* { Promise<any> } promise - the promise that is rejected
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 12
*/
export type UnhandledRejectionObserver = (reason: Error | any, promise: Promise<any>) => void;
}
export default errorManager;

View File

@ -208,7 +208,16 @@ declare namespace wantConstant {
* @atomicservice
* @since 11
*/
SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit'
SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit',
/**
* Indicates the param of show mode key.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
SHOW_MODE_KEY = 'ohos.extra.param.key.showMode'
}
/**
@ -297,6 +306,34 @@ declare namespace wantConstant {
*/
FLAG_START_WITHOUT_TIPS = 0x40000000
}
/**
* Used to indicate show mode.
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
export enum ShowMode {
/**
* Indicates the window show mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
WINDOW = 0,
/**
* Indicates the embedded full show mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
EMBEDDED_FULL = 1
}
}
export default wantConstant;

View File

@ -296,4 +296,14 @@ export default class FormExtensionAbility {
* @since 11
*/
onAcquireFormData?(formId: string): Record<string, Object>;
/**
* Called when this ability breaks the last link, notifying the provider that the provider process is about to stop.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 12
*/
onStop?(): void;
}

View File

@ -995,6 +995,25 @@ declare namespace formHost {
*/
function setFormsRecyclable(formIds: Array<string>, callback: AsyncCallback<void>): void;
/**
* Recycle permanent dynamic ArkTS forms.
*
* @permission ohos.permission.REQUIRE_FORM
* @param { Array<string> } formIds - Indicates the IDs of the forms to be recycled.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
function recycleForms(formIds: Array<string>): Promise<void>;
/**
* Recover recycled permanent dynamic ArkTS forms.
*

View File

@ -183,6 +183,24 @@ declare interface AccessibilityEvent {
* @since 9
*/
timeStamp?: number;
/**
* ElementId
*
* @type { ?number }
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
elementId?: number;
/**
* The content of announce accessibility text.
*
* @type { ?string }
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
textAnnouncedForAccessibility?: string;
}
/**

18
api/@ohos.base.d.ts vendored
View File

@ -39,6 +39,15 @@
* @atomicservice
* @since 11
*/
/**
* Defines the basic callback.
* @typedef Callback
* @syscap SystemCapability.Base
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
export interface Callback<T> {
/**
* Defines the callback info.
@ -61,6 +70,15 @@ export interface Callback<T> {
* @atomicservice
* @since 11
*/
/**
* Defines the callback info.
* @param { T } data
* @syscap SystemCapability.Base
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
(data: T): void;
}

View File

@ -577,6 +577,14 @@ declare namespace bundleManager {
*/
ADS_SERVICE = 20,
/**
* Indicates extension info with type of embedded UI
*
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
EMBEDDED_UI = 21,
/**
* Indicates extension info with type of unspecified
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -339,6 +339,23 @@ declare namespace commonEventManager {
*/
function setStaticSubscriberState(enable: boolean): Promise<void>;
/**
* Set static subscriber state.
*
* @param { boolean } enable - static subscribe event enable/disable state.
* @param { Array<string> } events - The events array.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 1500007 - error sending message to Common Event Service
* @throws { BusinessError } 1500008 - Common Event Service does not complete initialization
* @syscap SystemCapability.Notification.CommonEvent
* @systemapi Hide this for inner system use.
* @StageModelOnly
* @since 12
*/
function setStaticSubscriberState(enable: boolean, events?: Array<string>): Promise<void>;
/**
* The event type that the commonEvent supported.
*
@ -2011,6 +2028,16 @@ declare namespace commonEventManager {
* @since 11
*/
COMMON_EVENT_PRIVACY_STATE_CHANGED = 'usual.event.PRIVACY_STATE_CHANGED',
/**
* This commonEvent means when a new application package start to install on the device.
* This is a protected common event that can only be sent by system.
*
* @syscap SystemCapability.Notification.CommonEvent
* @systemapi
* @since 12
*/
COMMON_EVENT_PACKAGE_INSTALLATION_STARTED = 'usual.event.PACKAGE_INSTALLATION_STARTED',
}
/**

View File

@ -626,6 +626,27 @@ declare namespace deviceInfo {
* @since 10
*/
const distributionOSReleaseType: string;
/**
* Open Device Identifier (ODID): a developer-level non-permanent device identifier.
* A developer can be an enterprise or individual developer.
* Example: dff3cdfd-7beb-1e7d-fdf7-1dbfddd7d30c
*
* An ODID will be regenerated in the following scenarios:
* Restore a phone to its factory settings.
* Uninstall and reinstall all apps of one developer on one device.
*
* An ODID is generated based on the following rules:
* For apps from the same developer, which are running on the same device, they have the same ODID.
* For apps from different developers, which are running on the same device, each of them has its own ODID.
* For apps from the same developer, which are running on different devices, each of them has its own ODID.
* For apps from different developers, which are running on different devices, each of them has its own ODID.
*
* @constant
* @syscap SystemCapability.Startup.SystemInfo
* @since 12
*/
const ODID: string;
}
export default deviceInfo;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Huawei Device Co., Ltd.
* Copyright (C) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -85,6 +85,14 @@ declare namespace fileShare {
* @since 11
*/
INVALID_PATH = 3,
/**
* Indicates that the permission is not persistent.
*
* @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization
* @since 12
*/
PERMISSION_NOT_PERSISTED = 4,
}
/**
@ -253,6 +261,21 @@ declare namespace fileShare {
* @since 11
*/
function deactivatePermission(policies: Array<PolicyInfo>): Promise<void>;
/**
* Check persistent permissions for the URI.
*
* @permission ohos.permission.FILE_ACCESS_PERSIST
* @param { Array<PolicyInfo> } policies - Policy information to grant permission on URIs.
* @returns { Promise<Array<boolean>> } Returns the persistent state of uri permissions.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 13900042 - Unknown error
* @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization
* @since 12
*/
function checkPersistentPermission(policies: Array<PolicyInfo>): Promise<Array<boolean>>;
}
export default fileShare;

566
api/@ohos.hidebug.d.ts vendored
View File

@ -57,6 +57,7 @@ declare namespace hidebug {
/**
* Get the virtual set size memory of the application process
*
* @returns { bigint } Returns application process virtual set size memory information.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 11
@ -184,5 +185,570 @@ declare namespace hidebug {
* @since 9
*/
function getServiceDump(serviceid: number, fd: number, args: Array<string>): void;
/**
* Obtains the cpu usage of system.
*
* @returns { number } Returns the cpu usage of system.
* @throws { BusinessError } 11400104 - The status of the system cpu usage is abnormal
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getSystemCpuUsage(): number;
/**
* Application CPU usage of thread.
*
* @interface ThreadCpuUsage
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
interface ThreadCpuUsage {
/**
* Thread id
*
* @type { number }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
threadId: number;
/**
* Cpu usage of thread
*
* @type { number }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
cpuUsage: number;
}
/**
* Get the CPU usage of all threads in the application.
*
* @returns { ThreadCpuUsage[] } Returns the CPU usage of all threads in the application.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getAppThreadCpuUsage(): ThreadCpuUsage[];
/**
* System memory information
*
* @interface SystemMemInfo
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
interface SystemMemInfo {
/**
* Total system memory size, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
totalMem: bigint;
/**
* System free memory size, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
freeMem: bigint;
/**
* System available memory size, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
availableMem: bigint;
}
/**
* Obtains the system memory size.
*
* @returns { SystemMemInfo } Returns system memory size.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getSystemMemInfo(): SystemMemInfo;
/**
* Application process native memory information.
*
* @interface NativeMemInfo
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
interface NativeMemInfo {
/**
* Process proportional set size memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
pss: bigint;
/**
* Virtual set size memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
vss: bigint;
/**
* Resident set size, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
rss: bigint;
/**
* The size of the shared dirty memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
sharedDirty: bigint;
/**
* The size of the private dirty memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
privateDirty: bigint;
/**
* The size of the shared clean memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
sharedClean: bigint;
/**
* The size of the private clean memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
privateClean: bigint;
}
/**
* Obtains the memory information of application process.
*
* @returns { NativeMemInfo } Returns the native memory of a process.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getAppNativeMemInfo(): NativeMemInfo;
/**
* Application process memory limit
*
* @interface MemoryLimit
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
interface MemoryLimit {
/**
* The limit of the application process's resident set, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
rssLimit: bigint;
/**
* The limit of the application process's virtual memory, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
vssLimit: bigint;
/**
* The limit of the js vm heap size of current virtual machine, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
vmHeapLimit: bigint;
}
/**
* Obtains the memory limit of application process.
*
* @returns { MemoryLimit } Returns memory limit of application.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getAppMemoryLimit(): MemoryLimit;
/**
* The memory information of application virtual machine.
*
* @interface VMMemoryInfo
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
interface VMMemoryInfo {
/**
* Total size of current virtual machine Heap, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
totalHeap: bigint;
/**
* Used size of current virtual machine Heap, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
heapUsed: bigint;
/**
* All array object size of current virtual machine, in kilobyte
*
* @type { bigint }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
allArraySize: bigint;
}
/**
* Obtains the memory information of application virtual machine.
*
* @returns { VMMemoryInfo } Returns memory information of application virtual machine.
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function getAppVMMemoryInfo(): VMMemoryInfo;
/**
* Enum for trace flag
*
* @enum { number }
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
enum TraceFlag {
/**
* Only capture main thread trace
*
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
MAIN_THREAD = 1,
/**
* Capture all thread trace
*
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
ALL_THREADS = 2
}
/**
* Provide trace tags
*
* @namespace tags
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
namespace tags {
/**
* Ability Manager tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const ABILITY_MANAGER: number;
/**
* ARKUI development framework tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const ARKUI: number;
/**
* ARK tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const ARK: number;
/**
* Bluetooth tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const BLUETOOTH: number;
/**
* Common library subsystem tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const COMMON_LIBRARY: number;
/**
* Distributed hardware device manager tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_HARDWARE_DEVICE_MANAGER: number;
/**
* Distributed audio tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_AUDIO: number;
/**
* Distributed camera tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_CAMERA: number;
/**
* Distributed data manager module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_DATA: number;
/**
* Distributed hardware framework tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_HARDWARE_FRAMEWORK: number;
/**
* Distributed input tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_INPUT: number;
/**
* Distributed screen tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_SCREEN: number;
/**
* Distributed scheduler tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const DISTRIBUTED_SCHEDULER: number;
/**
* FFRT tasks.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const FFRT: number;
/**
* File management tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const FILE_MANAGEMENT: number;
/**
* Global resource manager tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const GLOBAL_RESOURCE_MANAGER: number;
/**
* Graphics module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const GRAPHICS: number;
/**
* HDF subsystem tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const HDF: number;
/**
* MISC module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const MISC: number;
/**
* Multimodal input module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const MULTIMODAL_INPUT: number;
/**
* Net tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const NET: number;
/**
* Notification module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const NOTIFICATION: number;
/**
* NWeb tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const NWEB: number;
/**
* OHOS generic tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const OHOS: number;
/**
* Power manager tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const POWER_MANAGER: number;
/**
* RPC tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const RPC: number;
/**
* SA tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const SAMGR: number;
/**
* Window manager tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const WINDOW_MANAGER: number;
/**
* Audio module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const AUDIO: number;
/**
* Camera module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const CAMERA: number;
/**
* Image module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const IMAGE: number;
/**
* Media module tag.
*
* @constant
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
const MEDIA: number;
}
/**
* Start capture application trace.
*
* @param { number[] } tags - Tag of trace.
* @param { TraceFlag } flag - Trace flag.
* @param { number } limitSize - Max size of trace file, in bytes, the max is 500MB.
* @returns { string } Returns absolute path of the trace file.
* @throws { BusinessError } 401 - Invalid argument
* @throws { BusinessError } 11400102 - Have already capture trace
* @throws { BusinessError } 11400103 - Without write permission on the file
* @throws { BusinessError } 11400104 - The status of the trace is abnormal
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function startAppTraceCapture(tags: number[], flag: TraceFlag, limitSize: number): string;
/**
* Stop capture application trace.
*
* @throws { BusinessError } 11400104 - The status of the trace is abnormal
* @throws { BusinessError } 11400105 - No capture trace running
* @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug
* @since 12
*/
function stopAppTraceCapture(): void;
}
export default hidebug;

View File

@ -44,6 +44,16 @@ import { Callback } from './@ohos.base';
* @atomicservice
* @since 11
*/
/**
* Used to do mediaquery operations.
*
* @namespace mediaquery
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
declare namespace mediaquery {
/**
@ -70,6 +80,16 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Defines the Result of mediaquery.
*
* @interface MediaQueryResult
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
interface MediaQueryResult {
/**
* Whether the match condition is met.
@ -98,6 +118,17 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Whether the match condition is met.
* This parameter is read-only.
*
* @type { boolean }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
readonly matches: boolean;
/**
@ -127,6 +158,17 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Matching condition of a media event.
* This parameter is read-only.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
readonly media: string;
}
@ -157,6 +199,17 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Defines the Listener of mediaquery.
*
* @interface MediaQueryListener
* @extends MediaQueryResult
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
interface MediaQueryListener extends MediaQueryResult {
/**
* Registers a callback with the corresponding query condition by using the handle.
@ -188,6 +241,18 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the media attributes change.
*
* @param { 'change' } type
* @param { Callback<MediaQueryResult> } callback
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
on(type: 'change', callback: Callback<MediaQueryResult>): void;
/**
@ -220,6 +285,18 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the media attributes chang.
*
* @param { 'change' } type
* @param { Callback<MediaQueryResult> } callback
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
off(type: 'change', callback?: Callback<MediaQueryResult>): void;
}
@ -250,6 +327,17 @@ declare namespace mediaquery {
* @atomicservice
* @since 11
*/
/**
* Sets the media query criteria and returns the corresponding listening handle
*
* @param { string } condition
* @returns { MediaQueryListener }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @form
* @atomicservice
* @since 12
*/
function matchMediaSync(condition: string): MediaQueryListener;
}

View File

@ -29,6 +29,14 @@ import type { AbilityInfo } from './bundleManager/AbilityInfo';
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 6
*/
/**
* Provides methods to operate or manage NFC card emulation.
*
* @namespace cardEmulation
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
declare namespace cardEmulation {
/**
* Defines the capability type.
@ -75,6 +83,14 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Define the card emulation type, payment or other.
*
* @enum { string }
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
enum CardType {
/**
* Payment type of card emulation
@ -82,6 +98,13 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Payment type of card emulation
*
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
PAYMENT = 'payment',
/**
@ -90,6 +113,13 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Other type of card emulation
*
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
OTHER = 'other'
}
@ -116,6 +146,17 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Checks whether Host Card Emulation(HCE) capability is supported.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @returns { boolean } Returns true if HCE is supported, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
function hasHceCapability(): boolean;
/**
@ -131,6 +172,20 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Checks whether a service is default for given type.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { ElementName } elementName - The element name of the service ability
* @param { CardType } type - The type to query, payment or other.
* @returns { boolean } Returns true if the service is default, otherwise false.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
function isDefaultService(elementName: ElementName, type: CardType): boolean;
/**
@ -155,6 +210,15 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 8
*/
/**
* A class for NFC host application.
* <p>The NFC host application use this class, then Nfc service can access the application
* installation information and connect to services of the application.
*
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
export class HceService {
/**
* start HCE
@ -182,6 +246,20 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Starts the HCE, register more aids and allows this application to be preferred while in foreground.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { ElementName } elementName - The element name of the service ability
* @param { string[] } aidList - The aid list to be registered by this service, allowed to be empty.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
start(elementName: ElementName, aidList: string[]): void;
/**
@ -208,6 +286,19 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Stops the HCE, and unset the preferred service while in foreground.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { ElementName } elementName - The element name of the service ability
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
stop(elementName: ElementName): void;
/**
@ -219,6 +310,16 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 8
*/
/**
* register HCE event to receive the APDU data.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { 'hceCmd' } type The type to register.
* @param { AsyncCallback<number[]> } callback Callback used to listen to HCE data that local device received.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
on(type: 'hceCmd', callback: AsyncCallback<number[]>): void;
/**
@ -247,6 +348,20 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Sends a response APDU to the remote device.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { number[] } response Indicates the response to send, which is a byte array.
* @returns { Promise<void> } The void
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
transmit(response: number[]): Promise<void>;
/**
@ -262,6 +377,20 @@ declare namespace cardEmulation {
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @since 9
*/
/**
* Sends a response APDU to the remote device.
*
* @permission ohos.permission.NFC_CARD_EMULATION
* @param { number[] } response Indicates the response to send, which is a byte array.
* @param { AsyncCallback<void> } callback The callback
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.CardEmulation
* @atomicservice
* @since 12
*/
transmit(response: number[], callback: AsyncCallback<void>): void;
}
}

View File

@ -27,6 +27,14 @@ import { Callback } from './@ohos.base';
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Provides methods to operate or manage NFC.
*
* @namespace nfcController
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
declare namespace nfcController {
/**
* NFC changed states.
@ -35,6 +43,14 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* NFC changed states.
*
* @enum { number }
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
enum NfcState {
/**
* Indicates that NFC is disabled.
@ -42,6 +58,13 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Indicates that NFC is disabled.
*
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
STATE_OFF = 1,
/**
@ -50,6 +73,13 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Indicates that NFC is being enabled.
*
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
STATE_TURNING_ON = 2,
/**
@ -58,13 +88,27 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Indicates that NFC is enabled.
*
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
STATE_ON = 3,
/**
* Indicates that NFC is being disabled.
*
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
* @since 7
*/
/**
* Indicates that NFC is being disabled.
*
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
STATE_TURNING_OFF = 4
}
@ -88,6 +132,15 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* register nfc state changed event.
*
* @param { 'nfcStateChange' } type The type to register.
* @param { Callback<NfcState> } callback Callback used to listen to the nfc state changed event.
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
function on(type: 'nfcStateChange', callback: Callback<NfcState>): void;
/**
@ -98,6 +151,15 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* unregister nfc state changed event.
*
* @param { 'nfcStateChange' } type The type to unregister.
* @param { Callback<NfcState> } callback Callback used to listen to the nfc state changed event.
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
function off(type: 'nfcStateChange', callback?: Callback<NfcState>): void;
/**
@ -155,6 +217,14 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Checks whether NFC is enabled.
*
* @returns { boolean } Returns {@code true} if NFC is enabled; returns {@code false} otherwise.
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
function isNfcOpen(): boolean;
/**
@ -168,6 +238,18 @@ declare namespace nfcController {
* @syscap SystemCapability.Communication.NFC.Core
* @since 7
*/
/**
* Obtains the NFC status.
* <p>The NFC status can be any of the following: <ul><li>{@link #STATE_OFF}: Indicates that NFC
* is disabled. <li>{@link #STATE_TURNING_ON}: Indicates that NFC is being enabled.
* <li>{@link #STATE_ON}: Indicates that NFC is enabled. <li>{@link #STATE_TURNING_OFF}: Indicates
* that NFC is being disabled.</ul>
*
* @returns { NfcState } Returns the NFC status.
* @syscap SystemCapability.Communication.NFC.Core
* @atomicservice
* @since 12
*/
function getNfcState(): NfcState;
}

713
api/@ohos.nfc.tag.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@ -303,6 +303,30 @@ declare namespace notificationManager {
*/
function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise<void>;
/**
* Publishes a representative notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @param { BundleOption } representativeBundle - bundle option of the representative.
* @param { NotificationRequest } request - a notification.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600004 - Notification is not enabled.
* @throws { BusinessError } 1600005 - Notification slot is not enabled.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600009 - Over max number notifications per second.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function publishAsBundle(representativeBundle: BundleOption, request: NotificationRequest): Promise<void>;
/**
* Cancel a notification with the specified ID.
*
@ -350,6 +374,27 @@ declare namespace notificationManager {
*/
function cancel(id: number, label?: string): Promise<void>;
/**
* Cancel a notification with the representative and ID.
*
* @param { BundleOption } representativeBundle - bundle option of the representative.
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600007 - The notification is not exist.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function cancel(representativeBundle: BundleOption, id: number): Promise<void>;
/**
* Cancel a representative notification.
*
@ -399,6 +444,50 @@ declare namespace notificationManager {
*/
function cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise<void>;
/**
* Cancel a representative notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @param { BundleOption } representativeBundle - bundle option of the representative.
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600007 - The notification is not exist.
* @throws { BusinessError } 1600008 - The user is not exist.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function cancelAsBundle(representativeBundle: BundleOption, id: number): Promise<void>;
/**
* Cancel a representative notification with agent relationship.
* <p>If there is no agent relationship,
* you need to verify the ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER.
*
* @param { BundleOption } representativeBundle - The bundle option.
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { string } [label] - Label of the notification to cancel.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600007 - The notification is not exist.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function cancelAsBundle(representativeBundle: BundleOption, id: number, label?: string): Promise<void>;
/**
* Cancel all notifications of the current application.
*
@ -969,6 +1058,27 @@ declare namespace notificationManager {
*/
function getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback<Array<NotificationSlot>>): void;
/**
* Get notification slot for the specified bundle.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { SlotType } slotType - Indicates the notification slot.
* @returns { Promise<NotificationSlot> } Returns the NotificationSlot.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function getSlotByBundle(bundle: BundleOption, slotType: SlotType): Promise<NotificationSlot>;
/**
* Obtains all notification slots belonging to the specified bundle.
*
@ -1654,6 +1764,29 @@ declare namespace notificationManager {
*/
function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise<void>;
/**
* Sets whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { string } deviceType - The device type.
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setDistributedEnabledByBundle(bundle: BundleOption, deviceType: string, enable: boolean): Promise<void>;
/**
* Obtains whether an application supports distributed notification.
*
@ -1695,6 +1828,71 @@ declare namespace notificationManager {
*/
function isDistributedEnabledByBundle(bundle: BundleOption): Promise<boolean>;
/**
* Obtains whether an application supports distributed notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { string } deviceType - The device type.
* @returns { Promise<boolean> } Returns whether the distributed notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise<boolean>;
/**
* Sets whether an application supports smart reminders across devices.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { string } deviceType - The device type.
* @param { boolean } enable - Set enable or not.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setSmartReminderEnabled(deviceType: string, enable: boolean): Promise<void>;
/**
* Obtains whether an application supports smart reminders across devices.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { string } deviceType - The device type.
* @returns { Promise<boolean> } Returns whether the smart reminders across devices notification is supported.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600010 - Distributed operation failed.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function isSmartReminderEnabled(deviceType: string): Promise<boolean>;
/**
* Obtains the remind modes of the notification.
*
@ -1996,6 +2194,26 @@ declare namespace notificationManager {
*/
function setBadgeNumber(badgeNumber: number): Promise<void>;
/**
* Set badge number by bundle.
*
* @param { BundleOption } bundle - Use the bundleOption to carry bundleName and uid of the application.
* @param { number } badgeNumber - Badge number.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @throws { BusinessError } 17700001 - The specified bundle name was not found.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: number): Promise<void>;
/**
* Subscribe the callback for check notifications.
*
@ -2128,6 +2346,44 @@ declare namespace notificationManager {
*/
function getSlotFlagsByBundle(bundle: BundleOption): Promise<number>;
/**
* Add do not disturb notification templates.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function addDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>;
/**
* Remove do not disturb notification templates.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @throws { BusinessError } 1600012 - No memory space.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
function removeDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>;
/**
* Describes a button option for a triggering.
*
@ -2558,6 +2814,46 @@ declare namespace notificationManager {
end: Date;
}
/**
* Describes a DoNotDisturbProfile instance.
*
* @typedef DoNotDisturbProfile
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
export interface DoNotDisturbProfile {
/**
* The profile id of the Do Not disturb.
*
* @type { number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
id: number;
/**
* The profile name of the Do Not disturb.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
name: string;
/**
* The trustlist of application.
*
* @type { ?Array<BundleOption> }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
trustlist?: Array<BundleOption>;
}
/**
* The remind type of the notification.
*

View File

@ -565,6 +565,16 @@ declare namespace promptAction {
* @since 11
*/
builder: CustomBuilder;
/**
* Callback function when the CustomDialog interactive dismiss.
*
* @type { ?function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
onWillDismiss?: (dismissDialog: DismissDialog) => void;
}
/**
@ -907,4 +917,34 @@ declare namespace promptAction {
function showActionMenu(options: ActionMenuOptions): Promise<ActionMenuSuccessResponse>;
}
/**
* Component dialog dismiss
*
* @interface DismissDialog
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
declare interface DismissDialog {
/**
* Defines dialog dismiss function.
*
* @type { function }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
dismiss: () => void;
/**
* Dismiss reason type.
*
* @type { DismissReason }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
reason: DismissReason;
}
export default promptAction;

View File

@ -2893,6 +2893,21 @@ declare namespace request {
* @atomicservice
* @since 11
*/
/**
* The path to save the downloaded file, the default is "./".
* Currently support:
* 1: relative path, like "./xxx/yyy/zzz.html", "xxx/yyy/zzz.html", under caller's cache folder.
* 2: internal protocol path, "internal://cache/" is mandatory, like "internal://cache/path/to/file.txt".
* 3: application storage path, only the base directory and its subdirectories are supported, like "/data/storage/el1/base/path/to/file.txt".
* 4: file protocol path with self bundle name, only the base directory and its subdirectories are supported, like "file://com.example.test/data/storage/el2/base/file.txt".
*
* @type { ?string }
* @default ./
* @syscap SystemCapability.Request.FileTransferAgent
* @crossplatform
* @atomicservice
* @since 12
*/
saveas?: string;
/**
* The network.
@ -4033,6 +4048,52 @@ declare namespace request {
readonly extras?: object;
}
/**
* The HTTP response.
*
* @interface HttpResponse
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
interface HttpResponse {
/**
* The version of the HTTP response.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
readonly version: string,
/**
* The status code of the HTTP response.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
readonly statusCode: number,
/**
* The reason of the HTTP response.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
readonly reason: string,
/**
* The headers of the HTTP response.
*
* @type { Map<string, Array<string>> }
* @readonly
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
readonly headers: Map<string, Array<string>>,
}
/**
* The task entry.
* New task' status is "initialized" and enqueue.
@ -4290,6 +4351,24 @@ declare namespace request {
* @since 11
*/
off(event: 'remove', callback?: (progress: Progress) => void): void;
/**
* Enables the response callback.
*
* @param { 'response' } event - event types.
* @param { Callback<HttpResponse> } callback - callback function with an `HttpResponse` argument.
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
on(event: 'response', callback: Callback<HttpResponse>): void;
/**
* Disables the response callback.
*
* @param { 'response' } event - event types.
* @param { Callback<HttpResponse> } callback - callback function with an `HttpResponse` argument.
* @syscap SystemCapability.Request.FileTransferAgent
* @since 12
*/
off(event: 'response', callback?: Callback<HttpResponse>): void;
/**
* Starts the task.
*

View File

@ -169,6 +169,50 @@ declare namespace backgroundTaskManager {
*/
function startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: WantAgent): Promise<void>;
/**
* UIAbility uses this method to request start running in background.
* <p> System will publish a notification related to the UIAbility. </p>
*
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param { Context } context - App running context.
* @param { string[] } bgModes - Indicates which background mode to request.
* @param { WantAgent } wantAgent - Indicates which ability to start when user click the notification bar.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 9800001 - Memory operation failed.
* @throws { BusinessError } 9800002 - Parcel operation failed.
* @throws { BusinessError } 9800003 - Inner transact failed.
* @throws { BusinessError } 9800004 - System service operation failed.
* @throws { BusinessError } 9800005 - Background task verification failed.
* @throws { BusinessError } 9800006 - Notification verification failed.
* @throws { BusinessError } 9800007 - Task storage failed.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @since 12
*/
function startBackgroundRunning(context: Context, bgModes: string[], wantAgent: WantAgent): Promise<void>;
/**
* UIAbility uses this method to update background mode.
*
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param { Context } context - App running context.
* @param { string[] } bgModes - Indicates which background mode to request.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 9800001 - Memory operation failed.
* @throws { BusinessError } 9800002 - Parcel operation failed.
* @throws { BusinessError } 9800003 - Inner transact failed.
* @throws { BusinessError } 9800004 - System service operation failed.
* @throws { BusinessError } 9800005 - Background task verification failed.
* @throws { BusinessError } 9800006 - Notification verification failed.
* @throws { BusinessError } 9800007 - Task storage failed.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @since 12
*/
function updateBackgroundRunning(context: Context, bgModes: string[]): Promise<void>;
/**
* Service ability uses this method to request stop running in background.
*

76
api/@ohos.screen.d.ts vendored
View File

@ -105,7 +105,7 @@ declare namespace screen {
* Stop expand screens
*
* @param { Array<number> } expandScreen IDs of expand screens to stop
* @param { AsyncCallback<number> } callback used to return the result
* @param { AsyncCallback<void> } callback used to return the result
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 1400001 - Invalid display or screen.
* @syscap SystemCapability.WindowManager.WindowManager.Core
@ -602,10 +602,49 @@ declare namespace screen {
* @since 9
*/
enum Orientation {
/**
* Indicates that the orientation of the screen is unspecified.
*
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
UNSPECIFIED = 0,
/**
* Indicates that the orientation of the screen is vertical.
*
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
VERTICAL = 1,
/**
* Indicates that the orientation of the screen is horizontal.
*
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
HORIZONTAL = 2,
/**
* Indicates that the orientation of the screen is reverse_vertical.
*
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
REVERSE_VERTICAL = 3,
/**
* Indicates that the orientation of the screen is reverse_horizontal.
*
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
REVERSE_HORIZONTAL = 4
}
@ -618,9 +657,44 @@ declare namespace screen {
* @since 9
*/
interface ScreenModeInfo {
/**
* Screen id
*
* @type { number }
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
id: number;
/**
* Indicates the width of the screen
*
* @type { number }
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
width: number;
/**
* Indicates the height of the screen
*
* @type { number }
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
height: number;
/**
* Indicates the refreshRate of the screen
*
* @type { number }
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @systemapi Hide this for inner system use.
* @since 9
*/
refreshRate: number;
}
}

View File

@ -28,6 +28,15 @@ import type { AsyncCallback } from './@ohos.base';
* @since 6
*/
declare namespace userAuth {
/**
* The maximum allowable reuse duration is 300000 milliseconds.
*
* @constant
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
const MAX_ALLOWABLE_REUSE_DURATION: 300000n;
/**
* Enum for authentication result.
*
@ -1011,6 +1020,60 @@ declare namespace userAuth {
FULLSCREEN = 2
}
/**
* The mode for reusing unlock authentication result.
*
* @enum { number }
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
enum ReuseMode {
/**
* Authentication type relevant.The unlock authentication result can be reused only when the result is within
* valid duration as well as it comes from one of specified UserAuthTypes of the AuthParam.
*
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
AUTH_TYPE_RELEVANT = 1,
/**
* Authentication type irrelevant.The unlock authentication result can be reused as long as the result is within
* valid duration.
*
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
AUTH_TYPE_IRRELEVANT = 2
}
/**
* Reuse unlock authentication result.
*
* @typedef ReuseUnlockResult
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
interface ReuseUnlockResult {
/**
* The mode for reusing unlock authentication result.
*
* @type { ReuseMode }
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
reuseMode: ReuseMode;
/**
* The allowable reuse duration.The value of the duration should be between 0 and MAX_ALLOWABLE_REUSE_DURATION.
*
* @type { number }
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
reuseDuration: number;
}
/**
* Auth parameter.
*
@ -1045,6 +1108,15 @@ declare namespace userAuth {
* @since 10
*/
authTrustLevel: AuthTrustLevel;
/**
* Reuse unlock authentication result.
*
* @type { ?ReuseUnlockResult }
* @syscap SystemCapability.UserIAM.UserAuth.Core
* @since 12
*/
reuseUnlockResult?: ReuseUnlockResult;
}
/**

104
api/@ohos.util.d.ts vendored
View File

@ -2282,6 +2282,15 @@ declare namespace util {
* @atomicservice
* @since 11
*/
/**
* The Type represents four different encoding formats for base64
*
* @enum { number } Type
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
enum Type {
/**
* The value indicates that the encoding format of base64 is BASIC
@ -2310,7 +2319,23 @@ declare namespace util {
* @atomicservice
* @since 11
*/
MIME
MIME,
/**
* The value indicates that the encoding format of base64 is BASIC_URL_SAFE
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
BASIC_URL_SAFE,
/**
* The value indicates that the encoding format of base64 is MIME_URL_SAFE
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
MIME_URL_SAFE
}
/**
@ -2391,7 +2416,19 @@ declare namespace util {
* @atomicservice
* @since 11
*/
encodeSync(src: Uint8Array): Uint8Array;
/**
* Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
*
* @param { Uint8Array } src - A Uint8Array value
* @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE
* @returns { Uint8Array } Return the encoded new Uint8Array.
* @throws { BusinessError } 401 - The type of src must be Uint8Array.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
encodeSync(src: Uint8Array, options?: Type): Uint8Array;
/**
* Encodes the specified byte array into a String using the Base64 encoding scheme.
@ -2417,7 +2454,7 @@ declare namespace util {
* Encodes the specified byte array into a String using the Base64 encoding scheme.
*
* @param { Uint8Array } src - A Uint8Array value
* @param { Type } options - Enumerating input parameters includes two encoding formats: BASIC and MIME
* @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and MIME
* @returns { string } Return the encoded string.
* @throws { BusinessError } 401 - The type of src must be Uint8Array.
* @syscap SystemCapability.Utils.Lang
@ -2425,6 +2462,18 @@ declare namespace util {
* @atomicservice
* @since 11
*/
/**
* Encodes the specified byte array into a String using the Base64 encoding scheme.
*
* @param { Uint8Array } src - A Uint8Array value
* @param { Type } options - one of the Type enumeration
* @returns { string } Return the encoded string.
* @throws { BusinessError } 401 - The type of src must be Uint8Array.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
encodeToStringSync(src: Uint8Array, options?: Type): string;
/**
@ -2459,6 +2508,18 @@ declare namespace util {
* @atomicservice
* @since 11
*/
/**
* Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme.
*
* @param { Uint8Array | string } src - A Uint8Array value or value A string value
* @param { Type } [options] - one of the Type enumeration
* @returns { Uint8Array } Return the decoded Uint8Array.
* @throws { BusinessError } 401 - The type of src must be Uint8Array or string.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
decodeSync(src: Uint8Array | string, options?: Type): Uint8Array;
/**
@ -2491,7 +2552,19 @@ declare namespace util {
* @atomicservice
* @since 11
*/
encode(src: Uint8Array): Promise<Uint8Array>;
/**
* Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme.
*
* @param { Uint8Array } src - A Uint8Array value
* @param { Type } [options] - Enumerating input parameters includes two encoding formats: BASIC and BASIC_URL_SAFE
* @returns { Promise<Uint8Array> } Return the encodes asynchronous new Uint8Array.
* @throws { BusinessError } 401 - The type of src must be Uint8Array.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
* @since 12
*/
encode(src: Uint8Array, options?: Type): Promise<Uint8Array>;
/**
* Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
@ -2513,6 +2586,17 @@ declare namespace util {
* @crossplatform
* @since 10
*/
/**
* Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme.
*
* @param { Uint8Array } src - A Uint8Array value
* @param { Type } [options] - one of the Type enumeration
* @returns { Promise<string> } Returns the encoded asynchronous string.
* @throws { BusinessError } 401 - The type of src must be Uint8Array.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
encodeToString(src: Uint8Array, options?: Type): Promise<string>;
/**
@ -2537,6 +2621,18 @@ declare namespace util {
* @crossplatform
* @since 10
*/
/**
* Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or
* input u8 array into a newly allocated u8 array.
*
* @param { Uint8Array | string } src - A Uint8Array value or value A string value
* @param { Type } [options] - one of the Type enumeration
* @returns { Promise<Uint8Array> } Return the decoded asynchronous Uint8Array.
* @throws { BusinessError } 401 - The type of src must be Uint8Array or string.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
decode(src: Uint8Array | string, options?: Type): Promise<Uint8Array>;
}

104
api/@ohos.util.json.d.ts vendored Normal file
View File

@ -0,0 +1,104 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkTS
*/
/**
* JSON is a syntax for serializing objects, arrays, numbers, strings, booleans, and null.
*
* @namespace json
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
declare namespace json {
/**
* The type of conversion result function.
*
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
type Transformer = (this: Object, key: string, value: Object) => Object | undefined | null
/**
* Converts a JavaScript Object Notation (JSON) string into an Object or null.
*
* @param { string } text - A valid JSON string.
* @param { Transformer } [reviver] - A function that transforms the results.
* @returns { Object | null } Return an Object, array, string, number, boolean, or null value corresponding to JSON text.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
function parse(text: string, reviver?: Transformer): Object | null;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
*
* @param { Object } value - A JavaScript value, usually an Object or array.
* @param { (number | string)[] | null } [replacer] - An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param { string | number } [space] - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
* @returns { string } Return a JSON text.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
function stringify(value: Object, replacer?: (number | string)[] | null, space?: string | number): string
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
*
* @param { Object } value - A JavaScript value, usually an Object or array.
* @param { Transformer } [replacer] - A function that transforms the results.
* @param { string | number } [space] - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
* @returns { string } Return a JSON text.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
function stringify(value: Object, replacer?: Transformer, space?: string | number): string;
/**
* Checks whether the object parsed from a JSON string contains the property.
*
* @param { object } obj - The object parsed from a JSON string.
* @param { string } property - Determine whether the object contains the property.
* @returns { boolean } Return true if the key is in the object, otherwise return false.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
function has(obj: object, property: string): boolean;
/**
* Removes a property from the object parsed from a JSON string.
*
* @param { object } obj - The object parsed from a JSON string.
* @param { string } property - The property to be removed.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 12
*/
function remove(obj: object, property: string): void;
}
export default json;

View File

@ -340,6 +340,47 @@ declare namespace webview {
DANGEROUS = 3,
}
/**
* The playback status of all audio and video.
* @enum {number}
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
enum MediaPlaybackState {
/**
* No audio or video currently.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
NONE = 0,
/**
* All audio and video are playing.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
PLAYING = 1,
/**
* All audio and video are paused.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
PAUSED = 2,
/**
* All audio and video are stopped.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
STOPPED = 3
}
/**
* Defines the hit test value, related to {@link getHitTestValue} method.
*
@ -3895,6 +3936,117 @@ declare namespace webview {
* @since 12
*/
getPrintBackground(): boolean;
/**
* Start current camera.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
startCamera(): void;
/**
* Stop current camera.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
stopCamera(): void;
/**
* Close current camera.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
closeCamera(): void;
/**
* Pauses all layout, parsing, and JavaScript timers for all WebViews.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
static pauseAllTimers(): void;
/**
* Resumes all layout, parsing, and JavaScript timers for all WebViews.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
static resumeAllTimers(): void;
/**
* Stop all audio and video playback on the web page.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
stopAllMedia(): void;
/**
* Restart playback of all audio and video on the web page.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
resumeAllMedia(): void;
/**
* Pause all audio and video playback on the web page.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
pauseAllMedia(): void;
/**
* Close fullscreen video.
*
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
closeAllMediaPresentations(): void;
/**
* View the playback status of all audio and video on the web page.
*
* @returns { MediaPlaybackState } The playback status of all audio and video.
* @throws { BusinessError } 17100001 - Init error.
* The WebviewController must be associated with a Web component.
* @syscap SystemCapability.Web.Webview.Core
* @atomicservice
* @since 12
*/
getMediaPlaybackState(): MediaPlaybackState;
}
/**

View File

@ -147,6 +147,11 @@ export interface DeviceResponse {
deviceType: string;
}
/**
* @interface GetDeviceOptions
* @syscap SystemCapability.Startup.SystemInfo.Lite
* @since 3
*/
export interface GetDeviceOptions {
/**
* Called when the device information is obtained.

View File

@ -299,6 +299,36 @@ declare interface AccessibilityElement {
*/
performAction(actionName: string, callback: AsyncCallback<void>): void;
/**
* Get the position of cursor in TextInput.
*
* @param { AsyncCallback<number> } callback Indicates the listener.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
getCursorPosition(callback: AsyncCallback<number>): void;
/**
* Get the position of cursor in TextInput.
*
* @returns { Promise<number> }
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
getCursorPosition(): Promise<number>;
/**
* Set the screen curtain enable or disable.
*
* @param { boolean } isEnable Indicates whether the screen curtain is enabled.
* @throws { BusinessError } 401 - Input parameter error.
* @throws { BusinessError } 9300003 - Do not have accessibility right for this operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @systemapi
* @since 12
*/
enableScreenCurtain(isEnable: boolean): void;
/**
* Find elements that match the condition.
*
@ -370,6 +400,18 @@ declare interface AccessibilityElement {
* @since 9
*/
findElement(type: 'focusDirection', condition: FocusDirection): Promise<AccessibilityElement>;
/**
* Find elements that match the condition.
*
* @param { 'textType' } type The type of query condition is text type.
* @param { string } condition Indicates the specific content to be queried.
* @returns { Promise<Array<AccessibilityElement>> }
* @throws { BusinessError } 401 - Input parameter error.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
findElement(type: 'textType', condition: string): Promise<Array<AccessibilityElement>>;
}
/**
@ -715,6 +757,34 @@ interface ElementAttributeValues {
* @since 9
*/
windowId: number;
/**
* Indicates the offset.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
offset: number;
/**
* Indicates the text type.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
textType: string;
/**
* Indicates the accessibility text of component.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
accessibilityText: string;
/**
* Indicates the hot area of the element.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
hotArea: Rect;
}
/**

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import UIAbilityContext from './UIAbilityContext';
/**
* The context of an embeddable UIAbility.
*
* @extends UIAbilityContext
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 12
*/
export default class EmbeddableUIAbilityContext extends UIAbilityContext {
}

View File

@ -45,14 +45,14 @@ export default class ErrorObserver {
onUnhandledException(errMsg: string): void;
/**
* Will be called when the native executions exception.
* Will be called when the js runtime throws an exception which doesn't caught by user.
*
* @param { Error } errObject - the error object about the exception.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 10
*/
/**
* Will be called when the native executions exception.
* Will be called when the js runtime throws an exception which doesn't caught by user.
*
* @param { Error } errObject - the error object about the exception.
* @syscap SystemCapability.Ability.AbilityRuntime.Core

View File

@ -2472,7 +2472,7 @@ export default class UIAbilityContext extends Context {
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @StageModelOnly
* @crossplatform
* @atomicservice
* @since 12
@ -2570,4 +2570,48 @@ export default class UIAbilityContext extends Context {
* @since 11
*/
requestModalUIExtension(pickerWant: Want): Promise<void>;
/**
* Full-screen pop-us startup atomic service.
*
* @param { string } appId - The ID of the application to which this bundle belongs.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of openAtomicService.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000003 - The appId does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 12
*/
openAtomicService(appId: string, callback: AsyncCallback<AbilityResult>): void;
/**
* Full-screen pop-us startup atomic service.
*
* @param { string } appId - The ID of the application to which this bundle belongs.
* @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000003 - The appId does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 12
*/
openAtomicService(appId: string): Promise<AbilityResult>;
}

View File

@ -282,4 +282,80 @@ export default class UIExtensionContext extends ExtensionContext {
* @since 10
*/
disconnectServiceExtensionAbility(connection: number): Promise<void>;
}
/**
* Report to system when the extension is drawn completed.
*
* @param { AsyncCallback<void> } callback - The callback of startUIExtensionAbility.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
reportDrawnCompleted(callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
terminateSelf(callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension.
*
* @returns { Promise<void> } The promise returned by the function.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
terminateSelf(): Promise<void>;
/**
* Destroys the UI extension while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
/**
* Full-screen pop-us startup atomic service.
*
* @param { string } appId - The ID of the application to which this bundle belongs.
* @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000003 - The appId does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 12
*/
openAtomicService(appId: string): Promise<AbilityResult>;
}

View File

@ -43,6 +43,122 @@ export class FrameNode {
*/
getRenderNode(): RenderNode | null;
/**
* Return a flag to indicate whether the current FrameNode can be modified.
*
* @returns { boolean } - Returns true if the FrameNode can be modified, otherwise return false.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
isModifiable(): boolean;
/**
* Add child to the end of the FrameNode's children.
*
* @param { FrameNode } node - The node will be added.
* @throws { BusinessError } 100021 - The FrameNode is not modifiable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
appendChild(node: FrameNode): void;
/**
* Add child to the current FrameNode.
*
* @param { FrameNode } child - The node will be added.
* @param { FrameNode | null } sibling - The new node is added after this node. When sibling is null, insert node as the first children of the node.
* @throws { BusinessError } 100021 - The FrameNode is not modifiable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
insertChildAfter(child: FrameNode, sibling: FrameNode | null): void;
/**
* Remove child from the current FrameNode.
*
* @param { FrameNode } node - The node will be removed.
* @throws { BusinessError } 100021 - The FrameNode is not modifiable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
removeChild(node: FrameNode): void;
/**
* Clear children of the current FrameNode.
*
* @throws { BusinessError } 100021 - The FrameNode is not modifiable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
clearChildren(): void;
/**
* Get a child of the current FrameNode by index.
*
* @param { number } index - The index of the desired node in the children of FrameNode.
* @returns { FrameNode | null } - Returns a FrameNode. When the required node does not exist, returns null.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getChild(index: number): FrameNode | null;
/**
* Get the first child of the current FrameNode.
*
* @returns { FrameNode | null } - Returns a FrameNode, which is first child of the current FrameNode.
* If current FrameNode does not have child node, returns null.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getFirstChild(): FrameNode | null;
/**
* Get the next sibling node of the current FrameNode.
*
* @returns { FrameNode | null } - Returns a FrameNode. If current FrameNode does not have next sibling node, returns null.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getNextSibling(): FrameNode | null;
/**
* Get the previous sibling node of the current FrameNode.
*
* @returns { FrameNode | null } - Returns a FrameNode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getPreviousSibling(): FrameNode | null;
/**
* Get the parent node of the current FrameNode.
*
* @returns { FrameNode | null } - Returns a FrameNode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getParent(): FrameNode | null;
/**
* Get the children count of the current FrameNode.
*
* @returns { number } - Returns the number of the children of the current FrameNode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 12
*/
getChildrenCount(): number;
/**
* Dispose the FrameNode immediately.
*

View File

@ -529,6 +529,17 @@ export interface AbilityInfo {
* @since 11
*/
readonly windowSize: WindowSize;
/**
* Indicates whether to hide the application icon from the dock area
*
* @type { boolean }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @atomicservice
* @since 12
*/
readonly excludeFromDock: boolean;
}
/**

View File

@ -529,6 +529,16 @@ export interface ApplicationInfo {
* @since 11
*/
readonly dataUnclearable: boolean;
/**
* Indicates native library path.
*
* @type { string }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
readonly nativeLibraryPath: string;
}
/**

View File

@ -443,6 +443,27 @@ export interface HapModuleInfo {
* @since 12
*/
readonly routerMap: Array<RouterItem>;
/**
* Indicates the code path
*
* @type { string }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @atomicservice
* @since 12
*/
readonly codePath: string;
/**
* Indicates native library path.
*
* @type { string }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @since 12
*/
readonly nativeLibraryPath: string;
}
/**

View File

@ -197,7 +197,6 @@
"SystemCapability.Request.FileTransferAgent",
"SystemCapability.ResourceSchedule.DeviceStandby",
"SystemCapability.DistributedDataManager.UDMF.Core",
"SystemCapability.Print.PrintFramework",
"SystemCapability.Multimedia.Media.AVScreenCapture",
"SystemCapability.Multimedia.Media.SoundPool",
"SystemCapability.Multimedia.Audio.Spatialization",

View File

@ -187,7 +187,6 @@
"SystemCapability.Request.FileTransferAgent",
"SystemCapability.ResourceSchedule.DeviceStandby",
"SystemCapability.DistributedDataManager.UDMF.Core",
"SystemCapability.Print.PrintFramework",
"SystemCapability.Multimedia.Media.AVScreenCapture",
"SystemCapability.Multimedia.Media.SoundPool",
"SystemCapability.Multimedia.Audio.Spatialization",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -51,6 +51,15 @@ export interface NotificationBasicContent {
* @since 7
*/
additionalText?: string;
/**
* Data image of the lock screen.
*
* @type { ?image.PixelMap }
* @syscap SystemCapability.Notification.Notification
* @since 12
*/
lockscreenPicture?: image.PixelMap;
}
/**
@ -182,6 +191,16 @@ export interface NotificationLiveViewContent extends NotificationBasicContent {
* @since 11
*/
pictureInfo?: Record<string, Array<image.PixelMap>>;
/**
* Whether to update locally.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
isLocalUpdateOnly?: boolean;
}
/**
@ -344,6 +363,16 @@ export interface NotificationCapsule {
* @since 11
*/
backgroundColor?: string;
/**
* Extended text of this capsule.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
content?: string;
}
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -50,6 +50,15 @@ export interface NotificationRequest {
*/
id?: number;
/**
* Globally unique notification message ID defined by application.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 12
*/
appMessageId?: string;
/**
* Notification slot type.
*
@ -405,6 +414,36 @@ export interface NotificationRequest {
* @since 9
*/
badgeNumber?: number;
/**
* Whether the notification need to be agent display.
*
* @type { ?BundleOption }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
representativeBundle?: BundleOption;
/**
* Proxy identity of creation notification.
*
* @type { ?BundleOption }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
readonly agentBundle?: BundleOption;
/**
* Unified aggregation of information across applications.
*
* @type { ?UnifiedGroupInfo }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
unifiedGroupInfo?: UnifiedGroupInfo;
}
/**
@ -533,3 +572,63 @@ export interface NotificationCheckRequest {
*/
extraInfoKeys: Array<string>;
}
/**
* Unified aggregation of information across applications.
*
* @typedef UnifiedGroupInfo
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
export interface UnifiedGroupInfo {
/**
* The key is aggregated across applications.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
key?: string;
/**
* The title is aggregated across applications.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
title?: string;
/**
* The content is aggregated across applications.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
content?: string;
/**
* Aggregation scenario name.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
sceneName?: string;
/**
* Other information is aggregated across applications.
*
* @type { ?object }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
extraInfo?: { [key: string]: any };
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -153,4 +153,15 @@ export interface NotificationSlot {
* @since 11
*/
readonly reminderMode?: number;
/**
* Obtains channel information is authorized by the user.
*
* @type { ?number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
readonly authorizedStatus?: number;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -41,4 +41,14 @@ export interface NotificationSubscribeInfo {
* @since 7
*/
userId?: number;
/**
* Subscribing to Notifications Synchronized to Devices of a Specified Type.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
deviceType?: string;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -121,6 +121,15 @@ export interface NotificationSubscriber {
*/
onBadgeChanged?: (data: BadgeNumberCallbackData) => void;
/**
* Callback when badge enabled state changed.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
onBadgeEnabledChanged?: BadgeEnabledChangedCallback;
/**
* Callback when badge cancel notifications.
*
@ -199,7 +208,8 @@ export interface SubscribeCallbackData {
}
/**
* Describes the properties of the application that the permission to send notifications has changed.
* Describes the properties of the application that the permission to send notifications
* or the badge enabled state has changed.
*
* @typedef EnabledNotificationCallbackData
* @syscap SystemCapability.Notification.Notification
@ -283,3 +293,20 @@ export interface BadgeNumberCallbackData {
*/
readonly badgeNumber: number;
}
/**
* Defines the callback of BadgeEnabledChanged.
* @typedef BadgeEnabledChangedCallback
* @syscap SystemCapability.Notification.Notification
* @since 12
*/
export interface BadgeEnabledChangedCallback {
/**
* Defines the BadgeEnabledChanged callback.
* @param { EnabledNotificationCallbackData } data
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 12
*/
(data: EnabledNotificationCallbackData): void;
}

693
api/tag/nfctech.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,16 @@ import { AsyncCallback } from '../@ohos.base';
* @syscap SystemCapability.Communication.NFC.Tag
* @since 7
*/
/**
* Controls tag read and write.
* <p>Classes for different types of tags inherit from this abstract class to control connections to
* tags, read data from tags, and write data to tags.
*
* @typedef TagSession
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
export interface TagSession {
/**
* Obtains the tag information.
@ -61,6 +71,17 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Connects to a tag. Must be called before data is read from or written to the tag.
*
* @permission ohos.permission.NFC_TAG
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
connect(): void;
/**
@ -84,6 +105,17 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Resets a connection with a tag and restores the default timeout duration for writing data to the tag.
*
* @permission ohos.permission.NFC_TAG
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
resetConnection(): void;
/**
@ -106,6 +138,15 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Checks whether a connection has been set up with a tag.
*
* @returns { boolean } Returns true if tag connected, otherwise false.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
isConnected(): boolean;
/**
@ -134,6 +175,19 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Sets the timeout duration (ms) for sending data to a tag.
*
* @permission ohos.permission.NFC_TAG
* @param { number } timeout Indicates the timeout duration to be set.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
setTimeout(timeout: number): void;
/**
@ -159,6 +213,18 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Obtains the timeout duration (ms) for sending data to a tag.
*
* @permission ohos.permission.NFC_TAG
* @returns { number } Returns the timeout duration.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
getTimeout(): number;
/**
@ -203,6 +269,21 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Writes data to a tag.
*
* @permission ohos.permission.NFC_TAG
* @param { number[] } data Indicates the data to be written to the tag.
* @returns { Promise<number[]> } Returns bytes received in response. Or bytes with a length of 0 if the
* data fails to be written to the tag.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
transmit(data: number[]): Promise<number[]>;
/**
@ -218,6 +299,20 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Writes data to a tag.
*
* @permission ohos.permission.NFC_TAG
* @param { number[] } data Indicates the data to be written to the tag.
* @param { AsyncCallback<number[]> } callback The callback.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
transmit(data: number[], callback: AsyncCallback<number[]>): void;
/**
@ -243,5 +338,17 @@ export interface TagSession {
* @syscap SystemCapability.Communication.NFC.Tag
* @since 9
*/
/**
* Obtains the maximum length of data that can be sent to a tag.
*
* @permission ohos.permission.NFC_TAG
* @returns { number } Returns the maximum length of the data to be sent to the tag.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 3100201 - Tag running state is abnormal in service.
* @syscap SystemCapability.Communication.NFC.Tag
* @atomicservice
* @since 12
*/
getMaxTransmitSize(): number;
}

View File

@ -1,7 +1,7 @@
{
"name": "api-checker",
"version": "1.0.0",
"checkApiVersion": "11",
"checkApiVersion": "12",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -3899,6 +3899,7 @@ ast
astaire
astarte
astatine
astc
aster
asteria
asterisk

View File

@ -27,6 +27,7 @@ const {
getCheckApiVersion,
FUNCTION_TYPES,
DIFF_INFO,
createErrorInfo
} = require('./utils');
const ts = requireTypescriptModule();
const { addAPICheckErrorLogs } = require('./compile_info');
@ -95,7 +96,7 @@ function checkApiChangeVersion(currentJSDoc, lastJSDoc, node) {
if (lastVersion === 0 || currentVersion !== checkApiVersion) {
changeErrors.push({
node: node,
errorInfo: ErrorValueInfo.ERROR_CHANGES_VERSION,
errorInfo: createErrorInfo(ErrorValueInfo.ERROR_CHANGES_VERSION, [checkApiVersion]),
LogType: LogType.LOG_JSDOC,
});
}

View File

@ -354,7 +354,7 @@ const ErrorValueInfo = {
ERROR_EVENT_CALLBACK_MISSING: 'The off functions of one single event should have at least one callback parameter, and the callback parameter should be the last parameter.',
ERROR_EVENT_ON_AND_OFF_PAIR: 'The on and off event subscription methods do not appear in pair.',
ILLEGAL_USE_ANY: 'Illegal [any] keyword used in the API',
ERROR_CHANGES_VERSION: 'Please check if the changed API version number is 10.',
ERROR_CHANGES_VERSION: 'Please check if the changed API version number is $$.',
ERROR_CHANGES_API_HISTORY_PARAM_REQUIRED_CHANGE: 'Forbid changes: Optional parameters cannot be changed to required parameters.',
ERROR_CHANGES_API_HISTORY_PARAM_RANGE_CHANGE: 'Forbid changes: Parameters type range cannot be reduced.',
ERROR_CHANGES_API_HISTORY_PARAM_WITHOUT_TYPE_CHANGE: 'Forbid changes: Parameters Parameter must be defined by type.',

View File

@ -0,0 +1,30 @@
# missing _mark _detection
#### Description
漏标检查
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature

View File

@ -0,0 +1,31 @@
# missing _mark _detection
#### 介绍
漏标检查
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技

View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

@ -0,0 +1,178 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from src.utils.util import (get_start_characters, get_remaining_characters, json_file_data, label_type_conversion,
get_check_labels, generate_excel, get_position_information, set_label_to_result)
from src.utils.constants import mutex_label_dist, contrast_function, label_name_dist
from src.typedef.detection import Output, ErrorMessage, ErrorType
result_list = []
def judgement_dict_data(result, result_key):
my_dict = dict()
for dict_data in result[result_key]: # 代表对应文件的解析数据
# 互斥标签
if 'jsDocInfos' in dict_data:
if len(dict_data['jsDocInfos']) > 0:
get_mutex_label(dict_data)
# 枚举类标签检测
if dict_data['apiType'] == 'Enum':
enum_label_detection(dict_data)
my_dict[dict_data['definedText']] = dict_data
dict_keys = dict_data.keys()
if 'childApis' in dict_keys: # 递归处理child
judgement_dict_data(dict_data, 'childApis')
# 命令控制是否校验成对函数漏标
if 1 == 1:
paired_function_omission_label(my_dict)
def enum_label_detection(parent_enum_info: dict):
parent_js_doc_info = get_js_doc_info(parent_enum_info['jsDocInfos'])
if not parent_js_doc_info['isAtomicService']:
return
children_list = parent_enum_info['childApis']
count = 0
for child_info in children_list:
child_doc_info = get_js_doc_info(child_info['jsDocInfos'])
if child_doc_info['isAtomicService']:
count = count + 1
if count == 0:
result = Output(parent_enum_info['filePath'], ErrorType.ENUM_LABEL.value, parent_enum_info['definedText'],
get_position_information(parent_enum_info['pos']),
set_label_to_result(ErrorMessage.ENUM_LABEL.value,
parent_enum_info['apiName'], label_name_dist.get('isAtomicService')))
result_list.append(result)
#成对出现的函数漏标
def paired_function_omission_label(my_dict: dict):
filter_duplicates_dist = [] # 存储结果,防止重复
for defined_text in my_dict:
if is_pairing_function(defined_text, my_dict):
pairing(defined_text, my_dict, filter_duplicates_dist)
def is_pairing_function(defined_text, my_dict: dict):
api_type = my_dict[defined_text]['apiType']
if api_type != 'Method':
return False
start = get_start_characters(my_dict[defined_text]['apiName'])
return start in contrast_function.keys()
def pairing(defined_text, my_dict, filter_duplicates_dist):
four_twin_list = ['off', 'on', 'emit', 'once']
function_name = my_dict[defined_text]['apiName']
start = get_start_characters(function_name)
api_name_list = []
# 4个中的其中之一
if start in four_twin_list:
dismantle_four_twin(my_dict, four_twin_list, start, function_name, api_name_list)
else:
dismantle_ordinary(start, my_dict, function_name, api_name_list)
# 找到对应的函数
if len(api_name_list) != 0:
ff = my_dict[defined_text]
for api_name in api_name_list:
api_info = my_dict[api_name]
handling_missing_labels(ff, api_info, filter_duplicates_dist)
def dismantle_four_twin(my_dict: dict, four_twin_list, start, function_name, api_name_list):
for func in my_dict:
if get_start_characters(my_dict[func]['apiName']) in four_twin_list:
if (get_remaining_characters(get_start_characters(my_dict[func]['apiName']), my_dict[func]['apiName'])
== get_remaining_characters(start, function_name)):
api_name_list.append(func)
def dismantle_ordinary(start, my_dict: dict, function_name, api_name_list):
relative_function = contrast_function.get(start)
for api_name in my_dict:
if get_start_characters(my_dict[api_name]['apiName']) == relative_function:
if (get_remaining_characters(relative_function, my_dict[api_name]['apiName'])
== get_remaining_characters(start, function_name)):
api_name_list.append(api_name)
# 处理成对函数漏标问题
def handling_missing_labels(function_target_data: dict, function_relative_data: dict, filter_duplicates_dist):
target_doc_infos = function_target_data['jsDocInfos']
relative_doc_infos = function_relative_data['jsDocInfos']
target_doc_info = target_doc_infos[len(target_doc_infos) - 1]
relative_doc_info = relative_doc_infos[len(relative_doc_infos) - 1]
target_label_info = get_check_labels(target_doc_info)
relative_label_info = get_check_labels(relative_doc_info)
diff = target_label_info.keys() & relative_label_info
diff_vals = [k for k in diff if target_label_info[k] != relative_label_info[k]]
if len(diff_vals) == 0:
return
for val in diff_vals:
if target_label_info.get(val):
get_label_exclusivity_results(function_relative_data, filter_duplicates_dist, val)
else:
get_label_exclusivity_results(function_target_data, filter_duplicates_dist, val)
def get_label_exclusivity_results(relative_data: dict, filter_duplicates_dist, val):
defined_text = relative_data['definedText'] + val
if defined_text not in filter_duplicates_dist:
result = Output(relative_data['filePath'], ErrorType.RELATIVE_LABEL.value, relative_data['definedText'],
get_position_information(relative_data['pos']),
set_label_to_result(ErrorMessage.RELATIVE_LABEL.value,
relative_data['apiName'], label_name_dist.get(val)))
result_list.append(result)
filter_duplicates_dist.append(relative_data['definedText'] + val)
# 互斥标签排查
def get_mutex_label(api_info: dict):
doc_info = get_js_doc_info(api_info['jsDocInfos'])
if doc_info is None:
return
for label in mutex_label_dist:
mutex_label_list = mutex_label_dist.get(label)
is_label_consistent(doc_info, label, mutex_label_list, api_info)
def is_label_consistent(doc_info: dict, label, mutex_label_list, api_info):
is_dimension = label_type_conversion(doc_info[label])
if not is_dimension:
return
for mutex_label in mutex_label_list:
if label_type_conversion(doc_info[mutex_label]):
result = Output(api_info['filePath'], ErrorType.MUTEX_LABEL.value, api_info['definedText'],
get_position_information(api_info['pos']),
set_label_to_result(ErrorMessage.MUTEX_LABEL.value, label_name_dist.get(label),
label_name_dist.get(mutex_label)))
result_list.append(result)
def get_js_doc_info(js_doc_info_list: list):
if len(js_doc_info_list) > 0:
return js_doc_info_list[len(js_doc_info_list) - 1]
return None
# 按装订区域中的绿色按钮以运行脚本。
if __name__ == '__main__':
path = r'E:\python_workspace\collect_0_0.json'
data = json_file_data(path)
for key in data: # 代表每个ts文件
judgement_dict_data(data, key)
generate_excel(result_list, '')

View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

@ -0,0 +1,44 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import enum
class Output:
file_path = ''
error_type = ''
defined_text = ''
position = ''
error_info = ''
def __init__(self, file_path, error_type, defined_text, position, error_info):
self.file_path = file_path
self.error_type = error_type
self.defined_text = defined_text
self.position = position
self.error_info = error_info
class ErrorMessage(enum.Enum):
MUTEX_LABEL = 'In the same API, [$] tag and [&] tag are mutually exclusive'
RELATIVE_LABEL = 'Functions that appear in pairs,[$] function missing [&] tag'
ENUM_LABEL = ('The enumeration type [$] is labeled with [&], but none of the enumeration '
'values are labeled with this label')
class ErrorType(enum.Enum):
MUTEX_LABEL = 'mutex_label'
ENUM_LABEL = 'enum_value_missing_label'
RELATIVE_LABEL = 'paired_function_omission_label'

View File

@ -0,0 +1,71 @@
#!/usr/bin/env python
# coding=utf-8
##############################################
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################
mutex_label_dist = {
'isAtomicService': ['deprecatedVersion', 'isSystemApi']
}
label_name_dist = {
'isAtomicService': '@atomicservice',
'deprecatedVersion': '@deprecated',
'isSystemApi': '@systemapi',
'isForm': '@form',
'isCrossPlatForm': '@crossplatform'
}
contrast_function = {
'add': 'remove',
'increase': 'decrease',
'open': 'close',
'begin': 'end',
'insert': 'delete',
'show': 'hide',
'create': 'destroy',
'lock': 'unlock',
'source': 'target',
'first': 'last',
'min': 'max',
'start': 'stop',
'get': 'set',
'next': 'previous',
'up': 'down',
'new': 'old',
'on': 'off',
'once': 'emit',
"remove": "add",
"decrease": "increase",
"close": "open",
"end": "begin",
"delete": "insert",
"hide": "show",
"destroy": "create",
"unlock": "lock",
"target": "source",
"last": "first",
"max": "min",
"stop": "start",
"set": "get",
"previous": "next",
"down": "up",
"old": "new",
"off": "on",
"emit": "once"
}

View File

@ -0,0 +1,84 @@
#!/usr/bin/env python
# coding=utf-8
##############################################
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################
import json
import re
import openpyxl as op
def get_start_characters(target_character):
pattern = r'([a-z]*)'
match = re.search(pattern, target_character)
if match:
return match.group()[:match.end()]
else:
return ''
#剩余字符
def get_remaining_characters(start_character, target_character):
return target_character[target_character.index(start_character) + len(start_character):]
def json_file_data(file_path): # json文件转为dict数据
with open(file_path, 'r', encoding='utf-8') as file:
dict_data = json.load(file)
file.close()
return dict_data
def label_type_conversion(tagged_value):
if tagged_value == '':
return False
if tagged_value == '-1':
return False
if not tagged_value:
return False
return True
def get_check_labels(doc_info: dict):
if len(doc_info) > 0:
return {'isAtomicService': doc_info['isAtomicService'], 'isForm': doc_info['isForm'],
'isCrossPlatForm': doc_info['isCrossPlatForm']}
else:
return {}
def generate_excel(result_info_list: list, output_address):
data = []
for diff_info in result_info_list:
info_data = [diff_info.file_path, diff_info.error_type, diff_info.defined_text, diff_info.position,
diff_info.error_info]
data.append(info_data)
wb = op.Workbook()
ws = wb['Sheet']
ws.append(['文件路径', '错标类型', 'api信息', '位置信息', '漏标详情'])
for title in data:
d = title[0], title[1], title[2], title[3], title[4]
ws.append(d)
wb.save(output_address)
def get_position_information(pos: dict):
return 'line: ' + str(pos['line']) + ', character: ' + str(pos['character'])
def set_label_to_result(message, label, mutex_label):
return message.replace('$', label).replace('&', mutex_label)

View File

@ -46,6 +46,7 @@
"ListItemGroup",
"LoadingProgress",
"Marquee",
"MediaCachedImage",
"Menu",
"MenuItem",
"MenuItemGroup",
@ -301,6 +302,11 @@
"type": "MarqueeAttribute",
"instance": "MarqueeInstance"
},
{
"name": "MediaCachedImage",
"type": "MediaCachedImageAttribute",
"instance": "MediaCachedImageInstance"
},
{
"name": "Menu",
"type": "MenuAttribute",

View File

@ -16,12 +16,13 @@
"apiType": "Class",
"definedText": " export class Test",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Property",
"definedText": "const CONSTANT: string;",
"pos": {
"line": 5,
"line": 20,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Property",
"definedText": "const CONSTANT: string;",
"pos": {
"line": 5,
"line": 20,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -22,7 +22,8 @@
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_constant_in_struct.d.ets",
@ -47,6 +48,7 @@
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Property",
"definedText": "export declare const CONSTANT: string;",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Property",
"definedText": "declare const CONSTANT: string;",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Property",
"definedText": "declare const CONSTANT: PropertyDecorator & ((value: string) => PropertyDecorator);",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Constant",
"definedText": "declare const CONSTANT = string;",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Constant",
"definedText": "declare const CONSTANT = 1024;",
"pos": {
"line": 4,
"line": 19,
"character": 1
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,12 +16,13 @@
"apiType": "Class",
"definedText": " class TestInterface",
"pos": {
"line": 2,
"line": 17,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -24,7 +24,8 @@
"decorators": [
"Component"
],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_decorator_argument.d.ets",
@ -51,6 +52,7 @@
"decorators": [
"Provide"
],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -24,6 +24,7 @@
"decorators": [
"Component"
],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,13 +16,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_ONE",
"pos": {
"line": 3,
"line": 18,
"character": 5
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_in_namespace.d.ts",
@ -41,13 +42,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_Two = 'testTwo'",
"pos": {
"line": 4,
"line": 19,
"character": 5
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_in_namespace.d.ts",
@ -66,12 +68,13 @@
"apiType": "EnumValue",
"definedText": "VALUE_THREE = 'testThree'",
"pos": {
"line": 5,
"line": 20,
"character": 5
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,13 +16,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_ONE",
"pos": {
"line": 2,
"line": 17,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_no_value_001.d.ts",
@ -41,13 +42,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_TWO",
"pos": {
"line": 3,
"line": 18,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_no_value_001.d.ts",
@ -66,12 +68,13 @@
"apiType": "EnumValue",
"definedText": "VALUE_THREE",
"pos": {
"line": 4,
"line": 19,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

View File

@ -16,13 +16,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_ONE = 1",
"pos": {
"line": 2,
"line": 17,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_no_value_002.d.ts",
@ -41,13 +42,14 @@
"apiType": "EnumValue",
"definedText": "VALUE_TWO",
"pos": {
"line": 3,
"line": 18,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
},
{
"filePath": "ut_enum_no_value_002.d.ts",
@ -66,12 +68,13 @@
"apiType": "EnumValue",
"definedText": "VALUE_THREE = 4",
"pos": {
"line": 4,
"line": 19,
"character": 3
},
"isSystemapi": false,
"modelLimitation": "",
"decorators": [],
"errorCodes": []
"errorCodes": [],
"kitInfo": ""
}
]

Some files were not shown because too many files have changed in this diff Show More