node-appwrite 14.0.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 (76) 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/databases.d.mts +21 -10
  41. package/dist/services/databases.d.ts +21 -10
  42. package/dist/services/databases.js +54 -10
  43. package/dist/services/databases.js.map +1 -1
  44. package/dist/services/databases.mjs +54 -10
  45. package/dist/services/databases.mjs.map +1 -1
  46. package/dist/services/locale.d.mts +1 -1
  47. package/dist/services/locale.d.ts +1 -1
  48. package/dist/services/locale.js +1 -1
  49. package/dist/services/locale.js.map +1 -1
  50. package/dist/services/locale.mjs +1 -1
  51. package/dist/services/locale.mjs.map +1 -1
  52. package/dist/services/messaging.d.mts +10 -3
  53. package/dist/services/messaging.d.ts +10 -3
  54. package/dist/services/messaging.js +27 -9
  55. package/dist/services/messaging.js.map +1 -1
  56. package/dist/services/messaging.mjs +27 -9
  57. package/dist/services/messaging.mjs.map +1 -1
  58. package/dist/services/storage.d.mts +1 -1
  59. package/dist/services/storage.d.ts +1 -1
  60. package/dist/services/storage.js +1 -1
  61. package/dist/services/storage.js.map +1 -1
  62. package/dist/services/storage.mjs +1 -1
  63. package/dist/services/storage.mjs.map +1 -1
  64. package/dist/services/teams.d.mts +2 -2
  65. package/dist/services/teams.d.ts +2 -2
  66. package/dist/services/teams.js +2 -2
  67. package/dist/services/teams.js.map +1 -1
  68. package/dist/services/teams.mjs +2 -2
  69. package/dist/services/teams.mjs.map +1 -1
  70. package/dist/services/users.d.mts +10 -10
  71. package/dist/services/users.d.ts +10 -10
  72. package/dist/services/users.js +10 -10
  73. package/dist/services/users.js.map +1 -1
  74. package/dist/services/users.mjs +10 -10
  75. package/dist/services/users.mjs.map +1 -1
  76. package/package.json +1 -1
@@ -203,22 +203,19 @@ var Messaging = class {
203
203
  * @param {string} sound
204
204
  * @param {string} color
205
205
  * @param {string} tag
206
- * @param {string} badge
206
+ * @param {number} badge
207
207
  * @param {boolean} draft
208
208
  * @param {string} scheduledAt
209
+ * @param {boolean} contentAvailable
210
+ * @param {boolean} critical
211
+ * @param {MessagePriority} priority
209
212
  * @throws {AppwriteException}
210
213
  * @returns {Promise<Models.Message>}
211
214
  */
212
- async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
215
+ async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
213
216
  if (typeof messageId === "undefined") {
214
217
  throw new AppwriteException('Missing required parameter: "messageId"');
215
218
  }
216
- if (typeof title === "undefined") {
217
- throw new AppwriteException('Missing required parameter: "title"');
218
- }
219
- if (typeof body === "undefined") {
220
- throw new AppwriteException('Missing required parameter: "body"');
221
- }
222
219
  const apiPath = "/messaging/messages/push";
223
220
  const payload = {};
224
221
  if (typeof messageId !== "undefined") {
@@ -269,6 +266,15 @@ var Messaging = class {
269
266
  if (typeof scheduledAt !== "undefined") {
270
267
  payload["scheduledAt"] = scheduledAt;
271
268
  }
269
+ if (typeof contentAvailable !== "undefined") {
270
+ payload["contentAvailable"] = contentAvailable;
271
+ }
272
+ if (typeof critical !== "undefined") {
273
+ payload["critical"] = critical;
274
+ }
275
+ if (typeof priority !== "undefined") {
276
+ payload["priority"] = priority;
277
+ }
272
278
  const uri = new URL(this.client.config.endpoint + apiPath);
273
279
  const apiHeaders = {
274
280
  "content-type": "application/json"
@@ -302,10 +308,13 @@ var Messaging = class {
302
308
  * @param {number} badge
303
309
  * @param {boolean} draft
304
310
  * @param {string} scheduledAt
311
+ * @param {boolean} contentAvailable
312
+ * @param {boolean} critical
313
+ * @param {MessagePriority} priority
305
314
  * @throws {AppwriteException}
306
315
  * @returns {Promise<Models.Message>}
307
316
  */
308
- async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
317
+ async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
309
318
  if (typeof messageId === "undefined") {
310
319
  throw new AppwriteException('Missing required parameter: "messageId"');
311
320
  }
@@ -356,6 +365,15 @@ var Messaging = class {
356
365
  if (typeof scheduledAt !== "undefined") {
357
366
  payload["scheduledAt"] = scheduledAt;
358
367
  }
368
+ if (typeof contentAvailable !== "undefined") {
369
+ payload["contentAvailable"] = contentAvailable;
370
+ }
371
+ if (typeof critical !== "undefined") {
372
+ payload["critical"] = critical;
373
+ }
374
+ if (typeof priority !== "undefined") {
375
+ payload["priority"] = priority;
376
+ }
359
377
  const uri = new URL(this.client.config.endpoint + apiPath);
360
378
  const apiHeaders = {
361
379
  "content-type": "application/json"