comparison libervia/backend/bridge/bridge_constructor/bridge_template.ini @ 4130:02f0adc745c6

core: notifications implementation, first draft: add a new table for notifications, and methods/bridge methods to manipulate them.
author Goffi <goffi@goffi.org>
date Mon, 16 Oct 2023 17:29:31 +0200
parents 4b842c1fb686
children a8a0fa678ce2
comparison
equal deleted inserted replaced
4129:51744ad00a42 4130:02f0adc745c6
144 doc=An entity's data has been updated 144 doc=An entity's data has been updated
145 doc_param_0=jid: entity's bare jid 145 doc_param_0=jid: entity's bare jid
146 doc_param_1=name: Name of the updated value 146 doc_param_1=name: Name of the updated value
147 doc_param_2=value: New value 147 doc_param_2=value: New value
148 doc_param_3=%(doc_profile)s 148 doc_param_3=%(doc_profile)s
149
150 [notification_new]
151 type=signal
152 category=core
153 sig_in=sdssssbidss
154 doc=A new notification has been emitted
155 doc_param_0=id: unique identifier of the notification
156 doc_param_1=timestamp: notification creation time
157 doc_param_2=type: type of the notification
158 doc_param_3=body_plain: plain text body of the notification
159 doc_param_4=body_rich: rich text (XHTML) body of the notification. Optional.
160 doc_param_5=title: optional title of the notification
161 doc_param_6=requires_action: True if the notification requires user action (e.g. a dialog needs to be answered), False otherwise
162 doc_param_7=priority: how urgent the notification is, represented as an enumeration value
163 doc_param_8=expire_at: expiration timestamp for the notification. Optional.
164 doc_param_9=extra: additional serialized data associated with the notification
165 doc_param_10=profile: profile associated with the notification. C.PROF_KEY_ALL can be used for global notifications.
166
167 [notification_deleted]
168 type=signal
169 category=core
170 sig_in=ss
171 doc=A new notification has been emitted
172 doc_param_0=id: id of the deleted notification
173 doc_param_1=profile: profile of the deleted application, or C.PROF_KEY_ALL for a global notification
149 174
150 [progress_started] 175 [progress_started]
151 type=signal 176 type=signal
152 category=core 177 category=core
153 sig_in=sa{ss}s 178 sig_in=sa{ss}s
1022 Empty string to generate a file in cache, unique to the source 1047 Empty string to generate a file in cache, unique to the source
1023 doc_param_3=extra: serialised extra 1048 doc_param_3=extra: serialised extra
1024 doc_param_4=profile_key: either profile_key or empty string to use common cache 1049 doc_param_4=profile_key: either profile_key or empty string to use common cache
1025 this parameter is used only when dest is empty 1050 this parameter is used only when dest is empty
1026 doc_return=path to the new converted image 1051 doc_return=path to the new converted image
1052
1053 [notification_add]
1054 type=method
1055 category=core
1056 sig_in=ssssbbsdss
1057 sig_out=
1058 doc=Add a new notification
1059 doc_param_0=type_: Notification type
1060 doc_param_1=body_plain: Plain text body of the notification
1061 doc_param_2=body_rich: Rich text body of the notification (optional, can be empty string for default)
1062 doc_param_3=title: Title of the notification (optional, can be empty string for default)
1063 doc_param_4=is_global: True if the notification is for all profiles
1064 doc_param_5=requires_action: Indicates if the notification requires action
1065 doc_param_7=priority: Priority level of the notification (e.g. MEDIUM, HIGH, etc.)
1066 doc_param_8=expire_at: Expiration timestamp for the notification (optional, can be 0 for none)
1067 doc_param_9=extra: Additional details for the notification as a dictionary (optional, can be empty dictionary)
1068 doc_param_10=%(doc_profile_key)s: Profile key (use "@ALL@" for all profiles)
1069
1070 [notifications_get]
1071 type=method
1072 category=core
1073 sig_in=ss
1074 sig_out=s
1075 doc=Retrieve notifications based on provided filters
1076 doc_param_0=filters: a dictionary with filter criteria for notifications retrieval
1077 doc_param_1=%(doc_profile_key)s or @ALL@ for all profiles
1078 doc_return=list of Notification objects. The exact structure will depend on your Notification class.
1079
1080 [notification_delete]
1081 type=method
1082 category=core
1083 sig_in=sbs
1084 sig_out=
1085 doc=Delete a notification
1086 doc_param_0=id_: ID of the notification to delete
1087 doc_param_1=is_global: true if the notification is a global one
1088 doc_param_2=profile_key: Profile key (use "@ALL@" for all profiles)
1089
1090 [notifications_expired_clean]
1091 type=method
1092 category=core
1093 sig_in=ds
1094 sig_out=
1095 doc=Cleans expired notifications and older profile-specific notifications
1096 doc_param_0=limit_timestamp: Timestamp limit for older notifications. If -1.0, only truly expired notifications are removed.
1097 doc_param_1=profile_key: Profile key (use "@NONE@" to indicate no specific profile, otherwise only notification for given profile will be expired, in addition to truly expired notifications).