From 898d89f3221899e3439074c527f32beb89935f2f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 22 Dec 2020 20:54:30 +0530 Subject: [PATCH 01/90] feat: starter code for Response Filters --- src/Appwrite/Utopia/Response.php | 40 ++++++++++++++++++++ src/Appwrite/Utopia/Response/Filter.php | 16 ++++++++ src/Appwrite/Utopia/Response/Filters/V06.php | 14 +++++++ 3 files changed, 70 insertions(+) create mode 100644 src/Appwrite/Utopia/Response/Filter.php create mode 100644 src/Appwrite/Utopia/Response/Filters/V06.php diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index a854416c3f..70e8e46d91 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -6,6 +6,8 @@ use Exception; use Utopia\Swoole\Response as SwooleResponse; use Swoole\Http\Response as SwooleHTTPResponse; use Appwrite\Database\Document; +use Appwrite\Utopia\Response\Filter; +use Appwrite\Utopia\Response\Filter\V06; use Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response\Model\None; use Appwrite\Utopia\Response\Model\Any; @@ -112,6 +114,11 @@ class Response extends SwooleResponse const MODEL_DOMAIN = 'domain'; const MODEL_DOMAIN_LIST = 'domainList'; + /** + * @var Filter + */ + private static $filter = null; + /** * @var array */ @@ -329,4 +336,37 @@ class Response extends SwooleResponse { return $this->payload; } + + + /** + * Function to set a response filter + * + * @param $filter the response filter to set + * + * @return void + */ + public static function setFilter(Filter $filter) + { + self::$filter = $filter; + } + + /** + * Return the currently set filter + * + * @return Filter + */ + public static function getFilter(): Filter + { + return self::$filter; + } + + /** + * Check if a filter has been set + * + * @return bool + */ + public static function isFilter(): bool + { + return self::$filter != null; + } } diff --git a/src/Appwrite/Utopia/Response/Filter.php b/src/Appwrite/Utopia/Response/Filter.php new file mode 100644 index 0000000000..9391624d6e --- /dev/null +++ b/src/Appwrite/Utopia/Response/Filter.php @@ -0,0 +1,16 @@ + Date: Sat, 26 Dec 2020 16:46:43 +0530 Subject: [PATCH 02/90] feat: added function to parse user object --- src/Appwrite/Utopia/Response/Filter.php | 3 +- src/Appwrite/Utopia/Response/Filters/V06.php | 51 ++++++++++++++++++-- src/Appwrite/Utopia/Response/Model/User.php | 2 +- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filter.php b/src/Appwrite/Utopia/Response/Filter.php index 9391624d6e..6974c4ba89 100644 --- a/src/Appwrite/Utopia/Response/Filter.php +++ b/src/Appwrite/Utopia/Response/Filter.php @@ -8,9 +8,10 @@ abstract class Filter { * Parse the content to another format. * * @param array $content + * @param string $model * * @return array */ - abstract function parse(array $content): array; + abstract function parse(array $content, string $model): array; } \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 389cbb3d26..5d66ad2055 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -2,13 +2,58 @@ namespace Appwrite\Utopia\Response\Filter; +use Appwrite\Database\Validator\Authorization; +use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; +use Exception; +use Utopia\Config\Config; class V06 extends Filter { - // Convert 0.7 Data format to 0.6 format - public function parse(array $content): array { - return array(); + public function parse(array $content, string $model): array { + + $parsedResponse = array(); + + switch($model) { + case Response::MODEL_PROJECT : + $parsedResponse = $this->parseProject($content); + break; + + case Response::MODEL_USER : + $parsedResponse = $this->parseUser($content); + break; + + default: + throw new Exception('Recevied invlaid model : '.$model); + } + + return $parsedResponse; + } + + private function parseProject(array $content) + { + + } + + private function parseUser(array $content){ + $parsedContent = []; + + $parsedContent['$id'] = $content['$id']; + $parsedContent['registration'] = $content['registration']; + $parsedContent['name'] = $content['name']; + $parsedContent['email'] = $content['email']; + + foreach (Config::getParam('providers') as $key => $provider) { + if (!$provider['enabled']) { + continue; + } + $parsedContent['oauth2'.ucfirst($key)] = ''; + $parsedContent['oauth2'.ucfirst($key).'AccessToken'] = ''; + } + + $parsedContent['roles'] = Authorization::getRoles(); + + return $parsedContent; } } \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/User.php b/src/Appwrite/Utopia/Response/Model/User.php index 79c34db5ef..e11d49ed8f 100644 --- a/src/Appwrite/Utopia/Response/Model/User.php +++ b/src/Appwrite/Utopia/Response/Model/User.php @@ -27,7 +27,7 @@ class User extends Model ]) ->addRule('status', [ 'type' => self::TYPE_INTEGER, - 'description' => 'User status. 0 for Unavtivated, 1 for active and 2 is blocked.', + 'description' => 'User status. 0 for Unactivated, 1 for active and 2 is blocked.', 'example' => 0, ]) ->addRule('email', [ From d78e9566124a5bad9c9da82b4f9ef74a2f8cadac Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 26 Dec 2020 16:47:33 +0530 Subject: [PATCH 03/90] feat: added function to parse user object --- src/Appwrite/Utopia/Response/Filters/V06.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 5d66ad2055..7e2f0f579e 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -39,15 +39,16 @@ class V06 extends Filter { private function parseUser(array $content){ $parsedContent = []; - $parsedContent['$id'] = $content['$id']; - $parsedContent['registration'] = $content['registration']; - $parsedContent['name'] = $content['name']; - $parsedContent['email'] = $content['email']; + $parsedContent['$id'] = $content['$id'] ?? ''; + $parsedContent['registration'] = $content['registration'] ?? ''; + $parsedContent['name'] = $content['name'] ?? ''; + $parsedContent['email'] = $content['email'] ?? ''; foreach (Config::getParam('providers') as $key => $provider) { if (!$provider['enabled']) { continue; } + $parsedContent['oauth2'.ucfirst($key)] = ''; $parsedContent['oauth2'.ucfirst($key).'AccessToken'] = ''; } From a8c07c3381b89b17e91ccaf9b71d5a6010816f88 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 26 Dec 2020 16:48:00 +0530 Subject: [PATCH 04/90] feat: added function to parse user object --- src/Appwrite/Utopia/Response/Filters/V06.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 7e2f0f579e..5166c9e6c5 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -38,7 +38,6 @@ class V06 extends Filter { private function parseUser(array $content){ $parsedContent = []; - $parsedContent['$id'] = $content['$id'] ?? ''; $parsedContent['registration'] = $content['registration'] ?? ''; $parsedContent['name'] = $content['name'] ?? ''; @@ -48,13 +47,12 @@ class V06 extends Filter { if (!$provider['enabled']) { continue; } - + $parsedContent['oauth2'.ucfirst($key)] = ''; $parsedContent['oauth2'.ucfirst($key).'AccessToken'] = ''; } $parsedContent['roles'] = Authorization::getRoles(); - return $parsedContent; } } \ No newline at end of file From 09f42797e32e3fb7dcc1ced469284a2a62df7545 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 26 Dec 2020 16:48:16 +0530 Subject: [PATCH 05/90] feat: added parse method for user object --- src/Appwrite/Utopia/Response/Filters/V06.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 5166c9e6c5..e4a9d0adf5 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -52,7 +52,7 @@ class V06 extends Filter { $parsedContent['oauth2'.ucfirst($key).'AccessToken'] = ''; } - $parsedContent['roles'] = Authorization::getRoles(); + $parsedContent['roles'] = Authorization::getRoles() ?? []; return $parsedContent; } } \ No newline at end of file From 89f35d733fa6bfa526ab07c8b16e78f9be33196a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 26 Dec 2020 16:56:13 +0530 Subject: [PATCH 06/90] feat: parse session object --- src/Appwrite/Utopia/Response/Filters/V06.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index e4a9d0adf5..4a6e3783fd 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -2,6 +2,7 @@ namespace Appwrite\Utopia\Response\Filter; +use Appwrite\Auth\Auth; use Appwrite\Database\Validator\Authorization; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; @@ -24,6 +25,10 @@ class V06 extends Filter { $parsedResponse = $this->parseUser($content); break; + case Response::MODEL_SESSION : + $parsedResponse = $this->parseSession($content); + break; + default: throw new Exception('Recevied invlaid model : '.$model); } @@ -36,6 +41,15 @@ class V06 extends Filter { } + private function parseSession(array $content) + { + $parsedContent = []; + $parsedContent['$id'] = $content['$id']; + $parsedContent['type'] = Auth::TOKEN_TYPE_LOGIN; + $parsedContent['expire'] = $content['exprire']; + return $parsedContent; + } + private function parseUser(array $content){ $parsedContent = []; $parsedContent['$id'] = $content['$id'] ?? ''; From 3a7dda5e102f390aef4753660f70ae35e071e1c1 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 26 Dec 2020 17:47:43 +0530 Subject: [PATCH 07/90] feat: parse session object --- src/Appwrite/Utopia/Response/Filters/V06.php | 55 ++++++++++++++------ 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 4a6e3783fd..019b523d9b 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -28,6 +28,10 @@ class V06 extends Filter { case Response::MODEL_SESSION : $parsedResponse = $this->parseSession($content); break; + + case Response::MODEL_ANY : + $parsedResponse = $content; + break; default: throw new Exception('Recevied invlaid model : '.$model); @@ -43,30 +47,47 @@ class V06 extends Filter { private function parseSession(array $content) { - $parsedContent = []; - $parsedContent['$id'] = $content['$id']; - $parsedContent['type'] = Auth::TOKEN_TYPE_LOGIN; - $parsedContent['expire'] = $content['exprire']; - return $parsedContent; + // Handle list of sessions + if (isset($content['sum'])) { + $sessions = $content['sessions']; + + $parsedResponse = []; + foreach($sessions as $session) { + + // WIP + // $parsedResponse['$id'] = $token->getId(); + // $parsedResponse['OS'] = $dd->getOs(); + // $parsedResponse['client'] = $dd->getClient(); + // $parsedResponse['device'] = $dd->getDevice(); + // $parsedResponse['brand'] = $dd->getBrand(); + // $parsedResponse['model'] = $dd->getModel(); + // $parsedResponse['ip'] = $token->getAttribute('ip', ''); + // $parsedResponse['geo'] = []; + // $parsedResponse['current'] = ($current == $token->getId()) ? true : false; + // $parsedResponse[$index]['geo']['isoCode'] = '--'; + // $parsedResponse[$index]['geo']['country'] = Locale::getText('locale.country.unknown'); + + $parsedResponse[] = $session; + } + return $parsedResponse; + } else { + // Handle single session + $content['type'] = Auth::TOKEN_TYPE_LOGIN; + return $content; + } } - private function parseUser(array $content){ - $parsedContent = []; - $parsedContent['$id'] = $content['$id'] ?? ''; - $parsedContent['registration'] = $content['registration'] ?? ''; - $parsedContent['name'] = $content['name'] ?? ''; - $parsedContent['email'] = $content['email'] ?? ''; - + private function parseUser(array $content) + { foreach (Config::getParam('providers') as $key => $provider) { if (!$provider['enabled']) { continue; } - - $parsedContent['oauth2'.ucfirst($key)] = ''; - $parsedContent['oauth2'.ucfirst($key).'AccessToken'] = ''; + $content['oauth2'.ucfirst($key)] = ''; + $content['oauth2'.ucfirst($key).'AccessToken'] = ''; } - $parsedContent['roles'] = Authorization::getRoles() ?? []; - return $parsedContent; + $content['roles'] = Authorization::getRoles() ?? []; + return $content; } } \ No newline at end of file From bed4dcddef8d3df8c4979a8d0947ee54c426f657 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 27 Dec 2020 22:01:18 +0530 Subject: [PATCH 08/90] feat: parse session object --- src/Appwrite/Utopia/Response/Filters/V06.php | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 019b523d9b..212e83c3f8 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -8,6 +8,7 @@ use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; use Exception; use Utopia\Config\Config; +use Utopia\Locale\Locale as Locale; class V06 extends Filter { @@ -50,24 +51,23 @@ class V06 extends Filter { // Handle list of sessions if (isset($content['sum'])) { $sessions = $content['sessions']; - $parsedResponse = []; + $index = 0; foreach($sessions as $session) { - - // WIP - // $parsedResponse['$id'] = $token->getId(); - // $parsedResponse['OS'] = $dd->getOs(); - // $parsedResponse['client'] = $dd->getClient(); - // $parsedResponse['device'] = $dd->getDevice(); - // $parsedResponse['brand'] = $dd->getBrand(); - // $parsedResponse['model'] = $dd->getModel(); - // $parsedResponse['ip'] = $token->getAttribute('ip', ''); - // $parsedResponse['geo'] = []; - // $parsedResponse['current'] = ($current == $token->getId()) ? true : false; - // $parsedResponse[$index]['geo']['isoCode'] = '--'; - // $parsedResponse[$index]['geo']['country'] = Locale::getText('locale.country.unknown'); - - $parsedResponse[] = $session; + $parsedResponse[$index++] = [ + '$id' => $session['$id'], + 'OS' => $session['osName'].' '.$session['osVersion'], + 'client' => $session['clientName'].' '.$session['clientVersion'], + 'device' => $session['deviceName'], + 'brand' => $session['deviceBrand'], + 'model' => $session['deviceModel'], + 'ip' => $session['ip'], + 'current' => $session['current'], + 'geo' => [ + 'isoCode' => empty($session['countryCode']) ? '---' : $session['countryCode'] , + 'country' => empty($session['countryName'] ) ? Locale::getText('locale.country.unknown') : $session['countryName'] + ], + ]; } return $parsedResponse; } else { From 9690ce879404ecf60a3eeb2b098a7da64f3ef522 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 27 Dec 2020 23:47:26 +0530 Subject: [PATCH 09/90] feat: parse log list --- src/Appwrite/Utopia/Response/Filters/V06.php | 85 +++++++++++++------- 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 212e83c3f8..638e49948d 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -29,6 +29,14 @@ class V06 extends Filter { case Response::MODEL_SESSION : $parsedResponse = $this->parseSession($content); break; + + case Response::MODEL_SESSION_LIST : + $parsedResponse = $this->parseSessionList($content); + break; + + case Response::MODEL_LOG_LIST : + $parsedResponse = $this->parseLogList($content); + break; case Response::MODEL_ANY : $parsedResponse = $content; @@ -46,35 +54,58 @@ class V06 extends Filter { } - private function parseSession(array $content) + private function parseLogList(array $content) { - // Handle list of sessions - if (isset($content['sum'])) { - $sessions = $content['sessions']; - $parsedResponse = []; - $index = 0; - foreach($sessions as $session) { - $parsedResponse[$index++] = [ - '$id' => $session['$id'], - 'OS' => $session['osName'].' '.$session['osVersion'], - 'client' => $session['clientName'].' '.$session['clientVersion'], - 'device' => $session['deviceName'], - 'brand' => $session['deviceBrand'], - 'model' => $session['deviceModel'], - 'ip' => $session['ip'], - 'current' => $session['current'], - 'geo' => [ - 'isoCode' => empty($session['countryCode']) ? '---' : $session['countryCode'] , - 'country' => empty($session['countryName'] ) ? Locale::getText('locale.country.unknown') : $session['countryName'] - ], - ]; - } - return $parsedResponse; - } else { - // Handle single session - $content['type'] = Auth::TOKEN_TYPE_LOGIN; - return $content; + $logs = $content['logs']; + $parsedResponse = []; + $index = 0; + foreach($logs as $log) { + $parsedResponse[$index++] = [ + 'event' => $log['event'], + 'ip' => $log['ip'], + 'time' => strtotime($log['time']), + 'OS' => $log['osName'].' '.$log['osVersion'], + 'client' => $log['clientName'].' '.$log['clientVersion'], + 'device' => $log['deviceName'], + 'brand' => $log['deviceBrand'], + 'model' => $log['deviceModel'], + 'geo' => [ + 'isoCode' => empty($log['countryCode']) ? '---' : $log['countryCode'] , + 'country' => empty($log['countryName'] ) ? Locale::getText('locale.country.unknown') : $log['countryName'] + ] + ]; } + return $parsedResponse; + } + + private function parseSessionList(array $content) + { + $sessions = $content['sessions']; + $parsedResponse = []; + $index = 0; + foreach($sessions as $session) { + $parsedResponse[$index++] = [ + '$id' => $session['$id'], + 'OS' => $session['osName'].' '.$session['osVersion'], + 'client' => $session['clientName'].' '.$session['clientVersion'], + 'device' => $session['deviceName'], + 'brand' => $session['deviceBrand'], + 'model' => $session['deviceModel'], + 'ip' => $session['ip'], + 'current' => $session['current'], + 'geo' => [ + 'isoCode' => empty($session['countryCode']) ? '---' : $session['countryCode'] , + 'country' => empty($session['countryName'] ) ? Locale::getText('locale.country.unknown') : $session['countryName'] + ], + ]; + } + return $parsedResponse; + } + + private function parseSession(array $content) + { + $content['type'] = Auth::TOKEN_TYPE_LOGIN; + return $content; } private function parseUser(array $content) From fde5183594b46214e71a832545234878d2c6784b Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 27 Dec 2020 23:52:05 +0530 Subject: [PATCH 10/90] feat: parse token --- src/Appwrite/Utopia/Response/Filters/V06.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 638e49948d..c1b138abe1 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -38,6 +38,9 @@ class V06 extends Filter { $parsedResponse = $this->parseLogList($content); break; + case Response::MODEL_TOKEN: + $parsedResponse = $this->parseToken($content); + break; case Response::MODEL_ANY : $parsedResponse = $content; break; @@ -54,6 +57,12 @@ class V06 extends Filter { } + private function parseToken(array $content) + { + $content['type'] = Auth::TOKEN_TYPE_RECOVERY; + return $content; + } + private function parseLogList(array $content) { $logs = $content['logs']; From 9177d659a1ff631a1d0f5106eac0c9f3f4f37a4b Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 00:32:15 +0530 Subject: [PATCH 11/90] feat: parse locale --- src/Appwrite/Utopia/Response/Filters/V06.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index c1b138abe1..f83007d9d0 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -41,12 +41,18 @@ class V06 extends Filter { case Response::MODEL_TOKEN: $parsedResponse = $this->parseToken($content); break; + + case Response::MODEL_LOCALE: + $parsedResponse = $this->parseLocale($content); + break; + + case Response::MODEL_ANY : $parsedResponse = $content; break; default: - throw new Exception('Recevied invlaid model : '.$model); + throw new Exception('Recevied invalid model : '.$model); } return $parsedResponse; @@ -57,6 +63,18 @@ class V06 extends Filter { } + private function parseLocale(array $content) + { + $content['ip'] = empty($content['ip']) ? '' : $content['ip']; + $content['countryCode'] = empty($content['countryCode']) ? '--' : $content['countryCode']; + $content['country'] = empty($content['country']) ? Locale::getText('locale.country.unknown') : $content['country']; + $content['continent'] = empty($content['continent']) ? Locale::getText('locale.country.unknown') : $content['continent']; + $content['continentCode'] = empty($content['continentCode']) ? '--' : $content['continentCode']; + $content['eu'] = empty($content['eu']) ? false : $content['eu']; + $content['currency'] = empty($content['currency']) ? null : $content['currency']; + return $content; + } + private function parseToken(array $content) { $content['type'] = Auth::TOKEN_TYPE_RECOVERY; From b57a2de8ee28327baf47807b029822a3b866543a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 12:34:33 +0530 Subject: [PATCH 12/90] feat: parse country list --- src/Appwrite/Utopia/Response/Filters/V06.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index f83007d9d0..c1641089f5 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -46,6 +46,9 @@ class V06 extends Filter { $parsedResponse = $this->parseLocale($content); break; + case Response::MODEL_COUNTRY_LIST: + $parsedResponse = $this->parseCountryList($content); + break; case Response::MODEL_ANY : $parsedResponse = $content; @@ -63,6 +66,17 @@ class V06 extends Filter { } + private function parseCountryList(array $content) + { + $countries = $content['country']; + $parsedResponse = []; + foreach($countries as $country) { + $parsedResponse['code'] = $country['name']; + } + + return $parsedResponse; + } + private function parseLocale(array $content) { $content['ip'] = empty($content['ip']) ? '' : $content['ip']; From d0296db6e5133bc62656090cc1ee495cf1e7305f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 12:41:30 +0530 Subject: [PATCH 13/90] feat: parse phone list --- src/Appwrite/Utopia/Response/Filters/V06.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index c1641089f5..8339c8d4a6 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -50,6 +50,10 @@ class V06 extends Filter { $parsedResponse = $this->parseCountryList($content); break; + case Response::MODEL_PHONE_LIST: + $parsedResponse = $this->parsePhoneList($content); + break; + case Response::MODEL_ANY : $parsedResponse = $content; break; @@ -66,14 +70,25 @@ class V06 extends Filter { } + private function parsePhoneList(array $content) + { + $phones = $content['phones']; + $parsedResponse = []; + foreach($phones as $phone) { + $parsedResponse['countryCode'] = $phone['code']; + } + + return $parsedResponse; + } + private function parseCountryList(array $content) { - $countries = $content['country']; + $countries = $content['countries']; $parsedResponse = []; foreach($countries as $country) { $parsedResponse['code'] = $country['name']; } - + return $parsedResponse; } From d5c7445c8868d6aa10702930775c6f218dd2b0f0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 13:42:15 +0530 Subject: [PATCH 14/90] feat: parse continentlist --- src/Appwrite/Utopia/Response/Filters/V06.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 8339c8d4a6..7abfc9dc54 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -54,6 +54,10 @@ class V06 extends Filter { $parsedResponse = $this->parsePhoneList($content); break; + case Response::MODEL_CONTINENT_LIST: + $parsedResponse = $this->parseContinentList($content); + break; + case Response::MODEL_ANY : $parsedResponse = $content; break; @@ -70,6 +74,17 @@ class V06 extends Filter { } + private function parseContinentList(array $content) + { + $continents = $content['continents']; + $parsedResponse = []; + foreach($continents as $continent) { + $parsedResponse['code'] = $continent['name']; + } + + return $parsedResponse; + } + private function parsePhoneList(array $content) { $phones = $content['phones']; From 811fbd96bbc4d6bf44dea87d5b8f3be9c41aaf23 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 13:51:58 +0530 Subject: [PATCH 15/90] feat: parse currency list --- src/Appwrite/Utopia/Response/Filters/V06.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 7abfc9dc54..1c11393008 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -58,6 +58,10 @@ class V06 extends Filter { $parsedResponse = $this->parseContinentList($content); break; + case Response::MODEL_CURRENCY_LIST: + $parsedResponse = $this->parseCurrencyList($content); + break; + case Response::MODEL_ANY : $parsedResponse = $content; break; @@ -74,6 +78,12 @@ class V06 extends Filter { } + private function parseCurrencyList(array $content) + { + $content['locations'] = []; + return $content; + } + private function parseContinentList(array $content) { $continents = $content['continents']; From af774acf92d03b771fa84f116c93a486faa6d41e Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 15:03:38 +0530 Subject: [PATCH 16/90] feat: parse users list --- src/Appwrite/Utopia/Response/Filters/V06.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 1c11393008..e2c89c9e8a 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -26,6 +26,10 @@ class V06 extends Filter { $parsedResponse = $this->parseUser($content); break; + case Response::MODEL_USER_LIST: + $parsedResponse = $this->parseUserList($content); + break; + case Response::MODEL_SESSION : $parsedResponse = $this->parseSession($content); break; @@ -189,6 +193,16 @@ class V06 extends Filter { return $content; } + private function parseUserList(array $content) + { + $users = $content['users']; + $parsedResponse = []; + foreach($users as $user) { + $parsedResponse[] = $this->parseUser($user); + } + return $parsedResponse; + } + private function parseUser(array $content) { foreach (Config::getParam('providers') as $key => $provider) { From f6c140d84a126e425697548d50acbce1638862ce Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 15:12:54 +0530 Subject: [PATCH 17/90] feat: add status field to users response --- src/Appwrite/Utopia/Response/Filters/V06.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index e2c89c9e8a..77e0bd2582 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -212,7 +212,7 @@ class V06 extends Filter { $content['oauth2'.ucfirst($key)] = ''; $content['oauth2'.ucfirst($key).'AccessToken'] = ''; } - + $content['status'] = empty($content['status']) ? 0 : $content['status']; $content['roles'] = Authorization::getRoles() ?? []; return $content; } From ef0f886ce6b1f05c2f8a17b1a335bdac6f49d640 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 15:21:45 +0530 Subject: [PATCH 18/90] feat: added todos for some /users endpoints --- app/controllers/api/users.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 3b1b8bcef5..dd49e52f88 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -425,6 +425,7 @@ App::delete('/v1/users/:userId/sessions/:sessionId') } } + // TODO : Response filter implementation $response->noContent(); }, ['response', 'projectDB', 'events']); @@ -465,6 +466,7 @@ App::delete('/v1/users/:userId/sessions') ->setParam('payload', $response->output($user, Response::MODEL_USER)) ; + // TODO : Response filter implementation $response->noContent(); }, ['response', 'projectDB', 'events']); @@ -521,5 +523,6 @@ App::delete('/v1/users/:userId') ->setParam('payload', $response->output($user, Response::MODEL_USER)) ; + // TODO : Response filter implementation $response->noContent(); }, ['response', 'projectDB', 'events', 'deletes']); From 018a1e8bf54c619068b1f4845a22f144166711ca Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 16:34:08 +0530 Subject: [PATCH 19/90] feat: parse membership --- src/Appwrite/Utopia/Response/Filters/V06.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 77e0bd2582..1396fb6c2a 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -18,9 +18,6 @@ class V06 extends Filter { $parsedResponse = array(); switch($model) { - case Response::MODEL_PROJECT : - $parsedResponse = $this->parseProject($content); - break; case Response::MODEL_USER : $parsedResponse = $this->parseUser($content); @@ -29,6 +26,18 @@ class V06 extends Filter { case Response::MODEL_USER_LIST: $parsedResponse = $this->parseUserList($content); break; + + case Response::MODEL_TEAM: + $parsedResponse = $content; + break; + + case Response::MODEL_TEAM_LIST: + $parsedResponse = $content['teams']; + break; + + case Response::MODEL_MEMBERSHIP: + $parsedResponse = $content; + break; case Response::MODEL_SESSION : $parsedResponse = $this->parseSession($content); @@ -77,11 +86,6 @@ class V06 extends Filter { return $parsedResponse; } - private function parseProject(array $content) - { - - } - private function parseCurrencyList(array $content) { $content['locations'] = []; From f1887d2d9b42cadfd5b73f7ef2e866e9deb9d295 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 28 Dec 2020 22:12:13 +0530 Subject: [PATCH 20/90] feat: parse membership list --- src/Appwrite/Utopia/Response/Filters/V06.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 1396fb6c2a..79f1ef92fc 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -38,6 +38,10 @@ class V06 extends Filter { case Response::MODEL_MEMBERSHIP: $parsedResponse = $content; break; + + case Response::MODEL_MEMBERSHIP_LIST: + $parsedResponse = $content['memberships']; + break; case Response::MODEL_SESSION : $parsedResponse = $this->parseSession($content); From 54f40c8ce2d0fd1764e3a55c917fda53b211811f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 29 Dec 2020 01:01:26 +0530 Subject: [PATCH 21/90] feat: parse file --- src/Appwrite/Utopia/Response/Filters/V06.php | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 79f1ef92fc..9d8d00a94b 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -3,7 +3,9 @@ namespace Appwrite\Utopia\Response\Filter; use Appwrite\Auth\Auth; +use Appwrite\Database\Database; use Appwrite\Database\Validator\Authorization; +use Appwrite\OpenSSL\OpenSSL; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter; use Exception; @@ -19,6 +21,10 @@ class V06 extends Filter { switch($model) { + case Response::MODEL_FILE : + $parsedResponse = $this->parseFile($content); + break; + case Response::MODEL_USER : $parsedResponse = $this->parseUser($content); break; @@ -90,6 +96,22 @@ class V06 extends Filter { return $parsedResponse; } + private function parseFile(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_FILES; + $content['algorithm'] = 'gzip'; + $content['comment'] = ''; + $content['fileOpenSSLCipher'] = OpenSSL::CIPHER_AES_128_GCM; + $content['fileOpenSSLIV'] = ''; + $content['fileOpenSSLTag'] = ''; + $content['fileOpenSSLVersion'] = ''; + $content['folderId'] = ''; + $content['path'] = ''; + $content['sizeActual'] = $content['sizeOriginal']; + $content['token'] = ''; + return $content; + } + private function parseCurrencyList(array $content) { $content['locations'] = []; From 450c3e6f88fc9acc2786900b2ab42e61dbd76cbb Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 29 Dec 2020 01:09:22 +0530 Subject: [PATCH 22/90] feat: parse file list --- src/Appwrite/Utopia/Response/Filters/V06.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 9d8d00a94b..4627157fcc 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -25,6 +25,10 @@ class V06 extends Filter { $parsedResponse = $this->parseFile($content); break; + case Response::MODEL_FILE_LIST : + $parsedResponse = $content; + break; + case Response::MODEL_USER : $parsedResponse = $this->parseUser($content); break; From 9c01fb1ff60ddbeab887f0178b7693a8ad8622d9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 29 Dec 2020 22:21:51 +0530 Subject: [PATCH 23/90] feat: parse collection --- src/Appwrite/Utopia/Response/Filters/V06.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 4627157fcc..4f90e33174 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -21,6 +21,10 @@ class V06 extends Filter { switch($model) { + case Response::MODEL_COLLECTION: + $parsedResponse = $this->parseCollection($content); + break; + case Response::MODEL_FILE : $parsedResponse = $this->parseFile($content); break; @@ -100,6 +104,13 @@ class V06 extends Filter { return $parsedResponse; } + private function parseCollection(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_COLLECTIONS; + $content['structure'] = true; + return $content; + } + private function parseFile(array $content) { $content['$collection'] = Database::SYSTEM_COLLECTION_FILES; From fa748b62306ece06279c7b62a50807eba0eb158a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 29 Dec 2020 22:28:54 +0530 Subject: [PATCH 24/90] feat: parse collection list --- src/Appwrite/Utopia/Response/Filters/V06.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 4f90e33174..40cede4f73 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -25,6 +25,10 @@ class V06 extends Filter { $parsedResponse = $this->parseCollection($content); break; + case Response::MODEL_COLLECTION_LIST: + $parsedResponse = $this->parseCollectionList($content); + break; + case Response::MODEL_FILE : $parsedResponse = $this->parseFile($content); break; @@ -104,6 +108,14 @@ class V06 extends Filter { return $parsedResponse; } + private function parseCollectionList(array $content) + { + foreach($content['collections'] as $key => $collection){ + $content['collections'][$key] = $this->parseCollection($collection); + } + return $content; + } + private function parseCollection(array $content) { $content['$collection'] = Database::SYSTEM_COLLECTION_COLLECTIONS; From d67bcec7b9b876a7d2d3ec2ee0f3743b9d94b712 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 29 Dec 2020 23:55:34 +0530 Subject: [PATCH 25/90] feat: parse document list --- src/Appwrite/Utopia/Response/Filters/V06.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 40cede4f73..17c6d19932 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -21,6 +21,10 @@ class V06 extends Filter { switch($model) { + case Response::MODEL_DOCUMENT_LIST: + $parsedResponse = $content; + break; + case Response::MODEL_COLLECTION: $parsedResponse = $this->parseCollection($content); break; From 2ffb34fab14e26d99b7ddf2e1c6e379b702965e6 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 00:12:03 +0530 Subject: [PATCH 26/90] feat: added check for env variable on startup --- .env | 1 + Dockerfile | 3 ++- app/http.php | 7 +++++++ docker-compose.yml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 9764cfe894..e3c45cbbb5 100644 --- a/.env +++ b/.env @@ -27,3 +27,4 @@ _APP_SMTP_PASSWORD= _APP_STORAGE_LIMIT=10000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_CONTAINERS=10 +_APP_SYSTEM_RESPONSE_FORMAT=0.6 diff --git a/Dockerfile b/Dockerfile index d41dbc50fd..0eba6f5624 100755 --- a/Dockerfile +++ b/Dockerfile @@ -93,7 +93,8 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_TIMEOUT=900 \ _APP_FUNCTIONS_CONTAINERS=10 \ _APP_SETUP=self-hosted \ - _APP_VERSION=$VERSION + _APP_VERSION=$VERSION \ + _APP_SYSTEM_RESPONSE_FORMAT=0.6 #ENV _APP_SMTP_SECURE '' #ENV _APP_SMTP_USERNAME '' #ENV _APP_SMTP_PASSWORD '' diff --git a/app/http.php b/app/http.php index afb9411ec5..2f7859f110 100644 --- a/app/http.php +++ b/app/http.php @@ -23,6 +23,7 @@ error_reporting(E_ALL); $http = new Server("0.0.0.0", 80); $payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 10000000 /* 10mb */)); +$responseFormat = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', null); $http ->set([ @@ -48,6 +49,12 @@ $http->on('AfterReload', function($serv, $workerId) { }); $http->on('start', function (Server $http) use ($payloadSize) { + + if(empty($responseFormat)) { + Console::error('Missing value for environment variable _APP_SYSTEM_RESPONSE_FORMAT. Exiting ...'); + exit(1); + } + Console::success('Server started succefully (max payload is '.number_format($payloadSize).' bytes)'); Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}"); diff --git a/docker-compose.yml b/docker-compose.yml index a6bf759f56..f0f54f9939 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,6 +102,7 @@ services: - _APP_STORAGE_LIMIT - _APP_FUNCTIONS_TIMEOUT - _APP_FUNCTIONS_CONTAINERS + - _APP_SYSTEM_RESPONSE_FORMAT appwrite-worker-usage: entrypoint: worker-usage From 51600bc1d916bd37465d8f3419aa6430da18e24e Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 00:37:33 +0530 Subject: [PATCH 27/90] feat: added check for header on api init --- app/controllers/general.php | 23 +++++++++++++++++++++++ app/http.php | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 972cbf4110..85b8adce70 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -16,12 +16,23 @@ use Appwrite\Database\Validator\Authorization; use Appwrite\Network\Validator\Origin; use Appwrite\Storage\Device\Local; use Appwrite\Storage\Storage; +use Appwrite\Utopia\Response\Filter; +use Appwrite\Utopia\Response\Filter\V06; use Utopia\CLI\Console; Config::setParam('domainVerification', false); Config::setParam('cookieDomain', 'localhost'); Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE); +function mapResponseFormatToClass(string $responseFormat): Filter { + switch($responseFormat) { + case preg_match($responseFormat, "/0\.[0-6]\.\d/"): + return new V06(); + default: + return null; + } +} + App::init(function ($utopia, $request, $response, $console, $project, $user, $locale, $events, $audits, $usage, $deletes, $clients) { /** @var Utopia\Swoole\Request $request */ /** @var Appwrite\Utopia\Response $response */ @@ -92,6 +103,18 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo Storage::setDevice('files', new Local(APP_STORAGE_UPLOADS.'/app-'.$project->getId())); Storage::setDevice('functions', new Local(APP_STORAGE_FUNCTIONS.'/app-'.$project->getId())); + /* + * Response format + */ + $responseFormatEnvVar = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', ''); + $responseFormatHeader = $request->getHeader('x-appwrite-response-format', ''); + $responseFormat = empty($responseFormatHeader) ? $responseFormatEnvVar : $responseFormatHeader; + if (empty($responseFormat) || ($filter = mapResponseFormatToClass($responseFormat)) == null) { + throw new Exception('No filter available for response format : '.$responseFormat, 404); + } else { + Response::setFilter($filter); + } + /* * Security Headers * diff --git a/app/http.php b/app/http.php index 2f7859f110..a28af328fe 100644 --- a/app/http.php +++ b/app/http.php @@ -23,7 +23,7 @@ error_reporting(E_ALL); $http = new Server("0.0.0.0", 80); $payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 10000000 /* 10mb */)); -$responseFormat = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', null); +$responseFormat = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', ''); $http ->set([ From cebd016282c9f1db3f5bda38fa6cf8c563e98680 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 00:38:48 +0530 Subject: [PATCH 28/90] feat: modified the regex --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 85b8adce70..8c0404ce5f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -26,7 +26,7 @@ Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE); function mapResponseFormatToClass(string $responseFormat): Filter { switch($responseFormat) { - case preg_match($responseFormat, "/0\.[0-6]\.\d/"): + case preg_match($responseFormat, "/0\.[0-6]\.\d?/"): return new V06(); default: return null; From c508657a50fcd9d3f9300e614ea6b9594e0249b5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 00:42:32 +0530 Subject: [PATCH 29/90] feat: apply parse method if filter is present --- src/Appwrite/Utopia/Response.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 70e8e46d91..16fedaf8e1 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -293,6 +293,10 @@ class Response extends SwooleResponse } $item = $this->output($item, $rule['type']); + // If filter is set, parse the item + if(self::isFilter()){ + $item = self::getFilter()->parse($item, $rule['type']); + } } } } From a37a28fdc9ca6e6e9bccf04971c1bff2c81c1a71 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 16:24:11 +0530 Subject: [PATCH 30/90] feat: added unit test for setFilter --- src/Appwrite/Utopia/Response/Filters/V06.php | 4 +-- tests/unit/Utopia/ResponseTest.php | 34 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tests/unit/Utopia/ResponseTest.php diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 17c6d19932..4e15862108 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -16,8 +16,8 @@ class V06 extends Filter { // Convert 0.7 Data format to 0.6 format public function parse(array $content, string $model): array { - - $parsedResponse = array(); + + $parsedResponse = []; switch($model) { diff --git a/tests/unit/Utopia/ResponseTest.php b/tests/unit/Utopia/ResponseTest.php new file mode 100644 index 0000000000..20df14058a --- /dev/null +++ b/tests/unit/Utopia/ResponseTest.php @@ -0,0 +1,34 @@ +object = new Response(new SwooleResponse()); + } + + public function testSetFilter() + { + $this->assertEquals($this->object->isFilter(), false); + $this->assertEquals($this->object->getFilter(), null); + + $filter = new V06(); + $this->object->setFilter($filter); + + $this->assertEquals($this->object->isFilter(), true); + $this->assertEquals($this->object->getFilter(), $filter); + } +} \ No newline at end of file From 28f003e5bed03d420fe04a3925737e1badfd9c77 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 31 Dec 2020 01:07:30 +0530 Subject: [PATCH 31/90] feat: unit tests for response filters --- tests/unit/Utopia/Filters/V06Test.php | 237 ++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 tests/unit/Utopia/Filters/V06Test.php diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php new file mode 100644 index 0000000000..a5d2bfaa85 --- /dev/null +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -0,0 +1,237 @@ +filter = new V06(); + } + + public function testParseUser() + { + $content = [ + '$id' => '5e5ea5c16897e', + 'name' => 'John Doe', + 'registration' => 1592981250, + 'status' => 0, + 'email' => 'john@appwrite.io', + 'emailVerification' => false, + 'prefs' => [ + 'theme' => 'pink', + 'timezone' => 'UTC' + ] + ]; + + $model = Response::MODEL_USER; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['name'], 'John Doe'); + $this->assertEquals($parsedResponse['registration'], 1592981250); + $this->assertEquals($parsedResponse['status'], 0); + $this->assertEquals($parsedResponse['email'], 'john@appwrite.io'); + $this->assertEquals($parsedResponse['emailVerification'], false); + $this->assertEquals($parsedResponse['prefs'], ['theme' => 'pink', 'timezone' => 'UTC']); + $this->assertEquals($parsedResponse['status'], 0); + $this->assertEquals($parsedResponse['roles'], Authorization::getRoles() ?? []); + } + + public function testParseUserList() + { + $content = [ + 'sum' => 1, + 'users' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + 'name' => 'John Doe', + 'registration' => 1592981250, + 'status' => 0, + 'email' => 'john@appwrite.io', + 'emailVerification' => false, + 'prefs' => [ + 'theme' => 'pink', + 'timezone' => 'UTC' + ] + ] + ] + ]; + + $model = Response::MODEL_USER_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['users'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['users'][0]['name'], 'John Doe'); + $this->assertEquals($parsedResponse['users'][0]['registration'], 1592981250); + $this->assertEquals($parsedResponse['users'][0]['status'], 0); + $this->assertEquals($parsedResponse['users'][0]['email'], 'john@appwrite.io'); + $this->assertEquals($parsedResponse['users'][0]['emailVerification'], false); + $this->assertEquals($parsedResponse['users'][0]['prefs'], ['theme' => 'pink', 'timezone' => 'UTC']); + $this->assertEquals($parsedResponse['users'][0]['status'], 0); + $this->assertEquals($parsedResponse['users'][0]['roles'], Authorization::getRoles() ?? []); + } + + public function testParseSession() + { + $content = [ + '$id' => '5e5ea5c16897e', + 'userId' => '5e5bb8c16897e', + 'expire' => 1592981250, + 'ip' => '127.0.0.1', + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States', + 'current' => true + ]; + + $model = Response::MODEL_SESSION; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['userId'], '5e5bb8c16897e'); + $this->assertEquals($parsedResponse['expire'], 1592981250); + $this->assertEquals($parsedResponse['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['osCode'], 'Mac'); + $this->assertEquals($parsedResponse['osName'], 'Mac'); + $this->assertEquals($parsedResponse['osVersion'], 'Mac'); + $this->assertEquals($parsedResponse['clientType'], 'browser'); + $this->assertEquals($parsedResponse['clientCode'], 'CM'); + $this->assertEquals($parsedResponse['clientName'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['clientVersion'], '84.0'); + $this->assertEquals($parsedResponse['clientEngine'], 'WebKit'); + $this->assertEquals($parsedResponse['clientEngineVersion'], '605.1.15'); + $this->assertEquals($parsedResponse['deviceName'], 'smartphone'); + $this->assertEquals($parsedResponse['deviceBrand'], 'Google'); + $this->assertEquals($parsedResponse['deviceModel'], 'Nexus 5'); + $this->assertEquals($parsedResponse['countryCode'], 'US'); + $this->assertEquals($parsedResponse['countryName'], 'United States'); + $this->assertEquals($parsedResponse['current'], true); + $this->assertEquals($parsedResponse['type'], Auth::TOKEN_TYPE_LOGIN); + } + + public function testParseSessionList() + { + $content = [ + 'sum' => 1, + 'sessions' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + 'userId' => '5e5bb8c16897e', + 'expire' => 1592981250, + 'ip' => '127.0.0.1', + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States', + 'current' => true + ] + ] + ]; + + $model = Response::MODEL_SESSION_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['sessions'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['sessions'][0]['OS'], 'Mac Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['client'], 'Chrome Mobile iOS 84.0'); + $this->assertEquals($parsedResponse['sessions'][0]['device'], 'smartphone'); + $this->assertEquals($parsedResponse['sessions'][0]['brand'], 'Google'); + $this->assertEquals($parsedResponse['sessions'][0]['model'], 'Nexus 5'); + $this->assertEquals($parsedResponse['sessions'][0]['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['sessions'][0]['current'], true); + $this->assertEquals($parsedResponse['sessions'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); + } + + public function testParseLogList() + { + $content = [ + 'sum' => 1, + 'logs' => [ + 0 => [ + 'event' => 'account.sessions.create', + 'ip' => '127.0.0.1', + 'time' => 1592981250, + 'osCode' => 'Mac', + 'osName' => 'Mac', + 'osVersion' => 'Mac', + 'clientType' => 'browser', + 'clientCode' => 'CM', + 'clientName' => 'Chrome Mobile iOS', + 'clientVersion' => '84.0', + 'clientEngine' => 'WebKit', + 'clientEngineVersion' => '605.1.15', + 'deviceName' => 'smartphone', + 'deviceBrand' => 'Google', + 'deviceModel' => 'Nexus 5', + 'countryCode' => 'US', + 'countryName' => 'United States' + ] + ] + ]; + + $model = Response::MODEL_LOG_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['logs'][0]['event'], 'account.sessions.create'); + $this->assertEquals($parsedResponse['logs'][0]['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['logs'][0]['time'], 1592981250); + $this->assertEquals($parsedResponse['logs'][0]['OS'], 'Mac Mac'); + $this->assertEquals($parsedResponse['logs'][0]['client'], 'Chrome Mobile iOS 84.0'); + $this->assertEquals($parsedResponse['logs'][0]['device'], 'smartphone'); + $this->assertEquals($parsedResponse['logs'][0]['brand'], 'Google'); + $this->assertEquals($parsedResponse['logs'][0]['model'], 'Nexus 5'); + $this->assertEquals($parsedResponse['logs'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['logs'][0]['geo']['country'], 'United States'); + } + + public function testParseToken() + { + $content = [ + '$id' => 'bb8ea5c16897e', + 'userId' => '5e5ea5c168bb8', + 'secret' => '', + 'expire' => 1592981250 + ]; + + $model = Response::MODEL_TOKEN; + $parsedResponse = $this->filter->parse($content, $model); + } +} \ No newline at end of file From 8cc10c683abb85bbf24da5635734a25471763fa9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 31 Dec 2020 12:42:23 +0530 Subject: [PATCH 32/90] feat: unit tests for response filters --- src/Appwrite/Utopia/Response/Filters/V06.php | 2 +- tests/unit/Utopia/Filters/V06Test.php | 49 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 4e15862108..401bfd1a64 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -176,7 +176,7 @@ class V06 extends Filter { $countries = $content['countries']; $parsedResponse = []; foreach($countries as $country) { - $parsedResponse['code'] = $country['name']; + $parsedResponse[$country['code']] = $country['name']; } return $parsedResponse; diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index a5d2bfaa85..0c5935793c 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -233,5 +233,54 @@ class V06Test extends TestCase $model = Response::MODEL_TOKEN; $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], 'bb8ea5c16897e'); + $this->assertEquals($parsedResponse['userId'], '5e5ea5c168bb8'); + $this->assertEquals($parsedResponse['expire'], 1592981250); + $this->assertEquals($parsedResponse['secret'], ''); + $this->assertEquals($parsedResponse['type'], Auth::TOKEN_TYPE_RECOVERY); + } + + public function testParseLocale() + { + $content = [ + 'ip' => '127.0.0.1', + 'countryCode' => 'US', + 'country' => 'United States', + 'continentCode' => 'NA', + 'continent' => 'North America', + 'eu' => false, + 'currency' => 'USD' + ]; + + $model = Response::MODEL_LOCALE; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['contryCode'], 'US'); + $this->assertEquals($parsedResponse['country'], 'United States'); + $this->assertEquals($parsedResponse['continentCode'], 'NA'); + $this->assertEquals($parsedResponse['continent'], 'North America'); + $this->assertEquals($parsedResponse['eu'], false); + $this->assertEquals($parsedResponse['currency'], 'USD'); + } + + public function testParseCountryList() + { + $content = [ + 'sum' => 1, + 'countries' => [ + 0 => [ + 'name' => 'United States', + 'code' => 'US' + ] + ] + ]; + + $model = Response::MODEL_COUNTRY_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['countries']['US'], 'United States'); } } \ No newline at end of file From 4fc40a387af65ebcb389a20ef9b9de5242ff2df0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 31 Dec 2020 13:25:25 +0530 Subject: [PATCH 33/90] feat: unit tests for response filters --- src/Appwrite/Utopia/Response/Filters/V06.php | 20 ++- tests/unit/Utopia/Filters/V06Test.php | 136 +++++++++++++++++++ 2 files changed, 149 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 401bfd1a64..bed31b48bc 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -146,7 +146,15 @@ class V06 extends Filter { private function parseCurrencyList(array $content) { $content['locations'] = []; - return $content; + + $currencies = $content['currencies']; + $parsedResponse = []; + foreach($currencies as $currency) { + $currency['locations'] = []; + $parsedResponse[] = $currency; + } + + return $parsedResponse; } private function parseContinentList(array $content) @@ -154,7 +162,7 @@ class V06 extends Filter { $continents = $content['continents']; $parsedResponse = []; foreach($continents as $continent) { - $parsedResponse['code'] = $continent['name']; + $parsedResponse[$continent['code']] = $continent['name']; } return $parsedResponse; @@ -165,7 +173,7 @@ class V06 extends Filter { $phones = $content['phones']; $parsedResponse = []; foreach($phones as $phone) { - $parsedResponse['countryCode'] = $phone['code']; + $parsedResponse[$phone['countryCode']] = $phone['code']; } return $parsedResponse; @@ -204,9 +212,8 @@ class V06 extends Filter { { $logs = $content['logs']; $parsedResponse = []; - $index = 0; foreach($logs as $log) { - $parsedResponse[$index++] = [ + $parsedResponse[] = [ 'event' => $log['event'], 'ip' => $log['ip'], 'time' => strtotime($log['time']), @@ -228,9 +235,8 @@ class V06 extends Filter { { $sessions = $content['sessions']; $parsedResponse = []; - $index = 0; foreach($sessions as $session) { - $parsedResponse[$index++] = [ + $parsedResponse[] = [ '$id' => $session['$id'], 'OS' => $session['osName'].' '.$session['osVersion'], 'client' => $session['clientName'].' '.$session['clientVersion'], diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 0c5935793c..3c98fc192b 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -3,7 +3,9 @@ namespace Appwrite\Tests; use Appwrite\Auth\Auth; +use Appwrite\Database\Database; use Appwrite\Database\Validator\Authorization; +use Appwrite\OpenSSL\OpenSSL; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter\V06; use PHPUnit\Framework\TestCase; @@ -283,4 +285,138 @@ class V06Test extends TestCase $this->assertEquals($parsedResponse['sum'], 1); $this->assertEquals($parsedResponse['countries']['US'], 'United States'); } + + public function testParsePhoneList() + { + $content = [ + 'sum' => 1, + 'phones' => [ + 0 => [ + 'code' => '+1', + 'countryCode' => 'US', + 'countryName' => 'United States' + ] + ] + ]; + + $model = Response::MODEL_PHONE_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['phones']['US'], '+1'); + } + + public function testParseContinentList() + { + $content = [ + 'sum' => 1, + 'continents' => [ + 0 => [ + 'name' => 'Europe', + 'code' => 'EU', + ] + ] + ]; + + $model = Response::MODEL_CONTINENT_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['continents']['EU'], 'Europe'); + } + + public function testParseCurrencyList() + { + $content = [ + 'sum' => 1, + 'currencies' => [ + 0 => [ + 'symbol' => '$', + 'name' => 'US dollar', + 'symbolNative' => '$', + 'decimalDigits' => 2, + 'rounding' => 0, + 'code' => 'USD', + 'namePlural' => 'US Dollars' + ] + ] + ]; + + $model = Response::MODEL_CURRENCY_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['currencies'][0]['symbol'], '$'); + $this->assertEquals($parsedResponse['currencies'][0]['name'], 'US dollar'); + $this->assertEquals($parsedResponse['currencies'][0]['symbolNative'], '$'); + $this->assertEquals($parsedResponse['currencies'][0]['decimalDigits'], 2); + $this->assertEquals($parsedResponse['currencies'][0]['rounding'], 0); + $this->assertEquals($parsedResponse['currencies'][0]['code'], 'USD'); + $this->assertEquals($parsedResponse['currencies'][0]['namePlural'], 'US Dollars'); + $this->assertEquals($parsedResponse['currencies'][0]['locations'], []); + } + + public function testParseFile() + { + $content = [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Pink.png', + 'dateCreated' => 1592981250, + 'signature' => '5d529fd02b544198ae075bd57c1762bb', + 'mimeType' => 'image/png', + 'sizeOriginal' => 17890 + ]; + + $model = Response::MODEL_FILE; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['name'], 'Pink.png'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['signature'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['mimeType'], 'image/png'); + $this->assertEquals($parsedResponse['sizeOriginal'], 17890); + $this->assertEquals($parsedResponse['$collection'], Database::SYSTEM_COLLECTION_FILES); + $this->assertEquals($parsedResponse['algorithm'], 'gzip'); + $this->assertEquals($parsedResponse['comment'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLCipher'], OpenSSL::CIPHER_AES_128_GCM); + $this->assertEquals($parsedResponse['fileOpenSSLIV'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLTag'], ''); + $this->assertEquals($parsedResponse['fileOpenSSLVersion'], ''); + $this->assertEquals($parsedResponse['folderId'], ''); + $this->assertEquals($parsedResponse['path'], ''); + $this->assertEquals($parsedResponse['sizeActual'], $content['sizeOriginal']); + $this->assertEquals($parsedResponse['token'], ''); + } + + public function testParseCollection() + { + $content = [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Movies', + 'dateCreated' => 1592981250, + 'dateUpdated' => '5d529fd02b544198ae075bd57c1762bb', + 'rules' => [] + ]; + + $model = Response::MODEL_COLLECTION; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['name'], 'Movies'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['dateUpdated'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['rules'], []); + $this->assertEquals($parsedResponse['$collection'], Database::SYSTEM_COLLECTION_COLLECTIONS); + $this->assertEquals($parsedResponse['structure'], true); + } + + public function testParseCollectionList() + { + + } } \ No newline at end of file From 734e0c3a818c84be4fa5295af929949ca3c658eb Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 31 Dec 2020 13:42:01 +0530 Subject: [PATCH 34/90] feat: unit tests for response filters --- tests/unit/Utopia/Filters/V06Test.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 3c98fc192b..2db87c8eb7 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -418,5 +418,31 @@ class V06Test extends TestCase public function testParseCollectionList() { + $content = [ + 'sum' => 1, + 'collections' => [ + 0 => [ + '$id' => '5e5ea5c16897e', + '$permissions' => ['read' => ['*'], 'write' => ['*']], + 'name' => 'Movies', + 'dateCreated' => 1592981250, + 'dateUpdated' => '5d529fd02b544198ae075bd57c1762bb', + 'rules' => [] + ] + ] + ]; + + $model = Response::MODEL_COLLECTION_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['collections'][0]['$id'], '5e5ea5c16897e'); + $this->assertEquals($parsedResponse['collections'][0]['$permissions'], ['read' => ['*'], 'write' => ['*']]); + $this->assertEquals($parsedResponse['collections'][0]['name'], 'Movies'); + $this->assertEquals($parsedResponse['collections'][0]['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['collections'][0]['dateUpdated'], '5d529fd02b544198ae075bd57c1762bb'); + $this->assertEquals($parsedResponse['collections'][0]['rules'], []); + $this->assertEquals($parsedResponse['collections'][0]['$collection'], Database::SYSTEM_COLLECTION_COLLECTIONS); + $this->assertEquals($parsedResponse['collections'][0]['structure'], true); } } \ No newline at end of file From d191a71593661fcfdf4cfb11dbb11f415a6f147a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 1 Jan 2021 01:26:39 +0530 Subject: [PATCH 35/90] feat: review comments --- app/controllers/general.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 62ca0be580..316fb85e0c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -24,15 +24,6 @@ Config::setParam('domainVerification', false); Config::setParam('cookieDomain', 'localhost'); Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE); -function mapResponseFormatToClass(string $responseFormat): Filter { - switch($responseFormat) { - case preg_match($responseFormat, "/0\.[0-6]\.\d?/"): - return new V06(); - default: - return null; - } -} - App::init(function ($utopia, $request, $response, $console, $project, $user, $locale, $events, $audits, $usage, $deletes, $clients) { /** @var Utopia\Swoole\Request $request */ /** @var Appwrite\Utopia\Response $response */ @@ -108,14 +99,15 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo /* * Response format */ - $responseFormatEnvVar = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', ''); - $responseFormatHeader = $request->getHeader('x-appwrite-response-format', ''); - $responseFormat = empty($responseFormatHeader) ? $responseFormatEnvVar : $responseFormatHeader; - if (empty($responseFormat) || ($filter = mapResponseFormatToClass($responseFormat)) == null) { - throw new Exception('No filter available for response format : '.$responseFormat, 404); - } else { - Response::setFilter($filter); + $responseFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); + switch($responseFormat) { + case version_compare ($responseFormat , '0.6.2', '=<') : + Response::setFilter(new V06()); + break; + default: + throw new Exception('No filter available for response format : '.$responseFormat, 404); } + /* * Security Headers From ad34b275dd7418ebabcaaf7887ef216d5d03cc7f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Jan 2021 21:05:21 +0530 Subject: [PATCH 36/90] feat: review comments --- app/controllers/general.php | 15 ++++++++------- app/http.php | 5 ----- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 316fb85e0c..c56b312357 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -100,14 +100,15 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo * Response format */ $responseFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); - switch($responseFormat) { - case version_compare ($responseFormat , '0.6.2', '=<') : - Response::setFilter(new V06()); - break; - default: - throw new Exception('No filter available for response format : '.$responseFormat, 404); + if (!empty($responseFormat)) { + switch($responseFormat) { + case version_compare ($responseFormat , '0.6.2', '=<') : + Response::setFilter(new V06()); + break; + default: + throw new Exception('No filter available for response format : '.$responseFormat, 400); + } } - /* * Security Headers diff --git a/app/http.php b/app/http.php index c409230418..9e27f21375 100644 --- a/app/http.php +++ b/app/http.php @@ -50,11 +50,6 @@ $http->on('AfterReload', function($serv, $workerId) { $http->on('start', function (Server $http) use ($payloadSize) { - if(empty($responseFormat)) { - Console::error('Missing value for environment variable _APP_SYSTEM_RESPONSE_FORMAT. Exiting ...'); - exit(1); - } - Console::success('Server started succefully (max payload is '.number_format($payloadSize).' bytes)'); Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}"); From d8561d030a3442e5d427fa7aa1b22d2da355928d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Jan 2021 21:10:00 +0530 Subject: [PATCH 37/90] feat: added env varible --- .env | 2 +- Dockerfile | 2 +- app/config/variables.php | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 5484ea858b..ef84b538c0 100644 --- a/.env +++ b/.env @@ -31,4 +31,4 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 _APP_FUNCTIONS_MEMORY_SWAP=128 _APP_MAINTENANCE_INTERVAL=86400 -_APP_SYSTEM_RESPONSE_FORMAT=0.6 \ No newline at end of file +_APP_SYSTEM_RESPONSE_FORMAT=0.7 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index cc72b5b776..7adeb42a18 100755 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ - _APP_SYSTEM_RESPONSE_FORMAT=0.6 \ + _APP_SYSTEM_RESPONSE_FORMAT=0.7 \ # 1 Day = 86400 s _APP_MAINTENANCE_INTERVAL=86400 #ENV _APP_SMTP_SECURE '' diff --git a/app/config/variables.php b/app/config/variables.php index 0893dfd252..a0d4ba96c5 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -175,4 +175,10 @@ return [ 'required' => false, 'question' => '', ], + [ + 'name' => '_APP_SYSTEM_RESPONSE_FORMAT', + 'default' => '0.7', + 'required' => false, + 'question' => '', + ], ]; \ No newline at end of file From 92339fe66898e8c7908292d913093c556621f5bf Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Jan 2021 21:45:14 +0530 Subject: [PATCH 38/90] fix: fix failing tests --- src/Appwrite/Utopia/Response.php | 2 +- tests/unit/Utopia/Filters/V06Test.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 16fedaf8e1..9d1773a226 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -359,7 +359,7 @@ class Response extends SwooleResponse * * @return Filter */ - public static function getFilter(): Filter + public static function getFilter(): ?Filter { return self::$filter; } diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 2db87c8eb7..42b1bba3f2 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -9,6 +9,7 @@ use Appwrite\OpenSSL\OpenSSL; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Filter\V06; use PHPUnit\Framework\TestCase; +use Utopia\Config\Config; class V06Test extends TestCase { From e499db64eab3a279505ee8114bce63ff5a67a912 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Jan 2021 21:58:09 +0530 Subject: [PATCH 39/90] fix: fix failing tests --- .env | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index ef84b538c0..5484ea858b 100644 --- a/.env +++ b/.env @@ -31,4 +31,4 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 _APP_FUNCTIONS_MEMORY_SWAP=128 _APP_MAINTENANCE_INTERVAL=86400 -_APP_SYSTEM_RESPONSE_FORMAT=0.7 \ No newline at end of file +_APP_SYSTEM_RESPONSE_FORMAT=0.6 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7adeb42a18..cc72b5b776 100755 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ - _APP_SYSTEM_RESPONSE_FORMAT=0.7 \ + _APP_SYSTEM_RESPONSE_FORMAT=0.6 \ # 1 Day = 86400 s _APP_MAINTENANCE_INTERVAL=86400 #ENV _APP_SMTP_SECURE '' From 83477651e60baa36a9c61efbd8a163cbc9086fcb Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Jan 2021 22:23:31 +0530 Subject: [PATCH 40/90] fix: fix failing tests --- .env | 2 +- Dockerfile | 2 +- app/controllers/general.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 5484ea858b..bf61b2fd6d 100644 --- a/.env +++ b/.env @@ -31,4 +31,4 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 _APP_FUNCTIONS_MEMORY_SWAP=128 _APP_MAINTENANCE_INTERVAL=86400 -_APP_SYSTEM_RESPONSE_FORMAT=0.6 \ No newline at end of file +_APP_SYSTEM_RESPONSE_FORMAT=0.6.2 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index cc72b5b776..f591751706 100755 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ - _APP_SYSTEM_RESPONSE_FORMAT=0.6 \ + _APP_SYSTEM_RESPONSE_FORMAT=0.6.2 \ # 1 Day = 86400 s _APP_MAINTENANCE_INTERVAL=86400 #ENV _APP_SMTP_SECURE '' diff --git a/app/controllers/general.php b/app/controllers/general.php index c56b312357..ba0a64eb1e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -102,7 +102,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo $responseFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); if (!empty($responseFormat)) { switch($responseFormat) { - case version_compare ($responseFormat , '0.6.2', '=<') : + case version_compare ($responseFormat , '0.6.2', '<=') : Response::setFilter(new V06()); break; default: From 9b1b5d3a7ee305887a9557ebf1b84143bac6758d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 3 Jan 2021 23:37:19 +0530 Subject: [PATCH 41/90] feat: review comments --- app/controllers/general.php | 2 ++ app/http.php | 1 - src/Appwrite/Utopia/Response.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index ba0a64eb1e..ed45f528dd 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -108,6 +108,8 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo default: throw new Exception('No filter available for response format : '.$responseFormat, 400); } + } else { + Response::setFilter(null); } /* diff --git a/app/http.php b/app/http.php index 9e27f21375..b3d7dcaac7 100644 --- a/app/http.php +++ b/app/http.php @@ -23,7 +23,6 @@ error_reporting(E_ALL); $http = new Server("0.0.0.0", 80); $payloadSize = max(4000000 /* 4mb */, App::getEnv('_APP_STORAGE_LIMIT', 10000000 /* 10mb */)); -$responseFormat = App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', ''); $http ->set([ diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 9d1773a226..1fa4962bc7 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -349,7 +349,7 @@ class Response extends SwooleResponse * * @return void */ - public static function setFilter(Filter $filter) + public static function setFilter(?Filter $filter) { self::$filter = $filter; } From 50bca50d10e24674379b61b3f60d33c83d376594 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 3 Jan 2021 23:42:11 +0530 Subject: [PATCH 42/90] feat: review comments --- .env | 2 +- Dockerfile | 1 - app/config/variables.php | 2 +- src/Appwrite/Utopia/Response.php | 14 +++++++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.env b/.env index bf61b2fd6d..c3a0d93d8c 100644 --- a/.env +++ b/.env @@ -31,4 +31,4 @@ _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 _APP_FUNCTIONS_MEMORY_SWAP=128 _APP_MAINTENANCE_INTERVAL=86400 -_APP_SYSTEM_RESPONSE_FORMAT=0.6.2 \ No newline at end of file +_APP_SYSTEM_RESPONSE_FORMAT= \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f591751706..fb578a6f1a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,6 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ - _APP_SYSTEM_RESPONSE_FORMAT=0.6.2 \ # 1 Day = 86400 s _APP_MAINTENANCE_INTERVAL=86400 #ENV _APP_SMTP_SECURE '' diff --git a/app/config/variables.php b/app/config/variables.php index a0d4ba96c5..82670c23a0 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -177,7 +177,7 @@ return [ ], [ 'name' => '_APP_SYSTEM_RESPONSE_FORMAT', - 'default' => '0.7', + 'default' => '', 'required' => false, 'question' => '', ], diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 1fa4962bc7..ce22df225e 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -250,7 +250,15 @@ class Response extends SwooleResponse */ public function dynamic(Document $document, string $model): void { - $this->json($this->output($document, $model)); + $output = $this->output($document, $model); + + // If filter is set, parse the item + if(self::isFilter()){ + $item = self::getFilter()->parse($output, $model); + } + + $this->json($output); + } /** @@ -293,10 +301,6 @@ class Response extends SwooleResponse } $item = $this->output($item, $rule['type']); - // If filter is set, parse the item - if(self::isFilter()){ - $item = self::getFilter()->parse($item, $rule['type']); - } } } } From 287bef7a6ce490ddfb8800d922cb659506c880df Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 00:33:23 +0200 Subject: [PATCH 43/90] Init new SDK --- README.md | 1 + app/config/environments.php | 4 +- app/config/platforms.php | 29 ++-- composer.json | 2 +- composer.lock | 275 +++++++++++++++++++----------------- 5 files changed, 164 insertions(+), 147 deletions(-) diff --git a/README.md b/README.md index ea3ee938b9..f5dea89bf7 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) * ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) * ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) +* ✅   [C#](https://github.com/appwrite/sdk-for-csharp) - **Expiremental** (Maintained by the Appwrite Team) * ✅   [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team) * ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team) diff --git a/app/config/environments.php b/app/config/environments.php index 9119bee335..228e7e4608 100644 --- a/app/config/environments.php +++ b/app/config/environments.php @@ -1,5 +1,7 @@ [ 'name' => 'Node.js', diff --git a/app/config/platforms.php b/app/config/platforms.php index c9a3f25b59..8b751e436d 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -20,7 +20,6 @@ return [ 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'javascript', 'source' => \realpath(__DIR__ . '/../sdks/client-web'), @@ -36,7 +35,6 @@ return [ 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'dart', 'source' => \realpath(__DIR__ . '/../sdks/client-flutter'), @@ -51,7 +49,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'swift', 'source' => false, @@ -66,7 +63,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => '', 'source' => false, @@ -81,7 +77,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'kotlin', 'source' => false, @@ -120,7 +115,6 @@ return [ 'package' => '', 'enabled' => true, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_CONSOLE, 'prism' => 'console', 'source' => \realpath(__DIR__ . '/../sdks/console-web'), @@ -146,7 +140,6 @@ return [ 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'javascript', 'source' => \realpath(__DIR__ . '/../sdks/server-nodejs'), @@ -162,7 +155,6 @@ return [ 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'typescript', 'source' => \realpath(__DIR__ . '/../sdks/server-deno'), @@ -178,7 +170,6 @@ return [ 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, 'beta' => false, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'php', 'source' => \realpath(__DIR__ . '/../sdks/server-php'), @@ -194,7 +185,6 @@ return [ 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'python', 'source' => \realpath(__DIR__ . '/../sdks/server-python'), @@ -210,7 +200,6 @@ return [ 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'ruby', 'source' => \realpath(__DIR__ . '/../sdks/server-ruby'), @@ -226,7 +215,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'go', 'source' => \realpath(__DIR__ . '/../sdks/server-go'), @@ -242,7 +230,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'java', 'source' => \realpath(__DIR__ . '/../sdks/server-java'), @@ -250,6 +237,21 @@ return [ 'gitRepoName' => 'sdk-for-java', 'gitUserName' => 'appwrite', ], + [ + 'key' => 'csharp', + 'name' => 'CSharp', + 'version' => '0.0.1', + 'url' => 'https://github.com/appwrite/sdk-for-csharp', + 'package' => '', + 'enabled' => true, + 'beta' => true, + 'family' => APP_PLATFORM_SERVER, + 'prism' => 'csharp', + 'source' => \realpath(__DIR__ . '/../sdks/server-csharp'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-csharp.git', + 'gitRepoName' => 'sdk-for-csharp', + 'gitUserName' => 'appwrite', + ], [ 'key' => 'dart', 'name' => 'Dart', @@ -258,7 +260,6 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'java', 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), diff --git a/composer.json b/composer.json index bf9f354acc..97d2263952 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.2.3", + "appwrite/sdk-generator": "0.3.0", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 500c67d954..606dd5fd67 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa1bf812ee6a45af12cdfbbfb7229471", + "content-hash": "57a43a1cab8459494f031551fe83ffb5", "packages": [ { "name": "appwrite/php-clamav", @@ -1158,9 +1158,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.2.2" + "source": "https://github.com/utopia-php/abuse/tree/0.3.1" }, - "time": "2020-10-23T06:51:42+00:00" + "time": "2020-12-21T17:28:03+00:00" }, { "name": "utopia-php/audit", @@ -1210,9 +1210,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.3.2" + "source": "https://github.com/utopia-php/audit/tree/0.5.1" }, - "time": "2020-10-23T08:09:44+00:00" + "time": "2020-12-21T17:28:53+00:00" }, { "name": "utopia-php/cache", @@ -1315,9 +1315,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.7.3" + "source": "https://github.com/utopia-php/cli/tree/0.8" }, - "time": "2020-11-02T07:50:18+00:00" + "time": "2020-12-14T06:31:42+00:00" }, { "name": "utopia-php/config", @@ -1858,11 +1858,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.2.3", + "version": "0.3.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "6b564fef01fd681023c1d465783931bade04468d" + "reference": "f0a6ecf92869012dd546ec503c69177dce0f9d90" }, "require": { "ext-curl": "*", @@ -1875,7 +1875,6 @@ "require-dev": { "phpunit/phpunit": "^7.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1893,7 +1892,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-12-23T21:58:58+00:00" + "time": "2021-01-03T21:23:24+00:00" }, { "name": "composer/package-versions-deprecated", @@ -1901,12 +1900,12 @@ "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "64291c788b9a18272346decf566931e33a317399" + "reference": "f921205948ab93bb19f86327c793a81edb62f236" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/64291c788b9a18272346decf566931e33a317399", - "reference": "64291c788b9a18272346decf566931e33a317399", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/f921205948ab93bb19f86327c793a81edb62f236", + "reference": "f921205948ab93bb19f86327c793a81edb62f236", "shasum": "" }, "require": { @@ -1967,7 +1966,7 @@ "type": "tidelift" } ], - "time": "2020-11-12T09:39:33+00:00" + "time": "2020-12-27T20:11:05+00:00" }, { "name": "composer/semver", @@ -2324,16 +2323,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.64", + "version": "1.3.65", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855" + "reference": "227f19062451c55a797e0cc667ef983834e6580c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/38f9d58c739687e269f46c6dff4647de9e2eb855", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/227f19062451c55a797e0cc667ef983834e6580c", + "reference": "227f19062451c55a797e0cc667ef983834e6580c", "shasum": "" }, "require": { @@ -2382,9 +2381,23 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.64" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.65" }, - "time": "2020-12-23T13:37:53+00:00" + "funding": [ + { + "url": "https://github.com/[user1", + "type": "github" + }, + { + "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", + "type": "github" + }, + { + "url": "https://github.com/user2", + "type": "github" + } + ], + "time": "2020-12-27T21:43:29+00:00" }, { "name": "matthiasmullie/path-converter", @@ -3004,12 +3017,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6" + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad44fae76b874e7d49afb6923a66591e0a94bef6", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f", + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f", "shasum": "" }, "require": { @@ -3065,7 +3078,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ { @@ -3073,7 +3086,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:22+00:00" + "time": "2021-01-02T06:24:37+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3081,12 +3094,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4" + "reference": "cdb8225b328ef5e9647049954299211804000ce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/544be757d192233486ad9119dcb297ebbf5f2dd4", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cdb8225b328ef5e9647049954299211804000ce0", + "reference": "cdb8225b328ef5e9647049954299211804000ce0", "shasum": "" }, "require": { @@ -3134,7 +3147,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:43+00:00" + "time": "2021-01-02T06:22:20+00:00" }, { "name": "phpunit/php-invoker", @@ -3142,12 +3155,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0" + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/05210af8d0ab68c811ae61a4bc42b066d62b88a0", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/6fdda2828180f7d86cf66d822e6ad4bc124baf5d", + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d", "shasum": "" }, "require": { @@ -3198,7 +3211,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:51+00:00" + "time": "2021-01-02T06:22:25+00:00" }, { "name": "phpunit/php-text-template", @@ -3206,12 +3219,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b" + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/081fc9efc54b1b858b3497c142d82a0c36bc6755", + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755", "shasum": "" }, "require": { @@ -3258,7 +3271,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:23+00:00" + "time": "2021-01-02T06:22:47+00:00" }, { "name": "phpunit/php-timer", @@ -3266,12 +3279,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1" + "reference": "2194371fec37b03cfda3f8ab08aee33787350228" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/59e401088c91efeb76150f0a301aa79e3ac95fd1", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2194371fec37b03cfda3f8ab08aee33787350228", + "reference": "2194371fec37b03cfda3f8ab08aee33787350228", "shasum": "" }, "require": { @@ -3318,7 +3331,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:59+00:00" + "time": "2021-01-02T06:22:31+00:00" }, { "name": "phpunit/phpunit", @@ -3483,12 +3496,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63" + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/1012bd8df812778b8386c5e76cacd85b45cf329e", + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e", "shasum": "" }, "require": { @@ -3532,7 +3545,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:52+00:00" + "time": "2021-01-02T06:23:03+00:00" }, { "name": "sebastian/code-unit", @@ -3596,12 +3609,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d" + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f861b90785c30dc0743554f0e615d8f950dc8e9d", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f0a408b6519db241e624a62576dc5871d4ac8c14", + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14", "shasum": "" }, "require": { @@ -3644,7 +3657,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:38+00:00" + "time": "2021-01-02T06:21:36+00:00" }, { "name": "sebastian/comparator", @@ -3652,12 +3665,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f" + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1cfe9edf7ec9e4c18e54bb259110a053d09a899f", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fe4c68c639d9e580ec31bfc88b32641dc80a08d0", + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0", "shasum": "" }, "require": { @@ -3719,7 +3732,7 @@ "type": "github" } ], - "time": "2020-12-24T12:38:43+00:00" + "time": "2021-01-02T06:21:42+00:00" }, { "name": "sebastian/complexity", @@ -3727,12 +3740,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122" + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/23030bf3d3722767fdc5f8f2d2d99b03f4e58122", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c182133e92fc7a8b0a923b5d20f3a9fdfa534818", + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818", "shasum": "" }, "require": { @@ -3777,7 +3790,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:32+00:00" + "time": "2021-01-02T06:22:53+00:00" }, { "name": "sebastian/diff", @@ -3785,12 +3798,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4" + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/02178c586d5fbd59d348798d7122237a2907f8a4", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/33f7bf3c1741b2a10e16d5c41c369c402b933e4c", + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c", "shasum": "" }, "require": { @@ -3844,7 +3857,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:54+00:00" + "time": "2021-01-02T06:21:47+00:00" }, { "name": "sebastian/environment", @@ -3852,12 +3865,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1" + "reference": "b885263b3601b7570ef386a468d6a827c95c8994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7bb5a20ec06e366cb75b0e126169649c62b397b1", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b885263b3601b7570ef386a468d6a827c95c8994", + "reference": "b885263b3601b7570ef386a468d6a827c95c8994", "shasum": "" }, "require": { @@ -3908,7 +3921,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:03+00:00" + "time": "2021-01-02T06:21:52+00:00" }, { "name": "sebastian/exporter", @@ -3916,12 +3929,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58" + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/91975a2dbcf4a89184d9e4143c06b88d89644b58", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f670c4f17dffab83b44048f6fe6747a7c6097179", + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179", "shasum": "" }, "require": { @@ -3986,7 +3999,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:11+00:00" + "time": "2021-01-02T06:21:58+00:00" }, { "name": "sebastian/global-state", @@ -3994,12 +4007,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25" + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0471b24bddeb05ffd0a5edc6837796f339068c25", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a74d82a0654a7f685f80016cc3570d7a387f9da0", + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0", "shasum": "" }, "require": { @@ -4051,7 +4064,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:19+00:00" + "time": "2021-01-02T06:22:03+00:00" }, { "name": "sebastian/lines-of-code", @@ -4059,12 +4072,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24" + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/219c932af1aeee0b4eccbc53af2181ff50e14b24", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/db62e01f14ea9485d5a52dfb5706061fd0f50425", + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425", "shasum": "" }, "require": { @@ -4109,7 +4122,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:42+00:00" + "time": "2021-01-02T06:22:58+00:00" }, { "name": "sebastian/object-enumerator", @@ -4117,12 +4130,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e" + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/da36684b10f17db8718e314fa8d84b2e0ed7132e", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/fccb61351e8a3a10ffacfad9544bb2905905b69c", + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c", "shasum": "" }, "require": { @@ -4167,7 +4180,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:27+00:00" + "time": "2021-01-02T06:22:09+00:00" }, { "name": "sebastian/object-reflector", @@ -4175,12 +4188,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "6717d193da503616e69462cf98e2af3f4443335d" + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6717d193da503616e69462cf98e2af3f4443335d", - "reference": "6717d193da503616e69462cf98e2af3f4443335d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", "shasum": "" }, "require": { @@ -4223,7 +4236,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:35+00:00" + "time": "2021-01-02T06:22:14+00:00" }, { "name": "sebastian/recursion-context", @@ -4231,12 +4244,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cee249a3e471aa870067fa6155991230c7507924" + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cee249a3e471aa870067fa6155991230c7507924", - "reference": "cee249a3e471aa870067fa6155991230c7507924", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c5616ce32278e62c77066f72b1fe413a8c958cee", + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee", "shasum": "" }, "require": { @@ -4287,7 +4300,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:07+00:00" + "time": "2021-01-02T06:22:36+00:00" }, { "name": "sebastian/resource-operations", @@ -4351,12 +4364,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0" + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/67bfce3beb94968d175fdf117b80fc9a6b60bdd0", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/655e3b59cc2e508306dba9c3df08b774055548e7", + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7", "shasum": "" }, "require": { @@ -4400,7 +4413,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:15+00:00" + "time": "2021-01-02T06:22:42+00:00" }, { "name": "sebastian/version", @@ -4500,12 +4513,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9" + "reference": "5a8ebe413fbd4091d5b3c5b70e298141681c59c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", + "url": "https://api.github.com/repos/symfony/console/zipball/5a8ebe413fbd4091d5b3c5b70e298141681c59c7", + "reference": "5a8ebe413fbd4091d5b3c5b70e298141681c59c7", "shasum": "" }, "require": { @@ -4590,7 +4603,7 @@ "type": "tidelift" } ], - "time": "2020-12-18T08:03:24+00:00" + "time": "2021-01-01T09:27:20+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4598,12 +4611,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3" + "reference": "7130f348df2f842044038aaae9d6653dc9d67649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7130f348df2f842044038aaae9d6653dc9d67649", + "reference": "7130f348df2f842044038aaae9d6653dc9d67649", "shasum": "" }, "require": { @@ -4670,7 +4683,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2020-12-27T09:28:48+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4678,12 +4691,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9" + "reference": "e314d4992832c3a0a68ca731fadd959917320fda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/be092746c3ab9f9c62608c82e0f04687f8a879f9", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e314d4992832c3a0a68ca731fadd959917320fda", + "reference": "e314d4992832c3a0a68ca731fadd959917320fda", "shasum": "" }, "require": { @@ -4752,7 +4765,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T15:40:22+00:00" + "time": "2020-12-27T09:28:48+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -4760,12 +4773,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa" + "reference": "3a79a2226897adae0cab81688fbc5144e2fc53f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/69609f9f06790591b4b13a45ee117e7bab6395aa", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3a79a2226897adae0cab81688fbc5144e2fc53f6", + "reference": "3a79a2226897adae0cab81688fbc5144e2fc53f6", "shasum": "" }, "require": { @@ -4837,7 +4850,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2020-12-27T22:11:44+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4845,12 +4858,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43" + "reference": "de14691dc88bbbc5535de7f0e32080977dc1d23f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/401c9d9d3400c53a8f1a39425f0543406c137a43", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/de14691dc88bbbc5535de7f0e32080977dc1d23f", + "reference": "de14691dc88bbbc5535de7f0e32080977dc1d23f", "shasum": "" }, "require": { @@ -4918,7 +4931,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2020-12-27T09:28:48+00:00" }, { "name": "symfony/polyfill-php73", @@ -5006,12 +5019,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa" + "reference": "54cc82c30ba7ed02bc64f5d010488c159b5f1706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/3a11f3dfb34ad50f978cb2b8cf936933b87739aa", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/54cc82c30ba7ed02bc64f5d010488c159b5f1706", + "reference": "54cc82c30ba7ed02bc64f5d010488c159b5f1706", "shasum": "" }, "require": { @@ -5082,7 +5095,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2020-12-27T09:28:48+00:00" }, { "name": "symfony/service-contracts", @@ -5090,12 +5103,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366" + "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/5c448a39281b671be2cc8d208e6df75ac2d4b366", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e0d43e6e2f909287d2e4e867ca5c131a661f08ef", + "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef", "shasum": "" }, "require": { @@ -5163,7 +5176,7 @@ "type": "tidelift" } ], - "time": "2020-12-23T15:38:30+00:00" + "time": "2021-01-01T09:26:45+00:00" }, { "name": "symfony/string", @@ -5171,12 +5184,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" + "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "url": "https://api.github.com/repos/symfony/string/zipball/99f25957efe05db14a1aa6cff643eca0f83a952c", + "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c", "shasum": "" }, "require": { @@ -5231,7 +5244,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.1" + "source": "https://github.com/symfony/string/tree/5.x" }, "funding": [ { @@ -5247,7 +5260,7 @@ "type": "tidelift" } ], - "time": "2020-12-05T07:33:16+00:00" + "time": "2021-01-01T09:26:45+00:00" }, { "name": "theseer/tokenizer", @@ -5305,12 +5318,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b" + "reference": "846ebbd7c8e780913fa5731d9c6139522111b56f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c5379903e5640e5f29024e71aa0817f7bd56102b", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/846ebbd7c8e780913fa5731d9c6139522111b56f", + "reference": "846ebbd7c8e780913fa5731d9c6139522111b56f", "shasum": "" }, "require": { @@ -5376,7 +5389,7 @@ "type": "tidelift" } ], - "time": "2020-11-27T13:05:37+00:00" + "time": "2021-01-01T14:57:43+00:00" }, { "name": "vimeo/psalm", From 968c03fd010e89a2b4f0254119d0bf488fb702ee Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 11:23:36 +0200 Subject: [PATCH 44/90] Changed name from CSharp to .NET --- README.md | 2 +- app/config/platforms.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f5dea89bf7..7967b1b2ef 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) * ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) * ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) -* ✅   [C#](https://github.com/appwrite/sdk-for-csharp) - **Expiremental** (Maintained by the Appwrite Team) +* ✅   [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Expiremental** (Maintained by the Appwrite Team) * ✅   [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team) * ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team) diff --git a/app/config/platforms.php b/app/config/platforms.php index 8b751e436d..13773b67eb 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -238,18 +238,18 @@ return [ 'gitUserName' => 'appwrite', ], [ - 'key' => 'csharp', - 'name' => 'CSharp', + 'key' => 'dotnet', + 'name' => '.NET', 'version' => '0.0.1', - 'url' => 'https://github.com/appwrite/sdk-for-csharp', + 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => '', 'enabled' => true, 'beta' => true, 'family' => APP_PLATFORM_SERVER, 'prism' => 'csharp', - 'source' => \realpath(__DIR__ . '/../sdks/server-csharp'), - 'gitUrl' => 'git@github.com:appwrite/sdk-for-csharp.git', - 'gitRepoName' => 'sdk-for-csharp', + 'source' => \realpath(__DIR__ . '/../sdks/server-dotnet'), + 'gitUrl' => 'git@github.com:appwrite/sdk-for-dotnet.git', + 'gitRepoName' => 'sdk-for-dotnet', 'gitUserName' => 'appwrite', ], [ From 9428ad930862ff2d906e1bdad83b23b340083a8c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 17:20:41 +0200 Subject: [PATCH 45/90] Added dotNet SDK --- app/tasks/sdks.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 857b4de7b5..9b0798b179 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Language\Python; use Appwrite\SDK\Language\Ruby; use Appwrite\SDK\Language\Dart; use Appwrite\SDK\Language\Deno; +use Appwrite\SDK\Language\DotNet; use Appwrite\SDK\Language\Flutter; use Appwrite\SDK\Language\Go; use Appwrite\SDK\Language\Java; @@ -132,6 +133,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND case 'swift': $config = new Swift(); break; + case 'dotnet': + $config = new DotNet(); + break; default: throw new Exception('Language "'.$language['key'].'" not supported'); break; From 4a937659202aa60d739476fe09f70b97dbc8b4c3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 17:20:56 +0200 Subject: [PATCH 46/90] Updated docs --- .../server-dotnet/examples/avatars/get-browser.md | 13 +++++++++++++ .../examples/avatars/get-credit-card.md | 13 +++++++++++++ .../server-dotnet/examples/avatars/get-favicon.md | 13 +++++++++++++ .../server-dotnet/examples/avatars/get-flag.md | 13 +++++++++++++ .../server-dotnet/examples/avatars/get-image.md | 13 +++++++++++++ .../server-dotnet/examples/avatars/get-initials.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/avatars/get-q-r.md | 13 +++++++++++++ .../examples/database/create-collection.md | 13 +++++++++++++ .../examples/database/create-document.md | 13 +++++++++++++ .../examples/database/delete-collection.md | 13 +++++++++++++ .../examples/database/delete-document.md | 13 +++++++++++++ .../examples/database/get-collection.md | 13 +++++++++++++ .../server-dotnet/examples/database/get-document.md | 13 +++++++++++++ .../examples/database/list-collections.md | 13 +++++++++++++ .../examples/database/list-documents.md | 13 +++++++++++++ .../examples/database/update-collection.md | 13 +++++++++++++ .../examples/database/update-document.md | 13 +++++++++++++ .../server-dotnet/examples/health/get-anti-virus.md | 13 +++++++++++++ .../server-dotnet/examples/health/get-cache.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/health/get-d-b.md | 13 +++++++++++++ .../examples/health/get-queue-certificates.md | 13 +++++++++++++ .../examples/health/get-queue-functions.md | 13 +++++++++++++ .../server-dotnet/examples/health/get-queue-logs.md | 13 +++++++++++++ .../examples/health/get-queue-tasks.md | 13 +++++++++++++ .../examples/health/get-queue-usage.md | 13 +++++++++++++ .../examples/health/get-queue-webhooks.md | 13 +++++++++++++ .../examples/health/get-storage-local.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/health/get-time.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/health/get.md | 13 +++++++++++++ .../server-dotnet/examples/locale/get-continents.md | 13 +++++++++++++ .../examples/locale/get-countries-e-u.md | 13 +++++++++++++ .../examples/locale/get-countries-phones.md | 13 +++++++++++++ .../server-dotnet/examples/locale/get-countries.md | 13 +++++++++++++ .../server-dotnet/examples/locale/get-currencies.md | 13 +++++++++++++ .../server-dotnet/examples/locale/get-languages.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/locale/get.md | 13 +++++++++++++ .../server-dotnet/examples/storage/create-file.md | 13 +++++++++++++ .../server-dotnet/examples/storage/delete-file.md | 13 +++++++++++++ .../examples/storage/get-file-download.md | 13 +++++++++++++ .../examples/storage/get-file-preview.md | 13 +++++++++++++ .../server-dotnet/examples/storage/get-file-view.md | 13 +++++++++++++ .../server-dotnet/examples/storage/get-file.md | 13 +++++++++++++ .../server-dotnet/examples/storage/list-files.md | 13 +++++++++++++ .../server-dotnet/examples/storage/update-file.md | 13 +++++++++++++ .../examples/teams/create-membership.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/teams/create.md | 13 +++++++++++++ .../examples/teams/delete-membership.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/teams/delete.md | 13 +++++++++++++ .../server-dotnet/examples/teams/get-memberships.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/teams/get.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/teams/list.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/teams/update.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/users/create.md | 13 +++++++++++++ .../server-dotnet/examples/users/delete-session.md | 13 +++++++++++++ .../server-dotnet/examples/users/delete-sessions.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/users/get-logs.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/users/get-prefs.md | 13 +++++++++++++ .../server-dotnet/examples/users/get-sessions.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/users/get.md | 13 +++++++++++++ .../0.6.2/server-dotnet/examples/users/list.md | 13 +++++++++++++ .../server-dotnet/examples/users/update-prefs.md | 13 +++++++++++++ .../server-dotnet/examples/users/update-status.md | 13 +++++++++++++ 62 files changed, 806 insertions(+) create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/create-document.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/get-document.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/database/update-document.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get-time.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/health/get.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/locale/get.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/create.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/delete.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/get.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/list.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/teams/update.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/create.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/get.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/list.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md create mode 100644 docs/examples/0.6.2/server-dotnet/examples/users/update-status.md diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6d6a5b7f18 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getBrowser("aa"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8a89c04618 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getCreditCard("amex"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..d51b02a7c3 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getFavicon("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..88a06d16ff --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getFlag("af"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..06d021dcf7 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getImage("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..09e91e0120 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getInitials(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..5f410cd4ae --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Avatars avatars = new Avatars(client); + +result = avatars.getQR("[TEXT]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md new file mode 100644 index 0000000000..92a26b5559 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.createCollection("[NAME]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md new file mode 100644 index 0000000000..70d00bac14 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.createDocument("[COLLECTION_ID]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md new file mode 100644 index 0000000000..7a611e4778 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.deleteCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md new file mode 100644 index 0000000000..7af78fc558 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.deleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md new file mode 100644 index 0000000000..f2bc02fc97 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.getCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md new file mode 100644 index 0000000000..376057e59b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.getDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md new file mode 100644 index 0000000000..b9af7abf1c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.listCollections(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md new file mode 100644 index 0000000000..355bc43476 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.listDocuments("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md new file mode 100644 index 0000000000..33ae0d7d91 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.updateCollection("[COLLECTION_ID]", "[NAME]", {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md new file mode 100644 index 0000000000..719d9f5e2e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Database database = new Database(client); + +result = database.updateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..3a2b920271 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getAntiVirus(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..cba191b265 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getCache(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..27a46ffe7c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getDB(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..895147525a --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueCertificates(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..1e6130ddbd --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueFunctions(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..bf9dec6e7c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueLogs(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..0ca3a4b3f0 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueTasks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..74cedc0bca --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueUsage(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..eb7f9071c1 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getQueueWebhooks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..0cfc305b63 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getStorageLocal(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..4887d4b20b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.getTime(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get.md b/docs/examples/0.6.2/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..1b7428a216 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Health health = new Health(client); + +result = health.get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md new file mode 100644 index 0000000000..0f85130aa3 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getContinents(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..8567e3ea4e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getCountriesEU(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..a2c5e1a8ab --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getCountriesPhones(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md new file mode 100644 index 0000000000..724c019133 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getCountries(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md new file mode 100644 index 0000000000..44f4ba5924 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getCurrencies(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md new file mode 100644 index 0000000000..8020c37230 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.getLanguages(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..ce9d4207b6 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Locale locale = new Locale(client); + +result = locale.get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..f0ac77f9d8 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.createFile(new File("./path-to-files/image.jpg"), {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..d478052b7c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.deleteFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..fc209435fe --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.getFileDownload("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ba50cb911a --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.getFilePreview("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..87226f1603 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.getFileView("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..50553b6b0e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.getFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..ba9bb077b8 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.listFiles(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..1aa65653c2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Storage storage = new Storage(client); + +result = storage.updateFile("[FILE_ID]", {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..66832b80f1 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.createMembership("[TEAM_ID]", "email@example.com", {}, "https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..ff5ee26138 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.create("[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..7c1900621c --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.deleteMembership("[TEAM_ID]", "[INVITE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..ae0fda06ad --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.delete("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md new file mode 100644 index 0000000000..1aac54c69d --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.getMemberships("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..eb0bc28f73 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.get("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/list.md b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..bc60aa8a35 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.list(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/update.md b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md new file mode 100644 index 0000000000..3815283343 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Teams teams = new Teams(client); + +result = teams.update("[TEAM_ID]", "[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/create.md b/docs/examples/0.6.2/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..536e995d0b --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/create.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.create("email@example.com", "password"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..eb455cb140 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.deleteSession("[USER_ID]", "[SESSION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..5793fe5bc8 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.deleteSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md new file mode 100644 index 0000000000..0c68cad6c2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.getLogs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..b9165807bc --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.getPrefs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md new file mode 100644 index 0000000000..b1fff05940 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.getSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get.md b/docs/examples/0.6.2/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..fb5d4ceec5 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.get("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/list.md b/docs/examples/0.6.2/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..bbe25485a2 --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/list.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.list(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..accdcd757f --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.updatePrefs("[USER_ID]", {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..51822dd10e --- /dev/null +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md @@ -0,0 +1,13 @@ +use Appwrite; + +Client client = new Client(); + +client + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint + .SetProject("5df5acd0d48c2") # Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key +; + +Users users = new Users(client); + +result = users.updateStatus("[USER_ID]", "1"); From 90c5913957b66300f2c85cca027cff0af8a42e7b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 19:45:35 +0200 Subject: [PATCH 47/90] Updated dependencies --- app/tasks/sdks.php | 4 +++- composer.json | 2 +- composer.lock | 13 ++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 9b0798b179..e0a6fbd051 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -61,6 +61,7 @@ $cli $spec = file_get_contents(__DIR__.'/../config/specs/'.$version.'.'.$language['family'].'.json'); + $cover = 'https://appwrite.io/images/github.png'; $result = \realpath(__DIR__.'/..').'/sdks/'.$key.'-'.$language['key']; $resultExamples = \realpath(__DIR__.'/../..').'/docs/examples/'.$version.'/'.$key.'-'.$language['key']; $target = \realpath(__DIR__.'/..').'/sdks/git/'.$language['key'].'/'; @@ -134,6 +135,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND $config = new Swift(); break; case 'dotnet': + $cover = ''; $config = new DotNet(); break; default: @@ -158,7 +160,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setGitRepo($language['gitUrl']) ->setGitRepoName($language['gitRepoName']) ->setGitUserName($language['gitUserName']) - ->setLogo('https://appwrite.io/images/github.png') + ->setLogo($cover) ->setURL('https://appwrite.io') ->setShareText('Appwrite is a backend as a service for building web or mobile apps') ->setShareURL('http://appwrite.io') diff --git a/composer.json b/composer.json index 97d2263952..998e6b0d0d 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.3.0", + "appwrite/sdk-generator": "dev-master", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 606dd5fd67..3b8cc855d4 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": "57a43a1cab8459494f031551fe83ffb5", + "content-hash": "30a8a58c868d3546fc22511b46431564", "packages": [ { "name": "appwrite/php-clamav", @@ -1858,11 +1858,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.3.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "f0a6ecf92869012dd546ec503c69177dce0f9d90" + "reference": "7d762df83f2539ca89605e40541afbdb20941542" }, "require": { "ext-curl": "*", @@ -1875,6 +1875,7 @@ "require-dev": { "phpunit/phpunit": "^7.0" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1892,7 +1893,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-03T21:23:24+00:00" + "time": "2021-01-04T16:19:42+00:00" }, { "name": "composer/package-versions-deprecated", @@ -5603,7 +5604,9 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "appwrite/sdk-generator": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From df18492d7f57632d60e97cdee7431cc424d247d7 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 4 Jan 2021 19:56:08 +0200 Subject: [PATCH 48/90] Updated Nuget URL --- app/config/platforms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 13773b67eb..ffc51b89ed 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -242,7 +242,7 @@ return [ 'name' => '.NET', 'version' => '0.0.1', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', - 'package' => '', + 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, 'beta' => true, 'family' => APP_PLATFORM_SERVER, From 98309e776e36af6806ab39f5ac130850e19b04ef Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 00:00:20 +0530 Subject: [PATCH 49/90] feat: fixed failing tests --- src/Appwrite/Utopia/Response/Filters/V06.php | 30 +++++++++++--------- tests/unit/Utopia/Filters/V06Test.php | 6 +++- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index bed31b48bc..9f7124f043 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -146,15 +146,14 @@ class V06 extends Filter { private function parseCurrencyList(array $content) { $content['locations'] = []; - $currencies = $content['currencies']; $parsedResponse = []; foreach($currencies as $currency) { $currency['locations'] = []; $parsedResponse[] = $currency; } - - return $parsedResponse; + $content['currencies'] = $parsedResponse; + return $content; } private function parseContinentList(array $content) @@ -164,8 +163,8 @@ class V06 extends Filter { foreach($continents as $continent) { $parsedResponse[$continent['code']] = $continent['name']; } - - return $parsedResponse; + $content['continents'] = $parsedResponse; + return $content; } private function parsePhoneList(array $content) @@ -175,8 +174,8 @@ class V06 extends Filter { foreach($phones as $phone) { $parsedResponse[$phone['countryCode']] = $phone['code']; } - - return $parsedResponse; + $content['phones'] = $parsedResponse; + return $content; } private function parseCountryList(array $content) @@ -186,8 +185,8 @@ class V06 extends Filter { foreach($countries as $country) { $parsedResponse[$country['code']] = $country['name']; } - - return $parsedResponse; + $content['countries'] = $parsedResponse; + return $content; } private function parseLocale(array $content) @@ -216,7 +215,7 @@ class V06 extends Filter { $parsedResponse[] = [ 'event' => $log['event'], 'ip' => $log['ip'], - 'time' => strtotime($log['time']), + 'time' => $log['time'], 'OS' => $log['osName'].' '.$log['osVersion'], 'client' => $log['clientName'].' '.$log['clientVersion'], 'device' => $log['deviceName'], @@ -228,7 +227,8 @@ class V06 extends Filter { ] ]; } - return $parsedResponse; + $content['logs'] = $parsedResponse; + return $content; } private function parseSessionList(array $content) @@ -251,7 +251,8 @@ class V06 extends Filter { ], ]; } - return $parsedResponse; + $content['sessions'] = $parsedResponse; + return $content; } private function parseSession(array $content) @@ -267,12 +268,13 @@ class V06 extends Filter { foreach($users as $user) { $parsedResponse[] = $this->parseUser($user); } - return $parsedResponse; + $content['users'] = $parsedResponse; + return $content; } private function parseUser(array $content) { - foreach (Config::getParam('providers') as $key => $provider) { + foreach (Config::getParam('providers', []) as $key => $provider) { if (!$provider['enabled']) { continue; } diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 42b1bba3f2..71f8b4ca79 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -39,6 +39,8 @@ class V06Test extends TestCase ] ]; + Config::load('providers', __DIR__.'/../../../../app/config/providers.php'); + $model = Response::MODEL_USER; $parsedResponse = $this->filter->parse($content, $model); @@ -73,6 +75,8 @@ class V06Test extends TestCase ] ]; + Config::load('providers', __DIR__.'/../../../../app/config/providers.php'); + $model = Response::MODEL_USER_LIST; $parsedResponse = $this->filter->parse($content, $model); @@ -260,7 +264,7 @@ class V06Test extends TestCase $parsedResponse = $this->filter->parse($content, $model); $this->assertEquals($parsedResponse['ip'], '127.0.0.1'); - $this->assertEquals($parsedResponse['contryCode'], 'US'); + $this->assertEquals($parsedResponse['countryCode'], 'US'); $this->assertEquals($parsedResponse['country'], 'United States'); $this->assertEquals($parsedResponse['continentCode'], 'NA'); $this->assertEquals($parsedResponse['continent'], 'North America'); From b516eec69d17025c9cf8e8b9b2b4ef8736e50a18 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 00:34:21 +0200 Subject: [PATCH 50/90] Updated SDK generator version --- composer.json | 2 +- composer.lock | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 998e6b0d0d..a74996f91a 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "dev-master", + "appwrite/sdk-generator": "0.3.2", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 3b8cc855d4..42591c7182 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": "30a8a58c868d3546fc22511b46431564", + "content-hash": "229bcebe0c03153ab739cd324fb4eb43", "packages": [ { "name": "appwrite/php-clamav", @@ -1858,7 +1858,7 @@ }, { "name": "appwrite/sdk-generator", - "version": "dev-master", + "version": "0.3.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", @@ -1875,7 +1875,6 @@ "require-dev": { "phpunit/phpunit": "^7.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -5604,9 +5603,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "appwrite/sdk-generator": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From b3e1c74803f881997d22ab1513ba0aac737ba952 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 17:33:54 +0530 Subject: [PATCH 51/90] feat: changed session structure --- src/Appwrite/Utopia/Response/Filters/V06.php | 23 +++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 9f7124f043..2e569406e9 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -12,6 +12,8 @@ use Exception; use Utopia\Config\Config; use Utopia\Locale\Locale as Locale; +use function PHPSTORM_META\map; + class V06 extends Filter { // Convert 0.7 Data format to 0.6 format @@ -238,17 +240,28 @@ class V06 extends Filter { foreach($sessions as $session) { $parsedResponse[] = [ '$id' => $session['$id'], - 'OS' => $session['osName'].' '.$session['osVersion'], - 'client' => $session['clientName'].' '.$session['clientVersion'], - 'device' => $session['deviceName'], 'brand' => $session['deviceBrand'], - 'model' => $session['deviceModel'], - 'ip' => $session['ip'], 'current' => $session['current'], + 'device' => $session['deviceName'], + 'ip' => $session['ip'], + 'model' => $session['deviceModel'], 'geo' => [ 'isoCode' => empty($session['countryCode']) ? '---' : $session['countryCode'] , 'country' => empty($session['countryName'] ) ? Locale::getText('locale.country.unknown') : $session['countryName'] ], + 'OS' => [ + 'name' => $session['osName'], + 'platform' => $session[''], + 'short_name' => $session['osCode'], + 'version' => $session['osVersion'] + ], + 'client' => [ + 'engine' => $session['clientEngine'], + 'name' => $session['clientName'], + 'short_name' => $session['clientCode'], + 'type' => $session['clientType'], + 'version' => $session['clientVersion'] + ] ]; } $content['sessions'] = $parsedResponse; From 2b9a9efca54791fc63ab7b0aa554b4c4cdc7247b Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 17:43:14 +0530 Subject: [PATCH 52/90] feat: fixed tests for new sessions response --- src/Appwrite/Utopia/Response/Filters/V06.php | 2 +- tests/unit/Utopia/Filters/V06Test.php | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 2e569406e9..7b89cbc52a 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -251,7 +251,7 @@ class V06 extends Filter { ], 'OS' => [ 'name' => $session['osName'], - 'platform' => $session[''], + 'platform' => '', 'short_name' => $session['osCode'], 'version' => $session['osVersion'] ], diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 71f8b4ca79..6a0906a85f 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -175,13 +175,23 @@ class V06Test extends TestCase $this->assertEquals($parsedResponse['sum'], 1); $this->assertEquals($parsedResponse['sessions'][0]['$id'], '5e5ea5c16897e'); - $this->assertEquals($parsedResponse['sessions'][0]['OS'], 'Mac Mac'); - $this->assertEquals($parsedResponse['sessions'][0]['client'], 'Chrome Mobile iOS 84.0'); - $this->assertEquals($parsedResponse['sessions'][0]['device'], 'smartphone'); $this->assertEquals($parsedResponse['sessions'][0]['brand'], 'Google'); - $this->assertEquals($parsedResponse['sessions'][0]['model'], 'Nexus 5'); - $this->assertEquals($parsedResponse['sessions'][0]['ip'], '127.0.0.1'); $this->assertEquals($parsedResponse['sessions'][0]['current'], true); + $this->assertEquals($parsedResponse['sessions'][0]['device'], 'smartphone'); + $this->assertEquals($parsedResponse['sessions'][0]['ip'], '127.0.0.1'); + $this->assertEquals($parsedResponse['sessions'][0]['model'], 'Nexus 5'); + + $this->assertEquals($parsedResponse['sessions'][0]['OS']['name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['platform'], ''); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['short_name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], ''); + + $this->assertEquals($parsedResponse['sessions'][0]['client']['engine'], 'WebKit'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['name'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['short_name'], 'CM'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['type'], 'browser'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['version'], '84.0'); + $this->assertEquals($parsedResponse['sessions'][0]['geo']['isoCode'], 'US'); $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); } From a58107b49cf18f03bc4874fc8645b7c286ad486f Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 17:51:17 +0530 Subject: [PATCH 53/90] feat: changed log list response format and added tests --- src/Appwrite/Utopia/Response/Filters/V06.php | 21 ++++++++++++---- tests/unit/Utopia/Filters/V06Test.php | 26 ++++++++++++++------ 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 7b89cbc52a..f386edc6ad 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -215,17 +215,28 @@ class V06 extends Filter { $parsedResponse = []; foreach($logs as $log) { $parsedResponse[] = [ + 'brand' => $log['deviceBrand'], + 'device' => $log['deviceName'], 'event' => $log['event'], 'ip' => $log['ip'], - 'time' => $log['time'], - 'OS' => $log['osName'].' '.$log['osVersion'], - 'client' => $log['clientName'].' '.$log['clientVersion'], - 'device' => $log['deviceName'], - 'brand' => $log['deviceBrand'], 'model' => $log['deviceModel'], + 'time' => $log['time'], 'geo' => [ 'isoCode' => empty($log['countryCode']) ? '---' : $log['countryCode'] , 'country' => empty($log['countryName'] ) ? Locale::getText('locale.country.unknown') : $log['countryName'] + ], + 'OS' => [ + 'name' => $log['osName'], + 'platform' => '', + 'short_name' => $log['osCode'], + 'version' => $log['osVersion'] + ], + 'client' => [ + 'engine' => $log['clientEngine'], + 'name' => $log['clientName'], + 'short_name' => $log['clientCode'], + 'type' => $log['clientType'], + 'version' => $log['clientVersion'] ] ]; } diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 6a0906a85f..97804acd32 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -184,7 +184,7 @@ class V06Test extends TestCase $this->assertEquals($parsedResponse['sessions'][0]['OS']['name'], 'Mac'); $this->assertEquals($parsedResponse['sessions'][0]['OS']['platform'], ''); $this->assertEquals($parsedResponse['sessions'][0]['OS']['short_name'], 'Mac'); - $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], ''); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], 'Mac'); $this->assertEquals($parsedResponse['sessions'][0]['client']['engine'], 'WebKit'); $this->assertEquals($parsedResponse['sessions'][0]['client']['name'], 'Chrome Mobile iOS'); @@ -227,16 +227,26 @@ class V06Test extends TestCase $parsedResponse = $this->filter->parse($content, $model); $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['logs'][0]['brand'], 'Google'); + $this->assertEquals($parsedResponse['logs'][0]['device'], 'smartphone'); $this->assertEquals($parsedResponse['logs'][0]['event'], 'account.sessions.create'); $this->assertEquals($parsedResponse['logs'][0]['ip'], '127.0.0.1'); - $this->assertEquals($parsedResponse['logs'][0]['time'], 1592981250); - $this->assertEquals($parsedResponse['logs'][0]['OS'], 'Mac Mac'); - $this->assertEquals($parsedResponse['logs'][0]['client'], 'Chrome Mobile iOS 84.0'); - $this->assertEquals($parsedResponse['logs'][0]['device'], 'smartphone'); - $this->assertEquals($parsedResponse['logs'][0]['brand'], 'Google'); $this->assertEquals($parsedResponse['logs'][0]['model'], 'Nexus 5'); - $this->assertEquals($parsedResponse['logs'][0]['geo']['isoCode'], 'US'); - $this->assertEquals($parsedResponse['logs'][0]['geo']['country'], 'United States'); + $this->assertEquals($parsedResponse['logs'][0]['time'], 1592981250); + + $this->assertEquals($parsedResponse['sessions'][0]['OS']['name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['platform'], ''); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['short_name'], 'Mac'); + $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], 'Mac'); + + $this->assertEquals($parsedResponse['sessions'][0]['client']['engine'], 'WebKit'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['name'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['short_name'], 'CM'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['type'], 'browser'); + $this->assertEquals($parsedResponse['sessions'][0]['client']['version'], '84.0'); + + $this->assertEquals($parsedResponse['sessions'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); } public function testParseToken() From 075d46ba627ec657f2dbd5f894bbbe83559ff3ab Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 18:27:18 +0530 Subject: [PATCH 54/90] feat: changed team and team list response format and added tests --- src/Appwrite/Utopia/Response/Filters/V06.php | 22 ++++++++- tests/unit/Utopia/Filters/V06Test.php | 47 ++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index f386edc6ad..4bbeccb83e 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -52,11 +52,11 @@ class V06 extends Filter { break; case Response::MODEL_TEAM: - $parsedResponse = $content; + $parsedResponse = $this->parseTeam($content); break; case Response::MODEL_TEAM_LIST: - $parsedResponse = $content['teams']; + $parsedResponse = $this->parseTeamList($content); break; case Response::MODEL_MEMBERSHIP: @@ -209,6 +209,24 @@ class V06 extends Filter { return $content; } + private function parseTeam(array $content) + { + $content['$collection'] = Database::SYSTEM_COLLECTION_TEAMS; + $content['$permissions'] = []; + return $content; + } + + private function parseTeamList(array $content) + { + $teams = $content['teams']; + $parsedResponse = []; + foreach($teams as $team) { + $parsedResponse[] = $this->parseTeam($team); + } + $content['teams'] = $parsedResponse; + return $content; + } + private function parseLogList(array $content) { $logs = $content['logs']; diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 97804acd32..5f680fc547 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -249,6 +249,53 @@ class V06Test extends TestCase $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); } + public function testParseTeam() + { + $content = [ + '$id' => '5ff45ef261829', + 'name' => 'test', + 'dateCreated' => 1592981250, + 'sum' => 7 + ]; + + $model = Response::MODEL_TEAM; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['$id'], '5ff45ef261829'); + $this->assertEquals($parsedResponse['name'], 'test'); + $this->assertEquals($parsedResponse['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['sum'], 7); + $this->assertEquals($parsedResponse['$collection'], 'teams'); + $this->assertEquals($parsedResponse['$permissions'], []); + } + + public function testParseTeamList() + { + $content = [ + 'sum' => 1, + 'teams' => [ + 0 => [ + '$id' => '5ff45ef261829', + 'name' => 'test', + 'dateCreated' => 1592981250, + 'sum' => 7 + ] + ] + ]; + + $model = Response::MODEL_TEAM_LIST; + $parsedResponse = $this->filter->parse($content, $model); + + $this->assertEquals($parsedResponse['sum'], 1); + $this->assertEquals($parsedResponse['teams'][0]['$id'], '5ff45ef261829'); + $this->assertEquals($parsedResponse['teams'][0]['name'], 'test'); + $this->assertEquals($parsedResponse['teams'][0]['dateCreated'], 1592981250); + $this->assertEquals($parsedResponse['teams'][0]['sum'], 7); + $this->assertEquals($parsedResponse['teams'][0]['$collection'], 'teams'); + $this->assertEquals($parsedResponse['teams'][0]['$permissions'], []); + + } + public function testParseToken() { $content = [ From bf2c70f033ad30db09120a3e11ed7b4b1ff73467 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 15:22:17 +0200 Subject: [PATCH 55/90] added new sub-categories --- CHANGES.md | 63 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index da80a61cc9..53c49c5bee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,36 +3,24 @@ ## Features - Improved Webhooks and New System Events - [Learn more]() -- New QR code generator library (@PedroCisnerosSantana - [#475](https://github.com/appwrite/appwrite/issues/475)) + + +### New APIs - Added response to /locale/languages API with a list of languages (@TorstenDittmann ,[#351](https://github.com/appwrite/appwrite/issues/351)) -- Added API response payload structure info and examples to the docs site ([#381](https://github.com/appwrite/appwrite/issues/381)) -- Added Google Fonts to Appwrite for offline availability - Added a new route in the Avatars API to get user initials avatar ([#386](https://github.com/appwrite/appwrite/issues/386)) -- Added option to delete team from the console ([#380](https://github.com/appwrite/appwrite/issues/380)) -- Added option to view team members from the console ([#378](https://github.com/appwrite/appwrite/issues/378)) -- Add option to assign new team members to a team from the console and the API ([#379](https://github.com/appwrite/appwrite/issues/379)) +- Added API response payload structure info and examples to the docs site ([#381](https://github.com/appwrite/appwrite/issues/381)) - Added support for Brotli compression (@PedroCisnerosSantana, @Rohitub222, [#310](https://github.com/appwrite/appwrite/issues/310)) -- Added Select All Checkbox for on Console API key Scopes Screen ([#477](https://github.com/appwrite/appwrite/issues/477)) -- Added pagination and search for team memberships route ([#387](https://github.com/appwrite/appwrite/issues/387)) -- UI performance & accessibility improvements ([#406](https://github.com/appwrite/appwrite/pull/406)) -- Added option to delete user from the console (@PineappleIOnic - #538) -- Created lazy deletion of data worker ([#521](https://github.com/appwrite/appwrite/issues/521)) -- All emails are now sent asynchronously for improved performance (@TorstenDittmann ,[#402](https://github.com/appwrite/appwrite/pull/402)) -- Updated grid for OAuth2 providers list in the console ([#413](https://github.com/appwrite/appwrite/issues/413)) -- Upgraded Redis Resque queue library to version 1.3.6 ([#319](https://github.com/appwrite/appwrite/issues/319)) +- New deletion worker ([#521](https://github.com/appwrite/appwrite/issues/521)) +- New maintenance worker - cleaning up system logs and other optimizations ([#766](https://github.com/appwrite/appwrite/pull/766)) +- New email worker - all emails are now sent asynchronously for improved performance (@TorstenDittmann ,[#402](https://github.com/appwrite/appwrite/pull/402)) - Moved all Appwrite container logs to STDOUT & STDERR ([#389](https://github.com/appwrite/appwrite/issues/389)) -- New UI micro-interactions and CSS fixes (@AnatoleLucet) - New Doctor CLI to debug the Appwrite server ([#415](https://github.com/appwrite/appwrite/issues/415)) - Added container names to docker-compose.yml (@drandell) -- Upgraded ClamAV container image to version 1.0.11 ([#412](https://github.com/appwrite/appwrite/issues/412)) - Optimised function execution by using fully-qualified function calls - Added support for boolean 'true' and 'false' in query strings alongside 1 and 0 -- Added pagination for projects list on the console home page. - Updated storage calculation to match IEC standards - Now using Alpine as base Docker image -- Upgraded device detctor to version 3.12.6 -- Upgraded MariaDB to version 10.5.5 -- Switch standard ports to 95xx prefix ([#780](https://github.com/appwrite/appwrite/pull/780)) +- Switch standard dev ports to 95xx prefix ([#780](https://github.com/appwrite/appwrite/pull/780)) - User & Team name max length is now 128 chars and not 100 for better API consistency - Collection name max length is now 128 chars and not 256 for better API consistency - Project name max length is now 128 chars and not 100 for better API consistency @@ -40,20 +28,43 @@ - API Key name max length is now 128 chars and not 256 for better API consistency - Task name max length is now 128 chars and not 256 for better API consistency - Platform name max length is now 128 chars and not 256 for better API consistency -- Webhooks payloads are now exactly the same as any of the API response objects +- Webhooks payloads are now exactly the same as any of the API response objects, documentation added - Added new locale: Marathi -mr (@spielers) - New and consistent response format for all API object + new response examples in the docs - Removed user roles attribute from user object (can be fetched from /v1/teams/memberships) ** - Removed type attribute from session object response (used only internally) - ** - might be changed before merging to master -- Upgraded Traefik image to version 2.3 -- Upgraded Redis Docker image to version 6.0 (alpine) -- Upgraded Influxdb Docker image to version 1.8 (alpine) -- Added option to disable mail sending by setting empty SMTP host + - Added fallback option to 0.6 format for backward compatibility with any changes (@christyjacob4 [#772](https://github.com/appwrite/appwrite/pull/772)) +- Added option to disable mail sending by setting an empty SMTP host value ([#730](https://github.com/appwrite/appwrite/issues/730)) - Upgraded installation script ([#490](https://github.com/appwrite/appwrite/issues/490)) - Added new environment variables for ClamAV hostname and port ([#780](https://github.com/appwrite/appwrite/pull/780)) +- New OAuth adapter for Box.com (@armino-dev - [#420](https://github.com/appwrite/appwrite/issues/410)) +- New OAuth adapter for PayPal sandbox (@armino-dev - [#420](https://github.com/appwrite/appwrite/issues/410)) + +### User Interface +- Updated grid for OAuth2 providers list in the console ([#413](https://github.com/appwrite/appwrite/issues/413)) +- Added Google Fonts to Appwrite for offline availability +- Added option to delete user from the console (@PineappleIOnic - [#538](https://github.com/appwrite/appwrite/issues/538)) +- Added option to delete team from the console ([#380](https://github.com/appwrite/appwrite/issues/380)) +- Added option to view team members from the console ([#378](https://github.com/appwrite/appwrite/issues/378)) +- Add option to assign new team members to a team from the console and the API ([#379](https://github.com/appwrite/appwrite/issues/379)) +- Added Select All Checkbox for on Console API key Scopes Screen ([#477](https://github.com/appwrite/appwrite/issues/477)) +- Added pagination and search for team memberships route ([#387](https://github.com/appwrite/appwrite/issues/387)) +- Added pagination for projects list on the console home page. +- UI performance & accessibility improvements ([#406](https://github.com/appwrite/appwrite/pull/406)) +- New UI micro-interactions and CSS fixes (@AnatoleLucet) - Added toggle to hide/show secret keys and passwords inside the dashboard (@kodumbeats, [#535](https://github.com/appwrite/appwrite/issues/535)) +### Upgrades +- Upgraded QR codes generator library (@PedroCisnerosSantana - [#475](https://github.com/appwrite/appwrite/issues/475)) +- Upgraded Traefik image to version 2.3 +- Upgraded MariaDB to version 10.5.5 +- Upgraded Redis Docker image to version 6.0 (alpine) +- Upgraded Influxdb Docker image to version 1.8 (alpine) +- Upgraded Redis Resque queue library to version 1.3.6 ([#319](https://github.com/appwrite/appwrite/issues/319)) +- Upgraded ClamAV container image to version 1.0.11 ([#412](https://github.com/appwrite/appwrite/issues/412)) +- Upgraded device detctor to version 3.12.6 + ## Breaking Changes (Read before upgrading!) - **Deprecated** `first` and `last` query params for documents list route in the database API - **Deprecated** Deprectaed Pubjabi Translations ('pn') @@ -91,8 +102,6 @@ - Fixed Bug when trying to overwrite OAuth cookie in the Flutter SDK - Fixed OAuth redirect when using the self-hosted instance default success URL ([#454](https://github.com/appwrite/appwrite/issues/454)) - Fixed bug denying authentication with Github OAuth provider -- New OAuth adapter for Box.com -- New OAuth adapter for PayPal sandbox - Fixed a bug making read permission overwrite write permission in some cases ## Breaking Changes From 855858c42064ab19805dc84e73e3730f50152f45 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 15:25:01 +0200 Subject: [PATCH 56/90] Removed duplicates --- CHANGES.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 53c49c5bee..fb6ce00924 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -103,11 +103,6 @@ - Fixed OAuth redirect when using the self-hosted instance default success URL ([#454](https://github.com/appwrite/appwrite/issues/454)) - Fixed bug denying authentication with Github OAuth provider - Fixed a bug making read permission overwrite write permission in some cases - -## Breaking Changes -- **Deprecated** `first` and `last` query params for documents list route in the database API -- **Deprecated** Deprecated Punjabi Translations ('pn') - ## Security - Access to Health API now requires authentication with an API Key with access to `health.read` scope allowed From a951b9a0f9301a017e0dbad64ff0d7d937d50c05 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 15:26:31 +0200 Subject: [PATCH 57/90] Removed subtitle --- CHANGES.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fb6ce00924..d9ec45dd6c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,10 +2,7 @@ ## Features -- Improved Webhooks and New System Events - [Learn more]() - - -### New APIs +- Improved Webhooks and added new system events - [Learn more]() - Added response to /locale/languages API with a list of languages (@TorstenDittmann ,[#351](https://github.com/appwrite/appwrite/issues/351)) - Added a new route in the Avatars API to get user initials avatar ([#386](https://github.com/appwrite/appwrite/issues/386)) - Added API response payload structure info and examples to the docs site ([#381](https://github.com/appwrite/appwrite/issues/381)) From 5db9c9b6253f3ae4c9601a391543f2a85668090d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 5 Jan 2021 19:16:06 +0530 Subject: [PATCH 58/90] feat: review comments --- app/controllers/general.php | 2 +- src/Appwrite/Utopia/Response/Filters/V06.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index ed45f528dd..55f196e266 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -100,7 +100,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo * Response format */ $responseFormat = $request->getHeader('x-appwrite-response-format', App::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); - if (!empty($responseFormat)) { + if ($responseFormat) { switch($responseFormat) { case version_compare ($responseFormat , '0.6.2', '<=') : Response::setFilter(new V06()); diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 4bbeccb83e..d6bd85ac8f 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -193,13 +193,13 @@ class V06 extends Filter { private function parseLocale(array $content) { - $content['ip'] = empty($content['ip']) ? '' : $content['ip']; - $content['countryCode'] = empty($content['countryCode']) ? '--' : $content['countryCode']; - $content['country'] = empty($content['country']) ? Locale::getText('locale.country.unknown') : $content['country']; - $content['continent'] = empty($content['continent']) ? Locale::getText('locale.country.unknown') : $content['continent']; - $content['continentCode'] = empty($content['continentCode']) ? '--' : $content['continentCode']; - $content['eu'] = empty($content['eu']) ? false : $content['eu']; - $content['currency'] = empty($content['currency']) ? null : $content['currency']; + $content['ip'] = empty($content['ip']) ?? ''; + $content['countryCode'] = empty($content['countryCode']) ?? '--'; + $content['country'] = empty($content['country']) ?? Locale::getText('locale.country.unknown'); + $content['continent'] = empty($content['continent']) ?? Locale::getText('locale.country.unknown'); + $content['continentCode'] = empty($content['continentCode']) ?? '--'; + $content['eu'] = empty($content['eu']) ?? false; + $content['currency'] = empty($content['currency']) ?? null; return $content; } From 4a05e963901b7d9c468ea207e4a95e8d0afabc4e Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 23:33:36 +0200 Subject: [PATCH 59/90] Updated dependencies --- composer.json | 2 +- composer.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index a74996f91a..f0dc6c104c 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.3.2", + "appwrite/sdk-generator": "0.3.3", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 42591c7182..23bbf8edea 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": "229bcebe0c03153ab739cd324fb4eb43", + "content-hash": "2dee8b75780ba88fd7da28d08d691998", "packages": [ { "name": "appwrite/php-clamav", @@ -1858,11 +1858,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.3.2", + "version": "0.3.3", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "7d762df83f2539ca89605e40541afbdb20941542" + "reference": "7530820a1ee824874d89749c51b0e49d15595abc" }, "require": { "ext-curl": "*", @@ -1892,7 +1892,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-04T16:19:42+00:00" + "time": "2021-01-05T17:58:17+00:00" }, { "name": "composer/package-versions-deprecated", @@ -4513,12 +4513,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5a8ebe413fbd4091d5b3c5b70e298141681c59c7" + "reference": "af2bafc13cb92e182bf634285346925e09888d23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5a8ebe413fbd4091d5b3c5b70e298141681c59c7", - "reference": "5a8ebe413fbd4091d5b3c5b70e298141681c59c7", + "url": "https://api.github.com/repos/symfony/console/zipball/af2bafc13cb92e182bf634285346925e09888d23", + "reference": "af2bafc13cb92e182bf634285346925e09888d23", "shasum": "" }, "require": { @@ -4603,7 +4603,7 @@ "type": "tidelift" } ], - "time": "2021-01-01T09:27:20+00:00" + "time": "2021-01-05T19:51:30+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5318,12 +5318,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "846ebbd7c8e780913fa5731d9c6139522111b56f" + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/846ebbd7c8e780913fa5731d9c6139522111b56f", - "reference": "846ebbd7c8e780913fa5731d9c6139522111b56f", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", "shasum": "" }, "require": { @@ -5389,7 +5389,7 @@ "type": "tidelift" } ], - "time": "2021-01-01T14:57:43+00:00" + "time": "2021-01-05T15:39:16+00:00" }, { "name": "vimeo/psalm", From bb0725261d0edb6fc5e28e2eedbe4acfef32aea2 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 5 Jan 2021 23:34:49 +0200 Subject: [PATCH 60/90] Updated code examples --- .../0.6.2/server-dotnet/examples/avatars/get-browser.md | 8 ++++---- .../server-dotnet/examples/avatars/get-credit-card.md | 8 ++++---- .../0.6.2/server-dotnet/examples/avatars/get-favicon.md | 8 ++++---- .../0.6.2/server-dotnet/examples/avatars/get-flag.md | 8 ++++---- .../0.6.2/server-dotnet/examples/avatars/get-image.md | 8 ++++---- .../0.6.2/server-dotnet/examples/avatars/get-initials.md | 8 ++++---- .../0.6.2/server-dotnet/examples/avatars/get-q-r.md | 8 ++++---- .../server-dotnet/examples/database/create-collection.md | 8 ++++---- .../server-dotnet/examples/database/create-document.md | 8 ++++---- .../server-dotnet/examples/database/delete-collection.md | 8 ++++---- .../server-dotnet/examples/database/delete-document.md | 8 ++++---- .../server-dotnet/examples/database/get-collection.md | 8 ++++---- .../0.6.2/server-dotnet/examples/database/get-document.md | 8 ++++---- .../server-dotnet/examples/database/list-collections.md | 8 ++++---- .../server-dotnet/examples/database/list-documents.md | 8 ++++---- .../server-dotnet/examples/database/update-collection.md | 8 ++++---- .../server-dotnet/examples/database/update-document.md | 8 ++++---- .../0.6.2/server-dotnet/examples/health/get-anti-virus.md | 8 ++++---- .../0.6.2/server-dotnet/examples/health/get-cache.md | 8 ++++---- .../0.6.2/server-dotnet/examples/health/get-d-b.md | 8 ++++---- .../examples/health/get-queue-certificates.md | 8 ++++---- .../server-dotnet/examples/health/get-queue-functions.md | 8 ++++---- .../0.6.2/server-dotnet/examples/health/get-queue-logs.md | 8 ++++---- .../server-dotnet/examples/health/get-queue-tasks.md | 8 ++++---- .../server-dotnet/examples/health/get-queue-usage.md | 8 ++++---- .../server-dotnet/examples/health/get-queue-webhooks.md | 8 ++++---- .../server-dotnet/examples/health/get-storage-local.md | 8 ++++---- .../0.6.2/server-dotnet/examples/health/get-time.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/health/get.md | 8 ++++---- .../0.6.2/server-dotnet/examples/locale/get-continents.md | 8 ++++---- .../server-dotnet/examples/locale/get-countries-e-u.md | 8 ++++---- .../server-dotnet/examples/locale/get-countries-phones.md | 8 ++++---- .../0.6.2/server-dotnet/examples/locale/get-countries.md | 8 ++++---- .../0.6.2/server-dotnet/examples/locale/get-currencies.md | 8 ++++---- .../0.6.2/server-dotnet/examples/locale/get-languages.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/locale/get.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/create-file.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/delete-file.md | 8 ++++---- .../server-dotnet/examples/storage/get-file-download.md | 8 ++++---- .../server-dotnet/examples/storage/get-file-preview.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/get-file-view.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/get-file.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/list-files.md | 8 ++++---- .../0.6.2/server-dotnet/examples/storage/update-file.md | 8 ++++---- .../server-dotnet/examples/teams/create-membership.md | 8 ++++---- .../examples/0.6.2/server-dotnet/examples/teams/create.md | 8 ++++---- .../server-dotnet/examples/teams/delete-membership.md | 8 ++++---- .../examples/0.6.2/server-dotnet/examples/teams/delete.md | 8 ++++---- .../0.6.2/server-dotnet/examples/teams/get-memberships.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/teams/get.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/teams/list.md | 8 ++++---- .../examples/0.6.2/server-dotnet/examples/teams/update.md | 8 ++++---- .../examples/0.6.2/server-dotnet/examples/users/create.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/delete-session.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/delete-sessions.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/get-logs.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/get-prefs.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/get-sessions.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/users/get.md | 8 ++++---- docs/examples/0.6.2/server-dotnet/examples/users/list.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/update-prefs.md | 8 ++++---- .../0.6.2/server-dotnet/examples/users/update-status.md | 8 ++++---- 62 files changed, 248 insertions(+), 248 deletions(-) diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md index 6d6a5b7f18..d4c2d0312d 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-browser.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getBrowser("aa"); +string result = await avatars.GetBrowser("aa"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md index 8a89c04618..d0ab8d7205 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-credit-card.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getCreditCard("amex"); +string result = await avatars.GetCreditCard("amex"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md index d51b02a7c3..85155dbfd4 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-favicon.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getFavicon("https://example.com"); +string result = await avatars.GetFavicon("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md index 88a06d16ff..031b52af14 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-flag.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getFlag("af"); +string result = await avatars.GetFlag("af"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md index 06d021dcf7..d8e6c98558 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-image.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getImage("https://example.com"); +string result = await avatars.GetImage("https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md index 09e91e0120..177216034b 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-initials.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getInitials(); +string result = await avatars.GetInitials(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md index 5f410cd4ae..e057ed6877 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md +++ b/docs/examples/0.6.2/server-dotnet/examples/avatars/get-q-r.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Avatars avatars = new Avatars(client); -result = avatars.getQR("[TEXT]"); +string result = await avatars.GetQR("[TEXT]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md index 92a26b5559..a8c2c3f7e0 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.createCollection("[NAME]", {}, {}, {}); +HttpResponseMessage result = await database.CreateCollection("[NAME]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md index 70d00bac14..1a875067a1 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.createDocument("[COLLECTION_ID]", {}, {}, {}); +HttpResponseMessage result = await database.CreateDocument("[COLLECTION_ID]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md index 7a611e4778..4648a3e194 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-collection.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.deleteCollection("[COLLECTION_ID]"); +HttpResponseMessage result = await database.DeleteCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md index 7af78fc558..80f413b468 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/delete-document.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.deleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); +HttpResponseMessage result = await database.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md index f2bc02fc97..88f046ba2e 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-collection.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.getCollection("[COLLECTION_ID]"); +HttpResponseMessage result = await database.GetCollection("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md index 376057e59b..1d425bac59 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/get-document.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.getDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); +HttpResponseMessage result = await database.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md index b9af7abf1c..593438d255 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-collections.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.listCollections(); +HttpResponseMessage result = await database.ListCollections(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md index 355bc43476..36e31468f9 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/list-documents.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.listDocuments("[COLLECTION_ID]"); +HttpResponseMessage result = await database.ListDocuments("[COLLECTION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md index 33ae0d7d91..42c67650d1 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.updateCollection("[COLLECTION_ID]", "[NAME]", {}, {}); +HttpResponseMessage result = await database.UpdateCollection("[COLLECTION_ID]", "[NAME]", {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md index 719d9f5e2e..5f4c173b7a 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Database database = new Database(client); -result = database.updateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", {}, {}, {}); +HttpResponseMessage result = await database.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", {}, {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md index 3a2b920271..a287ec4617 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-anti-virus.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getAntiVirus(); +HttpResponseMessage result = await health.GetAntiVirus(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md index cba191b265..66c72f77b6 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-cache.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getCache(); +HttpResponseMessage result = await health.GetCache(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md index 27a46ffe7c..94e3556b4e 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-d-b.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getDB(); +HttpResponseMessage result = await health.GetDB(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md index 895147525a..f0dbb9086b 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-certificates.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueCertificates(); +HttpResponseMessage result = await health.GetQueueCertificates(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md index 1e6130ddbd..c0a0b14628 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-functions.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueFunctions(); +HttpResponseMessage result = await health.GetQueueFunctions(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md index bf9dec6e7c..11ea9dbff1 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-logs.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueLogs(); +HttpResponseMessage result = await health.GetQueueLogs(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md index 0ca3a4b3f0..291e5ea8bd 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-tasks.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueTasks(); +HttpResponseMessage result = await health.GetQueueTasks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md index 74cedc0bca..ecd4f69180 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-usage.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueUsage(); +HttpResponseMessage result = await health.GetQueueUsage(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md index eb7f9071c1..b16a368469 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-queue-webhooks.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getQueueWebhooks(); +HttpResponseMessage result = await health.GetQueueWebhooks(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md index 0cfc305b63..793d9c8667 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-storage-local.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getStorageLocal(); +HttpResponseMessage result = await health.GetStorageLocal(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md index 4887d4b20b..00431f7b2f 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get-time.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.getTime(); +HttpResponseMessage result = await health.GetTime(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/health/get.md b/docs/examples/0.6.2/server-dotnet/examples/health/get.md index 1b7428a216..f487428928 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/health/get.md +++ b/docs/examples/0.6.2/server-dotnet/examples/health/get.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Health health = new Health(client); -result = health.get(); +HttpResponseMessage result = await health.Get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md index 0f85130aa3..ad5590032c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-continents.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getContinents(); +HttpResponseMessage result = await locale.GetContinents(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md index 8567e3ea4e..6bd92406cf 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-e-u.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getCountriesEU(); +HttpResponseMessage result = await locale.GetCountriesEU(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md index a2c5e1a8ab..2952035a5a 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries-phones.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getCountriesPhones(); +HttpResponseMessage result = await locale.GetCountriesPhones(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md index 724c019133..fa65eede63 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-countries.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getCountries(); +HttpResponseMessage result = await locale.GetCountries(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md index 44f4ba5924..bfe091796c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-currencies.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getCurrencies(); +HttpResponseMessage result = await locale.GetCurrencies(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md index 8020c37230..5bb2571246 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get-languages.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.getLanguages(); +HttpResponseMessage result = await locale.GetLanguages(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/locale/get.md b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md index ce9d4207b6..ba59d83b7b 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/locale/get.md +++ b/docs/examples/0.6.2/server-dotnet/examples/locale/get.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Locale locale = new Locale(client); -result = locale.get(); +HttpResponseMessage result = await locale.Get(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md index f0ac77f9d8..5427fceb1e 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.createFile(new File("./path-to-files/image.jpg"), {}, {}); +HttpResponseMessage result = await storage.CreateFile(new File("./path-to-files/image.jpg"), {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md index d478052b7c..c78d0fbeb2 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/delete-file.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.deleteFile("[FILE_ID]"); +HttpResponseMessage result = await storage.DeleteFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md index fc209435fe..4f0f940130 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-download.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.getFileDownload("[FILE_ID]"); +string result = await storage.GetFileDownload("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md index ba50cb911a..1c7df59c31 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-preview.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.getFilePreview("[FILE_ID]"); +string result = await storage.GetFilePreview("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md index 87226f1603..61843791d2 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file-view.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.getFileView("[FILE_ID]"); +string result = await storage.GetFileView("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md index 50553b6b0e..a23d658b10 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/get-file.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.getFile("[FILE_ID]"); +HttpResponseMessage result = await storage.GetFile("[FILE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md index ba9bb077b8..df57620627 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/list-files.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.listFiles(); +HttpResponseMessage result = await storage.ListFiles(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md index 1aa65653c2..8effc42980 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Storage storage = new Storage(client); -result = storage.updateFile("[FILE_ID]", {}, {}); +HttpResponseMessage result = await storage.UpdateFile("[FILE_ID]", {}, {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md index 66832b80f1..d149cb4738 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.createMembership("[TEAM_ID]", "email@example.com", {}, "https://example.com"); +HttpResponseMessage result = await teams.CreateMembership("[TEAM_ID]", "email@example.com", {}, "https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md index ff5ee26138..a78e517308 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/create.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.create("[NAME]"); +HttpResponseMessage result = await teams.Create("[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md index 7c1900621c..d551dbf3aa 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete-membership.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.deleteMembership("[TEAM_ID]", "[INVITE_ID]"); +HttpResponseMessage result = await teams.DeleteMembership("[TEAM_ID]", "[INVITE_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md index ae0fda06ad..a08d23519c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/delete.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.delete("[TEAM_ID]"); +HttpResponseMessage result = await teams.Delete("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md index 1aac54c69d..1d76616f5e 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get-memberships.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.getMemberships("[TEAM_ID]"); +HttpResponseMessage result = await teams.GetMemberships("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/get.md b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md index eb0bc28f73..796f600bd9 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/get.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/get.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.get("[TEAM_ID]"); +HttpResponseMessage result = await teams.Get("[TEAM_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/list.md b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md index bc60aa8a35..648003524d 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/list.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/list.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.list(); +HttpResponseMessage result = await teams.List(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/update.md b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md index 3815283343..54ed78db72 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/update.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/update.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Teams teams = new Teams(client); -result = teams.update("[TEAM_ID]", "[NAME]"); +HttpResponseMessage result = await teams.Update("[TEAM_ID]", "[NAME]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/create.md b/docs/examples/0.6.2/server-dotnet/examples/users/create.md index 536e995d0b..1f7fab70a7 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/create.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/create.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.create("email@example.com", "password"); +HttpResponseMessage result = await users.Create("email@example.com", "password"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md index eb455cb140..fd322868ab 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-session.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.deleteSession("[USER_ID]", "[SESSION_ID]"); +HttpResponseMessage result = await users.DeleteSession("[USER_ID]", "[SESSION_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md index 5793fe5bc8..d2ed98e479 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/delete-sessions.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.deleteSessions("[USER_ID]"); +HttpResponseMessage result = await users.DeleteSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md index 0c68cad6c2..bf9db43c23 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-logs.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.getLogs("[USER_ID]"); +HttpResponseMessage result = await users.GetLogs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md index b9165807bc..b92ed4c20a 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-prefs.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.getPrefs("[USER_ID]"); +HttpResponseMessage result = await users.GetPrefs("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md index b1fff05940..2431460668 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get-sessions.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.getSessions("[USER_ID]"); +HttpResponseMessage result = await users.GetSessions("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/get.md b/docs/examples/0.6.2/server-dotnet/examples/users/get.md index fb5d4ceec5..93c31c599c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/get.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/get.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.get("[USER_ID]"); +HttpResponseMessage result = await users.Get("[USER_ID]"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/list.md b/docs/examples/0.6.2/server-dotnet/examples/users/list.md index bbe25485a2..f85440c498 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/list.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/list.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.list(); +HttpResponseMessage result = await users.List(); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md index accdcd757f..06ffa4245a 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.updatePrefs("[USER_ID]", {}); +HttpResponseMessage result = await users.UpdatePrefs("[USER_ID]", {}); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md index 51822dd10e..a2b00ff16c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-status.md @@ -3,11 +3,11 @@ use Appwrite; Client client = new Client(); client - .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint - .SetProject("5df5acd0d48c2") # Your project ID - .SetKey("919c2d18fb5d4...a2ae413da83346ad2") # Your secret API key + .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint + .SetProject("5df5acd0d48c2") // Your project ID + .SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key ; Users users = new Users(client); -result = users.updateStatus("[USER_ID]", "1"); +HttpResponseMessage result = await users.UpdateStatus("[USER_ID]", "1"); From dfe12b2be067dc462c7f1b3b786f232422d90417 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 6 Jan 2021 14:49:11 +0200 Subject: [PATCH 61/90] Fixed object default value --- src/Appwrite/Specification/Format/OpenAPI3.php | 3 ++- src/Appwrite/Specification/Format/Swagger2.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 18da610f8c..90f054d0af 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; +use stdClass; class OpenAPI3 extends Format { @@ -212,7 +213,7 @@ class OpenAPI3 extends Format case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': - $node['schema']['type'] = 'object'; + $param['default'] = (empty($param['default'])) ? new stdClass() : $param['default']; $node['schema']['type'] = 'object'; $node['schema']['x-example'] = '{}'; //$node['schema']['format'] = 'json'; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index d187cbc8d9..56becd2365 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format; use Appwrite\Specification\Format; use Appwrite\Template\Template; +use stdClass; class Swagger2 extends Format { @@ -205,7 +206,7 @@ class Swagger2 extends Format case 'Utopia\Validator\Mock': case 'Utopia\Validator\Assoc': $node['type'] = 'object'; - $node['type'] = 'object'; + $param['default'] = (empty($param['default'])) ? new stdClass() : $param['default']; $node['x-example'] = '{}'; //$node['format'] = 'json'; break; From 5819f8a224af4a7ff72ce7085e533f496e677578 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 6 Jan 2021 15:01:47 +0200 Subject: [PATCH 62/90] Updated dependencies --- composer.json | 2 +- composer.lock | 283 ++++++++++++++++++++++++++------------------------ 2 files changed, 149 insertions(+), 136 deletions(-) diff --git a/composer.json b/composer.json index bf9f354acc..db97272fdb 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.2.3", + "appwrite/sdk-generator": "0.4.0", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 500c67d954..4323941e91 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa1bf812ee6a45af12cdfbbfb7229471", + "content-hash": "2c7c15c2c968547dc6749efc79b39458", "packages": [ { "name": "appwrite/php-clamav", @@ -1158,9 +1158,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.2.2" + "source": "https://github.com/utopia-php/abuse/tree/0.3.1" }, - "time": "2020-10-23T06:51:42+00:00" + "time": "2020-12-21T17:28:03+00:00" }, { "name": "utopia-php/audit", @@ -1210,9 +1210,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.3.2" + "source": "https://github.com/utopia-php/audit/tree/0.5.1" }, - "time": "2020-10-23T08:09:44+00:00" + "time": "2020-12-21T17:28:53+00:00" }, { "name": "utopia-php/cache", @@ -1315,9 +1315,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cli/issues", - "source": "https://github.com/utopia-php/cli/tree/0.7.3" + "source": "https://github.com/utopia-php/cli/tree/0.8" }, - "time": "2020-11-02T07:50:18+00:00" + "time": "2020-12-14T06:31:42+00:00" }, { "name": "utopia-php/config", @@ -1858,11 +1858,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.2.3", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "6b564fef01fd681023c1d465783931bade04468d" + "reference": "91e155304d55831e66f880d5714ea81534819d44" }, "require": { "ext-curl": "*", @@ -1875,7 +1875,6 @@ "require-dev": { "phpunit/phpunit": "^7.0" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1893,7 +1892,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-12-23T21:58:58+00:00" + "time": "2021-01-06T12:37:52+00:00" }, { "name": "composer/package-versions-deprecated", @@ -1901,12 +1900,12 @@ "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "64291c788b9a18272346decf566931e33a317399" + "reference": "f921205948ab93bb19f86327c793a81edb62f236" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/64291c788b9a18272346decf566931e33a317399", - "reference": "64291c788b9a18272346decf566931e33a317399", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/f921205948ab93bb19f86327c793a81edb62f236", + "reference": "f921205948ab93bb19f86327c793a81edb62f236", "shasum": "" }, "require": { @@ -1967,7 +1966,7 @@ "type": "tidelift" } ], - "time": "2020-11-12T09:39:33+00:00" + "time": "2020-12-27T20:11:05+00:00" }, { "name": "composer/semver", @@ -2324,16 +2323,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.64", + "version": "1.3.65", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855" + "reference": "227f19062451c55a797e0cc667ef983834e6580c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/38f9d58c739687e269f46c6dff4647de9e2eb855", - "reference": "38f9d58c739687e269f46c6dff4647de9e2eb855", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/227f19062451c55a797e0cc667ef983834e6580c", + "reference": "227f19062451c55a797e0cc667ef983834e6580c", "shasum": "" }, "require": { @@ -2382,9 +2381,23 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.64" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.65" }, - "time": "2020-12-23T13:37:53+00:00" + "funding": [ + { + "url": "https://github.com/[user1", + "type": "github" + }, + { + "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", + "type": "github" + }, + { + "url": "https://github.com/user2", + "type": "github" + } + ], + "time": "2020-12-27T21:43:29+00:00" }, { "name": "matthiasmullie/path-converter", @@ -3004,12 +3017,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6" + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad44fae76b874e7d49afb6923a66591e0a94bef6", - "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f", + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f", "shasum": "" }, "require": { @@ -3065,7 +3078,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ { @@ -3073,7 +3086,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:22+00:00" + "time": "2021-01-02T06:24:37+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3081,12 +3094,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4" + "reference": "cdb8225b328ef5e9647049954299211804000ce0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/544be757d192233486ad9119dcb297ebbf5f2dd4", - "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cdb8225b328ef5e9647049954299211804000ce0", + "reference": "cdb8225b328ef5e9647049954299211804000ce0", "shasum": "" }, "require": { @@ -3134,7 +3147,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:43+00:00" + "time": "2021-01-02T06:22:20+00:00" }, { "name": "phpunit/php-invoker", @@ -3142,12 +3155,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0" + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/05210af8d0ab68c811ae61a4bc42b066d62b88a0", - "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/6fdda2828180f7d86cf66d822e6ad4bc124baf5d", + "reference": "6fdda2828180f7d86cf66d822e6ad4bc124baf5d", "shasum": "" }, "require": { @@ -3198,7 +3211,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:51+00:00" + "time": "2021-01-02T06:22:25+00:00" }, { "name": "phpunit/php-text-template", @@ -3206,12 +3219,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b" + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", - "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/081fc9efc54b1b858b3497c142d82a0c36bc6755", + "reference": "081fc9efc54b1b858b3497c142d82a0c36bc6755", "shasum": "" }, "require": { @@ -3258,7 +3271,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:23+00:00" + "time": "2021-01-02T06:22:47+00:00" }, { "name": "phpunit/php-timer", @@ -3266,12 +3279,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1" + "reference": "2194371fec37b03cfda3f8ab08aee33787350228" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/59e401088c91efeb76150f0a301aa79e3ac95fd1", - "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2194371fec37b03cfda3f8ab08aee33787350228", + "reference": "2194371fec37b03cfda3f8ab08aee33787350228", "shasum": "" }, "require": { @@ -3318,7 +3331,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:59+00:00" + "time": "2021-01-02T06:22:31+00:00" }, { "name": "phpunit/phpunit", @@ -3483,12 +3496,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63" + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", - "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/1012bd8df812778b8386c5e76cacd85b45cf329e", + "reference": "1012bd8df812778b8386c5e76cacd85b45cf329e", "shasum": "" }, "require": { @@ -3532,7 +3545,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:52+00:00" + "time": "2021-01-02T06:23:03+00:00" }, { "name": "sebastian/code-unit", @@ -3596,12 +3609,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d" + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f861b90785c30dc0743554f0e615d8f950dc8e9d", - "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f0a408b6519db241e624a62576dc5871d4ac8c14", + "reference": "f0a408b6519db241e624a62576dc5871d4ac8c14", "shasum": "" }, "require": { @@ -3644,7 +3657,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:38+00:00" + "time": "2021-01-02T06:21:36+00:00" }, { "name": "sebastian/comparator", @@ -3652,12 +3665,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f" + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1cfe9edf7ec9e4c18e54bb259110a053d09a899f", - "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fe4c68c639d9e580ec31bfc88b32641dc80a08d0", + "reference": "fe4c68c639d9e580ec31bfc88b32641dc80a08d0", "shasum": "" }, "require": { @@ -3719,7 +3732,7 @@ "type": "github" } ], - "time": "2020-12-24T12:38:43+00:00" + "time": "2021-01-02T06:21:42+00:00" }, { "name": "sebastian/complexity", @@ -3727,12 +3740,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122" + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/23030bf3d3722767fdc5f8f2d2d99b03f4e58122", - "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c182133e92fc7a8b0a923b5d20f3a9fdfa534818", + "reference": "c182133e92fc7a8b0a923b5d20f3a9fdfa534818", "shasum": "" }, "require": { @@ -3777,7 +3790,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:32+00:00" + "time": "2021-01-02T06:22:53+00:00" }, { "name": "sebastian/diff", @@ -3785,12 +3798,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4" + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/02178c586d5fbd59d348798d7122237a2907f8a4", - "reference": "02178c586d5fbd59d348798d7122237a2907f8a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/33f7bf3c1741b2a10e16d5c41c369c402b933e4c", + "reference": "33f7bf3c1741b2a10e16d5c41c369c402b933e4c", "shasum": "" }, "require": { @@ -3844,7 +3857,7 @@ "type": "github" } ], - "time": "2020-12-24T12:26:54+00:00" + "time": "2021-01-02T06:21:47+00:00" }, { "name": "sebastian/environment", @@ -3852,12 +3865,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1" + "reference": "b885263b3601b7570ef386a468d6a827c95c8994" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7bb5a20ec06e366cb75b0e126169649c62b397b1", - "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b885263b3601b7570ef386a468d6a827c95c8994", + "reference": "b885263b3601b7570ef386a468d6a827c95c8994", "shasum": "" }, "require": { @@ -3908,7 +3921,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:03+00:00" + "time": "2021-01-02T06:21:52+00:00" }, { "name": "sebastian/exporter", @@ -3916,12 +3929,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58" + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/91975a2dbcf4a89184d9e4143c06b88d89644b58", - "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f670c4f17dffab83b44048f6fe6747a7c6097179", + "reference": "f670c4f17dffab83b44048f6fe6747a7c6097179", "shasum": "" }, "require": { @@ -3986,7 +3999,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:11+00:00" + "time": "2021-01-02T06:21:58+00:00" }, { "name": "sebastian/global-state", @@ -3994,12 +4007,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25" + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0471b24bddeb05ffd0a5edc6837796f339068c25", - "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a74d82a0654a7f685f80016cc3570d7a387f9da0", + "reference": "a74d82a0654a7f685f80016cc3570d7a387f9da0", "shasum": "" }, "require": { @@ -4051,7 +4064,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:19+00:00" + "time": "2021-01-02T06:22:03+00:00" }, { "name": "sebastian/lines-of-code", @@ -4059,12 +4072,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24" + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/219c932af1aeee0b4eccbc53af2181ff50e14b24", - "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/db62e01f14ea9485d5a52dfb5706061fd0f50425", + "reference": "db62e01f14ea9485d5a52dfb5706061fd0f50425", "shasum": "" }, "require": { @@ -4109,7 +4122,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:42+00:00" + "time": "2021-01-02T06:22:58+00:00" }, { "name": "sebastian/object-enumerator", @@ -4117,12 +4130,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e" + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/da36684b10f17db8718e314fa8d84b2e0ed7132e", - "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/fccb61351e8a3a10ffacfad9544bb2905905b69c", + "reference": "fccb61351e8a3a10ffacfad9544bb2905905b69c", "shasum": "" }, "require": { @@ -4167,7 +4180,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:27+00:00" + "time": "2021-01-02T06:22:09+00:00" }, { "name": "sebastian/object-reflector", @@ -4175,12 +4188,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "6717d193da503616e69462cf98e2af3f4443335d" + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6717d193da503616e69462cf98e2af3f4443335d", - "reference": "6717d193da503616e69462cf98e2af3f4443335d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", + "reference": "c0ad4ce74e040797d5f8abfc23ab79fd79b064c3", "shasum": "" }, "require": { @@ -4223,7 +4236,7 @@ "type": "github" } ], - "time": "2020-12-24T12:27:35+00:00" + "time": "2021-01-02T06:22:14+00:00" }, { "name": "sebastian/recursion-context", @@ -4231,12 +4244,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cee249a3e471aa870067fa6155991230c7507924" + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cee249a3e471aa870067fa6155991230c7507924", - "reference": "cee249a3e471aa870067fa6155991230c7507924", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c5616ce32278e62c77066f72b1fe413a8c958cee", + "reference": "c5616ce32278e62c77066f72b1fe413a8c958cee", "shasum": "" }, "require": { @@ -4287,7 +4300,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:07+00:00" + "time": "2021-01-02T06:22:36+00:00" }, { "name": "sebastian/resource-operations", @@ -4351,12 +4364,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0" + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/67bfce3beb94968d175fdf117b80fc9a6b60bdd0", - "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/655e3b59cc2e508306dba9c3df08b774055548e7", + "reference": "655e3b59cc2e508306dba9c3df08b774055548e7", "shasum": "" }, "require": { @@ -4400,7 +4413,7 @@ "type": "github" } ], - "time": "2020-12-24T12:28:15+00:00" + "time": "2021-01-02T06:22:42+00:00" }, { "name": "sebastian/version", @@ -4500,12 +4513,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9" + "reference": "da4c3663721420520b024e5aede66b813019e744" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", - "reference": "15c96194f32e1b1aa30d1b302c71c5f83fd4dea9", + "url": "https://api.github.com/repos/symfony/console/zipball/da4c3663721420520b024e5aede66b813019e744", + "reference": "da4c3663721420520b024e5aede66b813019e744", "shasum": "" }, "require": { @@ -4590,7 +4603,7 @@ "type": "tidelift" } ], - "time": "2020-12-18T08:03:24+00:00" + "time": "2021-01-05T20:16:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4598,12 +4611,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3" + "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3", - "reference": "fade6deebd931cfd7a544f68479405a6a08979a3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7c0a3c5420fd802637c4260e595d6c674b23d578", + "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578", "shasum": "" }, "require": { @@ -4670,7 +4683,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4678,12 +4691,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9" + "reference": "32b651134d58efe1786c95352d846913a42d8331" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/be092746c3ab9f9c62608c82e0f04687f8a879f9", - "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32b651134d58efe1786c95352d846913a42d8331", + "reference": "32b651134d58efe1786c95352d846913a42d8331", "shasum": "" }, "require": { @@ -4752,7 +4765,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T15:40:22+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -4760,12 +4773,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa" + "reference": "8592bf62da8352927fc3857484e84baacddec301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/69609f9f06790591b4b13a45ee117e7bab6395aa", - "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8592bf62da8352927fc3857484e84baacddec301", + "reference": "8592bf62da8352927fc3857484e84baacddec301", "shasum": "" }, "require": { @@ -4837,7 +4850,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4845,12 +4858,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43" + "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/401c9d9d3400c53a8f1a39425f0543406c137a43", - "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/ec0101071dcbc6bdd5046da11df686f8515fa815", + "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815", "shasum": "" }, "require": { @@ -4918,7 +4931,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-php73", @@ -4926,12 +4939,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b" + "reference": "6d0e293e2b13580b866090a135900aea4adcb308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8c0d39c1526009b97f43beea4cc685bbc353a70b", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/6d0e293e2b13580b866090a135900aea4adcb308", + "reference": "6d0e293e2b13580b866090a135900aea4adcb308", "shasum": "" }, "require": { @@ -4998,7 +5011,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-php80", @@ -5006,12 +5019,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa" + "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/3a11f3dfb34ad50f978cb2b8cf936933b87739aa", - "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", + "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", "shasum": "" }, "require": { @@ -5082,7 +5095,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/service-contracts", @@ -5090,12 +5103,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366" + "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/5c448a39281b671be2cc8d208e6df75ac2d4b366", - "reference": "5c448a39281b671be2cc8d208e6df75ac2d4b366", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e0d43e6e2f909287d2e4e867ca5c131a661f08ef", + "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef", "shasum": "" }, "require": { @@ -5163,7 +5176,7 @@ "type": "tidelift" } ], - "time": "2020-12-23T15:38:30+00:00" + "time": "2021-01-01T09:26:45+00:00" }, { "name": "symfony/string", @@ -5171,12 +5184,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" + "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", - "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "url": "https://api.github.com/repos/symfony/string/zipball/99f25957efe05db14a1aa6cff643eca0f83a952c", + "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c", "shasum": "" }, "require": { @@ -5231,7 +5244,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.1" + "source": "https://github.com/symfony/string/tree/5.x" }, "funding": [ { @@ -5247,7 +5260,7 @@ "type": "tidelift" } ], - "time": "2020-12-05T07:33:16+00:00" + "time": "2021-01-01T09:26:45+00:00" }, { "name": "theseer/tokenizer", @@ -5305,12 +5318,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b" + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c5379903e5640e5f29024e71aa0817f7bd56102b", - "reference": "c5379903e5640e5f29024e71aa0817f7bd56102b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", + "reference": "a0e2cc25723f3cdb6bbaf617664c4e228f1e9886", "shasum": "" }, "require": { @@ -5376,7 +5389,7 @@ "type": "tidelift" } ], - "time": "2020-11-27T13:05:37+00:00" + "time": "2021-01-05T15:39:16+00:00" }, { "name": "vimeo/psalm", From 60503d0d0b5cb765221c290b07ef46b94b6a9753 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 6 Jan 2021 15:02:00 +0200 Subject: [PATCH 63/90] Added new platform --- app/config/platforms.php | 5 ++--- app/tasks/sdks.php | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index c9a3f25b59..1bfceb31e0 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -256,11 +256,10 @@ return [ 'version' => '0.0.1', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => '', - 'enabled' => false, + 'enabled' => true, 'beta' => true, - 'dev' => false, 'family' => APP_PLATFORM_SERVER, - 'prism' => 'java', + 'prism' => 'dart', 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), 'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git', 'gitRepoName' => 'sdk-for-dart', diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 857b4de7b5..c742acc227 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -122,6 +122,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND break; case 'dart': $config = new Dart(); + $config->setPackageName('dart_appwrite'); break; case 'go': $config = new Go(); From e27e4087c4a60681ee0377449a86b988059e9dc5 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 6 Jan 2021 15:45:47 +0200 Subject: [PATCH 64/90] Added dart code examples --- app/config/platforms.php | 2 +- composer.json | 2 +- composer.lock | 8 +++--- .../examples/avatars/get-browser.md | 18 +++++++++++++ .../examples/avatars/get-credit-card.md | 18 +++++++++++++ .../examples/avatars/get-favicon.md | 18 +++++++++++++ .../server-dart/examples/avatars/get-flag.md | 18 +++++++++++++ .../server-dart/examples/avatars/get-image.md | 18 +++++++++++++ .../examples/avatars/get-initials.md | 17 ++++++++++++ .../server-dart/examples/avatars/get-q-r.md | 18 +++++++++++++ .../examples/database/create-collection.md | 26 ++++++++++++++++++ .../examples/database/create-document.md | 26 ++++++++++++++++++ .../examples/database/delete-collection.md | 23 ++++++++++++++++ .../examples/database/delete-document.md | 24 +++++++++++++++++ .../examples/database/get-collection.md | 23 ++++++++++++++++ .../examples/database/get-document.md | 24 +++++++++++++++++ .../examples/database/list-collections.md | 22 +++++++++++++++ .../examples/database/list-documents.md | 23 ++++++++++++++++ .../examples/database/update-collection.md | 26 ++++++++++++++++++ .../examples/database/update-document.md | 27 +++++++++++++++++++ .../examples/health/get-anti-virus.md | 21 +++++++++++++++ .../server-dart/examples/health/get-cache.md | 21 +++++++++++++++ .../server-dart/examples/health/get-d-b.md | 21 +++++++++++++++ .../examples/health/get-queue-certificates.md | 21 +++++++++++++++ .../examples/health/get-queue-functions.md | 21 +++++++++++++++ .../examples/health/get-queue-logs.md | 21 +++++++++++++++ .../examples/health/get-queue-tasks.md | 21 +++++++++++++++ .../examples/health/get-queue-usage.md | 21 +++++++++++++++ .../examples/health/get-queue-webhooks.md | 21 +++++++++++++++ .../examples/health/get-storage-local.md | 21 +++++++++++++++ .../server-dart/examples/health/get-time.md | 21 +++++++++++++++ .../0.6.2/server-dart/examples/health/get.md | 21 +++++++++++++++ .../examples/locale/get-continents.md | 21 +++++++++++++++ .../examples/locale/get-countries-e-u.md | 21 +++++++++++++++ .../examples/locale/get-countries-phones.md | 21 +++++++++++++++ .../examples/locale/get-countries.md | 21 +++++++++++++++ .../examples/locale/get-currencies.md | 21 +++++++++++++++ .../examples/locale/get-languages.md | 21 +++++++++++++++ .../0.6.2/server-dart/examples/locale/get.md | 21 +++++++++++++++ .../examples/storage/create-file.md | 26 ++++++++++++++++++ .../examples/storage/delete-file.md | 23 ++++++++++++++++ .../examples/storage/get-file-download.md | 18 +++++++++++++ .../examples/storage/get-file-preview.md | 18 +++++++++++++ .../examples/storage/get-file-view.md | 18 +++++++++++++ .../server-dart/examples/storage/get-file.md | 23 ++++++++++++++++ .../examples/storage/list-files.md | 22 +++++++++++++++ .../examples/storage/update-file.md | 25 +++++++++++++++++ .../examples/teams/create-membership.md | 26 ++++++++++++++++++ .../server-dart/examples/teams/create.md | 23 ++++++++++++++++ .../examples/teams/delete-membership.md | 24 +++++++++++++++++ .../server-dart/examples/teams/delete.md | 23 ++++++++++++++++ .../examples/teams/get-memberships.md | 23 ++++++++++++++++ .../0.6.2/server-dart/examples/teams/get.md | 23 ++++++++++++++++ .../0.6.2/server-dart/examples/teams/list.md | 22 +++++++++++++++ .../server-dart/examples/teams/update.md | 24 +++++++++++++++++ .../server-dart/examples/users/create.md | 24 +++++++++++++++++ .../examples/users/delete-session.md | 24 +++++++++++++++++ .../examples/users/delete-sessions.md | 23 ++++++++++++++++ .../server-dart/examples/users/get-logs.md | 23 ++++++++++++++++ .../server-dart/examples/users/get-prefs.md | 23 ++++++++++++++++ .../examples/users/get-sessions.md | 23 ++++++++++++++++ .../0.6.2/server-dart/examples/users/get.md | 23 ++++++++++++++++ .../0.6.2/server-dart/examples/users/list.md | 22 +++++++++++++++ .../examples/users/update-prefs.md | 24 +++++++++++++++++ .../examples/users/update-status.md | 24 +++++++++++++++++ docs/sdks/dart/CHANGELOG.md | 3 +++ docs/sdks/dart/EXAMPLES.md | 17 +++++++----- 67 files changed, 1381 insertions(+), 13 deletions(-) create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-image.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md create mode 100644 docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/create-collection.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/create-document.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/delete-collection.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/delete-document.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/get-collection.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/get-document.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/list-collections.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/list-documents.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/update-collection.md create mode 100644 docs/examples/0.6.2/server-dart/examples/database/update-document.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-cache.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-d-b.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get-time.md create mode 100644 docs/examples/0.6.2/server-dart/examples/health/get.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-continents.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-countries.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get-languages.md create mode 100644 docs/examples/0.6.2/server-dart/examples/locale/get.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/create-file.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/delete-file.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/get-file.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/list-files.md create mode 100644 docs/examples/0.6.2/server-dart/examples/storage/update-file.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/create-membership.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/create.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/delete.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/get.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/list.md create mode 100644 docs/examples/0.6.2/server-dart/examples/teams/update.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/create.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/delete-session.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/get-logs.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/get-prefs.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/get-sessions.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/get.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/list.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/update-prefs.md create mode 100644 docs/examples/0.6.2/server-dart/examples/users/update-status.md diff --git a/app/config/platforms.php b/app/config/platforms.php index 1bfceb31e0..cfea0d6dcc 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -253,7 +253,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '0.0.1', + 'version' => '0.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => '', 'enabled' => true, diff --git a/composer.json b/composer.json index db97272fdb..2312ef077c 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.4.0", + "appwrite/sdk-generator": "0.4.1", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 4323941e91..0b612def8f 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": "2c7c15c2c968547dc6749efc79b39458", + "content-hash": "db906327240b2eff5909e2d987003883", "packages": [ { "name": "appwrite/php-clamav", @@ -1858,11 +1858,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.4.0", + "version": "0.4.1", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "91e155304d55831e66f880d5714ea81534819d44" + "reference": "bc6b2870d774779d0a2d027d12f4de576ac0b955" }, "require": { "ext-curl": "*", @@ -1892,7 +1892,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-06T12:37:52+00:00" + "time": "2021-01-06T13:40:31+00:00" }, { "name": "composer/package-versions-deprecated", diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..87d2062fc4 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getBrowser( + code: 'aa', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8fe5f1d5d8 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getCreditCard( + code: 'amex', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6a249dc70f --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getFavicon( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f997b668da --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getFlag( + code: 'af', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..9f31d8f159 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-image.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getImage( + url: 'https://example.com', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..73788d2170 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getInitials( + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..eb8b46c743 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Avatars avatars = Avatars(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = avatars.getQR( + text: '[TEXT]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/create-collection.md b/docs/examples/0.6.2/server-dart/examples/database/create-collection.md new file mode 100644 index 0000000000..c060effb3d --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/create-collection.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createCollection( + name: '[NAME]', + read: [], + write: [], + rules: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/create-document.md b/docs/examples/0.6.2/server-dart/examples/database/create-document.md new file mode 100644 index 0000000000..4899aa4a92 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/create-document.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.createDocument( + collectionId: '[COLLECTION_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md b/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md new file mode 100644 index 0000000000..6543cc1491 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/delete-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/delete-document.md b/docs/examples/0.6.2/server-dart/examples/database/delete-document.md new file mode 100644 index 0000000000..89204f6d81 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/delete-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.deleteDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/get-collection.md b/docs/examples/0.6.2/server-dart/examples/database/get-collection.md new file mode 100644 index 0000000000..6b0cb526ca --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/get-collection.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getCollection( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/get-document.md b/docs/examples/0.6.2/server-dart/examples/database/get-document.md new file mode 100644 index 0000000000..efe007aadf --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/get-document.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.getDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/list-collections.md b/docs/examples/0.6.2/server-dart/examples/database/list-collections.md new file mode 100644 index 0000000000..aecd08a54a --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/list-collections.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listCollections( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/list-documents.md b/docs/examples/0.6.2/server-dart/examples/database/list-documents.md new file mode 100644 index 0000000000..9323fd34be --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/list-documents.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.listDocuments( + collectionId: '[COLLECTION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/update-collection.md b/docs/examples/0.6.2/server-dart/examples/database/update-collection.md new file mode 100644 index 0000000000..8d77990f1a --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/update-collection.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateCollection( + collectionId: '[COLLECTION_ID]', + name: '[NAME]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/database/update-document.md b/docs/examples/0.6.2/server-dart/examples/database/update-document.md new file mode 100644 index 0000000000..767233b5a8 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/database/update-document.md @@ -0,0 +1,27 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Database database = Database(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = database.updateDocument( + collectionId: '[COLLECTION_ID]', + documentId: '[DOCUMENT_ID]', + data: {}, + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..dd5bbdc1cb --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-anti-virus.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getAntiVirus(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-cache.md b/docs/examples/0.6.2/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..322939d74e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-cache.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getCache(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md b/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..e3447550eb --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-d-b.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getDB(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..7c605154a6 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueCertificates(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c06cda9185 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueFunctions(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..807a04fb11 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueLogs(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md new file mode 100644 index 0000000000..a33ae976a0 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-tasks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueTasks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b504a8efc5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-usage.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueUsage(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..7c159ac8cd --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getQueueWebhooks(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7f172bf86c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getStorageLocal(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get-time.md b/docs/examples/0.6.2/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..65861d3cc3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get-time.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.getTime(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/health/get.md b/docs/examples/0.6.2/server-dart/examples/health/get.md new file mode 100644 index 0000000000..0c9d39218e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/health/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Health health = Health(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = health.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md b/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md new file mode 100644 index 0000000000..2daced78b6 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-continents.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getContinents(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md new file mode 100644 index 0000000000..7b04a49487 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-e-u.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesEU(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md new file mode 100644 index 0000000000..57138a6b75 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries-phones.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountriesPhones(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md b/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md new file mode 100644 index 0000000000..2bf758adca --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-countries.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCountries(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md new file mode 100644 index 0000000000..c8a415de4c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-currencies.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getCurrencies(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md b/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md new file mode 100644 index 0000000000..b9ae6655a3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get-languages.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.getLanguages(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/locale/get.md b/docs/examples/0.6.2/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..d290063060 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/locale/get.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Locale locale = Locale(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = locale.get(); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/create-file.md b/docs/examples/0.6.2/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..b098d92ea9 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/create-file.md @@ -0,0 +1,26 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.createFile( + file: await MultipartFile.fromFile('./path-to-files/image.jpg', 'image.jpg'), + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md b/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..ae76fe6f87 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/delete-file.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.deleteFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..2eceaab1f5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFileDownload( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..2b564d81b7 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFilePreview( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..030fb40f38 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + String result = storage.getFileView( + fileId: '[FILE_ID]', + ); + + print(result); // Resource URL string +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/get-file.md b/docs/examples/0.6.2/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..d4a10369a5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/get-file.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.getFile( + fileId: '[FILE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/list-files.md b/docs/examples/0.6.2/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..0225695466 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/list-files.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.listFiles( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/storage/update-file.md b/docs/examples/0.6.2/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..bc77e7a1d1 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/storage/update-file.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Storage storage = Storage(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = storage.updateFile( + fileId: '[FILE_ID]', + read: [], + write: [], + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..e3923bd207 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/create-membership.md @@ -0,0 +1,26 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.createMembership( + teamId: '[TEAM_ID]', + email: 'email@example.com', + roles: [], + url: 'https://example.com', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/create.md b/docs/examples/0.6.2/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..339663d9d1 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/create.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.create( + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..23688dcc04 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.deleteMembership( + teamId: '[TEAM_ID]', + inviteId: '[INVITE_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/delete.md b/docs/examples/0.6.2/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..a006e8f347 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/delete.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.delete( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md new file mode 100644 index 0000000000..3a12dc5c2b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/get-memberships.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.getMemberships( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/get.md b/docs/examples/0.6.2/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..a1bfe8e72c --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.get( + teamId: '[TEAM_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/list.md b/docs/examples/0.6.2/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..d55e58e36e --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/teams/update.md b/docs/examples/0.6.2/server-dart/examples/teams/update.md new file mode 100644 index 0000000000..22af165502 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/teams/update.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Teams teams = Teams(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = teams.update( + teamId: '[TEAM_ID]', + name: '[NAME]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/create.md b/docs/examples/0.6.2/server-dart/examples/users/create.md new file mode 100644 index 0000000000..18bbbf2d13 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/create.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.create( + email: 'email@example.com', + password: 'password', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/delete-session.md b/docs/examples/0.6.2/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..eaa98c17b7 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/delete-session.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSession( + userId: '[USER_ID]', + sessionId: '[SESSION_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..8c889aad2b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.deleteSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-logs.md b/docs/examples/0.6.2/server-dart/examples/users/get-logs.md new file mode 100644 index 0000000000..63eb6b5bcf --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-logs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getLogs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md b/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..e5909422a3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-prefs.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getPrefs( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md b/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md new file mode 100644 index 0000000000..ebe44c3eb9 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get-sessions.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.getSessions( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/get.md b/docs/examples/0.6.2/server-dart/examples/users/get.md new file mode 100644 index 0000000000..be582d52c5 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/get.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.get( + userId: '[USER_ID]', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/list.md b/docs/examples/0.6.2/server-dart/examples/users/list.md new file mode 100644 index 0000000000..e0ecf7adf3 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/list.md @@ -0,0 +1,22 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.list( + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..d148e52f0b --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/update-prefs.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updatePrefs( + userId: '[USER_ID]', + prefs: {}, + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/examples/0.6.2/server-dart/examples/users/update-status.md b/docs/examples/0.6.2/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..7e14043635 --- /dev/null +++ b/docs/examples/0.6.2/server-dart/examples/users/update-status.md @@ -0,0 +1,24 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +void main() { // Init SDK + Client client = Client(); + Users users = Users(client); + + client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key + ; + + Future result = users.updateStatus( + userId: '[USER_ID]', + status: '1', + ); + + result + .then((response) { + print(response); + }).catchError((error) { + print(error.response); + }); +} \ No newline at end of file diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index e69de29bb2..e8d0ca1f73 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +- First release \ No newline at end of file diff --git a/docs/sdks/dart/EXAMPLES.md b/docs/sdks/dart/EXAMPLES.md index f6768a5f85..26930c3352 100644 --- a/docs/sdks/dart/EXAMPLES.md +++ b/docs/sdks/dart/EXAMPLES.md @@ -13,23 +13,26 @@ Init your Appwrite client: ``` -Create a new user and session: +Create a new user: ```dart -Account account = Account(client); +Users users = Users(client); -Response user = await account.create(email: 'me@appwrite.io', password: 'password', name: 'My Name'); +Response result = await users.create( + email: 'email@example.com', + password: 'password', +); -Response session = await account.createSession(email: 'me@appwrite.io', password: 'password'); - ``` Fetch user profile: ```dart -Account account = Account(client); +Users users = Users(client); -Response profile = await account.get(); +Response profile = await users.get( + userId: '[USER_ID]', +); ``` Upload File: From 8e8869e3f837884441d90e23c4fb9065992f050a Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 6 Jan 2021 16:33:41 +0200 Subject: [PATCH 65/90] Updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea3ee938b9..debcb4dd43 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,8 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) * ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) * ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) +* ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Experimental** (Maintained by the Appwrite Team) * ✅   [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team) -* ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team) Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)! From 5e1ff7396e288d2e8e831497cebf53a057a264e2 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 00:02:05 +0200 Subject: [PATCH 66/90] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7967b1b2ef..b10fecd5cf 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ Below is a list of currently supported platforms and languages. If you wish to h * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) * ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) * ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) -* ✅   [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Expiremental** (Maintained by the Appwrite Team) +* ✅   [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team) * ✅   [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team) * ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team) From b23d2bf6e4d2663d9d02ec32b5b743995324bff3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 16:11:41 +0200 Subject: [PATCH 67/90] Updated examples --- composer.json | 2 +- composer.lock | 98 ++++++++++--------- .../examples/database/create-collection.md | 2 +- .../examples/database/create-document.md | 2 +- .../examples/database/update-collection.md | 2 +- .../examples/database/update-document.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/teams/create-membership.md | 2 +- .../examples/users/update-prefs.md | 2 +- 10 files changed, 60 insertions(+), 56 deletions(-) diff --git a/composer.json b/composer.json index f0dc6c104c..ee1e90a876 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.3.3", + "appwrite/sdk-generator": "0.4.2", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 23bbf8edea..9b68ad5f56 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": "2dee8b75780ba88fd7da28d08d691998", + "content-hash": "0df79d7789fec84aa4500edad823f1f6", "packages": [ { "name": "appwrite/php-clamav", @@ -131,16 +131,16 @@ }, { "name": "chillerlan/php-settings-container", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/chillerlan/php-settings-container.git", - "reference": "90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5" + "reference": "98ccc1b31b31a53bcb563465c4961879b2b93096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5", - "reference": "90ab24a3dc09569bfa0f3dbc3d44bab3aaa2a6c5", + "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/98ccc1b31b31a53bcb563465c4961879b2b93096", + "reference": "98ccc1b31b31a53bcb563465c4961879b2b93096", "shasum": "" }, "require": { @@ -148,8 +148,8 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phan/phan": "^3.2.2", - "phpunit/phpunit": "9.4" + "phan/phan": "^4.0", + "phpunit/phpunit": "^9.5" }, "type": "library", "autoload": { @@ -181,12 +181,16 @@ "source": "https://github.com/chillerlan/php-settings-container" }, "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, { "url": "https://ko-fi.com/codemasher", "type": "ko_fi" } ], - "time": "2020-10-07T13:18:35+00:00" + "time": "2021-01-06T15:57:03+00:00" }, { "name": "colinmollenhour/credis", @@ -1858,11 +1862,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.3.3", + "version": "0.4.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "7530820a1ee824874d89749c51b0e49d15595abc" + "reference": "5482f4cdb65ab90ffea752ba9a625187cd7c7784" }, "require": { "ext-curl": "*", @@ -1892,7 +1896,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-05T17:58:17+00:00" + "time": "2021-01-07T14:03:54+00:00" }, { "name": "composer/package-versions-deprecated", @@ -2323,16 +2327,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.65", + "version": "1.3.66", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "227f19062451c55a797e0cc667ef983834e6580c" + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/227f19062451c55a797e0cc667ef983834e6580c", - "reference": "227f19062451c55a797e0cc667ef983834e6580c", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", "shasum": "" }, "require": { @@ -2342,8 +2346,8 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "~1.0", - "phpunit/phpunit": "~4.8" + "matthiasmullie/scrapbook": "dev-master", + "phpunit/phpunit": ">=4.8" }, "suggest": { "psr/cache-implementation": "Cache implementation to use with Minify::cache" @@ -2381,7 +2385,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.65" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" }, "funding": [ { @@ -2397,7 +2401,7 @@ "type": "github" } ], - "time": "2020-12-27T21:43:29+00:00" + "time": "2021-01-06T15:18:10+00:00" }, { "name": "matthiasmullie/path-converter", @@ -4513,12 +4517,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "af2bafc13cb92e182bf634285346925e09888d23" + "reference": "da4c3663721420520b024e5aede66b813019e744" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/af2bafc13cb92e182bf634285346925e09888d23", - "reference": "af2bafc13cb92e182bf634285346925e09888d23", + "url": "https://api.github.com/repos/symfony/console/zipball/da4c3663721420520b024e5aede66b813019e744", + "reference": "da4c3663721420520b024e5aede66b813019e744", "shasum": "" }, "require": { @@ -4603,7 +4607,7 @@ "type": "tidelift" } ], - "time": "2021-01-05T19:51:30+00:00" + "time": "2021-01-05T20:16:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4611,12 +4615,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7130f348df2f842044038aaae9d6653dc9d67649" + "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7130f348df2f842044038aaae9d6653dc9d67649", - "reference": "7130f348df2f842044038aaae9d6653dc9d67649", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7c0a3c5420fd802637c4260e595d6c674b23d578", + "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578", "shasum": "" }, "require": { @@ -4683,7 +4687,7 @@ "type": "tidelift" } ], - "time": "2020-12-27T09:28:48+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4691,12 +4695,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "e314d4992832c3a0a68ca731fadd959917320fda" + "reference": "32b651134d58efe1786c95352d846913a42d8331" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e314d4992832c3a0a68ca731fadd959917320fda", - "reference": "e314d4992832c3a0a68ca731fadd959917320fda", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32b651134d58efe1786c95352d846913a42d8331", + "reference": "32b651134d58efe1786c95352d846913a42d8331", "shasum": "" }, "require": { @@ -4765,7 +4769,7 @@ "type": "tidelift" } ], - "time": "2020-12-27T09:28:48+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -4773,12 +4777,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3a79a2226897adae0cab81688fbc5144e2fc53f6" + "reference": "8592bf62da8352927fc3857484e84baacddec301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3a79a2226897adae0cab81688fbc5144e2fc53f6", - "reference": "3a79a2226897adae0cab81688fbc5144e2fc53f6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8592bf62da8352927fc3857484e84baacddec301", + "reference": "8592bf62da8352927fc3857484e84baacddec301", "shasum": "" }, "require": { @@ -4850,7 +4854,7 @@ "type": "tidelift" } ], - "time": "2020-12-27T22:11:44+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4858,12 +4862,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "de14691dc88bbbc5535de7f0e32080977dc1d23f" + "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/de14691dc88bbbc5535de7f0e32080977dc1d23f", - "reference": "de14691dc88bbbc5535de7f0e32080977dc1d23f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/ec0101071dcbc6bdd5046da11df686f8515fa815", + "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815", "shasum": "" }, "require": { @@ -4931,7 +4935,7 @@ "type": "tidelift" } ], - "time": "2020-12-27T09:28:48+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-php73", @@ -4939,12 +4943,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b" + "reference": "6d0e293e2b13580b866090a135900aea4adcb308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8c0d39c1526009b97f43beea4cc685bbc353a70b", - "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/6d0e293e2b13580b866090a135900aea4adcb308", + "reference": "6d0e293e2b13580b866090a135900aea4adcb308", "shasum": "" }, "require": { @@ -5011,7 +5015,7 @@ "type": "tidelift" } ], - "time": "2020-10-26T13:35:45+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/polyfill-php80", @@ -5019,12 +5023,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "54cc82c30ba7ed02bc64f5d010488c159b5f1706" + "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/54cc82c30ba7ed02bc64f5d010488c159b5f1706", - "reference": "54cc82c30ba7ed02bc64f5d010488c159b5f1706", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", + "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", "shasum": "" }, "require": { @@ -5095,7 +5099,7 @@ "type": "tidelift" } ], - "time": "2020-12-27T09:28:48+00:00" + "time": "2021-01-06T10:19:43+00:00" }, { "name": "symfony/service-contracts", diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md index a8c2c3f7e0..7e519655b2 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-collection.md @@ -10,4 +10,4 @@ client Database database = new Database(client); -HttpResponseMessage result = await database.CreateCollection("[NAME]", {}, {}, {}); +HttpResponseMessage result = await database.CreateCollection("[NAME]", [List], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md index 1a875067a1..be00512f29 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/create-document.md @@ -10,4 +10,4 @@ client Database database = new Database(client); -HttpResponseMessage result = await database.CreateDocument("[COLLECTION_ID]", {}, {}, {}); +HttpResponseMessage result = await database.CreateDocument("[COLLECTION_ID]", [object], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md index 42c67650d1..c28830be3c 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-collection.md @@ -10,4 +10,4 @@ client Database database = new Database(client); -HttpResponseMessage result = await database.UpdateCollection("[COLLECTION_ID]", "[NAME]", {}, {}); +HttpResponseMessage result = await database.UpdateCollection("[COLLECTION_ID]", "[NAME]", [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md index 5f4c173b7a..32176af3da 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md +++ b/docs/examples/0.6.2/server-dotnet/examples/database/update-document.md @@ -10,4 +10,4 @@ client Database database = new Database(client); -HttpResponseMessage result = await database.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", {}, {}, {}); +HttpResponseMessage result = await database.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", [object], [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md index 5427fceb1e..8c1e80e8c3 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/create-file.md @@ -10,4 +10,4 @@ client Storage storage = new Storage(client); -HttpResponseMessage result = await storage.CreateFile(new File("./path-to-files/image.jpg"), {}, {}); +HttpResponseMessage result = await storage.CreateFile(new File("./path-to-files/image.jpg"), [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md index 8effc42980..fd62fa4049 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md +++ b/docs/examples/0.6.2/server-dotnet/examples/storage/update-file.md @@ -10,4 +10,4 @@ client Storage storage = new Storage(client); -HttpResponseMessage result = await storage.UpdateFile("[FILE_ID]", {}, {}); +HttpResponseMessage result = await storage.UpdateFile("[FILE_ID]", [List], [List]); diff --git a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md index d149cb4738..7391cc6fff 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md +++ b/docs/examples/0.6.2/server-dotnet/examples/teams/create-membership.md @@ -10,4 +10,4 @@ client Teams teams = new Teams(client); -HttpResponseMessage result = await teams.CreateMembership("[TEAM_ID]", "email@example.com", {}, "https://example.com"); +HttpResponseMessage result = await teams.CreateMembership("[TEAM_ID]", "email@example.com", [List], "https://example.com"); diff --git a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md index 06ffa4245a..0cfb05f912 100644 --- a/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md +++ b/docs/examples/0.6.2/server-dotnet/examples/users/update-prefs.md @@ -10,4 +10,4 @@ client Users users = new Users(client); -HttpResponseMessage result = await users.UpdatePrefs("[USER_ID]", {}); +HttpResponseMessage result = await users.UpdatePrefs("[USER_ID]", [object]); From dcc270e32de1fbc4bee75520ed3c122c5923598a Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 17:05:57 +0200 Subject: [PATCH 68/90] Docs as code. --- app/config/variables.php | 104 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/app/config/variables.php b/app/config/variables.php index 49ec821af8..9696954c17 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -3,192 +3,296 @@ return [ [ 'name' => '_APP_ENV', + 'description' => 'Set your server running environment. By default, the var is set to \'development\'. When deploying to production, change it to: \'production\'.', + 'introduction' => '', 'default' => 'production', 'required' => false, 'question' => '', ], [ 'name' => '_APP_OPTIONS_ABUSE', + 'description' => 'Allows you to disable abuse checks and API rate limiting. By default, set to \'enabled\'. To cancel the abuse checking, set to \'disabled\'. It is not recommended to disable this check-in a production environment.', + 'introduction' => '', 'default' => 'enabled', 'required' => false, 'question' => '', ], [ 'name' => '_APP_OPTIONS_FORCE_HTTPS', + 'description' => 'Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the \'Strict-Transport-Security\' header to all HTTP responses. By default, set to \'disabled\'. To enable, set to \'enabled\'. This feature will work only when your ports are set to default 80 and 443.', + 'introduction' => '', 'default' => 'enabled', 'required' => false, 'question' => '', ], [ 'name' => '_APP_OPENSSL_KEY_V1', + 'description' => 'This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to **keep it a secret and have a backup for it**.', + 'introduction' => '', 'default' => 'your-secret-key', 'required' => true, 'question' => 'Choose a secret API key, make sure to make a backup of your key in a secure location', ], [ 'name' => '_APP_DOMAIN', + 'description' => 'Your Appwrite domain address. When setting a public suffix domain, Appwrite will attempt to issue a valid SSL certificate automatically. When used with a dev domain, Appwrite will assign a self-signed SSL certificate. The default value is \'localhost\'.', + 'introduction' => '', 'default' => 'localhost', 'required' => true, 'question' => 'Enter your Appwrite hostname', ], [ 'name' => '_APP_DOMAIN_TARGET', + 'description' => 'A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', + 'introduction' => '', 'default' => 'localhost', 'required' => true, 'question' => "Enter a DNS A record hostname to serve as a CNAME for your custom domains.\nYou can use the same value as used for the Appwrite hostname.", ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_EMAILS', + 'description' => 'This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_DOMAINS', + 'description' => "This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_IPS', + 'description' => "This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.\n\nTo enable/activate this option, pass a list of allowed IP addresses separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_NAME', + 'description' => 'This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: \'Appwrite\'. You can use url encoded strings for spaces and special chars.', + 'introduction' => '0.7.0', + 'default' => 'Appwrite', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_ADDRESS', + 'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'team@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.', + 'introduction' => '0.7.0', + 'default' => 'team@appwrite.io', + 'required' => false, + 'question' => '', + ], [ 'name' => '_APP_REDIS_HOST', + 'description' => 'Redis server hostname address. Default value is: \'redis\'.', + 'introduction' => '', 'default' => 'redis', 'required' => false, 'question' => '', ], [ 'name' => '_APP_REDIS_PORT', + 'description' => 'Redis server TCP port. Default value is: \'6379\'.', + 'introduction' => '', 'default' => '6379', 'required' => false, 'question' => '', ], [ 'name' => '_APP_DB_HOST', + 'description' => 'MariaDB server host name address. Default value is: \'mariadb\'.', + 'introduction' => '', 'default' => 'mariadb', 'required' => false, 'question' => '', ], [ 'name' => '_APP_DB_PORT', + 'description' => 'MariaDB server TCP port. Default value is: \'3306\'.', + 'introduction' => '', 'default' => '3306', 'required' => false, 'question' => '', ], [ 'name' => '_APP_DB_SCHEMA', + 'description' => 'MariaDB server database schema. Default value is: \'appwrite\'.', + 'introduction' => '', 'default' => 'appwrite', 'required' => false, 'question' => '', ], [ 'name' => '_APP_DB_USER', + 'description' => 'MariaDB server user name. Default value is: \'root\'.', + 'introduction' => '', 'default' => 'user', 'required' => false, 'question' => '', ], [ 'name' => '_APP_DB_PASS', + 'description' => 'MariaDB server user password. Default value is: \'password\'.', + 'introduction' => '', 'default' => 'password', 'required' => false, 'question' => '', ], [ 'name' => '_APP_INFLUXDB_HOST', + 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', + 'introduction' => '', 'default' => 'influxdb', 'required' => false, 'question' => '', ], [ 'name' => '_APP_INFLUXDB_PORT', + 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', + 'introduction' => '', 'default' => '8086', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STATSD_HOST', + 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', + 'introduction' => '', 'default' => 'telegraf', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STATSD_PORT', + 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', + 'introduction' => '', 'default' => '8125', 'required' => false, 'question' => '', ], [ 'name' => '_APP_SMTP_HOST', + 'description' => 'SMTP server host name address. Default value is: \'smtp\'. Pass an empty string to disable all mail sending from the server.', + 'introduction' => '', 'default' => 'smtp', 'required' => false, 'question' => '', ], [ 'name' => '_APP_SMTP_PORT', + 'description' => 'SMTP server TCP port. Default value is: \'25\'.', + 'introduction' => '', 'default' => '25', 'required' => false, 'question' => '', ], [ 'name' => '_APP_SMTP_SECURE', + 'description' => 'SMTP secure connection protocol. Empty by default, change to \'tls\' if running on a secure connection.', + 'introduction' => '', 'default' => '', 'required' => false, 'question' => '', ], [ 'name' => '_APP_SMTP_USERNAME', + 'description' => 'SMTP server user name. Empty by default.', + 'introduction' => '', 'default' => '', 'required' => false, 'question' => '', ], [ 'name' => '_APP_SMTP_PASSWORD', + 'description' => 'SMTP server user password. Empty by default.', + 'introduction' => '', 'default' => '', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STORAGE_LIMIT', + 'description' => 'Maximun file size allowed for file upload. The default value is 10MB limitation. You should pass your size limit value in bytes.', + 'introduction' => '0.7.0', 'default' => '10000000', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STORAGE_ANTIVIRUS', + 'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'enabled\' by default, to cancel the scans set the value to \'disabled\'. When disabled, it\'s recommended to turn off the ClamAV container for better resource usage.', + 'introduction' => '', 'default' => 'enabled', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STORAGE_ANTIVIRUS_HOST', + 'description' => 'ClamAV server host name address. Default value is: \'clamav\'.', + 'introduction' => '0.7.0', 'default' => 'clamav', 'required' => false, 'question' => '', ], [ 'name' => '_APP_STORAGE_ANTIVIRUS_PORT', + 'description' => 'ClamAV server TCP port. Default value is: \'3310\'.', + 'introduction' => '0.7.0', 'default' => '3310', 'required' => false, 'question' => '', ], [ 'name' => '_APP_FUNCTIONS_TIMEOUT', + 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds.', + 'introduction' => '0.7.0', 'default' => '900', 'required' => false, 'question' => '', ], [ 'name' => '_APP_FUNCTIONS_CONTAINERS', + 'description' => 'The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10.', + 'introduction' => '0.7.0', 'default' => '10', 'required' => false, 'question' => '', ], [ 'name' => '_APP_FUNCTIONS_CPUS', + 'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is 1.', + 'introduction' => '0.7.0', 'default' => '1', 'required' => false, 'question' => '', ], [ 'name' => '_APP_FUNCTIONS_MEMORY', + 'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', 'default' => '128', 'required' => false, 'question' => '', ], [ 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', + 'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', 'default' => '128', 'required' => false, 'question' => '', ], [ 'name' => '_APP_MAINTENANCE_INTERVAL', + 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', 'default' => '86400', 'required' => false, 'question' => '', From 086739cfba82e161171ff2ec657bdef03226d39f Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 17:08:05 +0200 Subject: [PATCH 69/90] Removed old docs --- docs/tutorials/environment-variables.md | 141 ------------------------ 1 file changed, 141 deletions(-) delete mode 100644 docs/tutorials/environment-variables.md diff --git a/docs/tutorials/environment-variables.md b/docs/tutorials/environment-variables.md deleted file mode 100644 index 3ab2183ff2..0000000000 --- a/docs/tutorials/environment-variables.md +++ /dev/null @@ -1,141 +0,0 @@ -# Environment Variables - -Appwrite environment variables allow you to edit your server setup configuration and customize it. You can change the environment variables by changing them when running Appwrite using Docker CLI or Docker-Compose. - -## General Options - -### _APP_ENV - -Set your server running environment. By default, the var is set to 'development'. When deploying to production, change it to: 'production'. - -### _APP_OPTIONS_ABUSE - -Allows you to turn off abuse checks and API rate limiting. By default, set to 'enabled'. To cancel the abuse checking, set to 'disabled'. It is not recommended to turn off this feature in a production environment. - -### _APP_OPTIONS_FORCE_HTTPS - -Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the 'Strict-Transport-Security' header to all HTTP responses. By default, set to 'disabled'. To enable, set to 'enabled'. This feature will work only when your ports are set to default 80 and 443. - -### _APP_OPENSSL_KEY_V1 - -This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to keep it a secret. - -### _APP_STORAGE_LIMIT - -Maximum file size allowed for file upload. The default value is 100MB limitation. You should pass your size limit value in bytes. - -### _APP_STORAGE_ANTIVIRUS - -This variable allows you to disable the internal anti-virus scans. This value is set to 'enabled' by default, to cancel the scans set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage. - -### _APP_CONSOLE_WHITELIST_EMAILS - -This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma. - -### _APP_CONSOLE_WHITELIST_DOMAINS - -This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain. - -To enable this option, pass a list of allowed email domains separated by a comma. - -### _APP_CONSOLE_WHITELIST_IPS - -This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP. - -To enable/activate this option, pass a list of allowed IP addresses separated by a comma. - -## Redis Server - -Appwrite uses a Redis server for managing cache, queues and scheduled tasks. The Redis env vars are used to allow Appwrite server to connect to the Redis container. - -### _APP_REDIS_HOST - -Redis server hostname address. Default value is: 'redis' - -### _APP_REDIS_PORT - -Redis server TCP port. Default value is: '6379' - -## MariaDB Server - -Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container. - -### _APP_DB_HOST - -MariaDB server host name address. Default value is: 'mariadb' - -### _APP_DB_PORT - -MariaDB server TCP port. Default value is: '3306' - -### _APP_DB_USER - -MariaDB server user name. Default value is: 'root' - -### _APP_DB_PASS - -MariaDB server user password. Default value is: 'password' - -### _APP_DB_SCHEMA - -MariaDB server database schema. Default value is: 'appwrite' - -## InfluxDB - -Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container. - -### _APP_INFLUXDB_HOST - -InfluxDB server host name address. Default value is: 'influxdb' - -### _APP_INFLUXDB_PORT - -InfluxDB server TCP port. Default value is: '8086' - -## StatsD - -Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container. - -### _APP_STATSD_HOST - -StatsD server host name address. Default value is: 'telegraf' - -### _APP_STATSD_PORT - -StatsD server TCP port. Default value is: '8125' - -## SMTP - -Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container. - -If running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user's SPAM folder. - -### _APP_SMTP_HOST - -SMTP server host name address. Default value is: 'smtp'. Pass an empty string to disable all mail sending from the server. - -### _APP_SMTP_PORT - -SMTP server TCP port. Default value is: '25' - -### _APP_SMTP_SECURE - -SMTP secure connection protocol. Empty by default, change to 'tls' if running on a secure connection. - -### _APP_SMTP_USERNAME - -SMTP server user name. Empty by default. - -### _APP_SMTP_PASSWORD - -SMTP server user password. Empty by default. - -## System Settings - -### _APP_SYSTEM_EMAIL_NAME - -This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: 'Appwrite Team'. You can use url encoded strings for spaces and special chars. - -### _APP_SYSTEM_EMAIL_ADDRESS - -This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is 'team@appwrite.io'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users' SPAM folders. From bac731e5b28b9413c191e432b6ada5ca2c7b426c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 22:50:27 +0200 Subject: [PATCH 70/90] Docs as code --- app/config/variables.php | 608 +++++++++++++++++++++------------------ app/tasks/install.php | 9 +- app/tasks/vars.php | 12 +- 3 files changed, 346 insertions(+), 283 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 9696954c17..59de920221 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -2,299 +2,347 @@ return [ [ - 'name' => '_APP_ENV', - 'description' => 'Set your server running environment. By default, the var is set to \'development\'. When deploying to production, change it to: \'production\'.', - 'introduction' => '', - 'default' => 'production', - 'required' => false, - 'question' => '', + 'category' => 'General', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_ENV', + 'description' => 'Set your server running environment. By default, the var is set to \'development\'. When deploying to production, change it to: \'production\'.', + 'introduction' => '', + 'default' => 'production', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPTIONS_ABUSE', + 'description' => 'Allows you to disable abuse checks and API rate limiting. By default, set to \'enabled\'. To cancel the abuse checking, set to \'disabled\'. It is not recommended to disable this check-in a production environment.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPTIONS_FORCE_HTTPS', + 'description' => 'Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the \'Strict-Transport-Security\' header to all HTTP responses. By default, set to \'disabled\'. To enable, set to \'enabled\'. This feature will work only when your ports are set to default 80 and 443.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_OPENSSL_KEY_V1', + 'description' => 'This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to **keep it a secret and have a backup for it**.', + 'introduction' => '', + 'default' => 'your-secret-key', + 'required' => true, + 'question' => 'Choose a secret API key, make sure to make a backup of your key in a secure location', + ], + [ + 'name' => '_APP_DOMAIN', + 'description' => 'Your Appwrite domain address. When setting a public suffix domain, Appwrite will attempt to issue a valid SSL certificate automatically. When used with a dev domain, Appwrite will assign a self-signed SSL certificate. The default value is \'localhost\'.', + 'introduction' => '', + 'default' => 'localhost', + 'required' => true, + 'question' => 'Enter your Appwrite hostname', + ], + [ + 'name' => '_APP_DOMAIN_TARGET', + 'description' => 'A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', + 'introduction' => '', + 'default' => 'localhost', + 'required' => true, + 'question' => "Enter a DNS A record hostname to serve as a CNAME for your custom domains.\nYou can use the same value as used for the Appwrite hostname.", + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_EMAILS', + 'description' => 'This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_DOMAINS', + 'description' => "This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_CONSOLE_WHITELIST_IPS', + 'description' => "This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.\n\nTo enable/activate this option, pass a list of allowed IP addresses separated by a comma.", + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_NAME', + 'description' => 'This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: \'Appwrite\'. You can use url encoded strings for spaces and special chars.', + 'introduction' => '0.7.0', + 'default' => 'Appwrite', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SYSTEM_EMAIL_ADDRESS', + 'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'team@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.', + 'introduction' => '0.7.0', + 'default' => 'team@appwrite.io', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPTIONS_ABUSE', - 'description' => 'Allows you to disable abuse checks and API rate limiting. By default, set to \'enabled\'. To cancel the abuse checking, set to \'disabled\'. It is not recommended to disable this check-in a production environment.', - 'introduction' => '', - 'default' => 'enabled', - 'required' => false, - 'question' => '', + 'category' => 'Redis', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_REDIS_HOST', + 'description' => 'Redis server hostname address. Default value is: \'redis\'.', + 'introduction' => '', + 'default' => 'redis', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_REDIS_PORT', + 'description' => 'Redis server TCP port. Default value is: \'6379\'.', + 'introduction' => '', + 'default' => '6379', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPTIONS_FORCE_HTTPS', - 'description' => 'Allows you to force HTTPS connection to your API. This feature redirects any HTTP call to HTTPS and adds the \'Strict-Transport-Security\' header to all HTTP responses. By default, set to \'disabled\'. To enable, set to \'enabled\'. This feature will work only when your ports are set to default 80 and 443.', - 'introduction' => '', - 'default' => 'enabled', - 'required' => false, - 'question' => '', + 'category' => 'MariaDB', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_DB_HOST', + 'description' => 'MariaDB server host name address. Default value is: \'mariadb\'.', + 'introduction' => '', + 'default' => 'mariadb', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_PORT', + 'description' => 'MariaDB server TCP port. Default value is: \'3306\'.', + 'introduction' => '', + 'default' => '3306', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_SCHEMA', + 'description' => 'MariaDB server database schema. Default value is: \'appwrite\'.', + 'introduction' => '', + 'default' => 'appwrite', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_USER', + 'description' => 'MariaDB server user name. Default value is: \'root\'.', + 'introduction' => '', + 'default' => 'user', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_DB_PASS', + 'description' => 'MariaDB server user password. Default value is: \'password\'.', + 'introduction' => '', + 'default' => 'password', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_OPENSSL_KEY_V1', - 'description' => 'This is your server private secret key that is used to encrypt all sensitive data on your server. Appwrite server encrypts all secret data on your server like webhooks, HTTP passwords, user sessions, and storage files. The var is not set by default, if you wish to take advantage of Appwrite encryption capabilities you should change it and make sure to **keep it a secret and have a backup for it**.', - 'introduction' => '', - 'default' => 'your-secret-key', - 'required' => true, - 'question' => 'Choose a secret API key, make sure to make a backup of your key in a secure location', + 'category' => 'InfluxDB', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_INFLUXDB_HOST', + 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', + 'introduction' => '', + 'default' => 'influxdb', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_INFLUXDB_PORT', + 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', + 'introduction' => '', + 'default' => '8086', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_DOMAIN', - 'description' => 'Your Appwrite domain address. When setting a public suffix domain, Appwrite will attempt to issue a valid SSL certificate automatically. When used with a dev domain, Appwrite will assign a self-signed SSL certificate. The default value is \'localhost\'.', - 'introduction' => '', - 'default' => 'localhost', - 'required' => true, - 'question' => 'Enter your Appwrite hostname', + 'category' => 'StatsD', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_STATSD_HOST', + 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', + 'introduction' => '', + 'default' => 'telegraf', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STATSD_PORT', + 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', + 'introduction' => '', + 'default' => '8125', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_DOMAIN_TARGET', - 'description' => 'A DNS A record hostname to serve as a CNAME target for your Appwrite custom domains. You can use the same value as used for the Appwrite \'_APP_DOMAIN\' variable. The default value is \'localhost\'.', - 'introduction' => '', - 'default' => 'localhost', - 'required' => true, - 'question' => "Enter a DNS A record hostname to serve as a CNAME for your custom domains.\nYou can use the same value as used for the Appwrite hostname.", + 'category' => 'SMTP', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_SMTP_HOST', + 'description' => 'SMTP server host name address. Default value is: \'smtp\'. Pass an empty string to disable all mail sending from the server.', + 'introduction' => '', + 'default' => 'smtp', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_PORT', + 'description' => 'SMTP server TCP port. Default value is: \'25\'.', + 'introduction' => '', + 'default' => '25', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_SECURE', + 'description' => 'SMTP secure connection protocol. Empty by default, change to \'tls\' if running on a secure connection.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_USERNAME', + 'description' => 'SMTP server user name. Empty by default.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_SMTP_PASSWORD', + 'description' => 'SMTP server user password. Empty by default.', + 'introduction' => '', + 'default' => '', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_CONSOLE_WHITELIST_EMAILS', - 'description' => 'This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.', - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', + 'category' => 'Storage', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_STORAGE_LIMIT', + 'description' => 'Maximun file size allowed for file upload. The default value is 10MB limitation. You should pass your size limit value in bytes.', + 'introduction' => '0.7.0', + 'default' => '10000000', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS', + 'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'enabled\' by default, to cancel the scans set the value to \'disabled\'. When disabled, it\'s recommended to turn off the ClamAV container for better resource usage.', + 'introduction' => '', + 'default' => 'enabled', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS_HOST', + 'description' => 'ClamAV server host name address. Default value is: \'clamav\'.', + 'introduction' => '0.7.0', + 'default' => 'clamav', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_STORAGE_ANTIVIRUS_PORT', + 'description' => 'ClamAV server TCP port. Default value is: \'3310\'.', + 'introduction' => '0.7.0', + 'default' => '3310', + 'required' => false, + 'question' => '', + ], + ], ], [ - 'name' => '_APP_CONSOLE_WHITELIST_DOMAINS', - 'description' => "This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.", - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_CONSOLE_WHITELIST_IPS', - 'description' => "This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.\n\nTo enable/activate this option, pass a list of allowed IP addresses separated by a comma.", - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SYSTEM_EMAIL_NAME', - 'description' => 'This is the sender name value that will appear on email messages sent to developers from the Appwrite console. The default value is: \'Appwrite\'. You can use url encoded strings for spaces and special chars.', - 'introduction' => '0.7.0', - 'default' => 'Appwrite', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SYSTEM_EMAIL_ADDRESS', - 'description' => 'This is the sender email address that will appear on email messages sent to developers from the Appwrite console. The default value is \'team@appwrite.io\'. You should choose an email address that is allowed to be used from your SMTP server to avoid the server email ending in the users\' SPAM folders.', - 'introduction' => '0.7.0', - 'default' => 'team@appwrite.io', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_REDIS_HOST', - 'description' => 'Redis server hostname address. Default value is: \'redis\'.', - 'introduction' => '', - 'default' => 'redis', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_REDIS_PORT', - 'description' => 'Redis server TCP port. Default value is: \'6379\'.', - 'introduction' => '', - 'default' => '6379', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_HOST', - 'description' => 'MariaDB server host name address. Default value is: \'mariadb\'.', - 'introduction' => '', - 'default' => 'mariadb', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_PORT', - 'description' => 'MariaDB server TCP port. Default value is: \'3306\'.', - 'introduction' => '', - 'default' => '3306', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_SCHEMA', - 'description' => 'MariaDB server database schema. Default value is: \'appwrite\'.', - 'introduction' => '', - 'default' => 'appwrite', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_USER', - 'description' => 'MariaDB server user name. Default value is: \'root\'.', - 'introduction' => '', - 'default' => 'user', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_DB_PASS', - 'description' => 'MariaDB server user password. Default value is: \'password\'.', - 'introduction' => '', - 'default' => 'password', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_INFLUXDB_HOST', - 'description' => 'InfluxDB server host name address. Default value is: \'influxdb\'.', - 'introduction' => '', - 'default' => 'influxdb', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_INFLUXDB_PORT', - 'description' => 'InfluxDB server TCP port. Default value is: \'8086\'.', - 'introduction' => '', - 'default' => '8086', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STATSD_HOST', - 'description' => 'StatsD server host name address. Default value is: \'telegraf\'.', - 'introduction' => '', - 'default' => 'telegraf', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STATSD_PORT', - 'description' => 'StatsD server TCP port. Default value is: \'8125\'.', - 'introduction' => '', - 'default' => '8125', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_HOST', - 'description' => 'SMTP server host name address. Default value is: \'smtp\'. Pass an empty string to disable all mail sending from the server.', - 'introduction' => '', - 'default' => 'smtp', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_PORT', - 'description' => 'SMTP server TCP port. Default value is: \'25\'.', - 'introduction' => '', - 'default' => '25', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_SECURE', - 'description' => 'SMTP secure connection protocol. Empty by default, change to \'tls\' if running on a secure connection.', - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_USERNAME', - 'description' => 'SMTP server user name. Empty by default.', - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_SMTP_PASSWORD', - 'description' => 'SMTP server user password. Empty by default.', - 'introduction' => '', - 'default' => '', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_LIMIT', - 'description' => 'Maximun file size allowed for file upload. The default value is 10MB limitation. You should pass your size limit value in bytes.', - 'introduction' => '0.7.0', - 'default' => '10000000', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS', - 'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'enabled\' by default, to cancel the scans set the value to \'disabled\'. When disabled, it\'s recommended to turn off the ClamAV container for better resource usage.', - 'introduction' => '', - 'default' => 'enabled', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS_HOST', - 'description' => 'ClamAV server host name address. Default value is: \'clamav\'.', - 'introduction' => '0.7.0', - 'default' => 'clamav', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_STORAGE_ANTIVIRUS_PORT', - 'description' => 'ClamAV server TCP port. Default value is: \'3310\'.', - 'introduction' => '0.7.0', - 'default' => '3310', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_TIMEOUT', - 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds.', - 'introduction' => '0.7.0', - 'default' => '900', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_CONTAINERS', - 'description' => 'The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10.', - 'introduction' => '0.7.0', - 'default' => '10', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_CPUS', - 'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is 1.', - 'introduction' => '0.7.0', - 'default' => '1', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_MEMORY', - 'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is 128.', - 'introduction' => '0.7.0', - 'default' => '128', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', - 'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.', - 'introduction' => '0.7.0', - 'default' => '128', - 'required' => false, - 'question' => '', - ], - [ - 'name' => '_APP_MAINTENANCE_INTERVAL', - 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', - 'introduction' => '0.7.0', - 'default' => '86400', - 'required' => false, - 'question' => '', + 'category' => 'Functions', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_FUNCTIONS_TIMEOUT', + 'description' => 'The maximum number of seconds allowed as a timeout value when creating a new function. The default value is 900 seconds.', + 'introduction' => '0.7.0', + 'default' => '900', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_CONTAINERS', + 'description' => 'The maximum number of containers Appwrite is allowed to keep alive in the background for function environments. Running containers allow faster execution time as there is no need to recreate each container every time a function gets executed. The default value is 10.', + 'introduction' => '0.7.0', + 'default' => '10', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_CPUS', + 'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is 1.', + 'introduction' => '0.7.0', + 'default' => '1', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_MEMORY', + 'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', + 'default' => '128', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', + 'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.', + 'introduction' => '0.7.0', + 'default' => '128', + 'required' => false, + 'question' => '', + ], + [ + 'name' => '_APP_MAINTENANCE_INTERVAL', + 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', + 'default' => '86400', + 'required' => false, + 'question' => '', + ], + ], ], ]; \ No newline at end of file diff --git a/app/tasks/install.php b/app/tasks/install.php index b28391d6d4..8ca090c772 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -30,10 +30,17 @@ $cli * 5. Run docker-compose up -d - DONE * 6. Run data migration */ - $vars = Config::getParam('variables'); + $config = Config::getParam('variables'); $path = '/usr/src/code/appwrite'; $defaultHTTPPort = '80'; $defaultHTTPSPort = '443'; + $vars = []; + + foreach($config as $category) { + foreach($category['variables'] ?? [] as $var) { + $vars[] = $var; + } + } Console::success('Starting Appwrite installation...'); diff --git a/app/tasks/vars.php b/app/tasks/vars.php index ed4a329735..58b21a18ec 100644 --- a/app/tasks/vars.php +++ b/app/tasks/vars.php @@ -10,9 +10,17 @@ $cli ->task('vars') ->desc('List all the server environment variables') ->action(function () { - $variables = Config::getParam('variables', []); + $config = Config::getParam('variables', []); + $vars = []; - foreach ($variables as $key => $value) { + + foreach($config as $category) { + foreach($category['variables'] ?? [] as $var) { + $vars[] = $var; + } + } + + foreach ($vars as $key => $value) { Console::log('- '.$value['name'].'='.App::getEnv($value['name'], '')); } }); \ No newline at end of file From 939a30a4be2b5e8d9b62599a3d2ef6069a57d08d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 22:53:00 +0200 Subject: [PATCH 71/90] Spacing --- app/tasks/vars.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/tasks/vars.php b/app/tasks/vars.php index 58b21a18ec..6c02348222 100644 --- a/app/tasks/vars.php +++ b/app/tasks/vars.php @@ -13,7 +13,6 @@ $cli $config = Config::getParam('variables', []); $vars = []; - foreach($config as $category) { foreach($category['variables'] ?? [] as $var) { $vars[] = $var; From afc43feb7fc527b69d3f2cb069a016ea30ad8955 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 7 Jan 2021 23:48:32 +0200 Subject: [PATCH 72/90] Updated docs --- app/config/variables.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 59de920221..78e684c313 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -97,7 +97,7 @@ return [ ], [ 'category' => 'Redis', - 'description' => '', + 'description' => 'Appwrite uses a Redis server for managing cache, queues and scheduled tasks. The Redis env vars are used to allow Appwrite server to connect to the Redis container.', 'variables' => [ [ 'name' => '_APP_REDIS_HOST', @@ -119,7 +119,7 @@ return [ ], [ 'category' => 'MariaDB', - 'description' => '', + 'description' => 'Appwrite is using a MariaDB server for managing persistent database data. The MariaDB env vars are used to allow Appwrite server to connect to the MariaDB container.', 'variables' => [ [ 'name' => '_APP_DB_HOST', @@ -165,7 +165,7 @@ return [ ], [ 'category' => 'InfluxDB', - 'description' => '', + 'description' => 'Appwrite uses an InfluxDB server for managing time-series data and server stats. The InfluxDB env vars are used to allow Appwrite server to connect to the InfluxDB container.', 'variables' => [ [ 'name' => '_APP_INFLUXDB_HOST', @@ -187,7 +187,7 @@ return [ ], [ 'category' => 'StatsD', - 'description' => '', + 'description' => 'Appwrite uses a StatsD server for aggregating and sending stats data over a fast UDP connection. The StatsD env vars are used to allow Appwrite server to connect to the StatsD container.', 'variables' => [ [ 'name' => '_APP_STATSD_HOST', @@ -209,7 +209,7 @@ return [ ], [ 'category' => 'SMTP', - 'description' => '', + 'description' => "Appwrite is using an SMTP server for emailing your projects users and server admins. The SMTP env vars are used to allow Appwrite server to connect to the SMTP container.\n\nIf running in production, it might be easier to use a 3rd party SMTP server as it might be a little more difficult to set up a production SMTP server that will not send all your emails into your user's SPAM folder.", 'variables' => [ [ 'name' => '_APP_SMTP_HOST', From 47ba914d92dfa9160509bc2eb0b153d536ca7d8b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 8 Jan 2021 00:33:44 +0200 Subject: [PATCH 73/90] Updated docs --- app/config/variables.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 78e684c313..d7c180ea11 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -335,13 +335,19 @@ return [ 'required' => false, 'question' => '', ], - [ - 'name' => '_APP_MAINTENANCE_INTERVAL', - 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', - 'introduction' => '0.7.0', - 'default' => '86400', - 'required' => false, - 'question' => '', + ], + [ + 'category' => 'Maintenance', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_MAINTENANCE_INTERVAL', + 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', + 'default' => '86400', + 'required' => false, + 'question' => '', + ], ], ], ], From 43d6a88b18718c29d19023d4378bdc9eb91733cc Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 8 Jan 2021 17:00:30 +0200 Subject: [PATCH 74/90] Updated SDK warning --- app/tasks/sdks.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index c742acc227..354620308a 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -39,7 +39,6 @@ $cli $git = (Console::confirm('Should we use git push? (yes/no)') == 'yes'); $production = ($git) ? (Console::confirm('Type "Appwrite" to push code to production git repos') == 'Appwrite') : false; $message = ($git) ? Console::confirm('Please enter your commit message:') : ''; - $warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**'; if(!in_array($version, ['0.6.2', '0.7.0'])) { throw new Exception('Unknown version given'); @@ -69,9 +68,9 @@ $cli $examples = ($examples) ? \file_get_contents($examples) : ''; $changelog = \realpath(__DIR__ . '/../../docs/sdks/'.$language['key'].'/CHANGELOG.md'); $changelog = ($changelog) ? \file_get_contents($changelog) : '# Change Log'; - $warning = ($language['beta']) ? '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check previous releases.**' : ''; + $warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check [previous releases]('.$language['url'].'/releases).**'; $license = 'BSD-3-Clause'; - $licenseContent = 'Copyright (c) 2019 Appwrite (https://appwrite.io) and individual contributors. + $licenseContent = 'Copyright (c) ' . date('Y') . ' Appwrite (https://appwrite.io) and individual contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From b070db78df1cc43f82014a26cf3435119679900f Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 8 Jan 2021 17:00:37 +0200 Subject: [PATCH 75/90] Updated deno docs --- docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md | 1 + .../0.6.2/server-deno/examples/avatars/get-credit-card.md | 1 + docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md | 1 + docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md | 1 + docs/examples/0.6.2/server-deno/examples/avatars/get-image.md | 1 + docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md | 1 + docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md | 1 + .../0.6.2/server-deno/examples/database/create-collection.md | 1 + .../0.6.2/server-deno/examples/database/create-document.md | 1 + .../0.6.2/server-deno/examples/database/delete-collection.md | 1 + .../0.6.2/server-deno/examples/database/delete-document.md | 1 + .../0.6.2/server-deno/examples/database/get-collection.md | 1 + .../examples/0.6.2/server-deno/examples/database/get-document.md | 1 + .../0.6.2/server-deno/examples/database/list-collections.md | 1 + .../0.6.2/server-deno/examples/database/list-documents.md | 1 + .../0.6.2/server-deno/examples/database/update-collection.md | 1 + .../0.6.2/server-deno/examples/database/update-document.md | 1 + .../examples/0.6.2/server-deno/examples/health/get-anti-virus.md | 1 + docs/examples/0.6.2/server-deno/examples/health/get-cache.md | 1 + docs/examples/0.6.2/server-deno/examples/health/get-d-b.md | 1 + .../0.6.2/server-deno/examples/health/get-queue-certificates.md | 1 + .../0.6.2/server-deno/examples/health/get-queue-functions.md | 1 + .../examples/0.6.2/server-deno/examples/health/get-queue-logs.md | 1 + .../0.6.2/server-deno/examples/health/get-queue-tasks.md | 1 + .../0.6.2/server-deno/examples/health/get-queue-usage.md | 1 + .../0.6.2/server-deno/examples/health/get-queue-webhooks.md | 1 + .../0.6.2/server-deno/examples/health/get-storage-local.md | 1 + docs/examples/0.6.2/server-deno/examples/health/get-time.md | 1 + docs/examples/0.6.2/server-deno/examples/health/get.md | 1 + .../examples/0.6.2/server-deno/examples/locale/get-continents.md | 1 + .../0.6.2/server-deno/examples/locale/get-countries-e-u.md | 1 + .../0.6.2/server-deno/examples/locale/get-countries-phones.md | 1 + docs/examples/0.6.2/server-deno/examples/locale/get-countries.md | 1 + .../examples/0.6.2/server-deno/examples/locale/get-currencies.md | 1 + docs/examples/0.6.2/server-deno/examples/locale/get-languages.md | 1 + docs/examples/0.6.2/server-deno/examples/locale/get.md | 1 + docs/examples/0.6.2/server-deno/examples/storage/create-file.md | 1 + docs/examples/0.6.2/server-deno/examples/storage/delete-file.md | 1 + .../0.6.2/server-deno/examples/storage/get-file-download.md | 1 + .../0.6.2/server-deno/examples/storage/get-file-preview.md | 1 + .../examples/0.6.2/server-deno/examples/storage/get-file-view.md | 1 + docs/examples/0.6.2/server-deno/examples/storage/get-file.md | 1 + docs/examples/0.6.2/server-deno/examples/storage/list-files.md | 1 + docs/examples/0.6.2/server-deno/examples/storage/update-file.md | 1 + .../0.6.2/server-deno/examples/teams/create-membership.md | 1 + docs/examples/0.6.2/server-deno/examples/teams/create.md | 1 + .../0.6.2/server-deno/examples/teams/delete-membership.md | 1 + docs/examples/0.6.2/server-deno/examples/teams/delete.md | 1 + .../examples/0.6.2/server-deno/examples/teams/get-memberships.md | 1 + docs/examples/0.6.2/server-deno/examples/teams/get.md | 1 + docs/examples/0.6.2/server-deno/examples/teams/list.md | 1 + docs/examples/0.6.2/server-deno/examples/teams/update.md | 1 + docs/examples/0.6.2/server-deno/examples/users/create.md | 1 + docs/examples/0.6.2/server-deno/examples/users/delete-session.md | 1 + .../examples/0.6.2/server-deno/examples/users/delete-sessions.md | 1 + docs/examples/0.6.2/server-deno/examples/users/get-logs.md | 1 + docs/examples/0.6.2/server-deno/examples/users/get-prefs.md | 1 + docs/examples/0.6.2/server-deno/examples/users/get-sessions.md | 1 + docs/examples/0.6.2/server-deno/examples/users/get.md | 1 + docs/examples/0.6.2/server-deno/examples/users/list.md | 1 + docs/examples/0.6.2/server-deno/examples/users/update-prefs.md | 1 + docs/examples/0.6.2/server-deno/examples/users/update-status.md | 1 + 62 files changed, 62 insertions(+) diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md index 27c0336054..3eb6ff845d 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-browser.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md index 998356a106..0a75b1665d 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-credit-card.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md index 43afe096c4..e132db2f5f 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-favicon.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md index 6b28e5db2f..7455538cec 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-flag.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md index 0a2693c768..e1d6f7d5f5 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-image.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md index af35445bb3..36e9b8fa94 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-initials.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md b/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md index 6d8446b105..23d6a60d90 100644 --- a/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md +++ b/docs/examples/0.6.2/server-deno/examples/avatars/get-q-r.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let avatars = new sdk.Avatars(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/create-collection.md b/docs/examples/0.6.2/server-deno/examples/database/create-collection.md index 316ae6b222..776830943b 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/create-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/create-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/create-document.md b/docs/examples/0.6.2/server-deno/examples/database/create-document.md index ef78a839a4..7a60b55403 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/create-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/create-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md b/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md index e9b5d6392b..d62c8d0974 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/delete-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/delete-document.md b/docs/examples/0.6.2/server-deno/examples/database/delete-document.md index b7d3f52c71..558a4bbe67 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/delete-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/delete-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/get-collection.md b/docs/examples/0.6.2/server-deno/examples/database/get-collection.md index 323bc7ec74..0ca917a3c3 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/get-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/get-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/get-document.md b/docs/examples/0.6.2/server-deno/examples/database/get-document.md index 7a0332251a..59ec5e4141 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/get-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/get-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/list-collections.md b/docs/examples/0.6.2/server-deno/examples/database/list-collections.md index 292e46f860..0bb6bf1679 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/list-collections.md +++ b/docs/examples/0.6.2/server-deno/examples/database/list-collections.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/list-documents.md b/docs/examples/0.6.2/server-deno/examples/database/list-documents.md index bb22a3956a..ead202aaa9 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/list-documents.md +++ b/docs/examples/0.6.2/server-deno/examples/database/list-documents.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/update-collection.md b/docs/examples/0.6.2/server-deno/examples/database/update-collection.md index 8239e45f28..31e34acf13 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/update-collection.md +++ b/docs/examples/0.6.2/server-deno/examples/database/update-collection.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/database/update-document.md b/docs/examples/0.6.2/server-deno/examples/database/update-document.md index cd079c8f2d..e6ffd49f00 100644 --- a/docs/examples/0.6.2/server-deno/examples/database/update-document.md +++ b/docs/examples/0.6.2/server-deno/examples/database/update-document.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let database = new sdk.Database(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md b/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md index e06fbf86de..ecfc1fa2fa 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-anti-virus.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-cache.md b/docs/examples/0.6.2/server-deno/examples/health/get-cache.md index b58ca1bc15..f3e17bda8e 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-cache.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-cache.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md b/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md index 946cfb03a8..f6ba94a496 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-d-b.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md index a86358bb22..9d2e325630 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-certificates.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md index 033248b118..c31869c55f 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-functions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md index d4c3300a35..bb40c7a559 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-logs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md index 01e3094ffc..45f69a8ab2 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-tasks.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md index d0d8faf7b6..0a0a001ceb 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-usage.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md index 268c521373..ddd2735f49 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-queue-webhooks.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md b/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md index 77bb658f9a..76df5561d7 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-storage-local.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get-time.md b/docs/examples/0.6.2/server-deno/examples/health/get-time.md index 0e5205b075..17de3193cf 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get-time.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get-time.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/health/get.md b/docs/examples/0.6.2/server-deno/examples/health/get.md index c2e6ecdf65..ac94e75627 100644 --- a/docs/examples/0.6.2/server-deno/examples/health/get.md +++ b/docs/examples/0.6.2/server-deno/examples/health/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let health = new sdk.Health(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md b/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md index 18221d44b4..44c18b54f4 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-continents.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md index 4a3e49f755..f14e4353ff 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-e-u.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md index 61a1790806..b23eff3dac 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries-phones.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md b/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md index 20f544e617..2f3facd7e8 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-countries.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md b/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md index 13b975291d..34d4e233ee 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-currencies.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md b/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md index 95c5c6b355..3fd5d8b8c2 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get-languages.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/locale/get.md b/docs/examples/0.6.2/server-deno/examples/locale/get.md index 2336c3289d..30ca9a22c7 100644 --- a/docs/examples/0.6.2/server-deno/examples/locale/get.md +++ b/docs/examples/0.6.2/server-deno/examples/locale/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let locale = new sdk.Locale(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/create-file.md b/docs/examples/0.6.2/server-deno/examples/storage/create-file.md index 5b446e1a38..ebbc065fef 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/create-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/create-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md b/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md index 6469308c74..2826b4cecb 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/delete-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md index 4510257bad..0df365854d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-download.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md index 282fb30324..886b2d566d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-preview.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md index 8af5391017..ce6e6b4eff 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file-view.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/get-file.md b/docs/examples/0.6.2/server-deno/examples/storage/get-file.md index 393ce229cb..109dac8c5d 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/get-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/get-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/list-files.md b/docs/examples/0.6.2/server-deno/examples/storage/list-files.md index 0e57cd01de..5d34518e5a 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/list-files.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/list-files.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/storage/update-file.md b/docs/examples/0.6.2/server-deno/examples/storage/update-file.md index 33b2263540..78ee82d38f 100644 --- a/docs/examples/0.6.2/server-deno/examples/storage/update-file.md +++ b/docs/examples/0.6.2/server-deno/examples/storage/update-file.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let storage = new sdk.Storage(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md b/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md index b277899c91..b85e811d65 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/create-membership.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/create.md b/docs/examples/0.6.2/server-deno/examples/teams/create.md index 1ef3e01b81..055cd9fe9f 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/create.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/create.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md b/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md index 911fa30075..f49841a4ad 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/delete-membership.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/delete.md b/docs/examples/0.6.2/server-deno/examples/teams/delete.md index 61ac03483f..4b1e0bddfc 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/delete.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/delete.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md b/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md index b652f8e4e5..467101c956 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/get-memberships.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/get.md b/docs/examples/0.6.2/server-deno/examples/teams/get.md index 69496e3eef..435391a63a 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/get.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/list.md b/docs/examples/0.6.2/server-deno/examples/teams/list.md index 70851dda51..6d00f6df54 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/list.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/list.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/teams/update.md b/docs/examples/0.6.2/server-deno/examples/teams/update.md index 7b815b4050..9d73002f5c 100644 --- a/docs/examples/0.6.2/server-deno/examples/teams/update.md +++ b/docs/examples/0.6.2/server-deno/examples/teams/update.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let teams = new sdk.Teams(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/create.md b/docs/examples/0.6.2/server-deno/examples/users/create.md index 593eee6e9f..9b5f914631 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/create.md +++ b/docs/examples/0.6.2/server-deno/examples/users/create.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/delete-session.md b/docs/examples/0.6.2/server-deno/examples/users/delete-session.md index e4940773e4..e04024e5a2 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/delete-session.md +++ b/docs/examples/0.6.2/server-deno/examples/users/delete-session.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md b/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md index e772c00a5f..89dec44e39 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md +++ b/docs/examples/0.6.2/server-deno/examples/users/delete-sessions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-logs.md b/docs/examples/0.6.2/server-deno/examples/users/get-logs.md index 58cc4fc529..5770e84525 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-logs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-logs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md b/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md index 4cda0bb73e..033c56f3db 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-prefs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md b/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md index 6686e21564..15f0b53c5c 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get-sessions.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/get.md b/docs/examples/0.6.2/server-deno/examples/users/get.md index dce73d62c5..acee263e2f 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/get.md +++ b/docs/examples/0.6.2/server-deno/examples/users/get.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/list.md b/docs/examples/0.6.2/server-deno/examples/users/list.md index b089c3e7e9..c986039946 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/list.md +++ b/docs/examples/0.6.2/server-deno/examples/users/list.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md b/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md index b06185ee91..4e88ed567a 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md +++ b/docs/examples/0.6.2/server-deno/examples/users/update-prefs.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; diff --git a/docs/examples/0.6.2/server-deno/examples/users/update-status.md b/docs/examples/0.6.2/server-deno/examples/users/update-status.md index a0f028bde5..dd3a309dc7 100644 --- a/docs/examples/0.6.2/server-deno/examples/users/update-status.md +++ b/docs/examples/0.6.2/server-deno/examples/users/update-status.md @@ -6,6 +6,7 @@ let client = new sdk.Client(); let users = new sdk.Users(client); client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; From cb13cbe389ddb33413836d036cb14240c259c26c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 9 Jan 2021 08:04:39 +0200 Subject: [PATCH 76/90] Updated .NET version, added dev flag --- app/config/platforms.php | 18 ++++++++- composer.json | 2 +- composer.lock | 80 ++++++++++++++++++++-------------------- 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index ffc51b89ed..36ce0bb226 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -20,6 +20,7 @@ return [ 'package' => 'https://www.npmjs.com/package/appwrite', 'enabled' => true, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'javascript', 'source' => \realpath(__DIR__ . '/../sdks/client-web'), @@ -35,6 +36,7 @@ return [ 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'dart', 'source' => \realpath(__DIR__ . '/../sdks/client-flutter'), @@ -49,6 +51,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'swift', 'source' => false, @@ -63,6 +66,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => '', 'source' => false, @@ -77,6 +81,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_CLIENT, 'prism' => 'kotlin', 'source' => false, @@ -91,6 +96,7 @@ return [ // 'enabled' => false, // 'dev' => false, // 'beta' => false, + // 'dev' => false, // 'family' => APP_PLATFORM_CLIENT, // 'prism' => 'java', // 'source' => false, @@ -115,6 +121,7 @@ return [ 'package' => '', 'enabled' => true, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_CONSOLE, 'prism' => 'console', 'source' => \realpath(__DIR__ . '/../sdks/console-web'), @@ -140,6 +147,7 @@ return [ 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'javascript', 'source' => \realpath(__DIR__ . '/../sdks/server-nodejs'), @@ -155,6 +163,7 @@ return [ 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'typescript', 'source' => \realpath(__DIR__ . '/../sdks/server-deno'), @@ -170,6 +179,7 @@ return [ 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, 'beta' => false, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'php', 'source' => \realpath(__DIR__ . '/../sdks/server-php'), @@ -185,6 +195,7 @@ return [ 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'python', 'source' => \realpath(__DIR__ . '/../sdks/server-python'), @@ -200,6 +211,7 @@ return [ 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'ruby', 'source' => \realpath(__DIR__ . '/../sdks/server-ruby'), @@ -215,6 +227,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'go', 'source' => \realpath(__DIR__ . '/../sdks/server-go'), @@ -230,6 +243,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'java', 'source' => \realpath(__DIR__ . '/../sdks/server-java'), @@ -240,11 +254,12 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.0.1', + 'version' => '0.0.2', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, 'beta' => true, + 'dev' => true, 'family' => APP_PLATFORM_SERVER, 'prism' => 'csharp', 'source' => \realpath(__DIR__ . '/../sdks/server-dotnet'), @@ -260,6 +275,7 @@ return [ 'package' => '', 'enabled' => false, 'beta' => true, + 'dev' => false, 'family' => APP_PLATFORM_SERVER, 'prism' => 'java', 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), diff --git a/composer.json b/composer.json index ee1e90a876..043007c735 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.4.2", + "appwrite/sdk-generator": "0.4.3", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 9b68ad5f56..09483dbca6 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": "0df79d7789fec84aa4500edad823f1f6", + "content-hash": "6594e4d32da0196d0bb2e5a1794ea89d", "packages": [ { "name": "appwrite/php-clamav", @@ -1862,11 +1862,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.4.2", + "version": "0.4.3", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "5482f4cdb65ab90ffea752ba9a625187cd7c7784" + "reference": "630776cfe49412e72a70a3a69729054bf8302e1f" }, "require": { "ext-curl": "*", @@ -1896,7 +1896,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-07T14:03:54+00:00" + "time": "2021-01-08T11:55:04+00:00" }, { "name": "composer/package-versions-deprecated", @@ -4615,12 +4615,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7c0a3c5420fd802637c4260e595d6c674b23d578", - "reference": "7c0a3c5420fd802637c4260e595d6c674b23d578", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -4633,7 +4633,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4671,7 +4671,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/main" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" }, "funding": [ { @@ -4687,7 +4687,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -4695,12 +4695,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32b651134d58efe1786c95352d846913a42d8331" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32b651134d58efe1786c95352d846913a42d8331", - "reference": "32b651134d58efe1786c95352d846913a42d8331", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { @@ -4713,7 +4713,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4753,7 +4753,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/main" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.0" }, "funding": [ { @@ -4769,7 +4769,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -4777,12 +4777,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8592bf62da8352927fc3857484e84baacddec301" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8592bf62da8352927fc3857484e84baacddec301", - "reference": "8592bf62da8352927fc3857484e84baacddec301", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { @@ -4795,7 +4795,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4838,7 +4838,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/main" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0" }, "funding": [ { @@ -4854,7 +4854,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4862,12 +4862,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/ec0101071dcbc6bdd5046da11df686f8515fa815", - "reference": "ec0101071dcbc6bdd5046da11df686f8515fa815", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { @@ -4880,7 +4880,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4919,7 +4919,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/main" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" }, "funding": [ { @@ -4935,7 +4935,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", @@ -4943,12 +4943,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "6d0e293e2b13580b866090a135900aea4adcb308" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/6d0e293e2b13580b866090a135900aea4adcb308", - "reference": "6d0e293e2b13580b866090a135900aea4adcb308", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -4958,7 +4958,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4999,7 +4999,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/main" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0" }, "funding": [ { @@ -5015,7 +5015,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", @@ -5023,12 +5023,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", - "reference": "69e5da91ad9c080f6ac1e010ddffefe71b14bd6e", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { @@ -5038,7 +5038,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5083,7 +5083,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/main" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0" }, "funding": [ { @@ -5099,7 +5099,7 @@ "type": "tidelift" } ], - "time": "2021-01-06T10:19:43+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/service-contracts", From 8394f917ff4146a9ac9cbd055146220e86be7401 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 9 Jan 2021 08:17:11 +0200 Subject: [PATCH 77/90] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea3ee938b9..d2906f8656 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you * [**Teams**](https://appwrite.io/docs/client/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team. * [**Database**](https://appwrite.io/docs/client/database) - Manage database collections and documents. Read, create, update, and delete documents and filter lists of documents collections using an advanced filter with graph-like capabilities. * [**Storage**](https://appwrite.io/docs/client/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way. -* [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in an isolate environment, you can trigger your code on any Appwrite system event, manually or using a CRON schedule. +* [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event, manually or using a CRON schedule. * [**Locale**](https://appwrite.io/docs/client/locale) - Track your user's location, and manage your app locale-based data. * [**Avatars**](https://appwrite.io/docs/client/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes. From 4a3fd105b54b4fc9b6573b8235989568ab085f5c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 9 Jan 2021 08:25:37 +0200 Subject: [PATCH 78/90] Added dev attribute --- app/config/platforms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/config/platforms.php b/app/config/platforms.php index cfea0d6dcc..fc0fc0234e 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -258,6 +258,7 @@ return [ 'package' => '', 'enabled' => true, 'beta' => true, + 'dev' => true, 'family' => APP_PLATFORM_SERVER, 'prism' => 'dart', 'source' => \realpath(__DIR__ . '/../sdks/server-dart'), From 9c9ca6cc513b982092cad05321d3d0e852df5d3d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 9 Jan 2021 12:29:55 +0530 Subject: [PATCH 79/90] feat: fixed issues in tests --- src/Appwrite/Utopia/Response/Filters/V06.php | 14 ++++++------- tests/unit/Utopia/Filters/V06Test.php | 22 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index d6bd85ac8f..71080d1ddd 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -193,13 +193,13 @@ class V06 extends Filter { private function parseLocale(array $content) { - $content['ip'] = empty($content['ip']) ?? ''; - $content['countryCode'] = empty($content['countryCode']) ?? '--'; - $content['country'] = empty($content['country']) ?? Locale::getText('locale.country.unknown'); - $content['continent'] = empty($content['continent']) ?? Locale::getText('locale.country.unknown'); - $content['continentCode'] = empty($content['continentCode']) ?? '--'; - $content['eu'] = empty($content['eu']) ?? false; - $content['currency'] = empty($content['currency']) ?? null; + $content['ip'] = $content['ip'] ?? ''; + $content['countryCode'] = $content['countryCode'] ?? '--'; + $content['country'] = $content['country'] ?? Locale::getText('locale.country.unknown'); + $content['continent'] = $content['continent'] ?? Locale::getText('locale.country.unknown'); + $content['continentCode'] = $content['continentCode'] ?? '--'; + $content['eu'] = $content['eu'] ?? false; + $content['currency'] = $content['currency'] ?? null; return $content; } diff --git a/tests/unit/Utopia/Filters/V06Test.php b/tests/unit/Utopia/Filters/V06Test.php index 5f680fc547..59c688ea0d 100644 --- a/tests/unit/Utopia/Filters/V06Test.php +++ b/tests/unit/Utopia/Filters/V06Test.php @@ -234,19 +234,19 @@ class V06Test extends TestCase $this->assertEquals($parsedResponse['logs'][0]['model'], 'Nexus 5'); $this->assertEquals($parsedResponse['logs'][0]['time'], 1592981250); - $this->assertEquals($parsedResponse['sessions'][0]['OS']['name'], 'Mac'); - $this->assertEquals($parsedResponse['sessions'][0]['OS']['platform'], ''); - $this->assertEquals($parsedResponse['sessions'][0]['OS']['short_name'], 'Mac'); - $this->assertEquals($parsedResponse['sessions'][0]['OS']['version'], 'Mac'); + $this->assertEquals($parsedResponse['logs'][0]['OS']['name'], 'Mac'); + $this->assertEquals($parsedResponse['logs'][0]['OS']['platform'], ''); + $this->assertEquals($parsedResponse['logs'][0]['OS']['short_name'], 'Mac'); + $this->assertEquals($parsedResponse['logs'][0]['OS']['version'], 'Mac'); - $this->assertEquals($parsedResponse['sessions'][0]['client']['engine'], 'WebKit'); - $this->assertEquals($parsedResponse['sessions'][0]['client']['name'], 'Chrome Mobile iOS'); - $this->assertEquals($parsedResponse['sessions'][0]['client']['short_name'], 'CM'); - $this->assertEquals($parsedResponse['sessions'][0]['client']['type'], 'browser'); - $this->assertEquals($parsedResponse['sessions'][0]['client']['version'], '84.0'); + $this->assertEquals($parsedResponse['logs'][0]['client']['engine'], 'WebKit'); + $this->assertEquals($parsedResponse['logs'][0]['client']['name'], 'Chrome Mobile iOS'); + $this->assertEquals($parsedResponse['logs'][0]['client']['short_name'], 'CM'); + $this->assertEquals($parsedResponse['logs'][0]['client']['type'], 'browser'); + $this->assertEquals($parsedResponse['logs'][0]['client']['version'], '84.0'); - $this->assertEquals($parsedResponse['sessions'][0]['geo']['isoCode'], 'US'); - $this->assertEquals($parsedResponse['sessions'][0]['geo']['country'], 'United States'); + $this->assertEquals($parsedResponse['logs'][0]['geo']['isoCode'], 'US'); + $this->assertEquals($parsedResponse['logs'][0]['geo']['country'], 'United States'); } public function testParseTeam() From 9c421e2dfc64cc7c929f26e5a9193735e1b1c9c6 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 00:29:49 +0200 Subject: [PATCH 80/90] Minor fixes for composer warnings about autoloading --- app/controllers/general.php | 3 +-- src/Appwrite/Utopia/Response.php | 1 - src/Appwrite/Utopia/Response/Filters/V06.php | 2 +- tests/unit/Utopia/Filters/V06Test.php | 2 +- tests/unit/Utopia/ResponseTest.php | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 55f196e266..5d29e0d43c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -16,8 +16,7 @@ use Appwrite\Database\Validator\Authorization; use Appwrite\Network\Validator\Origin; use Appwrite\Storage\Device\Local; use Appwrite\Storage\Storage; -use Appwrite\Utopia\Response\Filter; -use Appwrite\Utopia\Response\Filter\V06; +use Appwrite\Utopia\Response\Filters\V06; use Utopia\CLI\Console; Config::setParam('domainVerification', false); diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index ce22df225e..fc168d122c 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -7,7 +7,6 @@ use Utopia\Swoole\Response as SwooleResponse; use Swoole\Http\Response as SwooleHTTPResponse; use Appwrite\Database\Document; use Appwrite\Utopia\Response\Filter; -use Appwrite\Utopia\Response\Filter\V06; use Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response\Model\None; use Appwrite\Utopia\Response\Model\Any; diff --git a/src/Appwrite/Utopia/Response/Filters/V06.php b/src/Appwrite/Utopia/Response/Filters/V06.php index 71080d1ddd..e3c532ea80 100644 --- a/src/Appwrite/Utopia/Response/Filters/V06.php +++ b/src/Appwrite/Utopia/Response/Filters/V06.php @@ -1,6 +1,6 @@ Date: Sun, 10 Jan 2021 02:07:34 +0200 Subject: [PATCH 81/90] Upgrade QR package version --- composer.json | 2 +- composer.lock | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 043007c735..6db03b544e 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "domnikl/statsd": "3.0.2", "influxdb/influxdb-php": "1.15.1", "phpmailer/phpmailer": "6.1.7", - "chillerlan/php-qrcode": "4.2.0" + "chillerlan/php-qrcode": "4.3.0" }, "require-dev": { "swoole/ide-helper": "4.5.5", diff --git a/composer.lock b/composer.lock index 09483dbca6..d9c5fb0f95 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": "6594e4d32da0196d0bb2e5a1794ea89d", + "content-hash": "249dc088c5f9f74a1c0e91661f93f96b", "packages": [ { "name": "appwrite/php-clamav", @@ -57,16 +57,16 @@ }, { "name": "chillerlan/php-qrcode", - "version": "4.2.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/chillerlan/php-qrcode.git", - "reference": "1972af7af51b203bc239d8fb94243f6ed2a1067a" + "reference": "4968063fb3baeedb658293f89f9673fbf2499a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/1972af7af51b203bc239d8fb94243f6ed2a1067a", - "reference": "1972af7af51b203bc239d8fb94243f6ed2a1067a", + "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/4968063fb3baeedb658293f89f9673fbf2499a3e", + "reference": "4968063fb3baeedb658293f89f9673fbf2499a3e", "shasum": "" }, "require": { @@ -119,15 +119,19 @@ ], "support": { "issues": "https://github.com/chillerlan/php-qrcode/issues", - "source": "https://github.com/chillerlan/php-qrcode/tree/4.2.0" + "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.0" }, "funding": [ + { + "url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", + "type": "custom" + }, { "url": "https://ko-fi.com/codemasher", "type": "ko_fi" } ], - "time": "2020-10-07T14:41:07+00:00" + "time": "2020-11-18T20:49:20+00:00" }, { "name": "chillerlan/php-settings-container", From bdd04ce29263fbf1c2080aa2c54475d72a69ba89 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 02:07:58 +0200 Subject: [PATCH 82/90] Fixed margin value, add png compression --- app/controllers/api/avatars.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 1059c6e1c7..3a1088ec6a 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -383,8 +383,10 @@ App::get('/v1/avatars/qr') $download = ($download === '1' || $download === 'true' || $download === 1 || $download === true); $options = new QROptions([ - 'quietzone' => $size, - 'outputType' => QRCode::OUTPUT_IMAGICK + 'addQuietzone' => true, + 'quietzoneSize' => $margin, + 'outputType' => QRCode::OUTPUT_IMAGICK, + 'pngCompression' => 9, ]); $qrcode = new QRCode($options); From 71036ba85fb4f9e6524578ab6e3ad9c0492f179d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 02:17:44 +0200 Subject: [PATCH 83/90] Fixed resizing --- app/controllers/api/avatars.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 3a1088ec6a..fe2b53f71f 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -386,7 +386,6 @@ App::get('/v1/avatars/qr') 'addQuietzone' => true, 'quietzoneSize' => $margin, 'outputType' => QRCode::OUTPUT_IMAGICK, - 'pngCompression' => 9, ]); $qrcode = new QRCode($options); @@ -395,10 +394,14 @@ App::get('/v1/avatars/qr') $response->addHeader('Content-Disposition', 'attachment; filename="qr.png"'); } + $resize = new Resize($qrcode->render($text)); + + $resize->crop((int) $size, (int) $size); + $response ->addHeader('Expires', \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)).' GMT') // 45 days cache ->setContentType('image/png') - ->send($qrcode->render($text)) + ->send($resize->output('png', 9)) ; }); From 12015a75e03c48022f419bead6109d6e6488be7c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 07:53:58 +0200 Subject: [PATCH 84/90] Added more tests --- tests/e2e/Services/Avatars/AvatarsBase.php | 28 +++++++++++++++++++ tests/resources/qr/qr-default.png | Bin 0 -> 14593 bytes tests/resources/qr/qr-size-200-margin-10.png | Bin 0 -> 3750 bytes tests/resources/qr/qr-size-200.png | Bin 0 -> 6075 bytes 4 files changed, 28 insertions(+) create mode 100644 tests/resources/qr/qr-default.png create mode 100644 tests/resources/qr/qr-size-200-margin-10.png create mode 100644 tests/resources/qr/qr-size-200.png diff --git a/tests/e2e/Services/Avatars/AvatarsBase.php b/tests/e2e/Services/Avatars/AvatarsBase.php index e27be04e18..62722fbed3 100644 --- a/tests/e2e/Services/Avatars/AvatarsBase.php +++ b/tests/e2e/Services/Avatars/AvatarsBase.php @@ -336,6 +336,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(400, $image->getImageWidth()); + $this->assertEquals(400, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-default.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -347,6 +354,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -359,6 +373,13 @@ trait AvatarsBase $this->assertEquals('image/png', $response['headers']['content-type']); $this->assertNotEmpty($response['body']); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200-margin-10.png')), strlen($response['body'])); + $response = $this->client->call(Client::METHOD_GET, '/avatars/qr', [ 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -368,6 +389,13 @@ trait AvatarsBase 'download' => 1, ]); + $image = new \Imagick(); + $image->readImageBlob($response['body']); + $this->assertEquals(200, $image->getImageWidth()); + $this->assertEquals(200, $image->getImageHeight()); + $this->assertEquals('PNG', $image->getImageFormat()); + $this->assertEquals(strlen(\file_get_contents(__DIR__ . '/../../../resources/qr/qr-size-200-margin-10.png')), strlen($response['body'])); + $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals('attachment; filename="qr.png"', $response['headers']['content-disposition']); $this->assertEquals('image/png', $response['headers']['content-type']); diff --git a/tests/resources/qr/qr-default.png b/tests/resources/qr/qr-default.png new file mode 100644 index 0000000000000000000000000000000000000000..a7da496d9fd62ecb6b0afc8d1f2bfb154a660cbf GIT binary patch literal 14593 zcmZ{Lbx>T*x9vcX!NOp{WpD@%!QI_0xLa^{5AN;+cemgY+})kv?hcRd)_t#j_q+A} zICZMK*X}b@)wO%?z19wumlZ>T$AJd`07w$z!ioR@M9e=A@M8i{Fl!F_ctM#8$Or%c zHPHw!`p_R^B13US834eY902eQ1OT2srhE?o04D|j;7AVu;7kDkFl{qh6u3VYAPuC% zgaPlt(W9LoBUncX84=iB2zY2BgjM|c4`ViD31Ia7kWEfoc;c zC56G0m;>|7rt z1ReoOkj-ekI%}4IZmCR$(F`6oSrmC)&9ao95bSRCEDdh7qW4`Q zqg%pgoZRFuh!DBq*V!19f?b#GHqO;AD;tHe9bx33i2rT|pCkMJ-Bm;y^G?GrdQ*74 zEprmWVFVY(wm_0|1e(D{ca$OIQRLT8=DsWFKHDWa!ZF&yXwQ9WQL?%{Badm3(;It z8O$v*x>O%@a)|`SxIJx}BsCbCu}mPBH63Ojk`6qyi=Y(8aTAXSt>|`ZNuMIoQg`R5 zhSA2oD1K00769~sJ>Oh6@4?*=&8LHKP7m7WLhEAxI{SgKpuunH zXsGaIC&eI9!I<8q5!CWXZtIgw);DdnU&zv#bv^<9FRI%P>liOAl}aV0>ySNgAm--3 zzD7I!dwEn}*JA*TiE;{Lp@veCK@H!7e<@WomTdIbEu|Q%`Au3T{x~bN&eJi+nf%FvsZywarVpbbQ(27SO1dsOUCypxb6&47~UCOOG{os?U`r4OEN85FEW`9wj zMS-QYnmJF~Z$EbDeTr5Qx>GdAmwR<`ANRnbSXmCZLz}|c<0N=D+NKd2bRDpl7g$mk zO81zxaZr2r5;zeZfmht|_FBsXS-l=-mu}nO^Rwv7^6~7X#ssv!bMosfi?P_Dj7Ell zZq1zLjvEpS`hU%Toz4~7>Av*L)KLvxqIs>@`73B?Z^%3PW*R{|%~IuD~G zfYUlrmQ}@jWjKAqTmhQ7@T|~>YG9vh4l)?RCYC|g>_uMbhgl<7i{^`YJ%rQV8ksr> z22r|mT0j5*{7L>Aom8uF%1LxRSc^#36hZ>ID|ruaEn;!em7v$(3NKFS_i_5RC?~7_ zz%5U53Pc(4rggQSuPhU~Vu5yqSHYtH(*^$V;19_T@CQsSzymqQk)}6@2Zb47FoPM< zd*pz^yp4QOkvWD4f2{LK2ZcEvm$9NgZ?PGp;aFYf!Uy)2RCX{Y%7Kk405Kk2o^TNgg`n3|3y!GalTI` zkH)+_g06vE6v7)X3l^(kbjPensLZCv0viXV-;1dzE6 z*faCqr#aejvgCa2Ud&dDFCmN*XE6%IFM*q^hF>W9KJOc7S2g=caE{8|Iy=*O{z$u+ zJAleCVz^OIWbk{1*l8yrWpC|>82v@O{HfPNO#BzHZ#=r-UA__pq>$Eclbe2!l{kY0nUQ@4XVT6A#9+C z!0g{<^`Ex2)jsY?W+|VnfwjX=0`2tk4f0!v`=I{( zy^&^xDokJiLH1kAe4{yaA!W_>)e03VSG6 z@{GaCBDsUG*vuYiUPsrUMahTd928wU4G0*g$kMMbDYCtz%6(;Ve@Zg8+clA7>d@@r z6$=)x)-@P;nl}zDCI$JWBl9qz3?C0kq5~vo`18}T`iE= zl)NIwweoH~ZjsF0j&UAxhC}5%dJa5~#TXMCEAHB4tj)L&|p@M1vvd+``^Gmdf$k}|uV=%>Lke|s|a#a87Y zc@=$b|CBDJZ&yb{3wT=3cVJPSu4=5lYUtA}q)!1BRc&+mNiSDJC>T@p z-2s4A5eC8e=@mW95n+1?tLoBn;;&MGsVaUZ8!!5E%w`<>6C*nAABt@(h#moPJ#*RD z6K_a_0w8)05vd^ZzoI2iK|T2a;!iWlT!*|QTm@g05oC`P>A>K;RHlhA#d>F4b5C$m6D=3s|2k z|L&lr16Qc&Ru2C`xDbp*_n~#OMoeSp%dQP#^{*J)UpbR8>u`57()0kU7DU^`pE=3_ z!_?kZRF}I*o%dc=ebJDqUg7(8pkadX0dM%SX`kR`=0*V7<_v)_q& z#|#2opp!vPHhjf%vC$k@#^YWL&@E^M0Lg+@yqVIL=L5f`TRS~stxhlRzO(}9$*E57 z`cEyLtOBghTfb)L%~{wsWaUCAUf6$WJosZtLF&cFY-`NctTXx1&Y6}n$kHksz*|G; z#ZQ_c^X|7bWC3^jV~{>?QNS60d-WAZEF=>5`6{&qwB09;2&^7rkOLJN)wvRN9cZA6 zN^_G^ojd|bz&>XGiUQbyZc?KB13jVbUwLyrM}SxLZ3fz2=*In*GIGWXJ2L}wZ5-L9 zfQ+|I_N?lLNJf^q#4`J|jyXhA>EE%LFr0z@0 z+n)Ife}*%LM8Z5F`nr3KL`ma(Uwen`EB=D{t?mqR;zf2O4p= zyx9X(@O>r-U9|aP3kMyn{2xK~Kc3cg1Frkr3jxn{BmKH{1&cFH==X?wWn%cl5(=U| zecoqv5Tt>8AMnO9(i`4+HsxJuKK3vB?pE1py{!Ol)ni;eUTD;;_N6=M|{cA`Nh6CL$W!QoqtX>PhQp68+z zf(b<)Q|0I%{X~WlATUpoq0nmz!tBER{POGAc`wM+X4TfFqQ>Lg9LWuZohXRiYp4HL zU@xZ4*Z|En7pdrRa8<<)us6oUM(18Sq{Z20&bl08pvo)8@l;8%?foKUG3cdtx*}Y8 z;t=;<=NnJM8iZv(rnUASXnN^kPYe?lV?H7LvH)(OcI=g~ll!VrJ%9M?703CV_Lt!o zU2BEUrDIiRo%wjm$x2c?I#P;k9qpQ@9L0OxFXk?SlASO6CKJI)&ojLSx%U-~udnyJ z0x#}Cv2V7Xv2F}YilfWprO%cr)DEkozneSzBkN4v8(6CUXpD~2P0I+v;?52@F11!n zm7kYSuj`$q=E~Z6b>1JkR?5DkvfZh|*4q(`&n|{|n$E(}clgqa2vpyzzsEyLx$5;e zLHJvm`4c{}Huk@8UhYIL*}QH>es+Q4AWC(}{pq2FLL9oY?~#}9m%P$Do8pjpQmb~i z<@nRToPlq5E|lk{gx#O&rG9M+t(F9GRRPZ0;o%s_CsrJAjmjnG_VoPi=1pm^)j4I4 z-TS%22GPgmUq{ClO4CqhTn5dy{8MgrB25!1#Ul4FS$$qsih^waOofI)F$DDj1-lDJ zi6955o#IbwIp5d?5eZ*K)ia%7!BM0+g%nOZ9pCN>dWTG`5@C=zyz>4mN%E6rmNYNd z#^sktY3TNo=1gx=`SDvk=*vj@6_Wp;TNN6_Oa7@y?XqgcH^tA|t&H5q#3*Hf_oD{N z94q(8xT&(sLdjG%y7<;vtLgp>c-h$PUKiJ;eH|S^Z7DH+2OP92#}Os3xEMXZnpK$v zJxA#ngrPl5Wlj1>q6IGR2#s47NoNd)tOduX^sswspg(CE0F$m}91&aD?Ih};dz=^= zMguqd<$PkMS}sp}(J5}lS_hR3wBgWo6Ap14oxQF5S}4SUqK73^_w34A-dWg9Su!Yz zSxM|@Ql1u^WH)SwDWXSL=s$4nggfbT%UVV}Lu_|0$_k}k82yjlUG*75n`q`r8k4sPSN$bicP+q3?ck^kk3+AI(o}J7zmhUm& zQh1DFZ68K&p9NyIZdj4JKe3-?;*S#zYCW3CPOph>ptC(`^D>vjzXbs(%O>6@qN{G- zmQaYgT80^2`}g?Xh?X+*ewBAVMQ7`peSA8?()f({7Wq(FV89v31v2`1cG0_S9uQ~h z{?vJ1=_a)afS6Zy*J@gD7CH9CQ%DSdlse<<7i*wUo;NHn!TV!je@L&E@HRsUA+PBA zapBsnavhS`Yh6vwdV>_>m1YMZ*?FDY8x<_4@u4xYwq!$QvML=3Fh}$lHl5Qedj&F? zJMbg~A3-xphD5u!7P{EZFqYH+o3N&flYXJaBXN1+Sii(io_Fblf`|+cHC*M)6rbFv zg@-{njOELt3_!X|ip%&!s^yYkq<;l3AHx7bLE+6I$=P?_h@TOfaY3-Utxpo7!?0f~ zz-?qDjy{3>4AuOf9fg%HS*5W4bZefIu#f6SZm4oXR3Zb8Tg-98j2d9BMbv~)7~QUN zOv;ocokT`*a#i?QD{e7S86zweze@I6F+-DuDw#6!=&;fRu#yHExpkgc z&#o8@Vp39Z9ejM5MtnGeMauf0F89v#mL33RZBNchC)1(5<7Hz42v=|&vkx;>YF79* zN|ZF7SwgSvSh?~Z4;U0TO}A}s3!K9I(%`0xUsU znXk(jUO-3EUu=L+?eP~y&GSAp+bs}An7SS2z~w2M&hnFQX-umN(jRx7nse=?_CesL zXG|bvWI^ijeYpeJ2@aE(Y=d0OXlCTnL{)v4zoQ1N>cJC^WXcyt{oM&n5R+#A*|oxR z;EkFZ#x3YLihzG96mmv^_Cp+WIxF-~vFSfE4i_OHpU4PTiK2QJnNdhxs;BLanvr!^ zun_$V58x(|^hR6eyAWQux7astDZM5=b*mrF<*5c|3GMs)jsPmgrM_bU7IR2+2m5z3 zH-&NnmIEsiA5P^=<$WCTLZZ$aIZPQXqCc-)6{LwCQD^)GQdMx*wW>i!WtOT#LjEgZ5U`+v zt%}RZP(h(!Q%s@}0C!pMK{gGyp2~VwZO!`a3|oj4=2rHvNin1E{k3NlbI@mgRTK-O zX71)Knx{?dh7F*pUDyN=0!8rmHh*FEF6&k%B22mU;-G!D?N@!oN^4S}=VdDJ9Oqvi z#LxICu)I4)HzvD*ilbX~g4zmdL&ygEV>$tPbg1;u7piSTbeHZ5pDNn*vhN%=VxaX0UXokzh-N3Hs7 zA~P0Tt0Om5B`WCe+2ARhNMAwB0%ggXK1;AFuFU$)rZ^49`vM2oOi_pweb!m)TO4|J zTlq2xzJZ}hk7^f##NG=!kK;;J*4dH2mvk4YPm2t9q%m4ivgv`O^L*AxaZ=l7QuS7+ zfH<6Nj)_=lkSQH4sl0$SB;~&#!(QbU^ln>-Ke%@59ahfy>ys!_fz-G zK6g=&kmsIOhxziSrPY^#ZolIU>8LZWW~mlI?!wfTi~Xvi51@{(>= zd_w5P*WVuM4-OAtAPmUm)N0#53a&WL5|DEovpj;cYCw0l%#y<}XF*Ljxm}QPK;x)JC$;C;)n$WSA zLo3B^cjaGdtY5i4d*paz2%{&IkM=z7UzMri6Ipuvp**}$GRDG#IgIv|t$1QvXrlCu zf`F@fSr3kv$=*C`obKv}(CN#@mWjl|QbmkKcIrA|D zB~ynoS#@u(d@dIZHENR{9r#6r6jug}kaCS07*Z0HZG4_iHuXv=K)BCZJwDY_udExM#V?y%^-L-BVUC31Xkw zQGo(}>#jtxv7M8SS$9y~5jnzyTI~w{(%kt~(%F_K#Hp>P#xBUh`;5dSS>?GTPufPZ zp19+$pOa&v43CW*Q*w#c+EPZ3u_-BUoMjY{FY`~${`81K-Fh)&e?n(=V8th|d z+DwLULB9C~2#sGwNOviaSxdaj_`2_DuepfiL%j6&pZ=(GctufstE_xKCOH0;+gZV@ zlU$K2P2znS&NVYhuqVhp#(3SATxbS6*T2A5ejB9wVqp&!Yq+}@pud0qkqN?=U4PtG z?5Sq$3eVDyP!o+@3 zv9$_8{~^wiap5=f%Tc`jj`2Xc!f3}#@9DqQAa!#ju_SD3yb1}dre=T}StOz*IdK3H zYnCrAbk{knSak!Dn@%)5F}7<-FP%pYi4f9uW?TY@Bq1NIu*aLp>+>g4#!$W`<8yfw zwsGm~^#bT%a}KVEjo%bisN)Y+IUfkb1L>Ec`Oy0jw2o+Lihq-Xe{fTIdCr9*!1FKV z?j$BIEW`_RpED&`@lSKup!^xAc`SNv;w7*W#s7-)9X*iU)eZLq-A8V1ipgazpIds% z#uDCyV|~U;XP^wJOoo9Q?L|Bc-8 zH0SqJVW||#R`lyp&9>FsBA?C%YN#kM&M5V{bko`*aI>OH4SDR$)9P~OrGhc?-UA_^ zuVc!MtdvT@6UEVY<-TkJ<$N65C&mo{14K*Abk^1kcO`rMuep=P0-*G0WEfWR`lzTA znzTUR;gH?1#?Pyff?SLvn>gjI&4J&$s2CCj--2h~1{kXeG*h<UvT2_Z)gAEkosNTW2xnE7(2)BRl$O_6zA6n* zv2m<# z8Jj*cX@{q8EqI*-9|NH5<52#w!sn@Wn7x-`Hod)JL;L+oTHJ!~G1{id_TDbQ*UW1C z_n9T$V0E(5%mIV8jzHvpA%|Ica)TO zmV@f?@Dh6+2Bq?hr=&Je&+Ks#!soom1~_>`s4$5q4>b+3%KAEHs!HvX?tChEK_JDY zC7YHAXt*Q-!kGYaRxeH)ilo`TW(SEDp445r@vSofXW;FQ)w$~R!>HvKx2pt!VtgyY zNF!_XqRKoCmo#Fme5ERjIOE6x1|H^PAuA7C!HcQ2?9USK{9;fm9<40k(Cciv?&PsQ3Qm?~!x21SoNsvW!M`c7H$c;c}n&t;LBJjQpJ{j^&(U5#~1+qug zKcO|_27$T%bGcP_1GCc;H5N|$CvL6d*;fLJj5;^uMk zhu29f_4q*?m!@K_=z?PYb1lv?CGt-|{@xdDDr!ezc4c_x*2yTEKKEccxS=p3BPyesPceMHp)|Gcm(7vDuH3{@}??pUp?TD2<@d?oa_S>_)=^q zZm6i3C}xTp8=QZ6EFTG(%}-}HYG*M(X>wKFm$bW?zP7%qzeh54Z!h+IAI6I&uMCKD zB8Tk0J3HnX#>&s&VAF@yG)#%{_OddzB2}lP$@m~nzh|^i&ACIfx#$qet5{ZfwU#-S z0Ywa-$!Na{4o4?SEc%4?lk$34FMI7-c09TN`8HF;(qJ1Ddh2BJ^s;YgGk_98HKEm( z3H^#hOicZ@NTs;ZkhQ>M;1dp`i`i9*Q#hVt4p> z9~|UVEs&hd`_&f6@tQ1^rcw8FJx5a{#P;=Fg}rnJwKlaSct*tIO6{*q*7{X6#H}rMEa2SSibv2wMFIHCS)Kth2gFa+PPpEsgFjh*_rP;9&J^t%w}$}f zlZ&ElA$!OAcYxAF<*G44ngep|0=6i~#5n9V(OAY$h#dc|0QtX3c}6O4`}3q z?>n{w2DmsjA0GMFKaiEP?A>XmBTXfjNs+y?Dph1CpX|5Q@R}3wLit{I(F}gMO6Id0 znBnYMBj!Xye|uL9Y2)H2k{cmF6CGWzv37w9ep~`UHPYk3e9#!J$mmRU;Z9YJHl#J5bvJn4mmMhd) zCqRWvobMz}J|u*!W9Bm+fW-M_>y}ZeYyTLIphn4Xv8wi9RyQ1#hu}1%e9-oxFo{jk#>&ke;;RIgNovQ z6n_<7%wPAm(^a}Y#H@x{@-wdv z6MqL4hP-w&k5qvi-^Ise1ca9Hih57gYk}Y@;|MJHec+^<6oI6_k%-o&5v;ch3-DPA zhv7qo_v#IM;Be!VUS!=Gm<{v;NxRPR#~^x=&Q65FiKWrdNuQ7~^t<7{L4+}YQ2hk| zr@ldm5_sugKVvgwQveb5Lid80doIB1v`wxrVMp zHTBgC-M7Ite#_AkTW)i2*d6=Lu6(Oc6JOv#ZFeNt^F=Ypq)r1_6dy=#N^hk7=_b;> z;gDB-&Z1%_9!Km_Yk4hAPj#MfzucBF_2h)X*^47R^!w$edNggMgIqips#N7`%hIKh zHz8y%h`dTGEB~p`mPEB*Rk>wy{oz*RM|Cc~FIv;IirTfuXEqk>+lrt zlD2Z`*7ik0OF~0LqvUZc-;mkVyUM@qc%A!t%N8c2Xp|is$yekj@sm zg|3=t0OOp)QnLyE;w!tSX*MWC>pN>NYt%Ukhjjg1Z$ zszDB&{I`w|2!}#s7|9kIO}Vw%RceJCJ2$JA;6Mo%tFD5ZIYx2QxVeh;*-mganspbB zsixaX>UX&JlN3a~BUqtH+MirJ%$-??N|gPm_si((w3>r=xask7tuJ1(n^3ZcW^Mz+ z5zh^UvcFUa6Kj?*gyjrKL8>pvgJaBKh}DTCr#-ou(^O@&_poQmi?gwbA*)bhmV?(? zv8H{fhLPGibvB$#Gd}=C#TAetHx^}f03s!TVvgG zwIP`mDHPejfU7JH9k>LcX?*a{kFtLl?)LpN52As4A1Z^dftkR|A?P6sf1x_FNLT7CVRS_!U1wx`Vhqj$uTAyf23ep^gZwc2_T_f&1K%&1IK{tL-R^yCsQ% z&ka{gDe|oXd!d?CjWn2p}&#K)?u^ar} z9MzgP#lW=i{<;GvMJFU!KuEA;&Jqe^8u?hq0;ccql+HwM&d|Xr0#fll_;BTGR$G4= zE=uB7r8`; z^TO@ci{+!)?me=j_6<#I+oMYc8jywsEbthUJo0K~xW3h5^lPkfEVG|^mC}7{=R1x2 zt1UoSAWJJxZ_P4}_sF2W=P2sd|<}A?z(@jE41#j8;;k$qb}cF2b)oHC8DO9fe2fo-#~gXpWac3 zK1d2)^AZ^Cx3^P5Pe$Q$-Kf!qO)<}_KnG^=qJl(u%#`q-X^{q++TzqX z_ycU91=odGMf|jDIF5P|LWwBUul|Sww@ncJM?;M|j>x1!tglozKyJtr@p!A?b&&mL z;HsRr0aOjLu~bN)fQ!DcO#)heD_ep>b9eDCy$010$I~D3jHR?X&%H*K*2Z@;W1eZI zLIar^%!fm^6q01BtBJ+8S1D5sA(Z*k1}ALt2UEdw!b#Zy?&XJf}9{l$5-@+!EN z`;+A`ET4sNR>WAU4o6(}NV!Hz)Y*?oo-(7C!+m(zjOYUo9?;dlUn;O5X_fPdBz=Q~ zEN8wBX>lXc_#nLiXZ-SI`GN#Xe?Lbq=@AWXsR*xYzh}R+Cw?)l`q*$T-v| zM?cW=4hF!(FOZxDgYul^p=E3q&QxXv#`J{umx^kRb`sJ^$#`_bxdPznAbRGu&}QPH zV=gq3s#KDYf4sd>jT6ltBvm>j2YThS_)8U9(^05V-V)0B~o zMa|d4{z3?951HW2kBR>)98qVJ857wY+FGWch< z-wJVJAD+CVsEGLLYqc4FZY%ArHh18-o>fk53W}iCi z%vW{sKkf*>jRR@b@S7!sYKFIa4hK!0Dj&apC!&`t1TfMwlXIooq1E9;g+|jZKxHsq zixx{gz}ew7kuFZIbvpS)X&BM(E zttDya$Rl~y#t}=p)vHEgXD1P;l8%8H8a7;5T1w_L)IIkIdY6ROg}M6W*B|o(MH$9&tEhJjuMZX*68(&oMjWF;2j< zA3@+4iHRP2*v6x;F~S0m^;ND|Bg86a@g5A#kWAAtO`R9OuGlS}8Un|bQG!9YPCHo# zOxZ-M)YEI?QQjKi-=Wh*_kvhXWyOz;$!Hh1`SVrE<#l^{#wKJDTF5?=8d12GsQm%j z(QF*Epjg^iZ&=-zp33)HSXncc@VeQ+y&j~v+(gW^S+IC)bHIoX@NQE2{(udhY#@zE zYpp?a|H6I%O!>?Q1~A22D$1{P&E=n+&m9ZxhZHof&%3d06Bo6o{MJ`5XNg5Kx(^o-*?}2n0u4ffqI;SW@qIs!swE6)t0QvXWVhTm7Q*v5f0m)$oE3fF$2O#d zNopC1J`_$>htf&JD>PADZ<5V)7rNeSkMGhq-4+}4as?h(tS9^1&Jebui-?)7Mp2WQ!?@~%36s%S2iak7pB_Ar6 zc3YQ^pWfLw-eyF?VWiiscVLHqcvy=6bhNTsfM8hsqglwm<@KSUl{J#d$Bk~!!kf?i zDq&hL=;z43L$xMD|0T5OHxbV3L+KHBTM`9u zyT{GuA}k@jX3nlW>wF?lTFlGs`?n1T`ELaEO|F5S&R=KvY)Im6l5K;@ja~veGlP<* z@PI?yBtY)uW^;|`-_p(<+>5tU6*Mm()by-7y9VTX=PYaYcIT( zed`o?jQ!!KWAr*sE~R;}_1Tc*CiGd(^i;`td?vc&u+br|_w?cb0Bak)qVg!7yJCjG zXGhHNKTsUi(9aT31o1%!bMl~VitHA|RCdQmnT4UsQJKghACc4!70BrpA0)rZ?@vLWl; zX096uP`@f3?V{P2cNTM;SelDgR^TSjr(2Ps_@TqJ(I9(M{%oGDQ(Xl18&sUOVIt9i zkGh#b2*3K6)|V{Y_b>|Jzkjd;Fzyw~d8NNFb$jEJezjXxp4Yc0c|g|NFO6fvix|Sv z^hcgS`Q7$D!nxOW-72cMq-q=0w)PEKz-z2TTliy$$ptEd2W-2@@*feoV@9`_z2Nh& zN)Iw)4w32pmYXp_%k75^*XlW$Y<@@ct!u99Tq~Pk$*@N1bXY!bH{YjD zJupLB+u^UPiw5D3NHWpXDsN84I_N`DNbdnjGkOYUH%2y73{y#pnyL{L1Vu2 z3!d!4@Ng!m_MBIIsDx8#(*!bpdmKiEBAgxpgw-Yo= z?-UvnpV*45zWdf6>{Y8Q^L%=_sWtj2-4kV=-IBhRTF10Th@R1HF;f8_IwyvXjJ#*T z)MkQXah{!RJc=3o;R@xjEEqV#kDe!{zN=wY1L&^85ek zx-x4GWVv6mA5h8+q53jDRj9;rTcm`9IR}MCIxan}-tnfe+uLdW zg5|wwKqE(6D~dJW5~ZR-@+Q0l1Mm}!7-}vl!;hC7q#8IN?GZjUBVgwJ5O$!qq~AnY zw7et$1fr%Kl1iKrxf-+i6}IxB$=tmRJLnUj?PC#SHDp_7%dwIe5|{0Gzlz*zL&O8+m6#6P=ma*7+9 zo0>TS7@5D3&Let$U@-qS)hV{T>a=w@pS_^)3@Z)w6Yi3P}HNRqf6e_%?kK!Y;Iru)bbwJ|!fd_ufk^+sp8LWXi|)l3UwO~3vqNj={#x(LNe=D{SZLZN2QapkWG)?(x1oYWQWH$NQ~6BAkTBc@qtp1Vn3qRI zQmdt99&5N^1|KDujHmpEVul9BGP5I`k^MSk{#!Vyr?nwri>mIt-{~ZDOA|eC%G8mV z0+GnH{V0PWwy>WM_F8-HGWKkHV9xN-$9@Yrx(AAM)2o(w4HYk|j4UuWj!3@seM#ZW zC*Vck+Z0Pt`Dj5s9XrL6qadt!R)D5`tW0?-2Bp^>{W7aZ?-+ct=DNHOsQ;UTHyE(h zOKLLWcMjE6)2{Y=c(JCYh5#e5T@urI%*Dr4@8R7sI(Hqa+dRx?;W%ZLec+#qcbdv) zn~*T~mm_m*6pNiLt&8?-J+L6#1%F6TQr3nw6Jmq!aY~|j&#qeE6NHoYuY&8VPLRyz z<|MEldmk3JC{m36!DR;II(%K3kTVa=Wxi~3i^1GuI(+?}?0NvQO{|UCd}Iwd$*Dd% zLjMxni7k=?MkOOm-wYH{6dhZgK(Ht@jdrBGbZQTc@s8z&#K9IzaNY*%{J@@ zAA91b)Y@Q$F7%$A?I%3l+MJ=qwfeKoXu=!6Bufcm%aF{nT7{Iz0v9f{l^D?-`3LxP z)SkAL$^dhsx-Bz&XGWTD+ug{u`W`QT)zJ+}6SFIpzOqF-wf&rbOYU9T42ok_azTJ8 zVUcz<$v8b7ky=LGrVb?LtFr=mvAg<*_2PhIgc`M}%d0x+?M6{FA;Jn~O6|auoqQQB zl<8blK<9m3wCt> z4!3KU*#i^p4!z5_L2pi^Zqh*l!k|)5p!Afnqrhp33`D;ealCoeJl

Mt!Buq3^8#i2Bly&v zEL?p`sI_%U8A(mu@7iYF#-EiWVfIgJcooST((1y+O4hwKo|@N0-L?AI_Pju1>t|u# zEam(yuTuL(1Xl7J>Y(d~gUUo4&8SwZXg<)JG{Y@aG7ku$>7=P&uY)4iAA0w;t|oH!KIN z%It5orz?o*+QU~SBUy`XborZG=S-2cgQpJuPXy1O2%CDBEozdIzeN!@wQPmj#~^xV zK63u0I~q?d<3wApxGtF_sD~dhpDZujQ$&J}hbS}%4cTXSst$a_6! zzYoXlg5pN%EH11lH*SANVF@-q0gwIVm;oo{CD}42@;e;ar-uqpE{=>0Khdu1#ND4w z<|MUno;qA;MnA#jBp8Hpz6)wN1D8Jec8xOWjVF(D1I?If_|Cp#!?c0_n`7kA*-rF` zza~R~X%k{hoxdNKJK3(PqxSA^wf%(($Hp|E6C?F5Y*R5*<8H!`$blwU=t9vX(59!+ zXPIB6kSHV%=;;>9AHYHW2R_}sswVq0YA=**@^+3r)OGLM)mW6d@GQ1k|Kpd%E`4Be zw&*=SV9)k&1Z2C!SY>;WJ43asKaX($o{64oq~iy|V94}G-QHM;IRqN2bA)&@TeGGa9g`wl>CC9lclC)EjMDd(r=Oh2|S}Q(7<_qNoBk|0H!uw0W#C?nq&_yIi+^1RHq7OeD;ro2l zbz9K7g$)RO^cV{4pSxhVYHJu_Y*|+P?$ULvO$pS$Vq74%tKw+H1X1Ap-OsS>an^L* z^dlGO1`XN4NAQ|V)b*>3$`im!7{aC{yz?W!h_Lva&w$HUSRL2-MqA(a{9ioS1aH|v zrzde(uG`0*jDKqMX*#^3YCh?`HOtg}FEa&Cy#H9Ho3E+L?2+x{4DSqn8 ziPinRfWLB^7O8@tFt{{sk^HI~C8J9PEq@f$=6o#zqeyiz%%q(-7e^j^mm;RGEFro# zRs@q<5XKw~zG50|RXFEiMaufZza9(qWiu1cz1k;rWwRBXKA5`j?2U&V1LW3hwMZRH z&uR6k#!^ba<`W_&?AR?^y#u8AZk5hMa3S3TE^pc}_NtFk&&dIh)Y4P_w){6E$(lzb;rzPy^S;}cI0VJt_;J0I{owc z_30=_#f_ZDA%|%-!VenT!a=$O=o+;vSaes6GO)S&iS)2(Jhd>iP_2{h%fpuO84_{uNAdeA zFc8O03{QoZ;q*?m9*lT)tItz*b0D>VEz;!ymKF%-q4%zYka@N-@VzR@L85~W217tP z5OfVOy3;5N4W4|=O=IhfNkaKzQ;vYB1l>0ah~n)%tKDtjt`*fqu}BQO_O4JhF}~u? zS38Q!_$uYJ5WNhf&MD!;WuJGbb%I@;<2IBc2w-A8gMV(ePT{Hoe3#!mhx*%WW)CEG za9RBTawdW4)2CXSZIqm0d^2MpAo>`05yMUh_|RPQ^pVq7VR3Zg&`a9P*sP2=M=ETU zab@OgtnteMxse*dzI(SiB_kaMJY*!dOTIjrbf5k)`}9!yMXd3T*1WHeOmPTpi6@)^ zD^f~Ri!lQ~Y1+lOL4M8@5`pp)1JZ4qo#ADg%uVh=bAwYCY*RbHZXQMB#y@{H1 zQZp54^kpx~@6FWD5zv5?Q|Zm?ts6B`(~pu9XdRXdl2UVyp-P=b!1Nali*r5o+h9+v zGY0_22*Q%woaoswU)`#hvQs5z^b*HT^4(J#>vZ{)vZ#gN1#f6k=hOPUPv@qyuF$6v zmflO-g|W1%@R;R^9bO@tG5_YOgg^Jl!e~PzsJ_&so20Wz4bmP-J%$E*FfuPRfYom^ zRgU*aaZHQQw)N0|XVa#j#xY)X+0^0E8o`b)mte3TAZ1FVY@@*?4f2%1C|bXg#vQps z{JE))=W(grToptPqdv1ed7-)(LqDwB0>c>zB{w4L$48uf-VG=fh5_fPnL`}qGe z62z5lQR(_H$&&S@`GaU^OLTK4x}#kE-B|`eB9JPI2o*&Yge5{9rK*ZTsKXHm6ao>1 zK}?(UsO$SkUo*K-Y0$ v?tq%AhJpW&Wim?>`iEv^VG4NQeB4dZUgE z&VXmBri=hrFXH;!a2k=Ps)i!b8ia&^mBXihdmaF~9#zCcec#!grvbhO6G>M)`_0F1 z!oxYJ5UdJ;`Z_wIu*{fAqf&zhWfz^wPGw>>F++wso+dSNN*5*=hK!1+FmHYPvN$(K zhr_B2X}&O%EOh80gd~&|Uxk?Cds@KzfXnH#_8IQ8_W{oCVX9o)ao^K}jvRKXj%FP` z)*Q`-Tl%8^`1zRQ$5SH+rO22N5|?Uc?JdOA(FKf&tQs0Y8;B_4i^EcTjO5?R{4oIf z-h0uuGX;Fh8;$T5G|fF$8mxCE1m=f{CzSziTSih`Z*?CPhiIH2E#&%oFVlmfuc_JD zO?x(f;9C2M-KnxZX{qnDK`Hq2_;7%YKpxs71IdJfH(VO4Ev){jdMmy?HyN8qt|e@8@{^ z2kc_bND~D#4IJw;mq;b${!p(+)7q@TUD*yXX?CpYV*Tjc`Dn<!RDS0&lp zbhYmez`se0eyJg3(x-^07tGIzBMH?%f()oN#cR-PoohA`0Wk)EUKn=5%aV1RWH819 z4;QZYuHpe!V+BL@QelclPCBdAsMWoYT%U>O?k5D-qN*3o_Mo(j^~AvSSKB%rd|>Da zK6vL>wg&Z|`%amInp|v}0q6Y_g+2Cxo4>Q}e!f@b{H9Vu3bxA>@`iIry&Zb;4eKL) z#^6B+(5>w(+(EGbewHhb$q=rAfWd^x`gNbtRfqgy#r3EIy_=tbhhSJL{YEbf*Q$i`QL@KdoAjw5Pd7 zwsTGm4&kF~k^BMY`*`w@gr;^bxH*d)J++i@sY4=f#WjWNIxFj$^|F&6lW7 z(k<%QVcdy`Z>I67whYC^VszQ&`7x_j_toPGRdD(&|0q&ws@F`e>X`JAX0o-}Wpget z>EfDETS;J-0JE8y*Vm8j2#K>kUZHI8VBCvp0lCY}se({yan-%+FD5*$BOdIedjK$W zZV0#H((7)%u%v-?-HtoZe%_-wDxxLz<0NTcqXd8Ik;1Qwcl&3Q@ed(i>8Q(3)d;I7 zOPG@!7{{=Vs*FG6oDE~$%8rb-)Ka1S`J?12*7i;SY~NMV3!|*#1Jyf)b9_q^Wp1Xx z_Odjb5S!1_@NMKi;)(68cmtynPHxr;pS}d9J*jL!b$$?>t+)SP407-11Kl-9XTfa& zNysCY(-+}{-irpa)#~SuxhG#FDHzFxz`wJPynYJM@1X|3)u*ECsj4J_>MJ!- z+;LLw6je;b$G!a$^=%@2oaBq^nu)?qdBkZJuSdf)wTRr!s@CgDvi_{&TC%@Kk|y+T zgfmmVoDe${Ga{;cJ@>l5v6+z8Ua|4mJC+yt*JaxPTBVBFBzr+p{PE?oDd!>Z{@YE8 z-0~`Qaz3vz*QM!uqZ1B&ho>YlE4a(}PV){g`dN@XGg#{Kfr2d?{Sz?pq!1sRuW#~! z1A+N+JlYo;1i({h)9^X`egOmcHRE2Wu3LEUCKo@mljKX8yjrgwoeP`-Dmx=i_vuGo zs6|&zq)ZHJ0uA;;Qa4-eq_PcRLMFzo5o5jO@1(pJs|%YoMkk;zCl9pai2*TsuZBo4lN5A_93V$8YjxSL9sA5lB^VnV6$|<3a;R<@m9+G-oKP zV~>3@17t=lW(lmA5(E17QQvHJIjc9w(dXDkFgu)Su*f(dMQF&a#zfv*&;_C z{l&_#%Dvt9I$C@ySEt2K!5XTN=sdp+vT_;2D>kRI@Zr{B8?PKC5eMw!Onp}?mNIfq zua?TZgiRS3I5^vcZkO4g%4$$#t!F;I(PMS@D!idHu$BOXrrv;pQ1Tso^yOq?#KQj5 zO*0!Puyf7>*ed5LU_Qs$|D@Rt26zG{udV!@@|jdTdREPQP?}OsAnVSpKvB4p^Hz83 zy>Q+gLDhuHOwFn}sk&EX?1daC={D_1`e!Puz7VEt7Plzzmw{i0awO<^|Aa5ZyU}}_ zI&_EKqUJP4sah%8EemAXc}IVTlxgk8xg#Q%*nD6|Co5N2LkK($R^$}WD41&Zhd?s; zqk2}TWuH@niZM-W(;J_(*_VBzjT>a-|j$x{hSVaovQQ@hN{8nQw zinHvBM$9Q)s9Dw`F-Fx{s$x+g#My@NNG)&mwu-9Yktou`DrC&DSr)c~OwAERte&=B zyy$)t@grJA%6rg?I$uOvKaZ=?b(lPp8m!N~jJ{ZhvbXG4IrYIB24bILGgYrcvW9!Z zPnTA9@Bwpx_NmLq+a@=S<&t(O2{wJYwnGo@XJd$?WLn`+ILW-KpsBwTf;Zc1-s=gX zmwiF=Xh`v{Hi>qk6!GkXfLVO=XEJwV$GfwRYW3Kk4t@CBq?O}h)c?Adc_Dp{05RMu zs7QLKF;dtltJ}Bv?)M0HV=N}VF6p7&7UXcG>*exg#V18yva<0XL|Ukfn4K3%w3shX z9i<4B)xR(CM8FH0F|x9kO^=?A}EaeHedbEs+6!DTW^00^O^X z9Hf8wY;>P%KsM$ZI|#Um<81cTpQa{2w7a88-HHw|KPnnmCre?ODma9V~`T&!z6%Sgza_> zwNlZF$OW1cfsK^RUA*B%(>GsQf@cjRS+cwapD{Zaqm7sVs1g3udp?($xe0QHM>St zNXP1+*~*X4KOrhJ5;?3BO4;>JNL`sVu`!#!R!kIFBKcw2>uLM+UyAN1#X(jQB03%p zXXL4;8+Uq>x4u31(y{y@v$!-SP!Ly zBNb-^SdTl8x(OAX9^Cy1^ym7;YWk_Xh4*B>O@E|!%R5PvqWiVgFn#iQ?k%wYnbJsy z{>v|i2OLjPu|zx(?2P*0GUk&A((LlM<^#(3#%-9TNiqsmQ|dj}U@A1VLV7+t^wYf| zz3Kw?tx`ZO<7;&l!i%(MlyS1VpP6}^bYGIi04A<7x+PF3rEl#| zbHkaySf#+|X?bSf8g_nhUEytwK;I}uplJ6RF5=hwbmdqAVZNG3B9~A`jHR)~lUMe4 zyP?2{k4TD9QjS)s_y(FW&W7fsk$GCaJ6|Bx&O#bKA3q)e zBr?Z$Zj6BnU4on*9%tF$N6UJbu7POe>sV~cyj$|)I|p`FTUqqOzxBe$Puikx?H*O# zWZA|WPL|m#0-MI{0wfbJta;$gUg`=X(>Xe5+R5&5iFE}d0Lyd{{`qUq^O= ztdLVg8U_BWUlr`9b&;Ej(}yZl`*BCyi9>QD)kTCWvtOjnw+*9k!^NN8a|ADg_#G-= zmArAJZ_2k+&N`8%88ept5G-q)ErG3{eDk7`iu&ZU+5Qmx$t~jx&JV>Ge_;W?>CLCi z%tBuNcx0GVe%?|?sVBc^c_o4@a$)XdiEEwE0c95_f(eWVRdKs5B{TxTva&FZDW@@z zwc`waQQX%GrVxlPl;ub|)STh!YsxlAo;ppcUT%s|XFChhEK&TiG+==l+QdFM(+Ge5 z+Fc(nftn39ZT+hMZ8Y;W@@-);^Q#9ld*+ced7SfXy>W56#e|K@t&%Yl4#W?7xD^s( zvvc^D7E&4*%xK3n`Z-Zk3AV&0v)%pi800(H`v$z6l5ctF%uU}e0ytA@1Y26*ErX*5 zywRG{TVVZ6-QUB|NICB!t3;8${&ihmIodRaa@QY0lRnq7)YK`r)Y5}r6tceHn zeVD+~4i6PP`>J1JaqOo?Eky8GOPC2@NkjM!A~Q<+1)8kI!JAWi67=dU6lgP5#h;RP z^}7&)<3itqn|qKLB;2IvyLzWLl%Cdtztm`DmZu;>`6!DJ5W8ccPSh9^ zCqa;f=^3kjde3*8v{fa_53{a#m9z6hWdGR-$?Y`uKN&9lgFWIpI?TLxBWLZVUH=^U zcF;>dW}BgB%p&r6qQs{C3b$QuQ~}5`D;gz_&A!PZ#8%0g?ECp)0=0ha0u@%R zz&044_7|nOX2dC774A;>>{z?!zi|;IW<1}y9ATG|F&ePO*{e3h#VWRSze^f~vVW=V z8_DVZ;Z_mRl<>znq4zXfRD$rhqHb(b_YtqxIx&jTvN9O=_}7lSk*|VvZzz}18DfYl zY;9|pMDLhHGM_R3`INaLF)G*Lxq5l6vEGz!r1SWvd2rviTD+opHC+UxqE$w&H+U|E zSUF<)bKqj?2))KmphW^H4@FgkWnd`-Fq`+SSf`5TzRmMM|BC`yym1*V+3_a@T!biwmWaDAa-YGwr-T7Y2V@{&>&aZb=k}?^f!kb*5=c znCB>&j${nVL*Rwov0>@IY{xNT!Hbzs5<5ju~qhtCOR@xJ{)?a(AeHS7D6;nq!(lE!!r~37c|GTCo^BTaES*38wN2 zcObu0#0o?FeU2@jMy2*xvKS$wFw1lX!KR}98f-1slDp znXr>5rqS+tO(9>IqS0==j_-~3Akl)6LLXZl3n;YHIlQ;>DSGTne)WB?y$VPq;@O?U zR;)Sp5uK;<{@&Gj#C!PBM(de#Auj*=m3#L8tnB~z8kyn$T2?Mq>Ezd8y1G{72Pwr7 z`n>xLjG_94(7Tlr=O7A$6 zP>iZeMsCw$L~wP`dtXlXUW9Su#`1M)h zhey)K0(i*8X`(hE$P~acIzB!3_kHq}p#0TqF(B#}_o3y%(AdZDbYWeR-n@yGcd zvQ%D=OX>--gk(rIEFeh?3JOP0{Sbq8FnreeE6eL}H%ujj-+2@YpKCGeZu))H7%EZ}8Q^QR-PDG!RJ4{@Yk5Ez)!CsDD*Sq50vS!Rsiz~#mCg5qIn{Q4 zsA<(ibuWJ#>FW0@B#9t&tUSADixtwT&_q6|fGAkC9}BVjXi>WJghriv@4FxD_@|PN zCbE(Jey4P19PY4L#oAPPqHVXXQF^fuV7^l|)~Jv6Eq&*(5N^jv@b)}9W5l#(tQ3aV z)Of;73HmpYL1@DBsE{3_JM`e%f<|`_H#KqS)`D??hCbU5hH5b0Ms(qL49X48`Ij56L-xnoB$$hKp zU8j)Saencw@2hZ@uNe;HvQb@GYS$yglj87?`^EYgcq2wKztfkzqEY+4&wpoT=g!;J zD+~p14c`P7{q+5eK!#H?x$V4cehC!rL4eneWvIhFE4buRWlvO0@7J)_m$7bi(}7_u z4=-$QkT+;3Zd9nvaU+@C37$=gK{Opn^Mk0AWtfgHWt%N7%?F6AKp!SQQ@mIX!H*Bq zxqKmy*$uc&3bsO=UhBUay)=pTUNg@KqyMch5xarsFT%xsDE)ln z>U;M6_r37OxYobqt|q#Q(&{xvB!#{I=`5UjWa-K70)V85JtIMBGrnODKq z$!>><7^FY!p*Sc$rEQXYnQl_Mjd5{{bn7_2MewWh&zt8}<%u6s7Rc`KmbS{tGIC|1 zBmi8t$^^Pp8{PN&_agZtp_a?y?B$p^)o0kS?|+zY7|=K@yR3O{KBnWz)#8Zke)EF5 zTyh%MIsHudl`#GadZXtt>oI(nxm{P5?0xF;PJgQ9)4=eGy4% zaWQG}JNzOd(jp>UDZz{X%fZRT%Ff#F|93Fz?L^`nSpQkU!^PUu$HE;2Y&|_)J*0(& z?VK!ZP`F`-bP#fJw`m??&cLzs|FHVDUQU+M(g+u%mlMj_Q(9UZhk5|f!mB3X|HG*M z6Gd8D1!ZSr>j^}~B{?R^0&&dEf5rJPV`OLLY5NaS$8E}nLm2*rXxKTSJpEiz;6HyQ z?CNaupwdti2T}bC(zEkN0SQqFc?A_ycbx6UzibA&s=(UL5rx|ru1hanz-I%)5kOT@ K6HzX29{N8&t~F-> literal 0 HcmV?d00001 From 811723555118c4a110f72b6be0a9fd125c438014 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 13:55:59 +0200 Subject: [PATCH 85/90] Updated user default status --- app/controllers/api/account.php | 2 +- app/controllers/api/users.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index fd06fc0eaf..c28dd19e33 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -674,7 +674,7 @@ App::get('/v1/account/prefs') /** @var Appwrite\Utopia\Response $response */ /** @var Appwrite\Database\Document $user */ - $prefs = $user->getAttribute('prefs', new \stdClass); + $prefs = $user->getAttribute('prefs', new \stdClass()); $response->dynamic(new Document($prefs), Response::MODEL_ANY); }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 90c232b21c..9b124e0a90 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -165,7 +165,7 @@ App::get('/v1/users/:userId/prefs') throw new Exception('User not found', 404); } - $prefs = $user->getAttribute('prefs', ''); + $prefs = $user->getAttribute('prefs', new \stdClass()); $response->dynamic(new Document($prefs), Response::MODEL_ANY); }); From 372191036333b6395b813a936d3def2ec0c6901d Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 13:56:11 +0200 Subject: [PATCH 86/90] Updated empty response result --- src/Appwrite/Utopia/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index ce22df225e..1010e237c2 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -39,6 +39,7 @@ use Appwrite\Utopia\Response\Model\Tag; use Appwrite\Utopia\Response\Model\Task; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Webhook; +use stdClass; /** * @method public function setStatusCode(int $code = 200): Response @@ -257,8 +258,7 @@ class Response extends SwooleResponse $item = self::getFilter()->parse($output, $model); } - $this->json($output); - + $this->json(!empty($output) ? $output : new stdClass()); } /** From 59c8ae731b375bd80a58ead6f0bf850e90aab739 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 13:56:48 +0200 Subject: [PATCH 87/90] Added missing test --- tests/e2e/Services/Users/UsersBase.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 14805273e6..ebefa2abb9 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -125,12 +125,12 @@ trait UsersBase /** * @depends testGetUser */ - public function testUpdateUserPrefs(array $data):array + public function testUpdateAndGetUserPrefs(array $data):array { /** * Test for SUCCESS */ - $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/prefs', array_merge([ + $user = $this->client->call(Client::METHOD_PATCH, '/users/'.$data['userId'].'/prefs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -144,6 +144,17 @@ trait UsersBase $this->assertEquals($user['body']['funcKey1'], 'funcValue1'); $this->assertEquals($user['body']['funcKey2'], 'funcValue2'); + $user = $this->client->call(Client::METHOD_GET, '/users/'.$data['userId'].'/prefs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals($user['headers']['status-code'], 200); + $this->assertEquals($user['body'], [ + 'funcKey1' => 'funcValue1', + 'funcKey2' => 'funcValue2', + ]); + /** * Test for FAILURE */ From 87b973a6b8bc133127c268c9fff78aa67fcc6ac0 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 18:50:17 +0200 Subject: [PATCH 88/90] Updated dart package URL --- app/config/platforms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index eb468cfde7..6cd066f3ea 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -272,7 +272,7 @@ return [ 'name' => 'Dart', 'version' => '0.1.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', - 'package' => '', + 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, 'beta' => true, 'dev' => true, From e772d84f92ff38fdcc7f50139e4f879e2ec94a1c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 10 Jan 2021 23:02:36 +0200 Subject: [PATCH 89/90] Updated docs --- docs/services/account.md | 5 ++++- docs/services/users.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/services/account.md b/docs/services/account.md index 0251765299..94085b1d8d 100644 --- a/docs/services/account.md +++ b/docs/services/account.md @@ -2,4 +2,7 @@ The Account service allows you to authenticate and manage a user account. You ca You can authenticate the user account by using multiple sign-in methods available. Once the user is authenticated, a new session object will be created to allow the user to access his or her private data and settings. -This service also exposes an endpoint to save and read the [user preferences](/docs/client/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user preferred locale, timezone, or custom app theme. \ No newline at end of file +This service also exposes an endpoint to save and read the [user preferences](/docs/client/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user preferred locale, timezone, or custom app theme. + +> ## Account API vs Users API +> While the Account API operates in the scope of the current logged in user and usually using a client-side integration, the Users API is integrated from the server-side and operates in an admin scope with access to all your project users. \ No newline at end of file diff --git a/docs/services/users.md b/docs/services/users.md index 06c799aa2c..e1dec36756 100644 --- a/docs/services/users.md +++ b/docs/services/users.md @@ -1 +1,4 @@ -The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info. \ No newline at end of file +The Users service allows you to manage your project users. Use this service to search, block, and view your users' info, current sessions, and latest activity logs. You can also use the Users service to edit your users' preferences and personal info. + +> ## Users API vs Account API +> While the Users API is integrated from the server-side and operates in an admin scope with access to all your project users, the Account API operates in the scope of the current logged in user and usually using a client-side integration. \ No newline at end of file From e5940be4d64aa221d310488d2721577eda0bf4a3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 11 Jan 2021 15:37:15 +0200 Subject: [PATCH 90/90] Updated dotnet version --- app/config/platforms.php | 2 +- composer.json | 2 +- composer.lock | 64 ++++++++++++++++++++-------------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 6cd066f3ea..3a45f7e7c1 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -254,7 +254,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.0.2', + 'version' => '0.0.3', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, diff --git a/composer.json b/composer.json index 043007c735..d571e2e4fb 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ }, "require-dev": { "swoole/ide-helper": "4.5.5", - "appwrite/sdk-generator": "0.4.3", + "appwrite/sdk-generator": "0.4.4", "phpunit/phpunit": "9.4.2", "vimeo/psalm": "4.1.1" }, diff --git a/composer.lock b/composer.lock index 09483dbca6..723d6ac259 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": "6594e4d32da0196d0bb2e5a1794ea89d", + "content-hash": "025317bd1e05b735b2c4897f9cb6db4a", "packages": [ { "name": "appwrite/php-clamav", @@ -1698,12 +1698,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "dbb3c28ece24b36efa91be205f6f0b015bddc27c" + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/dbb3c28ece24b36efa91be205f6f0b015bddc27c", - "reference": "dbb3c28ece24b36efa91be205f6f0b015bddc27c", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", "shasum": "" }, "require": { @@ -1772,7 +1772,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/master" + "source": "https://github.com/amphp/amp/tree/v2.5.2" }, "funding": [ { @@ -1780,7 +1780,7 @@ "type": "github" } ], - "time": "2020-11-14T16:44:06+00:00" + "time": "2021-01-10T17:06:37+00:00" }, { "name": "amphp/byte-stream", @@ -1862,11 +1862,11 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.4.3", + "version": "0.4.4", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "630776cfe49412e72a70a3a69729054bf8302e1f" + "reference": "ebb51e404a4e5b89f74428296b81ea347362dd33" }, "require": { "ext-curl": "*", @@ -1896,7 +1896,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2021-01-08T11:55:04+00:00" + "time": "2021-01-11T09:34:56+00:00" }, { "name": "composer/package-versions-deprecated", @@ -2225,25 +2225,25 @@ }, { "name": "felixfbecker/advanced-json-rpc", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40" + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40", - "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", "shasum": "" }, "require": { "netresearch/jsonmapper": "^1.0 || ^2.0", - "php": ">=7.0", - "phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0" + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, "require-dev": { - "phpunit/phpunit": "^6.0.0" + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", "autoload": { @@ -2264,9 +2264,9 @@ "description": "A more advanced JSONRPC implementation", "support": { "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/master" + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" }, - "time": "2020-03-11T15:21:41+00:00" + "time": "2021-01-10T17:48:47+00:00" }, { "name": "felixfbecker/language-server-protocol", @@ -4517,12 +4517,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "da4c3663721420520b024e5aede66b813019e744" + "reference": "5ff54ffca91d307dfcb144af4748571eb9346b71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/da4c3663721420520b024e5aede66b813019e744", - "reference": "da4c3663721420520b024e5aede66b813019e744", + "url": "https://api.github.com/repos/symfony/console/zipball/5ff54ffca91d307dfcb144af4748571eb9346b71", + "reference": "5ff54ffca91d307dfcb144af4748571eb9346b71", "shasum": "" }, "require": { @@ -4582,7 +4582,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "keywords": [ "cli", @@ -4607,7 +4607,7 @@ "type": "tidelift" } ], - "time": "2021-01-05T20:16:44+00:00" + "time": "2021-01-11T06:08:00+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5107,12 +5107,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef" + "reference": "cea83947622b432b60b809d14c7b42df9f0f5823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e0d43e6e2f909287d2e4e867ca5c131a661f08ef", - "reference": "e0d43e6e2f909287d2e4e867ca5c131a661f08ef", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/cea83947622b432b60b809d14c7b42df9f0f5823", + "reference": "cea83947622b432b60b809d14c7b42df9f0f5823", "shasum": "" }, "require": { @@ -5180,7 +5180,7 @@ "type": "tidelift" } ], - "time": "2021-01-01T09:26:45+00:00" + "time": "2021-01-11T09:51:46+00:00" }, { "name": "symfony/string", @@ -5188,12 +5188,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c" + "reference": "7a62495108b3dc7e749b709357ae720fccb5a39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/99f25957efe05db14a1aa6cff643eca0f83a952c", - "reference": "99f25957efe05db14a1aa6cff643eca0f83a952c", + "url": "https://api.github.com/repos/symfony/string/zipball/7a62495108b3dc7e749b709357ae720fccb5a39b", + "reference": "7a62495108b3dc7e749b709357ae720fccb5a39b", "shasum": "" }, "require": { @@ -5237,7 +5237,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com", "keywords": [ "grapheme", @@ -5264,7 +5264,7 @@ "type": "tidelift" } ], - "time": "2021-01-01T09:26:45+00:00" + "time": "2021-01-10T16:38:27+00:00" }, { "name": "theseer/tokenizer",