161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkUI 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { Callback } from './@ohos.base'; 2261847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base'; 2361847f8eSopenharmony_ci 2461847f8eSopenharmony_ci/** 2561847f8eSopenharmony_ci * @namespace router 2661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2761847f8eSopenharmony_ci * @since 8 2861847f8eSopenharmony_ci */ 2961847f8eSopenharmony_ci/** 3061847f8eSopenharmony_ci * @namespace router 3161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3261847f8eSopenharmony_ci * @crossplatform 3361847f8eSopenharmony_ci * @since 10 3461847f8eSopenharmony_ci */ 3561847f8eSopenharmony_ci/** 3661847f8eSopenharmony_ci * @namespace router 3761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3861847f8eSopenharmony_ci * @crossplatform 3961847f8eSopenharmony_ci * @atomicservice 4061847f8eSopenharmony_ci * @since 11 4161847f8eSopenharmony_ci */ 4261847f8eSopenharmony_cideclare namespace router { 4361847f8eSopenharmony_ci /** 4461847f8eSopenharmony_ci * Router Mode 4561847f8eSopenharmony_ci * 4661847f8eSopenharmony_ci * @enum { number } 4761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4861847f8eSopenharmony_ci * @since 9 4961847f8eSopenharmony_ci */ 5061847f8eSopenharmony_ci /** 5161847f8eSopenharmony_ci * Router Mode 5261847f8eSopenharmony_ci * 5361847f8eSopenharmony_ci * @enum { number } 5461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5561847f8eSopenharmony_ci * @crossplatform 5661847f8eSopenharmony_ci * @since 10 5761847f8eSopenharmony_ci */ 5861847f8eSopenharmony_ci /** 5961847f8eSopenharmony_ci * Router Mode 6061847f8eSopenharmony_ci * 6161847f8eSopenharmony_ci * @enum { number } 6261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6361847f8eSopenharmony_ci * @crossplatform 6461847f8eSopenharmony_ci * @atomicservice 6561847f8eSopenharmony_ci * @since 11 6661847f8eSopenharmony_ci */ 6761847f8eSopenharmony_ci export enum RouterMode { 6861847f8eSopenharmony_ci /** 6961847f8eSopenharmony_ci * Default route mode. 7061847f8eSopenharmony_ci * The page will be added to the top of the page stack. 7161847f8eSopenharmony_ci * 7261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7361847f8eSopenharmony_ci * @since 9 7461847f8eSopenharmony_ci */ 7561847f8eSopenharmony_ci /** 7661847f8eSopenharmony_ci * Default route mode. 7761847f8eSopenharmony_ci * The page will be added to the top of the page stack. 7861847f8eSopenharmony_ci * 7961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8061847f8eSopenharmony_ci * @crossplatform 8161847f8eSopenharmony_ci * @since 10 8261847f8eSopenharmony_ci */ 8361847f8eSopenharmony_ci /** 8461847f8eSopenharmony_ci * Default route mode. 8561847f8eSopenharmony_ci * The page will be added to the top of the page stack. 8661847f8eSopenharmony_ci * 8761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8861847f8eSopenharmony_ci * @crossplatform 8961847f8eSopenharmony_ci * @atomicservice 9061847f8eSopenharmony_ci * @since 11 9161847f8eSopenharmony_ci */ 9261847f8eSopenharmony_ci Standard, 9361847f8eSopenharmony_ci 9461847f8eSopenharmony_ci /** 9561847f8eSopenharmony_ci * Single route mode. 9661847f8eSopenharmony_ci * If the target page already has the same url page in the page stack, 9761847f8eSopenharmony_ci * the same url page closest to the top of the stack will be moved to the top of the stack. 9861847f8eSopenharmony_ci * If the target page url does not exist in the page stack, route will use default route mode. 9961847f8eSopenharmony_ci * 10061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10161847f8eSopenharmony_ci * @since 9 10261847f8eSopenharmony_ci */ 10361847f8eSopenharmony_ci /** 10461847f8eSopenharmony_ci * Single route mode. 10561847f8eSopenharmony_ci * If the target page already has the same url page in the page stack, 10661847f8eSopenharmony_ci * the same url page closest to the top of the stack will be moved to the top of the stack. 10761847f8eSopenharmony_ci * If the target page url does not exist in the page stack, route will use default route mode. 10861847f8eSopenharmony_ci * 10961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 11061847f8eSopenharmony_ci * @crossplatform 11161847f8eSopenharmony_ci * @since 10 11261847f8eSopenharmony_ci */ 11361847f8eSopenharmony_ci /** 11461847f8eSopenharmony_ci * Single route mode. 11561847f8eSopenharmony_ci * If the target page already has the same url page in the page stack, 11661847f8eSopenharmony_ci * the same url page closest to the top of the stack will be moved to the top of the stack. 11761847f8eSopenharmony_ci * If the target page url does not exist in the page stack, route will use default route mode. 11861847f8eSopenharmony_ci * 11961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12061847f8eSopenharmony_ci * @crossplatform 12161847f8eSopenharmony_ci * @atomicservice 12261847f8eSopenharmony_ci * @since 11 12361847f8eSopenharmony_ci */ 12461847f8eSopenharmony_ci Single, 12561847f8eSopenharmony_ci } 12661847f8eSopenharmony_ci 12761847f8eSopenharmony_ci /** 12861847f8eSopenharmony_ci * @typedef RouterOptions 12961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 13061847f8eSopenharmony_ci * @since 8 13161847f8eSopenharmony_ci */ 13261847f8eSopenharmony_ci /** 13361847f8eSopenharmony_ci * @typedef RouterOptions 13461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 13561847f8eSopenharmony_ci * @atomicservice 13661847f8eSopenharmony_ci * @since 11 13761847f8eSopenharmony_ci */ 13861847f8eSopenharmony_ci interface RouterOptions { 13961847f8eSopenharmony_ci /** 14061847f8eSopenharmony_ci * URI of the destination page, which supports the following formats: 14161847f8eSopenharmony_ci * 1. Absolute path of the page, which is provided by the pages list in the config.json file. 14261847f8eSopenharmony_ci * Example: 14361847f8eSopenharmony_ci * pages/index/index 14461847f8eSopenharmony_ci * pages/detail/detail 14561847f8eSopenharmony_ci * 2. Particular path. If the URI is a slash (/), the home page is displayed. 14661847f8eSopenharmony_ci * 14761847f8eSopenharmony_ci * @type { string } 14861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 14961847f8eSopenharmony_ci * @since 8 15061847f8eSopenharmony_ci */ 15161847f8eSopenharmony_ci /** 15261847f8eSopenharmony_ci * URI of the destination page, which supports the following formats: 15361847f8eSopenharmony_ci * 1. Absolute path of the page, which is provided by the pages list in the config.json file. 15461847f8eSopenharmony_ci * Example: 15561847f8eSopenharmony_ci * pages/index/index 15661847f8eSopenharmony_ci * pages/detail/detail 15761847f8eSopenharmony_ci * 2. Particular path. If the URI is a slash (/), the home page is displayed. 15861847f8eSopenharmony_ci * 15961847f8eSopenharmony_ci * @type { string } 16061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 16161847f8eSopenharmony_ci * @atomicservice 16261847f8eSopenharmony_ci * @since 11 16361847f8eSopenharmony_ci */ 16461847f8eSopenharmony_ci url: string; 16561847f8eSopenharmony_ci 16661847f8eSopenharmony_ci /** 16761847f8eSopenharmony_ci * Data that needs to be passed to the destination page during navigation. 16861847f8eSopenharmony_ci * After the destination page is displayed, the parameter can be directly used for the page. 16961847f8eSopenharmony_ci * For example, this.data1 (data1 is the key value of the params used for page navigation.) 17061847f8eSopenharmony_ci * 17161847f8eSopenharmony_ci * @type { ?Object } 17261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 17361847f8eSopenharmony_ci * @since 8 17461847f8eSopenharmony_ci */ 17561847f8eSopenharmony_ci /** 17661847f8eSopenharmony_ci * Data that needs to be passed to the destination page during navigation. 17761847f8eSopenharmony_ci * After the destination page is displayed, the parameter can be directly used for the page. 17861847f8eSopenharmony_ci * For example, this.data1 (data1 is the key value of the params used for page navigation.) 17961847f8eSopenharmony_ci * 18061847f8eSopenharmony_ci * @type { ?Object } 18161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 18261847f8eSopenharmony_ci * @atomicservice 18361847f8eSopenharmony_ci * @since 11 18461847f8eSopenharmony_ci */ 18561847f8eSopenharmony_ci params?: Object; 18661847f8eSopenharmony_ci 18761847f8eSopenharmony_ci /** 18861847f8eSopenharmony_ci * Set router page stack can be recovered after application is destroyed. When router page stack is recovered, 18961847f8eSopenharmony_ci * top page will be recovered, other page recovered when it backs. the default value is 'true'. 19061847f8eSopenharmony_ci * 19161847f8eSopenharmony_ci * @type { ?boolean } 19261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 19361847f8eSopenharmony_ci * @since 13 19461847f8eSopenharmony_ci */ 19561847f8eSopenharmony_ci recoverable?: boolean; 19661847f8eSopenharmony_ci } 19761847f8eSopenharmony_ci 19861847f8eSopenharmony_ci /** 19961847f8eSopenharmony_ci * @typedef RouterState 20061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20161847f8eSopenharmony_ci * @since 8 20261847f8eSopenharmony_ci */ 20361847f8eSopenharmony_ci /** 20461847f8eSopenharmony_ci * @typedef RouterState 20561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20661847f8eSopenharmony_ci * @crossplatform 20761847f8eSopenharmony_ci * @since 10 20861847f8eSopenharmony_ci */ 20961847f8eSopenharmony_ci /** 21061847f8eSopenharmony_ci * @typedef RouterState 21161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21261847f8eSopenharmony_ci * @crossplatform 21361847f8eSopenharmony_ci * @atomicservice 21461847f8eSopenharmony_ci * @since 11 21561847f8eSopenharmony_ci */ 21661847f8eSopenharmony_ci interface RouterState { 21761847f8eSopenharmony_ci /** 21861847f8eSopenharmony_ci * Index of the current page in the stack. 21961847f8eSopenharmony_ci * NOTE: The index starts from 1 from the bottom to the top of the stack. 22061847f8eSopenharmony_ci * 22161847f8eSopenharmony_ci * @type { number } 22261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22361847f8eSopenharmony_ci * @since 8 22461847f8eSopenharmony_ci */ 22561847f8eSopenharmony_ci /** 22661847f8eSopenharmony_ci * Index of the current page in the stack. 22761847f8eSopenharmony_ci * NOTE: The index starts from 1 from the bottom to the top of the stack. 22861847f8eSopenharmony_ci * 22961847f8eSopenharmony_ci * @type { number } 23061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23161847f8eSopenharmony_ci * @crossplatform 23261847f8eSopenharmony_ci * @since 10 23361847f8eSopenharmony_ci */ 23461847f8eSopenharmony_ci /** 23561847f8eSopenharmony_ci * Index of the current page in the stack. 23661847f8eSopenharmony_ci * NOTE: The index starts from 1 from the bottom to the top of the stack. 23761847f8eSopenharmony_ci * 23861847f8eSopenharmony_ci * @type { number } 23961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24061847f8eSopenharmony_ci * @crossplatform 24161847f8eSopenharmony_ci * @atomicservice 24261847f8eSopenharmony_ci * @since 11 24361847f8eSopenharmony_ci */ 24461847f8eSopenharmony_ci index: number; 24561847f8eSopenharmony_ci 24661847f8eSopenharmony_ci /** 24761847f8eSopenharmony_ci * Name of the current page, that is, the file name. 24861847f8eSopenharmony_ci * 24961847f8eSopenharmony_ci * @type { string } 25061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25161847f8eSopenharmony_ci * @since 8 25261847f8eSopenharmony_ci */ 25361847f8eSopenharmony_ci /** 25461847f8eSopenharmony_ci * Name of the current page, that is, the file name. 25561847f8eSopenharmony_ci * 25661847f8eSopenharmony_ci * @type { string } 25761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25861847f8eSopenharmony_ci * @crossplatform 25961847f8eSopenharmony_ci * @since 10 26061847f8eSopenharmony_ci */ 26161847f8eSopenharmony_ci /** 26261847f8eSopenharmony_ci * Name of the current page, that is, the file name. 26361847f8eSopenharmony_ci * 26461847f8eSopenharmony_ci * @type { string } 26561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 26661847f8eSopenharmony_ci * @crossplatform 26761847f8eSopenharmony_ci * @atomicservice 26861847f8eSopenharmony_ci * @since 11 26961847f8eSopenharmony_ci */ 27061847f8eSopenharmony_ci name: string; 27161847f8eSopenharmony_ci 27261847f8eSopenharmony_ci /** 27361847f8eSopenharmony_ci * Path of the current page. 27461847f8eSopenharmony_ci * 27561847f8eSopenharmony_ci * @type { string } 27661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 27761847f8eSopenharmony_ci * @since 8 27861847f8eSopenharmony_ci */ 27961847f8eSopenharmony_ci /** 28061847f8eSopenharmony_ci * Path of the current page. 28161847f8eSopenharmony_ci * 28261847f8eSopenharmony_ci * @type { string } 28361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28461847f8eSopenharmony_ci * @crossplatform 28561847f8eSopenharmony_ci * @since 10 28661847f8eSopenharmony_ci */ 28761847f8eSopenharmony_ci /** 28861847f8eSopenharmony_ci * Path of the current page. 28961847f8eSopenharmony_ci * 29061847f8eSopenharmony_ci * @type { string } 29161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 29261847f8eSopenharmony_ci * @crossplatform 29361847f8eSopenharmony_ci * @atomicservice 29461847f8eSopenharmony_ci * @since 11 29561847f8eSopenharmony_ci */ 29661847f8eSopenharmony_ci path: string; 29761847f8eSopenharmony_ci 29861847f8eSopenharmony_ci /** 29961847f8eSopenharmony_ci * Data that passed to the destination page during navigation. 30061847f8eSopenharmony_ci * 30161847f8eSopenharmony_ci * @type { Object } 30261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30361847f8eSopenharmony_ci * @crossplatform 30461847f8eSopenharmony_ci * @atomicservice 30561847f8eSopenharmony_ci * @since 12 30661847f8eSopenharmony_ci */ 30761847f8eSopenharmony_ci params: Object; 30861847f8eSopenharmony_ci } 30961847f8eSopenharmony_ci 31061847f8eSopenharmony_ci /** 31161847f8eSopenharmony_ci * @typedef EnableAlertOptions 31261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 31361847f8eSopenharmony_ci * @since 8 31461847f8eSopenharmony_ci */ 31561847f8eSopenharmony_ci /** 31661847f8eSopenharmony_ci * @typedef EnableAlertOptions 31761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 31861847f8eSopenharmony_ci * @crossplatform 31961847f8eSopenharmony_ci * @since 10 32061847f8eSopenharmony_ci */ 32161847f8eSopenharmony_ci /** 32261847f8eSopenharmony_ci * @typedef EnableAlertOptions 32361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32461847f8eSopenharmony_ci * @crossplatform 32561847f8eSopenharmony_ci * @atomicservice 32661847f8eSopenharmony_ci * @since 11 32761847f8eSopenharmony_ci */ 32861847f8eSopenharmony_ci interface EnableAlertOptions { 32961847f8eSopenharmony_ci /** 33061847f8eSopenharmony_ci * dialog context. 33161847f8eSopenharmony_ci * 33261847f8eSopenharmony_ci * @type { string } 33361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 33461847f8eSopenharmony_ci * @since 8 33561847f8eSopenharmony_ci */ 33661847f8eSopenharmony_ci /** 33761847f8eSopenharmony_ci * dialog context. 33861847f8eSopenharmony_ci * 33961847f8eSopenharmony_ci * @type { string } 34061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 34161847f8eSopenharmony_ci * @crossplatform 34261847f8eSopenharmony_ci * @since 10 34361847f8eSopenharmony_ci */ 34461847f8eSopenharmony_ci /** 34561847f8eSopenharmony_ci * dialog context. 34661847f8eSopenharmony_ci * 34761847f8eSopenharmony_ci * @type { string } 34861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 34961847f8eSopenharmony_ci * @crossplatform 35061847f8eSopenharmony_ci * @atomicservice 35161847f8eSopenharmony_ci * @since 11 35261847f8eSopenharmony_ci */ 35361847f8eSopenharmony_ci message: string; 35461847f8eSopenharmony_ci } 35561847f8eSopenharmony_ci 35661847f8eSopenharmony_ci /** 35761847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 35861847f8eSopenharmony_ci * 35961847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 36061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 36161847f8eSopenharmony_ci * @since 8 36261847f8eSopenharmony_ci * @deprecated since 9 36361847f8eSopenharmony_ci * @useinstead ohos.router.router#pushUrl 36461847f8eSopenharmony_ci */ 36561847f8eSopenharmony_ci function push(options: RouterOptions): void; 36661847f8eSopenharmony_ci 36761847f8eSopenharmony_ci /** 36861847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 36961847f8eSopenharmony_ci * 37061847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 37161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 37261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 37361847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 37461847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 37561847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 37661847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 37761847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 37861847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 37961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 38061847f8eSopenharmony_ci * @since 9 38161847f8eSopenharmony_ci */ 38261847f8eSopenharmony_ci /** 38361847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 38461847f8eSopenharmony_ci * 38561847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 38661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 38761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 38861847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 38961847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 39061847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 39161847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 39261847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 39361847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 39461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 39561847f8eSopenharmony_ci * @crossplatform 39661847f8eSopenharmony_ci * @since 10 39761847f8eSopenharmony_ci */ 39861847f8eSopenharmony_ci /** 39961847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 40061847f8eSopenharmony_ci * 40161847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 40261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 40361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 40461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 40561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 40661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 40761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 40861847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 40961847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 41061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 41161847f8eSopenharmony_ci * @crossplatform 41261847f8eSopenharmony_ci * @atomicservice 41361847f8eSopenharmony_ci * @since 11 41461847f8eSopenharmony_ci */ 41561847f8eSopenharmony_ci function pushUrl(options: RouterOptions, callback: AsyncCallback<void>): void; 41661847f8eSopenharmony_ci 41761847f8eSopenharmony_ci /** 41861847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 41961847f8eSopenharmony_ci * 42061847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 42161847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 42261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 42361847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 42461847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 42561847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 42661847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 42761847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 42861847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 42961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 43061847f8eSopenharmony_ci * @since 9 43161847f8eSopenharmony_ci */ 43261847f8eSopenharmony_ci /** 43361847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 43461847f8eSopenharmony_ci * 43561847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 43661847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 43761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 43861847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 43961847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 44061847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 44161847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 44261847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 44361847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 44461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 44561847f8eSopenharmony_ci * @crossplatform 44661847f8eSopenharmony_ci * @since 10 44761847f8eSopenharmony_ci */ 44861847f8eSopenharmony_ci /** 44961847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 45061847f8eSopenharmony_ci * 45161847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 45261847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 45361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 45461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 45561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 45661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 45761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 45861847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 45961847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 46061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 46161847f8eSopenharmony_ci * @crossplatform 46261847f8eSopenharmony_ci * @atomicservice 46361847f8eSopenharmony_ci * @since 11 46461847f8eSopenharmony_ci */ 46561847f8eSopenharmony_ci function pushUrl(options: RouterOptions): Promise<void>; 46661847f8eSopenharmony_ci 46761847f8eSopenharmony_ci /** 46861847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 46961847f8eSopenharmony_ci * 47061847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 47161847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 47261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 47361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 47461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 47561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 47661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 47761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 47861847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 47961847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 48061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 48161847f8eSopenharmony_ci * @since 9 48261847f8eSopenharmony_ci */ 48361847f8eSopenharmony_ci /** 48461847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 48561847f8eSopenharmony_ci * 48661847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 48761847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 48861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 48961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 49061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 49161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 49261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 49361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 49461847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 49561847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 49661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 49761847f8eSopenharmony_ci * @crossplatform 49861847f8eSopenharmony_ci * @since 10 49961847f8eSopenharmony_ci */ 50061847f8eSopenharmony_ci /** 50161847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 50261847f8eSopenharmony_ci * 50361847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 50461847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 50561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushUrl. 50661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 50761847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 50861847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 50961847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 51061847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 51161847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 51261847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 51361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 51461847f8eSopenharmony_ci * @crossplatform 51561847f8eSopenharmony_ci * @atomicservice 51661847f8eSopenharmony_ci * @since 11 51761847f8eSopenharmony_ci */ 51861847f8eSopenharmony_ci function pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void; 51961847f8eSopenharmony_ci 52061847f8eSopenharmony_ci /** 52161847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 52261847f8eSopenharmony_ci * 52361847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 52461847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 52561847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 52661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 52761847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 52861847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 52961847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 53061847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 53161847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 53261847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 53361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 53461847f8eSopenharmony_ci * @since 9 53561847f8eSopenharmony_ci */ 53661847f8eSopenharmony_ci /** 53761847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 53861847f8eSopenharmony_ci * 53961847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 54061847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 54161847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 54261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 54361847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 54461847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 54561847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 54661847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 54761847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 54861847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 54961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 55061847f8eSopenharmony_ci * @crossplatform 55161847f8eSopenharmony_ci * @since 10 55261847f8eSopenharmony_ci */ 55361847f8eSopenharmony_ci /** 55461847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 55561847f8eSopenharmony_ci * 55661847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 55761847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 55861847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 55961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 56061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 56161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 56261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 56361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 56461847f8eSopenharmony_ci * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist 56561847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 56661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 56761847f8eSopenharmony_ci * @crossplatform 56861847f8eSopenharmony_ci * @atomicservice 56961847f8eSopenharmony_ci * @since 11 57061847f8eSopenharmony_ci */ 57161847f8eSopenharmony_ci function pushUrl(options: RouterOptions, mode: RouterMode): Promise<void>; 57261847f8eSopenharmony_ci 57361847f8eSopenharmony_ci /** 57461847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 57561847f8eSopenharmony_ci * 57661847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 57761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 57861847f8eSopenharmony_ci * @since 8 57961847f8eSopenharmony_ci * @deprecated since 9 58061847f8eSopenharmony_ci * @useinstead ohos.router.router#replaceUrl 58161847f8eSopenharmony_ci */ 58261847f8eSopenharmony_ci function replace(options: RouterOptions): void; 58361847f8eSopenharmony_ci 58461847f8eSopenharmony_ci /** 58561847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 58661847f8eSopenharmony_ci * 58761847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 58861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceUrl. 58961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 59061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 59161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 59261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 59361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 59461847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 59561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 59661847f8eSopenharmony_ci * @since 9 59761847f8eSopenharmony_ci */ 59861847f8eSopenharmony_ci /** 59961847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 60061847f8eSopenharmony_ci * 60161847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 60261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceUrl. 60361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 60461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 60561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 60661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 60761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 60861847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 60961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 61061847f8eSopenharmony_ci * @atomicservice 61161847f8eSopenharmony_ci * @since 11 61261847f8eSopenharmony_ci */ 61361847f8eSopenharmony_ci function replaceUrl(options: RouterOptions, callback: AsyncCallback<void>): void; 61461847f8eSopenharmony_ci 61561847f8eSopenharmony_ci /** 61661847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 61761847f8eSopenharmony_ci * 61861847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 61961847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 62061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 62161847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 62261847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 62361847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 62461847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 62561847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 62661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 62761847f8eSopenharmony_ci * @since 9 62861847f8eSopenharmony_ci */ 62961847f8eSopenharmony_ci /** 63061847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 63161847f8eSopenharmony_ci * 63261847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 63361847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 63461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 63561847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 63661847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 63761847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 63861847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 63961847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 64061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 64161847f8eSopenharmony_ci * @atomicservice 64261847f8eSopenharmony_ci * @since 11 64361847f8eSopenharmony_ci */ 64461847f8eSopenharmony_ci function replaceUrl(options: RouterOptions): Promise<void>; 64561847f8eSopenharmony_ci 64661847f8eSopenharmony_ci /** 64761847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 64861847f8eSopenharmony_ci * 64961847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 65061847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 65161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceUrl. 65261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 65361847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 65461847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 65561847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 65661847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 65761847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 65861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 65961847f8eSopenharmony_ci * @since 9 66061847f8eSopenharmony_ci */ 66161847f8eSopenharmony_ci /** 66261847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 66361847f8eSopenharmony_ci * 66461847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 66561847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 66661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceUrl. 66761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 66861847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 66961847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 67061847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 67161847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 67261847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 67361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 67461847f8eSopenharmony_ci * @atomicservice 67561847f8eSopenharmony_ci * @since 11 67661847f8eSopenharmony_ci */ 67761847f8eSopenharmony_ci function replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void; 67861847f8eSopenharmony_ci 67961847f8eSopenharmony_ci /** 68061847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 68161847f8eSopenharmony_ci * 68261847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 68361847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 68461847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 68561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 68661847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 68761847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 68861847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 68961847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. 69061847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 69161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 69261847f8eSopenharmony_ci * @since 9 69361847f8eSopenharmony_ci */ 69461847f8eSopenharmony_ci /** 69561847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 69661847f8eSopenharmony_ci * 69761847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 69861847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 69961847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 70061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 70161847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 70261847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 70361847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 70461847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. 70561847f8eSopenharmony_ci * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. 70661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 70761847f8eSopenharmony_ci * @atomicservice 70861847f8eSopenharmony_ci * @since 11 70961847f8eSopenharmony_ci */ 71061847f8eSopenharmony_ci function replaceUrl(options: RouterOptions, mode: RouterMode): Promise<void>; 71161847f8eSopenharmony_ci 71261847f8eSopenharmony_ci /** 71361847f8eSopenharmony_ci * Returns to the previous page or a specified page. 71461847f8eSopenharmony_ci * 71561847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 71661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 71761847f8eSopenharmony_ci * @since 8 71861847f8eSopenharmony_ci */ 71961847f8eSopenharmony_ci /** 72061847f8eSopenharmony_ci * Returns to the previous page or a specified page. 72161847f8eSopenharmony_ci * 72261847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 72361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 72461847f8eSopenharmony_ci * @crossplatform 72561847f8eSopenharmony_ci * @since 10 72661847f8eSopenharmony_ci */ 72761847f8eSopenharmony_ci /** 72861847f8eSopenharmony_ci * Returns to the previous page or a specified page. 72961847f8eSopenharmony_ci * 73061847f8eSopenharmony_ci * @param { RouterOptions } options - Options. 73161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 73261847f8eSopenharmony_ci * @crossplatform 73361847f8eSopenharmony_ci * @atomicservice 73461847f8eSopenharmony_ci * @since 11 73561847f8eSopenharmony_ci */ 73661847f8eSopenharmony_ci function back(options?: RouterOptions): void; 73761847f8eSopenharmony_ci 73861847f8eSopenharmony_ci /** 73961847f8eSopenharmony_ci * Returns to the specified page. 74061847f8eSopenharmony_ci * 74161847f8eSopenharmony_ci * @param { number } index - index of page. 74261847f8eSopenharmony_ci * @param { Object } [params] - params of page. 74361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 74461847f8eSopenharmony_ci * @crossplatform 74561847f8eSopenharmony_ci * @atomicservice 74661847f8eSopenharmony_ci * @since 12 74761847f8eSopenharmony_ci */ 74861847f8eSopenharmony_ci function back(index: number, params?: Object): void; 74961847f8eSopenharmony_ci 75061847f8eSopenharmony_ci /** 75161847f8eSopenharmony_ci * Clears all historical pages and retains only the current page at the top of the stack. 75261847f8eSopenharmony_ci * 75361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 75461847f8eSopenharmony_ci * @since 8 75561847f8eSopenharmony_ci */ 75661847f8eSopenharmony_ci /** 75761847f8eSopenharmony_ci * Clears all historical pages and retains only the current page at the top of the stack. 75861847f8eSopenharmony_ci * 75961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 76061847f8eSopenharmony_ci * @crossplatform 76161847f8eSopenharmony_ci * @since 10 76261847f8eSopenharmony_ci */ 76361847f8eSopenharmony_ci /** 76461847f8eSopenharmony_ci * Clears all historical pages and retains only the current page at the top of the stack. 76561847f8eSopenharmony_ci * 76661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 76761847f8eSopenharmony_ci * @crossplatform 76861847f8eSopenharmony_ci * @atomicservice 76961847f8eSopenharmony_ci * @since 11 77061847f8eSopenharmony_ci */ 77161847f8eSopenharmony_ci function clear(): void; 77261847f8eSopenharmony_ci 77361847f8eSopenharmony_ci /** 77461847f8eSopenharmony_ci * Obtains the number of pages in the current stack. 77561847f8eSopenharmony_ci * 77661847f8eSopenharmony_ci * @returns { string } Number of pages in the stack. The maximum value is 32. 77761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 77861847f8eSopenharmony_ci * @since 8 77961847f8eSopenharmony_ci */ 78061847f8eSopenharmony_ci /** 78161847f8eSopenharmony_ci * Obtains the number of pages in the current stack. 78261847f8eSopenharmony_ci * 78361847f8eSopenharmony_ci * @returns { string } Number of pages in the stack. The maximum value is 32. 78461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 78561847f8eSopenharmony_ci * @crossplatform 78661847f8eSopenharmony_ci * @since 10 78761847f8eSopenharmony_ci */ 78861847f8eSopenharmony_ci /** 78961847f8eSopenharmony_ci * Obtains the number of pages in the current stack. 79061847f8eSopenharmony_ci * 79161847f8eSopenharmony_ci * @returns { string } Number of pages in the stack. The maximum value is 32. 79261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 79361847f8eSopenharmony_ci * @crossplatform 79461847f8eSopenharmony_ci * @atomicservice 79561847f8eSopenharmony_ci * @since 11 79661847f8eSopenharmony_ci */ 79761847f8eSopenharmony_ci function getLength(): string; 79861847f8eSopenharmony_ci 79961847f8eSopenharmony_ci /** 80061847f8eSopenharmony_ci * Obtains information about the current page state. 80161847f8eSopenharmony_ci * 80261847f8eSopenharmony_ci * @returns { RouterState } Page state. 80361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 80461847f8eSopenharmony_ci * @since 8 80561847f8eSopenharmony_ci */ 80661847f8eSopenharmony_ci /** 80761847f8eSopenharmony_ci * Obtains information about the current page state. 80861847f8eSopenharmony_ci * 80961847f8eSopenharmony_ci * @returns { RouterState } Page state. 81061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 81161847f8eSopenharmony_ci * @crossplatform 81261847f8eSopenharmony_ci * @since 10 81361847f8eSopenharmony_ci */ 81461847f8eSopenharmony_ci /** 81561847f8eSopenharmony_ci * Obtains information about the current page state. 81661847f8eSopenharmony_ci * 81761847f8eSopenharmony_ci * @returns { RouterState } Page state. 81861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 81961847f8eSopenharmony_ci * @crossplatform 82061847f8eSopenharmony_ci * @atomicservice 82161847f8eSopenharmony_ci * @since 11 82261847f8eSopenharmony_ci */ 82361847f8eSopenharmony_ci function getState(): RouterState; 82461847f8eSopenharmony_ci 82561847f8eSopenharmony_ci /** 82661847f8eSopenharmony_ci * Obtains page information by index. 82761847f8eSopenharmony_ci * 82861847f8eSopenharmony_ci * @param { number } index - Index of page. 82961847f8eSopenharmony_ci * @returns { RouterState | undefined } Page state. 83061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 83161847f8eSopenharmony_ci * @crossplatform 83261847f8eSopenharmony_ci * @atomicservice 83361847f8eSopenharmony_ci * @since 12 83461847f8eSopenharmony_ci */ 83561847f8eSopenharmony_ci function getStateByIndex(index: number): RouterState | undefined; 83661847f8eSopenharmony_ci 83761847f8eSopenharmony_ci /** 83861847f8eSopenharmony_ci * Obtains page information by url. 83961847f8eSopenharmony_ci * 84061847f8eSopenharmony_ci * @param { string } url - URL of page. 84161847f8eSopenharmony_ci * @returns { Array<RouterState> } Page state. 84261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 84361847f8eSopenharmony_ci * @crossplatform 84461847f8eSopenharmony_ci * @atomicservice 84561847f8eSopenharmony_ci * @since 12 84661847f8eSopenharmony_ci */ 84761847f8eSopenharmony_ci function getStateByUrl(url: string): Array<RouterState>; 84861847f8eSopenharmony_ci 84961847f8eSopenharmony_ci /** 85061847f8eSopenharmony_ci * Pop up dialog to ask whether to back 85161847f8eSopenharmony_ci * 85261847f8eSopenharmony_ci * @param { EnableAlertOptions } options - Options. 85361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 85461847f8eSopenharmony_ci * @since 8 85561847f8eSopenharmony_ci * @deprecated since 9 85661847f8eSopenharmony_ci * @useinstead ohos.router.router#showAlertBeforeBackPage 85761847f8eSopenharmony_ci */ 85861847f8eSopenharmony_ci function enableAlertBeforeBackPage(options: EnableAlertOptions): void; 85961847f8eSopenharmony_ci 86061847f8eSopenharmony_ci /** 86161847f8eSopenharmony_ci * Pop up alert dialog to ask whether to back 86261847f8eSopenharmony_ci * 86361847f8eSopenharmony_ci * @param { EnableAlertOptions } options - Options. 86461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 86561847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 86661847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 86761847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 86861847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 86961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 87061847f8eSopenharmony_ci * @since 9 87161847f8eSopenharmony_ci */ 87261847f8eSopenharmony_ci /** 87361847f8eSopenharmony_ci * Pop up alert dialog to ask whether to back 87461847f8eSopenharmony_ci * 87561847f8eSopenharmony_ci * @param { EnableAlertOptions } options - Options. 87661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 87761847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 87861847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 87961847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 88061847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 88161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 88261847f8eSopenharmony_ci * @crossplatform 88361847f8eSopenharmony_ci * @since 10 88461847f8eSopenharmony_ci */ 88561847f8eSopenharmony_ci /** 88661847f8eSopenharmony_ci * Pop up alert dialog to ask whether to back 88761847f8eSopenharmony_ci * 88861847f8eSopenharmony_ci * @param { EnableAlertOptions } options - Options. 88961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 89061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 89161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 89261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 89361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 89461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 89561847f8eSopenharmony_ci * @crossplatform 89661847f8eSopenharmony_ci * @atomicservice 89761847f8eSopenharmony_ci * @since 11 89861847f8eSopenharmony_ci */ 89961847f8eSopenharmony_ci function showAlertBeforeBackPage(options: EnableAlertOptions): void; 90061847f8eSopenharmony_ci 90161847f8eSopenharmony_ci /** 90261847f8eSopenharmony_ci * Cancel enableAlertBeforeBackPage 90361847f8eSopenharmony_ci * 90461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 90561847f8eSopenharmony_ci * @since 8 90661847f8eSopenharmony_ci * @deprecated since 9 90761847f8eSopenharmony_ci * @useinstead ohos.router.router#hideAlertBeforeBackPage 90861847f8eSopenharmony_ci */ 90961847f8eSopenharmony_ci function disableAlertBeforeBackPage(): void; 91061847f8eSopenharmony_ci 91161847f8eSopenharmony_ci /** 91261847f8eSopenharmony_ci * Hide alert before back page 91361847f8eSopenharmony_ci * 91461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 91561847f8eSopenharmony_ci * @since 9 91661847f8eSopenharmony_ci */ 91761847f8eSopenharmony_ci /** 91861847f8eSopenharmony_ci * Hide alert before back page 91961847f8eSopenharmony_ci * 92061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 92161847f8eSopenharmony_ci * @crossplatform 92261847f8eSopenharmony_ci * @since 10 92361847f8eSopenharmony_ci */ 92461847f8eSopenharmony_ci /** 92561847f8eSopenharmony_ci * Hide alert before back page 92661847f8eSopenharmony_ci * 92761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 92861847f8eSopenharmony_ci * @crossplatform 92961847f8eSopenharmony_ci * @atomicservice 93061847f8eSopenharmony_ci * @since 11 93161847f8eSopenharmony_ci */ 93261847f8eSopenharmony_ci function hideAlertBeforeBackPage(): void; 93361847f8eSopenharmony_ci 93461847f8eSopenharmony_ci /** 93561847f8eSopenharmony_ci * Obtains information about the current page params. 93661847f8eSopenharmony_ci * 93761847f8eSopenharmony_ci * @returns { Object } Page params. 93861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 93961847f8eSopenharmony_ci * @since 8 94061847f8eSopenharmony_ci */ 94161847f8eSopenharmony_ci /** 94261847f8eSopenharmony_ci * Obtains information about the current page params. 94361847f8eSopenharmony_ci * 94461847f8eSopenharmony_ci * @returns { Object } Page params. 94561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 94661847f8eSopenharmony_ci * @crossplatform 94761847f8eSopenharmony_ci * @since 10 94861847f8eSopenharmony_ci */ 94961847f8eSopenharmony_ci /** 95061847f8eSopenharmony_ci * Obtains information about the current page params. 95161847f8eSopenharmony_ci * 95261847f8eSopenharmony_ci * @returns { Object } Page params. 95361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 95461847f8eSopenharmony_ci * @crossplatform 95561847f8eSopenharmony_ci * @atomicservice 95661847f8eSopenharmony_ci * @since 11 95761847f8eSopenharmony_ci */ 95861847f8eSopenharmony_ci function getParams(): Object; 95961847f8eSopenharmony_ci 96061847f8eSopenharmony_ci /** 96161847f8eSopenharmony_ci * @typedef NamedRouterOptions 96261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 96361847f8eSopenharmony_ci * @crossplatform 96461847f8eSopenharmony_ci * @since 10 96561847f8eSopenharmony_ci */ 96661847f8eSopenharmony_ci /** 96761847f8eSopenharmony_ci * @typedef NamedRouterOptions 96861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 96961847f8eSopenharmony_ci * @crossplatform 97061847f8eSopenharmony_ci * @atomicservice 97161847f8eSopenharmony_ci * @since 11 97261847f8eSopenharmony_ci */ 97361847f8eSopenharmony_ci interface NamedRouterOptions { 97461847f8eSopenharmony_ci /** 97561847f8eSopenharmony_ci * Name of the destination named route. 97661847f8eSopenharmony_ci * 97761847f8eSopenharmony_ci * @type { string } 97861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 97961847f8eSopenharmony_ci * @crossplatform 98061847f8eSopenharmony_ci * @since 10 98161847f8eSopenharmony_ci */ 98261847f8eSopenharmony_ci /** 98361847f8eSopenharmony_ci * Name of the destination named route. 98461847f8eSopenharmony_ci * 98561847f8eSopenharmony_ci * @type { string } 98661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 98761847f8eSopenharmony_ci * @crossplatform 98861847f8eSopenharmony_ci * @atomicservice 98961847f8eSopenharmony_ci * @since 11 99061847f8eSopenharmony_ci */ 99161847f8eSopenharmony_ci name: string; 99261847f8eSopenharmony_ci 99361847f8eSopenharmony_ci /** 99461847f8eSopenharmony_ci * Data that needs to be passed to the destination page during navigation. 99561847f8eSopenharmony_ci * 99661847f8eSopenharmony_ci * @type { ?Object } 99761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 99861847f8eSopenharmony_ci * @crossplatform 99961847f8eSopenharmony_ci * @since 10 100061847f8eSopenharmony_ci */ 100161847f8eSopenharmony_ci /** 100261847f8eSopenharmony_ci * Data that needs to be passed to the destination page during navigation. 100361847f8eSopenharmony_ci * 100461847f8eSopenharmony_ci * @type { ?Object } 100561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 100661847f8eSopenharmony_ci * @crossplatform 100761847f8eSopenharmony_ci * @atomicservice 100861847f8eSopenharmony_ci * @since 11 100961847f8eSopenharmony_ci */ 101061847f8eSopenharmony_ci params?: Object; 101161847f8eSopenharmony_ci 101261847f8eSopenharmony_ci /** 101361847f8eSopenharmony_ci * Set router page stack can be recovered after application is destroyed. When router page stack is recovered, 101461847f8eSopenharmony_ci * top page will be recovered, other page recovered when it backs. the default value is 'true'. 101561847f8eSopenharmony_ci * 101661847f8eSopenharmony_ci * @type { ?boolean } 101761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Lite 101861847f8eSopenharmony_ci * @since 13 101961847f8eSopenharmony_ci */ 102061847f8eSopenharmony_ci recoverable?: boolean; 102161847f8eSopenharmony_ci } 102261847f8eSopenharmony_ci 102361847f8eSopenharmony_ci /** 102461847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 102561847f8eSopenharmony_ci * 102661847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 102761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. 102861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 102961847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 103061847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 103161847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 103261847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 103361847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 103461847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 103561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 103661847f8eSopenharmony_ci * @crossplatform 103761847f8eSopenharmony_ci * @since 10 103861847f8eSopenharmony_ci */ 103961847f8eSopenharmony_ci /** 104061847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 104161847f8eSopenharmony_ci * 104261847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 104361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. 104461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 104561847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 104661847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 104761847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 104861847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 104961847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 105061847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 105161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 105261847f8eSopenharmony_ci * @crossplatform 105361847f8eSopenharmony_ci * @atomicservice 105461847f8eSopenharmony_ci * @since 11 105561847f8eSopenharmony_ci */ 105661847f8eSopenharmony_ci function pushNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void; 105761847f8eSopenharmony_ci 105861847f8eSopenharmony_ci /** 105961847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 106061847f8eSopenharmony_ci * 106161847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 106261847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 106361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 106461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 106561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 106661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 106761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 106861847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 106961847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 107061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 107161847f8eSopenharmony_ci * @crossplatform 107261847f8eSopenharmony_ci * @since 10 107361847f8eSopenharmony_ci */ 107461847f8eSopenharmony_ci /** 107561847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 107661847f8eSopenharmony_ci * 107761847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 107861847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 107961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 108061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 108161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 108261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 108361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 108461847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 108561847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 108661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 108761847f8eSopenharmony_ci * @crossplatform 108861847f8eSopenharmony_ci * @atomicservice 108961847f8eSopenharmony_ci * @since 11 109061847f8eSopenharmony_ci */ 109161847f8eSopenharmony_ci function pushNamedRoute(options: NamedRouterOptions): Promise<void>; 109261847f8eSopenharmony_ci 109361847f8eSopenharmony_ci /** 109461847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 109561847f8eSopenharmony_ci * 109661847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 109761847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 109861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. 109961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 110061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 110161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 110261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 110361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 110461847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 110561847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 110661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 110761847f8eSopenharmony_ci * @crossplatform 110861847f8eSopenharmony_ci * @since 10 110961847f8eSopenharmony_ci */ 111061847f8eSopenharmony_ci /** 111161847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 111261847f8eSopenharmony_ci * 111361847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 111461847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 111561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of pushNamedRoute. 111661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 111761847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 111861847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 111961847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 112061847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 112161847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 112261847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 112361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 112461847f8eSopenharmony_ci * @crossplatform 112561847f8eSopenharmony_ci * @atomicservice 112661847f8eSopenharmony_ci * @since 11 112761847f8eSopenharmony_ci */ 112861847f8eSopenharmony_ci function pushNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void; 112961847f8eSopenharmony_ci 113061847f8eSopenharmony_ci /** 113161847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 113261847f8eSopenharmony_ci * 113361847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 113461847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 113561847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 113661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 113761847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 113861847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 113961847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 114061847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 114161847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 114261847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 114361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 114461847f8eSopenharmony_ci * @crossplatform 114561847f8eSopenharmony_ci * @since 10 114661847f8eSopenharmony_ci */ 114761847f8eSopenharmony_ci /** 114861847f8eSopenharmony_ci * Navigates to a specified page in the application based on the page URL and parameters. 114961847f8eSopenharmony_ci * 115061847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 115161847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 115261847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 115361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 115461847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 115561847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 115661847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 115761847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Internal error. 115861847f8eSopenharmony_ci * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. 115961847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 116061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 116161847f8eSopenharmony_ci * @crossplatform 116261847f8eSopenharmony_ci * @atomicservice 116361847f8eSopenharmony_ci * @since 11 116461847f8eSopenharmony_ci */ 116561847f8eSopenharmony_ci function pushNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void>; 116661847f8eSopenharmony_ci 116761847f8eSopenharmony_ci /** 116861847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 116961847f8eSopenharmony_ci * 117061847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 117161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute. 117261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 117361847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 117461847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 117561847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 117661847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 117761847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 117861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 117961847f8eSopenharmony_ci * @crossplatform 118061847f8eSopenharmony_ci * @since 10 118161847f8eSopenharmony_ci */ 118261847f8eSopenharmony_ci /** 118361847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 118461847f8eSopenharmony_ci * 118561847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 118661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute. 118761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 118861847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 118961847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 119061847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 119161847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 119261847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 119361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 119461847f8eSopenharmony_ci * @crossplatform 119561847f8eSopenharmony_ci * @atomicservice 119661847f8eSopenharmony_ci * @since 11 119761847f8eSopenharmony_ci */ 119861847f8eSopenharmony_ci function replaceNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void; 119961847f8eSopenharmony_ci 120061847f8eSopenharmony_ci /** 120161847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 120261847f8eSopenharmony_ci * 120361847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 120461847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 120561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 120661847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 120761847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 120861847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 120961847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 121061847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 121161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 121261847f8eSopenharmony_ci * @crossplatform 121361847f8eSopenharmony_ci * @since 10 121461847f8eSopenharmony_ci */ 121561847f8eSopenharmony_ci /** 121661847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 121761847f8eSopenharmony_ci * 121861847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 121961847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 122061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 122161847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 122261847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 122361847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 122461847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 122561847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 122661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 122761847f8eSopenharmony_ci * @crossplatform 122861847f8eSopenharmony_ci * @atomicservice 122961847f8eSopenharmony_ci * @since 11 123061847f8eSopenharmony_ci */ 123161847f8eSopenharmony_ci function replaceNamedRoute(options: NamedRouterOptions): Promise<void>; 123261847f8eSopenharmony_ci 123361847f8eSopenharmony_ci /** 123461847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 123561847f8eSopenharmony_ci * 123661847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 123761847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 123861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute. 123961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 124061847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 124161847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 124261847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 124361847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 124461847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 124561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 124661847f8eSopenharmony_ci * @crossplatform 124761847f8eSopenharmony_ci * @since 10 124861847f8eSopenharmony_ci */ 124961847f8eSopenharmony_ci /** 125061847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 125161847f8eSopenharmony_ci * 125261847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 125361847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 125461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of replaceNamedRoute. 125561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 125661847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 125761847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 125861847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 125961847f8eSopenharmony_ci * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. 126061847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 126161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 126261847f8eSopenharmony_ci * @crossplatform 126361847f8eSopenharmony_ci * @atomicservice 126461847f8eSopenharmony_ci * @since 11 126561847f8eSopenharmony_ci */ 126661847f8eSopenharmony_ci function replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void; 126761847f8eSopenharmony_ci 126861847f8eSopenharmony_ci /** 126961847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 127061847f8eSopenharmony_ci * 127161847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 127261847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 127361847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 127461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 127561847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 127661847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 127761847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 127861847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. 127961847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 128061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 128161847f8eSopenharmony_ci * @crossplatform 128261847f8eSopenharmony_ci * @since 10 128361847f8eSopenharmony_ci */ 128461847f8eSopenharmony_ci /** 128561847f8eSopenharmony_ci * Replaces the current page with another one in the application. The current page is destroyed after replacement. 128661847f8eSopenharmony_ci * 128761847f8eSopenharmony_ci * @param { NamedRouterOptions } options - Options. 128861847f8eSopenharmony_ci * @param { RouterMode } mode - RouterMode. 128961847f8eSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 129061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 129161847f8eSopenharmony_ci * <br> 1. Mandatory parameters are left unspecified. 129261847f8eSopenharmony_ci * <br> 2. Incorrect parameters types. 129361847f8eSopenharmony_ci * <br> 3. Parameter verification failed. 129461847f8eSopenharmony_ci * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. 129561847f8eSopenharmony_ci * @throws { BusinessError } 100004 - Named route error. The named route does not exist. 129661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 129761847f8eSopenharmony_ci * @crossplatform 129861847f8eSopenharmony_ci * @atomicservice 129961847f8eSopenharmony_ci * @since 11 130061847f8eSopenharmony_ci */ 130161847f8eSopenharmony_ci function replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void>; 130261847f8eSopenharmony_ci} 130361847f8eSopenharmony_ci 130461847f8eSopenharmony_ciexport default router; 1305