appwrite-cli 4.0.0 → 4.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 +3 -3
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -1
- package/docs/examples/health/get-queue-databases.md +3 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -1
- package/docs/examples/health/get-queue-logs.md +2 -1
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -1
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/account.js +14 -14
- package/lib/commands/avatars.js +2 -2
- package/lib/commands/databases.js +10 -10
- package/lib/commands/deploy.js +170 -99
- package/lib/commands/functions.js +3 -3
- package/lib/commands/health.js +217 -4
- package/lib/commands/init.js +11 -23
- package/lib/commands/storage.js +16 -16
- package/lib/commands/teams.js +5 -5
- package/lib/commands/users.js +9 -9
- package/lib/paginate.js +51 -0
- package/lib/questions.js +12 -10
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
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
|
-
4.
|
|
32
|
+
4.2.0
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -63,7 +63,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
63
63
|
Once the installation completes, you can verify your install using
|
|
64
64
|
```
|
|
65
65
|
$ appwrite -v
|
|
66
|
-
4.
|
|
66
|
+
4.2.0
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Getting Started
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
appwrite health getQueueCertificates
|
|
1
|
+
appwrite health getQueueCertificates \
|
|
2
|
+
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
appwrite health getQueueFunctions
|
|
1
|
+
appwrite health getQueueFunctions \
|
|
2
|
+
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
appwrite health getQueueLogs
|
|
1
|
+
appwrite health getQueueLogs \
|
|
2
|
+
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
appwrite health getQueueWebhooks
|
|
1
|
+
appwrite health getQueueWebhooks \
|
|
2
|
+
|
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/4.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.0/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/4.2.0/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="4.
|
|
100
|
+
GITHUB_LATEST_VERSION="4.2.0"
|
|
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': '4.
|
|
20
|
-
'user-agent' : `AppwriteCLI/4.
|
|
19
|
+
'x-sdk-version': '4.2.0',
|
|
20
|
+
'user-agent' : `AppwriteCLI/4.2.0 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
21
21
|
'X-Appwrite-Response-Format' : '1.4.0',
|
|
22
22
|
};
|
|
23
23
|
}
|
package/lib/commands/account.js
CHANGED
|
@@ -815,7 +815,7 @@ account
|
|
|
815
815
|
|
|
816
816
|
account
|
|
817
817
|
.command(`create`)
|
|
818
|
-
.description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#
|
|
818
|
+
.description(`Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).`)
|
|
819
819
|
.requiredOption(`--userId <userId>`, `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.`)
|
|
820
820
|
.requiredOption(`--email <email>`, `User email.`)
|
|
821
821
|
.requiredOption(`--password <password>`, `New user password. Must be at least 8 chars.`)
|
|
@@ -867,7 +867,7 @@ account
|
|
|
867
867
|
|
|
868
868
|
account
|
|
869
869
|
.command(`updatePhone`)
|
|
870
|
-
.description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](/docs/client/account#
|
|
870
|
+
.description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`)
|
|
871
871
|
.requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
872
872
|
.requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
|
|
873
873
|
.action(actionRunner(accountUpdatePhone))
|
|
@@ -885,14 +885,14 @@ account
|
|
|
885
885
|
|
|
886
886
|
account
|
|
887
887
|
.command(`createRecovery`)
|
|
888
|
-
.description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#
|
|
888
|
+
.description(`Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.`)
|
|
889
889
|
.requiredOption(`--email <email>`, `User email.`)
|
|
890
890
|
.requiredOption(`--url <url>`, `URL to redirect the user back to your app from the recovery email. 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.`)
|
|
891
891
|
.action(actionRunner(accountCreateRecovery))
|
|
892
892
|
|
|
893
893
|
account
|
|
894
894
|
.command(`updateRecovery`)
|
|
895
|
-
.description(`Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#
|
|
895
|
+
.description(`Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`)
|
|
896
896
|
.requiredOption(`--userId <userId>`, `User ID.`)
|
|
897
897
|
.requiredOption(`--secret <secret>`, `Valid reset token.`)
|
|
898
898
|
.requiredOption(`--password <password>`, `New user password. Must be at least 8 chars.`)
|
|
@@ -911,19 +911,19 @@ account
|
|
|
911
911
|
|
|
912
912
|
account
|
|
913
913
|
.command(`createAnonymousSession`)
|
|
914
|
-
.description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#
|
|
914
|
+
.description(`Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail) or create an [OAuth2 session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).`)
|
|
915
915
|
.action(actionRunner(accountCreateAnonymousSession))
|
|
916
916
|
|
|
917
917
|
account
|
|
918
918
|
.command(`createEmailSession`)
|
|
919
|
-
.description(`Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](/docs/authentication-security#limits).`)
|
|
919
|
+
.description(`Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. 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).`)
|
|
920
920
|
.requiredOption(`--email <email>`, `User email.`)
|
|
921
921
|
.requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`)
|
|
922
922
|
.action(actionRunner(accountCreateEmailSession))
|
|
923
923
|
|
|
924
924
|
account
|
|
925
925
|
.command(`createMagicURLSession`)
|
|
926
|
-
.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 [PUT /account/sessions/magic-url](/docs/client/account#
|
|
926
|
+
.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 [PUT /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession) 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). `)
|
|
927
927
|
.requiredOption(`--userId <userId>`, `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.`)
|
|
928
928
|
.requiredOption(`--email <email>`, `User email.`)
|
|
929
929
|
.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.`)
|
|
@@ -931,14 +931,14 @@ account
|
|
|
931
931
|
|
|
932
932
|
account
|
|
933
933
|
.command(`updateMagicURLSession`)
|
|
934
|
-
.description(`Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#
|
|
934
|
+
.description(`Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession) endpoint. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.`)
|
|
935
935
|
.requiredOption(`--userId <userId>`, `User ID.`)
|
|
936
936
|
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
937
937
|
.action(actionRunner(accountUpdateMagicURLSession))
|
|
938
938
|
|
|
939
939
|
account
|
|
940
940
|
.command(`createOAuth2Session`)
|
|
941
|
-
.description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](/docs/authentication-security#limits). `)
|
|
941
|
+
.description(`Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed. If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user. 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). `)
|
|
942
942
|
.requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.`)
|
|
943
943
|
.option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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.`)
|
|
944
944
|
.option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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.`)
|
|
@@ -947,14 +947,14 @@ account
|
|
|
947
947
|
|
|
948
948
|
account
|
|
949
949
|
.command(`createPhoneSession`)
|
|
950
|
-
.description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/phone](/docs/client/account#
|
|
950
|
+
.description(`Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes. 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).`)
|
|
951
951
|
.requiredOption(`--userId <userId>`, `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.`)
|
|
952
952
|
.requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
953
953
|
.action(actionRunner(accountCreatePhoneSession))
|
|
954
954
|
|
|
955
955
|
account
|
|
956
956
|
.command(`updatePhoneSession`)
|
|
957
|
-
.description(`Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](/docs/client/account#
|
|
957
|
+
.description(`Use this endpoint to complete creating a session with SMS. Use the **userId** from the [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession) endpoint and the **secret** received via SMS to successfully update and confirm the phone session.`)
|
|
958
958
|
.requiredOption(`--userId <userId>`, `User ID.`)
|
|
959
959
|
.requiredOption(`--secret <secret>`, `Valid verification token.`)
|
|
960
960
|
.action(actionRunner(accountUpdatePhoneSession))
|
|
@@ -973,7 +973,7 @@ account
|
|
|
973
973
|
|
|
974
974
|
account
|
|
975
975
|
.command(`deleteSession`)
|
|
976
|
-
.description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](/docs/client/account#
|
|
976
|
+
.description(`Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.`)
|
|
977
977
|
.requiredOption(`--sessionId <sessionId>`, `Session ID. Use the string 'current' to delete the current device session.`)
|
|
978
978
|
.action(actionRunner(accountDeleteSession))
|
|
979
979
|
|
|
@@ -984,7 +984,7 @@ account
|
|
|
984
984
|
|
|
985
985
|
account
|
|
986
986
|
.command(`createVerification`)
|
|
987
|
-
.description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#
|
|
987
|
+
.description(`Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days. Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. `)
|
|
988
988
|
.requiredOption(`--url <url>`, `URL to redirect the user back to your app from the verification email. 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.`)
|
|
989
989
|
.action(actionRunner(accountCreateVerification))
|
|
990
990
|
|
|
@@ -997,7 +997,7 @@ account
|
|
|
997
997
|
|
|
998
998
|
account
|
|
999
999
|
.command(`createPhoneVerification`)
|
|
1000
|
-
.description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](/docs/client/account#
|
|
1000
|
+
.description(`Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.`)
|
|
1001
1001
|
.action(actionRunner(accountCreatePhoneVerification))
|
|
1002
1002
|
|
|
1003
1003
|
account
|
package/lib/commands/avatars.js
CHANGED
|
@@ -272,7 +272,7 @@ const avatarsGetQR = async ({ text, size, margin, download, parseOutput = true,
|
|
|
272
272
|
|
|
273
273
|
avatars
|
|
274
274
|
.command(`getBrowser`)
|
|
275
|
-
.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#
|
|
275
|
+
.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.`)
|
|
276
276
|
.requiredOption(`--code <code>`, `Browser Code.`)
|
|
277
277
|
.option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
278
278
|
.option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
@@ -299,7 +299,7 @@ avatars
|
|
|
299
299
|
|
|
300
300
|
avatars
|
|
301
301
|
.command(`getFlag`)
|
|
302
|
-
.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](
|
|
302
|
+
.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. `)
|
|
303
303
|
.requiredOption(`--code <code>`, `Country Code. ISO Alpha-2 country code format.`)
|
|
304
304
|
.option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
305
305
|
.option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
@@ -1699,12 +1699,12 @@ databases
|
|
|
1699
1699
|
|
|
1700
1700
|
databases
|
|
1701
1701
|
.command(`createCollection`)
|
|
1702
|
-
.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.`)
|
|
1702
|
+
.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.`)
|
|
1703
1703
|
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1704
1704
|
.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.`)
|
|
1705
1705
|
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
1706
|
-
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).`)
|
|
1707
|
-
.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)
|
|
1706
|
+
.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).`)
|
|
1707
|
+
.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)
|
|
1708
1708
|
.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)
|
|
1709
1709
|
.action(actionRunner(databasesCreateCollection))
|
|
1710
1710
|
|
|
@@ -1721,8 +1721,8 @@ databases
|
|
|
1721
1721
|
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1722
1722
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
1723
1723
|
.requiredOption(`--name <name>`, `Collection name. Max length: 128 chars.`)
|
|
1724
|
-
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).`)
|
|
1725
|
-
.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)
|
|
1724
|
+
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
1725
|
+
.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)
|
|
1726
1726
|
.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)
|
|
1727
1727
|
.action(actionRunner(databasesUpdateCollection))
|
|
1728
1728
|
|
|
@@ -1900,7 +1900,7 @@ databases
|
|
|
1900
1900
|
|
|
1901
1901
|
databases
|
|
1902
1902
|
.command(`createRelationshipAttribute`)
|
|
1903
|
-
.description(`Create relationship attribute. [Learn more about relationship attributes](/docs/databases-relationships#relationship-attributes). `)
|
|
1903
|
+
.description(`Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
|
|
1904
1904
|
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1905
1905
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
1906
1906
|
.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).`)
|
|
@@ -1973,7 +1973,7 @@ databases
|
|
|
1973
1973
|
|
|
1974
1974
|
databases
|
|
1975
1975
|
.command(`updateRelationshipAttribute`)
|
|
1976
|
-
.description(`Update relationship attribute. [Learn more about relationship attributes](/docs/databases-relationships#relationship-attributes). `)
|
|
1976
|
+
.description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). `)
|
|
1977
1977
|
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1978
1978
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
1979
1979
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
@@ -1990,12 +1990,12 @@ databases
|
|
|
1990
1990
|
|
|
1991
1991
|
databases
|
|
1992
1992
|
.command(`createDocument`)
|
|
1993
|
-
.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.`)
|
|
1993
|
+
.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.`)
|
|
1994
1994
|
.requiredOption(`--databaseId <databaseId>`, `Database ID.`)
|
|
1995
1995
|
.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.`)
|
|
1996
1996
|
.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.`)
|
|
1997
1997
|
.requiredOption(`--data <data>`, `Document data as JSON object.`)
|
|
1998
|
-
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).`)
|
|
1998
|
+
.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).`)
|
|
1999
1999
|
.action(actionRunner(databasesCreateDocument))
|
|
2000
2000
|
|
|
2001
2001
|
databases
|
|
@@ -2014,7 +2014,7 @@ databases
|
|
|
2014
2014
|
.requiredOption(`--collectionId <collectionId>`, `Collection ID.`)
|
|
2015
2015
|
.requiredOption(`--documentId <documentId>`, `Document ID.`)
|
|
2016
2016
|
.option(`--data <data>`, `Document data as JSON object. Include only attribute and value pairs to be updated.`)
|
|
2017
|
-
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).`)
|
|
2017
|
+
.option(`--permissions [permissions...]`, `An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
2018
2018
|
.action(actionRunner(databasesUpdateDocument))
|
|
2019
2019
|
|
|
2020
2020
|
databases
|