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.
- package/README.md +1 -1
- package/dist/client.d.mts +1 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +5 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +5 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/image-format.d.mts +2 -1
- package/dist/enums/image-format.d.ts +2 -1
- package/dist/enums/image-format.js +1 -0
- package/dist/enums/image-format.js.map +1 -1
- package/dist/enums/image-format.mjs +1 -0
- package/dist/enums/image-format.mjs.map +1 -1
- package/dist/enums/message-priority.d.mts +6 -0
- package/dist/enums/message-priority.d.ts +6 -0
- package/dist/enums/message-priority.js +11 -0
- package/dist/enums/message-priority.js.map +1 -0
- package/dist/enums/message-priority.mjs +10 -0
- package/dist/enums/message-priority.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +15 -2
- package/dist/enums/runtime.d.ts +15 -2
- package/dist/enums/runtime.js +14 -1
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +14 -1
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +96 -4
- package/dist/models.d.ts +96 -4
- package/dist/services/account.d.mts +11 -11
- package/dist/services/account.d.ts +11 -11
- package/dist/services/account.js +11 -11
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +11 -11
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/locale.d.mts +1 -1
- package/dist/services/locale.d.ts +1 -1
- package/dist/services/locale.js +1 -1
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs +1 -1
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +10 -3
- package/dist/services/messaging.d.ts +10 -3
- package/dist/services/messaging.js +27 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +27 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/storage.d.mts +1 -1
- package/dist/services/storage.d.ts +1 -1
- package/dist/services/storage.js +1 -1
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +1 -1
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/teams.d.mts +2 -2
- package/dist/services/teams.d.ts +2 -2
- package/dist/services/teams.js +2 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +2 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/users.d.mts +10 -10
- package/dist/services/users.d.ts +10 -10
- package/dist/services/users.js +10 -10
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +10 -10
- package/dist/services/users.mjs.map +1 -1
- 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 {
|
|
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"
|