161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkTS
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * The url module provides utilities for URL resolution and parsing.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @namespace url
2561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
2661847f8eSopenharmony_ci * @since 7
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ci/**
2961847f8eSopenharmony_ci * The url module provides utilities for URL resolution and parsing.
3061847f8eSopenharmony_ci *
3161847f8eSopenharmony_ci * @namespace url
3261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
3361847f8eSopenharmony_ci * @crossplatform
3461847f8eSopenharmony_ci * @since 10
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_ci/**
3761847f8eSopenharmony_ci * The url module provides utilities for URL resolution and parsing.
3861847f8eSopenharmony_ci *
3961847f8eSopenharmony_ci * @namespace url
4061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
4161847f8eSopenharmony_ci * @crossplatform
4261847f8eSopenharmony_ci * @atomicservice
4361847f8eSopenharmony_ci * @since 11
4461847f8eSopenharmony_ci */
4561847f8eSopenharmony_cideclare namespace url {
4661847f8eSopenharmony_ci  /**
4761847f8eSopenharmony_ci   * The URLSearchParams interface defines some practical methods to process URL query strings.
4861847f8eSopenharmony_ci   *
4961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5061847f8eSopenharmony_ci   * @since 7
5161847f8eSopenharmony_ci   * @deprecated since 9
5261847f8eSopenharmony_ci   * @useinstead ohos.url.URLParams
5361847f8eSopenharmony_ci   * @name URLSearchParams
5461847f8eSopenharmony_ci   */
5561847f8eSopenharmony_ci  class URLSearchParams {
5661847f8eSopenharmony_ci    /**
5761847f8eSopenharmony_ci     * A parameterized constructor used to create an URLSearchParams instance.
5861847f8eSopenharmony_ci     * As the input parameter of the constructor function, init supports four types.
5961847f8eSopenharmony_ci     * The input parameter is a character string two-dimensional array.
6061847f8eSopenharmony_ci     * The input parameter is the object list.
6161847f8eSopenharmony_ci     * The input parameter is a character string.
6261847f8eSopenharmony_ci     * The input parameter is the URLSearchParams object.
6361847f8eSopenharmony_ci     *
6461847f8eSopenharmony_ci     * @param { string[][] | Record<string, string> | string | URLSearchParams } init - init init
6561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6661847f8eSopenharmony_ci     * @since 7
6761847f8eSopenharmony_ci     * @deprecated since 9
6861847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.constructor
6961847f8eSopenharmony_ci     */
7061847f8eSopenharmony_ci    constructor(init?: string[][] | Record<string, string> | string | URLSearchParams);
7161847f8eSopenharmony_ci
7261847f8eSopenharmony_ci    /**
7361847f8eSopenharmony_ci     * Appends a specified key/value pair as a new search parameter.
7461847f8eSopenharmony_ci     *
7561847f8eSopenharmony_ci     * @param { string } name - name name Key name of the search parameter to be inserted.
7661847f8eSopenharmony_ci     * @param { string } value - value value Values of search parameters to be inserted.
7761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7861847f8eSopenharmony_ci     * @since 7
7961847f8eSopenharmony_ci     * @deprecated since 9
8061847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.append
8161847f8eSopenharmony_ci     */
8261847f8eSopenharmony_ci    append(name: string, value: string): void;
8361847f8eSopenharmony_ci
8461847f8eSopenharmony_ci    /**
8561847f8eSopenharmony_ci     * Deletes the given search parameter and its associated value,from the list of all search parameters.
8661847f8eSopenharmony_ci     *
8761847f8eSopenharmony_ci     * @param { string } name - name name Name of the key-value pair to be deleted.
8861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8961847f8eSopenharmony_ci     * @since 7
9061847f8eSopenharmony_ci     * @deprecated since 9
9161847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.delete
9261847f8eSopenharmony_ci     */
9361847f8eSopenharmony_ci    delete(name: string): void;
9461847f8eSopenharmony_ci
9561847f8eSopenharmony_ci    /**
9661847f8eSopenharmony_ci     * Returns all key-value pairs associated with a given search parameter as an array.
9761847f8eSopenharmony_ci     *
9861847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key value.
9961847f8eSopenharmony_ci     * @returns { string[] } string[] Returns all key-value pairs with the specified name.
10061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10161847f8eSopenharmony_ci     * @since 7
10261847f8eSopenharmony_ci     * @deprecated since 9
10361847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.getAll
10461847f8eSopenharmony_ci     */
10561847f8eSopenharmony_ci    getAll(name: string): string[];
10661847f8eSopenharmony_ci
10761847f8eSopenharmony_ci    /**
10861847f8eSopenharmony_ci     * Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
10961847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
11061847f8eSopenharmony_ci     *
11161847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an iterator for ES6.
11261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11361847f8eSopenharmony_ci     * @since 7
11461847f8eSopenharmony_ci     * @deprecated since 9
11561847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.entries
11661847f8eSopenharmony_ci     */
11761847f8eSopenharmony_ci    entries(): IterableIterator<[string, string]>;
11861847f8eSopenharmony_ci
11961847f8eSopenharmony_ci    /**
12061847f8eSopenharmony_ci     * Callback functions are used to traverse key-value pairs on the URLSearchParams instance object.
12161847f8eSopenharmony_ci     *
12261847f8eSopenharmony_ci     * @param { function } callbackFn - callbackFn callbackFn Current traversal key value.
12361847f8eSopenharmony_ci     * @param { Object } thisArg - thisArg thisArg thisArg to be used as this value for when callbackFn is called
12461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12561847f8eSopenharmony_ci     * @since 7
12661847f8eSopenharmony_ci     * @deprecated since 9
12761847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.forEach
12861847f8eSopenharmony_ci     */
12961847f8eSopenharmony_ci    forEach(callbackFn: (value: string, key: string, searchParams: URLSearchParams) => void, thisArg?: Object): void;
13061847f8eSopenharmony_ci
13161847f8eSopenharmony_ci    /**
13261847f8eSopenharmony_ci     * Returns the first value associated to the given search parameter.
13361847f8eSopenharmony_ci     *
13461847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
13561847f8eSopenharmony_ci     * @returns { string | null } Returns the first value found by name. If no value is found, null is returned.
13661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13761847f8eSopenharmony_ci     * @since 7
13861847f8eSopenharmony_ci     * @deprecated since 9
13961847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.get
14061847f8eSopenharmony_ci     */
14161847f8eSopenharmony_ci    get(name: string): string | null;
14261847f8eSopenharmony_ci
14361847f8eSopenharmony_ci    /**
14461847f8eSopenharmony_ci     * Returns a Boolean that indicates whether a parameter with the specified name exists.
14561847f8eSopenharmony_ci     *
14661847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
14761847f8eSopenharmony_ci     * @returns { boolean } Returns a Boolean value that indicates whether a found
14861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14961847f8eSopenharmony_ci     * @since 7
15061847f8eSopenharmony_ci     * @deprecated since 9
15161847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.has
15261847f8eSopenharmony_ci     */
15361847f8eSopenharmony_ci    has(name: string): boolean;
15461847f8eSopenharmony_ci
15561847f8eSopenharmony_ci    /**
15661847f8eSopenharmony_ci     * Sets the value associated with a given search parameter to the
15761847f8eSopenharmony_ci     * given value. If there were several matching values, this method
15861847f8eSopenharmony_ci     * deletes the others. If the search parameter doesn't exist, this
15961847f8eSopenharmony_ci     * method creates it.
16061847f8eSopenharmony_ci     *
16161847f8eSopenharmony_ci     * @param { string } name - name name Key name of the parameter to be set.
16261847f8eSopenharmony_ci     * @param { string } value - value value Indicates the parameter value to be set.
16361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16461847f8eSopenharmony_ci     * @since 7
16561847f8eSopenharmony_ci     * @deprecated since 9
16661847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.set
16761847f8eSopenharmony_ci     */
16861847f8eSopenharmony_ci    set(name: string, value: string): void;
16961847f8eSopenharmony_ci
17061847f8eSopenharmony_ci    /**
17161847f8eSopenharmony_ci     * Sort all key/value pairs contained in this object in place and return undefined.
17261847f8eSopenharmony_ci     *
17361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17461847f8eSopenharmony_ci     * @since 7
17561847f8eSopenharmony_ci     * @deprecated since 9
17661847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.sort
17761847f8eSopenharmony_ci     */
17861847f8eSopenharmony_ci    sort(): void;
17961847f8eSopenharmony_ci
18061847f8eSopenharmony_ci    /**
18161847f8eSopenharmony_ci     * Returns an iterator allowing to go through all keys contained in this object.
18261847f8eSopenharmony_ci     *
18361847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the names of each name-value pair.
18461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18561847f8eSopenharmony_ci     * @since 7
18661847f8eSopenharmony_ci     * @deprecated since 9
18761847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.keys
18861847f8eSopenharmony_ci     */
18961847f8eSopenharmony_ci    keys(): IterableIterator<string>;
19061847f8eSopenharmony_ci
19161847f8eSopenharmony_ci    /**
19261847f8eSopenharmony_ci     * Returns an iterator allowing to go through all values contained in this object.
19361847f8eSopenharmony_ci     *
19461847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the values of each name-value pair.
19561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19661847f8eSopenharmony_ci     * @since 7
19761847f8eSopenharmony_ci     * @deprecated since 9
19861847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.values
19961847f8eSopenharmony_ci     */
20061847f8eSopenharmony_ci    values(): IterableIterator<string>;
20161847f8eSopenharmony_ci
20261847f8eSopenharmony_ci    /**
20361847f8eSopenharmony_ci     * Returns an iterator allowing to go through all key/value
20461847f8eSopenharmony_ci     * pairs contained in this object.
20561847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. 
20661847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
20761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20861847f8eSopenharmony_ci     * @since 7
20961847f8eSopenharmony_ci     * @deprecated since 9
21061847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.[Symbol.iterator]
21161847f8eSopenharmony_ci     */
21261847f8eSopenharmony_ci    [Symbol.iterator](): IterableIterator<[string, string]>;
21361847f8eSopenharmony_ci
21461847f8eSopenharmony_ci    /**
21561847f8eSopenharmony_ci     * Returns a query string suitable for use in a URL.
21661847f8eSopenharmony_ci     *
21761847f8eSopenharmony_ci     * @returns { string } Returns a search parameter serialized as a string, percent-encoded if necessary.
21861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21961847f8eSopenharmony_ci     * @since 7
22061847f8eSopenharmony_ci     * @deprecated since 9
22161847f8eSopenharmony_ci     * @useinstead ohos.url.URLParams.toString
22261847f8eSopenharmony_ci     */
22361847f8eSopenharmony_ci    toString(): string;
22461847f8eSopenharmony_ci  }
22561847f8eSopenharmony_ci
22661847f8eSopenharmony_ci  /**
22761847f8eSopenharmony_ci   * The URLParams interface defines some practical methods to process URL query strings.
22861847f8eSopenharmony_ci   *
22961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
23061847f8eSopenharmony_ci   * @since 9
23161847f8eSopenharmony_ci   * @name URLParams
23261847f8eSopenharmony_ci   */
23361847f8eSopenharmony_ci  /**
23461847f8eSopenharmony_ci   * The URLParams interface defines some practical methods to process URL query strings.
23561847f8eSopenharmony_ci   *
23661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
23761847f8eSopenharmony_ci   * @crossplatform
23861847f8eSopenharmony_ci   * @since 10
23961847f8eSopenharmony_ci   * @name URLParams
24061847f8eSopenharmony_ci   */
24161847f8eSopenharmony_ci  /**
24261847f8eSopenharmony_ci   * The URLParams interface defines some practical methods to process URL query strings.
24361847f8eSopenharmony_ci   *
24461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
24561847f8eSopenharmony_ci   * @crossplatform
24661847f8eSopenharmony_ci   * @atomicservice
24761847f8eSopenharmony_ci   * @since 11
24861847f8eSopenharmony_ci   * @name URLParams
24961847f8eSopenharmony_ci   */
25061847f8eSopenharmony_ci  class URLParams {
25161847f8eSopenharmony_ci    /**
25261847f8eSopenharmony_ci     * A parameterized constructor used to create an URLParams instance.
25361847f8eSopenharmony_ci     * As the input parameter of the constructor function, init supports four types.
25461847f8eSopenharmony_ci     * The input parameter is a character string two-dimensional array.
25561847f8eSopenharmony_ci     * The input parameter is the object list.
25661847f8eSopenharmony_ci     * The input parameter is a character string.
25761847f8eSopenharmony_ci     * The input parameter is the URLParams object.
25861847f8eSopenharmony_ci     *
25961847f8eSopenharmony_ci     * @param { string[][] | Record<string, string> | string | URLParams } [init] - init init
26061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 3.Parameter verification failed.
26161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26261847f8eSopenharmony_ci     * @since 9
26361847f8eSopenharmony_ci     */
26461847f8eSopenharmony_ci    /**
26561847f8eSopenharmony_ci     * A parameterized constructor used to create an URLParams instance.
26661847f8eSopenharmony_ci     * As the input parameter of the constructor function, init supports four types.
26761847f8eSopenharmony_ci     * The input parameter is a character string two-dimensional array.
26861847f8eSopenharmony_ci     * The input parameter is the object list.
26961847f8eSopenharmony_ci     * The input parameter is a character string.
27061847f8eSopenharmony_ci     * The input parameter is the URLParams object.
27161847f8eSopenharmony_ci     *
27261847f8eSopenharmony_ci     * @param { string[][] | Record<string, string> | string | URLParams } [init] - init init
27361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.
27461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27561847f8eSopenharmony_ci     * @crossplatform
27661847f8eSopenharmony_ci     * @since 10
27761847f8eSopenharmony_ci     */
27861847f8eSopenharmony_ci    /**
27961847f8eSopenharmony_ci     * A parameterized constructor used to create an URLParams instance.
28061847f8eSopenharmony_ci     * As the input parameter of the constructor function, init supports four types.
28161847f8eSopenharmony_ci     * The input parameter is a character string two-dimensional array.
28261847f8eSopenharmony_ci     * The input parameter is the object list.
28361847f8eSopenharmony_ci     * The input parameter is a character string.
28461847f8eSopenharmony_ci     * The input parameter is the URLParams object.
28561847f8eSopenharmony_ci     *
28661847f8eSopenharmony_ci     * @param { string[][] | Record<string, string> | string | URLParams } [init] - init init
28761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.
28861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28961847f8eSopenharmony_ci     * @crossplatform
29061847f8eSopenharmony_ci     * @atomicservice
29161847f8eSopenharmony_ci     * @since 11
29261847f8eSopenharmony_ci     */
29361847f8eSopenharmony_ci    constructor(init?: string[][] | Record<string, string> | string | URLParams);
29461847f8eSopenharmony_ci
29561847f8eSopenharmony_ci    /**
29661847f8eSopenharmony_ci     * Appends a specified key/value pair as a new search parameter.
29761847f8eSopenharmony_ci     *
29861847f8eSopenharmony_ci     * @param { string } name - name name Key name of the search parameter to be inserted.
29961847f8eSopenharmony_ci     * @param { string } value - value value Values of search parameters to be inserted.
30061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
30161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
30261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
30361847f8eSopenharmony_ci     * 3.Parameter verification failed.
30461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30561847f8eSopenharmony_ci     * @since 9
30661847f8eSopenharmony_ci     */
30761847f8eSopenharmony_ci    /**
30861847f8eSopenharmony_ci     * Appends a specified key/value pair as a new search parameter.
30961847f8eSopenharmony_ci     *
31061847f8eSopenharmony_ci     * @param { string } name - name name Key name of the search parameter to be inserted.
31161847f8eSopenharmony_ci     * @param { string } value - value value Values of search parameters to be inserted.
31261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
31361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
31461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
31561847f8eSopenharmony_ci     * 3.Parameter verification failed.
31661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31761847f8eSopenharmony_ci     * @crossplatform
31861847f8eSopenharmony_ci     * @since 10
31961847f8eSopenharmony_ci     */
32061847f8eSopenharmony_ci    /**
32161847f8eSopenharmony_ci     * Appends a specified key/value pair as a new search parameter.
32261847f8eSopenharmony_ci     *
32361847f8eSopenharmony_ci     * @param { string } name - name name Key name of the search parameter to be inserted.
32461847f8eSopenharmony_ci     * @param { string } value - value value Values of search parameters to be inserted.
32561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
32661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
32761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
32861847f8eSopenharmony_ci     * 3.Parameter verification failed.
32961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33061847f8eSopenharmony_ci     * @crossplatform
33161847f8eSopenharmony_ci     * @atomicservice
33261847f8eSopenharmony_ci     * @since 11
33361847f8eSopenharmony_ci     */
33461847f8eSopenharmony_ci    append(name: string, value: string): void;
33561847f8eSopenharmony_ci
33661847f8eSopenharmony_ci    /**
33761847f8eSopenharmony_ci     * Deletes the given search parameter and its associated value,from the list of all search parameters.
33861847f8eSopenharmony_ci     *
33961847f8eSopenharmony_ci     * @param { string } name - name name Name of the key-value pair to be deleted.
34061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
34161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
34261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
34361847f8eSopenharmony_ci     * 3.Parameter verification failed.
34461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34561847f8eSopenharmony_ci     * @since 9
34661847f8eSopenharmony_ci     */
34761847f8eSopenharmony_ci    /**
34861847f8eSopenharmony_ci     * Deletes the given search parameter and its associated value,from the list of all search parameters.
34961847f8eSopenharmony_ci     *
35061847f8eSopenharmony_ci     * @param { string } name - name name Name of the key-value pair to be deleted.
35161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
35261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
35361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
35461847f8eSopenharmony_ci     * 3.Parameter verification failed.
35561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35661847f8eSopenharmony_ci     * @crossplatform
35761847f8eSopenharmony_ci     * @since 10
35861847f8eSopenharmony_ci     */
35961847f8eSopenharmony_ci    /**
36061847f8eSopenharmony_ci     * Deletes the given search parameter and its associated value,from the list of all search parameters.
36161847f8eSopenharmony_ci     *
36261847f8eSopenharmony_ci     * @param { string } name - name name Name of the key-value pair to be deleted.
36361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
36461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
36561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
36661847f8eSopenharmony_ci     * 3.Parameter verification failed.
36761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36861847f8eSopenharmony_ci     * @crossplatform
36961847f8eSopenharmony_ci     * @atomicservice
37061847f8eSopenharmony_ci     * @since 11
37161847f8eSopenharmony_ci     */
37261847f8eSopenharmony_ci    delete(name: string): void;
37361847f8eSopenharmony_ci
37461847f8eSopenharmony_ci    /**
37561847f8eSopenharmony_ci     * Returns all key-value pairs associated with a given search parameter as an array.
37661847f8eSopenharmony_ci     *
37761847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key value.
37861847f8eSopenharmony_ci     * @returns { string[] } string[] Returns all key-value pairs with the specified name.
37961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
38061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
38161847f8eSopenharmony_ci     * 2.Incorrect parameter types;
38261847f8eSopenharmony_ci     * 3.Parameter verification failed.
38361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38461847f8eSopenharmony_ci     * @since 9
38561847f8eSopenharmony_ci     */
38661847f8eSopenharmony_ci    /**
38761847f8eSopenharmony_ci     * Returns all key-value pairs associated with a given search parameter as an array.
38861847f8eSopenharmony_ci     *
38961847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key value.
39061847f8eSopenharmony_ci     * @returns { string[] } string[] Returns all key-value pairs with the specified name.
39161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
39261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
39361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
39461847f8eSopenharmony_ci     * 3.Parameter verification failed.
39561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39661847f8eSopenharmony_ci     * @crossplatform
39761847f8eSopenharmony_ci     * @since 10
39861847f8eSopenharmony_ci     */
39961847f8eSopenharmony_ci    /**
40061847f8eSopenharmony_ci     * Returns all key-value pairs associated with a given search parameter as an array.
40161847f8eSopenharmony_ci     *
40261847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key value.
40361847f8eSopenharmony_ci     * @returns { string[] } string[] Returns all key-value pairs with the specified name.
40461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
40561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
40661847f8eSopenharmony_ci     * 2.Incorrect parameter types;
40761847f8eSopenharmony_ci     * 3.Parameter verification failed.
40861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40961847f8eSopenharmony_ci     * @crossplatform
41061847f8eSopenharmony_ci     * @atomicservice
41161847f8eSopenharmony_ci     * @since 11
41261847f8eSopenharmony_ci     */
41361847f8eSopenharmony_ci    getAll(name: string): string[];
41461847f8eSopenharmony_ci
41561847f8eSopenharmony_ci    /**
41661847f8eSopenharmony_ci     * Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
41761847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
41861847f8eSopenharmony_ci     *
41961847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an iterator for ES6.
42061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42161847f8eSopenharmony_ci     * @since 9
42261847f8eSopenharmony_ci     */
42361847f8eSopenharmony_ci    /**
42461847f8eSopenharmony_ci     * Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
42561847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
42661847f8eSopenharmony_ci     *
42761847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an iterator for ES6.
42861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42961847f8eSopenharmony_ci     * @crossplatform
43061847f8eSopenharmony_ci     * @since 10
43161847f8eSopenharmony_ci     */
43261847f8eSopenharmony_ci    /**
43361847f8eSopenharmony_ci     * Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
43461847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
43561847f8eSopenharmony_ci     *
43661847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an iterator for ES6.
43761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43861847f8eSopenharmony_ci     * @crossplatform
43961847f8eSopenharmony_ci     * @atomicservice
44061847f8eSopenharmony_ci     * @since 11
44161847f8eSopenharmony_ci     */
44261847f8eSopenharmony_ci    entries(): IterableIterator<[string, string]>;
44361847f8eSopenharmony_ci
44461847f8eSopenharmony_ci    /**
44561847f8eSopenharmony_ci     * Callback functions are used to traverse key-value pairs on the URLParams instance object.
44661847f8eSopenharmony_ci     *
44761847f8eSopenharmony_ci     * @param { function } callbackFn - callbackFn value Current traversal key value,
44861847f8eSopenharmony_ci	 * key Indicates the name of the key that is traversed.
44961847f8eSopenharmony_ci     * @param { Object } [thisArg] - thisArg thisArg to be used as this value for when callbackFn is called
45061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
45161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
45261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
45361847f8eSopenharmony_ci     * 3.Parameter verification failed.
45461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45561847f8eSopenharmony_ci     * @since 9
45661847f8eSopenharmony_ci     */
45761847f8eSopenharmony_ci    /**
45861847f8eSopenharmony_ci     * Callback functions are used to traverse key-value pairs on the URLParams instance object.
45961847f8eSopenharmony_ci     *
46061847f8eSopenharmony_ci     * @param { function } callbackFn - callbackFn value Current traversal key value,
46161847f8eSopenharmony_ci	 * key Indicates the name of the key that is traversed.
46261847f8eSopenharmony_ci     * @param { Object } [thisArg] - thisArg thisArg to be used as this value for when callbackFn is called
46361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
46461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
46561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
46661847f8eSopenharmony_ci     * 3.Parameter verification failed.
46761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46861847f8eSopenharmony_ci     * @crossplatform
46961847f8eSopenharmony_ci     * @since 10
47061847f8eSopenharmony_ci     */
47161847f8eSopenharmony_ci    /**
47261847f8eSopenharmony_ci     * Callback functions are used to traverse key-value pairs on the URLParams instance object.
47361847f8eSopenharmony_ci     *
47461847f8eSopenharmony_ci     * @param { function } callbackFn - callbackFn value Current traversal key value,
47561847f8eSopenharmony_ci	 * key Indicates the name of the key that is traversed.
47661847f8eSopenharmony_ci     * @param { Object } [thisArg] - thisArg thisArg to be used as this value for when callbackFn is called
47761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
47861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
47961847f8eSopenharmony_ci     * 2.Incorrect parameter types;
48061847f8eSopenharmony_ci     * 3.Parameter verification failed.
48161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48261847f8eSopenharmony_ci     * @crossplatform
48361847f8eSopenharmony_ci     * @atomicservice
48461847f8eSopenharmony_ci     * @since 11
48561847f8eSopenharmony_ci     */
48661847f8eSopenharmony_ci    forEach(callbackFn: (value: string, key: string, searchParams: URLParams) => void, thisArg?: Object): void;
48761847f8eSopenharmony_ci
48861847f8eSopenharmony_ci    /**
48961847f8eSopenharmony_ci     * Returns the first value associated to the given search parameter.
49061847f8eSopenharmony_ci     *
49161847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
49261847f8eSopenharmony_ci     * @returns { string | null } Returns the first value found by name. If no value is found, null is returned.
49361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
49561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
49661847f8eSopenharmony_ci     * 3.Parameter verification failed.
49761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49861847f8eSopenharmony_ci     * @since 9
49961847f8eSopenharmony_ci     */
50061847f8eSopenharmony_ci    /**
50161847f8eSopenharmony_ci     * Returns the first value associated to the given search parameter.
50261847f8eSopenharmony_ci     *
50361847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
50461847f8eSopenharmony_ci     * @returns { string | null } Returns the first value found by name. If no value is found, null is returned.
50561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
50761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
50861847f8eSopenharmony_ci     * 3.Parameter verification failed.
50961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
51061847f8eSopenharmony_ci     * @crossplatform
51161847f8eSopenharmony_ci     * @since 10
51261847f8eSopenharmony_ci     */
51361847f8eSopenharmony_ci    /**
51461847f8eSopenharmony_ci     * Returns the first value associated to the given search parameter.
51561847f8eSopenharmony_ci     *
51661847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
51761847f8eSopenharmony_ci     * @returns { string | null } Returns the first value found by name. If no value is found, null is returned.
51861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
51961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
52061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
52161847f8eSopenharmony_ci     * 3.Parameter verification failed.
52261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
52361847f8eSopenharmony_ci     * @crossplatform
52461847f8eSopenharmony_ci     * @atomicservice
52561847f8eSopenharmony_ci     * @since 11
52661847f8eSopenharmony_ci     */
52761847f8eSopenharmony_ci    get(name: string): string | null;
52861847f8eSopenharmony_ci
52961847f8eSopenharmony_ci    /**
53061847f8eSopenharmony_ci     * Returns a Boolean that indicates whether a parameter with the specified name exists.
53161847f8eSopenharmony_ci     *
53261847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
53361847f8eSopenharmony_ci     * @returns { boolean } Returns a Boolean value that indicates whether a found
53461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
53561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
53661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
53761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
53861847f8eSopenharmony_ci     * @since 9
53961847f8eSopenharmony_ci     */
54061847f8eSopenharmony_ci    /**
54161847f8eSopenharmony_ci     * Returns a Boolean that indicates whether a parameter with the specified name exists.
54261847f8eSopenharmony_ci     *
54361847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
54461847f8eSopenharmony_ci     * @returns { boolean } Returns a Boolean value that indicates whether a found
54561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
54661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
54761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
54861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
54961847f8eSopenharmony_ci     * @crossplatform
55061847f8eSopenharmony_ci     * @since 10
55161847f8eSopenharmony_ci     */
55261847f8eSopenharmony_ci    /**
55361847f8eSopenharmony_ci     * Returns a Boolean that indicates whether a parameter with the specified name exists.
55461847f8eSopenharmony_ci     *
55561847f8eSopenharmony_ci     * @param { string } name - name name Specifies the name of a key-value pair.
55661847f8eSopenharmony_ci     * @returns { boolean } Returns a Boolean value that indicates whether a found
55761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
55861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
55961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
56061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
56161847f8eSopenharmony_ci     * @crossplatform
56261847f8eSopenharmony_ci     * @atomicservice
56361847f8eSopenharmony_ci     * @since 11
56461847f8eSopenharmony_ci     */
56561847f8eSopenharmony_ci    has(name: string): boolean;
56661847f8eSopenharmony_ci
56761847f8eSopenharmony_ci    /**
56861847f8eSopenharmony_ci     * Sets the value associated with a given search parameter to the
56961847f8eSopenharmony_ci     * given value. If there were several matching values, this method
57061847f8eSopenharmony_ci     * deletes the others. If the search parameter doesn't exist, this
57161847f8eSopenharmony_ci     * method creates it.
57261847f8eSopenharmony_ci     *
57361847f8eSopenharmony_ci     * @param { string } name - name name Key name of the parameter to be set.
57461847f8eSopenharmony_ci     * @param { string } value - value value Indicates the parameter value to be set.
57561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
57661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
57761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
57861847f8eSopenharmony_ci     * 3.Parameter verification failed.
57961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
58061847f8eSopenharmony_ci     * @since 9
58161847f8eSopenharmony_ci     */
58261847f8eSopenharmony_ci    /**
58361847f8eSopenharmony_ci     * Sets the value associated with a given search parameter to the
58461847f8eSopenharmony_ci     * given value. If there were several matching values, this method
58561847f8eSopenharmony_ci     * deletes the others. If the search parameter doesn't exist, this
58661847f8eSopenharmony_ci     * method creates it.
58761847f8eSopenharmony_ci     *
58861847f8eSopenharmony_ci     * @param { string } name - name name Key name of the parameter to be set.
58961847f8eSopenharmony_ci     * @param { string } value - value value Indicates the parameter value to be set.
59061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
59161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
59261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
59361847f8eSopenharmony_ci     * 3.Parameter verification failed.
59461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
59561847f8eSopenharmony_ci     * @crossplatform
59661847f8eSopenharmony_ci     * @since 10
59761847f8eSopenharmony_ci     */
59861847f8eSopenharmony_ci    /**
59961847f8eSopenharmony_ci     * Sets the value associated with a given search parameter to the
60061847f8eSopenharmony_ci     * given value. If there were several matching values, this method
60161847f8eSopenharmony_ci     * deletes the others. If the search parameter doesn't exist, this
60261847f8eSopenharmony_ci     * method creates it.
60361847f8eSopenharmony_ci     *
60461847f8eSopenharmony_ci     * @param { string } name - name name Key name of the parameter to be set.
60561847f8eSopenharmony_ci     * @param { string } value - value value Indicates the parameter value to be set.
60661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
60761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
60861847f8eSopenharmony_ci     * 2.Incorrect parameter types;
60961847f8eSopenharmony_ci     * 3.Parameter verification failed.
61061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
61161847f8eSopenharmony_ci     * @crossplatform
61261847f8eSopenharmony_ci     * @atomicservice
61361847f8eSopenharmony_ci     * @since 11
61461847f8eSopenharmony_ci     */
61561847f8eSopenharmony_ci    set(name: string, value: string): void;
61661847f8eSopenharmony_ci
61761847f8eSopenharmony_ci    /**
61861847f8eSopenharmony_ci     * Sort all key/value pairs contained in this object in place and return undefined.
61961847f8eSopenharmony_ci     *
62061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
62161847f8eSopenharmony_ci     * @since 9
62261847f8eSopenharmony_ci     */
62361847f8eSopenharmony_ci    /**
62461847f8eSopenharmony_ci     * Sort all key/value pairs contained in this object in place and return undefined.
62561847f8eSopenharmony_ci     *
62661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
62761847f8eSopenharmony_ci     * @crossplatform
62861847f8eSopenharmony_ci     * @since 10
62961847f8eSopenharmony_ci     */
63061847f8eSopenharmony_ci    /**
63161847f8eSopenharmony_ci     * Sort all key/value pairs contained in this object in place and return undefined.
63261847f8eSopenharmony_ci     *
63361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
63461847f8eSopenharmony_ci     * @crossplatform
63561847f8eSopenharmony_ci     * @atomicservice
63661847f8eSopenharmony_ci     * @since 11
63761847f8eSopenharmony_ci     */
63861847f8eSopenharmony_ci    sort(): void;
63961847f8eSopenharmony_ci
64061847f8eSopenharmony_ci    /**
64161847f8eSopenharmony_ci     * Returns an iterator allowing to go through all keys contained in this object.
64261847f8eSopenharmony_ci     *
64361847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the names of each name-value pair.
64461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
64561847f8eSopenharmony_ci     * @since 9
64661847f8eSopenharmony_ci     */
64761847f8eSopenharmony_ci    /**
64861847f8eSopenharmony_ci     * Returns an iterator allowing to go through all keys contained in this object.
64961847f8eSopenharmony_ci     *
65061847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the names of each name-value pair.
65161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
65261847f8eSopenharmony_ci     * @crossplatform
65361847f8eSopenharmony_ci     * @since 10
65461847f8eSopenharmony_ci     */
65561847f8eSopenharmony_ci    /**
65661847f8eSopenharmony_ci     * Returns an iterator allowing to go through all keys contained in this object.
65761847f8eSopenharmony_ci     *
65861847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the names of each name-value pair.
65961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
66061847f8eSopenharmony_ci     * @crossplatform
66161847f8eSopenharmony_ci     * @atomicservice
66261847f8eSopenharmony_ci     * @since 11
66361847f8eSopenharmony_ci     */
66461847f8eSopenharmony_ci    keys(): IterableIterator<string>;
66561847f8eSopenharmony_ci
66661847f8eSopenharmony_ci    /**
66761847f8eSopenharmony_ci     * Returns an iterator allowing to go through all values contained in this object.
66861847f8eSopenharmony_ci     *
66961847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the values of each name-value pair.
67061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
67161847f8eSopenharmony_ci     * @since 9
67261847f8eSopenharmony_ci     */
67361847f8eSopenharmony_ci    /**
67461847f8eSopenharmony_ci     * Returns an iterator allowing to go through all values contained in this object.
67561847f8eSopenharmony_ci     *
67661847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the values of each name-value pair.
67761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
67861847f8eSopenharmony_ci     * @crossplatform
67961847f8eSopenharmony_ci     * @since 10
68061847f8eSopenharmony_ci     */
68161847f8eSopenharmony_ci    /**
68261847f8eSopenharmony_ci     * Returns an iterator allowing to go through all values contained in this object.
68361847f8eSopenharmony_ci     *
68461847f8eSopenharmony_ci     * @returns { IterableIterator<string> } Returns an ES6 Iterator over the values of each name-value pair.
68561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
68661847f8eSopenharmony_ci     * @crossplatform
68761847f8eSopenharmony_ci     * @atomicservice
68861847f8eSopenharmony_ci     * @since 11
68961847f8eSopenharmony_ci     */
69061847f8eSopenharmony_ci    values(): IterableIterator<string>;
69161847f8eSopenharmony_ci
69261847f8eSopenharmony_ci    /**
69361847f8eSopenharmony_ci     * Returns an iterator allowing to go through all key/value
69461847f8eSopenharmony_ci     * pairs contained in this object.
69561847f8eSopenharmony_ci     *
69661847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
69761847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
69861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
69961847f8eSopenharmony_ci     * @since 9
70061847f8eSopenharmony_ci     */
70161847f8eSopenharmony_ci    /**
70261847f8eSopenharmony_ci     * Returns an iterator allowing to go through all key/value
70361847f8eSopenharmony_ci     * pairs contained in this object.
70461847f8eSopenharmony_ci     *
70561847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
70661847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
70761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
70861847f8eSopenharmony_ci     * @crossplatform
70961847f8eSopenharmony_ci     * @since 10
71061847f8eSopenharmony_ci     */
71161847f8eSopenharmony_ci    /**
71261847f8eSopenharmony_ci     * Returns an iterator allowing to go through all key/value
71361847f8eSopenharmony_ci     * pairs contained in this object.
71461847f8eSopenharmony_ci     *
71561847f8eSopenharmony_ci     * @returns { IterableIterator<[string, string]> } Returns an ES6 iterator. Each item of the iterator is a JavaScript Array.
71661847f8eSopenharmony_ci     * The first item of Array is name, and the second item of Array is value.
71761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
71861847f8eSopenharmony_ci     * @crossplatform
71961847f8eSopenharmony_ci     * @atomicservice
72061847f8eSopenharmony_ci     * @since 11
72161847f8eSopenharmony_ci     */
72261847f8eSopenharmony_ci    [Symbol.iterator](): IterableIterator<[string, string]>;
72361847f8eSopenharmony_ci
72461847f8eSopenharmony_ci    /**
72561847f8eSopenharmony_ci     * Returns a query string suitable for use in a URL.
72661847f8eSopenharmony_ci     *
72761847f8eSopenharmony_ci     * @returns { string } Returns a search parameter serialized as a string, percent-encoded if necessary.
72861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
72961847f8eSopenharmony_ci     * @since 9
73061847f8eSopenharmony_ci     */
73161847f8eSopenharmony_ci    /**
73261847f8eSopenharmony_ci     * Returns a query string suitable for use in a URL.
73361847f8eSopenharmony_ci     *
73461847f8eSopenharmony_ci     * @returns { string } Returns a search parameter serialized as a string, percent-encoded if necessary.
73561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
73661847f8eSopenharmony_ci     * @crossplatform
73761847f8eSopenharmony_ci     * @since 10
73861847f8eSopenharmony_ci     */
73961847f8eSopenharmony_ci    /**
74061847f8eSopenharmony_ci     * Returns a query string suitable for use in a URL.
74161847f8eSopenharmony_ci     *
74261847f8eSopenharmony_ci     * @returns { string } Returns a search parameter serialized as a string, percent-encoded if necessary.
74361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
74461847f8eSopenharmony_ci     * @crossplatform
74561847f8eSopenharmony_ci     * @atomicservice
74661847f8eSopenharmony_ci     * @since 11
74761847f8eSopenharmony_ci     */
74861847f8eSopenharmony_ci    toString(): string;
74961847f8eSopenharmony_ci  }
75061847f8eSopenharmony_ci
75161847f8eSopenharmony_ci  /**
75261847f8eSopenharmony_ci   * The interface of URL is used to parse, construct, normalize, and encode URLs.
75361847f8eSopenharmony_ci   *
75461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
75561847f8eSopenharmony_ci   * @since 7
75661847f8eSopenharmony_ci   * @name URL
75761847f8eSopenharmony_ci   */
75861847f8eSopenharmony_ci  /**
75961847f8eSopenharmony_ci   * The interface of URL is used to parse, construct, normalize, and encode URLs.
76061847f8eSopenharmony_ci   *
76161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
76261847f8eSopenharmony_ci   * @crossplatform
76361847f8eSopenharmony_ci   * @since 10
76461847f8eSopenharmony_ci   * @name URL
76561847f8eSopenharmony_ci   */
76661847f8eSopenharmony_ci  /**
76761847f8eSopenharmony_ci   * The interface of URL is used to parse, construct, normalize, and encode URLs.
76861847f8eSopenharmony_ci   *
76961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
77061847f8eSopenharmony_ci   * @crossplatform
77161847f8eSopenharmony_ci   * @atomicservice
77261847f8eSopenharmony_ci   * @since 11
77361847f8eSopenharmony_ci   * @name URL
77461847f8eSopenharmony_ci   */
77561847f8eSopenharmony_ci  class URL {
77661847f8eSopenharmony_ci    /**
77761847f8eSopenharmony_ci     * URL constructor, which is used to instantiate a URL object.
77861847f8eSopenharmony_ci     * url: Absolute or relative input URL to resolve. Base is required if input is relative.
77961847f8eSopenharmony_ci     * If input is an absolute value, base ignores the value.
78061847f8eSopenharmony_ci     * base: Base URL to parse if input is not absolute.
78161847f8eSopenharmony_ci     *
78261847f8eSopenharmony_ci     * @param { string } url - url url
78361847f8eSopenharmony_ci     * @param { string | URL } base - base base
78461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
78561847f8eSopenharmony_ci     * @since 7
78661847f8eSopenharmony_ci     * @deprecated since 9
78761847f8eSopenharmony_ci     * @useinstead ohos.url.URL.parseURL
78861847f8eSopenharmony_ci     */
78961847f8eSopenharmony_ci    constructor(url: string, base?: string | URL);
79061847f8eSopenharmony_ci
79161847f8eSopenharmony_ci    /**
79261847f8eSopenharmony_ci     * URL constructor, which is used to instantiate a URL object.
79361847f8eSopenharmony_ci     *
79461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
79561847f8eSopenharmony_ci     * @since 9
79661847f8eSopenharmony_ci     */
79761847f8eSopenharmony_ci    /**
79861847f8eSopenharmony_ci     * URL constructor, which is used to instantiate a URL object.
79961847f8eSopenharmony_ci     *
80061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
80161847f8eSopenharmony_ci     * @crossplatform
80261847f8eSopenharmony_ci     * @since 10
80361847f8eSopenharmony_ci     */
80461847f8eSopenharmony_ci    /**
80561847f8eSopenharmony_ci     * URL constructor, which is used to instantiate a URL object.
80661847f8eSopenharmony_ci     *
80761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
80861847f8eSopenharmony_ci     * @crossplatform
80961847f8eSopenharmony_ci     * @atomicservice
81061847f8eSopenharmony_ci     * @since 11
81161847f8eSopenharmony_ci     */
81261847f8eSopenharmony_ci    constructor();
81361847f8eSopenharmony_ci
81461847f8eSopenharmony_ci    /**
81561847f8eSopenharmony_ci     * Replaces the original constructor to process arguments and return a url object.
81661847f8eSopenharmony_ci     *
81761847f8eSopenharmony_ci     * @param { string } url - url url Absolute or relative input URL to resolve. Base is required if input is relative.
81861847f8eSopenharmony_ci     * If input is an absolute value, base ignores the value.
81961847f8eSopenharmony_ci     * @param { string | URL } [base] - base base Base URL to parse if input is not absolute.
82061847f8eSopenharmony_ci     * @returns { URL }
82161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
82261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
82361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
82461847f8eSopenharmony_ci     * 3.Parameter verification failed.
82561847f8eSopenharmony_ci     * @throws { BusinessError } 10200002 - Invalid url string.
82661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
82761847f8eSopenharmony_ci     * @since 9
82861847f8eSopenharmony_ci     */
82961847f8eSopenharmony_ci    /**
83061847f8eSopenharmony_ci     * Replaces the original constructor to process arguments and return a url object.
83161847f8eSopenharmony_ci     *
83261847f8eSopenharmony_ci     * @param { string } url - url url Absolute or relative input URL to resolve. Base is required if input is relative.
83361847f8eSopenharmony_ci     * If input is an absolute value, base ignores the value.
83461847f8eSopenharmony_ci     * @param { string | URL } [base] - base base Base URL to parse if input is not absolute.
83561847f8eSopenharmony_ci     * @returns { URL }
83661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
83761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
83861847f8eSopenharmony_ci     * 2.Incorrect parameter types;
83961847f8eSopenharmony_ci     * 3.Parameter verification failed.
84061847f8eSopenharmony_ci     * @throws { BusinessError } 10200002 - Invalid url string.
84161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
84261847f8eSopenharmony_ci     * @crossplatform
84361847f8eSopenharmony_ci     * @since 10
84461847f8eSopenharmony_ci     */
84561847f8eSopenharmony_ci    /**
84661847f8eSopenharmony_ci     * Replaces the original constructor to process arguments and return a url object.
84761847f8eSopenharmony_ci     *
84861847f8eSopenharmony_ci     * @param { string } url - url url Absolute or relative input URL to resolve. Base is required if input is relative.
84961847f8eSopenharmony_ci     * If input is an absolute value, base ignores the value.
85061847f8eSopenharmony_ci     * @param { string | URL } [base] - base base Base URL to parse if input is not absolute.
85161847f8eSopenharmony_ci     * @returns { URL }
85261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
85361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
85461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
85561847f8eSopenharmony_ci     * 3.Parameter verification failed.
85661847f8eSopenharmony_ci     * @throws { BusinessError } 10200002 - Invalid url string.
85761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
85861847f8eSopenharmony_ci     * @crossplatform
85961847f8eSopenharmony_ci     * @atomicservice
86061847f8eSopenharmony_ci     * @since 11
86161847f8eSopenharmony_ci     */
86261847f8eSopenharmony_ci    static parseURL(url: string, base?: string | URL): URL;
86361847f8eSopenharmony_ci
86461847f8eSopenharmony_ci    /**
86561847f8eSopenharmony_ci     * Returns the serialized URL as a string.
86661847f8eSopenharmony_ci     *
86761847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
86861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
86961847f8eSopenharmony_ci     * @since 7
87061847f8eSopenharmony_ci     */
87161847f8eSopenharmony_ci    /**
87261847f8eSopenharmony_ci     * Returns the serialized URL as a string.
87361847f8eSopenharmony_ci     *
87461847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
87561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
87661847f8eSopenharmony_ci     * @crossplatform
87761847f8eSopenharmony_ci     * @since 10
87861847f8eSopenharmony_ci     */
87961847f8eSopenharmony_ci    /**
88061847f8eSopenharmony_ci     * Returns the serialized URL as a string.
88161847f8eSopenharmony_ci     *
88261847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
88361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
88461847f8eSopenharmony_ci     * @crossplatform
88561847f8eSopenharmony_ci     * @atomicservice
88661847f8eSopenharmony_ci     * @since 11
88761847f8eSopenharmony_ci     */
88861847f8eSopenharmony_ci    toString(): string;
88961847f8eSopenharmony_ci
89061847f8eSopenharmony_ci    /**
89161847f8eSopenharmony_ci     * Returns the serialized URL as a string.
89261847f8eSopenharmony_ci     *
89361847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
89461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
89561847f8eSopenharmony_ci     * @since 7
89661847f8eSopenharmony_ci     */
89761847f8eSopenharmony_ci    /**
89861847f8eSopenharmony_ci     * Returns the serialized URL as a string.
89961847f8eSopenharmony_ci     *
90061847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
90161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
90261847f8eSopenharmony_ci     * @crossplatform
90361847f8eSopenharmony_ci     * @since 10
90461847f8eSopenharmony_ci     */
90561847f8eSopenharmony_ci    /**
90661847f8eSopenharmony_ci     * Returns the serialized URL as a string.
90761847f8eSopenharmony_ci     *
90861847f8eSopenharmony_ci     * @returns { string } Returns the serialized URL as a string.
90961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
91061847f8eSopenharmony_ci     * @crossplatform
91161847f8eSopenharmony_ci     * @atomicservice
91261847f8eSopenharmony_ci     * @since 11
91361847f8eSopenharmony_ci     */
91461847f8eSopenharmony_ci    toJSON(): string;
91561847f8eSopenharmony_ci
91661847f8eSopenharmony_ci    /**
91761847f8eSopenharmony_ci     * Gets and sets the fragment portion of the URL.
91861847f8eSopenharmony_ci     *
91961847f8eSopenharmony_ci     * @type { string }
92061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
92161847f8eSopenharmony_ci     * @since 7
92261847f8eSopenharmony_ci     */
92361847f8eSopenharmony_ci    /**
92461847f8eSopenharmony_ci     * Gets and sets the fragment portion of the URL.
92561847f8eSopenharmony_ci     *
92661847f8eSopenharmony_ci     * @type { string }
92761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
92861847f8eSopenharmony_ci     * @crossplatform
92961847f8eSopenharmony_ci     * @since 10
93061847f8eSopenharmony_ci     */
93161847f8eSopenharmony_ci    /**
93261847f8eSopenharmony_ci     * Gets and sets the fragment portion of the URL.
93361847f8eSopenharmony_ci     *
93461847f8eSopenharmony_ci     * @type { string }
93561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
93661847f8eSopenharmony_ci     * @crossplatform
93761847f8eSopenharmony_ci     * @atomicservice
93861847f8eSopenharmony_ci     * @since 11
93961847f8eSopenharmony_ci     */
94061847f8eSopenharmony_ci    hash: string;
94161847f8eSopenharmony_ci
94261847f8eSopenharmony_ci    /**
94361847f8eSopenharmony_ci     * Gets and sets the host portion of the URL.
94461847f8eSopenharmony_ci     *
94561847f8eSopenharmony_ci     * @type { string }
94661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
94761847f8eSopenharmony_ci     * @since 7
94861847f8eSopenharmony_ci     */
94961847f8eSopenharmony_ci    /**
95061847f8eSopenharmony_ci     * Gets and sets the host portion of the URL.
95161847f8eSopenharmony_ci     *
95261847f8eSopenharmony_ci     * @type { string }
95361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
95461847f8eSopenharmony_ci     * @crossplatform
95561847f8eSopenharmony_ci     * @since 10
95661847f8eSopenharmony_ci     */
95761847f8eSopenharmony_ci    /**
95861847f8eSopenharmony_ci     * Gets and sets the host portion of the URL.
95961847f8eSopenharmony_ci     *
96061847f8eSopenharmony_ci     * @type { string }
96161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
96261847f8eSopenharmony_ci     * @crossplatform
96361847f8eSopenharmony_ci     * @atomicservice
96461847f8eSopenharmony_ci     * @since 11
96561847f8eSopenharmony_ci     */
96661847f8eSopenharmony_ci    host: string;
96761847f8eSopenharmony_ci
96861847f8eSopenharmony_ci    /**
96961847f8eSopenharmony_ci     * Gets and sets the host name portion of the URL,not include the port.
97061847f8eSopenharmony_ci     *
97161847f8eSopenharmony_ci     * @type { string }
97261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
97361847f8eSopenharmony_ci     * @since 7
97461847f8eSopenharmony_ci     */
97561847f8eSopenharmony_ci    /**
97661847f8eSopenharmony_ci     * Gets and sets the host name portion of the URL,not include the port.
97761847f8eSopenharmony_ci     *
97861847f8eSopenharmony_ci     * @type { string }
97961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
98061847f8eSopenharmony_ci     * @crossplatform
98161847f8eSopenharmony_ci     * @since 10
98261847f8eSopenharmony_ci     */
98361847f8eSopenharmony_ci    /**
98461847f8eSopenharmony_ci     * Gets and sets the host name portion of the URL,not include the port.
98561847f8eSopenharmony_ci     *
98661847f8eSopenharmony_ci     * @type { string }
98761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
98861847f8eSopenharmony_ci     * @crossplatform
98961847f8eSopenharmony_ci     * @atomicservice
99061847f8eSopenharmony_ci     * @since 11
99161847f8eSopenharmony_ci     */
99261847f8eSopenharmony_ci    hostname: string;
99361847f8eSopenharmony_ci
99461847f8eSopenharmony_ci    /**
99561847f8eSopenharmony_ci     * Gets and sets the serialized URL.
99661847f8eSopenharmony_ci     *
99761847f8eSopenharmony_ci     * @type { string }
99861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
99961847f8eSopenharmony_ci     * @since 7
100061847f8eSopenharmony_ci     */
100161847f8eSopenharmony_ci    /**
100261847f8eSopenharmony_ci     * Gets and sets the serialized URL.
100361847f8eSopenharmony_ci     *
100461847f8eSopenharmony_ci     * @type { string }
100561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
100661847f8eSopenharmony_ci     * @crossplatform
100761847f8eSopenharmony_ci     * @since 10
100861847f8eSopenharmony_ci     */
100961847f8eSopenharmony_ci    /**
101061847f8eSopenharmony_ci     * Gets and sets the serialized URL.
101161847f8eSopenharmony_ci     *
101261847f8eSopenharmony_ci     * @type { string }
101361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
101461847f8eSopenharmony_ci     * @crossplatform
101561847f8eSopenharmony_ci     * @atomicservice
101661847f8eSopenharmony_ci     * @since 11
101761847f8eSopenharmony_ci     */
101861847f8eSopenharmony_ci    href: string;
101961847f8eSopenharmony_ci
102061847f8eSopenharmony_ci    /**
102161847f8eSopenharmony_ci     * Gets the read-only serialization of the URL's origin.
102261847f8eSopenharmony_ci     *
102361847f8eSopenharmony_ci     * @type { string }
102461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
102561847f8eSopenharmony_ci     * @since 7
102661847f8eSopenharmony_ci     */
102761847f8eSopenharmony_ci    /**
102861847f8eSopenharmony_ci     * Gets the read-only serialization of the URL's origin.
102961847f8eSopenharmony_ci     *
103061847f8eSopenharmony_ci     * @type { string }
103161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
103261847f8eSopenharmony_ci     * @crossplatform
103361847f8eSopenharmony_ci     * @since 10
103461847f8eSopenharmony_ci     */
103561847f8eSopenharmony_ci    /**
103661847f8eSopenharmony_ci     * Gets the read-only serialization of the URL's origin.
103761847f8eSopenharmony_ci     *
103861847f8eSopenharmony_ci     * @type { string }
103961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
104061847f8eSopenharmony_ci     * @crossplatform
104161847f8eSopenharmony_ci     * @atomicservice
104261847f8eSopenharmony_ci     * @since 11
104361847f8eSopenharmony_ci     */
104461847f8eSopenharmony_ci    readonly origin: string;
104561847f8eSopenharmony_ci
104661847f8eSopenharmony_ci    /**
104761847f8eSopenharmony_ci     * Gets and sets the password portion of the URL.
104861847f8eSopenharmony_ci     *
104961847f8eSopenharmony_ci     * @type { string }
105061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
105161847f8eSopenharmony_ci     * @since 7
105261847f8eSopenharmony_ci     */
105361847f8eSopenharmony_ci    /**
105461847f8eSopenharmony_ci     * Gets and sets the password portion of the URL.
105561847f8eSopenharmony_ci     *
105661847f8eSopenharmony_ci     * @type { string }
105761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
105861847f8eSopenharmony_ci     * @crossplatform
105961847f8eSopenharmony_ci     * @since 10
106061847f8eSopenharmony_ci     */
106161847f8eSopenharmony_ci    /**
106261847f8eSopenharmony_ci     * Gets and sets the password portion of the URL.
106361847f8eSopenharmony_ci     *
106461847f8eSopenharmony_ci     * @type { string }
106561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
106661847f8eSopenharmony_ci     * @crossplatform
106761847f8eSopenharmony_ci     * @atomicservice
106861847f8eSopenharmony_ci     * @since 11
106961847f8eSopenharmony_ci     */
107061847f8eSopenharmony_ci    password: string;
107161847f8eSopenharmony_ci
107261847f8eSopenharmony_ci    /**
107361847f8eSopenharmony_ci     * Gets and sets the path portion of the URL.
107461847f8eSopenharmony_ci     *
107561847f8eSopenharmony_ci     * @type { string }
107661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
107761847f8eSopenharmony_ci     * @since 7
107861847f8eSopenharmony_ci     */
107961847f8eSopenharmony_ci    /**
108061847f8eSopenharmony_ci     * Gets and sets the path portion of the URL.
108161847f8eSopenharmony_ci     *
108261847f8eSopenharmony_ci     * @type { string }
108361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
108461847f8eSopenharmony_ci     * @crossplatform
108561847f8eSopenharmony_ci     * @since 10
108661847f8eSopenharmony_ci     */
108761847f8eSopenharmony_ci    /**
108861847f8eSopenharmony_ci     * Gets and sets the path portion of the URL.
108961847f8eSopenharmony_ci     *
109061847f8eSopenharmony_ci     * @type { string }
109161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
109261847f8eSopenharmony_ci     * @crossplatform
109361847f8eSopenharmony_ci     * @atomicservice
109461847f8eSopenharmony_ci     * @since 11
109561847f8eSopenharmony_ci     */
109661847f8eSopenharmony_ci    pathname: string;
109761847f8eSopenharmony_ci
109861847f8eSopenharmony_ci    /**
109961847f8eSopenharmony_ci     * Gets and sets the port portion of the URL.
110061847f8eSopenharmony_ci     *
110161847f8eSopenharmony_ci     * @type { string }
110261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
110361847f8eSopenharmony_ci     * @since 7
110461847f8eSopenharmony_ci     */
110561847f8eSopenharmony_ci    /**
110661847f8eSopenharmony_ci     * Gets and sets the port portion of the URL.
110761847f8eSopenharmony_ci     *
110861847f8eSopenharmony_ci     * @type { string }
110961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
111061847f8eSopenharmony_ci     * @crossplatform
111161847f8eSopenharmony_ci     * @since 10
111261847f8eSopenharmony_ci     */
111361847f8eSopenharmony_ci    /**
111461847f8eSopenharmony_ci     * Gets and sets the port portion of the URL.
111561847f8eSopenharmony_ci     *
111661847f8eSopenharmony_ci     * @type { string }
111761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
111861847f8eSopenharmony_ci     * @crossplatform
111961847f8eSopenharmony_ci     * @atomicservice
112061847f8eSopenharmony_ci     * @since 11
112161847f8eSopenharmony_ci     */
112261847f8eSopenharmony_ci    port: string;
112361847f8eSopenharmony_ci
112461847f8eSopenharmony_ci    /**
112561847f8eSopenharmony_ci     * Gets and sets the protocol portion of the URL.
112661847f8eSopenharmony_ci     *
112761847f8eSopenharmony_ci     * @type { string }
112861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
112961847f8eSopenharmony_ci     * @since 7
113061847f8eSopenharmony_ci     */
113161847f8eSopenharmony_ci    /**
113261847f8eSopenharmony_ci     * Gets and sets the protocol portion of the URL.
113361847f8eSopenharmony_ci     *
113461847f8eSopenharmony_ci     * @type { string }
113561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
113661847f8eSopenharmony_ci     * @crossplatform
113761847f8eSopenharmony_ci     * @since 10
113861847f8eSopenharmony_ci     */
113961847f8eSopenharmony_ci    /**
114061847f8eSopenharmony_ci     * Gets and sets the protocol portion of the URL.
114161847f8eSopenharmony_ci     *
114261847f8eSopenharmony_ci     * @type { string }
114361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
114461847f8eSopenharmony_ci     * @crossplatform
114561847f8eSopenharmony_ci     * @atomicservice
114661847f8eSopenharmony_ci     * @since 11
114761847f8eSopenharmony_ci     */
114861847f8eSopenharmony_ci    protocol: string;
114961847f8eSopenharmony_ci
115061847f8eSopenharmony_ci    /**
115161847f8eSopenharmony_ci     * Gets and sets the serialized query portion of the URL.
115261847f8eSopenharmony_ci     *
115361847f8eSopenharmony_ci     * @type { string }
115461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
115561847f8eSopenharmony_ci     * @since 7
115661847f8eSopenharmony_ci     */
115761847f8eSopenharmony_ci    /**
115861847f8eSopenharmony_ci     * Gets and sets the serialized query portion of the URL.
115961847f8eSopenharmony_ci     *
116061847f8eSopenharmony_ci     * @type { string }
116161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
116261847f8eSopenharmony_ci     * @crossplatform
116361847f8eSopenharmony_ci     * @since 10
116461847f8eSopenharmony_ci     */
116561847f8eSopenharmony_ci    /**
116661847f8eSopenharmony_ci     * Gets and sets the serialized query portion of the URL.
116761847f8eSopenharmony_ci     *
116861847f8eSopenharmony_ci     * @type { string }
116961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
117061847f8eSopenharmony_ci     * @crossplatform
117161847f8eSopenharmony_ci     * @atomicservice
117261847f8eSopenharmony_ci     * @since 11
117361847f8eSopenharmony_ci     */
117461847f8eSopenharmony_ci    search: string;
117561847f8eSopenharmony_ci
117661847f8eSopenharmony_ci    /**
117761847f8eSopenharmony_ci     * Gets the URLSearchParams object that represents the URL query parameter.
117861847f8eSopenharmony_ci     * This property is read-only, but URLSearchParams provides an object that can be used to change
117961847f8eSopenharmony_ci     * the URL instance. To replace the entire query parameter for a URL, use url.searchsetter.
118061847f8eSopenharmony_ci     *
118161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
118261847f8eSopenharmony_ci     * @since 7
118361847f8eSopenharmony_ci     * @deprecated since 9
118461847f8eSopenharmony_ci     * @useinstead ohos.url.URL.params
118561847f8eSopenharmony_ci     */
118661847f8eSopenharmony_ci    readonly searchParams: URLSearchParams;
118761847f8eSopenharmony_ci
118861847f8eSopenharmony_ci    /**
118961847f8eSopenharmony_ci     * Gets the URLParams object that represents the URL query parameter.
119061847f8eSopenharmony_ci     * This property is read-only, but URLParams provides an object that can be used to change
119161847f8eSopenharmony_ci     * the URL instance. To replace the entire query parameter for a URL, use url.searchsetter.
119261847f8eSopenharmony_ci     *
119361847f8eSopenharmony_ci     * @type { URLParams }
119461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
119561847f8eSopenharmony_ci     * @since 9
119661847f8eSopenharmony_ci     */
119761847f8eSopenharmony_ci    /**
119861847f8eSopenharmony_ci     * Gets the URLParams object that represents the URL query parameter.
119961847f8eSopenharmony_ci     * This property is read-only, but URLParams provides an object that can be used to change
120061847f8eSopenharmony_ci     * the URL instance. To replace the entire query parameter for a URL, use url.searchsetter.
120161847f8eSopenharmony_ci     *
120261847f8eSopenharmony_ci     * @type { URLParams }
120361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
120461847f8eSopenharmony_ci     * @crossplatform
120561847f8eSopenharmony_ci     * @since 10
120661847f8eSopenharmony_ci     */
120761847f8eSopenharmony_ci    /**
120861847f8eSopenharmony_ci     * Gets the URLParams object that represents the URL query parameter.
120961847f8eSopenharmony_ci     * This property is read-only, but URLParams provides an object that can be used to change
121061847f8eSopenharmony_ci     * the URL instance. To replace the entire query parameter for a URL, use url.searchsetter.
121161847f8eSopenharmony_ci     *
121261847f8eSopenharmony_ci     * @type { URLParams }
121361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
121461847f8eSopenharmony_ci     * @crossplatform
121561847f8eSopenharmony_ci     * @atomicservice
121661847f8eSopenharmony_ci     * @since 11
121761847f8eSopenharmony_ci     */
121861847f8eSopenharmony_ci    readonly params: URLParams;
121961847f8eSopenharmony_ci
122061847f8eSopenharmony_ci    /**
122161847f8eSopenharmony_ci     * Gets and sets the username portion of the URL.
122261847f8eSopenharmony_ci     *
122361847f8eSopenharmony_ci     * @type { string }
122461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
122561847f8eSopenharmony_ci     * @since 7
122661847f8eSopenharmony_ci     */
122761847f8eSopenharmony_ci    /**
122861847f8eSopenharmony_ci     * Gets and sets the username portion of the URL.
122961847f8eSopenharmony_ci     *
123061847f8eSopenharmony_ci     * @type { string }
123161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
123261847f8eSopenharmony_ci     * @crossplatform
123361847f8eSopenharmony_ci     * @since 10
123461847f8eSopenharmony_ci     */
123561847f8eSopenharmony_ci    /**
123661847f8eSopenharmony_ci     * Gets and sets the username portion of the URL.
123761847f8eSopenharmony_ci     *
123861847f8eSopenharmony_ci     * @type { string }
123961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
124061847f8eSopenharmony_ci     * @crossplatform
124161847f8eSopenharmony_ci     * @atomicservice
124261847f8eSopenharmony_ci     * @since 11
124361847f8eSopenharmony_ci     */
124461847f8eSopenharmony_ci    username: string;
124561847f8eSopenharmony_ci  }
124661847f8eSopenharmony_ci}
124761847f8eSopenharmony_ciexport default url;
1248