Skip to content

Commit e2eebe6

Browse files
Merge pull request #159 from appwrite/dev
chore: regenerate sdks
2 parents 91bea6e + 39709b9 commit e2eebe6

23 files changed

+166
-101
lines changed

.github/workflows/npm-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup binfmt with QEMU
1515
run: |
1616
sudo apt update
17-
sudo apt install qemu-system binfmt-support qemu-user-static
17+
sudo apt install qemu binfmt-support qemu-user-static
1818
update-binfmts --display
1919
- name: Setup ldid
2020
run: |

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
2929

3030
```sh
3131
$ appwrite -v
32-
6.2.0
32+
6.2.1
3333
```
3434

3535
### Install using prebuilt binaries
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
6060
Once the installation completes, you can verify your install using
6161
```
6262
$ appwrite -v
63-
6.2.0
63+
6.2.1
6464
```
6565

6666
## Getting Started

install.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# You can use "View source" of this page to see the full script.
1414

1515
# REPO
16-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-x64.exe"
17-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-arm64.exe"
16+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.1/appwrite-cli-win-x64.exe"
17+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.1/appwrite-cli-win-arm64.exe"
1818

1919
$APPWRITE_BINARY_NAME = "appwrite.exe"
2020

install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ printSuccess() {
9797
downloadBinary() {
9898
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
9999

100-
GITHUB_LATEST_VERSION="6.2.0"
100+
GITHUB_LATEST_VERSION="6.2.1"
101101
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
102102
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
103103

lib/client.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class Client {
1616
'x-sdk-name': 'Command Line',
1717
'x-sdk-platform': 'console',
1818
'x-sdk-language': 'cli',
19-
'x-sdk-version': '6.2.0',
20-
'user-agent' : `AppwriteCLI/6.2.0 (${os.type()} ${os.version()}; ${os.arch()})`,
19+
'x-sdk-version': '6.2.1',
20+
'user-agent' : `AppwriteCLI/6.2.1 (${os.type()} ${os.version()}; ${os.arch()})`,
2121
'X-Appwrite-Response-Format' : '1.6.0',
2222
};
2323
}

lib/commands/account.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1954,22 +1954,22 @@ account
19541954

19551955
account
19561956
.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.`)
19581958
.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.`)
19591959
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
19601960
.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.`)
19611961
.action(actionRunner(accountCreatePushTarget))
19621962

19631963
account
19641964
.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.`)
19661966
.requiredOption(`--target-id <target-id>`, `Target ID.`)
19671967
.requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
19681968
.action(actionRunner(accountUpdatePushTarget))
19691969

19701970
account
19711971
.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.`)
19731973
.requiredOption(`--target-id <target-id>`, `Target ID.`)
19741974
.action(actionRunner(accountDeletePushTarget))
19751975

lib/commands/assistant.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const assistantChat = async ({prompt,parseOutput = true, overrideForCli = false,
7575

7676
assistant
7777
.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. `)
7979
.requiredOption(`--prompt <prompt>`, `Prompt. A string containing questions asked to the AI assistant.`)
8080
.action(actionRunner(assistantChat))
8181

lib/commands/databases.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,7 @@ databases
21262126

21272127
databases
21282128
.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.`)
21302130
.option(`--range <range>`, `'Date range.`)
21312131
.action(actionRunner(databasesGetUsage))
21322132

@@ -2558,7 +2558,7 @@ databases
25582558

25592559
databases
25602560
.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.`)
25622562
.requiredOption(`--database-id <database-id>`, `Database ID.`)
25632563
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
25642564
.option(`--range <range>`, `Date range.`)
@@ -2573,7 +2573,7 @@ databases
25732573

25742574
databases
25752575
.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.`)
25772577
.requiredOption(`--database-id <database-id>`, `Database ID.`)
25782578
.option(`--range <range>`, `'Date range.`)
25792579
.option(`--console`, `Get the resource console url`)

lib/commands/functions.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ functions
14201420

14211421
functions
14221422
.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.`)
14241424
.option(`--range <range>`, `Date range.`)
14251425
.action(actionRunner(functionsGetUsage))
14261426

@@ -1503,15 +1503,15 @@ functions
15031503

15041504
functions
15051505
.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.`)
15071507
.requiredOption(`--function-id <function-id>`, `Function ID.`)
15081508
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
15091509
.option(`--build-id <build-id>`, `Build unique ID.`)
15101510
.action(actionRunner(functionsCreateBuild))
15111511

15121512
functions
15131513
.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.`)
15151515
.requiredOption(`--function-id <function-id>`, `Function ID.`)
15161516
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
15171517
.action(actionRunner(functionsUpdateDeploymentBuild))
@@ -1563,7 +1563,7 @@ functions
15631563

15641564
functions
15651565
.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.`)
15671567
.requiredOption(`--function-id <function-id>`, `Function ID.`)
15681568
.option(`--range <range>`, `Date range.`)
15691569
.option(`--console`, `Get the resource console url`)

lib/commands/messaging.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,7 @@ messaging
24592459

24602460
messaging
24612461
.command(`update-email`)
2462-
.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. `)
24632463
.requiredOption(`--message-id <message-id>`, `Message ID.`)
24642464
.option(`--topics [topics...]`, `List of Topic IDs.`)
24652465
.option(`--users [users...]`, `List of User IDs.`)
@@ -2500,7 +2500,7 @@ messaging
25002500

25012501
messaging
25022502
.command(`update-push`)
2503-
.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. `)
25042504
.requiredOption(`--message-id <message-id>`, `Message ID.`)
25052505
.option(`--topics [topics...]`, `List of Topic IDs.`)
25062506
.option(`--users [users...]`, `List of User IDs.`)
@@ -2536,7 +2536,7 @@ messaging
25362536

25372537
messaging
25382538
.command(`update-sms`)
2539-
.description(`Update an email message by its unique ID. `)
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. `)
25402540
.requiredOption(`--message-id <message-id>`, `Message ID.`)
25412541
.option(`--topics [topics...]`, `List of Topic IDs.`)
25422542
.option(`--users [users...]`, `List of User IDs.`)

lib/commands/migrations.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -584,14 +584,14 @@ const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli
584584

585585
migrations
586586
.command(`list`)
587-
.description(``)
587+
.description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
588588
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
589589
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
590590
.action(actionRunner(migrationsList))
591591

592592
migrations
593593
.command(`create-appwrite-migration`)
594-
.description(``)
594+
.description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
595595
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
596596
.requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
597597
.requiredOption(`--project-id <project-id>`, `Source's Project ID`)
@@ -600,7 +600,7 @@ migrations
600600

601601
migrations
602602
.command(`get-appwrite-report`)
603-
.description(``)
603+
.description(`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
604604
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
605605
.requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
606606
.requiredOption(`--project-id <project-id>`, `Source's Project ID`)
@@ -609,21 +609,21 @@ migrations
609609

610610
migrations
611611
.command(`create-firebase-migration`)
612-
.description(``)
612+
.description(`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `)
613613
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
614614
.requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
615615
.action(actionRunner(migrationsCreateFirebaseMigration))
616616

617617
migrations
618618
.command(`get-firebase-report`)
619-
.description(``)
619+
.description(`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
620620
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
621621
.requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
622622
.action(actionRunner(migrationsGetFirebaseReport))
623623

624624
migrations
625625
.command(`create-n-host-migration`)
626-
.description(``)
626+
.description(`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `)
627627
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
628628
.requiredOption(`--subdomain <subdomain>`, `Source's Subdomain`)
629629
.requiredOption(`--region <region>`, `Source's Region`)
@@ -636,7 +636,7 @@ migrations
636636

637637
migrations
638638
.command(`get-n-host-report`)
639-
.description(``)
639+
.description(`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
640640
.requiredOption(`--resources [resources...]`, `List of resources to migrate.`)
641641
.requiredOption(`--subdomain <subdomain>`, `Source's Subdomain.`)
642642
.requiredOption(`--region <region>`, `Source's Region.`)
@@ -649,7 +649,7 @@ migrations
649649

650650
migrations
651651
.command(`create-supabase-migration`)
652-
.description(``)
652+
.description(`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `)
653653
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
654654
.requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint`)
655655
.requiredOption(`--api-key <api-key>`, `Source's API Key`)
@@ -661,7 +661,7 @@ migrations
661661

662662
migrations
663663
.command(`get-supabase-report`)
664-
.description(``)
664+
.description(`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
665665
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
666666
.requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint.`)
667667
.requiredOption(`--api-key <api-key>`, `Source's API Key.`)
@@ -673,19 +673,19 @@ migrations
673673

674674
migrations
675675
.command(`get`)
676-
.description(``)
676+
.description(`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `)
677677
.requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
678678
.action(actionRunner(migrationsGet))
679679

680680
migrations
681681
.command(`retry`)
682-
.description(``)
682+
.description(`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`)
683683
.requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
684684
.action(actionRunner(migrationsRetry))
685685

686686
migrations
687687
.command(`delete`)
688-
.description(``)
688+
.description(`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `)
689689
.requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
690690
.action(actionRunner(migrationsDelete))
691691

lib/commands/organizations.js

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
const { sdkForProject } = require('../sdks')
2+
const { parse } = require('../parser')
3+
const { showConsoleLink } = require('../utils.js');
4+
5+
/**
6+
* @typedef {Object} OrganizationsListRequestParams
7+
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan
8+
* @property {string} search Search term to filter your list results. Max length: 256 chars.
9+
* @property {boolean} parseOutput
10+
* @property {libClient | undefined} sdk
11+
*/
12+
13+
/**
14+
* @param {OrganizationsListRequestParams} params
15+
*/
16+
const organizationsList = async ({queries, search, parseOutput = true, sdk = undefined, console}) => {
17+
let client = !sdk ? await sdkForProject() :
18+
sdk;
19+
let apiPath = '/organizations';
20+
let payload = {};
21+
if (typeof queries !== 'undefined') {
22+
payload['queries'] = queries;
23+
}
24+
if (typeof search !== 'undefined') {
25+
payload['search'] = search;
26+
}
27+
28+
let response = undefined;
29+
30+
response = await client.call('get', apiPath, {
31+
'content-type': 'application/json',
32+
}, payload);
33+
34+
if (parseOutput) {
35+
if(console) {
36+
showConsoleLink('organizations', 'list');
37+
} else {
38+
parse(response)
39+
}
40+
}
41+
42+
return response;
43+
44+
}
45+
46+
module.exports = {
47+
organizationsList
48+
}

lib/commands/project.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const projectDeleteVariable = async ({variableId,parseOutput = true, overrideFor
252252

253253
project
254254
.command(`get-usage`)
255-
.description(``)
255+
.description(`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`)
256256
.requiredOption(`--start-date <start-date>`, `Starting date for the usage`)
257257
.requiredOption(`--end-date <end-date>`, `End date for the usage`)
258258
.option(`--period <period>`, `Period used`)

0 commit comments

Comments
 (0)