diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index a23fcabb5..366189bba 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -120,6 +120,36 @@ declare namespace dataShare { options?: DataShareHelperOptions ): Promise; + /** + * Enables silent access dynamically. + * + * @param { Context } context - Indicates the application context. + * @param { string } uri - Indicates the path of the file to open. + * @returns { Promise } Promise used to return. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 15700011 - The uri is not exist. + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @StageModelOnly + * @since 11 + */ + function enableSilentProxy(context: Context, uri?: string): Promise; + + /** + * Disables silent access dynamically. + * + * @param { Context } context - Indicates the application context. + * @param { string } uri - Indicates the path of the file to close. + * @returns { Promise } Promise used to return. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 15700011 - The uri is not exist. + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @StageModelOnly + * @since 11 + */ + function disableSilentProxy(context: Context, uri?: string): Promise; + /** * Specifies the {@link Template} id structure. * A template is marked by the template id. Note that the template id is auto generated in {@link DataShareHelper#addTemplate}.