diff --git a/CHANGES.md b/CHANGES.md index da80a61cc9..d9ec45dd6c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,37 +2,22 @@ ## Features -- Improved Webhooks and New System Events - [Learn more]() -- New QR code generator library (@PedroCisnerosSantana - [#475](https://github.com/appwrite/appwrite/issues/475)) +- Improved Webhooks and added new system events - [Learn more]() - Added response to /locale/languages API with a list of languages (@TorstenDittmann ,[#351](https://github.com/appwrite/appwrite/issues/351)) -- Added API response payload structure info and examples to the docs site ([#381](https://github.com/appwrite/appwrite/issues/381)) -- Added Google Fonts to Appwrite for offline availability - Added a new route in the Avatars API to get user initials avatar ([#386](https://github.com/appwrite/appwrite/issues/386)) -- Added option to delete team from the console ([#380](https://github.com/appwrite/appwrite/issues/380)) -- Added option to view team members from the console ([#378](https://github.com/appwrite/appwrite/issues/378)) -- Add option to assign new team members to a team from the console and the API ([#379](https://github.com/appwrite/appwrite/issues/379)) +- Added API response payload structure info and examples to the docs site ([#381](https://github.com/appwrite/appwrite/issues/381)) - Added support for Brotli compression (@PedroCisnerosSantana, @Rohitub222, [#310](https://github.com/appwrite/appwrite/issues/310)) -- Added Select All Checkbox for on Console API key Scopes Screen ([#477](https://github.com/appwrite/appwrite/issues/477)) -- Added pagination and search for team memberships route ([#387](https://github.com/appwrite/appwrite/issues/387)) -- UI performance & accessibility improvements ([#406](https://github.com/appwrite/appwrite/pull/406)) -- Added option to delete user from the console (@PineappleIOnic - #538) -- Created lazy deletion of data worker ([#521](https://github.com/appwrite/appwrite/issues/521)) -- All emails are now sent asynchronously for improved performance (@TorstenDittmann ,[#402](https://github.com/appwrite/appwrite/pull/402)) -- Updated grid for OAuth2 providers list in the console ([#413](https://github.com/appwrite/appwrite/issues/413)) -- Upgraded Redis Resque queue library to version 1.3.6 ([#319](https://github.com/appwrite/appwrite/issues/319)) +- New deletion worker ([#521](https://github.com/appwrite/appwrite/issues/521)) +- New maintenance worker - cleaning up system logs and other optimizations ([#766](https://github.com/appwrite/appwrite/pull/766)) +- New email worker - all emails are now sent asynchronously for improved performance (@TorstenDittmann ,[#402](https://github.com/appwrite/appwrite/pull/402)) - Moved all Appwrite container logs to STDOUT & STDERR ([#389](https://github.com/appwrite/appwrite/issues/389)) -- New UI micro-interactions and CSS fixes (@AnatoleLucet) - New Doctor CLI to debug the Appwrite server ([#415](https://github.com/appwrite/appwrite/issues/415)) - Added container names to docker-compose.yml (@drandell) -- Upgraded ClamAV container image to version 1.0.11 ([#412](https://github.com/appwrite/appwrite/issues/412)) - Optimised function execution by using fully-qualified function calls - Added support for boolean 'true' and 'false' in query strings alongside 1 and 0 -- Added pagination for projects list on the console home page. - Updated storage calculation to match IEC standards - Now using Alpine as base Docker image -- Upgraded device detctor to version 3.12.6 -- Upgraded MariaDB to version 10.5.5 -- Switch standard ports to 95xx prefix ([#780](https://github.com/appwrite/appwrite/pull/780)) +- Switch standard dev ports to 95xx prefix ([#780](https://github.com/appwrite/appwrite/pull/780)) - User & Team name max length is now 128 chars and not 100 for better API consistency - Collection name max length is now 128 chars and not 256 for better API consistency - Project name max length is now 128 chars and not 100 for better API consistency @@ -40,20 +25,43 @@ - API Key name max length is now 128 chars and not 256 for better API consistency - Task name max length is now 128 chars and not 256 for better API consistency - Platform name max length is now 128 chars and not 256 for better API consistency -- Webhooks payloads are now exactly the same as any of the API response objects +- Webhooks payloads are now exactly the same as any of the API response objects, documentation added - Added new locale: Marathi -mr (@spielers) - New and consistent response format for all API object + new response examples in the docs - Removed user roles attribute from user object (can be fetched from /v1/teams/memberships) ** - Removed type attribute from session object response (used only internally) - ** - might be changed before merging to master -- Upgraded Traefik image to version 2.3 -- Upgraded Redis Docker image to version 6.0 (alpine) -- Upgraded Influxdb Docker image to version 1.8 (alpine) -- Added option to disable mail sending by setting empty SMTP host + - Added fallback option to 0.6 format for backward compatibility with any changes (@christyjacob4 [#772](https://github.com/appwrite/appwrite/pull/772)) +- Added option to disable mail sending by setting an empty SMTP host value ([#730](https://github.com/appwrite/appwrite/issues/730)) - Upgraded installation script ([#490](https://github.com/appwrite/appwrite/issues/490)) - Added new environment variables for ClamAV hostname and port ([#780](https://github.com/appwrite/appwrite/pull/780)) +- New OAuth adapter for Box.com (@armino-dev - [#420](https://github.com/appwrite/appwrite/issues/410)) +- New OAuth adapter for PayPal sandbox (@armino-dev - [#420](https://github.com/appwrite/appwrite/issues/410)) + +### User Interface +- Updated grid for OAuth2 providers list in the console ([#413](https://github.com/appwrite/appwrite/issues/413)) +- Added Google Fonts to Appwrite for offline availability +- Added option to delete user from the console (@PineappleIOnic - [#538](https://github.com/appwrite/appwrite/issues/538)) +- Added option to delete team from the console ([#380](https://github.com/appwrite/appwrite/issues/380)) +- Added option to view team members from the console ([#378](https://github.com/appwrite/appwrite/issues/378)) +- Add option to assign new team members to a team from the console and the API ([#379](https://github.com/appwrite/appwrite/issues/379)) +- Added Select All Checkbox for on Console API key Scopes Screen ([#477](https://github.com/appwrite/appwrite/issues/477)) +- Added pagination and search for team memberships route ([#387](https://github.com/appwrite/appwrite/issues/387)) +- Added pagination for projects list on the console home page. +- UI performance & accessibility improvements ([#406](https://github.com/appwrite/appwrite/pull/406)) +- New UI micro-interactions and CSS fixes (@AnatoleLucet) - Added toggle to hide/show secret keys and passwords inside the dashboard (@kodumbeats, [#535](https://github.com/appwrite/appwrite/issues/535)) +### Upgrades +- Upgraded QR codes generator library (@PedroCisnerosSantana - [#475](https://github.com/appwrite/appwrite/issues/475)) +- Upgraded Traefik image to version 2.3 +- Upgraded MariaDB to version 10.5.5 +- Upgraded Redis Docker image to version 6.0 (alpine) +- Upgraded Influxdb Docker image to version 1.8 (alpine) +- Upgraded Redis Resque queue library to version 1.3.6 ([#319](https://github.com/appwrite/appwrite/issues/319)) +- Upgraded ClamAV container image to version 1.0.11 ([#412](https://github.com/appwrite/appwrite/issues/412)) +- Upgraded device detctor to version 3.12.6 + ## Breaking Changes (Read before upgrading!) - **Deprecated** `first` and `last` query params for documents list route in the database API - **Deprecated** Deprectaed Pubjabi Translations ('pn') @@ -91,14 +99,7 @@ - Fixed Bug when trying to overwrite OAuth cookie in the Flutter SDK - Fixed OAuth redirect when using the self-hosted instance default success URL ([#454](https://github.com/appwrite/appwrite/issues/454)) - Fixed bug denying authentication with Github OAuth provider -- New OAuth adapter for Box.com -- New OAuth adapter for PayPal sandbox - Fixed a bug making read permission overwrite write permission in some cases - -## Breaking Changes -- **Deprecated** `first` and `last` query params for documents list route in the database API -- **Deprecated** Deprecated Punjabi Translations ('pn') - ## Security - Access to Health API now requires authentication with an API Key with access to `health.read` scope allowed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f9f433926..73e03d1e79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -243,12 +243,29 @@ bash ./docker/environments/build.sh ## Tests -To run tests manually, use the Appwrite Docker CLI from your terminal: +To run all tests manually, use the Appwrite Docker CLI from your terminal: ```bash docker-compose exec appwrite test ``` +To run unit tests use: + +```bash +docker-compose exec appwrite test /usr/src/code/tests/unit +``` + +To run end-2-end tests use: + +```bash +docker-compose exec appwrite test /usr/src/code/tests/e2e +``` + +To run end-2-end tests for a spcific service use: + +```bash +docker-compose exec appwrite test /usr/src/code/tests/e2e/Services/[ServiceName] +``` ## Benchmarking You can use WRK Docker image to benchmark the server performance. Benchmarking is extremely useful when you want to compare how the server behaves before and after a change has been applied. Replace [APPWRITE_HOSTNAME_OR_IP] with your Appwrite server hostname or IP. Note that localhost is not accessible from inside the WRK container. diff --git a/README.md b/README.md index b10fecd5cf..7ece1f7cbc 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you * [**Teams**](https://appwrite.io/docs/client/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team. * [**Database**](https://appwrite.io/docs/client/database) - Manage database collections and documents. Read, create, update, and delete documents and filter lists of documents collections using an advanced filter with graph-like capabilities. * [**Storage**](https://appwrite.io/docs/client/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way. -* [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in an isolate environment, you can trigger your code on any Appwrite system event, manually or using a CRON schedule. +* [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event, manually or using a CRON schedule. * [**Locale**](https://appwrite.io/docs/client/locale) - Track your user's location, and manage your app locale-based data. * [**Avatars**](https://appwrite.io/docs/client/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes. @@ -125,8 +125,8 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) * ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) * ✅   [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team) +* ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Experimental** (Maintained by the Appwrite Team) * ✅   [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team) -* ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team) Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)! diff --git a/app/config/platforms.php b/app/config/platforms.php index 36ce0bb226..eb468cfde7 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -270,14 +270,14 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '0.0.1', + 'version' => '0.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => '', - 'enabled' => false, + 'enabled' => true, 'beta' => true, - 'dev' => false, + 'dev' => true, 'family' => APP_PLATFORM_SERVER, - 'prism' => 'java', + 'prism' => 'dart', 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), 'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git', 'gitRepoName' => 'sdk-for-dart', diff --git a/app/config/variables.php b/app/config/variables.php index 49ec821af8..d7c180ea11 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -2,195 +2,353 @@ return [ [ - 'name' => '_APP_ENV', - 'default' => 'production', - 'required' => false, - 'question' => '', + 'category' => 'General', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_ENV', + 'description' => 'Set your server running environment. By default, the var is set to \'development\'. When deploying to production, change it to: \'production\'.', + 'introduction' => '', + 'default' => 'production', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPTIONS_ABUSE', + 'description' => 'Allows you to disable abuse checks and API rate limiting. By default, set to \'enabled\'. To cancel the abuse checking, set to \'disabled\'. It is not recommended to disable this check-in a production environment.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPTIONS_FORCE_HTTPS', + 'description' => 'Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the \'Strict-Transport-Security\' header to all HTTP responses. By default, set to \'disabled\'. To enable, set to \'enabled\'. This feature will work only when your ports are set to default 80 and 443.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPENSSL_KEY_V1', + 'description' => 'This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to **keep it a secret and have a backup for it**.', + 'introduction' => '', + 'default' => 'your-secret-key', + 'required' => true, + 'question' => 'Choose a secret API key, make sure to make a backup of your key in a secure location', + ], + [ + 'name' => '_APP_DOMAIN', + 'description' => 'Your Appwrite domain address. When setting a public suffix domain, Appwrite will attempt to issue a valid SSL certificate automatically. When used with a dev domain, Appwrite will assign a self-signed SSL certificate. The default value is \'localhost\'.', + 'introduction' => '', + 'default' => 'localhost', + 'required' => true, + 'question' => 'Enter your Appwrite hostname', + ], + [ + 'name' => '_APP_DOMAIN_TARGET', + 'description' => 'A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', + 'introduction' => '', + 'default' => 'localhost', + 'required' => true, + 'question' => "Enter a DNS A record hostname to serve as a CNAME for your custom domains.\nYou can use the same value as used for the Appwrite hostname.", + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_EMAILS', + 'description' => 'This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_DOMAINS', + 'description' => "This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_IPS', + 'description' => "This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.\n\nTo enable/activate this option, pass a list of allowed IP addresses separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_NAME', + 'description' => 'This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: \'Appwrite\'. You can use url encoded strings for spaces and special chars.', + 'introduction' => '0.7.0', + 'default' => 'Appwrite', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_ADDRESS', + 'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'team@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.', + 'introduction' => '0.7.0', + 'default' => 'team@appwrite.io', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPTIONS_ABUSE', - 'default' => 'enabled', - 'required' => false, - 'question' => '', + 'category' => 'Redis', + 'description' => 'Appwrite uses a Redis server for managing cache, queues and scheduled tasks. The Redis env vars are used to allow Appwrite server to connect to the Redis container.', + 'variables' => [ + [ + 'name' => '_APP_REDIS_HOST', + 'description' => 'Redis server hostname address. Default value is: \'redis\'.', + 'introduction' => '', + 'default' => 'redis', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_REDIS_PORT', + 'description' => 'Redis server TCP port. Default value is: \'6379\'.', + 'introduction' => '', + 'default' => '6379', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPTIONS_FORCE_HTTPS', - 'default' => 'enabled', - 'required' => false, - 'question' => '', + 'category' => 'MariaDB', + 'description' => 'Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container.', + 'variables' => [ + [ + 'name' => '_APP_DB_HOST', + 'description' => 'MariaDB server host name address. Default value is: \'mariadb\'.', + 'introduction' => '', + 'default' => 'mariadb', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_PORT', + 'description' => 'MariaDB server TCP port. Default value is: \'3306\'.', + 'introduction' => '', + 'default' => '3306', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_SCHEMA', + 'description' => 'MariaDB server database schema. Default value is: \'appwrite\'.', + 'introduction' => '', + 'default' => 'appwrite', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_USER', + 'description' => 'MariaDB server user name. Default value is: \'root\'.', + 'introduction' => '', + 'default' => 'user', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_PASS', + 'description' => 'MariaDB server user password. Default value is: \'password\'.', + 'introduction' => '', + 'default' => 'password', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPENSSL_KEY_V1', - 'default' => 'your-secret-key', - 'required' => true, - 'question' => 'Choose a secret API key, make sure to make a backup of your key in a secure location', + 'category' => 'InfluxDB', + 'description' => 'Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container.', + 'variables' => [ + [ + 'name' => '_APP_INFLUXDB_HOST', + 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', + 'introduction' => '', + 'default' => 'influxdb', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_INFLUXDB_PORT', + 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', + 'introduction' => '', + 'default' => '8086', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_DOMAIN', - 'default' => 'localhost', - 'required' => true, - 'question' => 'Enter your Appwrite hostname', + 'category' => 'StatsD', + 'description' => 'Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container.', + 'variables' => [ + [ + 'name' => '_APP_STATSD_HOST', + 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', + 'introduction' => '', + 'default' => 'telegraf', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STATSD_PORT', + 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', + 'introduction' => '', + 'default' => '8125', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_DOMAIN_TARGET', - 'default' => 'localhost', - 'required' => true, - 'question' => "Enter a DNS A record hostname to serve as a CNAME for your custom domains.\nYou can use the same value as used for the Appwrite hostname.", + 'category' => 'SMTP', + 'description' => "Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container.\n\nIf running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user's SPAM folder.", + 'variables' => [ + [ + 'name' => '_APP_SMTP_HOST', + 'description' => 'SMTP server host name address. Default value is: \'smtp\'. Pass an empty string to disable all mail sending from the server.', + 'introduction' => '', + 'default' => 'smtp', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_PORT', + 'description' => 'SMTP server TCP port. Default value is: \'25\'.', + 'introduction' => '', + 'default' => '25', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_SECURE', + 'description' => 'SMTP secure connection protocol. Empty by default, change to \'tls\' if running on a secure connection.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_USERNAME', + 'description' => 'SMTP server user name. Empty by default.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_PASSWORD', + 'description' => 'SMTP server user password. Empty by default.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_REDIS_HOST', - 'default' => 'redis', - 'required' => false, - 'question' => '', + 'category' => 'Storage', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_STORAGE_LIMIT', + 'description' => 'Maximun file size allowed for file upload. The default value is 10MB limitation. You should pass your size limit value in bytes.', + 'introduction' => '0.7.0', + 'default' => '10000000', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS', + 'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'enabled\' by default, to cancel the scans set the value to \'disabled\'. When disabled, it\'s recommended to turn off the ClamAV container for better resource usage.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS_HOST', + 'description' => 'ClamAV server host name address. Default value is: \'clamav\'.', + 'introduction' => '0.7.0', + 'default' => 'clamav', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS_PORT', + 'description' => 'ClamAV server TCP port. Default value is: \'3310\'.', + 'introduction' => '0.7.0', + 'default' => '3310', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_REDIS_PORT', - 'default' => '6379', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_HOST', - 'default' => 'mariadb', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_PORT', - 'default' => '3306', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_SCHEMA', - 'default' => 'appwrite', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_USER', - 'default' => 'user', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_PASS', - 'default' => 'password', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_INFLUXDB_HOST', - 'default' => 'influxdb', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_INFLUXDB_PORT', - 'default' => '8086', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STATSD_HOST', - 'default' => 'telegraf', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STATSD_PORT', - 'default' => '8125', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_HOST', - 'default' => 'smtp', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_PORT', - 'default' => '25', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_SECURE', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_USERNAME', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_PASSWORD', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_LIMIT', - 'default' => '10000000', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS', - 'default' => 'enabled', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS_HOST', - 'default' => 'clamav', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS_PORT', - 'default' => '3310', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_TIMEOUT', - 'default' => '900', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_CONTAINERS', - 'default' => '10', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_CPUS', - 'default' => '1', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_MEMORY', - 'default' => '128', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', - 'default' => '128', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_MAINTENANCE_INTERVAL', - 'default' => '86400', - 'required' => false, - 'question' => '', + 'category' => 'Functions', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_FUNCTIONS_TIMEOUT', + 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds.', + 'introduction' => '0.7.0', + 'default' => '900', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_CONTAINERS', + 'description' => 'The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10.', + 'introduction' => '0.7.0', + 'default' => '10', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_CPUS', + 'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is 1.', + 'introduction' => '0.7.0', + 'default' => '1', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_MEMORY', + 'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', + 'default' => '128', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', + 'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', + 'default' => '128', + 'required' => false, + 'question' => '', + ], + ], + [ + 'category' => 'Maintenance', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_MAINTENANCE_INTERVAL', + 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', + 'default' => '86400', + 'required' => false, + 'question' => '', + ], + ], + ], ], ]; \ No newline at end of file diff --git a/app/tasks/install.php b/app/tasks/install.php index b28391d6d4..8ca090c772 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -30,10 +30,17 @@ $cli * 5. Run docker-compose up -d - DONE * 6. Run data migration */ - $vars = Config::getParam('variables'); + $config = Config::getParam('variables'); $path = '/usr/src/code/appwrite'; $defaultHTTPPort = '80'; $defaultHTTPSPort = '443'; + $vars = []; + + foreach($config as $category) { + foreach($category['variables'] ?? [] as $var) { + $vars[] = $var; + } + } Console::success('Starting Appwrite installation...'); diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index e0a6fbd051..50d2601150 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -40,7 +40,6 @@ $cli $git = (Console::confirm('Should we use git push? (yes/no)') == 'yes'); $production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false; $message = ($git) ? Console::confirm('Please enter your commit message:') : ''; - $warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**'; if(!in_array($version, ['0.6.2', '0.7.0'])) { throw new Exception('Unknown version given'); @@ -71,9 +70,9 @@ $cli $examples = ($examples) ? \file_get_contents($examples) : ''; $changelog = \realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'/CHANGELOG.md'); $changelog = ($changelog) ? \file_get_contents($changelog) : '# Change Log'; - $warning = ($language['beta']) ? '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**' : ''; + $warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check [previous releases]('.$language['url'].'/releases).**'; $license = 'BSD-3-Clause'; - $licenseContent = 'Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. + $licenseContent = 'Copyright (c) ' . date('Y') . ' Appwrite (https://appwrite.io) and individual contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -124,6 +123,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND break; case 'dart': $config = new Dart(); + $config->setPackageName('dart_appwrite'); break; case 'go': $config = new Go(); diff --git a/app/tasks/vars.php b/app/tasks/vars.php index ed4a329735..6c02348222 100644 --- a/app/tasks/vars.php +++ b/app/tasks/vars.php @@ -10,9 +10,16 @@ $cli ->task('vars') ->desc('List all the server environment variables') ->action(function () { - $variables = Config::getParam('variables', []); + $config = Config::getParam('variables', []); + $vars = []; - foreach ($variables as $key => $value) { + foreach($config as $category) { + foreach($category['variables'] ?? [] as $var) { + $vars[] = $var; + } + } + + foreach ($vars as $key => $value) { Console::log('- '.$value['name'].'='.App::getEnv($value['name'], '')); } }); \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..87d2062fc4 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getBrowser( + code: 'aa', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8fe5f1d5d8 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getCreditCard( + code: 'amex', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6a249dc70f --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getFavicon( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f997b668da --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getFlag( + code: 'af', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..9f31d8f159 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getImage( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..73788d2170 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getInitials( + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..eb8b46c743 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getQR( + text: '[TEXT]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/create-collection.md b/docs/examples/0.6.2/server-dart/examples/database/create-collection.md new file mode 100644 index 0000000000..c060effb3d --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/create-collection.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createCollection( + name: '[NAME]', + read: [], + write: [], + rules: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/create-document.md b/docs/examples/0.6.2/server-dart/examples/database/create-document.md new file mode 100644 index 0000000000..4899aa4a92 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/create-document.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md b/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md new file mode 100644 index 0000000000..6543cc1491 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/delete-document.md b/docs/examples/0.6.2/server-dart/examples/database/delete-document.md new file mode 100644 index 0000000000..89204f6d81 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/delete-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/get-collection.md b/docs/examples/0.6.2/server-dart/examples/database/get-collection.md new file mode 100644 index 0000000000..6b0cb526ca --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/get-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/get-document.md b/docs/examples/0.6.2/server-dart/examples/database/get-document.md new file mode 100644 index 0000000000..efe007aadf --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/get-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/list-collections.md b/docs/examples/0.6.2/server-dart/examples/database/list-collections.md new file mode 100644 index 0000000000..aecd08a54a --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/list-collections.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listCollections( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/list-documents.md b/docs/examples/0.6.2/server-dart/examples/database/list-documents.md new file mode 100644 index 0000000000..9323fd34be --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/list-documents.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/update-collection.md b/docs/examples/0.6.2/server-dart/examples/database/update-collection.md new file mode 100644 index 0000000000..8d77990f1a --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/update-collection.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateCollection( + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/update-document.md b/docs/examples/0.6.2/server-dart/examples/database/update-document.md new file mode 100644 index 0000000000..767233b5a8 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/update-document.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..dd5bbdc1cb --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getAntiVirus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-cache.md b/docs/examples/0.6.2/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..322939d74e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getCache(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md b/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..e3447550eb --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getDB(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7c605154a6 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueCertificates(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c06cda9185 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueFunctions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..807a04fb11 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueLogs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..a33ae976a0 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueTasks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b504a8efc5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueUsage(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..7c159ac8cd --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueWebhooks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7f172bf86c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getStorageLocal(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-time.md b/docs/examples/0.6.2/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..65861d3cc3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-time.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getTime(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get.md b/docs/examples/0.6.2/server-dart/examples/health/get.md new file mode 100644 index 0000000000..0c9d39218e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md b/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md new file mode 100644 index 0000000000..2daced78b6 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..7b04a49487 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..57138a6b75 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md new file mode 100644 index 0000000000..2bf758adca --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md new file mode 100644 index 0000000000..c8a415de4c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md b/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md new file mode 100644 index 0000000000..b9ae6655a3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get.md b/docs/examples/0.6.2/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..d290063060 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/create-file.md b/docs/examples/0.6.2/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..b098d92ea9 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/create-file.md @@ -0,0 +1,26 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createFile( + file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md b/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..ae76fe6f87 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..2eceaab1f5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFileDownload( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..2b564d81b7 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFilePreview( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..030fb40f38 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFileView( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..d4a10369a5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/list-files.md b/docs/examples/0.6.2/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..0225695466 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/list-files.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listFiles( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/update-file.md b/docs/examples/0.6.2/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..bc77e7a1d1 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/update-file.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateFile( + fileId: '[FILE_ID]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..e3923bd207 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/create.md b/docs/examples/0.6.2/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..339663d9d1 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/create.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.create( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..23688dcc04 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/delete.md b/docs/examples/0.6.2/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..a006e8f347 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md new file mode 100644 index 0000000000..3a12dc5c2b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/get.md b/docs/examples/0.6.2/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..a1bfe8e72c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/list.md b/docs/examples/0.6.2/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..d55e58e36e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/update.md b/docs/examples/0.6.2/server-dart/examples/teams/update.md new file mode 100644 index 0000000000..22af165502 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/update.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/create.md b/docs/examples/0.6.2/server-dart/examples/users/create.md new file mode 100644 index 0000000000..18bbbf2d13 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/create.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.create( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/delete-session.md b/docs/examples/0.6.2/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..eaa98c17b7 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/delete-session.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSession( + userId: '[USER_ID]', + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8c889aad2b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-logs.md b/docs/examples/0.6.2/server-dart/examples/users/get-logs.md new file mode 100644 index 0000000000..63eb6b5bcf --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-logs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getLogs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md b/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..e5909422a3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getPrefs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md b/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md new file mode 100644 index 0000000000..ebe44c3eb9 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get.md b/docs/examples/0.6.2/server-dart/examples/users/get.md new file mode 100644 index 0000000000..be582d52c5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.get( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/list.md b/docs/examples/0.6.2/server-dart/examples/users/list.md new file mode 100644 index 0000000000..e0ecf7adf3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..d148e52f0b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePrefs( + userId: '[USER_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/update-status.md b/docs/examples/0.6.2/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..7e14043635 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/update-status.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateStatus( + userId: '[USER_ID]', + status: '1', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md index 27c0336054..3eb6ff845d 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md index 998356a106..0a75b1665d 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md index 43afe096c4..e132db2f5f 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md index 6b28e5db2f..7455538cec 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md index 0a2693c768..e1d6f7d5f5 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md index af35445bb3..36e9b8fa94 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md index 6d8446b105..23d6a60d90 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/create-collection.md b/docs/examples/0.6.2/server-deno/examples/database/create-collection.md index 316ae6b222..776830943b 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/create-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/create-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/create-document.md b/docs/examples/0.6.2/server-deno/examples/database/create-document.md index ef78a839a4..7a60b55403 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/create-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/create-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md b/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md index e9b5d6392b..d62c8d0974 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/delete-document.md b/docs/examples/0.6.2/server-deno/examples/database/delete-document.md index b7d3f52c71..558a4bbe67 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/delete-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/delete-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/get-collection.md b/docs/examples/0.6.2/server-deno/examples/database/get-collection.md index 323bc7ec74..0ca917a3c3 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/get-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/get-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/get-document.md b/docs/examples/0.6.2/server-deno/examples/database/get-document.md index 7a0332251a..59ec5e4141 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/get-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/get-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/list-collections.md b/docs/examples/0.6.2/server-deno/examples/database/list-collections.md index 292e46f860..0bb6bf1679 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/list-collections.md +++ b/docs/examples/0.6.2/server-deno/examples/database/list-collections.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/list-documents.md b/docs/examples/0.6.2/server-deno/examples/database/list-documents.md index bb22a3956a..ead202aaa9 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/list-documents.md +++ b/docs/examples/0.6.2/server-deno/examples/database/list-documents.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/update-collection.md b/docs/examples/0.6.2/server-deno/examples/database/update-collection.md index 8239e45f28..31e34acf13 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/update-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/update-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/update-document.md b/docs/examples/0.6.2/server-deno/examples/database/update-document.md index cd079c8f2d..e6ffd49f00 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/update-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/update-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md index e06fbf86de..ecfc1fa2fa 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-cache.md b/docs/examples/0.6.2/server-deno/examples/health/get-cache.md index b58ca1bc15..f3e17bda8e 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-cache.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-cache.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md b/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md index 946cfb03a8..f6ba94a496 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md index a86358bb22..9d2e325630 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md index 033248b118..c31869c55f 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md index d4c3300a35..bb40c7a559 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md index 01e3094ffc..45f69a8ab2 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md index d0d8faf7b6..0a0a001ceb 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md index 268c521373..ddd2735f49 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md index 77bb658f9a..76df5561d7 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-time.md b/docs/examples/0.6.2/server-deno/examples/health/get-time.md index 0e5205b075..17de3193cf 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-time.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-time.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get.md b/docs/examples/0.6.2/server-deno/examples/health/get.md index c2e6ecdf65..ac94e75627 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md b/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md index 18221d44b4..44c18b54f4 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md index 4a3e49f755..f14e4353ff 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md index 61a1790806..b23eff3dac 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md index 20f544e617..2f3facd7e8 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md index 13b975291d..34d4e233ee 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md b/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md index 95c5c6b355..3fd5d8b8c2 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get.md b/docs/examples/0.6.2/server-deno/examples/locale/get.md index 2336c3289d..30ca9a22c7 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/create-file.md b/docs/examples/0.6.2/server-deno/examples/storage/create-file.md index 5b446e1a38..ebbc065fef 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/create-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/create-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md b/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md index 6469308c74..2826b4cecb 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md index 4510257bad..0df365854d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md index 282fb30324..886b2d566d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md index 8af5391017..ce6e6b4eff 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file.md index 393ce229cb..109dac8c5d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/list-files.md b/docs/examples/0.6.2/server-deno/examples/storage/list-files.md index 0e57cd01de..5d34518e5a 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/list-files.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/list-files.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/update-file.md b/docs/examples/0.6.2/server-deno/examples/storage/update-file.md index 33b2263540..78ee82d38f 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/update-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/update-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md b/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md index b277899c91..b85e811d65 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/create.md b/docs/examples/0.6.2/server-deno/examples/teams/create.md index 1ef3e01b81..055cd9fe9f 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/create.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/create.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md index 911fa30075..f49841a4ad 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/delete.md b/docs/examples/0.6.2/server-deno/examples/teams/delete.md index 61ac03483f..4b1e0bddfc 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/delete.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/delete.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md index b652f8e4e5..467101c956 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/get.md b/docs/examples/0.6.2/server-deno/examples/teams/get.md index 69496e3eef..435391a63a 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/get.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/list.md b/docs/examples/0.6.2/server-deno/examples/teams/list.md index 70851dda51..6d00f6df54 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/list.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/list.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/update.md b/docs/examples/0.6.2/server-deno/examples/teams/update.md index 7b815b4050..9d73002f5c 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/update.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/update.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/create.md b/docs/examples/0.6.2/server-deno/examples/users/create.md index 593eee6e9f..9b5f914631 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/create.md +++ b/docs/examples/0.6.2/server-deno/examples/users/create.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/delete-session.md b/docs/examples/0.6.2/server-deno/examples/users/delete-session.md index e4940773e4..e04024e5a2 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/delete-session.md +++ b/docs/examples/0.6.2/server-deno/examples/users/delete-session.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md index e772c00a5f..89dec44e39 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md +++ b/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-logs.md b/docs/examples/0.6.2/server-deno/examples/users/get-logs.md index 58cc4fc529..5770e84525 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-logs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-logs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md b/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md index 4cda0bb73e..033c56f3db 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md b/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md index 6686e21564..15f0b53c5c 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get.md b/docs/examples/0.6.2/server-deno/examples/users/get.md index dce73d62c5..acee263e2f 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/list.md b/docs/examples/0.6.2/server-deno/examples/users/list.md index b089c3e7e9..c986039946 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/list.md +++ b/docs/examples/0.6.2/server-deno/examples/users/list.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md b/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md index b06185ee91..4e88ed567a 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/update-status.md b/docs/examples/0.6.2/server-deno/examples/users/update-status.md index a0f028bde5..dd3a309dc7 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/update-status.md +++ b/docs/examples/0.6.2/server-deno/examples/users/update-status.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index e69de29bb2..e8d0ca1f73 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +- First release \ No newline at end of file diff --git a/docs/sdks/dart/EXAMPLES.md b/docs/sdks/dart/EXAMPLES.md index f6768a5f85..26930c3352 100644 --- a/docs/sdks/dart/EXAMPLES.md +++ b/docs/sdks/dart/EXAMPLES.md @@ -13,23 +13,26 @@ Init your Appwrite client: ``` -Create a new user and session: +Create a new user: ```dart -Account account = Account(client); +Users users = Users(client); -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); +Response result = await users.create( + email: 'email@example.com', + password: 'password', +); -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - ``` Fetch user profile: ```dart -Account account = Account(client); +Users users = Users(client); -Response profile = await account.get(); +Response profile = await users.get( + userId: '[USER_ID]', +); ``` Upload File: diff --git a/docs/tutorials/environment-variables.md b/docs/tutorials/environment-variables.md deleted file mode 100644 index 3ab2183ff2..0000000000 --- a/docs/tutorials/environment-variables.md +++ /dev/null @@ -1,141 +0,0 @@ -# Environment Variables - -Appwrite environment variables allow you to edit your server setup configuration and customize it. You can change the environment variables by changing them when running Appwrite using Docker CLI or Docker-Compose. - -## General Options - -### _APP_ENV - -Set your server running environment. By default, the var is set to 'development'. When deploying to production, change it to: 'production'. - -### _APP_OPTIONS_ABUSE - -Allows you to turn off abuse checks and API rate limiting. By default, set to 'enabled'. To cancel the abuse checking, set to 'disabled'. It is not recommended to turn off this feature in a production environment. - -### _APP_OPTIONS_FORCE_HTTPS - -Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the 'Strict-Transport-Security' header to all HTTP responses. By default, set to 'disabled'. To enable, set to 'enabled'. This feature will work only when your ports are set to default 80 and 443. - -### _APP_OPENSSL_KEY_V1 - -This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to keep it a secret. - -### _APP_STORAGE_LIMIT - -Maximum file size allowed for file upload. The default value is 100MB limitation. You should pass your size limit value in bytes. - -### _APP_STORAGE_ANTIVIRUS - -This variable allows you to disable the internal anti-virus scans. This value is set to 'enabled' by default, to cancel the scans set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage. - -### _APP_CONSOLE_WHITELIST_EMAILS - -This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma. - -### _APP_CONSOLE_WHITELIST_DOMAINS - -This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain. - -To enable this option, pass a list of allowed email domains separated by a comma. - -### _APP_CONSOLE_WHITELIST_IPS - -This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP. - -To enable/activate this option, pass a list of allowed IP addresses separated by a comma. - -## Redis Server - -Appwrite uses a Redis server for managing cache, queues and scheduled tasks. The Redis env vars are used to allow Appwrite server to connect to the Redis container. - -### _APP_REDIS_HOST - -Redis server hostname address. Default value is: 'redis' - -### _APP_REDIS_PORT - -Redis server TCP port. Default value is: '6379' - -## MariaDB Server - -Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container. - -### _APP_DB_HOST - -MariaDB server host name address. Default value is: 'mariadb' - -### _APP_DB_PORT - -MariaDB server TCP port. Default value is: '3306' - -### _APP_DB_USER - -MariaDB server user name. Default value is: 'root' - -### _APP_DB_PASS - -MariaDB server user password. Default value is: 'password' - -### _APP_DB_SCHEMA - -MariaDB server database schema. Default value is: 'appwrite' - -## InfluxDB - -Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container. - -### _APP_INFLUXDB_HOST - -InfluxDB server host name address. Default value is: 'influxdb' - -### _APP_INFLUXDB_PORT - -InfluxDB server TCP port. Default value is: '8086' - -## StatsD - -Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container. - -### _APP_STATSD_HOST - -StatsD server host name address. Default value is: 'telegraf' - -### _APP_STATSD_PORT - -StatsD server TCP port. Default value is: '8125' - -## SMTP - -Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container. - -If running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user's SPAM folder. - -### _APP_SMTP_HOST - -SMTP server host name address. Default value is: 'smtp'. Pass an empty string to disable all mail sending from the server. - -### _APP_SMTP_PORT - -SMTP server TCP port. Default value is: '25' - -### _APP_SMTP_SECURE - -SMTP secure connection protocol. Empty by default, change to 'tls' if running on a secure connection. - -### _APP_SMTP_USERNAME - -SMTP server user name. Empty by default. - -### _APP_SMTP_PASSWORD - -SMTP server user password. Empty by default. - -## System Settings - -### _APP_SYSTEM_EMAIL_NAME - -This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: 'Appwrite Team'. You can use url encoded strings for spaces and special chars. - -### _APP_SYSTEM_EMAIL_ADDRESS - -This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is 'team@appwrite.io'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users' SPAM folders. diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 18da610f8c..90f054d0af 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; +use stdClass; class OpenAPI3 extends Format { @@ -212,7 +213,7 @@ class OpenAPI3 extends Format case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': - $node['schema']['type'] = 'object'; + $param['default'] = (empty($param['default'])) ? new stdClass() : $param['default']; $node['schema']['type'] = 'object'; $node['schema']['x-example'] = '{}'; //$node['schema']['format'] = 'json'; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index d187cbc8d9..56becd2365 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; +use stdClass; class Swagger2 extends Format { @@ -205,7 +206,7 @@ class Swagger2 extends Format case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': $node['type'] = 'object'; - $node['type'] = 'object'; + $param['default'] = (empty($param['default'])) ? new stdClass() : $param['default']; $node['x-example'] = '{}'; //$node['format'] = 'json'; break;