diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2099f741b11d2a59138c921b2b38f9762a3829c3
--- /dev/null
+++ b/api/@ohos.net.connection.d.ts
@@ -0,0 +1,285 @@
+/*
+ * Copyright (C) 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 {AsyncCallback, Callback} from "./basic";
+import http from "./@ohos.net.http";
+import socket from "./@ohos.net.socket";
+
+/**
+ * Provides interfaces to manage and use data networks.
+ *
+ * @since 8
+ * @sysCap SystemCapability.Communication.NetManager.Core
+ */
+declare namespace connection {
+ type HttpRequest = http.HttpRequest;
+ type TCPSocket = socket.TCPSocket;
+ type UDPSocket = socket.UDPSocket;
+
+ /**
+ * Create a network connection with optional netSpefifier and timeout.
+ *
+ * @param netSpecifier Indicates the network specifier. See {@link NetSpecifier}.
+ * @param timeout The time in milliseconds to attempt looking for a suitable network before
+ * {@link NetConnection#netUnavailable} is called.
+ */
+ function createNetConnection(netSpecifier?: NetSpecifier, timeout?: number): NetConnection;
+
+ /**
+ * Obtains the data network that is activated by default.
+ *
+ *
To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.
+ *
+ * @param callback Returns the {@link NetHandle} object;
+ * returns {@code null} if the default network is not activated.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getDefaultNet(callback: AsyncCallback): void;
+ function getDefaultNet(): Promise;
+
+ /**
+ * Obtains the list of data networks that are activated.
+ *
+ * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.
+ *
+ * @param callback Returns the {@link NetHandle} object; returns {@code null} if no network is activated.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getAllNets(callback: AsyncCallback>): void;
+ function getAllNets(): Promise>;
+
+ /**
+ * Queries the connection properties of a network.
+ *
+ * This method requires the {@code ohos.permission.GET_NETWORK_INFO} permission.
+ *
+ * @param netHandle Indicates the network to be queried.
+ * @param callback Returns the {@link ConnectionProperties} object.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback): void;
+ function getConnectionProperties(netHandle: NetHandle): Promise;
+
+ /**
+ * Obtains {@link NetCapabilities} of a {@link NetHandle} object.
+ *
+ * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.
+ *
+ * @param netHandle Indicates the handle. See {@link NetHandle}.
+ * @param callback Returns {@link NetCapabilities}; returns {@code null} if {@code handle} is invalid.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback): void;
+ function getNetCapabilities(netHandle: NetHandle): Promise;
+
+ /**
+ * Checks whether the default data network is activated.
+ *
+ * @param callback Returns {@code true} if the default data network is activated; returns {@code false} otherwise.
+ */
+ function hasDefaultNet(callback: AsyncCallback): void;
+ function hasDefaultNet(): Promise;
+
+ /**
+ * Enables the airplane mode for a device.
+ *
+ * @systemapi Hide this for inner system use. Only used for system app.
+ */
+ function enableAirplaneMode(callback: AsyncCallback): void;
+ function enableAirplaneMode(): Promise;
+
+ /**
+ * Disables the airplane mode for a device.
+ *
+ * @systemapi Hide this for inner system use. Only used for system app.
+ */
+ function disableAirplaneMode(callback: AsyncCallback): void;
+ function disableAirplaneMode(): Promise;
+
+ /**
+ * Reports the network state is connected.
+ *
+ * @param netHandle Indicates the network whose state is to be reported.
+ * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+ */
+ function reportNetConnected(netHandle: NetHandle, callback: AsyncCallback): void;
+ function reportNetConnected(netHandle: NetHandle): Promise;
+
+ /**
+ * Reports the network state is disconnected.
+ *
+ * @param netHandle Indicates the network whose state is to be reported.
+ * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET
+ */
+ function reportNetDisconnected(netHandle: NetHandle, callback: AsyncCallback): void;
+ function reportNetDisconnected(netHandle: NetHandle): Promise;
+
+ /**
+ * Resolves the host name to obtain all IP addresses based on the default data network.
+ *
+ * @param host Indicates the host name or the domain.
+ * @param callback Returns the NetAddress list.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getAddressesByName(host: string, callback: AsyncCallback>): void;
+ function getAddressesByName(host: string): Promise>;
+
+ export interface NetConnection {
+ on(type: 'netAvailable', callback: Callback): void;
+
+ on(type: 'netBlockStatusChange', callback: Callback<{ netHandle: NetHandle, blocked: boolean }>): void;
+
+ on(type: 'netCapabilitiesChange', callback: Callback<{ netHandle: NetHandle, netCap: NetCapabilities }>): void;
+
+ on(type: 'netConnectionPropertiesChange', callback: Callback<{ netHandle: NetHandle, connectionProperties: ConnectionProperties }>): void;
+
+ on(type: 'netLost', callback: Callback): void;
+
+ on(type: 'netUnavailable', callback: Callback): void;
+
+ /**
+ * Receives status change notifications of a specified network.
+ *
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ register(callback: AsyncCallback): void;
+
+ /**
+ * Cancels listening for network status changes.
+ */
+ unregister(callback: AsyncCallback): void;
+ }
+
+ export interface NetSpecifier {
+ netCapabilities: NetCapabilities;
+ bearerPrivateIdentifier?: string;
+ }
+
+ export interface NetHandle {
+ netId: number;
+
+ /**
+ * Binds a TCPSocket or UDPSocket to the current network. All data flows from
+ * the socket will use this network, without being subject to {@link setAppNet}.
+ * Before using this method, ensure that the socket is disconnected.
+ *
+ * @param socketParam Indicates the TCPSocket or UDPSocket object.
+ */
+ bindSocket(socketParam: TCPSocket | UDPSocket, callback: AsyncCallback): void;
+ bindSocket(socketParam: TCPSocket | UDPSocket): Promise;
+
+ /**
+ * Resolves a host name to obtain all IP addresses based on the specified NetHandle.
+ *
+ * @param host Indicates the host name or the domain.
+ * @param callback Returns the NetAddress list.
+ */
+ getAddressesByName(host: string, callback: AsyncCallback>): void;
+ getAddressesByName(host: string): Promise>;
+
+ /**
+ * Resolves a host name to obtain the first IP address based on the specified NetHandle.
+ *
+ * @param host Indicates the host name or the domain.
+ * @return Returns the first NetAddress.
+ */
+ getAddressByName(host: string, callback: AsyncCallback): void;
+ getAddressByName(host: string): Promise;
+ }
+
+ export interface NetCapabilities {
+ linkUpBandwidthKbps?: number;
+ linkDownBandwidthKbps?: number;
+ networkCap?: Array;
+ bearerTypes: Array;
+ }
+
+ export enum NetCap {
+ /**
+ * Indicates that the network can access the carrier's MMSC to send and receive multimedia messages.
+ */
+ NET_CAPABILITY_MMS = 0,
+
+ /**
+ * Indicates that the network traffic is not metered.
+ */
+ NET_CAPABILITY_NOT_METERED = 11,
+
+ /**
+ * Indicates that the network can access the Internet.
+ */
+ NET_CAPABILITY_INTERNET = 12,
+
+ /**
+ * Indicates that the network does not use a VPN.
+ */
+ NET_CAPABILITY_NOT_VPN = 15,
+
+ /**
+ * Indicates that the network is available.
+ */
+ NET_CAPABILITY_VALIDATED = 16,
+ }
+
+ export enum NetBearType {
+ /**
+ * Indicates that the network is based on a cellular network.
+ */
+ BEARER_CELLULAR = 0,
+
+ /**
+ * Indicates that the network is based on a Wi-Fi network.
+ */
+ BEARER_WIFI = 1,
+
+ /**
+ * Indicates that the network is an Ethernet network.
+ */
+ BEARER_ETHERNET = 3,
+ }
+
+ export interface ConnectionProperties {
+ interfaceName: string;
+ domains: string;
+ linkAddresses: Array;
+ dnses: Array;
+ routes: Array;
+ mtu: number;
+ }
+
+ export interface RouteInfo {
+ interface: string;
+ destination: LinkAddress;
+ gateway: NetAddress;
+ hasGateway: boolean;
+ isDefaultRoute: boolean;
+ }
+
+ export interface LinkAddress {
+ address: NetAddress;
+ prefixLength: number;
+ }
+
+ /**
+ * @since 7
+ */
+ export interface NetAddress {
+ address: string;
+ family?: number; // IPv4 = 1; IPv6 = 2, default is IPv4
+ port?: number; // [0, 65535]
+ }
+}
+
+export default connection;
\ No newline at end of file
diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8e5a182da1d46e7d767cd676836754987c538a3f
--- /dev/null
+++ b/api/@ohos.net.http.d.ts
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2021 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 {AsyncCallback, Callback} from "./basic";
+
+/**
+ * Provides http related APIs.
+ *
+ * @since 6
+ * @sysCap SystemCapability.Communication.NetStack
+ */
+declare namespace http {
+ /**
+ * Creates an HTTP request task.
+ */
+ function createHttp(): HttpRequest;
+
+ export interface HttpRequestOptions {
+ /**
+ * Request method.
+ */
+ method?: RequestMethod; // default is GET
+ /**
+ * Additional data of the request.
+ * extraData can be a string or an Object (API 6) or an ArrayBuffer(API 8).
+ */
+ extraData?: string | Object | ArrayBuffer;
+ /**
+ * HTTP request header.
+ */
+ header?: Object; // default is 'content-type': 'application/json'
+ /**
+ * Read timeout period. The default value is 60,000, in ms.
+ */
+ readTimeout?: number; // default is 60s
+ /**
+ * Connection timeout interval. The default value is 60,000, in ms.
+ */
+ connectTimeout?: number; // default is 60s.
+ }
+
+ export interface HttpRequest {
+ /**
+ * Initiates an HTTP request to a given URL.
+ *
+ * @param url URL for initiating an HTTP request.
+ * @param options Optional parameters {@link HttpRequestOptions}.
+ * @param callback Returns {@link HttpResponse}.
+ * @permission ohos.permission.INTERNET
+ */
+ request(url: string, callback: AsyncCallback): void;
+ request(url: string, options: HttpRequestOptions, callback: AsyncCallback): void;
+ request(url: string, options?: HttpRequestOptions): Promise;
+
+ /**
+ * Destroys an HTTP request.
+ */
+ destroy(): void;
+
+ /**
+ * Registers an observer for HTTP Response Header events.
+ */
+ on(type: "headerReceive", callback: AsyncCallback): void;
+
+ /**
+ * Unregisters the observer for HTTP Response Header events.
+ */
+ off(type: "headerReceive", callback?: AsyncCallback): void;
+ }
+
+ export enum RequestMethod {
+ OPTIONS = "OPTIONS",
+ GET = "GET",
+ HEAD = "HEAD",
+ POST = "POST",
+ PUT = "PUT",
+ DELETE = "DELETE",
+ TRACE = "TRACE",
+ CONNECT = "CONNECT"
+ }
+
+ export enum ResponseCode {
+ OK = 200,
+ CREATED,
+ ACCEPTED,
+ NOT_AUTHORITATIVE,
+ NO_CONTENT,
+ RESET,
+ PARTIAL,
+ MULT_CHOICE = 300,
+ MOVED_PERM,
+ MOVED_TEMP,
+ SEE_OTHER,
+ NOT_MODIFIED,
+ USE_PROXY,
+ BAD_REQUEST = 400,
+ UNAUTHORIZED,
+ PAYMENT_REQUIRED,
+ FORBIDDEN,
+ NOT_FOUND,
+ BAD_METHOD,
+ NOT_ACCEPTABLE,
+ PROXY_AUTH,
+ CLIENT_TIMEOUT,
+ CONFLICT,
+ GONE,
+ LENGTH_REQUIRED,
+ PRECON_FAILED,
+ ENTITY_TOO_LARGE,
+ REQ_TOO_LONG,
+ UNSUPPORTED_TYPE,
+ INTERNAL_ERROR = 500,
+ NOT_IMPLEMENTED,
+ BAD_GATEWAY,
+ UNAVAILABLE,
+ GATEWAY_TIMEOUT,
+ VERSION
+ }
+
+ export interface HttpResponse {
+ /**
+ * result can be a string or an Object (API 6) or an ArrayBuffer(API 8).
+ */
+ result: string | Object | ArrayBuffer;
+ /**
+ * Server status code.
+ */
+ responseCode: ResponseCode | number;
+ /**
+ * All headers in the response from the server.
+ */
+ header: Object;
+ /**
+ * @since 8
+ */
+ cookies: string;
+ }
+}
+
+export default http;
\ No newline at end of file
diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..61d4ea4165a7face43f4b04b74e8d7a1d9ff3320
--- /dev/null
+++ b/api/@ohos.net.socket.d.ts
@@ -0,0 +1,319 @@
+/*
+* Copyright (C) 2021 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 {AsyncCallback, Callback, ErrorCallback} from "./basic";
+import connection from "./@ohos.net.connection";
+
+/**
+ * Provides TCP and UDP Socket APIs.
+ *
+ * @since 7
+ * @sysCap SystemCapability.Communication.NetStack
+ */
+declare namespace socket {
+ export import NetAddress = connection.NetAddress;
+
+ /**
+ * Creates a UDPSocket object.
+ */
+ function constructUDPSocketInstance(): UDPSocket;
+
+ /**
+ * Creates a TCPSocket object.
+ */
+ function constructTCPSocketInstance(): TCPSocket;
+
+ export interface UDPSendOptions {
+ /**
+ * Data to send.
+ */
+ data: string | ArrayBuffer;
+ /**
+ * Destination address.
+ */
+ address: NetAddress;
+ }
+
+ export interface ExtraOptionsBase {
+ /**
+ * Size of the receive buffer, in MBS.
+ */
+ receiveBufferSize?: number;
+ /**
+ * Size of the send buffer, in MBS.
+ */
+ sendBufferSize?: number;
+ /**
+ * Whether to reuse addresses. The default value is false.
+ */
+ reuseAddress?: boolean;
+ /**
+ * Timeout duration of the UDPSocket connection, in milliseconds.
+ */
+ socketTimeout?: number;
+ }
+
+ export interface UDPExtraOptions extends ExtraOptionsBase {
+ /**
+ * Whether to send broadcast messages. The default value is false.
+ */
+ broadcast?: boolean;
+ }
+
+ export interface SocketStateBase {
+ /**
+ * Whether the connection is in the bound state.
+ */
+ isBound: boolean;
+ /**
+ * Whether the connection is in the closed state.
+ */
+ isClose: boolean;
+ /**
+ * Whether the connection is in the connected state.
+ */
+ isConnected: boolean;
+ }
+
+ export interface SocketRemoteInfo {
+ /**
+ * Bound IP address.
+ */
+ address: string;
+ /**
+ * Network protocol type. The options are as follows: IPv4, IPv6.
+ */
+ family: 'IPv4' | 'IPv6';
+ /**
+ * Port number. The value ranges from 0 to 65535.
+ */
+ port: number;
+ /**
+ * Length of the server response message, in bytes.
+ */
+ size: number;
+ }
+
+ export interface UDPSocket {
+ /**
+ * Binds the IP address and port number. The port number can be specified or randomly allocated by the system.
+ *
+ * @param address Destination address. {@link NetAddress}
+ * @permission ohos.permission.INTERNET
+ */
+ bind(address: NetAddress, callback: AsyncCallback): void;
+ bind(address: NetAddress): Promise;
+
+ /**
+ * Sends data over a UDPSocket connection.
+ *
+ * @param options Optional parameters {@link UDPSendOptions}.
+ * @permission ohos.permission.INTERNET
+ */
+ send(options: UDPSendOptions, callback: AsyncCallback): void;
+ send(options: UDPSendOptions): Promise;
+
+ /**
+ * Closes a UDPSocket connection.
+ * @permission ohos.permission.INTERNET
+ */
+ close(callback: AsyncCallback): void;
+ close(): Promise;
+
+ /**
+ * Obtains the status of the UDPSocket connection.
+ *
+ * @param callback Callback used to return the result. {@link SocketStateBase}.
+ * @permission ohos.permission.INTERNET
+ */
+ getState(callback: AsyncCallback): void;
+ getState(): Promise;
+
+ /**
+ * Sets other attributes of the UDPSocket connection.
+ *
+ * @param options Optional parameters {@link UDPExtraOptions}.
+ * @permission ohos.permission.INTERNET
+ */
+ setExtraOptions(options: UDPExtraOptions, callback: AsyncCallback): void;
+ setExtraOptions(options: UDPExtraOptions): Promise;
+
+ /**
+ * Listens for message receiving events of the UDPSocket connection.
+ */
+ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void;
+
+ /**
+ * Cancels listening for message receiving events of the UDPSocket connection.
+ */
+ off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void;
+
+ /**
+ * Listens for data packet message events or close events of the UDPSocket connection.
+ */
+ on(type: 'listening' | 'close', callback: Callback): void;
+
+ /**
+ * Cancels listening for data packet message events or close events of the UDPSocket connection.
+ */
+ off(type: 'listening' | 'close', callback?: Callback): void;
+
+ /**
+ * Listens for error events of the UDPSocket connection.
+ */
+ on(type: 'error', callback: ErrorCallback): void;
+
+ /**
+ * Cancels listening for error events of the UDPSocket connection.
+ */
+ off(type: 'error', callback?: ErrorCallback): void;
+ }
+
+ export interface TCPConnectOptions {
+ /**
+ * Bound IP address and port number.
+ */
+ address: NetAddress;
+ /**
+ * Timeout duration of the TCPSocket connection, in milliseconds.
+ */
+ timeout?: number;
+ }
+
+ export interface TCPSendOptions {
+ /**
+ * Data to send.
+ */
+ data: string | ArrayBuffer;
+ /**
+ * Character encoding format.
+ */
+ encoding?: string;
+ }
+
+ export interface TCPExtraOptions extends ExtraOptionsBase {
+ /**
+ * Whether to keep the connection alive. The default value is false.
+ */
+ keepAlive?: boolean;
+ /**
+ * Whether to enable OOBInline. The default value is false.
+ */
+ OOBInline?: boolean;
+ /**
+ * Whether to enable no-delay on the TCPSocket connection. The default value is false.
+ */
+ TCPNoDelay?: boolean;
+ /**
+ * Socket linger.
+ */
+ socketLinger: {on: boolean, linger: number};
+ }
+
+ export interface TCPSocket {
+ /**
+ * Binds the IP address and port number. The port number can be specified or randomly allocated by the system.
+ *
+ * @param address Destination address. {@link NetAddress}
+ * @permission ohos.permission.INTERNET
+ */
+ bind(address: NetAddress, callback: AsyncCallback): void;
+ bind(address: NetAddress): Promise;
+
+ /**
+ * Sets up a connection to the specified IP address and port number.
+ *
+ * @param options Optional parameters {@link TCPConnectOptions}.
+ * @permission ohos.permission.INTERNET
+ */
+ connect(options: TCPConnectOptions, callback: AsyncCallback): void;
+ connect(options: TCPConnectOptions): Promise;
+
+ /**
+ * Sends data over a TCPSocket connection.
+ *
+ * @param options Optional parameters {@link TCPSendOptions}.
+ * @permission ohos.permission.INTERNET
+ */
+ send(options: TCPSendOptions, callback: AsyncCallback): void;
+ send(options: TCPSendOptions): Promise;
+
+ /**
+ * Closes a TCPSocket connection.
+ * @permission ohos.permission.INTERNET
+ */
+ close(callback: AsyncCallback): void;
+ close(): Promise;
+
+ /**
+ * Obtains the peer address of a TCPSocket connection.
+ *
+ * @param callback Callback used to return the result. {@link NetAddress}
+ * @permission ohos.permission.INTERNET
+ */
+ getRemoteAddress(callback: AsyncCallback): void;
+ getRemoteAddress(): Promise;
+
+ /**
+ * Obtains the status of the TCPSocket connection.
+ *
+ * @param callback Callback used to return the result. {@link SocketStateBase}
+ * @permission ohos.permission.INTERNET
+ */
+ getState(callback: AsyncCallback): void;
+ getState(): Promise;
+
+ /**
+ * Sets other attributes of the TCPSocket connection.
+ *
+ * @param options Optional parameters {@link TCPExtraOptions}.
+ * @permission ohos.permission.INTERNET
+ */
+ setExtraOptions(options: TCPExtraOptions, callback: AsyncCallback): void;
+ setExtraOptions(options: TCPExtraOptions): Promise;
+
+ /**
+ * Listens for message receiving events of the TCPSocket connection.
+ */
+ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void;
+
+ /**
+ * Cancels listening for message receiving events of the TCPSocket connection.
+ */
+ off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: SocketRemoteInfo}>): void;
+
+ /**
+ * Listens for connection or close events of the TCPSocket connection.
+ */
+ on(type: 'connect' | 'close', callback: Callback): void;
+
+ /**
+ * Cancels listening for connection or close events of the TCPSocket connection.
+ */
+ off(type: 'connect' | 'close', callback?: Callback): void;
+
+ /**
+ * Listens for error events of the TCPSocket connection.
+ */
+ on(type: 'error', callback: ErrorCallback): void;
+
+ /**
+ * Cancels listening for error events of the TCPSocket connection.
+ */
+ off(type: 'error', callback?: ErrorCallback): void;
+ }
+}
+
+export default socket;
\ No newline at end of file
diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3b53cec6ab0aec8870cc23a8aad000af13d3e8a5
--- /dev/null
+++ b/api/@ohos.net.statistics.d.ts
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 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 {AsyncCallback, Callback} from "./basic";
+
+/**
+ * Obtains traffic statistics.
+ *
+ * @since 8
+ * @sysCap SystemCapability.Communication.NetManager.Core
+ */
+declare namespace statistics {
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) received through a specified NIC.
+ *
+ * @param nic Indicates the NIC name.
+ * @param callback Returns the data traffic received through the specified NIC.
+ */
+ function getIfaceRxBytes(nic: string, callback: AsyncCallback): void;
+ function getIfaceRxBytes(nic: string): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) sent through a specified NIC.
+ *
+ * @param nic Indicates the NIC name.
+ * @param callback Returns the data traffic sent through the specified NIC.
+ */
+ function getIfaceTxBytes(nic: string, callback: AsyncCallback): void;
+ function getIfaceTxBytes(nic: string): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) received through the cellular network.
+ *
+ * @param callback Returns the data traffic received through the cellular network.
+ */
+ function getCellularRxBytes(callback: AsyncCallback): void;
+ function getCellularRxBytes(): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) sent through the cellular network.
+ *
+ * @param callback Returns the data traffic sent through the cellular network.
+ */
+ function getCellularTxBytes(callback: AsyncCallback): void;
+ function getCellularTxBytes(): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs.
+ *
+ * @param callback Returns the data traffic sent through all NICs.
+ */
+ function getAllTxBytes(callback: AsyncCallback): void;
+ function getAllTxBytes(): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) received through all NICs.
+ *
+ * @param callback Returns the data traffic received through all NICs.
+ */
+ function getAllRxBytes(callback: AsyncCallback): void;
+ function getAllRxBytes(): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) received by a specified application.
+ * This method applies only to system applications and your own applications.
+ *
+ * @param uid Indicates the process ID of the application.
+ * @param callback Returns the data traffic received by the specified application.
+ */
+ function getUidRxBytes(uid: number, callback: AsyncCallback): void;
+ function getUidRxBytes(uid: number): Promise;
+
+ /**
+ * Queries the data traffic (including all TCP and UDP data packets) sent by a specified application.
+ * This method applies only to system applications and your own applications.
+ *
+ * @param uid Indicates the process ID of the application.
+ * @param callback Returns the data traffic sent by the specified application.
+ */
+ function getUidTxBytes(uid: number, callback: AsyncCallback): void;
+ function getUidTxBytes(uid: number): Promise;
+
+ /**
+ * Register notifications of network traffic updates, restrictions, and warnings.
+ *
+ * @permission ohos.permission.GET_NETSTATS_SUMMARY
+ * @systemapi Hide this for inner system use.
+ */
+ function on(type: 'netStatsChange', callback: Callback<{ iface: string, uid?: number }>): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ */
+ function off(type: 'netStatsChange', callback?: Callback<{ iface: string, uid?: number }>): void;
+
+ /**
+ * Get the traffic usage details of the network interface in the specified time period.
+ *
+ * @param IfaceInfo Indicates the handle. See {@link IfaceInfo}.
+ * @permission ohos.permission.GET_NETSTATS_SUMMARY
+ * @systemapi Hide this for inner system use.
+ */
+ function getIfaceStats(ifaceInfo: IfaceInfo, callback: AsyncCallback): void;
+ function getIfaceStats(ifaceInfo: IfaceInfo): Promise;
+
+ /**
+ * Get the traffic usage details of the specified time period of the application.
+ *
+ * @param UidStatsInfo Indicates the handle. See {@link UidStatsInfo}.
+ * @permission ohos.permission.GET_NETSTATS_SUMMARY
+ * @systemapi Hide this for inner system use.
+ */
+ function getIfaceUidStats(uidStatsInfo: UidStatsInfo, callback: AsyncCallback): void;
+ function getIfaceUidStats(uidStatsInfo: UidStatsInfo): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ */
+ export interface IfaceInfo {
+ iface: string;
+ startTime: number;
+ endTime: number;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ */
+ export interface UidStatsInfo {
+ /*See {@link IfaceInfo}*/
+ ifaceInfo: IfaceInfo;
+ uid: number;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ */
+ export interface NetStatsInfo {
+ rxBytes: number;
+ txBytes: number;
+ rxPackets: number;
+ txPackets: number;
+ }
+}
+
+export default statistics;
\ No newline at end of file
diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts
index 25680a731fc83f8fdd50388c98518d1fd6a12325..6450e8c35c35e49c5d906ec983717ce1258e369f 100644
--- a/api/@ohos.telephony.call.d.ts
+++ b/api/@ohos.telephony.call.d.ts
@@ -1,338 +1,688 @@
-/*
-* Copyright (C) 2021 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 {AsyncCallback, Callback} from "./basic";
-
-/**
- * Provides methods related to call management.
- *
- * @since 6
- * @sysCap SystemCapability.Telephony.DCall
- */
-declare namespace call {
- /**
- * Makes a call.
- *
- * Applications must have the {@code ohos.permission.PLACE_CALL} permission to call this method.
- *
- * @param phoneNumber Indicates the called number.
- * @param options Indicates additional information carried in the call.
- * @param callback Returns {@code true} if the call request is successful; returns {@code false} otherwise.
- * Note that the value {@code true} indicates only the successful processing of the request; it does not mean
- * that the call is or can be connected.
- * @permission ohos.permission.PLACE_CALL
- */
- function dial(phoneNumber: string, callback: AsyncCallback): void;
- function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback): void;
- function dial(phoneNumber: string, options?: DialOptions): Promise;
-
- /**
- * Checks whether a call is ongoing.
- *
- * @param callback Returns {@code true} if at least one call is not in the {@link CallState#CALL_STATE_IDLE}
- * state; returns {@code false} otherwise.
- */
- function hasCall(callback: AsyncCallback): void;
- function hasCall(): Promise;
-
- /**
- * Obtains the call state.
- *
- * If an incoming call is ringing or waiting, the system returns {@code CallState#CALL_STATE_RINGING}.
- * If at least one call is in the active, hold, or dialing state, the system returns
- * {@code CallState#CALL_STATE_OFFHOOK}.
- * In other cases, the system returns {@code CallState#CALL_STATE_IDLE}.
- *
- * @param callback Returns the call state.
- */
- function getCallState(callback: AsyncCallback): void;
- function getCallState(): Promise;
-
- /**
- * Checks whether a phone number is on the emergency number list.
- *
- * @param phoneNumber Indicates the phone number to check.
- * @param callback Returns {@code true} if the phone number is on the emergency number list;
- * returns {@code false} otherwise.
- * @since 7
- */
- function isEmergencyPhoneNumber(phoneNumber: string, callback: AsyncCallback): void;
- function isEmergencyPhoneNumber(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback): void;
- function isEmergencyPhoneNumber(phoneNumber: string, options?: EmergencyNumberOptions): Promise;
-
- /**
- * Formats a phone number according to the Chinese Telephone Code Plan. Before the formatting,
- * a phone number is in the format of country code (if any) + 3-digit service provider code
- * + 4-digit area code + 4-digit subscriber number. After the formatting,
- * each part is separated by a space.
- *
- * @param phoneNumber Indicates the phone number to format.
- * @param callback Returns the phone number after being formatted; returns an empty string
- * if the input phone number is invalid.
- * @since 7
- */
- function formatPhoneNumber(phoneNumber: string, callback: AsyncCallback): void;
- function formatPhoneNumber(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback): void;
- function formatPhoneNumber(phoneNumber: string, options?: NumberFormatOptions): Promise;
-
- /**
- * Formats a phone number into an E.164 representation.
- *
- * @param phoneNumber Indicates the phone number to format.
- * @param countryCode Indicates a two-digit country code defined in ISO 3166-1.
- * @param callback Returns an E.164 number; returns an empty string if the input phone number is invalid.
- * @since 7
- */
- function formatPhoneNumberToE164(phoneNumber: string, countryCode: string, callback: AsyncCallback): void;
- function formatPhoneNumberToE164(phoneNumber: string, countryCode: string): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function answer(callId: number, callback: AsyncCallback): void;
- function answer(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function hangup(callId: number, callback: AsyncCallback): void;
- function hangup(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function reject(callId: number, callback: AsyncCallback): void;
- function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void;
- function reject(callId: number, options?: RejectMessageOptions): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- */
- function holdCall(callId: number, callback: AsyncCallback): void;
- function holdCall(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- */
- function unHoldCall(callId: number, callback: AsyncCallback): void;
- function unHoldCall(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- */
- function switchCall(callId: number, callback: AsyncCallback): void;
- function switchCall(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function combineConference(callId: number, callback: AsyncCallback): void;
- function combineConference(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function getMainCallId(callId: number, callback: AsyncCallback): void;
- function getMainCallId(callId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function getSubCallIdList(callId: number, callback: AsyncCallback>): void;
- function getSubCallIdList(callId: number): Promise>;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function getCallIdListForConference(callId: number, callback: AsyncCallback>): void;
- function getCallIdListForConference(callId: number): Promise>;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function getCallWaitingStatus(slotId: number, callback: AsyncCallback): void;
- function getCallWaitingStatus(slotId: number): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function setCallWaiting(slotId: number, activate: boolean, callback: AsyncCallback): void;
- function setCallWaiting(slotId: number, activate: boolean): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function startDTMF(callId: number, character: string, callback: AsyncCallback): void;
- function startDTMF(callId: number, character: string): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function stopDTMF(callId: number, callback: AsyncCallback): void;
- function stopDTMF(callId: number): Promise;
-
- /**
- * @permission ohos.permission.SET_TELEPHONY_STATE
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function isInEmergencyCall(callback: AsyncCallback): void;
- function isInEmergencyCall(): Promise;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- function on(type: 'callDetailsChange', callback: Callback): void;
- function off(type: 'callDetailsChange', callback?: Callback): void;
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export interface CallAttributeOptions {
- accountNumber: string,
- speakerphoneOn: boolean,
- accountId: number,
- videoState: VideoStateType,
- startTime: number,
- isEcc: boolean,
- callType: CallType,
- callId: number,
- callState: DetailedCallState,
- conferenceState: ConferenceState,
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export enum ConferenceState {
- TEL_CONFERENCE_IDLE = 0,
- TEL_CONFERENCE_ACTIVE,
- TEL_CONFERENCE_DISCONNECTING,
- TEL_CONFERENCE_DISCONNECTED,
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export enum CallType {
- TYPE_CS = 0, // CS
- TYPE_IMS = 1, // IMS
- TYPE_OTT = 2, // OTT
- TYPE_ERR_CALL = 3, // OTHER
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export enum VideoStateType {
- TYPE_VOICE = 0, // Voice
- TYPE_VIDEO, // Video
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export enum DetailedCallState {
- CALL_STATUS_ACTIVE = 0,
- CALL_STATUS_HOLDING,
- CALL_STATUS_DIALING,
- CALL_STATUS_ALERTING,
- CALL_STATUS_INCOMING,
- CALL_STATUS_WAITING,
- CALL_STATUS_DISCONNECTED,
- CALL_STATUS_DISCONNECTING,
- CALL_STATUS_IDLE,
- }
-
- export enum CallState {
- /**
- * Indicates an invalid state, which is used when the call state fails to be obtained.
- */
- CALL_STATE_UNKNOWN = -1,
-
- /**
- * Indicates that there is no ongoing call.
- */
- CALL_STATE_IDLE = 0,
-
- /**
- * Indicates that an incoming call is ringing or waiting.
- */
- CALL_STATE_RINGING = 1,
-
- /**
- * Indicates that a least one call is in the dialing, active, or hold state, and there is no new incoming call
- * ringing or waiting.
- */
- CALL_STATE_OFFHOOK = 2
- }
-
- export interface DialOptions {
- /**
- * boolean means whether the call to be made is a video call. The value {@code false} indicates a voice call.
- */
- extras?: boolean;
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export interface RejectMessageOptions {
- messageContent: string,
- }
-
- /**
- * @systemapi Hide this for inner system use.
- * @since 7
- */
- export enum CallWaitingStatus {
- CALL_WAITING_DISABLE = 0,
- CALL_WAITING_ENABLE = 1
- }
-
- /**
- * @since 7
- */
- export interface EmergencyNumberOptions {
- slotId?: number;
- }
-
- /**
- * @since 7
- */
- export interface NumberFormatOptions {
- countryCode?: string;
- }
-}
-
+/*
+* Copyright (C) 2021 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 {AsyncCallback, Callback} from "./basic";
+
+/**
+ * Provides methods related to call management.
+ *
+ * @since 6
+ * @sysCap SystemCapability.Telephony.CallManager
+ */
+declare namespace call {
+ /**
+ * Makes a call.
+ *
+ * Applications must have the {@code ohos.permission.PLACE_CALL} permission to call this method.
+ *
+ * @param phoneNumber Indicates the called number.
+ * @param options Indicates additional information carried in the call.
+ * @param callback Returns {@code true} if the call request is successful; returns {@code false} otherwise.
+ * Note that the value {@code true} indicates only the successful processing of the request; it does not mean
+ * that the call is or can be connected.
+ * @permission ohos.permission.PLACE_CALL
+ */
+ function dial(phoneNumber: string, callback: AsyncCallback): void;
+ function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback): void;
+ function dial(phoneNumber: string, options?: DialOptions): Promise;
+
+ /**
+ * Checks whether a call is ongoing.
+ *
+ * @param callback Returns {@code true} if at least one call is not in the {@link CallState#CALL_STATE_IDLE}
+ * state; returns {@code false} otherwise.
+ */
+ function hasCall(callback: AsyncCallback): void;
+ function hasCall(): Promise;
+
+ /**
+ * Obtains the call state.
+ *
+ * If an incoming call is ringing or waiting, the system returns {@code CallState#CALL_STATE_RINGING}.
+ * If at least one call is in the active, hold, or dialing state, the system returns
+ * {@code CallState#CALL_STATE_OFFHOOK}.
+ * In other cases, the system returns {@code CallState#CALL_STATE_IDLE}.
+ *
+ * @param callback Returns the call state.
+ */
+ function getCallState(callback: AsyncCallback): void;
+ function getCallState(): Promise;
+
+ /**
+ * Stops the ringtone.
+ *
+ * If an incoming call is ringing, the phone stops ringing. Otherwise, this method does not function.
+ *
+ * @permission ohos.permission.SET_TELEPHONY_STATE or System App
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function muteRinger(callback: AsyncCallback): void;
+ function muteRinger(): Promise;
+
+ /**
+ * Checks whether a phone number is on the emergency number list.
+ *
+ * @param phoneNumber Indicates the phone number to check.
+ * @param callback Returns {@code true} if the phone number is on the emergency number list;
+ * returns {@code false} otherwise.
+ * @since 7
+ */
+ function isEmergencyPhoneNumber(phoneNumber: string, callback: AsyncCallback): void;
+ function isEmergencyPhoneNumber(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback): void;
+ function isEmergencyPhoneNumber(phoneNumber: string, options?: EmergencyNumberOptions): Promise;
+
+ /**
+ * Formats a phone number according to the Chinese Telephone Code Plan. Before the formatting,
+ * a phone number is in the format of country code (if any) + 3-digit service provider code
+ * + 4-digit area code + 4-digit subscriber number. After the formatting,
+ * each part is separated by a space.
+ *
+ * @param phoneNumber Indicates the phone number to format.
+ * @param callback Returns the phone number after being formatted; returns an empty string
+ * if the input phone number is invalid.
+ * @since 7
+ */
+ function formatPhoneNumber(phoneNumber: string, callback: AsyncCallback): void;
+ function formatPhoneNumber(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback): void;
+ function formatPhoneNumber(phoneNumber: string, options?: NumberFormatOptions): Promise;
+
+ /**
+ * Formats a phone number into an E.164 representation.
+ *
+ * @param phoneNumber Indicates the phone number to format.
+ * @param countryCode Indicates a two-digit country code defined in ISO 3166-1.
+ * @param callback Returns an E.164 number; returns an empty string if the input phone number is invalid.
+ * @since 7
+ */
+ function formatPhoneNumberToE164(phoneNumber: string, countryCode: string, callback: AsyncCallback): void;
+ function formatPhoneNumberToE164(phoneNumber: string, countryCode: string): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function answer(callId: number, callback: AsyncCallback): void;
+ function answer(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function hangup(callId: number, callback: AsyncCallback): void;
+ function hangup(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function reject(callId: number, callback: AsyncCallback): void;
+ function reject(callId: number, options: RejectMessageOptions, callback: AsyncCallback): void;
+ function reject(callId: number, options?: RejectMessageOptions): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function holdCall(callId: number, callback: AsyncCallback): void;
+ function holdCall(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function unHoldCall(callId: number, callback: AsyncCallback): void;
+ function unHoldCall(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function switchCall(callId: number, callback: AsyncCallback): void;
+ function switchCall(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function combineConference(callId: number, callback: AsyncCallback): void;
+ function combineConference(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function getMainCallId(callId: number, callback: AsyncCallback): void;
+ function getMainCallId(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function getSubCallIdList(callId: number, callback: AsyncCallback>): void;
+ function getSubCallIdList(callId: number): Promise>;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function getCallIdListForConference(callId: number, callback: AsyncCallback>): void;
+ function getCallIdListForConference(callId: number): Promise>;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function getCallWaitingStatus(slotId: number, callback: AsyncCallback): void;
+ function getCallWaitingStatus(slotId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function setCallWaiting(slotId: number, activate: boolean, callback: AsyncCallback): void;
+ function setCallWaiting(slotId: number, activate: boolean): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function startDTMF(callId: number, character: string, callback: AsyncCallback): void;
+ function startDTMF(callId: number, character: string): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function stopDTMF(callId: number, callback: AsyncCallback): void;
+ function stopDTMF(callId: number): Promise;
+
+ /**
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function isInEmergencyCall(callback: AsyncCallback): void;
+ function isInEmergencyCall(): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function on(type: 'callDetailsChange', callback: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ function off(type: 'callDetailsChange', callback?: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function on(type: 'callEventChange', callback: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function off(type: 'callEventChange', callback?: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function on(type: 'callDisconnectedCause', callback: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function off(type: 'callDisconnectedCause', callback?: Callback): void;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function isNewCallAllowed(callback: AsyncCallback): void;
+ function isNewCallAllowed(): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function separateConference(callId: number, callback: AsyncCallback): void;
+ function separateConference(callId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function getCallRestrictionStatus(slotId: number, type: CallRestrictionType, callback: AsyncCallback): void;
+ function getCallRestrictionStatus(slotId: number, type: CallRestrictionType): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function setCallRestriction(slotId: number, info: CallRestrictionInfo, callback: AsyncCallback): void;
+ function setCallRestriction(slotId: number, info: CallRestrictionInfo): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function getCallTransferInfo(slotId: number, type: CallTransferType, callback: AsyncCallback): void;
+ function getCallTransferInfo(slotId: number, type: CallTransferType): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function setCallTransfer(slotId: number, info: CallTransferInfo, callback: AsyncCallback): void;
+ function setCallTransfer(slotId: number, info: CallTransferInfo): Promise;
+
+ /**
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function isRinging(callback: AsyncCallback): void;
+ function isRinging(): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function setMuted(callback: AsyncCallback): void;
+ function setMuted(): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function cancelMuted(callback: AsyncCallback): void;
+ function cancelMuted(): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function setAudioDevice(device: AudioDevice, callback: AsyncCallback): void;
+ function setAudioDevice(device: AudioDevice): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function joinConference(mainCallId: number, callNumberList: Array, callback: AsyncCallback): void;
+ function joinConference(mainCallId: number, callNumberList: Array): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function updateImsCallMode(callId: number, mode: ImsCallMode, callback: AsyncCallback): void;
+ function updateImsCallMode(callId: number, mode: ImsCallMode): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function enableImsSwitch(slotId: number, callback: AsyncCallback): void;
+ function enableImsSwitch(slotId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function disableImsSwitch(slotId: number, callback: AsyncCallback): void;
+ function disableImsSwitch(slotId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ function isImsSwitchEnabled(slotId: number, callback: AsyncCallback): void;
+ function isImsSwitchEnabled(slotId: number): Promise;
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum ImsCallMode {
+ CALL_MODE_AUDIO_ONLY = 0,
+ CALL_MODE_SEND_ONLY,
+ CALL_MODE_RECEIVE_ONLY,
+ CALL_MODE_SEND_RECEIVE,
+ CALL_MODE_VIDEO_PAUSED,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum AudioDevice {
+ DEVICE_MIC,
+ DEVICE_SPEAKER,
+ DEVICE_WIRED_HEADSET,
+ DEVICE_BLUETOOTH_SCO
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum CallRestrictionType {
+ RESTRICTION_TYPE_ALL_INCOMING = 0,
+ RESTRICTION_TYPE_ALL_OUTGOING,
+ RESTRICTION_TYPE_INTERNATIONAL,
+ RESTRICTION_TYPE_INTERNATIONAL_EXCLUDING_HOME,
+ RESTRICTION_TYPE_ROAMING_INCOMING,
+ RESTRICTION_TYPE_ALL_CALLS,
+ RESTRICTION_TYPE_OUTGOING_SERVICES,
+ RESTRICTION_TYPE_INCOMING_SERVICES,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export interface CallTransferInfo {
+ transferNum: string,
+ type: CallTransferType,
+ settingType: CallTransferSettingType
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum CallTransferType {
+ TRANSFER_TYPE_UNCONDITIONAL = 0,
+ TRANSFER_TYPE_BUSY,
+ TRANSFER_TYPE_NO_REPLY,
+ TRANSFER_TYPE_NOT_REACHABLE,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum CallTransferSettingType {
+ CALL_TRANSFER_DISABLE = 0,
+ CALL_TRANSFER_ENABLE = 1,
+ CALL_TRANSFER_REGISTRATION = 3,
+ CALL_TRANSFER_ERASURE = 4,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export interface CallAttributeOptions {
+ accountNumber: string,
+ speakerphoneOn: boolean,
+ accountId: number,
+ videoState: VideoStateType,
+ startTime: number,
+ isEcc: boolean,
+ callType: CallType,
+ callId: number,
+ callState: DetailedCallState,
+ conferenceState: ConferenceState,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export enum ConferenceState {
+ TEL_CONFERENCE_IDLE = 0,
+ TEL_CONFERENCE_ACTIVE,
+ TEL_CONFERENCE_DISCONNECTING,
+ TEL_CONFERENCE_DISCONNECTED,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export enum CallType {
+ TYPE_CS = 0, // CS
+ TYPE_IMS = 1, // IMS
+ TYPE_OTT = 2, // OTT
+ TYPE_ERR_CALL = 3, // OTHER
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export enum VideoStateType {
+ TYPE_VOICE = 0, // Voice
+ TYPE_VIDEO, // Video
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export enum DetailedCallState {
+ CALL_STATUS_ACTIVE = 0,
+ CALL_STATUS_HOLDING,
+ CALL_STATUS_DIALING,
+ CALL_STATUS_ALERTING,
+ CALL_STATUS_INCOMING,
+ CALL_STATUS_WAITING,
+ CALL_STATUS_DISCONNECTED,
+ CALL_STATUS_DISCONNECTING,
+ CALL_STATUS_IDLE,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export interface CallRestrictionInfo {
+ type: CallRestrictionType,
+ password: string
+ mode: CallRestrictionMode
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum CallRestrictionMode {
+ RESTRICTION_MODE_DEACTIVATION = 0,
+ RESTRICTION_MODE_ACTIVATION,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export interface CallEventOptions {
+ eventId: CallAbilityEventId,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum CallAbilityEventId {
+ EVENT_DIAL_NO_CARRIER = 1,
+ EVENT_INVALID_FDN_NUMBER,
+ }
+
+ export enum CallState {
+ /**
+ * Indicates an invalid state, which is used when the call state fails to be obtained.
+ */
+ CALL_STATE_UNKNOWN = -1,
+
+ /**
+ * Indicates that there is no ongoing call.
+ */
+ CALL_STATE_IDLE = 0,
+
+ /**
+ * Indicates that an incoming call is ringing or waiting.
+ */
+ CALL_STATE_RINGING = 1,
+
+ /**
+ * Indicates that a least one call is in the dialing, active, or hold state, and there is no new incoming call
+ * ringing or waiting.
+ */
+ CALL_STATE_OFFHOOK = 2
+ }
+
+ export interface DialOptions {
+ /**
+ * boolean means whether the call to be made is a video call. The value {@code false} indicates a voice call.
+ */
+ extras?: boolean;
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ accountId?: number;
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ videoState?: VideoStateType;
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ dialScene?: DialScene;
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ dialType?: DialType;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum DialScene {
+ CALL_NORMAL = 0,
+ CALL_PRIVILEGED = 1,
+ CALL_EMERGENCY = 2,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum DialType {
+ DIAL_CARRIER_TYPE = 0,
+ DIAL_VOICE_MAIL_TYPE = 1,
+ DIAL_OTT_TYPE = 2,
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export interface RejectMessageOptions {
+ messageContent: string;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export interface CallTransferResult {
+ status: TransferStatus;
+ number: string;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 7
+ */
+ export enum CallWaitingStatus {
+ CALL_WAITING_DISABLE = 0,
+ CALL_WAITING_ENABLE = 1
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum RestrictionStatus {
+ RESTRICTION_DISABLE = 0,
+ RESTRICTION_ENABLE = 1
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum TransferStatus {
+ TRANSFER_DISABLE = 0,
+ TRANSFER_ENABLE = 1
+ }
+
+ /**
+ * @since 7
+ */
+ export interface EmergencyNumberOptions {
+ slotId?: number;
+ }
+
+ /**
+ * @since 7
+ */
+ export interface NumberFormatOptions {
+ countryCode?: string;
+ }
+
+ /**
+ * @systemapi Hide this for inner system use.
+ * @since 8
+ */
+ export enum DisconnectedDetails {
+ UNASSIGNED_NUMBER = 1,
+ NO_ROUTE_TO_DESTINATION = 3,
+ CHANNEL_UNACCEPTABLE = 6,
+ OPERATOR_DETERMINED_BARRING = 8,
+ NORMAL_CALL_CLEARING = 16,
+ USER_BUSY = 17,
+ NO_USER_RESPONDING = 18,
+ USER_ALERTING_NO_ANSWER = 19,
+ CALL_REJECTED = 21,
+ NUMBER_CHANGED = 22,
+ DESTINATION_OUT_OF_ORDER = 27,
+ INVALID_NUMBER_FORMAT = 28,
+ NETWORK_OUT_OF_ORDER = 38,
+ TEMPORARY_FAILURE = 41,
+ INVALID_PARAMETER = 1025,
+ SIM_NOT_EXIT = 1026,
+ SIM_PIN_NEED = 1027,
+ CALL_NOT_ALLOW = 1029,
+ SIM_INVALID = 1045,
+ UNKNOWN = 1279,
+ };
+}
+
export default call;
\ No newline at end of file
diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e589ee35d1b27439df7afa980562c813ea56e1ea
--- /dev/null
+++ b/api/@ohos.telephony.data.d.ts
@@ -0,0 +1,196 @@
+/*
+* Copyright (C) 2021 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 {AsyncCallback} from "./basic";
+
+/**
+ * Provides methods related to cellular data services.
+ *
+ * @since 7
+ * @sysCap SystemCapability.Telephony.CellularData
+ */
+declare namespace data {
+ /**
+ * Checks whether cellular data services are enabled.
+ *
+ * Requires Permission: {@code ohos.permission.GET_NETWORK_INFO}.
+ *
+ * @return Returns {@code true} if cellular data services are enabled; returns {@code false} otherwise.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function getDefaultCellularDataSlotId(callback: AsyncCallback): void;
+ function getDefaultCellularDataSlotId(): Promise;
+
+ /**
+ * Switches cellular data services to another card, without changing the default settings.
+ *
+ * @param slotId Indicates the ID of the target card slot.
+ * The value {@code 0} indicates card 1, and the value {@code 1} indicates card 2.
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ */
+ function setDefaultCellularDataSlotId(slotId: number, callback: AsyncCallback): void;
+ function setDefaultCellularDataSlotId(slotId: number): Promise;
+
+ /**
+ * Indicates that there is no uplink or downlink data.
+ *
+ * It is a return value of service state query of cellular data services.
+ */
+ function getCellularDataFlowType(callback: AsyncCallback): void;
+ function getCellularDataFlowType(): Promise;
+
+ /**
+ * Obtains the connection state of the PS domain.
+ *
+ * @param slotId Indicates the ID of a card slot.
+ * The value {@code 0} indicates card 1, and the value {@code 1} indicates card 2.
+ * @param callback Returns the connection state, which can be any of the following:
+ *
+ * {@code DataConnectState#DATA_STATE_UNKNOWN}
+ * {@code DataConnectState#DATA_STATE_DISCONNECTED}
+ * {@code DataConnectState#DATA_STATE_CONNECTING}
+ * {@code DataConnectState#DATA_STATE_CONNECTED}
+ * {@code DataConnectState#DATA_STATE_SUSPENDED}
+ *
+ */
+ function getCellularDataState(callback: AsyncCallback): void;
+ function getCellularDataState(): Promise;
+
+ /**
+ * Checks whether cellular data services are enabled.
+ *
+ * Requires Permission: {@code ohos.permission.GET_NETWORK_INFO}.
+ *
+ * @param callback Returns {@code true} if cellular data services are enabled; returns {@code false} otherwise.
+ */
+ function isCellularDataEnabled(callback: AsyncCallback): void;
+ function isCellularDataEnabled(): Promise;
+
+ /**
+ * Enables cellular data services.
+ *
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ */
+ function enableCellularData(callback: AsyncCallback): void;
+ function enableCellularData(): Promise;
+
+ /**
+ * Diables cellular data services.
+ *
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ */
+ function disableCellularData(callback: AsyncCallback): void;
+ function disableCellularData(): Promise;
+
+ /**
+ * Checks whether roaming is enabled for cellular data services.
+ *
+ * Requires Permission: {@code ohos.permission.GET_NETWORK_INFO}.
+ *
+ * @param slotId Indicates the ID of a card slot.
+ * The value {@code 0} indicates card 1, and the value {@code 1} indicates card 2.
+ * @param callback Returns {@code true} if roaming is enabled for cellular data services; returns {@code false} otherwise.
+ * @permission ohos.permission.GET_NETWORK_INFO
+ */
+ function isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback): void;
+ function isCellularDataRoamingEnabled(slotId: number): Promise;
+
+ /**
+ * Enables cellular data roaming.
+ *
+ * @param slotId Indicates the ID of a card slot.
+ * The value {@code 0} indicates card 1, and the value {@code 1} indicates card 2.
+ * @permission ohos.permission.SET_TELEPHONY_STATE
+ * @systemapi Hide this for inner system use.
+ */
+ function enableCellularDataRoaming(slotId: number, callback: AsyncCallback): void;
+ function enableCellularDataRoaming(slotId: number): Promise