BUG FIX interface 401 data description is not standardized

Issue: https://gitee.com/openharmony/interface_sdk-js/issues/IAEDFS

Signed-off-by: zhouhuowang <zhouhuowang2@huawei.com>
This commit is contained in:
zhouhuowang 2024-07-20 17:09:18 +08:00
parent 11c3f75a26
commit e35fbfdff1
2 changed files with 130 additions and 48 deletions

60
api/@ohos.uri.d.ts vendored
View File

@ -74,9 +74,9 @@ declare namespace uri {
*
* @param { string } uri - uri uri
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200002 - Invalid uri string.
* @syscap SystemCapability.Utils.Lang
* @since 8
@ -87,9 +87,9 @@ declare namespace uri {
*
* @param { string } uri - uri uri
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200002 - Invalid uri string.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
@ -101,9 +101,9 @@ declare namespace uri {
*
* @param { string } uri - uri uri
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200002 - Invalid uri string.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
@ -155,8 +155,8 @@ declare namespace uri {
* @param { URI } other - other other URI object to be compared
* @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @since 9
*/
@ -166,8 +166,8 @@ declare namespace uri {
* @param { URI } other - other other URI object to be compared
* @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @since 10
@ -178,8 +178,8 @@ declare namespace uri {
* @param { URI } other - other other URI object to be compared
* @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -241,9 +241,11 @@ declare namespace uri {
/**
* Searches the query string for the first value with the given key.
*
* @param { string } key - Given the first value of the key
* @param { string } key - Given the first value of the key.
* @returns { string } Return decoded value.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -256,7 +258,9 @@ declare namespace uri {
* @param { string } [key] - The key it will be encoded with.
* @param { string } [value] - The value it will be encoded with.
* @returns { URI } Return URI object.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -278,7 +282,9 @@ declare namespace uri {
*
* @param { string } key - The key it will be encoded with.
* @returns { string[] } Return a set of decoded values.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -291,7 +297,9 @@ declare namespace uri {
* @param { string } key - Indicates the key value to be queried.
* @param { boolean } defaultValue - The default value returned when the key has no query parameters.
* @returns { boolean } Query with key value returns true, otherwise returns false.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -333,7 +341,9 @@ declare namespace uri {
*
* @param { string } [pathSegment] - path segment to be added.
* @returns { URI } After adding, return the URI object.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -345,7 +355,9 @@ declare namespace uri {
*
* @param { string } pathSegment - Encoding path segment to be added.
* @returns { URI } After adding, return the URI object.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -390,7 +402,9 @@ declare namespace uri {
* separator ('#'), which will get encoded.
* @param { string } fragment - fragment, everything after the '#', null if undefined, will get encoded.
* @returns { URI } Return Uri consisting of a given scheme, SSP, and fragment.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice

View File

@ -63,7 +63,10 @@ declare namespace stream {
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @returns { boolean } Write success returns true, write failure returns false.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200035 - The doWrite method has not been implemented.
* @throws { BusinessError } 10200036 - The stream has been ended.
* @throws { BusinessError } 10200037 - The callback is invoked multiple times consecutively.
@ -80,7 +83,10 @@ declare namespace stream {
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @returns { Writable } Returns the Writable object.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200035 - The doWrite method has not been implemented.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
@ -93,7 +99,10 @@ declare namespace stream {
*
* @param { string } [encoding] - Encoding type.Default: utf8.
* @returns { boolean } Setting successful returns true, setting failed returns false.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -125,7 +134,10 @@ declare namespace stream {
*
* @param { string } event - Register Event.
* @param { Callback<emitter.EventData> } callback - event callbacks.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -137,7 +149,9 @@ declare namespace stream {
*
* @param { string } event - Register Event.
* @param { Callback<emitter.EventData> } callback - event callbacks.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -149,7 +163,9 @@ declare namespace stream {
* After the resource is initialized in the doInitialize method, the callback () method is invoked.
*
* @param { Function } callback - Callback when the stream has completed the initial.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -163,7 +179,10 @@ declare namespace stream {
* @param { string | Uint8Array } [chunk] - Data to be written.
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -176,7 +195,10 @@ declare namespace stream {
*
* @param { string[] | Uint8Array[] } [chunks] - Data to be written.
* @param { Function } [callback] - Callback after writing.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -289,7 +311,10 @@ declare namespace stream {
* @param { string } encoding - If the chunk is a string, then this is the encoding type. If chunk is a buffer,
* then this is the special value 'buffer'. Ignore it in that case.
* @param { Function } callback - Callback after conversion.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -301,7 +326,10 @@ declare namespace stream {
* not be called directly, only called by Writable after flushing all data.
*
* @param { Function } callback - Callback after flush completion.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -362,7 +390,9 @@ declare namespace stream {
*
* @param { ReadableOptions } options - Provide options.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Incorrect parameter types.
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -375,7 +405,10 @@ declare namespace stream {
*
* @param { number } size - Expected length of the data to be read.
* @returns { string | null } If no data is available to read, null is returned.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200038 - The doRead method has not been implemented.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
@ -408,7 +441,9 @@ declare namespace stream {
*
* @param { string } [encoding] - Original Data Encoding Type.
* @returns { boolean } Setting successful returns true, setting failed returns false.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -431,7 +466,10 @@ declare namespace stream {
* @param { Writable } destination - Output writable stream.
* @param { Object } [options] - Pipeline Options.
* @returns { Writable } Returns the Writable object.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -443,7 +481,10 @@ declare namespace stream {
*
* @param { Writable } [destination] - Writable Streams Needing to Be Disconnected.
* @returns { Readable } Returns the Readable object.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -455,7 +496,9 @@ declare namespace stream {
*
* @param { string } event - Registering Events.
* @param { Callback<emitter.EventData> } callback - Event callback.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -467,7 +510,9 @@ declare namespace stream {
*
* @param { string } event - Registering Events.
* @param { Callback<emitter.EventData> } callback - Event callback.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -479,7 +524,10 @@ declare namespace stream {
* It must not be called directly.
*
* @param { Function } callback - Callback when the stream has completed the initial.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -492,7 +540,10 @@ declare namespace stream {
* If push is not called, doRead will not be called again.
*
* @param { number } size - Expected length of the data to be read.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -507,7 +558,9 @@ declare namespace stream {
* @param { string } [encoding] - Binary data encoding type.
* @returns { boolean } If true is returned, the data in the buffer reaches the highWaterMark. Otherwise, the
* data in the buffer does not reach the highWaterMark.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -624,7 +677,10 @@ declare namespace stream {
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @returns { boolean } Write success returns true, write failure returns false.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200036 - The stream has been ended.
* @throws { BusinessError } 10200037 - The callback is invoked multiple times consecutively.
* @throws { BusinessError } 10200039 - The doTransform method has not been implemented for a class that inherits from Transform.
@ -641,7 +697,10 @@ declare namespace stream {
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @returns { Writable } Returns the Writable object.
* @throws { BusinessError } 401 - An input parameter is invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @throws { BusinessError } 10200039 - The doTransform method has not been implemented for a class that inherits from Transform.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
@ -654,7 +713,10 @@ declare namespace stream {
*
* @param { string } [encoding] - Encoding type.Default: utf8.
* @returns { boolean } Setting successful returns true, setting failed returns false.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -688,7 +750,10 @@ declare namespace stream {
* @param { string | Uint8Array } [chunk] - Data to be written.
* @param { string } [encoding] - Encoding type.
* @param { Function } [callback] - Callback after writing.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice
@ -701,7 +766,10 @@ declare namespace stream {
*
* @param { string[] | Uint8Array[] } [chunks] - Data to be written.
* @param { Function } [callback] - Callback after writing.
* @throws { BusinessError } 401 - if the input parameters are invalid.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types;
* 3.Parameter verification failed.
* @syscap SystemCapability.Utils.Lang
* @crossplatform
* @atomicservice