@@ -116,30 +116,31 @@ class Messaging {
116116 const std::string &name,
117117 const std::string &targetId,
118118 const std::string &subscriberId);
119- /* *
119+ /* *
120120 * @brief Creates a new push notification message.
121- *
122- * Sends a push notification to specified users, topics, or both.
121+ *
122+ * Sends a push notification to specified users, topics, or both.
123123 *
124124 * @param messageId A unique Id for the message.
125125 * @param title Title of the push notification.
126126 * @param body Body content of the push notification.
127- * @param topicId A list of topic IDs to which the notification should be sent.
128- * @param userId A list of user IDs to which the notification should be sent.
127+ * @param topicId A list of topic IDs to which the notification should be
128+ * sent.
129+ * @param userId A list of user IDs to which the notification should be
130+ * sent.
129131 * @param draft If true, saves the message as a draft.
130- *
132+ *
131133 * @return JSON response.
132- */
134+ */
133135 std::string createPush (const std::string &messageId,
134- const std::string &title,
135- const std::string &body,
136- const std::vector<std::string> &topicId= {},
137- const std::vector<std::string> &userId = {},
138- bool draft = false );
139-
140- /* *
136+ const std::string &title, const std::string &body,
137+ const std::vector<std::string> &topicId = {},
138+ const std::vector<std::string> &userId = {},
139+ bool draft = false );
140+
141+ /* *
141142 * @brief Create a new email message.
142- *
143+ *
143144 * Sends a new email message to specific topics and/or target recipients.
144145 * At least one of `topics` or `targets` must be provided.
145146 *
@@ -150,30 +151,56 @@ class Messaging {
150151 * @param targets List of target recipients (e.g., email:userId) (optional).
151152 * @return JSON response.
152153 */
153- std::string createMessage (const std::string& messageId,
154- const std::string& subject,
155- const std::string& content,
156- const std::vector<std::string>& topics = {},
157- const std::vector<std::string>& targets = {});
154+ std::string createMessage (const std::string &messageId,
155+ const std::string &subject,
156+ const std::string &content,
157+ const std::vector<std::string> &topics = {},
158+ const std::vector<std::string> &targets = {});
159+
160+ /* *
161+ * @brief Create a new sms message.
162+ *
163+ * @param messageId Unique ID for the message.
164+ * @param content SMS Content.
165+ * @param topics List of topic IDs (optional).
166+ * @param users List of User IDs (optional).
167+ * @param targets List of target IDs (optional).
168+ * @param draft If true, saves the message as a draft.
169+ * @param scheduled_at Scheduled delivery time for message.
170+ * @return JSON response.
171+ */
172+ std::string createSms (const std::string &messageId,
173+ const std::string &content,
174+ const std::vector<std::string> &topics = {},
175+ const std::vector<std::string> &users = {},
176+ const std::vector<std::string> &targets = {},
177+ bool draft = false ,
178+ const std::string &scheduled_at = " " );
158179
159- /* *
160- * @brief Updates an existing push notification message.
161- *
162- * Modifies the title and body of an existing push message.
180+ /* *
181+ * @brief Updates an existing push notification
182+ * message.
163183 *
164- * @param messageId The ID of the message to update.
165- * @param title New title of the push notification.
166- * @param body New body content of the push notification.
167- * @param topicId List of topic IDs to update the message.
168- * @param userId List of user IDs to update the message.
184+ * Modifies the title and body of an existing push
185+ * message.
186+ *
187+ * @param messageId The ID of the message to
188+ * update.
189+ * @param title New title of the push
190+ * notification.
191+ * @param body New body content of the push
192+ * notification.
193+ * @param topicId List of topic IDs to update the
194+ * message.
195+ * @param userId List of user IDs to update the
196+ * message.
169197 * @return JSON response
170- */
198+ */
171199 std::string updatePush (const std::string &messageId,
172- const std::string &title,
173- const std::string &body,
174- const std::vector<std::string> &topicId = {},
175- const std::vector<std::string> &userId = {});
176-
200+ const std::string &title, const std::string &body,
201+ const std::vector<std::string> &topicId = {},
202+ const std::vector<std::string> &userId = {});
203+
177204 /* *
178205 * @brief List all providers.
179206 * @param queries Optional query filters
@@ -189,77 +216,81 @@ class Messaging {
189216 */
190217 std::string listProviderLogs (const std::string &providerId,
191218 Queries &queries);
192-
219+
193220 /* *
194- * @brief Create a new Firebase Cloud Messaging provider.
221+ * @brief Create a new Firebase Cloud Messaging
222+ * provider.
195223 * @param providerId A unique Id for the provider.
196224 * @param name provider name.
197- * @param service_account_json FCM service account JSON..
198- * @param enabled Whether the provider should be active immediately after creation.
225+ * @param service_account_json FCM service account
226+ * JSON..
227+ * @param enabled Whether the provider should be
228+ * active immediately after creation.
199229 * @return JSON response.
200- */
230+ */
201231 std::string createFcmProvider (std::string &providerId, std::string name,
202232 std::string service_account_json,
203233 bool enabled);
204-
234+
205235 /* *
206236 * @brief Delete a provider.
207237 * @param providerId ID of the provider
208238 * @return JSON response
209239 */
210240 std::string deleteProvider (const std::string &providerId);
211-
241+
212242 /* *
213243 * @brief Get a specific provider by ID.
214244 * @param providerId ID of the provider
215245 * @return JSON string of the provider details
216246 */
217247 std::string getProvider (const std::string &providerId);
218-
248+
219249 /* *
220- * @brief List all message logs with optional filters.
250+ * @brief List all message logs with optional
251+ * filters.
221252 * @param messageId ID of the message
222253 * @param queries Query parameters for filtering
223254 * @return JSON string of messageLog list
224255 */
225256 std::string listMessageLogs (const std::string &messageId, Queries &queries);
226-
227- /* *
257+
258+ /* *
228259 * @brief Delete a message by its ID.
229260 * @param messageId ID of the message.
230261 * @return JSON response.
231262 */
232263
233264 std::string deleteMessages (const std::string &messageId);
234-
235- /* *
265+
266+ /* *
236267 * @brief Update an email message by its ID.
237268 * @class updateEmail
238- *
239- * This method belongs to the updateEmail class and provides the functionality
240- * to update the subject and content of an existing email message via the
241- * Appwrite Messaging API.
242- *
269+ *
270+ * This method belongs to the updateEmail class
271+ * and provides the functionality to update the
272+ * subject and content of an existing email
273+ * message via the Appwrite Messaging API.
274+ *
243275 * @param messageId Unique message identifier
244276 * @param subject New subject of the email
245- * @param content Updated content/body of the email
277+ * @param content Updated content/body of the
278+ * email
246279 * @return JSON response string from the server
247- * @throws AppwriteException if parameters are invalid or request fails
248- */
249- std::string updateEmail (
250- const std::string& messageId,
251- const std::string& subject,
252- const std::string& content
253- );
254-
280+ * @throws AppwriteException if parameters are
281+ * invalid or request fails
282+ */
283+ std::string updateEmail (const std::string &messageId,
284+ const std::string &subject,
285+ const std::string &content);
255286
256287 /* *
257288 * @brief List all targets for a given message.
258289 * @param messageId ID of the message.
259290 * @param queries Optional query filters.
260291 * @return JSON response.
261- */
262- std::string listTargets (const std::string &messageId,
292+ */
293+ std::string listTargets (const std::string &messageId,
263294 const std::vector<std::string> &queries = {});
264295
265296 /* *
0 commit comments