appwrite-cli 6.1.0 → 6.2.2
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/LICENSE.md +1 -1
- package/README.md +3 -3
- package/docs/examples/messaging/create-push.md +5 -2
- package/docs/examples/messaging/update-push.md +3 -0
- package/docs/examples/projects/update-memberships-privacy.md +5 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -3
- package/lib/commands/account.js +4 -4
- package/lib/commands/assistant.js +1 -1
- package/lib/commands/databases.js +3 -3
- package/lib/commands/functions.js +4 -4
- package/lib/commands/init.js +1 -0
- package/lib/commands/messaging.js +43 -13
- package/lib/commands/migrations.js +14 -179
- package/lib/commands/organizations.js +48 -0
- package/lib/commands/project.js +1 -1
- package/lib/commands/projects.js +98 -45
- package/lib/commands/proxy.js +1 -1
- package/lib/commands/push.js +18 -15
- package/lib/commands/storage.js +2 -2
- package/lib/commands/teams.js +2 -2
- package/lib/commands/users.js +1 -1
- package/lib/commands/vcs.js +10 -10
- package/lib/config.js +1 -1
- package/lib/emulation/utils.js +13 -13
- package/lib/parser.js +1 -1
- package/lib/questions.js +25 -2
- package/lib/utils.js +13 -0
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +0 -3
- package/docs/examples/migrations/delete-firebase-auth.md +0 -1
- package/docs/examples/migrations/get-firebase-report-o-auth.md +0 -3
- package/docs/examples/migrations/list-firebase-projects.md +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
|
|
2
2
|
All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Appwrite Command Line SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
6.
|
|
32
|
+
6.2.2
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
60
60
|
Once the installation completes, you can verify your install using
|
|
61
61
|
```
|
|
62
62
|
$ appwrite -v
|
|
63
|
-
6.
|
|
63
|
+
6.2.2
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Getting Started
|
package/install.ps1
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# You can use "View source" of this page to see the full script.
|
|
14
14
|
|
|
15
15
|
# REPO
|
|
16
|
-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -97,7 +97,7 @@ printSuccess() {
|
|
|
97
97
|
downloadBinary() {
|
|
98
98
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
99
99
|
|
|
100
|
-
GITHUB_LATEST_VERSION="6.
|
|
100
|
+
GITHUB_LATEST_VERSION="6.2.2"
|
|
101
101
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
102
102
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
103
103
|
|
package/lib/client.js
CHANGED
|
@@ -16,8 +16,8 @@ class Client {
|
|
|
16
16
|
'x-sdk-name': 'Command Line',
|
|
17
17
|
'x-sdk-platform': 'console',
|
|
18
18
|
'x-sdk-language': 'cli',
|
|
19
|
-
'x-sdk-version': '6.
|
|
20
|
-
'user-agent' : `AppwriteCLI/6.
|
|
19
|
+
'x-sdk-version': '6.2.2',
|
|
20
|
+
'user-agent' : `AppwriteCLI/6.2.2 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
21
21
|
'X-Appwrite-Response-Format' : '1.6.0',
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -208,7 +208,7 @@ class Client {
|
|
|
208
208
|
globalConfig.setCurrentSession('');
|
|
209
209
|
globalConfig.removeSession(current);
|
|
210
210
|
}
|
|
211
|
-
throw new AppwriteException(json.message, json.code, json.type,
|
|
211
|
+
throw new AppwriteException(json.message, json.code, json.type, text);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
if (responseType === "arraybuffer") {
|
package/lib/commands/account.js
CHANGED
|
@@ -1954,7 +1954,7 @@ account
|
|
|
1954
1954
|
|
|
1955
1955
|
account
|
|
1956
1956
|
.command(`create-push-target`)
|
|
1957
|
-
.description(
|
|
1957
|
+
.description(`Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.`)
|
|
1958
1958
|
.requiredOption(`--target-id <target-id>`, `Target 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.`)
|
|
1959
1959
|
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
1960
1960
|
.option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
|
|
@@ -1962,14 +1962,14 @@ account
|
|
|
1962
1962
|
|
|
1963
1963
|
account
|
|
1964
1964
|
.command(`update-push-target`)
|
|
1965
|
-
.description(
|
|
1965
|
+
.description(`Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.`)
|
|
1966
1966
|
.requiredOption(`--target-id <target-id>`, `Target ID.`)
|
|
1967
1967
|
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
|
|
1968
1968
|
.action(actionRunner(accountUpdatePushTarget))
|
|
1969
1969
|
|
|
1970
1970
|
account
|
|
1971
1971
|
.command(`delete-push-target`)
|
|
1972
|
-
.description(
|
|
1972
|
+
.description(`Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.`)
|
|
1973
1973
|
.requiredOption(`--target-id <target-id>`, `Target ID.`)
|
|
1974
1974
|
.action(actionRunner(accountDeletePushTarget))
|
|
1975
1975
|
|
|
@@ -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.
|
|
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.`)
|
|
@@ -75,7 +75,7 @@ const assistantChat = async ({prompt,parseOutput = true, overrideForCli = false,
|
|
|
75
75
|
|
|
76
76
|
assistant
|
|
77
77
|
.command(`chat`)
|
|
78
|
-
.description(
|
|
78
|
+
.description(`Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. `)
|
|
79
79
|
.requiredOption(`--prompt <prompt>`, `Prompt. A string containing questions asked to the AI assistant.`)
|
|
80
80
|
.action(actionRunner(assistantChat))
|
|
81
81
|
|
|
@@ -2126,7 +2126,7 @@ databases
|
|
|
2126
2126
|
|
|
2127
2127
|
databases
|
|
2128
2128
|
.command(`get-usage`)
|
|
2129
|
-
.description(
|
|
2129
|
+
.description(`Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
2130
2130
|
.option(`--range <range>`, `'Date range.`)
|
|
2131
2131
|
.action(actionRunner(databasesGetUsage))
|
|
2132
2132
|
|
|
@@ -2558,7 +2558,7 @@ databases
|
|
|
2558
2558
|
|
|
2559
2559
|
databases
|
|
2560
2560
|
.command(`get-collection-usage`)
|
|
2561
|
-
.description(
|
|
2561
|
+
.description(`Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
2562
2562
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2563
2563
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
2564
2564
|
.option(`--range <range>`, `Date range.`)
|
|
@@ -2573,7 +2573,7 @@ databases
|
|
|
2573
2573
|
|
|
2574
2574
|
databases
|
|
2575
2575
|
.command(`get-database-usage`)
|
|
2576
|
-
.description(
|
|
2576
|
+
.description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
|
|
2577
2577
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2578
2578
|
.option(`--range <range>`, `'Date range.`)
|
|
2579
2579
|
.option(`--console`, `Get the resource console url`)
|
|
@@ -1420,7 +1420,7 @@ functions
|
|
|
1420
1420
|
|
|
1421
1421
|
functions
|
|
1422
1422
|
.command(`get-usage`)
|
|
1423
|
-
.description(
|
|
1423
|
+
.description(`Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
|
|
1424
1424
|
.option(`--range <range>`, `Date range.`)
|
|
1425
1425
|
.action(actionRunner(functionsGetUsage))
|
|
1426
1426
|
|
|
@@ -1503,7 +1503,7 @@ functions
|
|
|
1503
1503
|
|
|
1504
1504
|
functions
|
|
1505
1505
|
.command(`create-build`)
|
|
1506
|
-
.description(
|
|
1506
|
+
.description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`)
|
|
1507
1507
|
.requiredOption(`--function-id <function-id>`, `Function ID.`)
|
|
1508
1508
|
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
1509
1509
|
.option(`--build-id <build-id>`, `Build unique ID.`)
|
|
@@ -1511,7 +1511,7 @@ functions
|
|
|
1511
1511
|
|
|
1512
1512
|
functions
|
|
1513
1513
|
.command(`update-deployment-build`)
|
|
1514
|
-
.description(
|
|
1514
|
+
.description(`Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.`)
|
|
1515
1515
|
.requiredOption(`--function-id <function-id>`, `Function ID.`)
|
|
1516
1516
|
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
1517
1517
|
.action(actionRunner(functionsUpdateDeploymentBuild))
|
|
@@ -1563,7 +1563,7 @@ functions
|
|
|
1563
1563
|
|
|
1564
1564
|
functions
|
|
1565
1565
|
.command(`get-function-usage`)
|
|
1566
|
-
.description(
|
|
1566
|
+
.description(`Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
|
|
1567
1567
|
.requiredOption(`--function-id <function-id>`, `Function ID.`)
|
|
1568
1568
|
.option(`--range <range>`, `Date range.`)
|
|
1569
1569
|
.option(`--console`, `Get the resource console url`)
|
package/lib/commands/init.js
CHANGED
|
@@ -254,16 +254,19 @@ const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,cont
|
|
|
254
254
|
* @property {string[]} topics List of Topic IDs.
|
|
255
255
|
* @property {string[]} users List of User IDs.
|
|
256
256
|
* @property {string[]} targets List of Targets IDs.
|
|
257
|
-
* @property {object} data Additional
|
|
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
|
|
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 {
|
|
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.
|
|
267
270
|
* @property {boolean} overrideForCli
|
|
268
271
|
* @property {boolean} parseOutput
|
|
269
272
|
* @property {libClient | undefined} sdk
|
|
@@ -272,7 +275,7 @@ const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,cont
|
|
|
272
275
|
/**
|
|
273
276
|
* @param {MessagingCreatePushRequestParams} params
|
|
274
277
|
*/
|
|
275
|
-
const messagingCreatePush = async ({messageId,title,body,topics,users,targets,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
278
|
+
const messagingCreatePush = async ({messageId,title,body,topics,users,targets,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
276
279
|
let client = !sdk ? await sdkForProject() :
|
|
277
280
|
sdk;
|
|
278
281
|
let apiPath = '/messaging/messages/push';
|
|
@@ -328,6 +331,15 @@ const messagingCreatePush = async ({messageId,title,body,topics,users,targets,da
|
|
|
328
331
|
if (typeof scheduledAt !== 'undefined') {
|
|
329
332
|
payload['scheduledAt'] = scheduledAt;
|
|
330
333
|
}
|
|
334
|
+
if (typeof contentAvailable !== 'undefined') {
|
|
335
|
+
payload['contentAvailable'] = contentAvailable;
|
|
336
|
+
}
|
|
337
|
+
if (typeof critical !== 'undefined') {
|
|
338
|
+
payload['critical'] = critical;
|
|
339
|
+
}
|
|
340
|
+
if (typeof priority !== 'undefined') {
|
|
341
|
+
payload['priority'] = priority;
|
|
342
|
+
}
|
|
331
343
|
|
|
332
344
|
let response = undefined;
|
|
333
345
|
|
|
@@ -361,6 +373,9 @@ const messagingCreatePush = async ({messageId,title,body,topics,users,targets,da
|
|
|
361
373
|
* @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.
|
|
364
379
|
* @property {boolean} overrideForCli
|
|
365
380
|
* @property {boolean} parseOutput
|
|
366
381
|
* @property {libClient | undefined} sdk
|
|
@@ -369,7 +384,7 @@ const messagingCreatePush = async ({messageId,title,body,topics,users,targets,da
|
|
|
369
384
|
/**
|
|
370
385
|
* @param {MessagingUpdatePushRequestParams} params
|
|
371
386
|
*/
|
|
372
|
-
const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
387
|
+
const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
373
388
|
let client = !sdk ? await sdkForProject() :
|
|
374
389
|
sdk;
|
|
375
390
|
let apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
|
|
@@ -422,6 +437,15 @@ const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,da
|
|
|
422
437
|
if (typeof scheduledAt !== 'undefined') {
|
|
423
438
|
payload['scheduledAt'] = scheduledAt;
|
|
424
439
|
}
|
|
440
|
+
if (typeof contentAvailable !== 'undefined') {
|
|
441
|
+
payload['contentAvailable'] = contentAvailable;
|
|
442
|
+
}
|
|
443
|
+
if (typeof critical !== 'undefined') {
|
|
444
|
+
payload['critical'] = critical;
|
|
445
|
+
}
|
|
446
|
+
if (typeof priority !== 'undefined') {
|
|
447
|
+
payload['priority'] = priority;
|
|
448
|
+
}
|
|
425
449
|
|
|
426
450
|
let response = undefined;
|
|
427
451
|
|
|
@@ -2435,7 +2459,7 @@ messaging
|
|
|
2435
2459
|
|
|
2436
2460
|
messaging
|
|
2437
2461
|
.command(`update-email`)
|
|
2438
|
-
.description(`Update an email message by its unique ID. `)
|
|
2462
|
+
.description(`Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
|
|
2439
2463
|
.requiredOption(`--message-id <message-id>`, `Message ID.`)
|
|
2440
2464
|
.option(`--topics [topics...]`, `List of Topic IDs.`)
|
|
2441
2465
|
.option(`--users [users...]`, `List of User IDs.`)
|
|
@@ -2454,26 +2478,29 @@ messaging
|
|
|
2454
2478
|
.command(`create-push`)
|
|
2455
2479
|
.description(`Create a new push notification.`)
|
|
2456
2480
|
.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
|
-
.
|
|
2458
|
-
.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
2475
2502
|
.command(`update-push`)
|
|
2476
|
-
.description(`Update a push notification by its unique ID. `)
|
|
2503
|
+
.description(`Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
|
|
2477
2504
|
.requiredOption(`--message-id <message-id>`, `Message ID.`)
|
|
2478
2505
|
.option(`--topics [topics...]`, `List of Topic IDs.`)
|
|
2479
2506
|
.option(`--users [users...]`, `List of User IDs.`)
|
|
@@ -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.`)
|
|
2493
2523
|
.action(actionRunner(messagingUpdatePush))
|
|
2494
2524
|
|
|
2495
2525
|
messaging
|
|
@@ -2506,7 +2536,7 @@ messaging
|
|
|
2506
2536
|
|
|
2507
2537
|
messaging
|
|
2508
2538
|
.command(`update-sms`)
|
|
2509
|
-
.description(`Update an
|
|
2539
|
+
.description(`Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
|
|
2510
2540
|
.requiredOption(`--message-id <message-id>`, `Message ID.`)
|
|
2511
2541
|
.option(`--topics [topics...]`, `List of Topic IDs.`)
|
|
2512
2542
|
.option(`--users [users...]`, `List of User IDs.`)
|