node-appwrite 14.1.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/dist/client.d.mts +1 -0
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.js +5 -2
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +5 -2
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/image-format.d.mts +2 -1
  9. package/dist/enums/image-format.d.ts +2 -1
  10. package/dist/enums/image-format.js +1 -0
  11. package/dist/enums/image-format.js.map +1 -1
  12. package/dist/enums/image-format.mjs +1 -0
  13. package/dist/enums/image-format.mjs.map +1 -1
  14. package/dist/enums/message-priority.d.mts +6 -0
  15. package/dist/enums/message-priority.d.ts +6 -0
  16. package/dist/enums/message-priority.js +11 -0
  17. package/dist/enums/message-priority.js.map +1 -0
  18. package/dist/enums/message-priority.mjs +10 -0
  19. package/dist/enums/message-priority.mjs.map +1 -0
  20. package/dist/enums/runtime.d.mts +15 -2
  21. package/dist/enums/runtime.d.ts +15 -2
  22. package/dist/enums/runtime.js +14 -1
  23. package/dist/enums/runtime.js.map +1 -1
  24. package/dist/enums/runtime.mjs +14 -1
  25. package/dist/enums/runtime.mjs.map +1 -1
  26. package/dist/index.d.mts +1 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +5 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +1 -0
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/models.d.mts +96 -4
  33. package/dist/models.d.ts +96 -4
  34. package/dist/services/account.d.mts +11 -11
  35. package/dist/services/account.d.ts +11 -11
  36. package/dist/services/account.js +11 -11
  37. package/dist/services/account.js.map +1 -1
  38. package/dist/services/account.mjs +11 -11
  39. package/dist/services/account.mjs.map +1 -1
  40. package/dist/services/locale.d.mts +1 -1
  41. package/dist/services/locale.d.ts +1 -1
  42. package/dist/services/locale.js +1 -1
  43. package/dist/services/locale.js.map +1 -1
  44. package/dist/services/locale.mjs +1 -1
  45. package/dist/services/locale.mjs.map +1 -1
  46. package/dist/services/messaging.d.mts +10 -3
  47. package/dist/services/messaging.d.ts +10 -3
  48. package/dist/services/messaging.js +27 -9
  49. package/dist/services/messaging.js.map +1 -1
  50. package/dist/services/messaging.mjs +27 -9
  51. package/dist/services/messaging.mjs.map +1 -1
  52. package/dist/services/storage.d.mts +1 -1
  53. package/dist/services/storage.d.ts +1 -1
  54. package/dist/services/storage.js +1 -1
  55. package/dist/services/storage.js.map +1 -1
  56. package/dist/services/storage.mjs +1 -1
  57. package/dist/services/storage.mjs.map +1 -1
  58. package/dist/services/teams.d.mts +2 -2
  59. package/dist/services/teams.d.ts +2 -2
  60. package/dist/services/teams.js +2 -2
  61. package/dist/services/teams.js.map +1 -1
  62. package/dist/services/teams.mjs +2 -2
  63. package/dist/services/teams.mjs.map +1 -1
  64. package/dist/services/users.d.mts +10 -10
  65. package/dist/services/users.d.ts +10 -10
  66. package/dist/services/users.js +10 -10
  67. package/dist/services/users.js.map +1 -1
  68. package/dist/services/users.mjs +10 -10
  69. package/dist/services/users.mjs.map +1 -1
  70. package/package.json +1 -1
@@ -204,22 +204,19 @@ class Messaging {
204
204
  * @param {string} sound
205
205
  * @param {string} color
206
206
  * @param {string} tag
207
- * @param {string} badge
207
+ * @param {number} badge
208
208
  * @param {boolean} draft
209
209
  * @param {string} scheduledAt
210
+ * @param {boolean} contentAvailable
211
+ * @param {boolean} critical
212
+ * @param {MessagePriority} priority
210
213
  * @throws {AppwriteException}
211
214
  * @returns {Promise<Models.Message>}
212
215
  */
213
- async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
216
+ async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
214
217
  if (typeof messageId === "undefined") {
215
218
  throw new client.AppwriteException('Missing required parameter: "messageId"');
216
219
  }
217
- if (typeof title === "undefined") {
218
- throw new client.AppwriteException('Missing required parameter: "title"');
219
- }
220
- if (typeof body === "undefined") {
221
- throw new client.AppwriteException('Missing required parameter: "body"');
222
- }
223
220
  const apiPath = "/messaging/messages/push";
224
221
  const payload = {};
225
222
  if (typeof messageId !== "undefined") {
@@ -270,6 +267,15 @@ class Messaging {
270
267
  if (typeof scheduledAt !== "undefined") {
271
268
  payload["scheduledAt"] = scheduledAt;
272
269
  }
270
+ if (typeof contentAvailable !== "undefined") {
271
+ payload["contentAvailable"] = contentAvailable;
272
+ }
273
+ if (typeof critical !== "undefined") {
274
+ payload["critical"] = critical;
275
+ }
276
+ if (typeof priority !== "undefined") {
277
+ payload["priority"] = priority;
278
+ }
273
279
  const uri = new URL(this.client.config.endpoint + apiPath);
274
280
  const apiHeaders = {
275
281
  "content-type": "application/json"
@@ -303,10 +309,13 @@ class Messaging {
303
309
  * @param {number} badge
304
310
  * @param {boolean} draft
305
311
  * @param {string} scheduledAt
312
+ * @param {boolean} contentAvailable
313
+ * @param {boolean} critical
314
+ * @param {MessagePriority} priority
306
315
  * @throws {AppwriteException}
307
316
  * @returns {Promise<Models.Message>}
308
317
  */
309
- async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
318
+ async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
310
319
  if (typeof messageId === "undefined") {
311
320
  throw new client.AppwriteException('Missing required parameter: "messageId"');
312
321
  }
@@ -357,6 +366,15 @@ class Messaging {
357
366
  if (typeof scheduledAt !== "undefined") {
358
367
  payload["scheduledAt"] = scheduledAt;
359
368
  }
369
+ if (typeof contentAvailable !== "undefined") {
370
+ payload["contentAvailable"] = contentAvailable;
371
+ }
372
+ if (typeof critical !== "undefined") {
373
+ payload["critical"] = critical;
374
+ }
375
+ if (typeof priority !== "undefined") {
376
+ payload["priority"] = priority;
377
+ }
360
378
  const uri = new URL(this.client.config.endpoint + apiPath);
361
379
  const apiHeaders = {
362
380
  "content-type": "application/json"