From 72bed2f8933159ef525118e0f7d8d7b54b836c1a Mon Sep 17 00:00:00 2001 From: lishiwei Date: Thu, 28 Aug 2025 04:08:03 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0EnterprisePolicy=E3=80=81poli?= =?UTF-8?q?cyString=E3=80=81setEnterprisePolicy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lishiwei --- api/@ohos.dlpPermission.d.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/api/@ohos.dlpPermission.d.ts b/api/@ohos.dlpPermission.d.ts index 3c2318ffaa..9dc435bef0 100644 --- a/api/@ohos.dlpPermission.d.ts +++ b/api/@ohos.dlpPermission.d.ts @@ -1593,5 +1593,36 @@ declare namespace dlpPermission { */ function decryptDlpFile(dlpFd: number, plaintextFd: number): Promise; + /** + * Customization policy for enterprise Application settings. + * + * @interface EnterprisePolicy + * @syscap SystemCapability.Security.DataLossPrevention + * @since 21 + */ + export interface EnterprisePolicy { + /** + * Enterprise custom policy string. + * + * @type { string } + * @syscap SystemCapability.Security.DataLossPrevention + * @since 21 + */ + policyString: string; + } + + /** + * Set enterprise application protection policies. + * + * @permission ohos.permission.ENTERPRISE_ACCESS_DLP_FILE + * @param { EnterprisePolicy } policy - Indicates the enterprise custom policy string. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 19100001 - Invalid parameter value. + * @throws { BusinessError } 19100011 - The system ability works abnormally. + * @throws { BusinessError } 19100021 - Failed to set the enterprise policy. + * @syscap SystemCapability.Security.DataLossPrevention + * @since 21 + */ + function setEnterprisePolicy(policy: EnterprisePolicy): void; } export default dlpPermission; \ No newline at end of file -- Gitee