1
0
Fork 0
mirror of synced 2024-06-26 10:10:57 +12:00

Merge branch 'master' into patch-1

This commit is contained in:
Eldad A. Fux 2019-10-13 14:14:20 +03:00 committed by GitHub
commit e92cb0e66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 1152 additions and 111 deletions

View file

@ -2,7 +2,7 @@
## Features
* Added 7 new locales for locale service and email templates (af, ar, cz, hu, lt, no, ru, si, sv, ta, vi, zh-cn, zh-tw)
* Added 16 new locales for locale service and email templates (af, ar, bn, cz, hu, hy, jv, lt, no, ru, si, sv, ta, vi, zh-cn, zh-tw)
* New users service routes to allow updates pref and name update
* 2 stage Docker build
* New database rule validation options
@ -12,6 +12,10 @@
* New OAuth adapters (Amazon, Dropbox, Microsoft, Slack, VK)
* Added support for ES6 require statements in JS SDK
## Bugs
* Fix for typos in PT-BR translations
* Fix for UI crash when project user was missing a name
## Breaking Changs
* users/deleteUsersSession method name changed to users/deleteUserSession in all SDKs for better consistency

View file

@ -30,7 +30,7 @@ Appwrite uses a package manager for managing code dependencies for both backend
Many of Appwrite's internal modules are also used as dependencies to allow other Appwrite's projects to reuse them and as a way to contribute them back to the community.
Appwrite uses PHPs Composer for managing dependencies on the server-side and JS NPM for managing dependencies on the frontend side.
Appwrite uses PHP's Composer for managing dependencies on the server-side and JS NPM for managing dependencies on the frontend side.
## Coding Standards

View file

@ -65,8 +65,8 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
* [**Teams**](https://appwrite.io/docs/teams) - Manage and group users in teams. Manage memberships, invites and user roles within a team.
* [**Database**](https://appwrite.io/docs/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/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.
* [**Locale**](https://appwrite.io/docs/locale) - Track the user's location, and manage your app locale-based data.
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your user's avatars, country's flags, browser icons, credit card symbols and generate QR codes.
* [**Locale**](https://appwrite.io/docs/locale) - Track user's location, and manage your app locale-based data.
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols and generate QR codes.
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io).

View file

@ -41,7 +41,7 @@ $clientsConsole = array_map(function ($node) {
return false;
}));
$clients = array_merge($clientsConsole, array_map(function ($node) {
$clients = array_unique(array_merge($clientsConsole, array_map(function ($node) {
return $node['url'];
}, array_filter($project->getAttribute('platforms', []), function ($node) {
if (isset($node['type']) && $node['type'] === 'web' && isset($node['url']) && !empty($node['url'])) {
@ -49,7 +49,7 @@ $clients = array_merge($clientsConsole, array_map(function ($node) {
}
return false;
})));
}))));
$utopia->init(function () use ($utopia, $request, $response, $register, &$user, $project, $roles, $webhook, $audit, $usage, $domain, $clients) {
$route = $utopia->match($request);
@ -72,7 +72,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
//->addHeader('X-Frame-Options', ($refDomain == 'http://localhost') ? 'SAMEORIGIN' : 'ALLOW-FROM ' . $refDomain)
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-SDK-Version')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-SDK-Version')
->addHeader('Access-Control-Allow-Origin', $refDomain)
->addHeader('Access-Control-Allow-Credentials', 'true')
;
@ -82,8 +82,9 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
* Adding appwrite api domains to allow XDOMAIN communication
*/
$hostValidator = new Host($clients);
if (!$hostValidator->isValid($request->getServer('HTTP_ORIGIN', $request->getServer('HTTP_REFERER', '')))
$origin = $request->getServer('HTTP_ORIGIN', $request->getServer('HTTP_REFERER', ''));
if (!$hostValidator->isValid($origin)
&& in_array($request->getMethod(), [Request::METHOD_POST, Request::METHOD_PUT, Request::METHOD_PATCH, Request::METHOD_DELETE])
&& empty($request->getHeader('X-Appwrite-Key', ''))) {
throw new Exception('Access from this client host is forbidden. '.$hostValidator->getDescription(), 403);
@ -251,7 +252,7 @@ $utopia->options(function () use ($request, $response, $domain, $project) {
$response
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-SDK-Version')
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-SDK-Version')
->addHeader('Access-Control-Allow-Origin', $origin)
->addHeader('Access-Control-Allow-Credentials', 'true')
->send();
@ -590,7 +591,7 @@ $utopia->get('/v1/open-api-2.json')
'operationId' => $route->getLabel('sdk.method', uniqid()),
'consumes' => [],
'tags' => [$route->getLabel('sdk.namespace', 'default')],
'description' => file_get_contents(realpath(__DIR__ . '/../') . $route->getLabel('sdk.description', '')),
'description' => file_get_contents(realpath(__DIR__ . '/..' . $route->getLabel('sdk.description', ''))),
'responses' => [
200 => [
'description' => 'An paged array of pets',
@ -608,6 +609,8 @@ $utopia->get('/v1/open-api-2.json')
'location' => $route->getLabel('sdk.location', false),
'demo' => 'docs/examples/'.fromCamelCaseToDash($route->getLabel('sdk.namespace', 'default')).'/'.fromCamelCaseToDash($temp['operationId']).'.md',
'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $route->getLabel('sdk.description', ''),
'rate-limit' => $route->getLabel('abuse-limit', 0),
'rate-time' => $route->getLabel('abuse-time', 3600),
];
}
@ -681,7 +684,7 @@ $utopia->get('/v1/open-api-2.json')
case 'Utopia\Validator\Range': /* @var $validator \Utopia\Validator\Range */
$node['type'] = 'integer';
$node['format'] = 'int32';
$node['x-example'] = rand($validator->getMin(), $validator->getMax());
$node['x-example'] = $validator->getMin();
break;
case 'Utopia\Validator\Numeric':
$node['type'] = 'integer';

View file

@ -38,12 +38,24 @@ $collections = [
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Localhost (SSL)',
'type' => 'web',
'url' => 'https://'.$request->getServer('HTTP_HOST'),
'url' => 'https://localhost',
],
[
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Localhost (Non-SSL)',
'type' => 'web',
'url' => 'http://localhost',
],
[
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Current Host (SSL)',
'type' => 'web',
'url' => 'https://'.$request->getServer('HTTP_HOST'),
],
[
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Current Host (Non-SSL)',
'type' => 'web',
'url' => 'http://'.$request->getServer('HTTP_HOST'),
],
],

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'আফ্রিকা',
'AN' => 'এন্টার্কটিকা',
'AS' => 'এশিয়া',
'EU' => 'ইউরোপ',
'NA' => 'উত্তর আমেরিকা',
'OC' => 'ওশেনিয়া',
'SA' => 'দক্ষিণ আমেরিকা',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'আফগানিস্তান',
'AO' => 'অ্যাঙ্গোলা',
'AL' => 'আলবেনিয়া',
'AD' => 'এ্যান্ডোরা',
'AE' => 'সংযুক্ত আরব আমিরাত',
'AR' => 'আর্জেন্টিনা',
'AM' => 'আর্মেনিয়া',
'AG' => 'অ্যান্টিগুয়া এবং বার্বুডা',
'AU' => 'অস্ট্রেলিয়া',
'AT' => 'অস্ট্রিয়া',
'AZ' => 'আজারবাইজান',
'BI' => 'বুরুন্ডি',
'BE' => 'বেলজিয়াম',
'BJ' => 'বেনিন',
'BF' => 'বুর্কিনা ফাসো',
'BD' => 'বাংলাদেশ',
'BG' => 'বুলগেরিয়া',
'BH' => 'বাহরাইন',
'BS' => 'বাহামা',
'BA' => 'বসনিয়া ও হার্জেগোভিনা',
'BY' => 'বেলারুশ',
'BZ' => 'বেলিজ',
'BO' => 'বলিভিয়া',
'BR' => 'ব্রাজিল',
'BB' => 'বার্বাডোস',
'BN' => 'ব্রুনাই',
'BT' => 'ভুটান',
'BW' => 'বোতসোয়ানা',
'CF' => 'মধ্য আফ্রিকান প্রজাতন্ত্র',
'CA' => 'কানাডা',
'CH' => 'সুইজারল্যান্ড',
'CL' => 'চিলি',
'CN' => 'চীন',
'CI' => 'আইভরি কোস্ট',
'CM' => 'ক্যামেরুন',
'CD' => 'গণতান্ত্রিক কঙ্গো প্রজাতন্ত্র',
'CG' => 'কঙ্গো প্রজাতন্ত্র',
'CO' => 'কলম্বিয়া',
'KM' => 'কোমোরোস',
'CV' => 'কেপ ভার্দে',
'CR' => 'কোস্টা রিকা',
'CU' => 'কিউবা',
'CY' => 'সাইপ্রাস',
'CZ' => 'চেকিয়া',
'DE' => 'জার্মানি',
'DJ' => 'জিবুতি',
'DM' => 'ডোমিনিকা',
'DK' => 'ডেনমার্ক',
'DO' => 'ডোমিনিকান প্রজাতন্ত্র',
'DZ' => 'আলজেরিয়া',
'EC' => 'ইকুয়েডর',
'EG' => 'মিশর',
'ER' => 'ইরিত্রিয়া',
'ES' => 'স্পেন',
'EE' => 'এস্তোনিয়া',
'ET' => 'ইথিওপিয়া',
'FI' => 'ফিনল্যান্ড',
'FJ' => 'ফিজি',
'FR' => 'ফ্রান্স',
'FM' => 'মাইক্রোনেশিয়া',
'GA' => 'গ্যাবন',
'GB' => 'যুক্তরাজ্য',
'GE' => 'জর্জিয়া',
'GH' => 'ঘানা',
'GN' => 'গিনি',
'GM' => 'গাম্বিয়া',
'GW' => 'গিনি-বিসাউ',
'GQ' => 'নিরক্ষীয় গিনি',
'GR' => 'গ্রীস',
'GD' => 'গ্রেনাডা',
'GT' => 'গুয়াতেমালা',
'GY' => 'গায়ানা',
'HN' => 'হন্ডুরাস',
'HR' => 'ক্রোয়েশিয়া',
'HT' => 'হাইতি',
'HU' => 'হাঙ্গেরি',
'ID' => 'ইন্দোনেশিয়া',
'IN' => 'ভারত',
'IE' => 'আয়ারল্যান্ড',
'IR' => 'ইরান',
'IQ' => 'ইরাক',
'IS' => 'আইসল্যান্ড',
'IL' => 'ইস্রায়েল',
'IT' => 'ইতালি',
'JM' => 'জামাইকা',
'JO' => 'জর্ডান',
'JP' => 'জাপান',
'KZ' => 'কাজাখস্তান',
'KE' => 'কেনিয়া',
'KG' => 'কিরগিজস্তান',
'KH' => 'কম্বোডিয়া',
'KI' => 'কিরিবাতি',
'KN' => 'সেন্ট কিটস ও নেভিস',
'KR' => 'দক্ষিণ কোরিয়া',
'KW' => 'কুয়েত',
'LA' => 'লাওস',
'LB' => 'লেবানন',
'LR' => 'লাইবেরিয়া',
'LY' => 'লিবিয়া',
'LC' => 'সেন্ট লুসিয়া',
'LI' => 'লিচটেনস্টাইন',
'LK' => 'শ্রীলঙ্কা',
'LS' => 'লেসোথো',
'LT' => 'লিথুয়ানিয়া',
'LU' => 'লাক্সেমবার্গ',
'LV' => 'লাটভিয়া',
'MA' => 'মরোক্কো',
'MC' => 'মোনাকো',
'MD' => 'মোল্দাভিয়া',
'MG' => 'মাদাগাস্কার',
'MV' => 'মালদ্বীপ',
'MX' => 'মেক্সিকো',
'MH' => 'মার্শাল দ্বীপপুঞ্জ',
'MK' => 'ম্যাসেডোনিয়া',
'ML' => 'মালি',
'MT' => 'মাল্টা',
'MM' => 'মায়ানমার',
'ME' => 'মন্টিনিগ্রো',
'MN' => 'মঙ্গোলিয়া',
'MZ' => 'মোজাম্বিক',
'MR' => 'মরিতানিয়া',
'MU' => 'মরিশাস',
'MW' => 'মালাভি',
'MY' => 'মালয়েশিয়া',
'NA' => 'নামিবিয়া',
'NE' => 'নাইজার',
'NG' => 'নাইজেরিয়া',
'NI' => 'নিকারাগুয়া',
'NL' => 'নেদারল্যান্ডস',
'NO' => 'নরওয়ে',
'NP' => 'নেপাল',
'NR' => 'নাউরু',
'NZ' => 'নিউজিল্যান্ড',
'OM' => 'ওমান',
'PK' => 'পাকিস্তান',
'PA' => 'পানামা',
'PE' => 'পেরু',
'PH' => 'ফিলিপাইন',
'PW' => 'পালাউ',
'PG' => 'পাপুয়া নিউ গিনি',
'PL' => 'পোল্যান্ড',
'KP' => 'উত্তর কোরিয়া',
'PT' => 'পর্তুগাল',
'PY' => 'প্যারাগুয়ে',
'QA' => 'কাতার',
'RO' => 'রোমানিয়া',
'RU' => 'রাশিয়া',
'RW' => 'রুয়ান্ডা',
'SA' => 'সৌদি আরব',
'SD' => 'সুদান',
'SN' => 'সেনেগাল',
'SG' => 'সিঙ্গাপুর',
'SB' => 'সলোমন দ্বীপপুঞ্জ',
'SL' => 'সিয়েরা লিওন',
'SV' => 'এল সালভাদোর',
'SM' => 'সান মেরিনো',
'SO' => 'সোমালিয়া',
'RS' => 'সার্বিয়া',
'SS' => 'দক্ষিণ সুদান',
'ST' => 'সাও টোমে এবং প্রানসিপে',
'SR' => 'সুরিনাম',
'SK' => 'স্লোভাকিয়া',
'SI' => 'স্লোভেনিয়া',
'SE' => 'সুইডেন',
'SZ' => 'সোয়াজিল্যান্ড',
'SC' => 'সেচেলস',
'SY' => 'সিরিয়া',
'TD' => 'চাদ',
'TG' => 'টোগো',
'TH' => 'থাইল্যান্ড',
'TJ' => 'তাজিকিস্তান',
'TM' => 'তুর্কমেনিস্তান',
'TL' => 'টিমর-লেস্টে',
'TO' => 'টঙ্গা',
'TT' => 'ত্রিনিদাদ ও টোবাগো',
'TN' => 'তিউনিসিয়া',
'TR' => 'তুরস্ক',
'TV' => 'টুভালু',
'TZ' => 'তানজানিয়া',
'UG' => 'উগান্ডা',
'UA' => 'ইউক্রেন',
'UY' => 'উরুগুয়ে',
'US' => 'মার্কিন যুক্তরাষ্ট্র',
'UZ' => 'উজবেকিস্তান',
'VA' => 'ভ্যাটিকান সিটি',
'VC' => 'সেন্ট ভিনসেন্ট ও গ্রেনাডাইনস',
'VE' => 'ভেনিজুয়েলা',
'VN' => 'ভিয়েতনাম',
'VU' => 'ভানুয়াতু',
'WS' => 'সামোয়া',
'YE' => 'ইয়ামেন',
'ZA' => 'দক্ষিণ আফ্রিকা',
'ZM' => 'জাম্বিয়া',
'ZW' => 'জিম্বাবুয়ে',
];

21
app/config/locale/bn.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"জ্ঞানী হওয়ার শিল্প হলো কোন বিষয়টিকে উপেক্ষা করা উচিত তা জানার শিল্প"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'bn',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => '%s টীম',
'auth.emails.confirm.title' => 'অ্যাকাউন্ট নিশ্চিতকরণ',
'auth.emails.confirm.body' => 'bn.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'পাসওয়ার্ড রিসেট',
'auth.emails.recovery.body' => 'bn.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'আমন্ত্রণ %s এই টীম-এ যেটি এখানের %s',
'auth.emails.invitation.body' => 'bn.email.auth.invitation.tpl',
'locale.country.unknown' => 'অজানা',
'countries' => include 'bn.countries.php',
'continents' => include 'bn.continents.php',
];

View file

@ -145,7 +145,7 @@ return [
'KP' => 'Corea del Norte',
'PT' => 'Portugal',
'PY' => 'Paraguay',
'QA' => 'Katar',
'QA' => 'Catar',
'RO' => 'Rumania',
'RU' => 'Rusia',
'RW' => 'Ruanda',

View file

@ -1,7 +1,7 @@
<?php
return [
'AF' => 'अफ्रीका',
'AF' => 'अफ्रीका',
'AN' => 'अंटार्कटिका',
'AS' => 'एशिया',
'EU' => 'यूरोप',

View file

@ -1,7 +1,7 @@
<?php
return [
'settings.inspire' => '"यह जान लेना की क्या अनदेखा किया जा सकता है, ही बुद्धिमता का प्रतीक है |"', // This is the line printed in the homepage and console 'view-source'
'settings.inspire' => '"बुद्धिमान होने की कला यह जानने की कला है कि क्या अनदेखा करना चाहिए |"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'hi',
'settings.direction' => 'ltr',

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Աֆրիկա',
'AN' => 'Անտարկտիկա',
'AS' => 'Ասիա',
'EU' => 'Եվրոպա',
'NA' => 'Հյուսիսային Ամերիկա',
'OC' => 'Օկեանիա',
'SA' => 'Հարավային Ամերիկա',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'Աֆղանստան',
'AO' => 'Անգոլա',
'AL' => 'Ալբանիա',
'AD' => 'Անդորա',
'AE' => 'Արաբական Միացյալ Էմիրություններ',
'AR' => 'Արգենտինա',
'AM' => 'Հայաստան',
'AG' => 'Անտիգուա և Բարբուդա',
'AU' => 'Ավստրալիա',
'AT' => 'Ավստրիա',
'AZ' => 'Ադրբեջան',
'BI' => 'Բուրունդի',
'BE' => 'Բելգիա',
'BJ' => 'Բենին',
'BF' => 'Բուրկինա Ֆասո',
'BD' => 'Բանգլադեշ',
'BG' => 'Բուլղարիա',
'BH' => 'Բահրեին',
'BS' => 'Բահամյան Կղզիներ',
'BA' => 'Բոսնիա և Հերցոգովինա',
'BY' => 'Բելառուս',
'BZ' => 'Բեյլիզ',
'BO' => 'Բոլիվիա',
'BR' => 'Բրազիլիա',
'BB' => 'Բարբադոս',
'BN' => 'Բրունեյ',
'BT' => 'Բութան',
'BW' => 'Բոթսվանա',
'CF' => 'Կենտրոնաֆրիկյան Հանրապետություն',
'CA' => 'Կանադա',
'CH' => 'Շվեցարիա',
'CL' => 'Չիլի',
'CN' => 'Չինաստան',
'CI' => 'Կոտ դ\'Իվուար',
'CM' => 'Կամերուն',
'CD' => 'Կոնգոյի Դեմոկրատական Հանրապետություն',
'CG' => 'Կոնգոյի Հանրապետություն',
'CO' => 'Կոլումբիա',
'KM' => 'Կոմորյան կղզիներ',
'CV' => 'Կաբո-Վերդե',
'CR' => 'Կոստա-Ռիկա',
'CU' => 'Կուբա',
'CY' => 'Կիպրոս',
'CZ' => 'Չեխիա',
'DE' => 'Գերմանիա',
'DJ' => 'Ջիբութի',
'DM' => 'Դոմինիկա',
'DK' => 'Դանիա',
'DO' => 'Դոմինիկյան Հանրապետություն',
'DZ' => 'Ալժիր',
'EC' => 'Էկվադոր',
'EG' => 'Եգիպտոս',
'ER' => 'Էրիթրեյա',
'ES' => 'Իսպանիա',
'EE' => 'Էստոնիա',
'ET' => 'Եփովպիա',
'FI' => 'Ֆինլանդիա',
'FJ' => 'Ֆիջի',
'FR' => 'Ֆրանսիա',
'FM' => 'Միկրոնեզիա',
'GA' => 'Գաբոն',
'GB' => 'Մեծ Բրիտանիա',
'GE' => 'Վրաստան',
'GH' => 'Գանա',
'GN' => 'Գվինեա',
'GM' => 'Գամբիա',
'GW' => 'Գվինեա Բիսաու',
'GQ' => 'Հասարակածային Գվինեա',
'GR' => 'Հունաստան',
'GD' => 'Գրենադա',
'GT' => 'Գվատեմալա',
'GY' => 'Գայանա',
'HN' => 'Գոնդուրաս',
'HR' => 'Խորվաթիա',
'HT' => 'Հաիթի',
'HU' => 'Վենգերիա',
'ID' => 'Ինդոնեզիա',
'IN' => 'Հնդկաստան',
'IE' => 'Իռլանդիա',
'IR' => 'Իրան',
'IQ' => 'Իրաք',
'IS' => 'Իսլանդիա',
'IL' => 'Իսրաել',
'IT' => 'Իտալիս',
'JM' => 'Ճամայկա',
'JO' => 'Հորդանան',
'JP' => 'Ճապոնիա',
'KZ' => 'Ղազախստան',
'KE' => 'Քենիա',
'KG' => 'Ղրղզստան',
'KH' => 'Կամբոջա',
'KI' => 'Կիրիբաթի',
'KN' => 'Սենտ-Կիտս և Նևիս',
'KR' => 'Հարավային Կորեա',
'KW' => 'Քուվեյթ',
'LA' => 'Լաոս',
'LB' => 'Լիբանան',
'LR' => 'Լիբերիա',
'LY' => 'Լիբիա',
'LC' => 'Սենտ-Լյուսիա',
'LI' => 'Լիխտենշտեյն',
'LK' => 'Շրի Լանկա',
'LS' => 'Լեսոտո',
'LT' => 'Լիտվա',
'LU' => 'Լյուսկեմբուրգ',
'LV' => 'Լատվիա',
'MA' => 'Մարոկո',
'MC' => 'Մոնակո',
'MD' => 'Մոլդովա',
'MG' => 'Մադագասկար',
'MV' => 'Մալդիվներ',
'MX' => 'Մեքսիկա',
'MH' => 'Մարշալյան կղզիներ',
'MK' => 'Մակեդոնիա',
'ML' => 'Մալի',
'MT' => 'Մալթա',
'MM' => 'Մյանմա',
'ME' => 'Չերնոգորիա',
'MN' => 'Մոնղոլիա',
'MZ' => 'Մոզամբիկ',
'MR' => 'Մավրիտանիա',
'MU' => 'Մավրիկիոս',
'MW' => 'Մալիվի',
'MY' => 'Մալազիա',
'NA' => 'Նամիբիա',
'NE' => 'Նիգեր',
'NG' => 'Նիգերիա',
'NI' => 'Նիկարագուա',
'NL' => 'Նիդեռլանդներ',
'NO' => 'Նորվեգիա',
'NP' => 'Նեպալ',
'NR' => 'Նաուրու',
'NZ' => 'Նոր Զելանդիա',
'OM' => 'Օման',
'PK' => 'Պակիստան',
'PA' => 'Պանամա',
'PE' => 'Պերու',
'PH' => 'Ֆիլիպիններ',
'PW' => 'Պալաու',
'PG' => 'Պապուա Նոր Գվինեա',
'PL' => 'Լեհաստան',
'KP' => 'Հյուսիսային Կորեա',
'PT' => 'Պորտուգալիա',
'PY' => 'Պարագվայ',
'QA' => 'Քաթար',
'RO' => 'Ռումինիա',
'RU' => 'Ռուսաստան',
'RW' => 'Ռուանդա',
'SA' => 'Սաուդյան Արաբիա',
'SD' => 'Սուդան',
'SN' => 'Սենեգալ',
'SG' => 'Սինգապուր',
'SB' => 'Սողոմոնյան Կղզիներ',
'SL' => 'Սյերա Լեոնե',
'SV' => 'Էլ Սալվադոր',
'SM' => 'Սան Մարինո',
'SO' => 'Սոմալի',
'RS' => 'Սերբիա',
'SS' => 'Հարավային Սուդան',
'ST' => 'Սան-Տոմե և Պրինսիպի',
'SR' => 'Սուրինամ',
'SK' => 'Սլովակիա',
'SI' => 'Սլովենիա',
'SE' => 'Շվեցիա',
'SZ' => 'Սվազիլենդ',
'SC' => 'Սեյշելներ',
'SY' => 'Սիրիա',
'TD' => 'Չադ',
'TG' => 'Տոգո',
'TH' => 'Թայլանդ',
'TJ' => 'Տաջիկստան',
'TM' => 'Թուրքմենստան',
'TL' => 'Արևելյան Թիմոր',
'TO' => 'Տոնգա',
'TT' => 'Տրինիդադ և Տոբագո',
'TN' => 'Թունիս',
'TR' => 'Թուրքիա',
'TV' => 'Տուվալու',
'TZ' => 'Տանզանիա',
'UG' => 'Ուգանդա',
'UA' => 'Ուկրաինա',
'UY' => 'Ուրիուգվայ',
'US' => 'Ամերիկայի Միացյալ Նահանգներ',
'UZ' => 'Ուզբեկստան',
'VA' => 'Վատիկան',
'VC' => 'Սենտ-Վինսենթ և Գրենադիններ',
'VE' => 'Վենեսուելլա',
'VN' => 'Վիետնամ',
'VU' => 'Վանուատու',
'WS' => 'Սամոա',
'YE' => 'Եմեն',
'ZA' => 'Հարավաֆրիկյան Հանրապետություն',
'ZM' => 'Զամբիա',
'ZW' => 'Զիմբաբվե',
];

20
app/config/locale/hy.php Normal file
View file

@ -0,0 +1,20 @@
<?php
return [
'settings.inspire' => '"Искусство быть мудрым — это искусство знать, чем можно пренебречь."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'ru',
'settings.direction' => 'ltr',
'auth.emails.team' => 'Թիմ %s',
'auth.emails.confirm.title' => 'Հաշվեհամարի հաստատում',
'auth.emails.confirm.body' => 'hy.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Գաղտնաբառի փոփոխում',
'auth.emails.recovery.body' => 'hy.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Հրավիրում ենք %s թիմ, %s պրոեկտի համար',
'auth.emails.invitation.body' => 'hy.email.auth.invitation.tpl',
'locale.country.unknown' => 'Անհայտ',
'countries' => include 'hy.countries.php',
'continents' => include 'hy.continents.php',
];

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'アフリカ',
'AN' => '南極',
'AS' => 'アジア',
'EU' => 'ヨーロッパ',
'NA' => '北米',
'OC' => 'オセアニア',
'SA' => '南アメリカ',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'アフガニスタン',
'AO' => 'アンゴラ',
'AL' => 'アルバニア',
'AD' => 'アンドラ',
'AE' => 'アラブ首長国連邦',
'AR' => 'アルゼンチン',
'AM' => 'アルメニア',
'AG' => 'アンチグアバーブーダ',
'AU' => 'オーストラリア',
'AT' => 'オーストリア',
'AZ' => 'アゼルバイジャン',
'BI' => 'ブルンディ',
'BE' => 'ベルギー',
'BJ' => 'ベニン',
'BF' => 'ブルキナファソ',
'BD' => 'バングラデシュ',
'BG' => 'ブルガリア',
'BH' => 'バーレーン',
'BS' => 'バハマ',
'BA' => 'ボスニア・ヘルツェゴビナ',
'BY' => 'ベラルーシ',
'BZ' => 'ベリーズ',
'BO' => 'ボリビア',
'BR' => 'ブラジル',
'BB' => 'バルバドス',
'BN' => 'ブルネイ',
'BT' => 'ブータン',
'BW' => 'ボツワナ',
'CF' => '中央アフリカ共和国',
'CA' => 'カナダ',
'CH' => 'スイス',
'CL' => 'チリ',
'CN' => '中国',
'CI' => 'コートジボワール',
'CM' => 'カメルーン',
'CD' => 'DRコンゴ',
'CG' => 'コンゴ共和国',
'CO' => 'コロンビア',
'KM' => 'コモロ',
'CV' => 'カーボベルデ',
'CR' => 'コスタリカ',
'CU' => 'キューバ',
'CY' => 'キプロス',
'CZ' => 'チェコ',
'DE' => 'ドイツ',
'DJ' => 'ジブチ',
'DM' => 'ドミニカ',
'DK' => 'デンマーク',
'DO' => 'ドミニカ共和国',
'DZ' => 'アルジェリア',
'EC' => 'エクアドル',
'EG' => 'エジプト',
'ER' => 'エリトリア',
'ES' => 'スペイン',
'EE' => 'エストニア',
'ET' => 'エチオピア',
'FI' => 'フィンランド',
'FJ' => 'フィジー',
'FR' => 'フランス',
'FM' => 'ミクロネシア',
'GA' => 'ガボン',
'GB' => 'イギリス',
'GE' => 'ジョージア',
'GH' => 'ガーナ',
'GN' => 'ギニア',
'GM' => 'ガンビア',
'GW' => 'ギニアビサウ',
'GQ' => '赤道ギニア',
'GR' => 'ギリシャ',
'GD' => 'グレナダ',
'GT' => 'グアテマラ',
'GY' => 'ガイアナ',
'HN' => 'ホンジュラス',
'HR' => 'クロアチア',
'HT' => 'ハイチ',
'HU' => 'ハンガリー',
'ID' => 'インドネシア',
'IN' => 'インド',
'IE' => 'アイルランド',
'IR' => 'イラン',
'IQ' => 'イラク',
'IS' => 'アイスランド',
'IL' => 'イスラエル',
'IT' => 'イタリア',
'JM' => 'ジャマイカ',
'JO' => 'ヨルダン',
'JP' => '日本',
'KZ' => 'カザフスタン',
'KE' => 'ケニア',
'KG' => 'キルギスタン',
'KH' => 'カンボジア',
'KI' => 'キリバティ',
'KN' => 'セントクリストファー・ネイビス',
'KR' => '韓国',
'KW' => 'クウェート',
'LA' => 'ラオス',
'LB' => 'レバノン',
'LR' => 'リベリア',
'LY' => 'リビア',
'LC' => 'セントルシア',
'LI' => 'リヒテンシュタイン',
'LK' => 'スリランカ',
'LS' => 'レソト',
'LT' => 'リトアニア',
'LU' => 'ルクセンブルク',
'LV' => 'ラトビア',
'MA' => 'モロッコ',
'MC' => 'モナコ',
'MD' => 'モルドバ',
'MG' => 'マダガスカル',
'MV' => 'モルディブ',
'MX' => 'メキシコ',
'MH' => 'マーシャル諸島',
'MK' => 'マケドニア',
'ML' => 'マリ',
'MT' => 'マルタ',
'MM' => 'ミャンマー',
'ME' => 'モンテネグロ',
'MN' => 'モンゴル',
'MZ' => 'モザンビーク',
'MR' => 'モーリタニア',
'MU' => 'モーリシャス',
'MW' => 'マラウィ',
'MY' => 'マレーシア',
'NA' => 'ナミビア',
'NE' => 'ニジェール',
'NG' => 'ナイジェリア',
'NI' => 'ニカラグア',
'NL' => 'オランダ',
'NO' => 'ノルウェー',
'NP' => 'ネパール',
'NR' => 'ナウル',
'NZ' => 'ニュージーランド',
'OM' => 'オマーン',
'PK' => 'パキスタン',
'PA' => 'パナマ',
'PE' => 'ペルー',
'PH' => 'フィリピン',
'PW' => 'パラオ',
'PG' => 'パプアニューギニア',
'PL' => 'ポーランド',
'KP' => '北朝鮮',
'PT' => 'ポルトガル',
'PY' => 'パラグアイ',
'QA' => 'カタール',
'RO' => 'ルーマニア',
'RU' => 'ロシア',
'RW' => 'ルワンダ',
'SA' => 'サウジアラビア',
'SD' => 'スーダン',
'SN' => 'セネガル',
'SG' => 'シンガポール',
'SB' => 'ソロモン諸島',
'SL' => 'シエラレオネ',
'SV' => 'エルサルバドル',
'SM' => 'サンマリノ',
'SO' => 'ソマリア',
'RS' => 'セルビア',
'SS' => '南スーダン',
'ST' => 'サントメとプリンシペ',
'SR' => 'スリナム',
'SK' => 'スロバキア',
'SI' => 'スロベニア',
'SE' => 'スウェーデン',
'SZ' => 'スワジランド',
'SC' => 'セイシェル',
'SY' => 'シリア',
'TD' => 'チャド',
'TG' => 'トーゴ',
'TH' => 'タイ',
'TJ' => 'タジキスタン',
'TM' => 'トルクメニスタン',
'TL' => '東ティモール民主共和国',
'TO' => 'トンガ',
'TT' => 'トリニダード・トバゴ',
'TN' => 'チュニジア',
'TR' => 'トルコ',
'TV' => 'ツバル',
'TZ' => 'タンザニア',
'UG' => 'ウガンダ',
'UA' => 'ウクライナ',
'UY' => 'ウルグアイ',
'US' => 'アメリカ',
'UZ' => 'ウズベキスタン',
'VA' => 'バチカン',
'VC' => 'セントビンセントおよびグレナディーン諸島',
'VE' => 'ベネズエラ',
'VN' => 'ベトナム',
'VU' => 'バヌアツ',
'WS' => 'サモア',
'YE' => 'イエメン',
'ZA' => '南アフリカ',
'ZM' => 'ザンビア',
'ZW' => 'ジンバブエ',
];

21
app/config/locale/ja.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"賢明になる術は何を捨てるべきかを心得る術である。"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'ja',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => '%s チーム',
'auth.emails.confirm.title' => 'アカウント確認のお願い',
'auth.emails.confirm.body' => 'ja.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'パスワード再設定のお願い',
'auth.emails.recovery.body' => 'ja.email.auth.recovery.tpl',
'auth.emails.invitation.title' => '%s チーム(%s プロジェクト)への招待',
'auth.emails.invitation.body' => 'ja.email.auth.invitation.tpl',
'locale.country.unknown' => '不明',
'countries' => include 'ja.countries.php',
'continents' => include 'ja.continents.php',
];

View file

@ -1,7 +1,7 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.inspire' => '"Vishet är konsten att förstå vad man ska förbise."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'sv',
'settings.direction' => 'ltr',

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
হ্যালো {{name}},
<br />
<br />
এই লিংকটি অনুসরণ করুন আপনার ইমেইল এড্রেস যাচাই করতে |
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
আপনি যদি আপনার ইমেইল এড্রেস যাচাই করতে অনুরোধ করেননি, আপনি এই মেসেজটি অগ্রাহ্য করতে পারেন |
<br />
<br />
ধন্যবাদান্তে,
<br />
{{project}} টীম
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hello,
<br />
<br />
এই মেইলটি আপনাকে পাঠানো হয়েছে কারণ <b>{{owner}}</b> আমন্ত্রণ করেছেন আপনাকে <b>{{team}}</b> এই টীমর মেম্বার হতে যেটি {{project}} এই প্রজেক্টর অন্তর্গত |
<br />
<br />
এই লিংকটি অনুসরণ করুন <b>{{team}}</b> এই টীম-এ যোগ দিতে:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
আপনি যদি অনাগ্রহী হন, এই মেসেজটি অগ্রাহ্য করতে পারেন |
<br />
<br />
ধন্যবাদান্তে,
<br />
{{project}} টীম
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
হ্যালো {{name}},
<br />
<br />
এই লিংকটি অনুসরণ করুন আপনার {{project}} পাসওয়ার্ড রিসেট করতে |
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
আপনি যদি পাসওয়ার্ড রিসেট করতে অনুরোধ করেননি, আপনি এই মেসেজটি অগ্রাহ্য করতে পারেন |
<br />
<br />
ধন্যবাদান্তে,
<br />
{{project}} টীম
</div>

View file

@ -10,7 +10,7 @@
नमस्ते,
<br />
<br />
यह मेल आपको इसलिए भेजा गया था क्योंकि <b>{{owner}}</b> आपको टीम मेंबर बनने के लिए आमंत्रित करना चाहता है <b>{{team}}</b> टीम के लिए {{project}} प्रोजेक्ट पर
यह मेल आपको इसलिए भेजा गया था क्योंकि <b>{{owner}}</b> आपको {{project}} के लिए <b>{{team}}</b> टीम में टीम मेंबर बनने के लिए आमंत्रित करना चाहते थे।
<br />
<br />
टीम <b>{{team}}</b> ज्वाइन करने के लिए इस लिंक पर क्लिक करे :

View file

@ -10,7 +10,7 @@
नमस्ते {{name}},
<br />
<br />
{{project}} का पासवर्ड रिसेट करने के लिए लिंक पर क्लिक करे
{{project}} का पासवर्ड रिसेट करने के लिए इस लिंक पर क्लिक करे
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Ողջույն, {{name}},
<br />
<br />
Անցեք հղումով, որպեսզի հաստատեք Ձեր էլեկտրոնային հասցեն։
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Եթե չեք պահանջել էլեկտրոնային հասցեի հաստատում, պարզապես արհամարհեք այս նամակը։
<br />
<br />
Շնորհակալություն,
<br />
{{project}} թիմ
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Ողջույն,
<br />
<br />
Դուք ստացել եք այս նամակը, քանի որ <b>{{owner}}-ը</b> հրավիրում է Ձեզ <b>{{team}}</b> խումբ, {{project}} պրոեկտում։
<br />
<br />
Անցեք հղումով, որ միանաք <b>{{team}}</b> թիմին՝
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Եթե հետաքրքրված չեք դրանով, պարզապես արհամարհեք այս նամակը։
<br />
<br />
Շնորհակալություն,
<br />
{{project}} թիմ
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Ողջույն, {{name}},
<br />
<br />
Անցեք հղումով, որպեսզի փոխեք գաղտնաբառը {{project}} պրոեկտի համար։
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Եթե չեք պահանջել գաղտնաբառի փոփոխություն, արհամարհեք այս նամակը։
<br />
<br />
Շնորհակալություն
<br />
{{project}} թիմ
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
{{name}}さん こんにちは。
<br />
<br />
下記のリンクからメールアドレスを認証してください。
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
お手数ですが、心当たりがない場合このメールを破棄してください。
<br />
<br />
ありがとうございます。
<br />
{{project}} チーム
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
こんにちは。
<br />
<br />
<b>{{owner}}</b> さんから {{project}} プロジェクトの <b>{{team}}</b> チームへの参加招待が届きました。
<br />
<br />
下記のリンクから <b>{{team}}</b> へ参加してください。
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
お手数ですが、心当たりがない場合このメールを破棄してください。
<br />
<br />
ありがとうございます。
<br />
{{project}} チーム
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
{{name}}さん こんにちは。
<br />
<br />
下記のリンクから {{project}} プロジェクトのパスワードを再設定してください。
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
お手数ですが、心当たりがない場合このメールを破棄してください。
<br />
<br />
ありがとうございます。
<br />
{{project}} チーム
</div>

View file

@ -15,10 +15,10 @@
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Se a confirmação de email não foi solicitada por você, ignore esta mensagem.
Caso a confirmação de email não foi solicitada por você, ignore esta mensagem.
<br />
<br />
Atenciosamente,
<br />
Equipe {{project}}
</div>
</div>

View file

@ -10,15 +10,15 @@
Olá,
<br />
<br />
Este email foi enviado a você porque <br>{{owner}} deseja convida-lo para se tornar membro da equipe <b>{{team}}<b> no {{project}}.
Este email foi enviado a você porque <br>{{owner}} deseja convidá-lo para se tornar membro da equipe <b>{{team}}<b> no {{project}}.
<br />
<br />
Siga o link abaixo para se juntar a equipe <b>{{team}}<b>:
Entre no link abaixo para se juntar a equipe <b>{{team}}<b>:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Se não estiver interessado, por favor ignore esta mensagem.
Caso não estiver interessado, por favor ignore esta mensagem.
<br />
<br />
Atenciosamente,

View file

@ -15,7 +15,7 @@
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Se você não solicitou a redefinição de senha, por favor ignore esta mensagem.
Caso você não solicitou a redefinição de senha, por favor ignore esta mensagem.
<br />
<br />
Atenciosamente,

View file

@ -10,7 +10,7 @@
Olá,
<br />
<br />
Recebeu este email porque <br>{{owner}} deseja convida-lo a tornar-se membro da equipa <b>{{team}}<b> no {{project}}.
Recebeu este email porque <br>{{owner}} deseja convidá-lo a tornar-se membro da equipa <b>{{team}}<b> no {{project}}.
<br />
<br />
Use este link para se juntar à equipa <b>{{team}}<b>:
@ -23,5 +23,5 @@
<br />
Com os melhores cumprimentos,
<br />
Equipe {{project}}
Equipa {{project}}
</div>

View file

@ -13,31 +13,31 @@ return [
],
'v1/account' => [
'name' => 'Account',
'description' => '/docs/service/account.md',
'description' => '/docs/services/account.md',
'controller' => 'controllers/account.php',
'sdk' => true,
],
'v1/auth' => [ // Add to docs later: You can also learn how to [configure support for our supported OAuth providers](/docs/oauth)
'name' => 'Auth',
'description' => '/docs/service/auth.md',
'description' => '/docs/services/auth.md',
'controller' => 'controllers/auth.php',
'sdk' => true,
],
'v1/avatars' => [
'name' => 'Avatars',
'description' => '/docs/service/avatars.md',
'description' => '/docs/services/avatars.md',
'controller' => 'controllers/avatars.php',
'sdk' => true,
],
'v1/database' => [
'name' => 'Database',
'description' => '/docs/service/database.md',
'description' => '/docs/services/database.md',
'controller' => 'controllers/database.php',
'sdk' => true,
],
'v1/locale' => [
'name' => 'Locale',
'description' => '/docs/service/locale.md',
'description' => '/docs/services/locale.md',
'controller' => 'controllers/locale.php',
'sdk' => true,
],
@ -53,19 +53,19 @@ return [
],
'v1/storage' => [
'name' => 'Storage',
'description' => '/docs/service/storage.md',
'description' => '/docs/services/storage.md',
'controller' => 'controllers/storage.php',
'sdk' => true,
],
'v1/teams' => [
'name' => 'Teams',
'description' => '/docs/service/teams.md',
'description' => '/docs/services/teams.md',
'controller' => 'controllers/teams.php',
'sdk' => true,
],
'v1/users' => [
'name' => 'Users',
'description' => '/docs/service/users.md',
'description' => '/docs/services/users.md',
'controller' => 'controllers/users.php',
'sdk' => true,
],

View file

@ -310,8 +310,8 @@ $utopia->post('/v1/auth/login')
->label('abuse-key', 'url:{url},email:{param-email}')
->param('email', '', function () { return new Email(); }, 'User account email address')
->param('password', '', function () { return new Password(); }, 'User account password')
->param('success', null, function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a successful login attempt.')
->param('failure', null, function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a failed login attempt.')
->param('success', null, function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a successful login attempt.', true)
->param('failure', null, function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a failed login attempt.', true)
->action(
function ($email, $password, $success, $failure) use ($response, $request, $projectDB, $audit, $webhook) {
$profile = $projectDB->getCollection([ // Get user by email address
@ -597,6 +597,7 @@ $utopia->get('/v1/auth/oauth/:provider')
->label('sdk.namespace', 'auth')
->label('sdk.method', 'oauth')
->label('sdk.location', true)
->label('sdk.cookies', true)
->label('abuse-limit', 50)
->label('abuse-key', 'ip:{ip}')
->param('provider', '', function () use ($providers) { return new WhiteList(array_keys($providers)); }, 'OAuth Provider')

View file

@ -197,9 +197,13 @@ $utopia->get('/console/storage')
->desc('Platform console project settings')
->label('permission', 'public')
->label('scope', 'console')
->action(function () use ($layout) {
->action(function () use ($request, $layout) {
$page = new View(__DIR__.'/../views/console/storage/index.phtml');
$page
->setParam('home', $request->getServer('_APP_HOME', ''))
;
$layout
->setParam('title', APP_NAME.' - Storage')
->setParam('body', $page);

View file

@ -327,7 +327,7 @@ $utopia->post('/v1/users')
);
$utopia->patch('/v1/users/:userId/status')
->desc('Update user status')
->desc('Update User Status')
->label('scope', 'users.write')
->label('sdk.namespace', 'users')
->label('sdk.method', 'updateUserStatus')
@ -356,7 +356,7 @@ $utopia->patch('/v1/users/:userId/status')
);
$utopia->patch('/v1/users/:userId/prefs')
->desc('Update Account Prefs')
->desc('Update User Prefs')
->label('scope', 'users.write')
->label('sdk.namespace', 'users')
->label('sdk.method', 'updateUserPrefs')

View file

@ -24,7 +24,7 @@ const APP_EMAIL_TEAM = 'team@'.APP_DOMAIN;
const APP_EMAIL_SECURITY = 'security@'.APP_DOMAIN;
const APP_USERAGENT = APP_NAME.'-Server/%s Please report abuse at '.APP_EMAIL_SECURITY;
const APP_MODE_ADMIN = 'admin';
const APP_LOCALES = ['af', 'ar', 'cat', 'cz', 'de', 'en', 'es', 'fi', 'fr', 'gr', 'he', 'hi', 'hu', 'id', 'it', 'jv', 'lt', 'nl', 'no', 'pl', 'pt-br', 'pt-pt', 'ro', 'ru', 'si', 'sl', 'sv', 'ta', 'tr', 'ua', 'vi', 'zh-cn', 'zh-tw'];
const APP_LOCALES = ['af', 'ar', 'bn', 'cat', 'cz', 'de', 'en', 'es', 'fi', 'fr', 'gr', 'he', 'hi', 'hu', 'hy', 'id', 'it', 'ja', 'jv', 'lt', 'nl', 'no', 'pl', 'pt-br', 'pt-pt', 'ro', 'ru', 'si', 'sl', 'sv', 'ta', 'tr', 'ua', 'vi', 'zh-cn', 'zh-tw'];
const APP_PAGING_LIMIT = 15;
const APP_VERSION_STABLE = '0.2.0';
@ -130,6 +130,7 @@ Locale::$exceptions = false;
Locale::setLanguage('af', include __DIR__.'/config/locale/af.php');
Locale::setLanguage('ar', include __DIR__.'/config/locale/ar.php');
Locale::setLanguage('bn', include __DIR__.'/config/locale/bn.php');
Locale::setLanguage('cat', include __DIR__.'/config/locale/cat.php');
Locale::setLanguage('cz', include __DIR__.'/config/locale/cz.php');
Locale::setLanguage('de', include __DIR__.'/config/locale/de.php');
@ -141,8 +142,10 @@ Locale::setLanguage('gr', include __DIR__.'/config/locale/gr.php');
Locale::setLanguage('he', include __DIR__.'/config/locale/he.php');
Locale::setLanguage('hi', include __DIR__.'/config/locale/hi.php');
Locale::setLanguage('hu', include __DIR__.'/config/locale/hu.php');
Locale::setLanguage('hy', include __DIR__.'/config/locale/hy.php');
Locale::setLanguage('id', include __DIR__.'/config/locale/id.php');
Locale::setLanguage('it', include __DIR__.'/config/locale/it.php');
Locale::setLanguage('jv', include __DIR__.'/config/locale/ja.php');
Locale::setLanguage('jv', include __DIR__.'/config/locale/jv.php');
Locale::setLanguage('lt', include __DIR__.'/config/locale/lt.php');
Locale::setLanguage('nl', include __DIR__.'/config/locale/nl.php');

View file

@ -23,7 +23,7 @@ class Client {
}
/// Your Appwrite project ID. You can find your project ID in your Appwrite console project settings.
/// Your Appwrite project ID
Client setProject(value) {
this.addHeader('X-Appwrite-Project', value);
@ -31,7 +31,7 @@ class Client {
}
/// Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard.
/// Your Appwrite project secret key
Client setKey(value) {
this.addHeader('X-Appwrite-Key', value);

View file

@ -19,7 +19,7 @@ To install via [NPM](https://www.npmjs.com/):
npm install appwrite --save
```
If you're using a bundler (like Browserify or webpack), you can import the Appwrite module when you need it:
If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it:
```js
import * as Appwrite from "appwrite";
@ -33,6 +33,22 @@ To install with a CDN (content delivery network) add the following scripts to th
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.23"></script>
```
## Getting Started
Initialise the Appwrite SDK in your code, and setup your API credentials:
```js
// Init your JS SDK
var appwrite = new Appwrite();
appwrite
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
.setProject('455x34dfkj') // Your Appwrite Project UID
;
```
## License
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

View file

@ -25,8 +25,7 @@
/**
* Set Project
*
* Your Appwrite project ID. You can find your project ID in your Appwrite
\ * console project settings.
* Your Appwrite project ID
*
* @param value string
*
@ -44,8 +43,7 @@
/**
* Set Key
*
* Your Appwrite project secret key. You can can create a new API key from
\ * your Appwrite console API keys dashboard.
* Your Appwrite project secret key
*
* @param value string
*

View file

@ -10,7 +10,7 @@ client
.setKey('')
;
let promise = projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');
let promise = projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
promise.then(function (response) {
console.log(response);

View file

@ -10,7 +10,7 @@ client
.setKey('')
;
let promise = projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');
let promise = projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
promise.then(function (response) {
console.log(response);

View file

@ -15,7 +15,7 @@ class Client {
/**
* Set Project
*
* Your Appwrite project ID. You can find your project ID in your Appwrite console project settings.
* Your Appwrite project ID
*
* @param string value
*
@ -30,7 +30,7 @@ class Client {
/**
* Set Key
*
* Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard.
* Your Appwrite project secret key
*
* @param string value
*

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');

View file

@ -50,7 +50,7 @@ class Client
/**
* Set Project
*
* Your Appwrite project ID. You can find your project ID in your Appwrite console project settings.
* Your Appwrite project ID
*
* @param string $value
*
@ -66,7 +66,7 @@ class Client
/**
* Set Key
*
* Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard.
* Your Appwrite project secret key
*
* @param string $value
*

View file

@ -23,13 +23,13 @@ class Client:
return self
def set_project(self, value):
"""Your Appwrite project ID. You can find your project ID in your Appwrite console project settings."""
"""Your Appwrite project ID"""
self._global_headers['x-appwrite-project'] = value.lower()
return self
def set_key(self, value):
"""Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard."""
"""Your Appwrite project secret key"""
self._global_headers['x-appwrite-key'] = value.lower()
return self

View file

@ -45,6 +45,7 @@ $cli
'gitRepoName' => 'sdk-for-php',
'gitUserName' => 'appwrite',
'warning' => $warning,
'readme' => false,
'platform' => 'server',
],
'js' => [
@ -55,6 +56,7 @@ $cli
'gitRepoName' => 'sdk-for-js',
'gitUserName' => 'appwrite',
'warning' => $warning,
'readme' => realpath(__DIR__ . '/../../docs/sdks/js.md'),
'platform' => 'client',
],
'node' => [
@ -65,6 +67,7 @@ $cli
'gitRepoName' => 'sdk-for-node',
'gitUserName' => 'appwrite',
'warning' => $warning,
'readme' => false,
'platform' => 'server',
],
'python' => [
@ -75,6 +78,7 @@ $cli
'gitRepoName' => 'sdk-for-python',
'gitUserName' => 'appwrite',
'warning' => '**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**',
'readme' => false,
'platform' => 'server',
],
'ruby' => [
@ -85,6 +89,7 @@ $cli
'gitRepoName' => 'sdk-for-ruby',
'gitUserName' => 'appwrite',
'warning' => '**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**',
'readme' => false,
'platform' => 'server',
],
'dart' => [
@ -95,6 +100,7 @@ $cli
'gitRepoName' => 'sdk-for-dart',
'gitUserName' => 'appwrite',
'warning' => '**WORK IN PROGRESS - NOT READY FOR USAGE - Want to help us improve this client SDK? Send a pull request to Appwrite [SDK generator repository](https://github.com/appwrite/sdk-generator).**',
'readme' => false,
'platform' => 'client',
],
];
@ -176,8 +182,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
->setShareURL('http://appwrite.io')
->setShareTags('JS,javascript,reactjs,angular,ios,android')
->setShareVia('appwrite_io')
//->setWarning('**WORK IN PROGRESS - NOT READY FOR USAGE**')
->setWarning($client['warning'])
->setReadme(($client['readme'] && file_exists($client['readme'])) ? file_get_contents($client['readme']) : '')
;
$target = __DIR__.'/../sdks/git/'.$name;

View file

@ -238,7 +238,7 @@
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="session-delete"
data-success-redirect-url="/"
data-success-param-redirect-url="/"
data-failure="alert"
data-failure-param-alert-text="Logout from All Sessions Failed"
data-failure-param-alert-classname="error">

View file

@ -1,3 +1,6 @@
<?php
$home = $this->getParam('home', '');
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
Storage
@ -25,10 +28,10 @@
<label for="file-read">Files</label>
<input type="file" name="files" id="file-files" required>
<label for="file-read">Read Permissions</label>
<label for="file-read">Read Permissions (<a href="<?php echo $home; ?>/docs/permissions" target="_blank">Learn more</a>)</label>
<input type="hidden" id="file-read" name="read" required data-forms-tags data-cast-to="json" value="<?php echo htmlentities(json_encode(['*'])); ?>" />
<label for="file-write">Write Permissions</label>
<label for="file-write">Write Permissions (<a href="<?php echo $home; ?>/docs/permissions" target="_blank">Learn more</a>)</label>
<input type="hidden" id="file-write" name="write" required data-forms-tags data-cast-to="json" value="<?php echo htmlentities(json_encode(['*'])); ?>" />
<hr />
@ -116,10 +119,10 @@
</div>
<input type="hidden" name="folderId" id="files-folderId" data-cast-to="int" value="1">
<label for="file-read">Read Permissions</label>
<label for="file-read">Read Permissions (<a href="<?php echo $home; ?>/docs/permissions" target="_blank">Learn more</a>)</label>
<input type="hidden" id="file-read" name="read" required data-forms-tags data-cast-to="json" data-ls-bind="{{file.$permissions.read}}" />
<label for="file-write">Write Permissions</label>
<label for="file-write">Write Permissions (<a href="<?php echo $home; ?>/docs/permissions" target="_blank">Learn more</a>)</label>
<input type="hidden" id="file-write" name="write" required data-forms-tags data-cast-to="json" data-ls-bind="{{file.$permissions.write}}" />
<hr />

View file

@ -101,7 +101,10 @@ $providers = $this->getParam('providers', []);
<img src="" data-ls-attrs="src={{user|gravatar}}" data-size="45" alt="User Avatar" class="avatar pull-start" loading="lazy" width="30" height="30" />
</td>
<td data-title="Name: ">
<a data-ls-attrs="href=/console/users/view?id={{user.$uid}}&project={{router.params.project}}" data-ls-bind="{{user.name}}"></a>
<a data-ls-attrs="href=/console/users/view?id={{user.$uid}}&project={{router.params.project}}">
<span data-ls-bind="{{user.name}}"></span>
<span data-ls-if="{{user.name}} === ''">-----</span>
</a>
</td>
<td data-title="Email: ">
<small data-ls-bind="{{user.email}}"></span>
@ -364,7 +367,7 @@ $providers = $this->getParam('providers', []);
<?php echo ucfirst($provider); ?>
<span data-ls-if="
!{{console-project.usersOauth<?php echo ucfirst($provider); ?>Appid}} ||
!{{console-project.usersOauth<?php echo ucfirst($provider); ?>Secret}}" data-debug="1">
!{{console-project.usersOauth<?php echo ucfirst($provider); ?>Secret}}">
&nbsp;<span class="tag red">Disabled</span>
</span>
</span>

View file

@ -6,7 +6,7 @@
data-param-token="{{router.params.token}}"
data-param-user-id="{{router.params.userId}}"
data-success="redirect,alert,trigger"
data-success-redirect-url="/console"
data-success-param-redirect-url="/console"
data-success-alert="Confirmation Completed Successfully"
data-success-triggers="account.update"
data-failure="alert"

View file

@ -13,8 +13,8 @@
data-scope="console"
data-event="submit"
data-success="alert,redirect"
data-success-alert="Password Reset Completed"
data-success-redirect-url="/auth/signin"
data-success-param-alert="Password Reset Completed"
data-success-param-url="/auth/signin"
data-failure="alert"
data-failure-param-alert-text="Password Reset Failed"
data-failure-param-alert-classname="error">

View file

@ -13,7 +13,7 @@
data-event="submit"
data-success="trigger,redirect"
data-success-param-trigger-events="auth-register"
data-success-redirect-url="/console/setup"
data-success-param-redirect-url="/console/setup"
data-failure="alert"
data-failure-param-alert-text="Registration Failed. Please try again later"
data-failure-param-alert-classname="error">

12
composer.lock generated
View file

@ -12,12 +12,12 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-for-php.git",
"reference": "62d52f408ee13e152fd077c845de44bca07e6ca2"
"reference": "ac310ede83c8520c038fdab6e646322eb634d9e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/62d52f408ee13e152fd077c845de44bca07e6ca2",
"reference": "62d52f408ee13e152fd077c845de44bca07e6ca2",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/ac310ede83c8520c038fdab6e646322eb634d9e3",
"reference": "ac310ede83c8520c038fdab6e646322eb634d9e3",
"shasum": ""
},
"require": {
@ -39,7 +39,7 @@
"BSD-3-Clause"
],
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"time": "2019-10-09T08:32:30+00:00"
"time": "2019-10-09T10:26:29+00:00"
},
{
"name": "appwrite/php-clamav",
@ -92,7 +92,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
"reference": "14c25a8160c8dc4f97b87c4647bdff65c36aa474"
"reference": "45d82c2c53c38926a45c5e153aaa4794860954a0"
},
"require": {
"ext-curl": "*",
@ -122,7 +122,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2019-10-09 10:25:20"
"time": "2019-10-09 14:12:31"
},
{
"name": "bacon/bacon-qr-code",

View file

@ -0,0 +1,16 @@
let sdk = new Appwrite();
sdk
.setProject('')
;
/**
* Will redirect to relevant page
* depends on the operation result
*/
sdk.auth.login(
'email@example.com',
'password',
'http://example.com/success', // required for JS SDK
'http://example.com/failure' // required for JS SDK
);

View file

@ -0,0 +1,15 @@
let sdk = new Appwrite();
sdk
.setProject('')
;
/**
* Will redirect to relevant page
* depends on the operation result
*/
sdk.auth.oauth(
'facebook',
'http://example.com/success',
'http://example.com/failure'
);

View file

@ -0,0 +1,17 @@
let sdk = new Appwrite();
sdk
.setProject('')
;
/**
* Will redirect to relevant page
* depends on the operation result
*/
sdk.auth.register(
'email@example.com',
'password',
'http://example.com/confirm',
'http://example.com/success', // required for JS SDK
'http://example.com/failure' // required for JS SDK
);

View file

@ -1,3 +1,3 @@
This endpoint allows the user to request your app to resend him his email confirmation message. The redirect arguments acts the same way as in /auth/register endpoint.
This endpoint allows the user to request your app to resend him his email confirmation message. The redirect arguments act the same way as in /auth/register endpoint.
Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.
Please notice that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.

View file

@ -1,5 +1,5 @@
Allow the user to login into his account by providing a valid email and password combination. Use the success and failure arguments to provide a redirect URL\'s back to your app when login is completed.
Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.
Please notice that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
When accessing this route using Javascript from the browser, success and failure parameter URLs are required. Appwrite server will respond with a 301 redirect status code and will set the user session cookie. This behavior is enforced because modern browsers are limiting 3rd party cookies in XHR of fetch requests to protect user privacy.

View file

@ -1 +1 @@
Use this endpoint to log out the currently logged in user from his account. When succeed this endpoint will delete the user session and remove the session secret cookie from the user client.
Use this endpoint to log out the currently logged in user from his account. When successful this endpoint will delete the user session and remove the session secret cookie from the user client.

View file

@ -1,3 +1,3 @@
Use this endpoint to complete the user account password reset. Both the **userId** and **token** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the /auth/recovery endpoint.
Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.
Please notice that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.

View file

@ -1,7 +1,7 @@
Use this endpoint to allow a new user to register an account in your project. Use the success and failure URL's to redirect users back to your application after signup completes.
Use this endpoint to allow a new user to register an account in your project. Use the success and failure URLs to redirect users back to your application after signup completes.
If registration completes successfully user will be sent with a confirmation email in order to confirm he is the owner of the account email address. Use the confirmation parameter to redirect the user from the confirmation email back to your app. When the user is redirected, use the /auth/confirm endpoint to complete the account confirmation.
Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.
Please notice that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
When accessing this route using Javascript from the browser, success and failure parameter URLs are required. Appwrite server will respond with a 301 redirect status code and will set the user session cookie. This behavior is enforced because modern browsers are limiting 3rd party cookies in XHR of fetch requests to protect user privacy.

View file

@ -1 +1 @@
You can use this endpoint to show different browser icons to your users, The code argument receives the browser code as appear in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.
You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.

View file

@ -1 +1 @@
Need to display your users with your billing method or there payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
Need to display your users with your billing method or their payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.

View file

@ -1 +1 @@
You can use this endpoint to show different country flags icons to your users, The code argument receives the a 2 letter country code. Use width, height and quality arguments to change the output settings.
You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.

View file

@ -1 +1 @@
Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in cases, you want to make sure a 3rd party image is properly served using a TLS protocol.
Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.

15
docs/sdks/js.md Normal file
View file

@ -0,0 +1,15 @@
## Getting Started
Initialise the Appwrite SDK in your code, and setup your API credentials:
```js
// Init your JS SDK
var appwrite = new Appwrite();
appwrite
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
.setProject('455x34dfkj') // Your Appwrite Project UID
;
```

View file

@ -39,7 +39,7 @@ Create a new class that extends the basic OAuth provider abstract class in this
Note that the class name should start with a capital letter as PHP FIG standards suggest.
Once a new class is created, you can start to implement your new provider's login flow. The best way to do this corrrectly is to have a look at another provider's implementation and try to follow the same standards.
Once a new class is created, you can start to implement your new provider's login flow. The best way to do this correctly is to have a look at another provider's implementation and try to follow the same standards.
Please mention in your documentation what resources or API docs you used to implement the provider's OAuth protocol.

View file

@ -6,11 +6,11 @@ Appwrite environment variables allow you to edit your server setup configuration
### _APP_ENV
Set your server running environment. By default the var is set to 'development'. When deploying to production, change it to: 'production'.
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 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.
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.
### _APP_OPENSSL_KEY_V1
@ -28,7 +28,7 @@ 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 restrict access to Appwrite console for users sharing the same set op IP addresses. This option is very useful for team working with a VPN service or a company IP.
This last option allows you to restrict access to 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.
@ -108,7 +108,7 @@ 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.
SMTP secure connection protocol. Empty by default, change to 'tls' if running on a secure connection.
### _APP_SMTP_USERNAME

6
package-lock.json generated
View file

@ -834,9 +834,9 @@
}
},
"appwrite": {
"version": "1.0.22",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.22.tgz",
"integrity": "sha512-ofwb9opdkoY+AV8W2AkZY1z7gAqRlBZhbFj4ZMC9+UYhRAtLfaGnuyfRaWIKMFt7DII2Or261newdlwL/R2NsQ==",
"version": "1.0.23",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.23.tgz",
"integrity": "sha512-L1kLLkrjy0xPOd3lgjN+ZWDbzCLXNaGIWaijypv9ty7Rzu+gkktKPfQ6mp4TdBOubQoOTvTveZd+7DiMRUXrXQ==",
"dev": true
},
"archy": {

View file

@ -4,7 +4,7 @@
"license": "BSD-3-Clause",
"repository": "public",
"devDependencies": {
"appwrite": "^1.0.22",
"appwrite": "^1.0.23",
"gulp": "^4.0.0",
"gulp-clean-css": "^4.0.0",
"gulp-concat": "2.5.2",

View file

@ -37,7 +37,7 @@ let path='/auth/login';let payload={};if(email){payload['email']=email;}
if(password){payload['password']=password;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
payload['project']=config.project;return iframe('post',path,payload);},logout:function(){let path='/auth/logout';let payload={};return http.delete(path,{'content-type':'application/json'},payload);},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
return http.post(path,{'content-type':'application/json'},payload);},logout:function(){let path='/auth/logout';let payload={};return http.delete(path,{'content-type':'application/json'},payload);},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);let payload={};return http.delete(path,{'content-type':'application/json'},payload);},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/auth/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
@ -62,7 +62,7 @@ if(confirm){payload['confirm']=confirm;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
if(name){payload['name']=name;}
payload['project']=config.project;return iframe('post',path,payload);},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
return http.post(path,{'content-type':'application/json'},payload);},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
let path='/auth/register/confirm';let payload={};if(userId){payload['userId']=userId;}
if(token){payload['token']=token;}
@ -330,7 +330,7 @@ let path='/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{te
if(secret){payload['secret']=secret;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
payload['project']=config.project;return iframe('patch',path,payload);}};let users={listUsers:function(search='',limit=25,offset=0,orderType='ASC'){let path='/users';let payload={};if(search){payload['search']=search;}
return http.patch(path,{'content-type':'application/json'},payload);}};let users={listUsers:function(search='',limit=25,offset=0,orderType='ASC'){let path='/users';let payload={};if(search){payload['search']=search;}
if(limit){payload['limit']=limit;}
if(offset){payload['offset']=offset;}
if(orderType){payload['orderType']=orderType;}
@ -353,7 +353,7 @@ let path='/users/{userId}/sessions/:session'.replace(new RegExp('{userId}','g'),
return http.delete(path,{'content-type':'application/json'},payload);},updateUserStatus:function(userId,status){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(status===undefined){throw new Error('Missing required parameter: "status"');}
let path='/users/{userId}/status'.replace(new RegExp('{userId}','g'),userId);let payload={};if(status){payload['status']=status;}
return http.patch(path,{'content-type':'application/json'},payload);}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users};};if(typeof module!=="undefined"){module.exports=window.Appwrite;}})((typeof window!=="undefined")?window:{});(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
return http.patch(path,{'content-type':'application/json'},payload);}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users};};if(typeof module!=="undefined"){module.exports=window.Appwrite;}})((typeof window!=="undefined")?window:{});console.log('promise sdk');(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
function getRgba(string){if(!string){return;}
var abbr=/^#([a-fA-F0-9]{3})$/i,hex=/^#([a-fA-F0-9]{6})$/i,rgba=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,per=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,keyword=/(\w+)/;var rgb=[0,0,0],a=1,match=string.match(abbr);if(match){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match[i]+match[i],16);}}
else if(match=string.match(hex)){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match.slice(i*2,i*2+2),16);}}
@ -2539,7 +2539,7 @@ return k;}
function J(k){k=k.replace(/rn/g,"n");let d="";for(let F=0;F<k.length;F++){let x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x);}else{if(x>127&&x<2048){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128);}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128);}}}
return d;}
let C=Array();let P,h,E,v,g,Y,X,W,V;let S=7,Q=12,N=17,M=22;let A=5,z=9,y=14,w=20;let o=4,m=11,l=16,j=23;let U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g);}
let i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase();};let size=element.dataset["size"]||80;let email=$value.email||$value||"";let name=$value.name||$value||"";let theme=name.split("").map(char=>char.charCodeAt(0)).reduce((a,b)=>a+b,0).toString();let themes=[{color:"27005e",background:"e1d2f6"},{color:"5e2700",background:"f3d9c6"},{color:"006128",background:"c9f3c6"},{color:"580061",background:"f2d1f5"},{color:"00365d",background:"c6e1f3"},{color:"00075c",background:"d2d5f6"},{color:"610038",background:"f5d1e6"},{color:"386100",background:"dcf1bd"},{color:"615800",background:"f1ecba"},{color:"610008",background:"f6d2d5"}];name=name.split(" ").map(function(n){if(!isNaN(parseFloat(n))&&isFinite(n)){return"";}
let i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase();};let size=element.dataset["size"]||80;let email=$value.email||$value||"";let name=$value.name||$value||"";name=(typeof stringValue!=='string')?'':name;let theme=name.split("").map(char=>char.charCodeAt(0)).reduce((a,b)=>a+b,0).toString();let themes=[{color:"27005e",background:"e1d2f6"},{color:"5e2700",background:"f3d9c6"},{color:"006128",background:"c9f3c6"},{color:"580061",background:"f2d1f5"},{color:"00365d",background:"c6e1f3"},{color:"00075c",background:"d2d5f6"},{color:"610038",background:"f5d1e6"},{color:"386100",background:"dcf1bd"},{color:"615800",background:"f1ecba"},{color:"610008",background:"f6d2d5"}];name=name.split(" ").map(function(n){if(!isNaN(parseFloat(n))&&isFinite(n)){return"";}
return n[0];}).join("")||"--";let background=themes[theme[theme.length-1]]["background"];let color=themes[theme[theme.length-1]]["color"];let def="https://ui-avatars.com/api/"+
encodeURIComponent(name)+"/"+
size+"/"+
@ -2571,7 +2571,7 @@ let config={type:"line",data:{labels:[],datasets:[{label:"Requests",backgroundCo
let chart=container.get("chart");if(chart){}
element.innerHTML="";element.appendChild(child);container.set("chart",new Chart(child.getContext("2d"),config),true);element.dataset["canvas"]=true;}});(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||action;let event=element.dataset["event"];let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let debug=!!element.dataset["debug"];let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";success=success&&success!=""?success.split(",").map(element=>element.trim()):[];failure=failure&&failure!=""?failure.split(",").map(element=>element.trim()):[];if(debug)
console.log("%c[service init]: "+action+" ("+service+")","color:red");let callbacks={reset:function(){return function(){if("FORM"===element.tagName){return element.reset();}
throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){router.change(url||"/");};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){window.location=url||"/";};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
return url;}}else{if(typeof value!=="undefined"&&value!==null){var separator=url.indexOf("?")!==-1?"&":"?";hash=url.split("#");url=hash[0]+separator+key+"="+value;if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
return url;}else{return url;}}};keys=keys.split(",").map(element=>element.trim());return function(serviceForm,router,window){let url=window.location.href;keys.map(node=>{node=node.split("=");let key=node[0]||"";let name=node[1]||key;let value=getValue(key,"param",serviceForm);url=updateQueryString(name,value?value:null,url);});if(url!==window.location.href){window.history.pushState({},"",url);router.reset();}};},trigger:function(events){return function(document){events=events.trim().split(",");for(let i=0;i<events.length;i++){if(""===events[i]){continue;}
if(debug)

View file

@ -37,7 +37,7 @@ let path='/auth/login';let payload={};if(email){payload['email']=email;}
if(password){payload['password']=password;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
payload['project']=config.project;return iframe('post',path,payload);},logout:function(){let path='/auth/logout';let payload={};return http.delete(path,{'content-type':'application/json'},payload);},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
return http.post(path,{'content-type':'application/json'},payload);},logout:function(){let path='/auth/logout';let payload={};return http.delete(path,{'content-type':'application/json'},payload);},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);let payload={};return http.delete(path,{'content-type':'application/json'},payload);},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/auth/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
@ -62,7 +62,7 @@ if(confirm){payload['confirm']=confirm;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
if(name){payload['name']=name;}
payload['project']=config.project;return iframe('post',path,payload);},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
return http.post(path,{'content-type':'application/json'},payload);},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
let path='/auth/register/confirm';let payload={};if(userId){payload['userId']=userId;}
if(token){payload['token']=token;}
@ -330,7 +330,7 @@ let path='/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{te
if(secret){payload['secret']=secret;}
if(success){payload['success']=success;}
if(failure){payload['failure']=failure;}
payload['project']=config.project;return iframe('patch',path,payload);}};let users={listUsers:function(search='',limit=25,offset=0,orderType='ASC'){let path='/users';let payload={};if(search){payload['search']=search;}
return http.patch(path,{'content-type':'application/json'},payload);}};let users={listUsers:function(search='',limit=25,offset=0,orderType='ASC'){let path='/users';let payload={};if(search){payload['search']=search;}
if(limit){payload['limit']=limit;}
if(offset){payload['offset']=offset;}
if(orderType){payload['orderType']=orderType;}
@ -353,7 +353,7 @@ let path='/users/{userId}/sessions/:session'.replace(new RegExp('{userId}','g'),
return http.delete(path,{'content-type':'application/json'},payload);},updateUserStatus:function(userId,status){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(status===undefined){throw new Error('Missing required parameter: "status"');}
let path='/users/{userId}/status'.replace(new RegExp('{userId}','g'),userId);let payload={};if(status){payload['status']=status;}
return http.patch(path,{'content-type':'application/json'},payload);}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users};};if(typeof module!=="undefined"){module.exports=window.Appwrite;}})((typeof window!=="undefined")?window:{});(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
return http.patch(path,{'content-type':'application/json'},payload);}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users};};if(typeof module!=="undefined"){module.exports=window.Appwrite;}})((typeof window!=="undefined")?window:{});console.log('promise sdk');(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
function getRgba(string){if(!string){return;}
var abbr=/^#([a-fA-F0-9]{3})$/i,hex=/^#([a-fA-F0-9]{6})$/i,rgba=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,per=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,keyword=/(\w+)/;var rgb=[0,0,0],a=1,match=string.match(abbr);if(match){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match[i]+match[i],16);}}
else if(match=string.match(hex)){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match.slice(i*2,i*2+2),16);}}

View file

@ -268,7 +268,7 @@ return k;}
function J(k){k=k.replace(/rn/g,"n");let d="";for(let F=0;F<k.length;F++){let x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x);}else{if(x>127&&x<2048){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128);}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128);}}}
return d;}
let C=Array();let P,h,E,v,g,Y,X,W,V;let S=7,Q=12,N=17,M=22;let A=5,z=9,y=14,w=20;let o=4,m=11,l=16,j=23;let U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g);}
let i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase();};let size=element.dataset["size"]||80;let email=$value.email||$value||"";let name=$value.name||$value||"";let theme=name.split("").map(char=>char.charCodeAt(0)).reduce((a,b)=>a+b,0).toString();let themes=[{color:"27005e",background:"e1d2f6"},{color:"5e2700",background:"f3d9c6"},{color:"006128",background:"c9f3c6"},{color:"580061",background:"f2d1f5"},{color:"00365d",background:"c6e1f3"},{color:"00075c",background:"d2d5f6"},{color:"610038",background:"f5d1e6"},{color:"386100",background:"dcf1bd"},{color:"615800",background:"f1ecba"},{color:"610008",background:"f6d2d5"}];name=name.split(" ").map(function(n){if(!isNaN(parseFloat(n))&&isFinite(n)){return"";}
let i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase();};let size=element.dataset["size"]||80;let email=$value.email||$value||"";let name=$value.name||$value||"";name=(typeof stringValue!=='string')?'':name;let theme=name.split("").map(char=>char.charCodeAt(0)).reduce((a,b)=>a+b,0).toString();let themes=[{color:"27005e",background:"e1d2f6"},{color:"5e2700",background:"f3d9c6"},{color:"006128",background:"c9f3c6"},{color:"580061",background:"f2d1f5"},{color:"00365d",background:"c6e1f3"},{color:"00075c",background:"d2d5f6"},{color:"610038",background:"f5d1e6"},{color:"386100",background:"dcf1bd"},{color:"615800",background:"f1ecba"},{color:"610008",background:"f6d2d5"}];name=name.split(" ").map(function(n){if(!isNaN(parseFloat(n))&&isFinite(n)){return"";}
return n[0];}).join("")||"--";let background=themes[theme[theme.length-1]]["background"];let color=themes[theme[theme.length-1]]["color"];let def="https://ui-avatars.com/api/"+
encodeURIComponent(name)+"/"+
size+"/"+
@ -300,7 +300,7 @@ let config={type:"line",data:{labels:[],datasets:[{label:"Requests",backgroundCo
let chart=container.get("chart");if(chart){}
element.innerHTML="";element.appendChild(child);container.set("chart",new Chart(child.getContext("2d"),config),true);element.dataset["canvas"]=true;}});(function(window){"use strict";window.ls.view.add({selector:"data-service",controller:function(element,view,container,form,alerts,expression,window){let action=element.dataset["service"];let service=element.dataset["name"]||action;let event=element.dataset["event"];let confirm=element.dataset["confirm"]||"";let loading=element.dataset["loading"]||"";let loaderId=null;let scope=element.dataset["scope"]||"sdk";let debug=!!element.dataset["debug"];let success=element.dataset["success"]||"";let failure=element.dataset["failure"]||"";success=success&&success!=""?success.split(",").map(element=>element.trim()):[];failure=failure&&failure!=""?failure.split(",").map(element=>element.trim()):[];if(debug)
console.log("%c[service init]: "+action+" ("+service+")","color:red");let callbacks={reset:function(){return function(){if("FORM"===element.tagName){return element.reset();}
throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){router.change(url||"/");};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
throw new Error("This callback is only valid for forms");};},alert:function(text,classname){return function(alerts){alerts.add({text:text,class:classname||"success"},3000);};},redirect:function(url){return function(router){window.location=url||"/";};},reload:function(){return function(router){router.reload();};},state:function(keys){let updateQueryString=function(key,value,url){var re=new RegExp("([?&])"+key+"=.*?(&|#|$)(.*)","gi"),hash;if(re.test(url)){if(typeof value!=="undefined"&&value!==null){return url.replace(re,"$1"+key+"="+value+"$2$3");}else{hash=url.split("#");url=hash[0].replace(re,"$1$3").replace(/(&|\?)$/,"");if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
return url;}}else{if(typeof value!=="undefined"&&value!==null){var separator=url.indexOf("?")!==-1?"&":"?";hash=url.split("#");url=hash[0]+separator+key+"="+value;if(typeof hash[1]!=="undefined"&&hash[1]!==null){url+="#"+hash[1];}
return url;}else{return url;}}};keys=keys.split(",").map(element=>element.trim());return function(serviceForm,router,window){let url=window.location.href;keys.map(node=>{node=node.split("=");let key=node[0]||"";let name=node[1]||key;let value=getValue(key,"param",serviceForm);url=updateQueryString(name,value?value:null,url);});if(url!==window.location.href){window.history.pushState({},"",url);router.reset();}};},trigger:function(events){return function(document){events=events.trim().split(",");for(let i=0;i<events.length;i++){if(""===events[i]){continue;}
if(debug)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -215,6 +215,9 @@ window.ls.filter
let size = element.dataset["size"] || 80;
let email = $value.email || $value || "";
let name = $value.name || $value || "";
name = (typeof stringValue !== 'string') ? '' : name;
let theme = name
.split("")
.map(char => char.charCodeAt(0))

View file

@ -57,7 +57,8 @@
redirect: function(url) {
return function(router) {
router.change(url || "/");
//router.change(url || "/");
window.location = url || "/";
};
},

View file

@ -15,6 +15,13 @@ https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clik
border-radius: 10px;
margin-bottom: 30px;
.tag {
color: inherit!important;
background: transparent!important;
padding: inherit!important;
font-size: inherit!important;
}
.copy {
position: absolute;
bottom: 15px;