From 938995badfc1f553dd22fe309ba740bfb13e917f Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Tue, 19 Sep 2023 14:39:08 +0000 Subject: [PATCH 1/8] Add events --- src/partials/auth-events.md | 32 ++++++++++ src/partials/databases-events.md | 22 +++++++ src/partials/functions-events.md | 16 +++++ src/partials/storage-events.md | 12 ++++ .../advanced/platform/events/+page.markdoc | 11 +++- .../advanced/platform/webhooks/+page.markdoc | 60 ++++++++++++++++++- 6 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 src/partials/auth-events.md create mode 100644 src/partials/databases-events.md create mode 100644 src/partials/functions-events.md create mode 100644 src/partials/storage-events.md diff --git a/src/partials/auth-events.md b/src/partials/auth-events.md new file mode 100644 index 0000000000..e7ebf909b4 --- /dev/null +++ b/src/partials/auth-events.md @@ -0,0 +1,32 @@ +## Authentication events {% #authentication-events %} + +| Name | Payload | Description | +|----------------------------------------|------------------------------------|-----------------------------------------------------| +| `teams.*` | [Team Object](/docs/models/team) | This event triggers on any teams event. | +| `teams.*.create` | [Team Object](/docs/models/team) | This event triggers when a team is created. | +| `teams.*.delete` | [Team Object](/docs/models/team) | This event triggers when a team is deleted. | +| `teams.*.memberships.*` | [Membership Object](/docs/models/membership) | This event triggers on any team memberships event. | +| `teams.*.memberships.*.create` | [Membership Object](/docs/models/membership) | This event triggers when a membership is created. | +| `teams.*.memberships.*.delete` | [Membership Object](/docs/models/membership) | This event triggers when a membership is deleted. | +| `teams.*.memberships.*.update` | [Membership Object](/docs/models/membership) | This event triggers when a membership is updated. | +| `teams.*.memberships.*.update.status` | [Membership Object](/docs/models/membership) | This event triggers when a team memberships status is updated. | +| `teams.*.update` | [Team Object](/docs/models/team) | This event triggers when a team is updated. | +| `teams.*.update.prefs` | [Team Object](/docs/models/team) | This event triggers when a team's preferences are updated. | +| `users.*` | [User Object](/docs/models/user) | This event triggers on any user's event. | +| `users.*.create` | [User Object](/docs/models/user) | This event triggers when a user is created. | +| `users.*.delete` | [User Object](/docs/models/user) | This event triggers when a user is deleted. | +| `users.*.recovery.*` | [Token Object](/docs/models/token) | This event triggers on any user's recovery token event. | +| `users.*.recovery.*.create` | [Token Object](/docs/models/token) | This event triggers when a recovery token for a user is created. | +| `users.*.recovery.*.update` | [Token Object](/docs/models/token) | This event triggers when a recovery token for a user is validated. | +| `users.*.sessions.*` | [Session Object](/docs/models/session) | This event triggers on any user's sessions event. | +| `users.*.sessions.*.create` | [Session Object](/docs/models/session) | This event triggers when a session for a user is created. | +| `users.*.sessions.*.delete` | [Session Object](/docs/models/session) | This event triggers when a session for a user is deleted. | +| `users.*.update` | [User Object](/docs/models/user) | This event triggers when a user is updated. | +| `users.*.update.email` | [User Object](/docs/models/user) | This event triggers when a user's email address is updated. | +| `users.*.update.name` | [User Object](/docs/models/user) | This event triggers when a user's name is updated. | +| `users.*.update.password` | [User Object](/docs/models/user) | This event triggers when a user's password is updated. | +| `users.*.update.prefs` | [User Object](/docs/models/user) | This event triggers when a user's preferences is updated. | +| `users.*.update.status` | [User Object](/docs/models/user) | This event triggers when a user's status is updated. | +| `users.*.verification.*` | [Token Object](/docs/models/token) | This event triggers on any user's verification token event. | +| `users.*.verification.*.create` | [Token Object](/docs/models/token) | This event triggers when a verification token for a user is created. | +| `users.*.verification.*.update` | [Token Object](/docs/models/token) | This event triggers when a verification token for a user is validated. | \ No newline at end of file diff --git a/src/partials/databases-events.md b/src/partials/databases-events.md new file mode 100644 index 0000000000..aa7e0a099b --- /dev/null +++ b/src/partials/databases-events.md @@ -0,0 +1,22 @@ +## Databases Service {% #databases-events %} + +| Name {% width=20 %} | Payload | Description | +| ----------------------------------------- | ------------------------------ | --------------------------------------- | +| `databases.*` | [Database Object](/docs/models/database) | This event triggers on any database event. | +| `databases.*.collections.*` | [Collection Object](/docs/models/collection) | This event triggers on any collection event. | +| `databases.*.collections.*.attributes.*` | [Attribute Object](/docs/models/attribute) | This event triggers on any attributes event. | +| `databases.*.collections.*.attributes.*.create` | [Attribute Object](/docs/models/attribute) | This event triggers when an attribute is created. | +| `databases.*.collections.*.attributes.*.delete` | [Attribute Object](/docs/models/attribute) | This event triggers when an attribute is deleted. | +| `databases.*.collections.*.create` | [Collection Object](/docs/models/collection) | This event triggers when a collection is created. | +| `databases.*.collections.*.delete` | [Collection Object](/docs/models/collection) | This event triggers when a collection is deleted. | +| `databases.*.collections.*.documents.*` | [Document Object](/docs/models/document) | This event triggers on any documents event. | +| `databases.*.collections.*.documents.*.create` | [Document Object](/docs/models/document) | This event triggers when a document is created. | +| `databases.*.collections.*.documents.*.delete` | [Document Object](/docs/models/document) | This event triggers when a document is deleted. | +| `databases.*.collections.*.documents.*.update` | [Document Object](/docs/models/document) | This event triggers when a document is updated. | +| `databases.*.collections.*.indexes.*` | [Index Object](/docs/models/index) | This event triggers on any indexes event. | +| `databases.*.collections.*.indexes.*.create` | [Index Object](/docs/models/index) | This event triggers when an index is created. | +| `databases.*.collections.*.indexes.*.delete` | [Index Object](/docs/models/index) | This event triggers when an index is deleted. | +| `databases.*.collections.*.update` | [Collection Object](/docs/models/collection) | This event triggers when a collection is updated. | +| `databases.*.create` | [Database Object](/docs/models/database) | This event triggers when a database is created. | +| `databases.*.delete` | [Database Object](/docs/models/database) | This event triggers when a database is deleted. | +| `databases.*.update` | [Database Object](/docs/models/database) | This event triggers when a database is updated. | diff --git a/src/partials/functions-events.md b/src/partials/functions-events.md new file mode 100644 index 0000000000..1dd42dde29 --- /dev/null +++ b/src/partials/functions-events.md @@ -0,0 +1,16 @@ +## Functions Service {% #functions-events %} + +| Name | Payload | Description | +| ------------------------------------------- | --------------------------------- | ----------------------------------------- | +| `functions.*` | [Function Object](/docs/models/function) | This event triggers on any functions event. | +| `functions.*.create` | [Function Object](/docs/models/function) | This event triggers when a function is created. | +| `functions.*.delete` | [Function Object](/docs/models/function) | This event triggers when a function is deleted. | +| `functions.*.deployments.*` | [Deployment Object](/docs/models/deployment) | This event triggers on any deployments event. | +| `functions.*.deployments.*.create` | [Deployment Object](/docs/models/deployment) | This event triggers when a deployment is created. | +| `functions.*.deployments.*.delete` | [Deployment Object](/docs/models/deployment) | This event triggers when a deployment is deleted. | +| `functions.*.deployments.*.update` | [Deployment Object](/docs/models/deployment) | This event triggers when a deployment is updated. | +| `functions.*.executions.*` | [Execution Object](/docs/models/execution) | This event triggers on any executions event. | +| `functions.*.executions.*.create` | [Execution Object](/docs/models/execution) | This event triggers when an execution is created. | +| `functions.*.executions.*.delete` | [Execution Object](/docs/models/execution) | This event triggers when an execution is deleted. | +| `functions.*.executions.*.update` | [Execution Object](/docs/models/execution) | This event triggers when an execution is updated. | +| `functions.*.update` | [Function Object](/docs/models/function) | This event triggers when a function is updated. | \ No newline at end of file diff --git a/src/partials/storage-events.md b/src/partials/storage-events.md new file mode 100644 index 0000000000..70813ae29b --- /dev/null +++ b/src/partials/storage-events.md @@ -0,0 +1,12 @@ +## Storage events {% ##storage-events %} + +| Name | Payload | Description | +|---------------------------------|-------------------------------------------------|----------------------------------------------| +| `buckets.*` | [Bucket Object](/docs/models/bucket) | This event triggers on any buckets event. | +| `buckets.*.create` | [Bucket Object](/docs/models/bucket) | This event triggers when a bucket is created.| +| `buckets.*.delete` | [Bucket Object](/docs/models/bucket) | This event triggers when a bucket is deleted.| +| `buckets.*.files.*` | [File Object](/docs/models/file) | This event triggers on any files event. | +| `buckets.*.files.*.create` | [File Object](/docs/models/file) | This event triggers when a file is created. | +| `buckets.*.files.*.delete` | [File Object](/docs/models/file) | This event triggers when a file is deleted. | +| `buckets.*.files.*.update` | [File Object](/docs/models/file) | This event triggers when a file is updated. | +| `buckets.*.update` | [Bucket Object](/docs/models/bucket) | This event triggers when a bucket is updated.| \ No newline at end of file diff --git a/src/routes/docs/advanced/platform/events/+page.markdoc b/src/routes/docs/advanced/platform/events/+page.markdoc index 91acaa412a..2423dee4e3 100644 --- a/src/routes/docs/advanced/platform/events/+page.markdoc +++ b/src/routes/docs/advanced/platform/events/+page.markdoc @@ -12,10 +12,17 @@ You can subscribe to events for specific resources using their ID or subscribe t You can also filter for events of specific actions like create, update, or delete. You can find a list of events for Storage, Databases, Functions, and Authentication services below. -[TODO: Need to add events here.] +{% partial file="auth-events.md" /%} -## Known limitations +{% partial file="databases-events.md" /%} + +{% partial file="storage-events.md" /%} + +{% partial file="functions-events.md" /%} + + +## Known limitations {% known-limitations %} When events fire, only existing subscriptions for that event will receive the update. If your client or server side integrations lose network connection temporarily, delivery of the event is not guaranteed. diff --git a/src/routes/docs/advanced/platform/webhooks/+page.markdoc b/src/routes/docs/advanced/platform/webhooks/+page.markdoc index d7fa9954f6..3d7ab09d07 100644 --- a/src/routes/docs/advanced/platform/webhooks/+page.markdoc +++ b/src/routes/docs/advanced/platform/webhooks/+page.markdoc @@ -4,4 +4,62 @@ title: Webhooks description: Placeholder SEO. --- -temp \ No newline at end of file +Certainly! Below is the content converted to Markdown format: + +```markdown +```php +getParam('events', []); + +?> +``` + +Webhooks allow you to build or set up integrations which subscribe to certain events on Appwrite. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks can be used to purge cache from CDN, calculate data or send a Slack notification. You're only limited by your imagination. + +## Add your webhook {% #addWebhook %} + +You can set your webhook by adding it from your Appwrite project dashboard. You can access your webhooks settings from your project dashboard or on the left navigation panel. Click the 'Add Webhook' button and choose your webhook name and the events that should trigger it. You can also set an optional basic HTTP authentication username and password to protect your endpoint from unauthorized access. + +## Payload {% #payload %} + +Each event type has a specific payload format with the relevant event information. All event payloads mirror the payloads for the API payload which parallel to the [event types](/docs/events). + +## Headers {% #headers %} + +HTTP requests made to your webhook's configured URL endpoint will contain several special headers. + +| Header | Description | +|--------|-------------| +| X-Appwrite-Webhook-Id | The ID of the Webhook who triggered the event. | +| X-Appwrite-Webhook-Events | Names of the events that triggered this delivery. | +| X-Appwrite-Webhook-Name | Name of the webhook as specified in your app settings and [events list](/docs/events). | +| X-Appwrite-Webhook-User-Id | The user ID of the user who triggered the event. Returns an empty string if an API key triggered the event. Note that events like `account.create` or `account.sessions.create` are performed by guest users and will not return any user ID. If you still need the user ID for these events, you can find it in the event payload. | +| X-Appwrite-Webhook-Project-Id | The ID of the project who owns the Webhook and API call. | +| X-Appwrite-Webhook-Signature | The HMAC-SHA1 signature of the payload. This is used to verify the authenticity of the payload. | +| User-Agent | Each request made by Appwrite will be 'Appwrite-Server'. | + +## Verification {% #verification %} + +Webhooks can be verified by using the [X-Appwrite-Webhook-Signature](/docs/webhooks#headers) header. +This is the HMAC-SHA1 signature of the payload. You can find the signature key in your webhooks properties in the dashboard. +To generate this hash you append the payload to the end of webhook URL (make sure there are no spaces in between) and then use the HMAC-SHA1 algorithm to generate the signature. +After you've generated the signature, compare it to the `X-Appwrite-Webhook-Signature` header value. +If they match, the payload is valid and you can trust it came from your Appwrite instance. + + +## Events {% events %} + +Appwrite has events that fire when a resource changes. +These events cover all Appwrite resources and can reflect create, update, and delete actions. +You can specify one or many events to subscribe to with webhooks. + +{% partial file="auth-events.md" /%} + +{% partial file="databases-events.md" /%} + +{% partial file="storage-events.md" /%} + +{% partial file="functions-events.md" /%} + +[Learn more about events](/docs/platform/api-keys) From 5f28ca0267c2f4128c7cc3a87e9629ab990f743e Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Tue, 19 Sep 2023 18:40:37 +0000 Subject: [PATCH 2/8] Sentence case in events partials --- src/partials/databases-events.md | 4 ++-- src/partials/functions-events.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/partials/databases-events.md b/src/partials/databases-events.md index aa7e0a099b..c41ba581af 100644 --- a/src/partials/databases-events.md +++ b/src/partials/databases-events.md @@ -1,6 +1,6 @@ -## Databases Service {% #databases-events %} +## Databases events {% #databases-events %} -| Name {% width=20 %} | Payload | Description | +| Name | Payload | Description | | ----------------------------------------- | ------------------------------ | --------------------------------------- | | `databases.*` | [Database Object](/docs/models/database) | This event triggers on any database event. | | `databases.*.collections.*` | [Collection Object](/docs/models/collection) | This event triggers on any collection event. | diff --git a/src/partials/functions-events.md b/src/partials/functions-events.md index 1dd42dde29..20f59c35f8 100644 --- a/src/partials/functions-events.md +++ b/src/partials/functions-events.md @@ -1,4 +1,4 @@ -## Functions Service {% #functions-events %} +## Functions events {% #functions-events %} | Name | Payload | Description | | ------------------------------------------- | --------------------------------- | ----------------------------------------- | From 3bca7c19aaaae5cc6ef19bd6976958cbc148fa92 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 19 Sep 2023 23:19:46 +0300 Subject: [PATCH 3/8] Added missing non-interactive page --- .../docs/tooling/command-line/+layout.svelte | 4 ++ .../non-interactive/+page.markdoc | 57 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 src/routes/docs/tooling/command-line/non-interactive/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index f0ac92a234..333739c8a5 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -27,6 +27,10 @@ { label: 'Deployment', href: '/docs/tooling/command-line/deployment' + }, + { + label: 'Non interactive', + href: '/docs/tooling/command-line/non-interactive' } ] } diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc new file mode 100644 index 0000000000..6338b1bdb8 --- /dev/null +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -0,0 +1,57 @@ +--- +layout: article +title: Non interactive +description: +--- +The Appwrite CLI can be used in a non-interactive and headless manner, without saving configuration or sessions. This is especially useful when you want to automate tasks on a continuous integration server. You can enable the non-interactive mode for the Appwrite CLI by setting the `project ID`, `endpoint`, and `API Key`: + +```sh +appwrite client \ + --endpoint https://cloud.appwrite.io/v1 \ + --projectId [YOUR_PROJECT_ID] \ + --key YOUR_API_KEY +``` + +When you set the global configuration parameters using the `appwrite client` command, they take precedence over the local configuration parameters in your `appwrite.json` thereby switching the CLI to non-interactive mode. + +In this mode, the CLI can only interact with one project at a time. + +## API Keys {% #api-keys %} +In non-interactive mode, the CLI uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use. [Learn more about API Keys](/docs/platform/api-keys). + +## Deployment {% #deployment %} +Appwrite's deploy commands can also be executed in a non-interactive mode. This applies to both function and collection deployment. + +You can deploy a function non-interactively by using the `--yes` option to skip all warnings and specifying which functions you want to deploy. + +Deploy a single function by ID: + +```sh +appwrite deploy function --functionId [FUNCTION ID] --yes +``` + +Deploy all functions: + +```sh +appwrite deploy function --all --yes +``` + +You can deploy databases, collections, teams, and buckets non-interactively in a similar way by using the `--all` and `--yes` option. + +Deploy all databases and collections: + +```sh +appwrite deploy collection --all --yes +``` + +Deploy all teams: + +```sh +appwrite deploy team --all --yes +``` + +Deploy all buckets: + +```sh +appwrite deploy buckets --all --yes +``` \ No newline at end of file From ed8f9609fd2152a15f794969d310c0c6018f90cb Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 20 Sep 2023 00:08:08 +0300 Subject: [PATCH 4/8] Added CLI commands page --- src/routes/docs/Sidebar.svelte | 4 +- .../docs/advanced/self-hosting/+layout.svelte | 6 +- .../databases/documents/+page.markdoc | 8 +- .../databases/quick-start/+page.markdoc | 2 +- .../docs/tooling/command-line/+layout.svelte | 13 +- .../docs/tooling/command-line/+page.markdoc | 9 -- .../command-line/commands/+page.markdoc | 126 ++++++++++++++++++ 7 files changed, 139 insertions(+), 29 deletions(-) delete mode 100644 src/routes/docs/tooling/command-line/+page.markdoc create mode 100644 src/routes/docs/tooling/command-line/commands/+page.markdoc diff --git a/src/routes/docs/Sidebar.svelte b/src/routes/docs/Sidebar.svelte index f1feb57c85..f4198d397a 100644 --- a/src/routes/docs/Sidebar.svelte +++ b/src/routes/docs/Sidebar.svelte @@ -76,7 +76,7 @@ items: [ { label: 'Command Line', - href: '/docs/tooling/command-line', + href: '/docs/tooling/command-line/installation', icon: 'icon-terminal' }, { @@ -106,7 +106,7 @@ }, { label: 'Self-hosting', - href: '/docs/advanced/self-hosting', + href: '/docs/advanced/self-hosting/installation', icon: 'icon-server' } ] diff --git a/src/routes/docs/advanced/self-hosting/+layout.svelte b/src/routes/docs/advanced/self-hosting/+layout.svelte index 790d0a3c5b..63a2f8f490 100644 --- a/src/routes/docs/advanced/self-hosting/+layout.svelte +++ b/src/routes/docs/advanced/self-hosting/+layout.svelte @@ -29,11 +29,11 @@ href: '/docs/advanced/self-hosting/update' }, { - label: 'Debug', + label: 'Debugging', href: '/docs/advanced/self-hosting/debug' }, { - label: 'E-Mail', + label: 'Email delivery', href: '/docs/advanced/self-hosting/email' }, { @@ -45,7 +45,7 @@ href: '/docs/advanced/self-hosting/production' }, { - label: 'SMS', + label: 'SMS delivery', href: '/docs/advanced/self-hosting/sms' }, { diff --git a/src/routes/docs/products/databases/documents/+page.markdoc b/src/routes/docs/products/databases/documents/+page.markdoc index 1fc0514f0c..5c738ca2c9 100644 --- a/src/routes/docs/products/databases/documents/+page.markdoc +++ b/src/routes/docs/products/databases/documents/+page.markdoc @@ -1,14 +1,12 @@ --- layout: article -title: Document +title: Documents description: This is the description used for SEO. -difficulty: beginner -readtime: 10 --- Each piece of data or information in Appwrite Databases is a document. Documents have a structure defined by the parent collection. -## Create documents {% #create %} +## Create documents {% #create-documents %} {% info title="Permissions required" %} You must grant **create** permissions to users at the **collection level** before users can create documents. [Learn more about permissions](#permissions) @@ -130,7 +128,7 @@ mutation { During testing, you might prefer to create documents in the Appwrite Console. To do so, navigate to the **Documents** tab of your collection and click the **Add document** button. -## Retrieving documents {% #retrieve %} +## List documents {% #list-documents %} {% info title="Permissions required" %} You must grant **read** permissions to users at the **collection level** before users can read documents. diff --git a/src/routes/docs/products/databases/quick-start/+page.markdoc b/src/routes/docs/products/databases/quick-start/+page.markdoc index f711f74d15..8f337a6b70 100644 --- a/src/routes/docs/products/databases/quick-start/+page.markdoc +++ b/src/routes/docs/products/databases/quick-start/+page.markdoc @@ -139,7 +139,7 @@ The response should look similar to this. {% /section %} -{% section #query-documents step=4 title="Retrieve documents" %} +{% section #list-documents step=4 title="List documents" %} To read and query data from your collection, use the `listDocuments` endpoint. Like the previous step, replace ``, ``, and`` with their respective IDs. diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index 333739c8a5..08bfe1e3c3 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -8,15 +8,6 @@ }; const navigation: NavTree = [ - { - label: 'Getting started', - items: [ - { - label: 'Overview', - href: '/docs/tooling/command-line' - } - ] - }, { label: 'Guides', items: [ @@ -24,6 +15,10 @@ label: 'Installation', href: '/docs/tooling/command-line/installation' }, + { + label: 'Commands', + href: '/docs/tooling/command-line/commands' + }, { label: 'Deployment', href: '/docs/tooling/command-line/deployment' diff --git a/src/routes/docs/tooling/command-line/+page.markdoc b/src/routes/docs/tooling/command-line/+page.markdoc deleted file mode 100644 index 08ca136664..0000000000 --- a/src/routes/docs/tooling/command-line/+page.markdoc +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: article -title: CLI -description: lorem ipsum -difficulty: beginner -readtime: 5 ---- - -If you're looking to migrate existing projects to Appwrite, Migrations can help you make the move more quickly. You can move your app from Firebase, Supabase, Nhost, and even move between self-hosted and Cloud projects using Migrations. You can also use Migrations to move between two self-hosted instances or even to duplicate projects on the same instance. Migrations will automatically move accounts, database documents, and storage files from one source to another. diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc new file mode 100644 index 0000000000..08053554b2 --- /dev/null +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -0,0 +1,126 @@ +--- +layout: article +title: Commands +description: +--- + +Other than commands to create and deploy databases, collections, functions, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. + +Commands follows the following general syntax: + +```sh +appwrite [COMMAND] --[OPTIONS] +``` + +## List {% #list %} + +Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. + +{% table %} +* Command +* Description +--- +* `login` +* The login command allows you to authenticate into the CLI. This command expects the console account that you use to log into the Appwrite Console. +--- +* `client` +* The client command allows you to configure your CLI. +--- +* `init` +* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, and buckets. +--- +* `deploy` +* The deploy command provides a convenient wrapper for deploying your databases, collections, functions, teams, and buckets. +--- +* `logout` +* The logout command allows you to logout from the CLI. +--- +* `projects` +* The projects command allows you to view, create, and manage your Appwrite projects. +--- +* `storage` +* The storage command allows you to manage your project files. +--- +* `teams` +* The teams command allows you to group users of your project and to enable them to share access permissions to your project's resources. +--- +* `users` +* The users command allows you to manage your project users. +--- +* `account` +* The account command allows you to authenticate as and manage a user account. +--- +* `avatars` +* The avatars command provides utilities to manage images, icons, and avatars. +--- +* `functions` +* The functions command allows you view, create and manage your Appwrite Functions. +--- +* `databases` +* The databases command allows you to create structured collections of documents, query and filter lists of documents. +--- +* `locale` +* The locale command allows you to customize your app based on your users' location. +--- + +{% /table %} + +## Verbose {% #verbose %} +In case of errors with any command, you can get more information about what went wrong using the `--verbose` flag + +```sh +appwrite users list --verbose +``` + +## Examples {% #examples %} + +### Create user + +To create a new user in your project, you can use the create command. + +```sh +appwrite users create --userId "unique()" \ + --email hello@appwrite.io \ + --password very_strong_password +``` + +### List Users + +To get a list of all your project users, you can use the list command. + +```sh +appwrite users list +``` + +### List collections + +To get a list of all your collections, you can use the listCollections command. + +```sh +appwrite databases listCollections --databaseId [DATABASE_ID] +``` + +If you wish to parse the output from the CLI, you can request the CLI output in JSON format using the `--json` flag + +```sh +appwrite databases listCollections --databaseId [DATABASE_ID]--json +``` + +### Get collection + +To get more information on a particular collection, you can make use of the getCollection command and pass in the collectionId. + +```sh +appwrite databases getCollection --databaseId [DATABASE_ID] --collectionId [COLLECTION_ID] +``` + +### Create document + +To create a new document in an existing collection, use the `createDocument` command. + +```sh +appwrite databases createDocument \ + --databaseId [DATABASE_ID] --collectionId [COLLECTION_ID] \ + --documentId 'unique()' --data '{ "Name": "Iron Man" }' \ + --permissions 'read("any")' 'write("team:abc")' +``` \ No newline at end of file From fb8f7ab68ffb97fe833ffeffb9e3cb3569a2e547 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 20 Sep 2023 00:43:18 +0300 Subject: [PATCH 5/8] Added CLI deployment page --- .../command-line/deployment/+page.markdoc | 144 +++++++++++++++++- 1 file changed, 142 insertions(+), 2 deletions(-) diff --git a/src/routes/docs/tooling/command-line/deployment/+page.markdoc b/src/routes/docs/tooling/command-line/deployment/+page.markdoc index 71c22a4b99..8f5a7b27e0 100644 --- a/src/routes/docs/tooling/command-line/deployment/+page.markdoc +++ b/src/routes/docs/tooling/command-line/deployment/+page.markdoc @@ -3,9 +3,10 @@ layout: article title: Deployment description: --- + The Apprite CLI allows you to create and deploy databases, collections, buckets, teams and functions to your Appwrite project from a configuration file. This is especially helpful if you're trying to track project setup using version control. -# Initialization {% #initialization %} +## Initialization {% #initialization %} After you're logged in, the CLI needs to be initialized with your Appwrite project. You can initialize the CLI using: @@ -13,7 +14,7 @@ After you're logged in, the CLI needs to be initialized with your Appwrite proje appwrite init project ``` -The following prompts will guide you through the setup process. The init command also creates an `appwrite.json` file representing your Appwrite project. +The following prompts will guide you through the setup process. The init command also creates an [appwrite.json](/docs/command-line-deployment#appwriteJSON) file representing your Appwrite project. You can fetch all the existing databases and collections in your current project using: @@ -21,3 +22,142 @@ You can fetch all the existing databases and collections in your current project appwrite init collection ``` +You can fetch all the existing teams in your current project using: + +```sh +appwrite init team +``` + +## Deploying Functions {% #deploying-function %} + +The CLI also handles the creation and deployment of Appwrite Functions. Run this command in the folder holding your `appwrite.json` file. + +```sh +appwrite init function +? What would you like to name your function? My Awesome Function +? What runtime would you like to use? Node.js (node-15.5) +✓ Success +``` + +This command creates a new function **My Awesome Function** in your current Appwrite project and also creates a template function for you to get started. + +You can now deploy this function by running this command in the folder holding your `appwrite.json` file. + +```sh +appwrite deploy function +? Which functions would you like to deploy? Awesome Function (621229798628cf5bf712) +ℹ Info Deploying function Awesome Function ( 621229798628cf5bf712 ) +✓ Success Deployed Awesome Function ( 621229798628cf5bf712 ) +``` + +## Deploying Collections {% #deploying-collections %} + +The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. + +You can deploy all the databases and collections in your [appwrite.json](#) file by running this command in the folder holding your `appwrite.json` file. + +The deploy command will overwrite existing collections causing existing data to be lost. If you already have data in your project, you will need to write your own migration script using a Server SDK instead of using the CLI. + +```sh +appwrite deploy collection +``` + +## Deploying Teams {% #deploying-teams %} + +The Appwrite CLI can create teams to organize users. Teams can be used to grant access permissions to a group of users. [Learn more about permissions](/docs/permissions#permission-roles). + +Deploy teams by running this command in the folder holding your `appwrite.json` file. + +```sh +appwrite deploy team +``` + +## Deploying Storage {% #deploying-storage %} + +The Appwrite CLI allows you to configure and deploy buckets across projects. All the bucket's settings are available through the [appwrite.json](/docs/command-line-deployment#appwriteJSON) file. + +Deploy storage buckets by running this command in the folder holding your `appwrite.json` file. + +```sh +appwrite deploy bucket +``` + +## Conflicts {% #conflicts %} + +When using `appwrite.json`, changes made in the Appwrite Console can cause conflicts with the local config. To avoid conflicts, prefer updating configuration locally and deploying instead of using the console. + +## The appwrite.json file {% #appwrite-json %} + +An `appwrite.json` file is created by the CLI when you initialize your project. It stores all the configuration for the CLI to be able to interact with your Appwrite project in JSON format. When using the `appwrite deploy` command, the CLI uses information from `appwrite.json` to deploy your functions and collections. + +### Configuration {% #configuration %} + +Here's a complete list of all configurable options in `appwrite.json`: + +| Option | Type | Description | +| --- | --- | --- | +| `projectId` | string | ID of your Appwrite Project. | +| `projectName` | string | Name of your Appwrite Project. | +| `functions` | array of [functions](/docs/command-line-deployment#function-options) | Configuration of functions in your project. | +| `databases` | array of [databases](/docs/command-line-deployment#databases-options) | Configuration of databases in your project. | +| `collections` | array of [collections](/docs/command-line-deployment#collection-options) | Configuration of collections in your project. | +| `teams` | array of [teams](/docs/command-line-deployment#teams-options) | Configuration of teams in your project. | +| `buckets` | array of [buckets](/docs/command-line-deployment#buckets-options) | Configuration of teams in your project. | + +#### Function options + +| Option | Type | Description | +| --- | --- | --- | +| `$id` | string | Function ID. | +| `name` | string | Function Name. | +| `runtime` | string | Function runtime, must be enabled. [Learn more about runtimes](/docs/functions#supportedRuntimes). | +| `path` | string | Path to folder containing the function's source code. | +| `entrypoint` | string | Entry point of the function relative to the folder specified in path. | +| `ignore` | array of strings | Files to ignore inside the function. [Learn more about ignoring files](/docs/functions#ignoreFiles). | +| `execute` | array of strings | Grants execute permissions to users. [Learn more about role strings](/docs/rest#permissions). | +| `events` | array of strings | Events that trigger the function to execute. [Learn more about events](/docs/events). | +| `schedule` | string | Execute schedule for the function. [Learn more about scheduled executions](/docs/functions#scheduled-execution). | +| `timeout` | int | Execution timeout of the function in seconds, with a maximum configurable limit of 900 seconds. | +| `variables` | JSON object | Variables provided to the function on execution stored as a key-value JSON object. | + +#### Databases options + +| Option | Type | Description | +| --- | --- | --- | +| `$id` | string | Database ID. | +| `name` | string | Database Name. | + +#### Collection options + +| Option | Type | Description | +| --- | --- | --- | +| `$id` | string | Collection ID. | +| `name` | string | Collection Name. | +| `databaseId` | string | ID of the database to which this collection belongs. | +| `enabled` | bool | If the collection is enabled. | +| `documentSecurity` | bool | If access permissions can be defined at the document level. | +| `$permissions` | array of strings | Grants access permissions to users at the collection level. [Learn more about permissions](/docs/rest#permissions). | +| `attributes` | array of objects | Defines a list of attributes in the collection. [Learn more about the Attributes List Object](/docs/models/attributeList). | +| `indexes` | array of objects | Defines a list of indexes in the collection. [Learn more about the Indexes List Object](/docs/models/indexList). | + +#### Buckets options + +| Option | Type | Description | +| --- | --- | --- | +| `$id` | string | Bucket ID. | +| `name` | string | Bucket Name. | +| `$permissions` | array of strings | Grants access permissions to users at the bucket level. [Learn more about permissions](/docs/rest#permissions). | +| `fileSecurity` | boolean | Whether file-level security is enabled. [Learn more about permissions](/docs/rest#permissions). | +| `enabled` | boolean | Whether the bucket is enabled or disabled. | +| `maximumFileSize` | integer | Maximum file size supported. | +| `allowedFileExtensions` | string\[\] | List of allowed file extensions. | +| `compression` | string | Preferred algorithm for compression. Will be one of `none`, `gzip`, or `zstd`. | +| `encryption` | boolean | Whether the bucket's content is encrypted. | +| `antivirus` | boolean | Whether virus scanning is enabled for the bucket's content. | + +#### Teams options + +| Option | Type | Description | +| --- | --- | --- | +| `$id` | string | Team ID. | +| `name` | string | Team Name. | \ No newline at end of file From 1199507835366b92b782015140f85e34b7286da1 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 21 Sep 2023 00:19:13 +0300 Subject: [PATCH 6/8] Updated SDKs logos --- src/routes/docs/sdks/+page.markdoc | 60 ++++++++++++++------ static/images/platforms/dark/android.svg | 4 ++ static/images/platforms/dark/angular.svg | 4 ++ static/images/platforms/dark/apple.svg | 4 ++ static/images/platforms/dark/bun.svg | 26 +++++++++ static/images/platforms/dark/c.svg | 8 +++ static/images/platforms/dark/csharp.svg | 1 + static/images/platforms/dark/dart.svg | 11 ++++ static/images/platforms/dark/deno.svg | 12 ++++ static/images/platforms/dark/dotnet.svg | 13 +++++ static/images/platforms/dark/erlang.svg | 1 + static/images/platforms/dark/flutter.svg | 8 +++ static/images/platforms/dark/go.svg | 38 +++++++++++++ static/images/platforms/dark/java.svg | 8 +++ static/images/platforms/dark/javascript.svg | 5 ++ static/images/platforms/dark/kotlin.svg | 14 +++++ static/images/platforms/dark/nodejs.svg | 4 ++ static/images/platforms/dark/objective-c.svg | 8 +++ static/images/platforms/dark/perl.svg | 57 +++++++++++++++++++ static/images/platforms/dark/php.svg | 4 ++ static/images/platforms/dark/python.svg | 5 ++ static/images/platforms/dark/react.svg | 7 +++ static/images/platforms/dark/ruby.svg | 4 ++ static/images/platforms/dark/scala.svg | 20 +++++++ static/images/platforms/dark/svelte.svg | 5 ++ static/images/platforms/dark/swift.svg | 11 ++++ static/images/platforms/dark/typescript.svg | 11 ++++ static/images/platforms/dark/vue.svg | 6 ++ static/images/platforms/dark/web.svg | 5 ++ 29 files changed, 348 insertions(+), 16 deletions(-) create mode 100644 static/images/platforms/dark/android.svg create mode 100644 static/images/platforms/dark/angular.svg create mode 100644 static/images/platforms/dark/apple.svg create mode 100644 static/images/platforms/dark/bun.svg create mode 100755 static/images/platforms/dark/c.svg create mode 100644 static/images/platforms/dark/csharp.svg create mode 100644 static/images/platforms/dark/dart.svg create mode 100644 static/images/platforms/dark/deno.svg create mode 100644 static/images/platforms/dark/dotnet.svg create mode 100755 static/images/platforms/dark/erlang.svg create mode 100644 static/images/platforms/dark/flutter.svg create mode 100644 static/images/platforms/dark/go.svg create mode 100755 static/images/platforms/dark/java.svg create mode 100755 static/images/platforms/dark/javascript.svg create mode 100644 static/images/platforms/dark/kotlin.svg create mode 100755 static/images/platforms/dark/nodejs.svg create mode 100755 static/images/platforms/dark/objective-c.svg create mode 100644 static/images/platforms/dark/perl.svg create mode 100755 static/images/platforms/dark/php.svg create mode 100755 static/images/platforms/dark/python.svg create mode 100644 static/images/platforms/dark/react.svg create mode 100755 static/images/platforms/dark/ruby.svg create mode 100644 static/images/platforms/dark/scala.svg create mode 100644 static/images/platforms/dark/svelte.svg create mode 100755 static/images/platforms/dark/swift.svg create mode 100644 static/images/platforms/dark/typescript.svg create mode 100644 static/images/platforms/dark/vue.svg create mode 100755 static/images/platforms/dark/web.svg diff --git a/src/routes/docs/sdks/+page.markdoc b/src/routes/docs/sdks/+page.markdoc index 217ad1ba57..017fc83b7c 100644 --- a/src/routes/docs/sdks/+page.markdoc +++ b/src/routes/docs/sdks/+page.markdoc @@ -13,25 +13,34 @@ We're always working on improving and extending the current stack of available p Client libraries for integrating with Appwrite to build client-based applications and websites. Read one of the many [quick starts](/docs/quick-starts) guides for your framework of choice to start building your first application. {% table %} -* x {% width=48 %} +*   {% width=40 %} * Platform * GitHub Repository +*   {% width=60 %} --- -* x +* {% only_dark %}![Javascript logo](/images/platforms/dark/javascript.svg){% /only_dark %} +{% only_light %}![Javascript logo](/images/platforms/javascript.svg){% /only_light %} * Web SDK `13.0.0` * [appwrite/sdk-for-web](https://github.com/appwrite/sdk-for-web) +* --- -* ![Flutter](https://appwrite.io/images-ee/platforms/flutter.svg) +* {% only_dark %}![Flutter logo](/images/platforms/dark/flutter.svg){% /only_dark %} +{% only_light %}![Flutter logo](/images/platforms/flutter.svg){% /only_light %} * Flutter SDK `11.0.0` * [appwrite/sdk-for-flutter](https://github.com/appwrite/sdk-for-flutter) +* --- -* x +* {% only_dark %}![Apple logo](/images/platforms/dark/apple.svg){% /only_dark %} +{% only_light %}![Apple logo](/images/platforms/apple.svg){% /only_light %} * Apple SDK `4.0.0` * [appwrite/sdk-for-apple](https://github.com/appwrite/sdk-for-apple) +* --- -* x +* {% only_dark %}![Android logo](/images/platforms/dark/android.svg){% /only_dark %} +{% only_light %}![Android logo](/images/platforms/android.svg){% /only_light %} * Android SDK `4.0.0` * [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android) +* {% /table %} ## Server Side {% #server-side %} @@ -39,45 +48,64 @@ Client libraries for integrating with Appwrite to build client-based application Server libraries for integrating with Appwrite to build server side integrations or use inside your [Appwrite Functions](/docs/products/functions). Read one of the many [quick starts](/docs/quick-starts) guides for your language/runtime of choice to start building your first server integration. {% table %} -* x {% align="center" %} +*   {% width=40 %} * Platform -* GitHub Repository {% width=10 %} +* GitHub Repository +*   {% width=60 %} --- -* x {% align="center" %} +* {% only_dark %}![Node.js logo](/images/platforms/dark/nodejs.svg){% /only_dark %} +{% only_light %}![Node.js logo](/images/platforms/nodejs.svg){% /only_light %} * Node.js SDK `11.0.0` * [appwrite/sdk-for-node](https://github.com/appwrite/sdk-for-node) +* --- -* x {% align="center" %} +* {% only_dark %}![Dart logo](/images/platforms/dark/dart.svg){% /only_dark %} +{% only_light %}![Dart logo](/images/platforms/dart.svg){% /only_light %} * Dart SDK `10.0.0` * [appwrite/sdk-for-dart](https://github.com/appwrite/sdk-for-dart) +* --- -* x {% align="center" %} +* {% only_dark %}![Python logo](/images/platforms/dark/python.svg){% /only_dark %} +{% only_light %}![Python logo](/images/platforms/python.svg){% /only_light %} * Python SDK `4.0.0` * [appwrite/sdk-for-python](https://github.com/appwrite/sdk-for-python) +* --- -* x {% align="center" %} +* {% only_dark %}![PHP logo](/images/platforms/dark/php.svg){% /only_dark %} +{% only_light %}![PHP logo](/images/platforms/php.svg){% /only_light %} * PHP SDK `10.0.0` * [appwrite/sdk-for-php](https://github.com/appwrite/sdk-for-php) +* --- -* x {% align="center" %} +* {% only_dark %}![Ruby logo](/images/platforms/dark/ruby.svg){% /only_dark %} +{% only_light %}![Ruby logo](/images/platforms/ruby.svg){% /only_light %} * Ruby SDK `10.0.0` * [appwrite/sdk-for-ruby](https://github.com/appwrite/sdk-for-ruby) +* --- -* x {% align="center" %} +* {% only_dark %}![.NET logo](/images/platforms/dark/dotnet.svg){% /only_dark %} +{% only_light %}![.NET logo](/images/platforms/dotnet.svg){% /only_light %} * .NET SDK `0.6.0` * [appwrite/sdk-for-dotnet](https://github.com/appwrite/sdk-for-dotnet) +* `beta` --- -* x {% align="center" %} +* {% only_dark %}![Deno logo](/images/platforms/dark/deno.svg){% /only_dark %} +{% only_light %}![Deno logo](/images/platforms/deno.svg){% /only_light %} * Deno SDK `9.0.0` * [appwrite/sdk-for-deno](https://github.com/appwrite/sdk-for-deno) +* --- -* x {% align="center" %} +* {% only_dark %}![Kotlin logo](/images/platforms/dark/kotlin.svg){% /only_dark %} +{% only_light %}![Kotlin logo](/images/platforms/kotlin.svg){% /only_light %} * Kotlin SDK `4.0.0` * [appwrite/sdk-for-kotlin](https://github.com/appwrite/sdk-for-kotlin) +* --- -* x {% align="center" %} +* {% only_dark %}![Swift logo](/images/platforms/dark/swift.svg){% /only_dark %} +{% only_light %}![Swift logo](/images/platforms/swift.svg){% /only_light %} * Swift SDK `4.0.0` * [appwrite/sdk-for-swift](https://github.com/appwrite/sdk-for-swift) +* {% /table %} If you would like to help us extend our platforms and SDKs stack, you are more than welcome to contact us or check out our Appwrite SDK Generator project GitHub repository and read our contribution guide. diff --git a/static/images/platforms/dark/android.svg b/static/images/platforms/dark/android.svg new file mode 100644 index 0000000000..1f94ee587e --- /dev/null +++ b/static/images/platforms/dark/android.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/angular.svg b/static/images/platforms/dark/angular.svg new file mode 100644 index 0000000000..1e059f95a1 --- /dev/null +++ b/static/images/platforms/dark/angular.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/apple.svg b/static/images/platforms/dark/apple.svg new file mode 100644 index 0000000000..ffe48d68a6 --- /dev/null +++ b/static/images/platforms/dark/apple.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/bun.svg b/static/images/platforms/dark/bun.svg new file mode 100644 index 0000000000..4b58290089 --- /dev/null +++ b/static/images/platforms/dark/bun.svg @@ -0,0 +1,26 @@ + + + Bun Logo + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/c.svg b/static/images/platforms/dark/c.svg new file mode 100755 index 0000000000..3320c79e24 --- /dev/null +++ b/static/images/platforms/dark/c.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/csharp.svg b/static/images/platforms/dark/csharp.svg new file mode 100644 index 0000000000..99235e3008 --- /dev/null +++ b/static/images/platforms/dark/csharp.svg @@ -0,0 +1 @@ + diff --git a/static/images/platforms/dark/dart.svg b/static/images/platforms/dark/dart.svg new file mode 100644 index 0000000000..7cd9beb974 --- /dev/null +++ b/static/images/platforms/dark/dart.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/deno.svg b/static/images/platforms/dark/deno.svg new file mode 100644 index 0000000000..569634a89e --- /dev/null +++ b/static/images/platforms/dark/deno.svg @@ -0,0 +1,12 @@ + + + + + + Artboard 3 + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/dotnet.svg b/static/images/platforms/dark/dotnet.svg new file mode 100644 index 0000000000..a8ab5c09e3 --- /dev/null +++ b/static/images/platforms/dark/dotnet.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/static/images/platforms/dark/erlang.svg b/static/images/platforms/dark/erlang.svg new file mode 100755 index 0000000000..109aebb2bc --- /dev/null +++ b/static/images/platforms/dark/erlang.svg @@ -0,0 +1 @@ + diff --git a/static/images/platforms/dark/flutter.svg b/static/images/platforms/dark/flutter.svg new file mode 100644 index 0000000000..5732195e2d --- /dev/null +++ b/static/images/platforms/dark/flutter.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/go.svg b/static/images/platforms/dark/go.svg new file mode 100644 index 0000000000..a16dba13b8 --- /dev/null +++ b/static/images/platforms/dark/go.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/java.svg b/static/images/platforms/dark/java.svg new file mode 100755 index 0000000000..a5ec3a293b --- /dev/null +++ b/static/images/platforms/dark/java.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/javascript.svg b/static/images/platforms/dark/javascript.svg new file mode 100755 index 0000000000..9d84b3a6d2 --- /dev/null +++ b/static/images/platforms/dark/javascript.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/kotlin.svg b/static/images/platforms/dark/kotlin.svg new file mode 100644 index 0000000000..8c90c6e476 --- /dev/null +++ b/static/images/platforms/dark/kotlin.svg @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/nodejs.svg b/static/images/platforms/dark/nodejs.svg new file mode 100755 index 0000000000..0a877c31b5 --- /dev/null +++ b/static/images/platforms/dark/nodejs.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/objective-c.svg b/static/images/platforms/dark/objective-c.svg new file mode 100755 index 0000000000..3320c79e24 --- /dev/null +++ b/static/images/platforms/dark/objective-c.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/perl.svg b/static/images/platforms/dark/perl.svg new file mode 100644 index 0000000000..6069f8f7b6 --- /dev/null +++ b/static/images/platforms/dark/perl.svg @@ -0,0 +1,57 @@ + + + + + + + + diff --git a/static/images/platforms/dark/php.svg b/static/images/platforms/dark/php.svg new file mode 100755 index 0000000000..c0257f28c0 --- /dev/null +++ b/static/images/platforms/dark/php.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/python.svg b/static/images/platforms/dark/python.svg new file mode 100755 index 0000000000..b92faafdfa --- /dev/null +++ b/static/images/platforms/dark/python.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/react.svg b/static/images/platforms/dark/react.svg new file mode 100644 index 0000000000..0a71ebe346 --- /dev/null +++ b/static/images/platforms/dark/react.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/ruby.svg b/static/images/platforms/dark/ruby.svg new file mode 100755 index 0000000000..ec05b20fa2 --- /dev/null +++ b/static/images/platforms/dark/ruby.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/scala.svg b/static/images/platforms/dark/scala.svg new file mode 100644 index 0000000000..0267a43a7c --- /dev/null +++ b/static/images/platforms/dark/scala.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/svelte.svg b/static/images/platforms/dark/svelte.svg new file mode 100644 index 0000000000..a5203cf77e --- /dev/null +++ b/static/images/platforms/dark/svelte.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/swift.svg b/static/images/platforms/dark/swift.svg new file mode 100755 index 0000000000..492c9cf837 --- /dev/null +++ b/static/images/platforms/dark/swift.svg @@ -0,0 +1,11 @@ + + + + + + Artboard 1 + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/typescript.svg b/static/images/platforms/dark/typescript.svg new file mode 100644 index 0000000000..51eaae1b8e --- /dev/null +++ b/static/images/platforms/dark/typescript.svg @@ -0,0 +1,11 @@ + + + + + + Artboard 3 + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/vue.svg b/static/images/platforms/dark/vue.svg new file mode 100644 index 0000000000..de6ea8f399 --- /dev/null +++ b/static/images/platforms/dark/vue.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/static/images/platforms/dark/web.svg b/static/images/platforms/dark/web.svg new file mode 100755 index 0000000000..9d84b3a6d2 --- /dev/null +++ b/static/images/platforms/dark/web.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From 37cba8d394f1e6482f9c4962e16e302e06c1c68b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 21 Sep 2023 00:37:01 +0300 Subject: [PATCH 7/8] Added runtimes logos --- .../products/functions/runtimes/+page.markdoc | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/routes/docs/products/functions/runtimes/+page.markdoc b/src/routes/docs/products/functions/runtimes/+page.markdoc index 9cca7b09c0..e9090d32fd 100644 --- a/src/routes/docs/products/functions/runtimes/+page.markdoc +++ b/src/routes/docs/products/functions/runtimes/+page.markdoc @@ -10,12 +10,13 @@ Appwrite Functions supports an extensive list of runtimes to meet your unique te Below is a list of available Functions runtimes. The Appwrite team continually adds support for new runtimes. {% table %} -* +*   {% width=40 %} * Name * Versions * Architectures --- -* x +* {% only_dark %}![Node.js logo](/images/platforms/dark/nodejs.svg){% /only_dark %} +{% only_light %}![Node.js logo](/images/platforms/nodejs.svg){% /only_light %} * [Node.js](https://hub.docker.com/r/openruntimes/node/tags) * `node-14.5` `node-16.0` @@ -24,21 +25,24 @@ Below is a list of available Functions runtimes. The Appwrite team continually a `node-20.0` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![PHP logo](/images/platforms/dark/php.svg){% /only_dark %} +{% only_light %}![PHP logo](/images/platforms/php.svg){% /only_light %} * [PHP](https://hub.docker.com/r/openruntimes/php/tags) * `php-8.0` `php-8.1` `php-8.2` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Ruby logo](/images/platforms/dark/ruby.svg){% /only_dark %} +{% only_light %}![Ruby logo](/images/platforms/ruby.svg){% /only_light %} * [Ruby](https://hub.docker.com/r/openruntimes/ruby/tags) * `ruby-3.0` `ruby-3.1` `ruby-3.2` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Python logo](/images/platforms/dark/python.svg){% /only_dark %} +{% only_light %}![Python logo](/images/platforms/python.svg){% /only_light %} * [Python](https://hub.docker.com/r/openruntimes/python/tags) * `python-3.8` `python-3.9` @@ -46,14 +50,16 @@ Below is a list of available Functions runtimes. The Appwrite team continually a `python-3.11` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Deno logo](/images/platforms/dark/deno.svg){% /only_dark %} +{% only_light %}![Deno logo](/images/platforms/deno.svg){% /only_light %} * [Deno](https://hub.docker.com/r/openruntimes/deno/tags) * `deno-1.21` `deno-1.24` `deno-1.35` * x86 --- -* x +* {% only_dark %}![Dart logo](/images/platforms/dark/dart.svg){% /only_dark %} +{% only_light %}![Dart logo](/images/platforms/dart.svg){% /only_light %} * [Dart](https://hub.docker.com/r/openruntimes/dart/tags) * `dart-2.15` `dart-2.16` @@ -62,14 +68,16 @@ Below is a list of available Functions runtimes. The Appwrite team continually a `dart-3.0` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![.NET logo](/images/platforms/dark/dotnet.svg){% /only_dark %} +{% only_light %}![.NET logo](/images/platforms/dotnet.svg){% /only_light %} * [.NET](https://hub.docker.com/r/openruntimes/dotnet/tags) * `dotnet-3.1` `dotnet-6.0` `dotnet-7.0` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Java logo](/images/platforms/dark/java.svg){% /only_dark %} +{% only_light %}![Java logo](/images/platforms/java.svg){% /only_light %} * [Java](https://hub.docker.com/r/openruntimes/java/tags) * `java-8.0` `java-11.0` @@ -77,25 +85,29 @@ Below is a list of available Functions runtimes. The Appwrite team continually a `java-18.0` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Swift logo](/images/platforms/dark/swift.svg){% /only_dark %} +{% only_light %}![Swift logo](/images/platforms/swift.svg){% /only_light %} * [Swift](https://hub.docker.com/r/openruntimes/swift/tags) * `swift-5.5` `swift-5.8` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Kotlin logo](/images/platforms/dark/kotlin.svg){% /only_dark %} +{% only_light %}![Kotlin logo](/images/platforms/kotlin.svg){% /only_light %} * [Kotlin](https://hub.docker.com/r/openruntimes/kotlin/tags) * `kotlin-1.6` `kotlin-1.8` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![C++ logo](/images/platforms/dark/c.svg){% /only_dark %} +{% only_light %}![C++ logo](/images/platforms/c.svg){% /only_light %} * [C++](https://hub.docker.com/r/openruntimes/cpp/tags) * `cpp-17` `cpp-20` * x86 / arm64 / armv7 / armv8 --- -* x +* {% only_dark %}![Bun logo](/images/platforms/dark/bun.svg){% /only_dark %} +{% only_light %}![Bun logo](/images/platforms/bun.svg){% /only_light %} * [Bun](https://hub.docker.com/r/openruntimes/bun/tags) * `bun-1.0` * x86 / arm64 From ef220eb228bb5dce427f1ca2f8efc5fd6c9ae333 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 21 Sep 2023 00:39:06 +0300 Subject: [PATCH 8/8] Updated X link to have intent --- src/lib/components/MainFooter.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/MainFooter.svelte b/src/lib/components/MainFooter.svelte index a6161ae289..c4e6749cda 100644 --- a/src/lib/components/MainFooter.svelte +++ b/src/lib/components/MainFooter.svelte @@ -20,7 +20,7 @@ }, { icon: 'aw-icon-x', - link: 'https://twitter.com/appwrite' + link: 'https://twitter.com/intent/follow?screen_name=appwrite' }, { icon: 'aw-icon-linkedin',