You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/commands/account.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -1983,7 +1983,7 @@ account
1983
1983
1984
1984
account
1985
1985
.command(`create-magic-url-token`)
1986
-
.description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
1986
+
.description(`Sends the user an email with a secret key for creating a session. If the provided user ID has not been registered, a new user will be created. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
1987
1987
.requiredOption(`--user-id <user-id>`,`Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1988
1988
.requiredOption(`--email <email>`,`User email.`)
1989
1989
.option(`--url <url>`,`URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
* @property {string[]} targets List of Targets IDs.
257
-
* @property {object} data Additional Data for push notification.
257
+
* @property {object} data Additional key-value pair data for push notification.
258
258
* @property {string} action Action for push notification.
259
259
* @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
260
260
* @property {string} icon Icon for push notification. Available only for Android and Web Platform.
261
-
* @property {string} sound Sound for push notification. Available only for Android and IOS Platform.
261
+
* @property {string} sound Sound for push notification. Available only for Android and iOS Platform.
262
262
* @property {string} color Color for push notification. Available only for Android Platform.
263
263
* @property {string} tag Tag for push notification. Available only for Android Platform.
264
-
* @property {string} badge Badge for push notification. Available only for IOS Platform.
264
+
* @property {number} badge Badge for push notification. Available only for iOS Platform.
265
265
* @property {boolean} draft Is message a draft
266
266
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
267
+
* @property {boolean} contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform.
268
+
* @property {boolean} critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
269
+
* @property {MessagePriority} priority Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.
* @property {number} badge Badge for push notification. Available only for iOS platforms.
362
374
* @property {boolean} draft Is message a draft
363
375
* @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
376
+
* @property {boolean} contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform.
377
+
* @property {boolean} critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
378
+
* @property {MessagePriority} priority Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.
.requiredOption(`--message-id <message-id>`,`Message ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
2457
-
.requiredOption(`--title <title>`,`Title for push notification.`)
2458
-
.requiredOption(`--body <body>`,`Body for push notification.`)
2481
+
.option(`--title <title>`,`Title for push notification.`)
2482
+
.option(`--body <body>`,`Body for push notification.`)
2459
2483
.option(`--topics [topics...]`,`List of Topic IDs.`)
2460
2484
.option(`--users [users...]`,`List of User IDs.`)
2461
2485
.option(`--targets [targets...]`,`List of Targets IDs.`)
2462
-
.option(`--data <data>`,`Additional Data for push notification.`)
2486
+
.option(`--data <data>`,`Additional key-value pair data for push notification.`)
2463
2487
.option(`--action <action>`,`Action for push notification.`)
2464
2488
.option(`--image <image>`,`Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.`)
2465
2489
.option(`--icon <icon>`,`Icon for push notification. Available only for Android and Web Platform.`)
2466
-
.option(`--sound <sound>`,`Sound for push notification. Available only for Android and IOS Platform.`)
2490
+
.option(`--sound <sound>`,`Sound for push notification. Available only for Android and iOS Platform.`)
2467
2491
.option(`--color <color>`,`Color for push notification. Available only for Android Platform.`)
2468
2492
.option(`--tag <tag>`,`Tag for push notification. Available only for Android Platform.`)
2469
-
.option(`--badge <badge>`,`Badge for push notification. Available only for IOS Platform.`)
2493
+
.option(`--badge <badge>`,`Badge for push notification. Available only for iOS Platform.`,parseInteger)
2470
2494
.option(`--draft <draft>`,`Is message a draft`,parseBool)
2471
2495
.option(`--scheduled-at <scheduled-at>`,`Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2496
+
.option(`--content-available <content-available>`,`If set to true, the notification will be delivered in the background. Available only for iOS Platform.`,parseBool)
2497
+
.option(`--critical <critical>`,`If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`,parseBool)
2498
+
.option(`--priority <priority>`,`Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.`)
2472
2499
.action(actionRunner(messagingCreatePush))
2473
2500
2474
2501
messaging
@@ -2490,6 +2517,9 @@ messaging
2490
2517
.option(`--badge <badge>`,`Badge for push notification. Available only for iOS platforms.`,parseInteger)
2491
2518
.option(`--draft <draft>`,`Is message a draft`,parseBool)
2492
2519
.option(`--scheduled-at <scheduled-at>`,`Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2520
+
.option(`--content-available <content-available>`,`If set to true, the notification will be delivered in the background. Available only for iOS Platform.`,parseBool)
2521
+
.option(`--critical <critical>`,`If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`,parseBool)
2522
+
.option(`--priority <priority>`,`Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.`)
0 commit comments