From 945d7947a2f84e32b37cad685cd59c2990a88aea Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 3 Mar 2021 11:08:05 +0200 Subject: [PATCH 01/22] Updated SDKs --- app/config/platforms.php | 12 +- app/tasks/sdks.php | 10 + composer.json | 2 +- composer.lock | 194 +++++++++--------- .../examples/account/create-o-auth2session.md | 3 +- .../examples/account/create-recovery.md | 3 +- .../examples/account/create-session.md | 3 +- .../examples/account/create-verification.md | 3 +- .../client-flutter/examples/account/create.md | 3 +- .../examples/account/delete-session.md | 3 +- .../examples/account/delete-sessions.md | 3 +- .../client-flutter/examples/account/delete.md | 3 +- .../examples/account/get-logs.md | 3 +- .../examples/account/get-prefs.md | 3 +- .../examples/account/get-sessions.md | 3 +- .../client-flutter/examples/account/get.md | 3 +- .../examples/account/update-email.md | 3 +- .../examples/account/update-name.md | 3 +- .../examples/account/update-password.md | 3 +- .../examples/account/update-prefs.md | 3 +- .../examples/account/update-recovery.md | 3 +- .../examples/account/update-verification.md | 3 +- .../examples/avatars/get-browser.md | 18 +- .../examples/avatars/get-credit-card.md | 18 +- .../examples/avatars/get-favicon.md | 18 +- .../examples/avatars/get-flag.md | 18 +- .../examples/avatars/get-image.md | 18 +- .../examples/avatars/get-initials.md | 18 +- .../examples/avatars/get-q-r.md | 18 +- .../examples/database/create-document.md | 3 +- .../examples/database/delete-document.md | 3 +- .../examples/database/get-document.md | 3 +- .../examples/database/list-documents.md | 3 +- .../examples/database/update-document.md | 3 +- .../examples/functions/create-execution.md | 3 +- .../examples/functions/get-execution.md | 3 +- .../examples/functions/list-executions.md | 3 +- .../examples/locale/get-continents.md | 3 +- .../examples/locale/get-countries-e-u.md | 3 +- .../examples/locale/get-countries-phones.md | 3 +- .../examples/locale/get-countries.md | 3 +- .../examples/locale/get-currencies.md | 3 +- .../examples/locale/get-languages.md | 3 +- .../client-flutter/examples/locale/get.md | 3 +- .../examples/storage/create-file.md | 3 +- .../examples/storage/delete-file.md | 3 +- .../examples/storage/get-file-download.md | 18 +- .../examples/storage/get-file-preview.md | 18 +- .../examples/storage/get-file-view.md | 18 +- .../examples/storage/get-file.md | 3 +- .../examples/storage/list-files.md | 3 +- .../examples/storage/update-file.md | 3 +- .../examples/teams/create-membership.md | 3 +- .../client-flutter/examples/teams/create.md | 3 +- .../examples/teams/delete-membership.md | 3 +- .../client-flutter/examples/teams/delete.md | 3 +- .../examples/teams/get-memberships.md | 3 +- .../client-flutter/examples/teams/get.md | 3 +- .../client-flutter/examples/teams/list.md | 3 +- .../teams/update-membership-status.md | 3 +- .../client-flutter/examples/teams/update.md | 3 +- .../examples/avatars/get-browser.md | 9 +- .../examples/avatars/get-credit-card.md | 9 +- .../examples/avatars/get-favicon.md | 9 +- .../server-dart/examples/avatars/get-flag.md | 9 +- .../server-dart/examples/avatars/get-image.md | 9 +- .../examples/avatars/get-initials.md | 9 +- .../server-dart/examples/avatars/get-q-r.md | 9 +- .../examples/storage/get-file-download.md | 9 +- .../examples/storage/get-file-preview.md | 9 +- .../examples/storage/get-file-view.md | 9 +- docs/sdks/dart/CHANGELOG.md | 10 + docs/sdks/flutter/CHANGELOG.md | 10 + 73 files changed, 381 insertions(+), 268 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 399d52e74b..4d8e5506fe 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -32,7 +32,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '0.3.0', + 'version' => '0.4.0-dev.1', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -165,7 +165,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '0.1.0', + 'version' => '0.1.1', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -199,7 +199,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '0.1.0', + 'version' => '0.1.1', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -216,7 +216,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '2.0.0', + 'version' => '2.0.2', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -284,7 +284,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '0.2.0', + 'version' => '0.3.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -301,7 +301,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '0.5.0', + 'version' => '0.6.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://github.com/appwrite/sdk-for-cli', 'enabled' => true, diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 6b17104f6c..f8d4ed3976 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -96,6 +96,16 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND $config = new CLI(); $config->setComposerVendor('appwrite'); $config->setComposerPackage('cli'); + $config->setExecutableName('appwrite'); + $config->setExecutableName('appwrite'); + $config->setLogo(" + _ _ _ ___ __ _____ + /_\ _ __ _ ____ ___ __(_) |_ ___ / __\ / / \_ \ + //_\\| '_ \| '_ \ \ /\ / / '__| | __/ _ \ / / / / / /\/ + / _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_ + \_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/ + |_| |_| + "); break; case 'php': $config = new PHP(); diff --git a/composer.json b/composer.json index f82d5c3503..cc4cdf9098 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "adhocore/jwt": "1.1.0" }, "require-dev": { - "appwrite/sdk-generator": "0.5.5", + "appwrite/sdk-generator": "0.6.1", "phpunit/phpunit": "9.4.2", "swoole/ide-helper": "4.5.5", "vimeo/psalm": "4.1.1" diff --git a/composer.lock b/composer.lock index 075cf1359c..9b252dcd05 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": "5893b378d1dcda91aedf77059f4b0efb", + "content-hash": "4b03aefd02908c32c2d1be6127c8c23a", "packages": [ { "name": "adhocore/jwt", @@ -349,7 +349,7 @@ "issues": "https://github.com/domnikl/statsd-php/issues", "source": "https://github.com/domnikl/statsd-php/tree/master" }, - "abandoned": true, + "abandoned": "slickdeals/statsd", "time": "2020-01-03T14:24:58+00:00" }, { @@ -1004,12 +1004,12 @@ "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "dd738d0b4491f32725492cf345f6b501f5922fec" + "reference": "a18c1e692e02b84abbafe4856c3cd7cc6903908c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/dd738d0b4491f32725492cf345f6b501f5922fec", - "reference": "dd738d0b4491f32725492cf345f6b501f5922fec", + "url": "https://api.github.com/repos/php-fig/log/zipball/a18c1e692e02b84abbafe4856c3cd7cc6903908c", + "reference": "a18c1e692e02b84abbafe4856c3cd7cc6903908c", "shasum": "" }, "require": { @@ -1047,7 +1047,7 @@ "support": { "source": "https://github.com/php-fig/log/tree/master" }, - "time": "2020-09-18T06:44:51+00:00" + "time": "2021-03-02T15:02:34+00:00" }, { "name": "ralouphie/getallheaders", @@ -2086,11 +2086,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.5.5", + "version": "0.6.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "08d6dc72f83ec99cfc0f7a50cb7fc0be0c029ac1" + "reference": "8a55e7082428583a89ece31df463663c2b2320d8" }, "require": { "ext-curl": "*", @@ -2120,7 +2120,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-02-18T16:37:32+00:00" + "time": "2021-03-02T17:02:58+00:00" }, { "name": "composer/package-versions-deprecated", @@ -2498,12 +2498,12 @@ "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541" + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/85e83cacd2ed573238678c6875f8f0d7ec699541", - "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", "shasum": "" }, "require": { @@ -2545,9 +2545,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.0" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" }, - "time": "2020-10-23T13:55:30+00:00" + "time": "2021-02-22T14:02:09+00:00" }, { "name": "matthiasmullie/minify", @@ -2962,16 +2962,16 @@ }, { "name": "phar-io/version", - "version": "3.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { @@ -3007,9 +3007,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.0.4" + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "time": "2020-12-13T23:18:30+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -3322,12 +3322,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "05fa32de35b15c94838d22482cc59d99860a706f" + "reference": "dae425925709122f7584cadeeb838edcaa491bb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/05fa32de35b15c94838d22482cc59d99860a706f", - "reference": "05fa32de35b15c94838d22482cc59d99860a706f", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/dae425925709122f7584cadeeb838edcaa491bb1", + "reference": "dae425925709122f7584cadeeb838edcaa491bb1", "shasum": "" }, "require": { @@ -3375,7 +3375,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:34+00:00" + "time": "2021-02-23T15:48:43+00:00" }, { "name": "phpunit/php-invoker", @@ -3383,12 +3383,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8" + "reference": "5ad9e5f5d6ee1a837e1d50bab1017e0daf423b40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7bba8d62fc6140730c268d5ff7fbf9c3a54996a8", - "reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5ad9e5f5d6ee1a837e1d50bab1017e0daf423b40", + "reference": "5ad9e5f5d6ee1a837e1d50bab1017e0daf423b40", "shasum": "" }, "require": { @@ -3439,7 +3439,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:42+00:00" + "time": "2021-02-23T15:48:51+00:00" }, { "name": "phpunit/php-text-template", @@ -3447,12 +3447,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905" + "reference": "4ec5a2ac79a19b35d0cf83cce30604f77743067a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/bca9f27936ccd6d7450f16f1ee3f125b755b7905", - "reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/4ec5a2ac79a19b35d0cf83cce30604f77743067a", + "reference": "4ec5a2ac79a19b35d0cf83cce30604f77743067a", "shasum": "" }, "require": { @@ -3499,7 +3499,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:15+00:00" + "time": "2021-02-23T15:49:24+00:00" }, { "name": "phpunit/php-timer", @@ -3507,12 +3507,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608" + "reference": "705821b0927b5e69e9e016c84de68dc6195c71b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e3125d0dc516e7f7ab23d54ddefbce67627fd608", - "reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/705821b0927b5e69e9e016c84de68dc6195c71b9", + "reference": "705821b0927b5e69e9e016c84de68dc6195c71b9", "shasum": "" }, "require": { @@ -3559,7 +3559,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:50+00:00" + "time": "2021-02-23T15:48:59+00:00" }, { "name": "phpunit/phpunit", @@ -3724,12 +3724,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202" + "reference": "3a42d843af4d27ca1155e1d926881af162733655" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/5a6fc83d266e0fcbf890d4475bfbb713dbb4d202", - "reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/3a42d843af4d27ca1155e1d926881af162733655", + "reference": "3a42d843af4d27ca1155e1d926881af162733655", "shasum": "" }, "require": { @@ -3773,7 +3773,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:40+00:00" + "time": "2021-02-23T15:49:50+00:00" }, { "name": "sebastian/code-unit", @@ -3837,12 +3837,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083" + "reference": "5f5db0b35f586eb5bca0581a10bb42dd56575986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/96fc758350a824cf96f9e7847ecdf9bb82c87083", - "reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5f5db0b35f586eb5bca0581a10bb42dd56575986", + "reference": "5f5db0b35f586eb5bca0581a10bb42dd56575986", "shasum": "" }, "require": { @@ -3885,7 +3885,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:27+00:00" + "time": "2021-02-23T15:47:39+00:00" }, { "name": "sebastian/comparator", @@ -3893,12 +3893,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9" + "reference": "dbc5fb421f242a5749845dc8dd0dc8cde2979dd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/3b943ec66244e5d0a5252708d1c9073ae6d3efc9", - "reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dbc5fb421f242a5749845dc8dd0dc8cde2979dd9", + "reference": "dbc5fb421f242a5749845dc8dd0dc8cde2979dd9", "shasum": "" }, "require": { @@ -3960,7 +3960,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:35+00:00" + "time": "2021-02-23T15:47:47+00:00" }, { "name": "sebastian/complexity", @@ -4025,12 +4025,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d" + "reference": "93e6aa13f3dc5f8327e7fb9756e9655fc4c23e90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1895a1a29e197f7d31099a320b2a3ae9e428b21d", - "reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/93e6aa13f3dc5f8327e7fb9756e9655fc4c23e90", + "reference": "93e6aa13f3dc5f8327e7fb9756e9655fc4c23e90", "shasum": "" }, "require": { @@ -4084,7 +4084,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:43+00:00" + "time": "2021-02-23T15:47:55+00:00" }, { "name": "sebastian/environment", @@ -4092,12 +4092,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5" + "reference": "6e1743b808be9cfd33a716583ccb94b7d4d32e94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7f8f2720df4d03d4368edadac24c3a7950b6cdc5", - "reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e1743b808be9cfd33a716583ccb94b7d4d32e94", + "reference": "6e1743b808be9cfd33a716583ccb94b7d4d32e94", "shasum": "" }, "require": { @@ -4148,7 +4148,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:52+00:00" + "time": "2021-02-23T15:48:03+00:00" }, { "name": "sebastian/exporter", @@ -4156,12 +4156,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b" + "reference": "eca7281ab29075df68b113a37a83be616b629b12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c6819d6edff3496f28c29a9ed61c564a9fdae27b", - "reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/eca7281ab29075df68b113a37a83be616b629b12", + "reference": "eca7281ab29075df68b113a37a83be616b629b12", "shasum": "" }, "require": { @@ -4226,7 +4226,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:00+00:00" + "time": "2021-02-23T15:48:12+00:00" }, { "name": "sebastian/global-state", @@ -4234,12 +4234,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a912746c9e31610f52b8e6977107e745c758cfd8" + "reference": "0ac702e6d13725242edb9b294c5d20b92fcfb8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a912746c9e31610f52b8e6977107e745c758cfd8", - "reference": "a912746c9e31610f52b8e6977107e745c758cfd8", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ac702e6d13725242edb9b294c5d20b92fcfb8b4", + "reference": "0ac702e6d13725242edb9b294c5d20b92fcfb8b4", "shasum": "" }, "require": { @@ -4291,7 +4291,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:09+00:00" + "time": "2021-02-23T15:48:19+00:00" }, { "name": "sebastian/lines-of-code", @@ -4356,12 +4356,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088" + "reference": "8cc80b4bda00a4c5997c3fc597a34872f3a1007d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088", - "reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/8cc80b4bda00a4c5997c3fc597a34872f3a1007d", + "reference": "8cc80b4bda00a4c5997c3fc597a34872f3a1007d", "shasum": "" }, "require": { @@ -4406,7 +4406,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:17+00:00" + "time": "2021-02-23T15:48:28+00:00" }, { "name": "sebastian/object-reflector", @@ -4414,12 +4414,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "232add5a51167e359e1dd03334ebffaddfb95795" + "reference": "1d33587c2c3e636936f895e103a9e82dd8102a8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/232add5a51167e359e1dd03334ebffaddfb95795", - "reference": "232add5a51167e359e1dd03334ebffaddfb95795", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d33587c2c3e636936f895e103a9e82dd8102a8e", + "reference": "1d33587c2c3e636936f895e103a9e82dd8102a8e", "shasum": "" }, "require": { @@ -4462,7 +4462,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:26+00:00" + "time": "2021-02-23T15:48:35+00:00" }, { "name": "sebastian/recursion-context", @@ -4470,12 +4470,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a" + "reference": "43f58a51e8f853aadb228ba818d2be388af7237b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a", - "reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/43f58a51e8f853aadb228ba818d2be388af7237b", + "reference": "43f58a51e8f853aadb228ba818d2be388af7237b", "shasum": "" }, "require": { @@ -4526,7 +4526,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:58+00:00" + "time": "2021-02-23T15:49:08+00:00" }, { "name": "sebastian/resource-operations", @@ -4590,12 +4590,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4" + "reference": "557863473c1de00e165a288d5b547f1f83652e7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/8abc9c1947c9f928da999be28778a0ba48cdf5b4", - "reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/557863473c1de00e165a288d5b547f1f83652e7e", + "reference": "557863473c1de00e165a288d5b547f1f83652e7e", "shasum": "" }, "require": { @@ -4639,7 +4639,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:07+00:00" + "time": "2021-02-23T15:49:16+00:00" }, { "name": "sebastian/version", @@ -4738,12 +4738,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9" + "reference": "c08d7d0d458eceb62996d81d3be8d9fbf5564ec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2a6f75224a537ee506e9fa1e6fc4200ad411ffd9", - "reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9", + "url": "https://api.github.com/repos/symfony/console/zipball/c08d7d0d458eceb62996d81d3be8d9fbf5564ec4", + "reference": "c08d7d0d458eceb62996d81d3be8d9fbf5564ec4", "shasum": "" }, "require": { @@ -4828,7 +4828,7 @@ "type": "tidelift" } ], - "time": "2021-02-17T15:27:35+00:00" + "time": "2021-02-23T10:10:15+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5328,12 +5328,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bf99754c6182a126968b1c2709d18548489f27eb" + "reference": "e830e6ceebd6377b019e4c9a523d6f2c27007e4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bf99754c6182a126968b1c2709d18548489f27eb", - "reference": "bf99754c6182a126968b1c2709d18548489f27eb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e830e6ceebd6377b019e4c9a523d6f2c27007e4a", + "reference": "e830e6ceebd6377b019e4c9a523d6f2c27007e4a", "shasum": "" }, "require": { @@ -5347,7 +5347,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.3-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -5400,7 +5400,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T16:27:53+00:00" + "time": "2021-02-25T16:38:04+00:00" }, { "name": "symfony/string", @@ -5542,12 +5542,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "429f90a02d3bd4a06787ac9bc48c56c4320b58a0" + "reference": "728c611e8643a5dd44839ffa791e21763b04a694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/429f90a02d3bd4a06787ac9bc48c56c4320b58a0", - "reference": "429f90a02d3bd4a06787ac9bc48c56c4320b58a0", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/728c611e8643a5dd44839ffa791e21763b04a694", + "reference": "728c611e8643a5dd44839ffa791e21763b04a694", "shasum": "" }, "require": { @@ -5613,7 +5613,7 @@ "type": "tidelift" } ], - "time": "2021-02-08T09:50:07+00:00" + "time": "2021-02-22T11:56:05+00:00" }, { "name": "vimeo/psalm", @@ -5726,12 +5726,12 @@ "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae" + "reference": "4631e2c7d2d7132adac9fd84d4c1a98c10a6e049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae", - "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/4631e2c7d2d7132adac9fd84d4c1a98c10a6e049", + "reference": "4631e2c7d2d7132adac9fd84d4c1a98c10a6e049", "shasum": "" }, "require": { @@ -5777,7 +5777,7 @@ "issues": "https://github.com/webmozarts/assert/issues", "source": "https://github.com/webmozarts/assert/tree/master" }, - "time": "2021-01-18T12:52:36+00:00" + "time": "2021-02-28T20:01:57+00:00" }, { "name": "webmozart/path-util", diff --git a/docs/examples/0.7.0/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/0.7.0/client-flutter/examples/account/create-o-auth2session.md index 0e26dd27af..a100378a00 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/create-o-auth2session.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/create-o-auth2session.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.createOAuth2Session( provider: 'amazon', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/create-recovery.md b/docs/examples/0.7.0/client-flutter/examples/account/create-recovery.md index 50db45b15d..2a5df1aa49 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/create-recovery.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/create-recovery.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.createRecovery( email: 'email@example.com', url: 'https://example.com', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/create-session.md b/docs/examples/0.7.0/client-flutter/examples/account/create-session.md index ef824b4eca..6233665a43 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/create-session.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/create-session.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.createSession( email: 'email@example.com', password: 'password', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/create-verification.md b/docs/examples/0.7.0/client-flutter/examples/account/create-verification.md index 6b9b1ace40..18fa98aed2 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/create-verification.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/create-verification.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.createVerification( url: 'https://example.com', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/create.md b/docs/examples/0.7.0/client-flutter/examples/account/create.md index 384258ae68..33f7169477 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/create.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/create.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.create( email: 'email@example.com', password: 'password', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/delete-session.md b/docs/examples/0.7.0/client-flutter/examples/account/delete-session.md index 80a3f505d0..c116ef1188 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/delete-session.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/delete-session.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.deleteSession( sessionId: '[SESSION_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/delete-sessions.md b/docs/examples/0.7.0/client-flutter/examples/account/delete-sessions.md index 74e494db25..0d84b9d121 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/delete-sessions.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/delete-sessions.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.deleteSessions(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/delete.md b/docs/examples/0.7.0/client-flutter/examples/account/delete.md index 2d9d302af0..c08891e787 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/delete.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/delete.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.delete(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/get-logs.md b/docs/examples/0.7.0/client-flutter/examples/account/get-logs.md index 4240e55eec..82da1f46ef 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/get-logs.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/get-logs.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.getLogs(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/get-prefs.md b/docs/examples/0.7.0/client-flutter/examples/account/get-prefs.md index d98dcd7290..2d6efd54db 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/get-prefs.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/get-prefs.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.getPrefs(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/get-sessions.md b/docs/examples/0.7.0/client-flutter/examples/account/get-sessions.md index b5ecd34e45..a44eac144b 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/get-sessions.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/get-sessions.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.getSessions(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/get.md b/docs/examples/0.7.0/client-flutter/examples/account/get.md index a77fbf3ad5..733d8842ce 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/get.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/get.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.get(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-email.md b/docs/examples/0.7.0/client-flutter/examples/account/update-email.md index 4a1a002db4..30dff9b7c9 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-email.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-email.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updateEmail( email: 'email@example.com', password: 'password', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-name.md b/docs/examples/0.7.0/client-flutter/examples/account/update-name.md index fa432bb34a..01ff7a0b62 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-name.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-name.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updateName( name: '[NAME]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-password.md b/docs/examples/0.7.0/client-flutter/examples/account/update-password.md index 9bd8ad9b77..203dccb2bf 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-password.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-password.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updatePassword( password: 'password', oldPassword: 'password', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-prefs.md b/docs/examples/0.7.0/client-flutter/examples/account/update-prefs.md index 443252f89a..bb7b8f800e 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-prefs.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-prefs.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updatePrefs( prefs: {}, ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-recovery.md b/docs/examples/0.7.0/client-flutter/examples/account/update-recovery.md index 5140235d49..df9f144600 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-recovery.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-recovery.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updateRecovery( userId: '[USER_ID]', secret: '[SECRET]', @@ -22,4 +21,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/account/update-verification.md b/docs/examples/0.7.0/client-flutter/examples/account/update-verification.md index b795cde92d..2bfbaed75c 100644 --- a/docs/examples/0.7.0/client-flutter/examples/account/update-verification.md +++ b/docs/examples/0.7.0/client-flutter/examples/account/update-verification.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = account.updateVerification( userId: '[USER_ID]', secret: '[SECRET]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-browser.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-browser.md index 464767c4c0..474b4a2097 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-browser.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-browser.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getBrowser( +//displaying image +FutureBuilder( + future: avatars.getBrowser( code: 'aa', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-credit-card.md index 482c642402..5611b0ba9a 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-credit-card.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-credit-card.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getCreditCard( +//displaying image +FutureBuilder( + future: avatars.getCreditCard( code: 'amex', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-favicon.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-favicon.md index 60397b0af2..5e1aad08ed 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-favicon.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-favicon.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getFavicon( +//displaying image +FutureBuilder( + future: avatars.getFavicon( url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-flag.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-flag.md index a9f7a711d9..f729dccdd7 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-flag.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-flag.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getFlag( +//displaying image +FutureBuilder( + future: avatars.getFlag( code: 'af', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-image.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-image.md index 7cead1cb2f..21ac6f80f0 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-image.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-image.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getImage( +//displaying image +FutureBuilder( + future: avatars.getImage( url: 'https://example.com', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-initials.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-initials.md index b2e70788d6..6ee824559d 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-initials.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-initials.md @@ -8,9 +8,17 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getInitials( - ); - - print(result); // Resource URL string -} \ No newline at end of file +//displaying image +FutureBuilder( + future: avatars.getInitials( + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/avatars/get-q-r.md b/docs/examples/0.7.0/client-flutter/examples/avatars/get-q-r.md index a5bcfd2c05..5c828ba98b 100644 --- a/docs/examples/0.7.0/client-flutter/examples/avatars/get-q-r.md +++ b/docs/examples/0.7.0/client-flutter/examples/avatars/get-q-r.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = avatars.getQR( +//displaying image +FutureBuilder( + future: avatars.getQR( text: '[TEXT]', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/database/create-document.md b/docs/examples/0.7.0/client-flutter/examples/database/create-document.md index b7d540bc2d..b2305f6602 100644 --- a/docs/examples/0.7.0/client-flutter/examples/database/create-document.md +++ b/docs/examples/0.7.0/client-flutter/examples/database/create-document.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = database.createDocument( collectionId: '[COLLECTION_ID]', data: {}, @@ -22,4 +21,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/database/delete-document.md b/docs/examples/0.7.0/client-flutter/examples/database/delete-document.md index 40c1cbdfe2..94479a0949 100644 --- a/docs/examples/0.7.0/client-flutter/examples/database/delete-document.md +++ b/docs/examples/0.7.0/client-flutter/examples/database/delete-document.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = database.deleteDocument( collectionId: '[COLLECTION_ID]', documentId: '[DOCUMENT_ID]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/database/get-document.md b/docs/examples/0.7.0/client-flutter/examples/database/get-document.md index 0c98142315..153ad8e0f9 100644 --- a/docs/examples/0.7.0/client-flutter/examples/database/get-document.md +++ b/docs/examples/0.7.0/client-flutter/examples/database/get-document.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = database.getDocument( collectionId: '[COLLECTION_ID]', documentId: '[DOCUMENT_ID]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/database/list-documents.md b/docs/examples/0.7.0/client-flutter/examples/database/list-documents.md index 0685e7f1aa..dc6893a285 100644 --- a/docs/examples/0.7.0/client-flutter/examples/database/list-documents.md +++ b/docs/examples/0.7.0/client-flutter/examples/database/list-documents.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = database.listDocuments( collectionId: '[COLLECTION_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/database/update-document.md b/docs/examples/0.7.0/client-flutter/examples/database/update-document.md index 2f37cd767a..cc85817374 100644 --- a/docs/examples/0.7.0/client-flutter/examples/database/update-document.md +++ b/docs/examples/0.7.0/client-flutter/examples/database/update-document.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = database.updateDocument( collectionId: '[COLLECTION_ID]', documentId: '[DOCUMENT_ID]', @@ -23,4 +22,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/functions/create-execution.md b/docs/examples/0.7.0/client-flutter/examples/functions/create-execution.md index af61896d75..70b617ffab 100644 --- a/docs/examples/0.7.0/client-flutter/examples/functions/create-execution.md +++ b/docs/examples/0.7.0/client-flutter/examples/functions/create-execution.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = functions.createExecution( functionId: '[FUNCTION_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/functions/get-execution.md b/docs/examples/0.7.0/client-flutter/examples/functions/get-execution.md index 22135bbedd..a10f7933c2 100644 --- a/docs/examples/0.7.0/client-flutter/examples/functions/get-execution.md +++ b/docs/examples/0.7.0/client-flutter/examples/functions/get-execution.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = functions.getExecution( functionId: '[FUNCTION_ID]', executionId: '[EXECUTION_ID]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/functions/list-executions.md b/docs/examples/0.7.0/client-flutter/examples/functions/list-executions.md index fe53f4a82b..3f59aa3f20 100644 --- a/docs/examples/0.7.0/client-flutter/examples/functions/list-executions.md +++ b/docs/examples/0.7.0/client-flutter/examples/functions/list-executions.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = functions.listExecutions( functionId: '[FUNCTION_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-continents.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-continents.md index 60d4f32c4f..63920e735a 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-continents.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-continents.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getContinents(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-e-u.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-e-u.md index 766006fecc..39f3a1d709 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-e-u.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getCountriesEU(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-phones.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-phones.md index 786eeb0b70..44ff02603b 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-phones.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries-phones.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getCountriesPhones(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries.md index 0570421ef9..97ef85e1e6 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-countries.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-countries.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getCountries(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-currencies.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-currencies.md index 7846c3c710..fb27e3d957 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-currencies.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-currencies.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getCurrencies(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get-languages.md b/docs/examples/0.7.0/client-flutter/examples/locale/get-languages.md index 4f526383fa..badc806861 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get-languages.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get-languages.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.getLanguages(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/locale/get.md b/docs/examples/0.7.0/client-flutter/examples/locale/get.md index 2dbdd47f63..21b1a6cff2 100644 --- a/docs/examples/0.7.0/client-flutter/examples/locale/get.md +++ b/docs/examples/0.7.0/client-flutter/examples/locale/get.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = locale.get(); result @@ -17,4 +16,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/create-file.md b/docs/examples/0.7.0/client-flutter/examples/storage/create-file.md index 9f61be12f4..a49d0b3fd6 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/create-file.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/create-file.md @@ -9,7 +9,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = storage.createFile( file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), read: [], @@ -22,4 +21,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/delete-file.md b/docs/examples/0.7.0/client-flutter/examples/storage/delete-file.md index 271ed7b2dd..ee9af9fc0e 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/delete-file.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/delete-file.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = storage.deleteFile( fileId: '[FILE_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-download.md b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-download.md index be3385a61b..2c5de98ee8 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-download.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-download.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = storage.getFileDownload( +//displaying image +FutureBuilder( + future: storage.getFileDownload( fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-preview.md b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-preview.md index 8bd1a47457..0cf4c9c0d0 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-preview.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-preview.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = storage.getFilePreview( +//displaying image +FutureBuilder( + future: storage.getFilePreview( fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-view.md b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-view.md index 5803fd409f..9b53265ee7 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/get-file-view.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/get-file-view.md @@ -8,10 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; +} - String result = storage.getFileView( +//displaying image +FutureBuilder( + future: storage.getFileView( fileId: '[FILE_ID]', - ); - - print(result); // Resource URL string -} \ No newline at end of file + ), //works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory( + snapshot.data.data, + ) + : CircularProgressIndicator(); + }, +); diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/get-file.md b/docs/examples/0.7.0/client-flutter/examples/storage/get-file.md index feca667fa9..2f734c6bdc 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/get-file.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/get-file.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = storage.getFile( fileId: '[FILE_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/list-files.md b/docs/examples/0.7.0/client-flutter/examples/storage/list-files.md index 1963ec694d..663d416198 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/list-files.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/list-files.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = storage.listFiles( ); @@ -18,4 +17,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/storage/update-file.md b/docs/examples/0.7.0/client-flutter/examples/storage/update-file.md index a5ecbfe987..bc71901245 100644 --- a/docs/examples/0.7.0/client-flutter/examples/storage/update-file.md +++ b/docs/examples/0.7.0/client-flutter/examples/storage/update-file.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = storage.updateFile( fileId: '[FILE_ID]', read: [], @@ -21,4 +20,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/create-membership.md b/docs/examples/0.7.0/client-flutter/examples/teams/create-membership.md index e5e82de7b4..ef5931ea66 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/create-membership.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/create-membership.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.createMembership( teamId: '[TEAM_ID]', email: 'email@example.com', @@ -22,4 +21,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/create.md b/docs/examples/0.7.0/client-flutter/examples/teams/create.md index d11958ae6d..90dea2fb1a 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/create.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/create.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.create( name: '[NAME]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/delete-membership.md b/docs/examples/0.7.0/client-flutter/examples/teams/delete-membership.md index 3f57b840fe..6f26421a55 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/delete-membership.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/delete-membership.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.deleteMembership( teamId: '[TEAM_ID]', inviteId: '[INVITE_ID]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/delete.md b/docs/examples/0.7.0/client-flutter/examples/teams/delete.md index 9fb488afec..e55c62b2e3 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/delete.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/delete.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.delete( teamId: '[TEAM_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/get-memberships.md b/docs/examples/0.7.0/client-flutter/examples/teams/get-memberships.md index 4edadfa2b4..3116ca86ad 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/get-memberships.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/get-memberships.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.getMemberships( teamId: '[TEAM_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/get.md b/docs/examples/0.7.0/client-flutter/examples/teams/get.md index 083565f7a6..25eb2453fc 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/get.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/get.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.get( teamId: '[TEAM_ID]', ); @@ -19,4 +18,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/list.md b/docs/examples/0.7.0/client-flutter/examples/teams/list.md index 665020e928..8657f80fd3 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/list.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/list.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.list( ); @@ -18,4 +17,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/update-membership-status.md b/docs/examples/0.7.0/client-flutter/examples/teams/update-membership-status.md index 616f64e148..c596c904e1 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/update-membership-status.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/update-membership-status.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.updateMembershipStatus( teamId: '[TEAM_ID]', inviteId: '[INVITE_ID]', @@ -22,4 +21,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/client-flutter/examples/teams/update.md b/docs/examples/0.7.0/client-flutter/examples/teams/update.md index 915fb57d38..838639be9b 100644 --- a/docs/examples/0.7.0/client-flutter/examples/teams/update.md +++ b/docs/examples/0.7.0/client-flutter/examples/teams/update.md @@ -8,7 +8,6 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; - Future result = teams.update( teamId: '[TEAM_ID]', name: '[NAME]', @@ -20,4 +19,4 @@ void main() { // Init SDK }).catchError((error) { print(error.response); }); -} \ No newline at end of file +} diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-browser.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-browser.md index 87d2062fc4..c924ae43c8 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-browser.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-browser.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getBrowser( + Future result = avatars.getBrowser( code: 'aa', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-credit-card.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-credit-card.md index 8fe5f1d5d8..5d01d690dd 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-credit-card.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-credit-card.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getCreditCard( + Future result = avatars.getCreditCard( code: 'amex', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-favicon.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-favicon.md index 6a249dc70f..3308f5c59a 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-favicon.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-favicon.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getFavicon( + Future result = avatars.getFavicon( url: 'https://example.com', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-flag.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-flag.md index f997b668da..5da4aaf219 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-flag.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-flag.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getFlag( + Future result = avatars.getFlag( code: 'af', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-image.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-image.md index 9f31d8f159..196c6dedb5 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-image.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-image.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getImage( + Future result = avatars.getImage( url: 'https://example.com', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-initials.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-initials.md index 73788d2170..c40a54b712 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-initials.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-initials.md @@ -10,8 +10,13 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getInitials( + Future result = avatars.getInitials( ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/avatars/get-q-r.md b/docs/examples/0.7.0/server-dart/examples/avatars/get-q-r.md index eb8b46c743..bef31b345f 100644 --- a/docs/examples/0.7.0/server-dart/examples/avatars/get-q-r.md +++ b/docs/examples/0.7.0/server-dart/examples/avatars/get-q-r.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = avatars.getQR( + Future result = avatars.getQR( text: '[TEXT]', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/storage/get-file-download.md b/docs/examples/0.7.0/server-dart/examples/storage/get-file-download.md index 2eceaab1f5..1601fccd94 100644 --- a/docs/examples/0.7.0/server-dart/examples/storage/get-file-download.md +++ b/docs/examples/0.7.0/server-dart/examples/storage/get-file-download.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = storage.getFileDownload( + Future result = storage.getFileDownload( fileId: '[FILE_ID]', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/storage/get-file-preview.md b/docs/examples/0.7.0/server-dart/examples/storage/get-file-preview.md index 2b564d81b7..2c88ef408e 100644 --- a/docs/examples/0.7.0/server-dart/examples/storage/get-file-preview.md +++ b/docs/examples/0.7.0/server-dart/examples/storage/get-file-preview.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = storage.getFilePreview( + Future result = storage.getFilePreview( fileId: '[FILE_ID]', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/examples/0.7.0/server-dart/examples/storage/get-file-view.md b/docs/examples/0.7.0/server-dart/examples/storage/get-file-view.md index 030fb40f38..27fa91bb05 100644 --- a/docs/examples/0.7.0/server-dart/examples/storage/get-file-view.md +++ b/docs/examples/0.7.0/server-dart/examples/storage/get-file-view.md @@ -10,9 +10,14 @@ void main() { // Init SDK .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; - String result = storage.getFileView( + Future result = storage.getFileView( fileId: '[FILE_ID]', ); - print(result); // Resource URL string + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); } \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index e8d0ca1f73..8926d9077c 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,13 @@ +## 0.3.0 + +- Improved code quality +- Added a custom Appwrite exception +- Enabled access to private storage file + +## 0.2.0 + +- Upgraded to work with Appwrite 0.7 + ## 0.1.0 - First release \ No newline at end of file diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 0e853c7ebe..5f55c15e90 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,13 @@ +## 0.4.0-dev.1 + +- Improved code quality +- Enabled access to private storage file +- Added easier integration for preview images and the Image widget + +## 0.3.0 + +- Upgraded to work with Appwrite 0.7 + ## 0.3.0-dev.2 - Fix for an error when using a self-signed certificate for Web From 486ae9d96e90e2dbabd8e4ac3e1a8424411d078d Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Wed, 3 Mar 2021 07:48:39 -0500 Subject: [PATCH 02/22] Updated domnikl/statsd to slickdeals/statsd --- CHANGES.md | 1 + composer.json | 4 +- composer.lock | 110 +++++++++++++++++++++++++------------------------- 3 files changed, 57 insertions(+), 58 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 11f67a9ecd..8670aa1d7e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,7 @@ - Upgraded influxdb/influxdb-php lib to version 1.15.2 - Upgraded phpmailer/phpmailer lib to version 6.3.0 - Upgraded adhocore/jwt lib to version 1.1.2 +- Upgraded domnikl/statsd to slickdeals/statsd version 3.0 ## Bug Fixes diff --git a/composer.json b/composer.json index b4370e7c2f..99abf7605e 100644 --- a/composer.json +++ b/composer.json @@ -53,11 +53,11 @@ "resque/php-resque": "1.3.6", "matomo/device-detector": "4.1.0", "dragonmantank/cron-expression": "3.1.0", - "domnikl/statsd": "3.0.2", "influxdb/influxdb-php": "1.15.2", "phpmailer/phpmailer": "6.3.0", "chillerlan/php-qrcode": "4.3.0", - "adhocore/jwt": "1.1.2" + "adhocore/jwt": "1.1.2", + "slickdeals/statsd": "~3.0" }, "require-dev": { "appwrite/sdk-generator": "0.5.5", diff --git a/composer.lock b/composer.lock index 85b0932c93..aff6fefab8 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": "4f58de92fb64af44d915387895472881", + "content-hash": "c89bd786aae720e161185007212f6594", "packages": [ { "name": "adhocore/jwt", @@ -297,61 +297,6 @@ }, "time": "2020-11-06T16:09:14+00:00" }, - { - "name": "domnikl/statsd", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/domnikl/statsd-php.git", - "reference": "393c6565efbfb23c8296ae3099a62fb6366c6ce3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/domnikl/statsd-php/zipball/393c6565efbfb23c8296ae3099a62fb6366c6ce3", - "reference": "393c6565efbfb23c8296ae3099a62fb6366c6ce3", - "shasum": "" - }, - "require": { - "php": ">= 7.2" - }, - "require-dev": { - "flyeralarm/php-code-validator": "^2.2", - "phpunit/phpunit": "~8.0", - "vimeo/psalm": "^3.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Domnikl\\Statsd\\": "src/", - "Domnikl\\Test\\Statsd\\": "tests/unit" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dominik Liebler", - "email": "liebler.dominik@gmail.com" - } - ], - "description": "a PHP client for statsd", - "homepage": "https://domnikl.github.com/statsd-php", - "keywords": [ - "Metrics", - "monitoring", - "statistics", - "statsd", - "udp" - ], - "support": { - "issues": "https://github.com/domnikl/statsd-php/issues", - "source": "https://github.com/domnikl/statsd-php/tree/master" - }, - "abandoned": true, - "time": "2020-01-03T14:24:58+00:00" - }, { "name": "dragonmantank/cron-expression", "version": "v3.1.0", @@ -1192,6 +1137,59 @@ }, "time": "2020-04-16T16:39:50+00:00" }, + { + "name": "slickdeals/statsd", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/Slickdeals/statsd-php.git", + "reference": "393c6565efbfb23c8296ae3099a62fb6366c6ce3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Slickdeals/statsd-php/zipball/393c6565efbfb23c8296ae3099a62fb6366c6ce3", + "reference": "393c6565efbfb23c8296ae3099a62fb6366c6ce3", + "shasum": "" + }, + "require": { + "php": ">= 7.2" + }, + "require-dev": { + "flyeralarm/php-code-validator": "^2.2", + "phpunit/phpunit": "~8.0", + "vimeo/psalm": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Domnikl\\Statsd\\": "src/", + "Domnikl\\Test\\Statsd\\": "tests/unit" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dominik Liebler", + "email": "liebler.dominik@gmail.com" + } + ], + "description": "a PHP client for statsd", + "homepage": "https://domnikl.github.com/statsd-php", + "keywords": [ + "Metrics", + "monitoring", + "statistics", + "statsd", + "udp" + ], + "support": { + "source": "https://github.com/Slickdeals/statsd-php/tree/3.0.2" + }, + "time": "2020-01-03T14:24:58+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "dev-main", From 192ba00e3fe0020e1f0a2580f2f481c8b8999b86 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 4 Mar 2021 12:18:50 -0500 Subject: [PATCH 03/22] Add event for users.update.prefs --- app/config/events.php | 5 +++++ app/controllers/api/users.php | 1 + 2 files changed, 6 insertions(+) diff --git a/app/config/events.php b/app/config/events.php index 2bb3862fdf..4893f6f188 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -117,6 +117,11 @@ return [ 'model' => Response::MODEL_USER, 'note' => 'version >= 0.7', ], + 'users.update.prefs' => [ + 'description' => 'This event triggers when a user preference is updated from the users API.', + 'model' => Response::MODEL_USER, + 'note' => 'version >= 0.7', + ], 'users.update.status' => [ 'description' => 'This event triggers when a user status is updated from the users API.', 'model' => Response::MODEL_USER, diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index efb0041cee..0af3ec03a1 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -373,6 +373,7 @@ App::patch('/v1/users/:userId/status') App::patch('/v1/users/:userId/prefs') ->desc('Update User Preferences') ->groups(['api', 'users']) + ->label('event', 'users.update.prefs') ->label('scope', 'users.write') ->label('sdk.platform', [APP_PLATFORM_SERVER]) ->label('sdk.namespace', 'users') From 440a67e6d2c7eaa75066bd22e1ade47cf3364024 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 4 Mar 2021 13:47:02 -0500 Subject: [PATCH 04/22] Add e2e test for users.update.prefs --- .../Webhooks/WebhooksCustomServerTest.php | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 360dee2cb3..5869bddbbe 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -186,7 +186,46 @@ class WebhooksCustomServerTest extends Scope */ return ['userId' => $user['body']['$id'], 'name' => $user['body']['name'], 'email' => $user['body']['email']]; } - + + /** + * @depends testCreateUser + */ + public function testUpdateUserPrefs(array $data):array + { + /** + * Test for SUCCESS + */ + $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()), [ + 'prefs' => ['test' => true], + ]); + + $this->assertEquals($user['headers']['status-code'], 200); + $this->assertNotEmpty($user['body']['prefs']); + + $webhook = $this->getLastRequest(); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Event'], 'users.update.prefs'); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented'); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals($webhook['data']['name'], $data['name']); + $this->assertIsInt($webhook['data']['registration']); + $this->assertEquals($webhook['data']['status'], 0); + $this->assertEquals($webhook['data']['email'], $data['email']); + $this->assertEquals($webhook['data']['emailVerification'], false); + $this->assertEquals($webhook['data']['prefs'], ["test" => true]); + + return $data; + } + /** * @depends testCreateUser */ @@ -261,4 +300,4 @@ class WebhooksCustomServerTest extends Scope return $data; } -} \ No newline at end of file +} From b665833323bb6838707e94f3797e74fe5be230fd Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 4 Mar 2021 23:26:09 +0200 Subject: [PATCH 05/22] Updated SDKs --- app/config/platforms.php | 4 ++-- composer.json | 2 +- composer.lock | 16 ++++++++-------- docs/sdks/dart/CHANGELOG.md | 4 ++++ docs/sdks/flutter/CHANGELOG.md | 4 ++++ 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 4d8e5506fe..4e4bde824a 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -32,7 +32,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '0.4.0-dev.1', + 'version' => '0.4.0-dev.2', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -284,7 +284,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '0.3.0', + 'version' => '0.3.1', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, diff --git a/composer.json b/composer.json index cc4cdf9098..f84268963c 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "adhocore/jwt": "1.1.0" }, "require-dev": { - "appwrite/sdk-generator": "0.6.1", + "appwrite/sdk-generator": "0.6.2", "phpunit/phpunit": "9.4.2", "swoole/ide-helper": "4.5.5", "vimeo/psalm": "4.1.1" diff --git a/composer.lock b/composer.lock index 9b252dcd05..e7b549f246 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": "4b03aefd02908c32c2d1be6127c8c23a", + "content-hash": "eebe34132bbd166e74c848453fe2068e", "packages": [ { "name": "adhocore/jwt", @@ -574,12 +574,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f47ece9e6e8ce74e3be04bef47f46061dc18c095" + "reference": "2f3e4f6cf8fd4aad7624c90a94f0ab38fde25976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f47ece9e6e8ce74e3be04bef47f46061dc18c095", - "reference": "f47ece9e6e8ce74e3be04bef47f46061dc18c095", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/2f3e4f6cf8fd4aad7624c90a94f0ab38fde25976", + "reference": "2f3e4f6cf8fd4aad7624c90a94f0ab38fde25976", "shasum": "" }, "require": { @@ -641,7 +641,7 @@ "issues": "https://github.com/guzzle/psr7/issues", "source": "https://github.com/guzzle/psr7/tree/1.x" }, - "time": "2020-12-08T11:45:39+00:00" + "time": "2021-03-02T18:57:24+00:00" }, { "name": "influxdb/influxdb-php", @@ -2086,11 +2086,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.6.1", + "version": "0.6.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "8a55e7082428583a89ece31df463663c2b2320d8" + "reference": "d96376295c9265a054634d21dcdbfc02b832c677" }, "require": { "ext-curl": "*", @@ -2120,7 +2120,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-03-02T17:02:58+00:00" + "time": "2021-03-03T12:53:32+00:00" }, { "name": "composer/package-versions-deprecated", diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 8926d9077c..4cdd477aba 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.1 + +- Minor fixes for custom exceptions + ## 0.3.0 - Improved code quality diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 5f55c15e90..8798963fc8 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0-dev.2 + +- Minor fixes for custom exceptions + ## 0.4.0-dev.1 - Improved code quality From 9552a8dc80d7070345c62dcba7cdb72fe6e9e728 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 5 Mar 2021 12:21:41 +0545 Subject: [PATCH 06/22] add response formate to access control allowed headers --- app/controllers/general.php | 4 ++-- tests/e2e/General/HTTPTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 614c400048..fe00160388 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -117,7 +117,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo ->addHeader('Server', 'Appwrite') ->addHeader('X-Content-Type-Options', 'nosniff') ->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE') - ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma') + ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, Cache-Control, Expires, Pragma') ->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies') ->addHeader('Access-Control-Allow-Origin', $refDomain) ->addHeader('Access-Control-Allow-Credentials', 'true') @@ -237,7 +237,7 @@ App::options(function ($request, $response) { $response ->addHeader('Server', 'Appwrite') ->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE') - ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies') + ->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies') ->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies') ->addHeader('Access-Control-Allow-Origin', $origin) ->addHeader('Access-Control-Allow-Credentials', 'true') diff --git a/tests/e2e/General/HTTPTest.php b/tests/e2e/General/HTTPTest.php index e33c46e3a2..24e586cbc2 100644 --- a/tests/e2e/General/HTTPTest.php +++ b/tests/e2e/General/HTTPTest.php @@ -26,7 +26,7 @@ class HTTPTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEquals('Appwrite', $response['headers']['server']); $this->assertEquals('GET, POST, PUT, PATCH, DELETE', $response['headers']['access-control-allow-methods']); - $this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies', $response['headers']['access-control-allow-headers']); + $this->assertEquals('Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies', $response['headers']['access-control-allow-headers']); $this->assertEquals('X-Fallback-Cookies', $response['headers']['access-control-expose-headers']); $this->assertEquals('http://localhost', $response['headers']['access-control-allow-origin']); $this->assertEquals('true', $response['headers']['access-control-allow-credentials']); From 38c2c53d2d5f5b641bfa184f1d90f881afece9cb Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 5 Mar 2021 15:04:40 +0545 Subject: [PATCH 07/22] upgate changes --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 490007bcd6..f83de6bcb4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +# Version 0.7.1 + +## Bug Fixs + +- Fixed a bug, that Response format header was not added in the access-control-allow-header list. + # Version 0.7.0 ## Features From 0546a0e428483c85574d84125adcd5d58a292f1c Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 5 Mar 2021 13:36:30 -0500 Subject: [PATCH 08/22] Return correct response model --- app/config/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/events.php b/app/config/events.php index 4893f6f188..601b502163 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -119,7 +119,7 @@ return [ ], 'users.update.prefs' => [ 'description' => 'This event triggers when a user preference is updated from the users API.', - 'model' => Response::MODEL_USER, + 'model' => Response::MODEL_ANY, 'note' => 'version >= 0.7', ], 'users.update.status' => [ From cc532dbc593638eadba4d7cfc1959002394a35ab Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 7 Mar 2021 10:47:49 +0200 Subject: [PATCH 09/22] Getting ready for 0.7.1 release --- CHANGES.md | 2 +- README.md | 6 +++--- app/init.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8670aa1d7e..78de748d4b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ - Anonymous login -# Version 0.7.1 (Not Released Yet) +# Version 0.7.1 ## Features diff --git a/README.md b/README.md index 950c5a3010..3d4bd75733 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.7.0 + appwrite/appwrite:0.7.1 ``` ### Windows @@ -65,7 +65,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.7.0 + appwrite/appwrite:0.7.1 ``` #### PowerShell @@ -75,7 +75,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.7.0 + appwrite/appwrite:0.7.1 ``` Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes. diff --git a/app/init.php b/app/init.php index a70ed1b88e..effa61ad56 100644 --- a/app/init.php +++ b/app/init.php @@ -40,7 +40,7 @@ const APP_MODE_DEFAULT = 'default'; const APP_MODE_ADMIN = 'admin'; const APP_PAGING_LIMIT = 12; const APP_CACHE_BUSTER = 144; -const APP_VERSION_STABLE = '0.7.0'; +const APP_VERSION_STABLE = '0.7.1'; const APP_STORAGE_UPLOADS = '/storage/uploads'; const APP_STORAGE_FUNCTIONS = '/storage/functions'; const APP_STORAGE_CACHE = '/storage/cache'; From 56f5c73126d2d9c02278040819be8b30764d602f Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Sun, 7 Mar 2021 08:09:45 -0500 Subject: [PATCH 10/22] Update tests --- .../Webhooks/WebhooksCustomServerTest.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 5869bddbbe..9b32b75609 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -199,11 +199,10 @@ class WebhooksCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'prefs' => ['test' => true], + 'prefs' => ['a' => 'b'] ]); $this->assertEquals($user['headers']['status-code'], 200); - $this->assertNotEmpty($user['body']['prefs']); $webhook = $this->getLastRequest(); @@ -215,13 +214,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); - $this->assertNotEmpty($webhook['data']['$id']); - $this->assertEquals($webhook['data']['name'], $data['name']); - $this->assertIsInt($webhook['data']['registration']); - $this->assertEquals($webhook['data']['status'], 0); - $this->assertEquals($webhook['data']['email'], $data['email']); - $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs'], ["test" => true]); + $this->assertEquals($webhook['data']['a'], 'b'); return $data; } @@ -260,7 +253,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['data']['status'], 2); $this->assertEquals($webhook['data']['email'], $data['email']); $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs'], []); + $this->assertEquals($webhook['data']['prefs']['a'], 'b'); return $data; } @@ -296,7 +289,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['data']['status'], 2); $this->assertEquals($webhook['data']['email'], $data['email']); $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs'], []); + $this->assertEquals($webhook['data']['prefs']['a'], 'b'); return $data; } From 023b662b102bc1b4ce3aba91d27f58a579fb333b Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 8 Mar 2021 11:55:33 +0100 Subject: [PATCH 11/22] set default security email to certs@appwrite.io --- app/config/variables.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 14b29bc451..369a860fe2 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -107,8 +107,8 @@ return [ 'name' => '_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', 'description' => 'This is the email address used to issue SSL certificates for custom domains or the user agent in your webhooks payload.', 'introduction' => '0.7.0', - 'default' => '', - 'required' => true, + 'default' => 'certs@appwrite.io', + 'required' => false, 'question' => '', ], [ From 68b1511672ee22c0a79c97996e483ec540d87a52 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 8 Mar 2021 10:16:28 -0500 Subject: [PATCH 12/22] Chain tests together --- tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 9b32b75609..dbd1709802 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -203,7 +203,6 @@ class WebhooksCustomServerTest extends Scope ]); $this->assertEquals($user['headers']['status-code'], 200); - $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); @@ -220,7 +219,7 @@ class WebhooksCustomServerTest extends Scope } /** - * @depends testCreateUser + * @depends testUpdateUserPrefs */ public function testUpdateUserStatus(array $data):array { From 5eaced933dfd779269582c34c4b9510c43c30629 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 8 Mar 2021 14:58:16 -0500 Subject: [PATCH 13/22] Use uppercase countryCode as index for $countries assoc array --- app/controllers/api/account.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index e8ae76312b..cab25eb746 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -236,9 +236,11 @@ App::post('/v1/account/sessions') ->setStatusCode(Response::STATUS_CODE_CREATED) ; + $countries = $locale->getText('countries'); + $session ->setAttribute('current', true) - ->setAttribute('countryName', (isset($countries[$session->getAttribute('countryCode')])) ? $countries[$session->getAttribute('countryCode')] : $locale->getText('locale.country.unknown')) + ->setAttribute('countryName', (isset($countries[strtoupper($session->getAttribute('countryCode'))])) ? $countries[strtoupper($session->getAttribute('countryCode'))] : $locale->getText('locale.country.unknown')) ; $response->dynamic($session, Response::MODEL_SESSION); @@ -679,8 +681,8 @@ App::get('/v1/account/sessions') continue; } - $token->setAttribute('countryName', (isset($countries[$token->getAttribute('contryCode')])) - ? $countries[$token->getAttribute('contryCode')] + $token->setAttribute('countryName', (isset($countries[strtoupper($token->getAttribute('countryCode'))])) + ? $countries[strtoupper($token->getAttribute('countryCode'))] : $locale->getText('locale.country.unknown')); $token->setAttribute('current', ($current == $token->getId()) ? true : false); From 0d75dd362343e2635e07800b1e9eacb0c142003d Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 8 Mar 2021 15:48:45 -0500 Subject: [PATCH 14/22] Prove user prefs update before webhook --- tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index dbd1709802..d2d5549134 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -203,6 +203,8 @@ class WebhooksCustomServerTest extends Scope ]); $this->assertEquals($user['headers']['status-code'], 200); + $this->assertEquals($user['body']['a'], 'b'); + $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); From c87a1165f68aef363c4bbb26478c94c2458305b7 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Tue, 9 Mar 2021 06:00:19 -0500 Subject: [PATCH 15/22] Update changelog --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6261981848..d0cd072bc4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ ## Features -- Better error logs on appwrite cretificates worker +- Better error logs on appwrite certificates worker - Added option for Redis authentication - Force adding a security email on setup - SMTP is now disabled by default, no dummy SMTP is included in setup @@ -28,6 +28,7 @@ - Updated missing storage env vars - Fixed a bug, that Response format header was not added in the access-control-allow-header list. +- Fixed a bug where countryName is unknown on sessions (#933) ## Security From ed447986eaf3f17724146f0771ba6a184ec6fe2f Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Tue, 9 Mar 2021 06:03:42 -0500 Subject: [PATCH 16/22] Use uppercase countryCode --- app/controllers/api/users.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index efb0041cee..dbff5a0191 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -205,8 +205,8 @@ App::get('/v1/users/:userId/sessions') continue; } - $token->setAttribute('countryName', (isset($countries[$token->getAttribute('contryCode')])) - ? $countries[$token->getAttribute('contryCode')] + $token->setAttribute('countryName', (isset($countries[strtoupper($token->getAttribute('contryCode'))])) + ? $countries[strtoupper($token->getAttribute('contryCode'))] : $locale->getText('locale.country.unknown')); $token->setAttribute('current', false); From 7e12b82d75bd47c7f3342abd98787d921472ea52 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Tue, 9 Mar 2021 09:21:37 -0500 Subject: [PATCH 17/22] Use updated package paths --- app/preload.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/preload.php b/app/preload.php index f73aaea61a..7c8ae00938 100644 --- a/app/preload.php +++ b/app/preload.php @@ -28,10 +28,9 @@ foreach ([ realpath(__DIR__ . '/../vendor/felixfbecker'), realpath(__DIR__ . '/../vendor/twig/twig'), realpath(__DIR__ . '/../vendor/guzzlehttp/guzzle'), - realpath(__DIR__ . '/../vendor/domnikl'), - realpath(__DIR__ . '/../vendor/domnikl'), + realpath(__DIR__ . '/../vendor/slickdeals'), realpath(__DIR__ . '/../vendor/psr/log'), - realpath(__DIR__ . '/../vendor/piwik'), + realpath(__DIR__ . '/../vendor/matomo'), realpath(__DIR__ . '/../vendor/symfony'), ] as $key => $value) { if($value !== false) { From e77280f67c0d5de34373c71481ed252c31dd3dd0 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 12 Mar 2021 12:58:41 +0100 Subject: [PATCH 18/22] fix timezone offset --- CHANGES.md | 1 + app/http.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d0cd072bc4..2088bb1de3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,7 @@ ## Bug Fixes - Updated missing storage env vars +- Fixed a bug, that added a wrong timzone offset to user log timestamps - Fixed a bug, that Response format header was not added in the access-control-allow-header list. - Fixed a bug where countryName is unknown on sessions (#933) diff --git a/app/http.php b/app/http.php index 9e45bc3b52..d144c2e54a 100644 --- a/app/http.php +++ b/app/http.php @@ -94,7 +94,7 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo return; } - $app = new App('America/New_York'); + $app = new App('UTC'); try { Authorization::cleanRoles(); From c6270dcca50147e8604794df78ec8b0feffd1fb9 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 12 Mar 2021 08:06:53 -0500 Subject: [PATCH 19/22] Add webhook event to scope --- tests/e2e/Scopes/ProjectCustom.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index e1059f6afa..0596aee09f 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -117,6 +117,7 @@ trait ProjectCustom 'storage.files.update', 'storage.files.delete', 'users.create', + 'users.update.prefs', 'users.update.status', 'users.delete', 'users.sessions.delete', From cd247debd482ccf8e4c0d4da1595b89c7cb5b6f2 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 12 Mar 2021 09:28:34 -0500 Subject: [PATCH 20/22] Changelog for event users.update.prefs --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 8670aa1d7e..bd32e25561 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,7 @@ ## Bug Fixes - Updated missing storage env vars +- Added missing event for users.update.prefs #952 ## Security From 5361ddac1b23d693181056dc642d257bdf3afb00 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 12 Mar 2021 09:34:11 -0500 Subject: [PATCH 21/22] Revert "Changelog for event users.update.prefs" This reverts commit cd247debd482ccf8e4c0d4da1595b89c7cb5b6f2. --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index bd32e25561..8670aa1d7e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,7 +27,6 @@ ## Bug Fixes - Updated missing storage env vars -- Added missing event for users.update.prefs #952 ## Security From 6d11df4e84de1dd161251dc5c98138b1fb0643dc Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 12 Mar 2021 09:35:28 -0500 Subject: [PATCH 22/22] Add users.update.prefs to changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index d0cd072bc4..bf14eedb70 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,7 @@ - Updated missing storage env vars - Fixed a bug, that Response format header was not added in the access-control-allow-header list. - Fixed a bug where countryName is unknown on sessions (#933) +- Added missing event users.update.prefs (#952) ## Security