From eb784dca21e876f35bf43741eaae1d4965dd27a2 Mon Sep 17 00:00:00 2001 From: heguokai <275503077@qq.com> Date: Sat, 13 Sep 2025 14:46:23 +0800 Subject: [PATCH] =?UTF-8?q?SDK:=20=E4=BF=AE=E6=94=B9Record=E4=B8=BARecord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heguokai <275503077@qq.com> --- api/@ohos.events.emitter.d.ts | 35 +++++++++++-------- api/@ohos.notificationManager.d.ts | 14 ++++++-- api/commonEvent/commonEventData.d.ts | 8 +++-- api/commonEvent/commonEventPublishData.d.ts | 8 +++-- .../notificationActionButton.d.ts | 5 +-- api/notification/notificationContent.d.ts | 12 ++++++- api/notification/notificationRequest.d.ts | 21 ++++++++--- api/notification/notificationTemplate.d.ts | 17 ++++++++- 8 files changed, 90 insertions(+), 30 deletions(-) diff --git a/api/@ohos.events.emitter.d.ts b/api/@ohos.events.emitter.d.ts index 795aae075c..1dd37862e9 100644 --- a/api/@ohos.events.emitter.d.ts +++ b/api/@ohos.events.emitter.d.ts @@ -18,7 +18,12 @@ * @kit BasicServicesKit */ +/*** if arkts dynamic */ import { Callback } from './@ohos.base'; +/*** endif */ +/*** if arkts static */ +import { Callback, RecordData } from './@ohos.base'; +/*** endif */ /** * Provides methods for sending and processing in-process events. @@ -42,7 +47,7 @@ import { Callback } from './@ohos.base'; * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ declare namespace emitter { @@ -641,7 +646,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ export interface EventData { @@ -674,12 +679,12 @@ declare namespace emitter { /** * Data carried by the event. * - * @type { ?(Record | ESObject) } + * @type { ?(Record | ESObject) } * @syscap SystemCapability.Notification.Emitter * @crossplatform * @since 20 static */ - data?: Record | ESObject; + data?: Record | ESObject; } /** @@ -704,7 +709,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ export interface InnerEvent { @@ -730,7 +735,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ eventId: long; @@ -757,7 +762,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ priority?: EventPriority; @@ -785,7 +790,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ export enum EventPriority { @@ -808,7 +813,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ IMMEDIATE = 0, @@ -832,7 +837,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ HIGH, @@ -856,7 +861,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ LOW, @@ -880,7 +885,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ IDLE, @@ -900,7 +905,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ export interface Options { @@ -919,7 +924,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ priority?: EventPriority; @@ -932,7 +937,7 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 dynamic + * @since 12 dynamic * @since 20 static */ export interface GenericEventData { diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index 89b8cbb887..19f5eb884c 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -50,7 +50,7 @@ import type { NotificationCheckRequest as _NotificationCheckRequest } from './no import type UIAbilityContext from './application/UIAbilityContext'; /*** endif */ /*** if arkts static */ -import { AsyncCallback } from '@ohos.base'; +import { AsyncCallback, RecordData } from '@ohos.base'; import { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; import { NotificationIconButton as _NotificationIconButton } from './notification/notificationContent'; import { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; @@ -4323,9 +4323,19 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 11 dynamic - * @since 20 static */ extraInfos?: Record; + + /** + * Additional information of the live view notification. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER + * @type { ?Record } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 static + */ + extraInfos?: Record; } /** diff --git a/api/commonEvent/commonEventData.d.ts b/api/commonEvent/commonEventData.d.ts index 8a67b7b6d0..fa74ffafc5 100644 --- a/api/commonEvent/commonEventData.d.ts +++ b/api/commonEvent/commonEventData.d.ts @@ -18,6 +18,10 @@ * @kit BasicServicesKit */ +/*** if arkts static */ +import { RecordData } from '../@ohos.base'; +/*** endif */ + /** * Common event data. * @@ -147,9 +151,9 @@ export interface CommonEventData { /** * The description of the parameters in a common event. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.Notification.CommonEvent * @since 20 static */ - parameters?: Record; + parameters?: Record; } diff --git a/api/commonEvent/commonEventPublishData.d.ts b/api/commonEvent/commonEventPublishData.d.ts index 14b18000bd..20e205ed63 100644 --- a/api/commonEvent/commonEventPublishData.d.ts +++ b/api/commonEvent/commonEventPublishData.d.ts @@ -18,6 +18,10 @@ * @kit BasicServicesKit */ +/*** if arkts static */ +import { RecordData } from '../@ohos.base'; +/*** endif */ + /** * The CommonEventPublishData module provides APIs for defining common event content and attributes. * @@ -170,9 +174,9 @@ export interface CommonEventPublishData { /** * The description of the parameters in a common event. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.Notification.CommonEvent * @since 20 static */ - parameters?: Record; + parameters?: Record; } diff --git a/api/notification/notificationActionButton.d.ts b/api/notification/notificationActionButton.d.ts index e765bee86a..c6c89f54cc 100644 --- a/api/notification/notificationActionButton.d.ts +++ b/api/notification/notificationActionButton.d.ts @@ -25,6 +25,7 @@ import { WantAgent } from '../@ohos.wantAgent'; /*** endif */ /*** if arkts static */ import { WantAgent } from '../@ohos.app.ability.wantAgent'; +import { RecordData } from '../@ohos.base'; /*** endif */ /** @@ -68,11 +69,11 @@ export interface NotificationActionButton { /** * Extra information of the button. * - * @type { ?object } + * @type { ?Record } * @syscap SystemCapability.Notification.Notification * @since 20 static */ - extras?: Record; + extras?: Record; /** * User input object. ID entered by a subscriber. diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index 96e5af7972..fa44926941 100644 --- a/api/notification/notificationContent.d.ts +++ b/api/notification/notificationContent.d.ts @@ -27,6 +27,7 @@ import { WantAgent } from '../@ohos.wantAgent'; /*** endif */ /*** if arkts static */ import { WantAgent } from '../@ohos.app.ability.wantAgent'; +import { RecordData } from '../@ohos.base'; /*** endif */ /** @@ -318,10 +319,19 @@ export interface NotificationLiveViewContent extends NotificationBasicContent { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 11 dynamic - * @since 20 static */ extraInfo?: Record; + /** + * Additional information of the live view notification. + * + * @type { ?Record} + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 static + */ + extraInfo?: Record; + /** * The picture information list of the live view notification. * diff --git a/api/notification/notificationRequest.d.ts b/api/notification/notificationRequest.d.ts index 4db78dde83..c4ecc75841 100644 --- a/api/notification/notificationRequest.d.ts +++ b/api/notification/notificationRequest.d.ts @@ -33,6 +33,7 @@ import type { BundleOption } from './NotificationCommonDef'; /*** if arkts static */ import { WantAgent } from '../@ohos.app.ability.wantAgent'; import { BundleOption } from './NotificationCommonDef'; +import { RecordData } from '../@ohos.base'; /*** endif */ /** @@ -247,11 +248,11 @@ export interface NotificationRequest { /** * Extended parameter. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.Notification.Notification * @since 20 static */ - extraInfo?: Record; + extraInfo?: Record; /** * Extended parameter. @@ -259,10 +260,20 @@ export interface NotificationRequest { * @type { Record } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 20 dynamic&static + * @since 20 dynamic */ extendInfo?: Record; + /** + * Extended parameter. + * + * @type { Record } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 static + */ + extendInfo?: Record; + /** * Background color of the notification. * @@ -924,10 +935,10 @@ export interface UnifiedGroupInfo { /** * Other information is aggregated across applications. * - * @type { ?object } + * @type { ?Record } * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 static */ - extraInfo?: Record; + extraInfo?: Record; } diff --git a/api/notification/notificationTemplate.d.ts b/api/notification/notificationTemplate.d.ts index 1e685192d2..5aa490d988 100644 --- a/api/notification/notificationTemplate.d.ts +++ b/api/notification/notificationTemplate.d.ts @@ -18,6 +18,10 @@ * @kit NotificationKit */ +/*** if arkts static */ +import { RecordData } from '../@ohos.base'; +/*** endif */ + /** * The NotificationTemplate module describes the notification template. * @@ -46,7 +50,18 @@ export interface NotificationTemplate { * @type { Record } * @syscap SystemCapability.Notification.Notification * @since 8 dynamic - * @since 20 static */ data: Record; + + /** + * Template data. + * - title: title of the file. This parameter is mandatory, and the value is of the string type. + * - fileName: name of the file to be downloaded. This parameter is mandatory, and the value is of the string type. + * - progressValue: download progress. The value is a number. + * + * @type { Record } + * @syscap SystemCapability.Notification.Notification + * @since 20 static + */ + data: Record; } -- Gitee