Skip to content

Commit

Permalink
Merge pull request #103 from appwrite/dev
Browse files Browse the repository at this point in the history
Add pagination + scaling timeouts for database deploys
  • Loading branch information
christyjacob4 authored Nov 20, 2023
2 parents b0b59ee + 8522fe6 commit ae7f9fe
Show file tree
Hide file tree
Showing 28 changed files with 548 additions and 211 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Command Line SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down Expand Up @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using

```sh
$ appwrite -v
4.1.0
4.2.0
```

### Install using prebuilt binaries
Expand Down Expand Up @@ -63,7 +63,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
Once the installation completes, you can verify your install using
```
$ appwrite -v
4.1.0
4.2.0
```

## Getting Started
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/health/get-queue-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appwrite health getQueueBuilds \

3 changes: 2 additions & 1 deletion docs/examples/health/get-queue-certificates.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
appwrite health getQueueCertificates
appwrite health getQueueCertificates \

3 changes: 3 additions & 0 deletions docs/examples/health/get-queue-databases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
appwrite health getQueueDatabases \


2 changes: 2 additions & 0 deletions docs/examples/health/get-queue-deletes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appwrite health getQueueDeletes \

3 changes: 2 additions & 1 deletion docs/examples/health/get-queue-functions.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
appwrite health getQueueFunctions
appwrite health getQueueFunctions \

3 changes: 2 additions & 1 deletion docs/examples/health/get-queue-logs.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
appwrite health getQueueLogs
appwrite health getQueueLogs \

2 changes: 2 additions & 0 deletions docs/examples/health/get-queue-mails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appwrite health getQueueMails \

2 changes: 2 additions & 0 deletions docs/examples/health/get-queue-messaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appwrite health getQueueMessaging \

2 changes: 2 additions & 0 deletions docs/examples/health/get-queue-migrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appwrite health getQueueMigrations \

3 changes: 2 additions & 1 deletion docs/examples/health/get-queue-webhooks.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
appwrite health getQueueWebhooks
appwrite health getQueueWebhooks \

4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# You can use "View source" of this page to see the full script.

# REPO
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.1.0/appwrite-cli-win-arm64.exe"
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.0/appwrite-cli-win-arm64.exe"

$APPWRITE_BINARY_NAME = "appwrite.exe"

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ printSuccess() {
downloadBinary() {
echo "[2/4] Downloading executable for $OS ($ARCH) ..."

GITHUB_LATEST_VERSION="4.1.0"
GITHUB_LATEST_VERSION="4.2.0"
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"

Expand Down
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Client {
'x-sdk-name': 'Command Line',
'x-sdk-platform': 'console',
'x-sdk-language': 'cli',
'x-sdk-version': '4.1.0',
'user-agent' : `AppwriteCLI/4.1.0 (${os.type()} ${os.version()}; ${os.arch()})`,
'x-sdk-version': '4.2.0',
'user-agent' : `AppwriteCLI/4.2.0 (${os.type()} ${os.version()}; ${os.arch()})`,
'X-Appwrite-Response-Format' : '1.4.0',
};
}
Expand Down
28 changes: 14 additions & 14 deletions lib/commands/account.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/commands/avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const avatarsGetQR = async ({ text, size, margin, download, parseOutput = true,

avatars
.command(`getBrowser`)
.description(`You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.`)
.description(`You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.`)
.requiredOption(`--code <code>`, `Browser Code.`)
.option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
.option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
Expand All @@ -299,7 +299,7 @@ avatars

avatars
.command(`getFlag`)
.description(`You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. `)
.description(`You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. `)
.requiredOption(`--code <code>`, `Country Code. ISO Alpha-2 country code format.`)
.option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
.option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
Expand Down
20 changes: 10 additions & 10 deletions lib/commands/databases.js
Original file line number Diff line number Diff line change
Expand Up @@ -1699,12 +1699,12 @@ databases

databases
.command(`createCollection`)
.description(`Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console.`)
.description(`Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`)
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
.requiredOption(`--collectionId <collectionId>`, `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.`)
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).`)
.option(`--documentSecurity <documentSecurity>`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).`, parseBool)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
.option(`--documentSecurity <documentSecurity>`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, parseBool)
.option(`--enabled <enabled>`, `Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.`, parseBool)
.action(actionRunner(databasesCreateCollection))

Expand All @@ -1721,8 +1721,8 @@ databases
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).`)
.option(`--documentSecurity <documentSecurity>`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).`, parseBool)
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
.option(`--documentSecurity <documentSecurity>`, `Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).`, parseBool)
.option(`--enabled <enabled>`, `Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.`, parseBool)
.action(actionRunner(databasesUpdateCollection))

Expand Down Expand Up @@ -1900,7 +1900,7 @@ databases

databases
.command(`createRelationshipAttribute`)
.description(`Create relationship attribute. [Learn more about relationship attributes](/docs/databases-relationships#relationship-attributes). `)
.description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
.requiredOption(`--relatedCollectionId <relatedCollectionId>`, `Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
Expand Down Expand Up @@ -1973,7 +1973,7 @@ databases

databases
.command(`updateRelationshipAttribute`)
.description(`Update relationship attribute. [Learn more about relationship attributes](/docs/databases-relationships#relationship-attributes). `)
.description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
.requiredOption(`--key <key>`, `Attribute Key.`)
Expand All @@ -1990,12 +1990,12 @@ databases

databases
.command(`createDocument`)
.description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/databases#databasesCreateCollection) API or directly from your database console.`)
.description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`)
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`)
.requiredOption(`--documentId <documentId>`, `Document 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.`)
.requiredOption(`--data <data>`, `Document data as JSON object.`)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).`)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
.action(actionRunner(databasesCreateDocument))

databases
Expand All @@ -2014,7 +2014,7 @@ databases
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
.requiredOption(`--documentId <documentId>`, `Document ID.`)
.option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).`)
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
.action(actionRunner(databasesUpdateDocument))

databases
Expand Down
Loading

0 comments on commit ae7f9fe

Please sign in to comment.