diff --git a/.env b/.env index f6095351de..ce43bfd853 100644 --- a/.env +++ b/.env @@ -34,3 +34,4 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 _APP_FUNCTIONS_MEMORY_SWAP=128 _APP_MAINTENANCE_INTERVAL=86400 +_APP_SYSTEM_RESPONSE_FORMAT= \ No newline at end of file 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/README.md b/README.md index ea3ee938b9..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. @@ -124,8 +124,9 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) * ✅   [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/environments.php b/app/config/environments.php index 9119bee335..228e7e4608 100644 --- a/app/config/environments.php +++ b/app/config/environments.php @@ -1,5 +1,7 @@ [ 'name' => 'Node.js', diff --git a/app/config/platforms.php b/app/config/platforms.php index c9a3f25b59..3a45f7e7c1 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -96,6 +96,7 @@ return [ // 'enabled' => false, // 'dev' => false, // 'beta' => false, + // 'dev' => false, // 'family' => APP_PLATFORM_CLIENT, // 'prism' => 'java', // 'source' => false, @@ -250,17 +251,33 @@ return [ 'gitRepoName' => 'sdk-for-java', 'gitUserName' => 'appwrite', ], + [ + 'key' => 'dotnet', + 'name' => '.NET', + 'version' => '0.0.3', + 'url' => 'https://github.com/appwrite/sdk-for-dotnet', + 'package' => 'https://www.nuget.org/packages/Appwrite', + 'enabled' => true, + 'beta' => true, + 'dev' => true, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'csharp', + 'source' => \realpath(__DIR__ . '/../sdks/server-dotnet'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-dotnet.git', + 'gitRepoName' => 'sdk-for-dotnet', + 'gitUserName' => 'appwrite', + ], [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '0.0.1', + 'version' => '0.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', - 'package' => '', - 'enabled' => false, + 'package' => 'https://pub.dev/packages/dart_appwrite', + '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..80dd6fdb82 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -2,195 +2,359 @@ 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' => '', + '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' => '', + ], + ], + ], ], [ - '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', + 'name' => '_APP_SYSTEM_RESPONSE_FORMAT', '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' => '', - ], ]; \ No newline at end of file diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index fd06fc0eaf..c28dd19e33 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -674,7 +674,7 @@ App::get('/v1/account/prefs') /** @var Appwrite\Utopia\Response $response */ /** @var Appwrite\Database\Document $user */ - $prefs = $user->getAttribute('prefs', new \stdClass); + $prefs = $user->getAttribute('prefs', new \stdClass()); $response->dynamic(new Document($prefs), Response::MODEL_ANY); }); diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 1059c6e1c7..fe2b53f71f 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -383,8 +383,9 @@ App::get('/v1/avatars/qr') $download = ($download === '1' || $download === 'true' || $download === 1 || $download === true); $options = new QROptions([ - 'quietzone' => $size, - 'outputType' => QRCode::OUTPUT_IMAGICK + 'addQuietzone' => true, + 'quietzoneSize' => $margin, + 'outputType' => QRCode::OUTPUT_IMAGICK, ]); $qrcode = new QRCode($options); @@ -393,10 +394,14 @@ App::get('/v1/avatars/qr') $response->addHeader('Content-Disposition', 'attachment; filename="qr.png"'); } + $resize = new Resize($qrcode->render($text)); + + $resize->crop((int) $size, (int) $size); + $response ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)).' GMT') // 45 days cache ->setContentType('image/png') - ->send($qrcode->render($text)) + ->send($resize->output('png', 9)) ; }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 06dc87a42b..9b124e0a90 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -165,7 +165,7 @@ App::get('/v1/users/:userId/prefs') throw new Exception('User not found', 404); } - $prefs = $user->getAttribute('prefs', ''); + $prefs = $user->getAttribute('prefs', new \stdClass()); $response->dynamic(new Document($prefs), Response::MODEL_ANY); }); @@ -449,6 +449,7 @@ App::delete('/v1/users/:userId/sessions/:sessionId') } } + // TODO : Response filter implementation $response->noContent(); }); @@ -492,6 +493,7 @@ App::delete('/v1/users/:userId/sessions') ->setParam('payload', $response->output($user, Response::MODEL_USER)) ; + // TODO : Response filter implementation $response->noContent(); }); @@ -553,5 +555,6 @@ App::delete('/v1/users/:userId') ->setParam('payload', $response->output($user, Response::MODEL_USER)) ; + // TODO : Response filter implementation $response->noContent(); }); diff --git a/app/controllers/general.php b/app/controllers/general.php index d77b3d5607..5d29e0d43c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -16,6 +16,7 @@ use Appwrite\Database\Validator\Authorization; use Appwrite\Network\Validator\Origin; use Appwrite\Storage\Device\Local; use Appwrite\Storage\Storage; +use Appwrite\Utopia\Response\Filters\V06; use Utopia\CLI\Console; Config::setParam('domainVerification', false); @@ -94,6 +95,22 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo Storage::setDevice('files', new Local(APP_STORAGE_UPLOADS.'/app-'.$project->getId())); Storage::setDevice('functions', new Local(APP_STORAGE_FUNCTIONS.'/app-'.$project->getId())); + /* + * Response format + */ + $responseFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); + if ($responseFormat) { + switch($responseFormat) { + case version_compare ($responseFormat , '0.6.2', '<=') : + Response::setFilter(new V06()); + break; + default: + throw new Exception('No filter available for response format : '.$responseFormat, 400); + } + } else { + Response::setFilter(null); + } + /* * Security Headers * diff --git a/app/http.php b/app/http.php index 2197201d85..b3d7dcaac7 100644 --- a/app/http.php +++ b/app/http.php @@ -48,6 +48,7 @@ $http->on('AfterReload', function($serv, $workerId) { }); $http->on('start', function (Server $http) use ($payloadSize) { + Console::success('Server started succefully (max payload is '.number_format($payloadSize).' bytes)'); Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}"); 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 857b4de7b5..50d2601150 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Language\Python; use Appwrite\SDK\Language\Ruby; use Appwrite\SDK\Language\Dart; use Appwrite\SDK\Language\Deno; +use Appwrite\SDK\Language\DotNet; use Appwrite\SDK\Language\Flutter; use Appwrite\SDK\Language\Go; use Appwrite\SDK\Language\Java; @@ -39,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'); @@ -60,6 +60,7 @@ $cli $spec = file_get_contents(__DIR__.'/../config/specs/'.$version.'.'.$language['family'].'.json'); + $cover = 'https://appwrite.io/images/github.png'; $result = \realpath(__DIR__.'/..').'/sdks/'.$key.'-'.$language['key']; $resultExamples = \realpath(__DIR__.'/../..').'/docs/examples/'.$version.'/'.$key.'-'.$language['key']; $target = \realpath(__DIR__.'/..').'/sdks/git/'.$language['key'].'/'; @@ -69,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: @@ -122,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(); @@ -132,6 +134,10 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND case 'swift': $config = new Swift(); break; + case 'dotnet': + $cover = ''; + $config = new DotNet(); + break; default: throw new Exception('Language "'.$language['key'].'" not supported'); break; @@ -154,7 +160,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setGitRepo($language['gitUrl']) ->setGitRepoName($language['gitRepoName']) ->setGitUserName($language['gitUserName']) - ->setLogo('https://appwrite.io/images/github.png') + ->setLogo($cover) ->setURL('https://appwrite.io') ->setShareText('Appwrite is a backend as a service for building web or mobile apps') ->setShareURL('http://appwrite.io') 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/composer.json b/composer.json index bf9f354acc..56f11f7405 100644 --- a/composer.json +++ b/composer.json @@ -52,11 +52,11 @@ "domnikl/statsd": "3.0.2", "influxdb/influxdb-php": "1.15.1", "phpmailer/phpmailer": "6.1.7", - "chillerlan/php-qrcode": "4.2.0" + "chillerlan/php-qrcode": "4.3.0" }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.2.3", + "appwrite/sdk-generator": "0.4.4", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 500c67d954..4d690a9e9e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa1bf812ee6a45af12cdfbbfb7229471", + "content-hash": "249dc088c5f9f74a1c0e91661f93f96b", "packages": [ { "name": "appwrite/php-clamav", @@ -57,16 +57,16 @@ }, { "name": "chillerlan/php-qrcode", - "version": "4.2.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/chillerlan/php-qrcode.git", - "reference": "1972af7af51b203bc239d8fb94243f6ed2a1067a" + "reference": "4968063fb3baeedb658293f89f9673fbf2499a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/1972af7af51b203bc239d8fb94243f6ed2a1067a", - "reference": "1972af7af51b203bc239d8fb94243f6ed2a1067a", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/4968063fb3baeedb658293f89f9673fbf2499a3e", + "reference": "4968063fb3baeedb658293f89f9673fbf2499a3e", "shasum": "" }, "require": { @@ -119,28 +119,32 @@ ], "support": { "issues": "https://github.com/chillerlan/php-qrcode/issues", - "source": "https://github.com/chillerlan/php-qrcode/tree/4.2.0" + "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.0" }, "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, { "url": "https://ko-fi.com/codemasher", "type": "ko_fi" } ], - "time": "2020-10-07T14:41:07+00:00" + "time": "2020-11-18T20:49:20+00:00" }, { "name": "chillerlan/php-settings-container", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5" + "reference": "98ccc1b31b31a53bcb563465c4961879b2b93096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5", - "reference": "90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/98ccc1b31b31a53bcb563465c4961879b2b93096", + "reference": "98ccc1b31b31a53bcb563465c4961879b2b93096", "shasum": "" }, "require": { @@ -148,8 +152,8 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phan/phan": "^3.2.2", - "phpunit/phpunit": "9.4" + "phan/phan": "^4.0", + "phpunit/phpunit": "^9.5" }, "type": "library", "autoload": { @@ -181,12 +185,16 @@ "source": "https://github.com/chillerlan/php-settings-container" }, "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, { "url": "https://ko-fi.com/codemasher", "type": "ko_fi" } ], - "time": "2020-10-07T13:18:35+00:00" + "time": "2021-01-06T15:57:03+00:00" }, { "name": "colinmollenhour/credis", @@ -1158,9 +1166,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.2.2" + "source": "https://github.com/utopia-php/abuse/tree/0.3.1" }, - "time": "2020-10-23T06:51:42+00:00" + "time": "2020-12-21T17:28:03+00:00" }, { "name": "utopia-php/audit", @@ -1210,9 +1218,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.3.2" + "source": "https://github.com/utopia-php/audit/tree/0.5.1" }, - "time": "2020-10-23T08:09:44+00:00" + "time": "2020-12-21T17:28:53+00:00" }, { "name": "utopia-php/cache", @@ -1315,9 +1323,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.7.3" + "source": "https://github.com/utopia-php/cli/tree/0.8" }, - "time": "2020-11-02T07:50:18+00:00" + "time": "2020-12-14T06:31:42+00:00" }, { "name": "utopia-php/config", @@ -1694,12 +1702,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "dbb3c28ece24b36efa91be205f6f0b015bddc27c" + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/dbb3c28ece24b36efa91be205f6f0b015bddc27c", - "reference": "dbb3c28ece24b36efa91be205f6f0b015bddc27c", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", "shasum": "" }, "require": { @@ -1768,7 +1776,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/master" + "source": "https://github.com/amphp/amp/tree/v2.5.2" }, "funding": [ { @@ -1776,7 +1784,7 @@ "type": "github" } ], - "time": "2020-11-14T16:44:06+00:00" + "time": "2021-01-10T17:06:37+00:00" }, { "name": "amphp/byte-stream", @@ -1858,11 +1866,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.2.3", + "version": "0.4.4", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "6b564fef01fd681023c1d465783931bade04468d" + "reference": "ebb51e404a4e5b89f74428296b81ea347362dd33" }, "require": { "ext-curl": "*", @@ -1875,7 +1883,6 @@ "require-dev": { "phpunit/phpunit": "^7.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1893,7 +1900,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-12-23T21:58:58+00:00" + "time": "2021-01-11T09:34:56+00:00" }, { "name": "composer/package-versions-deprecated", @@ -1901,12 +1908,12 @@ "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "64291c788b9a18272346decf566931e33a317399" + "reference": "f921205948ab93bb19f86327c793a81edb62f236" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/64291c788b9a18272346decf566931e33a317399", - "reference": "64291c788b9a18272346decf566931e33a317399", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/f921205948ab93bb19f86327c793a81edb62f236", + "reference": "f921205948ab93bb19f86327c793a81edb62f236", "shasum": "" }, "require": { @@ -1967,7 +1974,7 @@ "type": "tidelift" } ], - "time": "2020-11-12T09:39:33+00:00" + "time": "2020-12-27T20:11:05+00:00" }, { "name": "composer/semver", @@ -2222,25 +2229,25 @@ }, { "name": "felixfbecker/advanced-json-rpc", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40" + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40", - "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", "shasum": "" }, "require": { "netresearch/jsonmapper": "^1.0 || ^2.0", - "php": ">=7.0", - "phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0" + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, "require-dev": { - "phpunit/phpunit": "^6.0.0" + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", "autoload": { @@ -2261,9 +2268,9 @@ "description": "A more advanced JSONRPC implementation", "support": { "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/master" + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" }, - "time": "2020-03-11T15:21:41+00:00" + "time": "2021-01-10T17:48:47+00:00" }, { "name": "felixfbecker/language-server-protocol", @@ -2324,16 +2331,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.64", + "version": "1.3.66", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855" + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/38f9d58c739687e269f46c6dff4647de9e2eb855", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", "shasum": "" }, "require": { @@ -2343,8 +2350,8 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "~1.0", - "phpunit/phpunit": "~4.8" + "matthiasmullie/scrapbook": "dev-master", + "phpunit/phpunit": ">=4.8" }, "suggest": { "psr/cache-implementation": "Cache implementation to use with Minify::cache" @@ -2382,9 +2389,23 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.64" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" }, - "time": "2020-12-23T13:37:53+00:00" + "funding": [ + { + "url": "https://github.com/[user1", + "type": "github" + }, + { + "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", + "type": "github" + }, + { + "url": "https://github.com/user2", + "type": "github" + } + ], + "time": "2021-01-06T15:18:10+00:00" }, { "name": "matthiasmullie/path-converter", @@ -3004,12 +3025,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6" + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad44fae76b874e7d49afb6923a66591e0a94bef6", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f", + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f", "shasum": "" }, "require": { @@ -3065,7 +3086,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ { @@ -3073,7 +3094,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:22+00:00" + "time": "2021-01-02T06:24:37+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3081,12 +3102,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4" + "reference": "cdb8225b328ef5e9647049954299211804000ce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/544be757d192233486ad9119dcb297ebbf5f2dd4", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cdb8225b328ef5e9647049954299211804000ce0", + "reference": "cdb8225b328ef5e9647049954299211804000ce0", "shasum": "" }, "require": { @@ -3134,7 +3155,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:43+00:00" + "time": "2021-01-02T06:22:20+00:00" }, { "name": "phpunit/php-invoker", @@ -3142,12 +3163,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0" + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/05210af8d0ab68c811ae61a4bc42b066d62b88a0", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/6fdda2828180f7d86cf66d822e6ad4bc124baf5d", + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d", "shasum": "" }, "require": { @@ -3198,7 +3219,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:51+00:00" + "time": "2021-01-02T06:22:25+00:00" }, { "name": "phpunit/php-text-template", @@ -3206,12 +3227,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b" + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/081fc9efc54b1b858b3497c142d82a0c36bc6755", + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755", "shasum": "" }, "require": { @@ -3258,7 +3279,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:23+00:00" + "time": "2021-01-02T06:22:47+00:00" }, { "name": "phpunit/php-timer", @@ -3266,12 +3287,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1" + "reference": "2194371fec37b03cfda3f8ab08aee33787350228" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/59e401088c91efeb76150f0a301aa79e3ac95fd1", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2194371fec37b03cfda3f8ab08aee33787350228", + "reference": "2194371fec37b03cfda3f8ab08aee33787350228", "shasum": "" }, "require": { @@ -3318,7 +3339,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:59+00:00" + "time": "2021-01-02T06:22:31+00:00" }, { "name": "phpunit/phpunit", @@ -3483,12 +3504,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63" + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/1012bd8df812778b8386c5e76cacd85b45cf329e", + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e", "shasum": "" }, "require": { @@ -3532,7 +3553,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:52+00:00" + "time": "2021-01-02T06:23:03+00:00" }, { "name": "sebastian/code-unit", @@ -3596,12 +3617,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d" + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f861b90785c30dc0743554f0e615d8f950dc8e9d", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f0a408b6519db241e624a62576dc5871d4ac8c14", + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14", "shasum": "" }, "require": { @@ -3644,7 +3665,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:38+00:00" + "time": "2021-01-02T06:21:36+00:00" }, { "name": "sebastian/comparator", @@ -3652,12 +3673,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f" + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1cfe9edf7ec9e4c18e54bb259110a053d09a899f", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fe4c68c639d9e580ec31bfc88b32641dc80a08d0", + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0", "shasum": "" }, "require": { @@ -3719,7 +3740,7 @@ "type": "github" } ], - "time": "2020-12-24T12:38:43+00:00" + "time": "2021-01-02T06:21:42+00:00" }, { "name": "sebastian/complexity", @@ -3727,12 +3748,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122" + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/23030bf3d3722767fdc5f8f2d2d99b03f4e58122", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c182133e92fc7a8b0a923b5d20f3a9fdfa534818", + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818", "shasum": "" }, "require": { @@ -3777,7 +3798,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:32+00:00" + "time": "2021-01-02T06:22:53+00:00" }, { "name": "sebastian/diff", @@ -3785,12 +3806,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4" + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/02178c586d5fbd59d348798d7122237a2907f8a4", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/33f7bf3c1741b2a10e16d5c41c369c402b933e4c", + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c", "shasum": "" }, "require": { @@ -3844,7 +3865,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:54+00:00" + "time": "2021-01-02T06:21:47+00:00" }, { "name": "sebastian/environment", @@ -3852,12 +3873,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1" + "reference": "b885263b3601b7570ef386a468d6a827c95c8994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7bb5a20ec06e366cb75b0e126169649c62b397b1", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b885263b3601b7570ef386a468d6a827c95c8994", + "reference": "b885263b3601b7570ef386a468d6a827c95c8994", "shasum": "" }, "require": { @@ -3908,7 +3929,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:03+00:00" + "time": "2021-01-02T06:21:52+00:00" }, { "name": "sebastian/exporter", @@ -3916,12 +3937,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58" + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/91975a2dbcf4a89184d9e4143c06b88d89644b58", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f670c4f17dffab83b44048f6fe6747a7c6097179", + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179", "shasum": "" }, "require": { @@ -3986,7 +4007,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:11+00:00" + "time": "2021-01-02T06:21:58+00:00" }, { "name": "sebastian/global-state", @@ -3994,12 +4015,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25" + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0471b24bddeb05ffd0a5edc6837796f339068c25", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a74d82a0654a7f685f80016cc3570d7a387f9da0", + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0", "shasum": "" }, "require": { @@ -4051,7 +4072,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:19+00:00" + "time": "2021-01-02T06:22:03+00:00" }, { "name": "sebastian/lines-of-code", @@ -4059,12 +4080,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24" + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/219c932af1aeee0b4eccbc53af2181ff50e14b24", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/db62e01f14ea9485d5a52dfb5706061fd0f50425", + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425", "shasum": "" }, "require": { @@ -4109,7 +4130,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:42+00:00" + "time": "2021-01-02T06:22:58+00:00" }, { "name": "sebastian/object-enumerator", @@ -4117,12 +4138,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e" + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/da36684b10f17db8718e314fa8d84b2e0ed7132e", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/fccb61351e8a3a10ffacfad9544bb2905905b69c", + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c", "shasum": "" }, "require": { @@ -4167,7 +4188,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:27+00:00" + "time": "2021-01-02T06:22:09+00:00" }, { "name": "sebastian/object-reflector", @@ -4175,12 +4196,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "6717d193da503616e69462cf98e2af3f4443335d" + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6717d193da503616e69462cf98e2af3f4443335d", - "reference": "6717d193da503616e69462cf98e2af3f4443335d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", "shasum": "" }, "require": { @@ -4223,7 +4244,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:35+00:00" + "time": "2021-01-02T06:22:14+00:00" }, { "name": "sebastian/recursion-context", @@ -4231,12 +4252,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cee249a3e471aa870067fa6155991230c7507924" + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cee249a3e471aa870067fa6155991230c7507924", - "reference": "cee249a3e471aa870067fa6155991230c7507924", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c5616ce32278e62c77066f72b1fe413a8c958cee", + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee", "shasum": "" }, "require": { @@ -4287,7 +4308,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:07+00:00" + "time": "2021-01-02T06:22:36+00:00" }, { "name": "sebastian/resource-operations", @@ -4351,12 +4372,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0" + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/67bfce3beb94968d175fdf117b80fc9a6b60bdd0", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/655e3b59cc2e508306dba9c3df08b774055548e7", + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7", "shasum": "" }, "require": { @@ -4400,7 +4421,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:15+00:00" + "time": "2021-01-02T06:22:42+00:00" }, { "name": "sebastian/version", @@ -4500,12 +4521,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9" + "reference": "5ff54ffca91d307dfcb144af4748571eb9346b71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", + "url": "https://api.github.com/repos/symfony/console/zipball/5ff54ffca91d307dfcb144af4748571eb9346b71", + "reference": "5ff54ffca91d307dfcb144af4748571eb9346b71", "shasum": "" }, "require": { @@ -4565,7 +4586,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "keywords": [ "cli", @@ -4590,7 +4611,7 @@ "type": "tidelift" } ], - "time": "2020-12-18T08:03:24+00:00" + "time": "2021-01-11T06:08:00+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4598,12 +4619,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -4616,7 +4637,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4654,7 +4675,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/main" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" }, "funding": [ { @@ -4670,7 +4691,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4678,12 +4699,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/be092746c3ab9f9c62608c82e0f04687f8a879f9", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { @@ -4696,7 +4717,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4736,7 +4757,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/main" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.0" }, "funding": [ { @@ -4752,7 +4773,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T15:40:22+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -4760,12 +4781,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/69609f9f06790591b4b13a45ee117e7bab6395aa", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { @@ -4778,7 +4799,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4821,7 +4842,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/main" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0" }, "funding": [ { @@ -4837,7 +4858,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4845,12 +4866,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/401c9d9d3400c53a8f1a39425f0543406c137a43", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { @@ -4863,7 +4884,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4902,7 +4923,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/main" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" }, "funding": [ { @@ -4918,7 +4939,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", @@ -4926,12 +4947,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8c0d39c1526009b97f43beea4cc685bbc353a70b", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -4941,7 +4962,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4982,7 +5003,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/main" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0" }, "funding": [ { @@ -4998,7 +5019,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", @@ -5006,12 +5027,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/3a11f3dfb34ad50f978cb2b8cf936933b87739aa", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { @@ -5021,7 +5042,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5066,7 +5087,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/main" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0" }, "funding": [ { @@ -5082,7 +5103,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/service-contracts", @@ -5090,12 +5111,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366" + "reference": "cea83947622b432b60b809d14c7b42df9f0f5823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/5c448a39281b671be2cc8d208e6df75ac2d4b366", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/cea83947622b432b60b809d14c7b42df9f0f5823", + "reference": "cea83947622b432b60b809d14c7b42df9f0f5823", "shasum": "" }, "require": { @@ -5163,7 +5184,7 @@ "type": "tidelift" } ], - "time": "2020-12-23T15:38:30+00:00" + "time": "2021-01-11T09:51:46+00:00" }, { "name": "symfony/string", @@ -5171,12 +5192,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" + "reference": "7a62495108b3dc7e749b709357ae720fccb5a39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "url": "https://api.github.com/repos/symfony/string/zipball/7a62495108b3dc7e749b709357ae720fccb5a39b", + "reference": "7a62495108b3dc7e749b709357ae720fccb5a39b", "shasum": "" }, "require": { @@ -5220,7 +5241,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ "grapheme", @@ -5231,7 +5252,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.1" + "source": "https://github.com/symfony/string/tree/5.x" }, "funding": [ { @@ -5247,7 +5268,7 @@ "type": "tidelift" } ], - "time": "2020-12-05T07:33:16+00:00" + "time": "2021-01-10T16:38:27+00:00" }, { "name": "theseer/tokenizer", @@ -5305,12 +5326,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b" + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c5379903e5640e5f29024e71aa0817f7bd56102b", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", "shasum": "" }, "require": { @@ -5376,7 +5397,7 @@ "type": "tidelift" } ], - "time": "2020-11-27T13:05:37+00:00" + "time": "2021-01-05T15:39:16+00:00" }, { "name": "vimeo/psalm", diff --git a/docker-compose.yml b/docker-compose.yml index 0d1abc0ad9..2acd6d3ed2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -105,6 +105,7 @@ services: - _APP_STORAGE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_CONTAINERS + - _APP_SYSTEM_RESPONSE_FORMAT - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY - _APP_FUNCTIONS_MEMORY_SWAP 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/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..d4c2d0312d --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetBrowser("aa"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..d0ab8d7205 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetCreditCard("amex"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..85155dbfd4 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetFavicon("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..031b52af14 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetFlag("af"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..d8e6c98558 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetImage("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..177216034b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetInitials(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e057ed6877 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Avatars avatars = new Avatars(client); + +string result = await avatars.GetQR("[TEXT]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md new file mode 100644 index 0000000000..7e519655b2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.CreateCollection("[NAME]", [List], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md new file mode 100644 index 0000000000..be00512f29 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.CreateDocument("[COLLECTION_ID]", [object], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md new file mode 100644 index 0000000000..4648a3e194 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.DeleteCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md new file mode 100644 index 0000000000..80f413b468 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md new file mode 100644 index 0000000000..88f046ba2e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.GetCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md new file mode 100644 index 0000000000..1d425bac59 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md new file mode 100644 index 0000000000..593438d255 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.ListCollections(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md new file mode 100644 index 0000000000..36e31468f9 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.ListDocuments("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md new file mode 100644 index 0000000000..c28830be3c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.UpdateCollection("[COLLECTION_ID]", "[NAME]", [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md new file mode 100644 index 0000000000..32176af3da --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Database database = new Database(client); + +HttpResponseMessage result = await database.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", [object], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..a287ec4617 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetAntiVirus(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..66c72f77b6 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetCache(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..94e3556b4e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetDB(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..f0dbb9086b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueCertificates(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c0a0b14628 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueFunctions(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..11ea9dbff1 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueLogs(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..291e5ea8bd --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueTasks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..ecd4f69180 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueUsage(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..b16a368469 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetQueueWebhooks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..793d9c8667 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetStorageLocal(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..00431f7b2f --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.GetTime(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get.md b/docs/examples/0.6.2/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..f487428928 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Health health = new Health(client); + +HttpResponseMessage result = await health.Get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md new file mode 100644 index 0000000000..ad5590032c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetContinents(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..6bd92406cf --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetCountriesEU(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..2952035a5a --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetCountriesPhones(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md new file mode 100644 index 0000000000..fa65eede63 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetCountries(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md new file mode 100644 index 0000000000..bfe091796c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetCurrencies(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md new file mode 100644 index 0000000000..5bb2571246 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.GetLanguages(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..ba59d83b7b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Locale locale = new Locale(client); + +HttpResponseMessage result = await locale.Get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..8c1e80e8c3 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +HttpResponseMessage result = await storage.CreateFile(new File("./path-to-files/image.jpg"), [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..c78d0fbeb2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +HttpResponseMessage result = await storage.DeleteFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..4f0f940130 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +string result = await storage.GetFileDownload("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..1c7df59c31 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +string result = await storage.GetFilePreview("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..61843791d2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +string result = await storage.GetFileView("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..a23d658b10 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +HttpResponseMessage result = await storage.GetFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..df57620627 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +HttpResponseMessage result = await storage.ListFiles(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..fd62fa4049 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Storage storage = new Storage(client); + +HttpResponseMessage result = await storage.UpdateFile("[FILE_ID]", [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..7391cc6fff --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.CreateMembership("[TEAM_ID]", "email@example.com", [List], "https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..a78e517308 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.Create("[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..d551dbf3aa --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.DeleteMembership("[TEAM_ID]", "[INVITE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..a08d23519c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.Delete("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md new file mode 100644 index 0000000000..1d76616f5e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.GetMemberships("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..796f600bd9 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.Get("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/list.md b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..648003524d --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.List(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/update.md b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md new file mode 100644 index 0000000000..54ed78db72 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Teams teams = new Teams(client); + +HttpResponseMessage result = await teams.Update("[TEAM_ID]", "[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/create.md b/docs/examples/0.6.2/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..1f7fab70a7 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/create.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.Create("email@example.com", "password"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..fd322868ab --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.DeleteSession("[USER_ID]", "[SESSION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..d2ed98e479 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.DeleteSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md new file mode 100644 index 0000000000..bf9db43c23 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.GetLogs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..b92ed4c20a --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.GetPrefs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md new file mode 100644 index 0000000000..2431460668 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.GetSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get.md b/docs/examples/0.6.2/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..93c31c599c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.Get("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/list.md b/docs/examples/0.6.2/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..f85440c498 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/list.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.List(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..0cfb05f912 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.UpdatePrefs("[USER_ID]", [object]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..a2b00ff16c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key +; + +Users users = new Users(client); + +HttpResponseMessage result = await users.UpdateStatus("[USER_ID]", "1"); 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/services/account.md b/docs/services/account.md index 0251765299..94085b1d8d 100644 --- a/docs/services/account.md +++ b/docs/services/account.md @@ -2,4 +2,7 @@ The Account service allows you to authenticate and manage a user account. You ca You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. -This service also exposes an endpoint to save and read the [user preferences](/docs/client/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user preferred locale, timezone, or custom app theme. \ No newline at end of file +This service also exposes an endpoint to save and read the [user preferences](/docs/client/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user preferred locale, timezone, or custom app theme. + +> ## Account API vs Users API +> While the Account API operates in the scope of the current logged in user and usually using a client-side integration, the Users API is integrated from the server-side and operates in an admin scope with access to all your project users. \ No newline at end of file diff --git a/docs/services/users.md b/docs/services/users.md index 06c799aa2c..e1dec36756 100644 --- a/docs/services/users.md +++ b/docs/services/users.md @@ -1 +1,4 @@ -The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info. \ No newline at end of file +The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info. + +> ## Users API vs Account API +> While the Users API is integrated from the server-side and operates in an admin scope with access to all your project users, the Account API operates in the scope of the current logged in user and usually using a client-side integration. \ No newline at end of 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; diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index a854416c3f..9fbb82389a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -6,6 +6,7 @@ use Exception; use Utopia\Swoole\Response as SwooleResponse; use Swoole\Http\Response as SwooleHTTPResponse; use Appwrite\Database\Document; +use Appwrite\Utopia\Response\Filter; use Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response\Model\None; use Appwrite\Utopia\Response\Model\Any; @@ -37,6 +38,7 @@ use Appwrite\Utopia\Response\Model\Tag; use Appwrite\Utopia\Response\Model\Task; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Webhook; +use stdClass; /** * @method public function setStatusCode(int $code = 200): Response @@ -112,6 +114,11 @@ class Response extends SwooleResponse const MODEL_DOMAIN = 'domain'; const MODEL_DOMAIN_LIST = 'domainList'; + /** + * @var Filter + */ + private static $filter = null; + /** * @var array */ @@ -243,7 +250,14 @@ class Response extends SwooleResponse */ public function dynamic(Document $document, string $model): void { - $this->json($this->output($document, $model)); + $output = $this->output($document, $model); + + // If filter is set, parse the item + if(self::isFilter()){ + $item = self::getFilter()->parse($output, $model); + } + + $this->json(!empty($output) ? $output : new stdClass()); } /** @@ -329,4 +343,37 @@ class Response extends SwooleResponse { return $this->payload; } + + + /** + * Function to set a response filter + * + * @param $filter the response filter to set + * + * @return void + */ + public static function setFilter(?Filter $filter) + { + self::$filter = $filter; + } + + /** + * Return the currently set filter + * + * @return Filter + */ + public static function getFilter(): ?Filter + { + return self::$filter; + } + + /** + * Check if a filter has been set + * + * @return bool + */ + public static function isFilter(): bool + { + return self::$filter != null; + } } diff --git a/src/Appwrite/Utopia/Response/Filter.php b/src/Appwrite/Utopia/Response/Filter.php new file mode 100644 index 0000000000..6974c4ba89 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Filter.php @@ -0,0 +1,17 @@ +parseCollection($content); + break; + + case Response::MODEL_COLLECTION_LIST: + $parsedResponse = $this->parseCollectionList($content); + break; + + case Response::MODEL_FILE : + $parsedResponse = $this->parseFile($content); + break; + + case Response::MODEL_FILE_LIST : + $parsedResponse = $content; + break; + + case Response::MODEL_USER : + $parsedResponse = $this->parseUser($content); + break; + + case Response::MODEL_USER_LIST: + $parsedResponse = $this->parseUserList($content); + break; + + case Response::MODEL_TEAM: + $parsedResponse = $this->parseTeam($content); + break; + + case Response::MODEL_TEAM_LIST: + $parsedResponse = $this->parseTeamList($content); + break; + + case Response::MODEL_MEMBERSHIP: + $parsedResponse = $content; + break; + + case Response::MODEL_MEMBERSHIP_LIST: + $parsedResponse = $content['memberships']; + break; + + case Response::MODEL_SESSION : + $parsedResponse = $this->parseSession($content); + break; + + case Response::MODEL_SESSION_LIST : + $parsedResponse = $this->parseSessionList($content); + break; + + case Response::MODEL_LOG_LIST : + $parsedResponse = $this->parseLogList($content); + break; + + case Response::MODEL_TOKEN: + $parsedResponse = $this->parseToken($content); + break; + + case Response::MODEL_LOCALE: + $parsedResponse = $this->parseLocale($content); + break; + + case Response::MODEL_COUNTRY_LIST: + $parsedResponse = $this->parseCountryList($content); + break; + + case Response::MODEL_PHONE_LIST: + $parsedResponse = $this->parsePhoneList($content); + break; + + case Response::MODEL_CONTINENT_LIST: + $parsedResponse = $this->parseContinentList($content); + break; + + case Response::MODEL_CURRENCY_LIST: + $parsedResponse = $this->parseCurrencyList($content); + break; + + case Response::MODEL_ANY : + $parsedResponse = $content; + break; + + default: + throw new Exception('Recevied invalid model : '.$model); + } + + return $parsedResponse; + } + + private function parseCollectionList(array $content) + { + foreach($content['collections'] as $key => $collection){ + $content['collections'][$key] = $this->parseCollection($collection); + } + return $content; + } + + private function parseCollection(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_COLLECTIONS; + $content['structure'] = true; + return $content; + } + + private function parseFile(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_FILES; + $content['algorithm'] = 'gzip'; + $content['comment'] = ''; + $content['fileOpenSSLCipher'] = OpenSSL::CIPHER_AES_128_GCM; + $content['fileOpenSSLIV'] = ''; + $content['fileOpenSSLTag'] = ''; + $content['fileOpenSSLVersion'] = ''; + $content['folderId'] = ''; + $content['path'] = ''; + $content['sizeActual'] = $content['sizeOriginal']; + $content['token'] = ''; + return $content; + } + + private function parseCurrencyList(array $content) + { + $content['locations'] = []; + $currencies = $content['currencies']; + $parsedResponse = []; + foreach($currencies as $currency) { + $currency['locations'] = []; + $parsedResponse[] = $currency; + } + $content['currencies'] = $parsedResponse; + return $content; + } + + private function parseContinentList(array $content) + { + $continents = $content['continents']; + $parsedResponse = []; + foreach($continents as $continent) { + $parsedResponse[$continent['code']] = $continent['name']; + } + $content['continents'] = $parsedResponse; + return $content; + } + + private function parsePhoneList(array $content) + { + $phones = $content['phones']; + $parsedResponse = []; + foreach($phones as $phone) { + $parsedResponse[$phone['countryCode']] = $phone['code']; + } + $content['phones'] = $parsedResponse; + return $content; + } + + private function parseCountryList(array $content) + { + $countries = $content['countries']; + $parsedResponse = []; + foreach($countries as $country) { + $parsedResponse[$country['code']] = $country['name']; + } + $content['countries'] = $parsedResponse; + return $content; + } + + private function parseLocale(array $content) + { + $content['ip'] = $content['ip'] ?? ''; + $content['countryCode'] = $content['countryCode'] ?? '--'; + $content['country'] = $content['country'] ?? Locale::getText('locale.country.unknown'); + $content['continent'] = $content['continent'] ?? Locale::getText('locale.country.unknown'); + $content['continentCode'] = $content['continentCode'] ?? '--'; + $content['eu'] = $content['eu'] ?? false; + $content['currency'] = $content['currency'] ?? null; + return $content; + } + + private function parseToken(array $content) + { + $content['type'] = Auth::TOKEN_TYPE_RECOVERY; + return $content; + } + + private function parseTeam(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_TEAMS; + $content['$permissions'] = []; + return $content; + } + + private function parseTeamList(array $content) + { + $teams = $content['teams']; + $parsedResponse = []; + foreach($teams as $team) { + $parsedResponse[] = $this->parseTeam($team); + } + $content['teams'] = $parsedResponse; + return $content; + } + + private function parseLogList(array $content) + { + $logs = $content['logs']; + $parsedResponse = []; + foreach($logs as $log) { + $parsedResponse[] = [ + 'brand' => $log['deviceBrand'], + 'device' => $log['deviceName'], + 'event' => $log['event'], + 'ip' => $log['ip'], + 'model' => $log['deviceModel'], + 'time' => $log['time'], + 'geo' => [ + 'isoCode' => empty($log['countryCode']) ? '---' : $log['countryCode'] , + 'country' => empty($log['countryName'] ) ? Locale::getText('locale.country.unknown') : $log['countryName'] + ], + 'OS' => [ + 'name' => $log['osName'], + 'platform' => '', + 'short_name' => $log['osCode'], + 'version' => $log['osVersion'] + ], + 'client' => [ + 'engine' => $log['clientEngine'], + 'name' => $log['clientName'], + 'short_name' => $log['clientCode'], + 'type' => $log['clientType'], + 'version' => $log['clientVersion'] + ] + ]; + } + $content['logs'] = $parsedResponse; + return $content; + } + + private function parseSessionList(array $content) + { + $sessions = $content['sessions']; + $parsedResponse = []; + foreach($sessions as $session) { + $parsedResponse[] = [ + '$id' => $session['$id'], + 'brand' => $session['deviceBrand'], + 'current' => $session['current'], + 'device' => $session['deviceName'], + 'ip' => $session['ip'], + 'model' => $session['deviceModel'], + 'geo' => [ + 'isoCode' => empty($session['countryCode']) ? '---' : $session['countryCode'] , + 'country' => empty($session['countryName'] ) ? Locale::getText('locale.country.unknown') : $session['countryName'] + ], + 'OS' => [ + 'name' => $session['osName'], + 'platform' => '', + 'short_name' => $session['osCode'], + 'version' => $session['osVersion'] + ], + 'client' => [ + 'engine' => $session['clientEngine'], + 'name' => $session['clientName'], + 'short_name' => $session['clientCode'], + 'type' => $session['clientType'], + 'version' => $session['clientVersion'] + ] + ]; + } + $content['sessions'] = $parsedResponse; + return $content; + } + + private function parseSession(array $content) + { + $content['type'] = Auth::TOKEN_TYPE_LOGIN; + return $content; + } + + private function parseUserList(array $content) + { + $users = $content['users']; + $parsedResponse = []; + foreach($users as $user) { + $parsedResponse[] = $this->parseUser($user); + } + $content['users'] = $parsedResponse; + return $content; + } + + private function parseUser(array $content) + { + foreach (Config::getParam('providers', []) as $key => $provider) { + if (!$provider['enabled']) { + continue; + } + $content['oauth2'.ucfirst($key)] = ''; + $content['oauth2'.ucfirst($key).'AccessToken'] = ''; + } + $content['status'] = empty($content['status']) ? 0 : $content['status']; + $content['roles'] = Authorization::getRoles() ?? []; + return $content; + } +} \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/User.php b/src/Appwrite/Utopia/Response/Model/User.php index 79c34db5ef..e11d49ed8f 100644 --- a/src/Appwrite/Utopia/Response/Model/User.php +++ b/src/Appwrite/Utopia/Response/Model/User.php @@ -27,7 +27,7 @@ class User extends Model ]) ->addRule('status', [ 'type' => self::TYPE_INTEGER, - 'description' => 'User status. 0 for Unavtivated, 1 for active and 2 is blocked.', + 'description' => 'User status. 0 for Unactivated, 1 for active and 2 is blocked.', 'example' => 0, ]) ->addRule('email', [ diff --git a/tests/e2e/Services/Avatars/AvatarsBase.php b/tests/e2e/Services/Avatars/AvatarsBase.php index e27be04e18..62722fbed3 100644 --- a/tests/e2e/Services/Avatars/AvatarsBase.php +++ b/tests/e2e/Services/Avatars/AvatarsBase.php @@ -336,6 +336,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(400, $image->getImageWidth()); + $this->assertEquals(400, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-default.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -347,6 +354,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -359,6 +373,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200-margin-10.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -368,6 +389,13 @@ trait AvatarsBase 'download' => 1, ]); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200-margin-10.png')), strlen($response['body'])); + $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals('attachment; filename="qr.png"', $response['headers']['content-disposition']); $this->assertEquals('image/png', $response['headers']['content-type']); diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 14805273e6..ebefa2abb9 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -125,12 +125,12 @@ trait UsersBase /** * @depends testGetUser */ - public function testUpdateUserPrefs(array $data):array + public function testUpdateAndGetUserPrefs(array $data):array { /** * Test for SUCCESS */ - $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/prefs', array_merge([ + $user = $this->client->call(Client::METHOD_PATCH, '/users/'.$data['userId'].'/prefs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -144,6 +144,17 @@ trait UsersBase $this->assertEquals($user['body']['funcKey1'], 'funcValue1'); $this->assertEquals($user['body']['funcKey2'], 'funcValue2'); + $user = $this->client->call(Client::METHOD_GET, '/users/'.$data['userId'].'/prefs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals($user['headers']['status-code'], 200); + $this->assertEquals($user['body'], [ + 'funcKey1' => 'funcValue1', + 'funcKey2' => 'funcValue2', + ]); + /** * Test for FAILURE */ diff --git a/tests/resources/qr/qr-default.png b/tests/resources/qr/qr-default.png new file mode 100644 index 0000000000..a7da496d9f Binary files /dev/null and b/tests/resources/qr/qr-default.png differ diff --git a/tests/resources/qr/qr-size-200-margin-10.png b/tests/resources/qr/qr-size-200-margin-10.png new file mode 100644 index 0000000000..56c59408ef Binary files /dev/null and b/tests/resources/qr/qr-size-200-margin-10.png differ diff --git a/tests/resources/qr/qr-size-200.png b/tests/resources/qr/qr-size-200.png new file mode 100644 index 0000000000..202c0cc197 Binary files /dev/null and b/tests/resources/qr/qr-size-200.png differ diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php new file mode 100644 index 0000000000..6bc98e0137 --- /dev/null +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -0,0 +1,520 @@ +filter = new V06(); + } + + public function testParseUser() + { + $content = [ + '$id' => '5e5ea5c16897e', + 'name' => 'John Doe', + 'registration' => 1592981250, + 'status' => 0, + 'email' => 'john@appwrite.io', + 'emailVerification' => false, + 'prefs' => [ + 'theme' => 'pink', + 'timezone' => 'UTC' + ] + ]; + + Config::load('providers', __DIR__.'/../../../../app/config/providers.php'); + + $model = Response::MODEL_USER; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['name'], 'John Doe'); + $this->assertEquals($parsedResponse['registration'], 1592981250); + $this->assertEquals($parsedResponse['status'], 0); + $this->assertEquals($parsedResponse['email'], 'john@appwrite.io'); + $this->assertEquals($parsedResponse['emailVerification'], false); + $this->assertEquals($parsedResponse['prefs'], ['theme' => 'pink', 'timezone' => 'UTC']); + $this->assertEquals($parsedResponse['status'], 0); + $this->assertEquals($parsedResponse['roles'], Authorization::getRoles() ?? []); + } + + public function testParseUserList() + { + $content = [ + 'sum' => 1, + 'users' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + 'name' => 'John Doe', + 'registration' => 1592981250, + 'status' => 0, + 'email' => 'john@appwrite.io', + 'emailVerification' => false, + 'prefs' => [ + 'theme' => 'pink', + 'timezone' => 'UTC' + ] + ] + ] + ]; + + Config::load('providers', __DIR__.'/../../../../app/config/providers.php'); + + $model = Response::MODEL_USER_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['users'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['users'][0]['name'], 'John Doe'); + $this->assertEquals($parsedResponse['users'][0]['registration'], 1592981250); + $this->assertEquals($parsedResponse['users'][0]['status'], 0); + $this->assertEquals($parsedResponse['users'][0]['email'], 'john@appwrite.io'); + $this->assertEquals($parsedResponse['users'][0]['emailVerification'], false); + $this->assertEquals($parsedResponse['users'][0]['prefs'], ['theme' => 'pink', 'timezone' => 'UTC']); + $this->assertEquals($parsedResponse['users'][0]['status'], 0); + $this->assertEquals($parsedResponse['users'][0]['roles'], Authorization::getRoles() ?? []); + } + + public function testParseSession() + { + $content = [ + '$id' => '5e5ea5c16897e', + 'userId' => '5e5bb8c16897e', + 'expire' => 1592981250, + 'ip' => '127.0.0.1', + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States', + 'current' => true + ]; + + $model = Response::MODEL_SESSION; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['userId'], '5e5bb8c16897e'); + $this->assertEquals($parsedResponse['expire'], 1592981250); + $this->assertEquals($parsedResponse['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['osCode'], 'Mac'); + $this->assertEquals($parsedResponse['osName'], 'Mac'); + $this->assertEquals($parsedResponse['osVersion'], 'Mac'); + $this->assertEquals($parsedResponse['clientType'], 'browser'); + $this->assertEquals($parsedResponse['clientCode'], 'CM'); + $this->assertEquals($parsedResponse['clientName'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['clientVersion'], '84.0'); + $this->assertEquals($parsedResponse['clientEngine'], 'WebKit'); + $this->assertEquals($parsedResponse['clientEngineVersion'], '605.1.15'); + $this->assertEquals($parsedResponse['deviceName'], 'smartphone'); + $this->assertEquals($parsedResponse['deviceBrand'], 'Google'); + $this->assertEquals($parsedResponse['deviceModel'], 'Nexus 5'); + $this->assertEquals($parsedResponse['countryCode'], 'US'); + $this->assertEquals($parsedResponse['countryName'], 'United States'); + $this->assertEquals($parsedResponse['current'], true); + $this->assertEquals($parsedResponse['type'], Auth::TOKEN_TYPE_LOGIN); + } + + public function testParseSessionList() + { + $content = [ + 'sum' => 1, + 'sessions' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + 'userId' => '5e5bb8c16897e', + 'expire' => 1592981250, + 'ip' => '127.0.0.1', + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States', + 'current' => true + ] + ] + ]; + + $model = Response::MODEL_SESSION_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['sessions'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['sessions'][0]['brand'], 'Google'); + $this->assertEquals($parsedResponse['sessions'][0]['current'], true); + $this->assertEquals($parsedResponse['sessions'][0]['device'], 'smartphone'); + $this->assertEquals($parsedResponse['sessions'][0]['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['sessions'][0]['model'], 'Nexus 5'); + + $this->assertEquals($parsedResponse['sessions'][0]['OS']['name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['platform'], ''); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['short_name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], 'Mac'); + + $this->assertEquals($parsedResponse['sessions'][0]['client']['engine'], 'WebKit'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['name'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['short_name'], 'CM'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['type'], 'browser'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['version'], '84.0'); + + $this->assertEquals($parsedResponse['sessions'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); + } + + public function testParseLogList() + { + $content = [ + 'sum' => 1, + 'logs' => [ + 0 => [ + 'event' => 'account.sessions.create', + 'ip' => '127.0.0.1', + 'time' => 1592981250, + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States' + ] + ] + ]; + + $model = Response::MODEL_LOG_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['logs'][0]['brand'], 'Google'); + $this->assertEquals($parsedResponse['logs'][0]['device'], 'smartphone'); + $this->assertEquals($parsedResponse['logs'][0]['event'], 'account.sessions.create'); + $this->assertEquals($parsedResponse['logs'][0]['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['logs'][0]['model'], 'Nexus 5'); + $this->assertEquals($parsedResponse['logs'][0]['time'], 1592981250); + + $this->assertEquals($parsedResponse['logs'][0]['OS']['name'], 'Mac'); + $this->assertEquals($parsedResponse['logs'][0]['OS']['platform'], ''); + $this->assertEquals($parsedResponse['logs'][0]['OS']['short_name'], 'Mac'); + $this->assertEquals($parsedResponse['logs'][0]['OS']['version'], 'Mac'); + + $this->assertEquals($parsedResponse['logs'][0]['client']['engine'], 'WebKit'); + $this->assertEquals($parsedResponse['logs'][0]['client']['name'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['logs'][0]['client']['short_name'], 'CM'); + $this->assertEquals($parsedResponse['logs'][0]['client']['type'], 'browser'); + $this->assertEquals($parsedResponse['logs'][0]['client']['version'], '84.0'); + + $this->assertEquals($parsedResponse['logs'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['logs'][0]['geo']['country'], 'United States'); + } + + public function testParseTeam() + { + $content = [ + '$id' => '5ff45ef261829', + 'name' => 'test', + 'dateCreated' => 1592981250, + 'sum' => 7 + ]; + + $model = Response::MODEL_TEAM; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5ff45ef261829'); + $this->assertEquals($parsedResponse['name'], 'test'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['sum'], 7); + $this->assertEquals($parsedResponse['$collection'], 'teams'); + $this->assertEquals($parsedResponse['$permissions'], []); + } + + public function testParseTeamList() + { + $content = [ + 'sum' => 1, + 'teams' => [ + 0 => [ + '$id' => '5ff45ef261829', + 'name' => 'test', + 'dateCreated' => 1592981250, + 'sum' => 7 + ] + ] + ]; + + $model = Response::MODEL_TEAM_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['teams'][0]['$id'], '5ff45ef261829'); + $this->assertEquals($parsedResponse['teams'][0]['name'], 'test'); + $this->assertEquals($parsedResponse['teams'][0]['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['teams'][0]['sum'], 7); + $this->assertEquals($parsedResponse['teams'][0]['$collection'], 'teams'); + $this->assertEquals($parsedResponse['teams'][0]['$permissions'], []); + + } + + public function testParseToken() + { + $content = [ + '$id' => 'bb8ea5c16897e', + 'userId' => '5e5ea5c168bb8', + 'secret' => '', + 'expire' => 1592981250 + ]; + + $model = Response::MODEL_TOKEN; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], 'bb8ea5c16897e'); + $this->assertEquals($parsedResponse['userId'], '5e5ea5c168bb8'); + $this->assertEquals($parsedResponse['expire'], 1592981250); + $this->assertEquals($parsedResponse['secret'], ''); + $this->assertEquals($parsedResponse['type'], Auth::TOKEN_TYPE_RECOVERY); + } + + public function testParseLocale() + { + $content = [ + 'ip' => '127.0.0.1', + 'countryCode' => 'US', + 'country' => 'United States', + 'continentCode' => 'NA', + 'continent' => 'North America', + 'eu' => false, + 'currency' => 'USD' + ]; + + $model = Response::MODEL_LOCALE; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['countryCode'], 'US'); + $this->assertEquals($parsedResponse['country'], 'United States'); + $this->assertEquals($parsedResponse['continentCode'], 'NA'); + $this->assertEquals($parsedResponse['continent'], 'North America'); + $this->assertEquals($parsedResponse['eu'], false); + $this->assertEquals($parsedResponse['currency'], 'USD'); + } + + public function testParseCountryList() + { + $content = [ + 'sum' => 1, + 'countries' => [ + 0 => [ + 'name' => 'United States', + 'code' => 'US' + ] + ] + ]; + + $model = Response::MODEL_COUNTRY_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['countries']['US'], 'United States'); + } + + public function testParsePhoneList() + { + $content = [ + 'sum' => 1, + 'phones' => [ + 0 => [ + 'code' => '+1', + 'countryCode' => 'US', + 'countryName' => 'United States' + ] + ] + ]; + + $model = Response::MODEL_PHONE_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['phones']['US'], '+1'); + } + + public function testParseContinentList() + { + $content = [ + 'sum' => 1, + 'continents' => [ + 0 => [ + 'name' => 'Europe', + 'code' => 'EU', + ] + ] + ]; + + $model = Response::MODEL_CONTINENT_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['continents']['EU'], 'Europe'); + } + + public function testParseCurrencyList() + { + $content = [ + 'sum' => 1, + 'currencies' => [ + 0 => [ + 'symbol' => '$', + 'name' => 'US dollar', + 'symbolNative' => '$', + 'decimalDigits' => 2, + 'rounding' => 0, + 'code' => 'USD', + 'namePlural' => 'US Dollars' + ] + ] + ]; + + $model = Response::MODEL_CURRENCY_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['currencies'][0]['symbol'], '$'); + $this->assertEquals($parsedResponse['currencies'][0]['name'], 'US dollar'); + $this->assertEquals($parsedResponse['currencies'][0]['symbolNative'], '$'); + $this->assertEquals($parsedResponse['currencies'][0]['decimalDigits'], 2); + $this->assertEquals($parsedResponse['currencies'][0]['rounding'], 0); + $this->assertEquals($parsedResponse['currencies'][0]['code'], 'USD'); + $this->assertEquals($parsedResponse['currencies'][0]['namePlural'], 'US Dollars'); + $this->assertEquals($parsedResponse['currencies'][0]['locations'], []); + } + + public function testParseFile() + { + $content = [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Pink.png', + 'dateCreated' => 1592981250, + 'signature' => '5d529fd02b544198ae075bd57c1762bb', + 'mimeType' => 'image/png', + 'sizeOriginal' => 17890 + ]; + + $model = Response::MODEL_FILE; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['name'], 'Pink.png'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['signature'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['mimeType'], 'image/png'); + $this->assertEquals($parsedResponse['sizeOriginal'], 17890); + $this->assertEquals($parsedResponse['$collection'], Database::SYSTEM_COLLECTION_FILES); + $this->assertEquals($parsedResponse['algorithm'], 'gzip'); + $this->assertEquals($parsedResponse['comment'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLCipher'], OpenSSL::CIPHER_AES_128_GCM); + $this->assertEquals($parsedResponse['fileOpenSSLIV'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLTag'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLVersion'], ''); + $this->assertEquals($parsedResponse['folderId'], ''); + $this->assertEquals($parsedResponse['path'], ''); + $this->assertEquals($parsedResponse['sizeActual'], $content['sizeOriginal']); + $this->assertEquals($parsedResponse['token'], ''); + } + + public function testParseCollection() + { + $content = [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Movies', + 'dateCreated' => 1592981250, + 'dateUpdated' => '5d529fd02b544198ae075bd57c1762bb', + 'rules' => [] + ]; + + $model = Response::MODEL_COLLECTION; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['name'], 'Movies'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['dateUpdated'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['rules'], []); + $this->assertEquals($parsedResponse['$collection'], Database::SYSTEM_COLLECTION_COLLECTIONS); + $this->assertEquals($parsedResponse['structure'], true); + } + + public function testParseCollectionList() + { + + $content = [ + 'sum' => 1, + 'collections' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Movies', + 'dateCreated' => 1592981250, + 'dateUpdated' => '5d529fd02b544198ae075bd57c1762bb', + 'rules' => [] + ] + ] + ]; + + $model = Response::MODEL_COLLECTION_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['collections'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['collections'][0]['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['collections'][0]['name'], 'Movies'); + $this->assertEquals($parsedResponse['collections'][0]['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['collections'][0]['dateUpdated'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['collections'][0]['rules'], []); + $this->assertEquals($parsedResponse['collections'][0]['$collection'], Database::SYSTEM_COLLECTION_COLLECTIONS); + $this->assertEquals($parsedResponse['collections'][0]['structure'], true); + } +} \ No newline at end of file diff --git a/tests/unit/Utopia/ResponseTest.php b/tests/unit/Utopia/ResponseTest.php new file mode 100644 index 0000000000..e8d99630f0 --- /dev/null +++ b/tests/unit/Utopia/ResponseTest.php @@ -0,0 +1,34 @@ +object = new Response(new SwooleResponse()); + } + + public function testSetFilter() + { + $this->assertEquals($this->object->isFilter(), false); + $this->assertEquals($this->object->getFilter(), null); + + $filter = new V06(); + $this->object->setFilter($filter); + + $this->assertEquals($this->object->isFilter(), true); + $this->assertEquals($this->object->getFilter(), $filter); + } +} \ No newline at end of file