Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Christy Jacob 2019-10-13 21:53:36 +04:00
commit d100ba4016
121 changed files with 3567 additions and 1091 deletions

View file

@ -1,5 +1,4 @@
app/db/SQL
docs
node_modules
storage
public/scripts

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
@ -10,6 +10,11 @@
* Limit HTTP origin check only to browser integrations
* Allow electron apps to not pass origin header
* 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

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

@ -78,6 +78,7 @@ RUN chmod 775 /entrypoint.sh
# add PHP files
COPY ./app /usr/share/nginx/html/app
COPY ./docs /usr/share/nginx/html/docs
COPY ./public /usr/share/nginx/html/public
COPY ./src /usr/share/nginx/html/src
COPY ./vendor /usr/share/nginx/html/vendor

View file

@ -63,10 +63,10 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
* [**Account**](https://appwrite.io/docs/account) - Manage current user account. Track and manage the user sessions, devices, and security audit log.
* [**Users**](https://appwrite.io/docs/users) - Manage and list all project users when in admin mode.
* [**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 document. Read, create, update and delete documents and filter lists of documents collections using an advanced filter with graph-like capabilities.
* [**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 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.
* [**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).
@ -89,7 +89,7 @@ For security issues, kindly email us [security@appwrite.io](mailto:security@appw
## Follow Us
Join our growing community around the world! Follow us on [Twitter](https://twitter.com/appwrite_io), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/) or join our live [Gitter community](https://gitter.im/appwrite/community) for more help, ideas and discussions.
Join our growing community around the world! Follow us on [Twitter](https://twitter.com/appwrite_io), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/) or join our live [Gitter community](https://gitter.im/appwrite/community) for more help, ideas, and discussions.
## Contributing

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();
@ -490,7 +491,7 @@ $utopia->get('/v1/open-api-2.json')
'url' => 'https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE',
],
],
'host' => $request->getServer('_APP_HOME', $domain),
'host' => parse_url($request->getServer('_APP_HOME', $domain), PHP_URL_HOST),
'basePath' => '/v1',
'schemes' => ['https'],
'consumes' => ['application/json', 'multipart/form-data'],
@ -499,13 +500,13 @@ $utopia->get('/v1/open-api-2.json')
'Project' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Project',
'description' => 'Your Appwrite project ID. You can find your project ID in your Appwrite console project settings.',
'description' => 'Your Appwrite project ID',
'in' => 'header',
],
'Key' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Key',
'description' => 'Your Appwrite project secret key. You can can create a new API key from your Appwrite console API keys dashboard.',
'description' => 'Your Appwrite project secret key',
'in' => 'header',
],
'Locale' => [
@ -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' => $route->getLabel('sdk.description', ''),
'description' => file_get_contents(realpath(__DIR__ . '/..' . $route->getLabel('sdk.description', ''))),
'responses' => [
200 => [
'description' => 'An paged array of pets',
@ -607,6 +608,9 @@ $utopia->get('/v1/open-api-2.json')
'cookies' => $route->getLabel('sdk.cookies', false),
'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),
];
}
@ -680,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,11 +1,11 @@
<?php
// When there are multiple alternative correct country names please follow https://sv.wikipedia.org/wiki/ISO_3166
return [
'AF' => 'Afganistan',
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albanien',
'AD' => 'Andorra',
'AE' => 'Förenade Arabemiraterna',
'AE' => 'Förenade Arabemiraten',
'AR' => 'Argentina',
'AM' => 'Armenien',
'AG' => 'Antigua och Barbuda',
@ -21,13 +21,13 @@ return [
'BH' => 'Bahrain',
'BS' => 'Bahamas',
'BA' => 'Bosnien och Hercegovina',
'BY' => 'Vitrysslnd',
'BY' => 'Vitryssland',
'BZ' => 'Belize',
'BO' => 'Bolivien',
'BO' => 'Bolivia',
'BR' => 'Brasilien',
'BB' => 'Barbados',
'BN' => 'Brune',
'BT' => 'Butan',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Centralafrikanska republiken',
'CA' => 'Kanada',
@ -51,18 +51,18 @@ return [
'DK' => 'Danmark',
'DO' => 'Dominikanska republiken',
'DZ' => 'Algeriet',
'EC' => 'Ekvador',
'EC' => 'Ecuador',
'EG' => 'Egypten',
'ER' => 'Eritrea',
'ES' => 'Spanien',
'EE' => 'Estonia',
'EE' => 'Estland',
'ET' => 'Etiopien',
'FI' => 'Finland',
'FJ' => 'Fiji',
'FR' => 'Frankrike',
'FM' => 'Mikronesien',
'GA' => 'Gabon',
'GB' => 'Storbrittannien',
'GB' => 'Storbritannien',
'GE' => 'Georgien',
'GH' => 'Ghana',
'GN' => 'Guinea',
@ -98,7 +98,7 @@ return [
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libanon',
'LR' => 'Liberien',
'LR' => 'Liberia',
'LY' => 'Libyen',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
@ -106,22 +106,22 @@ return [
'LS' => 'Lesotho',
'LT' => 'Litauen',
'LU' => 'Luxemburg',
'LV' => 'Latvien',
'LV' => 'Lettland',
'MA' => 'Marocko',
'MC' => 'Monaco',
'MD' => 'Moldavien',
'MG' => 'Madagaskar',
'MV' => 'Maldiverna',
'MX' => 'Mexiko',
'MH' => 'Marshall Islands',
'MH' => 'Marshallöarna',
'MK' => 'Nordmakedonien',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolien',
'MN' => 'Mongoliet',
'MZ' => 'Moçambique',
'MR' => 'Mauritanien',
'MR' => 'Mauretanien',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
@ -133,14 +133,14 @@ return [
'NO' => 'Norge',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Nya Zealand',
'NZ' => 'Nya Zeeland',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Peru',
'PH' => 'Filppinerna',
'PH' => 'Filippinerna',
'PW' => 'Palau',
'PG' => 'Papua New Guinea',
'PG' => 'Papua Nya Guinea',
'PL' => 'Polen',
'KP' => 'Nordkorea',
'PT' => 'Portugal',
@ -152,12 +152,12 @@ return [
'SA' => 'Saudiarabien',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapor',
'SB' => 'Solomonöarna',
'SG' => 'Singapore',
'SB' => 'Salomonöarna',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalien',
'SO' => 'Somalia',
'RS' => 'Serbien',
'SS' => 'Sydsudan',
'ST' => 'São Tomé och Príncipe',

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

@ -15,7 +15,7 @@
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Om du inte bett om att ändr ditt lösenord så kan du ignorera detta meddelande.
Om du inte bett om att ändra ditt lösenord så kan du ignorera detta meddelande.
<br />
<br />
Tack,

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

@ -1,6 +1,6 @@
<?php
global $utopia, $request, $response;
global $utopia, $request, $response, $version;
use Utopia\Exception;
use Utopia\Validator\Text;
@ -94,7 +94,7 @@ $utopia->get('/v1/avatars/credit-cards/:code')
->label('scope', 'avatars.read')
->label('sdk.namespace', 'avatars')
->label('sdk.method', 'getCreditCard')
->label('sdk.description', '/docs/references/avatars/get-credit-cards.md')
->label('sdk.description', '/docs/references/avatars/get-credit-card.md')
->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('credit-cards', $code, $width, $height, $quality);
});
@ -134,7 +134,7 @@ $utopia->get('/v1/avatars/image')
->label('sdk.method', 'getImage')
->label('sdk.description', '/docs/references/avatars/get-image.md')
->action(
function ($url, $width, $height) use ($response, $request, $version) {
function ($url, $width, $height) use ($response) {
$quality = 80;
$output = 'png';
$date = date('D, d M Y H:i:s', time() + (60 * 60 * 24 * 45)).' GMT'; // 45 days cache
@ -199,7 +199,7 @@ $utopia->get('/v1/avatars/favicon')
->label('sdk.method', 'getFavicon')
->label('sdk.description', '/docs/references/avatars/get-favicon.md')
->action(
function ($url) use ($response, $request, $version) {
function ($url) use ($response, $version) {
$width = 56;
$height = 56;
$quality = 80;

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

@ -68,7 +68,7 @@ $utopia->get('/v1/locale/countries')
->label('scope', 'locale.read')
->label('sdk.namespace', 'locale')
->label('sdk.method', 'getCountries')
->label('sdk.description', '/docs/references/locale/get-countires.md')
->label('sdk.description', '/docs/references/locale/get-countries.md')
->action(
function () use ($response, $request) {
$list = Locale::getText('countries'); /* @var $list array */

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')
@ -419,7 +419,7 @@ $utopia->delete('/v1/users/:userId/sessions')
->label('scope', 'users.write')
->label('sdk.namespace', 'users')
->label('sdk.method', 'deleteUserSessions')
->label('sdk.description', 'Delete all user sessions by its unique ID.')
->label('sdk.description', '/docs/references/users/delete-user-sessions.md')
->label('abuse-limit', 100)
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
->action(

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';
@ -128,9 +128,9 @@ $locale = $request->getParam('locale', $request->getHeader('X-Appwrite-Locale',
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');
@ -142,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');
@ -163,6 +165,8 @@ Locale::setLanguage('vi', include __DIR__.'/config/locale/vi.php');
Locale::setLanguage('zh-cn', include __DIR__.'/config/locale/zh-cn.php');
Locale::setLanguage('zh-tw', include __DIR__.'/config/locale/zh-tw.php');
Locale::setDefault('en');
if (in_array($locale, APP_LOCALES)) {
Locale::setDefault($locale);
}

View file

@ -1,7 +1,7 @@
# Appwrite SDK for Dart
![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**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).**

View file

@ -9,7 +9,7 @@ class Client {
Dio http;
Client() {
this.endPoint = 'https://https://appwrite.io/v1';
this.endPoint = 'https://appwrite.io/v1';
this.headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:dart:0.0.2',
@ -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

@ -15,7 +15,7 @@ class Auth extends Service {
/// the only valid redirect URL's are the once from domains you have set when
/// added your platforms in the console interface.
///
/// When accessing this route using JavaScript from the browser, success and
/// 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
@ -116,7 +116,7 @@ class Auth extends Service {
/// the only valid redirect URL's are the once from domains you have set when
/// added your platforms in the console interface.
///
/// When accessing this route using JavaScript from the browser, success and
/// 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

View file

@ -49,9 +49,9 @@ class Locale extends Service {
return await this.client.call('get', path: path, params: params);
}
/// List of all currencies, including currency symbol, name, plural, and
/// decimal digits for all major and minor currencies. You can use the locale
/// header to get the data in supported language.
/// List of all currencies, including currency symol, name, plural, and decimal
/// digits for all major and minor currencies. You can use the locale header to
/// get the data in supported language.
Future<Response> getCurrencies() async {
String path = '/locale/currencies';

View file

@ -58,6 +58,17 @@ class Users extends Service {
};
return await this.client.call('get', path: path, params: params);
}
/// Update user preferences by its unique ID. You can pass only the specific
/// settings you wish to update.
Future<Response> updateUserPrefs({userId, prefs}) async {
String path = '/users/{userId}/prefs'.replaceAll(RegExp('{userId}'), userId);
Map<String, dynamic> params = {
'prefs': prefs,
};
return await this.client.call('patch', path: path, params: params);
}
/// Get user sessions list by its unique ID.
Future<Response> getUserSessions({userId}) async {
@ -78,7 +89,7 @@ class Users extends Service {
return await this.client.call('delete', path: path, params: params);
}
/// Delete user sessions by its unique ID.
Future<Response> deleteUsersSession({userId, sessionId}) async {
Future<Response> deleteUserSession({userId, sessionId}) async {
String path = '/users/{userId}/sessions/:session'.replaceAll(RegExp('{userId}'), userId);
Map<String, dynamic> params = {

View file

@ -1,28 +1,52 @@
# Appwrite SDK for Javascript
# Appwrite SDK for JavaScript
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**This SDK is compatible with Appwrite server version 0.2.0. For older versions, please check previous releases.**
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)
![Appwrite](https://appwrite.io/images/github.png)
## Installation
### NPM
To install via [NPM](https://www.npmjs.com/):
```bash
npm install appwrite --save
```
Install with CDN:
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";
```
### CDN
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
```html
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.22"></script>
<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

View file

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

View file

@ -4,7 +4,7 @@ sdk
.setProject('')
;
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
promise.then(function (response) {
console.log(response);

View file

@ -0,0 +1,13 @@
let sdk = new Appwrite();
sdk
.setProject('')
;
let promise = sdk.users.deleteUserSession('[USER_ID]', '[SESSION_ID]');
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -0,0 +1,13 @@
let sdk = new Appwrite();
sdk
.setProject('')
;
let promise = sdk.users.updateUserPrefs('[USER_ID]', '{}');
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -2,7 +2,7 @@
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"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)",
"version": "1.0.22",
"version": "1.0.23",
"license": "BSD-3-Clause",
"main": "src/sdk.js",
"repository": {

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
(function(window){window.Appwrite=function(){let config={endpoint:'https://https://appwrite.io/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index<params[p].length;index++){let param=params[p][index];str.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]))}}
return str.join("&")};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()}};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value})};addGlobalHeader('x-sdk-version','appwrite:javascript:1.0.22');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name')}
(function(window){'use strict';window.Appwrite=function(){let config={endpoint:'https://appwrite.io/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index<params[p].length;index++){let param=params[p][index];str.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]))}}
return str.join("&")};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()}};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value})};addGlobalHeader('x-sdk-version','appwrite:javascript:1.0.23');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name')}
if(typeof path!=='string'){throw new Error('var path must be of type string')}
if(typeof headers!=='object'){throw new Error('var headers must be of type object')}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value)}
@ -11,93 +11,213 @@ request.setRequestHeader(key,headers[key])}}
request.onload=function(){if(4===request.readyState&&399>=request.status){let data=request.response;let contentType=this.getResponseHeader('content-type')||'';contentType=contentType.substring(0,contentType.indexOf(';'));switch(contentType){case 'application/json':data=JSON.parse(data);break}
resolve(data)}else{reject(new Error(request.statusText))}};if(progress){request.addEventListener('progress',progress);request.upload.addEventListener('progress',progress,!1)}
request.onerror=function(){reject(new Error("Network Error"))};request.send(params)})};return{'get':function(path,headers={},params={}){return call('GET',path+((Object.keys(params).length>0)?'?'+buildQuery(params):''),headers,{})},'post':function(path,headers={},params={},progress=null){return call('POST',path,headers,params,progress)},'put':function(path,headers={},params={},progress=null){return call('PUT',path,headers,params,progress)},'patch':function(path,headers={},params={},progress=null){return call('PATCH',path,headers,params,progress)},'delete':function(path,headers={},params={},progress=null){return call('DELETE',path,headers,params,progress)},'addGlobalParam':addGlobalParam,'addGlobalHeader':addGlobalHeader}}(window.document);let iframe=function(method,url,params){let form=document.createElement('form');form.setAttribute('method',method);form.setAttribute('action',config.endpoint+url);for(let key in params){if(params.hasOwnProperty(key)){let hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden");hiddenField.setAttribute("name",key);hiddenField.setAttribute("value",params[key]);form.appendChild(hiddenField)}}
document.body.appendChild(form);return form.submit()};let account={get:function(){let path='/account';return http.get(path,{'content-type':'application/json'},{})},delete:function(){let path='/account';return http.delete(path,{'content-type':'application/json'},{})},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')}
document.body.appendChild(form);return form.submit()};let account={get:function(){let path='/account';let payload={};return http.get(path,{'content-type':'application/json'},payload)},delete:function(){let path='/account';let payload={};return http.delete(path,{'content-type':'application/json'},payload)},updateEmail:function(email,password){if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(password===undefined){throw new Error('Missing required parameter: "password"')}
let path='/account/email';return http.patch(path,{'content-type':'application/json'},{'email':email,'password':password})},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/account/name';return http.patch(path,{'content-type':'application/json'},{'name':name})},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')}
let path='/account/email';let payload={};if(email){payload.email=email}
if(password){payload.password=password}
return http.patch(path,{'content-type':'application/json'},payload)},updateName:function(name){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/account/name';let payload={};if(name){payload.name=name}
return http.patch(path,{'content-type':'application/json'},payload)},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"')}
if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"')}
let path='/account/password';return http.patch(path,{'content-type':'application/json'},{'password':password,'old-password':oldPassword})},getPrefs:function(){let path='/account/prefs';return http.get(path,{'content-type':'application/json'},{})},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')}
let path='/account/prefs';return http.patch(path,{'content-type':'application/json'},{'prefs':prefs})},getSecurity:function(){let path='/account/security';return http.get(path,{'content-type':'application/json'},{})},getSessions:function(){let path='/account/sessions';return http.get(path,{'content-type':'application/json'},{})}};let auth={login:function(email,password,success,failure){if(email===undefined){throw new Error('Missing required parameter: "email"')}
let path='/account/password';let payload={};if(password){payload.password=password}
if(oldPassword){payload['old-password']=oldPassword}
return http.patch(path,{'content-type':'application/json'},payload)},getPrefs:function(){let path='/account/prefs';let payload={};return http.get(path,{'content-type':'application/json'},payload)},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')}
let path='/account/prefs';let payload={};if(prefs){payload.prefs=prefs}
return http.patch(path,{'content-type':'application/json'},payload)},getSecurity:function(){let path='/account/security';let payload={};return http.get(path,{'content-type':'application/json'},payload)},getSessions:function(){let path='/account/sessions';let payload={};return http.get(path,{'content-type':'application/json'},payload)}};let auth={login:function(email,password,success,failure){if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(password===undefined){throw new Error('Missing required parameter: "password"')}
if(success===undefined){throw new Error('Missing required parameter: "success"')}
if(failure===undefined){throw new Error('Missing required parameter: "failure"')}
let path='/auth/login';return iframe('post',path,{project:config.project,'email':email,'password':password,'success':success,'failure':failure})},logout:function(){let path='/auth/logout';return http.delete(path,{'content-type':'application/json'},{})},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"')}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);return http.delete(path,{'content-type':'application/json'},{})},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);return http.get(path,{'content-type':'application/json'},{'success':success,'failure':failure})},recovery:function(email,reset){if(email===undefined){throw new Error('Missing required parameter: "email"')}
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"')}
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}
return http.get(path,{'content-type':'application/json'},payload)},recovery:function(email,reset){if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(reset===undefined){throw new Error('Missing required parameter: "reset"')}
let path='/auth/recovery';return http.post(path,{'content-type':'application/json'},{'email':email,'reset':reset})},recoveryReset:function(userId,token,passwordA,passwordB){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/auth/recovery';let payload={};if(email){payload.email=email}
if(reset){payload.reset=reset}
return http.post(path,{'content-type':'application/json'},payload)},recoveryReset:function(userId,token,passwordA,passwordB){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
if(token===undefined){throw new Error('Missing required parameter: "token"')}
if(passwordA===undefined){throw new Error('Missing required parameter: "passwordA"')}
if(passwordB===undefined){throw new Error('Missing required parameter: "passwordB"')}
let path='/auth/recovery/reset';return http.put(path,{'content-type':'application/json'},{'userId':userId,'token':token,'password-a':passwordA,'password-b':passwordB})},register:function(email,password,confirm,success='',failure='',name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')}
let path='/auth/recovery/reset';let payload={};if(userId){payload.userId=userId}
if(token){payload.token=token}
if(passwordA){payload['password-a']=passwordA}
if(passwordB){payload['password-b']=passwordB}
return http.put(path,{'content-type':'application/json'},payload)},register:function(email,password,confirm,success='',failure='',name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(password===undefined){throw new Error('Missing required parameter: "password"')}
if(confirm===undefined){throw new Error('Missing required parameter: "confirm"')}
let path='/auth/register';return iframe('post',path,{project:config.project,'email':email,'password':password,'confirm':confirm,'success':success,'failure':failure,'name':name})},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/auth/register';let payload={};if(email){payload.email=email}
if(password){payload.password=password}
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"')}
if(token===undefined){throw new Error('Missing required parameter: "token"')}
let path='/auth/register/confirm';return http.post(path,{'content-type':'application/json'},{'userId':userId,'token':token})},confirmResend:function(confirm){if(confirm===undefined){throw new Error('Missing required parameter: "confirm"')}
let path='/auth/register/confirm/resend';return http.post(path,{'content-type':'application/json'},{'confirm':confirm})}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/browsers/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality})},getCreditCard:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/credit-cards/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality})},getFavicon:function(url){if(url===undefined){throw new Error('Missing required parameter: "url"')}
let path='/avatars/favicon';return http.get(path,{'content-type':'application/json'},{'url':url})},getFlag:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/flags/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality})},getImage:function(url,width=400,height=400){if(url===undefined){throw new Error('Missing required parameter: "url"')}
let path='/avatars/image';return http.get(path,{'content-type':'application/json'},{'url':url,'width':width,'height':height})},getQR:function(text,size=400,margin=1,download=0){if(text===undefined){throw new Error('Missing required parameter: "text"')}
let path='/avatars/qr';return http.get(path,{'content-type':'application/json'},{'text':text,'size':size,'margin':margin,'download':download})}};let database={listCollections:function(search='',limit=25,offset=0,orderType='ASC'){let path='/database';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType})},createCollection:function(name,read=[],write=[],rules=[]){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/database';return http.post(path,{'content-type':'application/json'},{'name':name,'read':read,'write':write,'rules':rules})},getCollection:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);return http.get(path,{'content-type':'application/json'},{})},updateCollection:function(collectionId,name,read=[],write=[],rules=[]){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/auth/register/confirm';let payload={};if(userId){payload.userId=userId}
if(token){payload.token=token}
return http.post(path,{'content-type':'application/json'},payload)},confirmResend:function(confirm){if(confirm===undefined){throw new Error('Missing required parameter: "confirm"')}
let path='/auth/register/confirm/resend';let payload={};if(confirm){payload.confirm=confirm}
return http.post(path,{'content-type':'application/json'},payload)}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/browsers/{code}'.replace(new RegExp('{code}','g'),code);let payload={};if(width){payload.width=width}
if(height){payload.height=height}
if(quality){payload.quality=quality}
return http.get(path,{'content-type':'application/json'},payload)},getCreditCard:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/credit-cards/{code}'.replace(new RegExp('{code}','g'),code);let payload={};if(width){payload.width=width}
if(height){payload.height=height}
if(quality){payload.quality=quality}
return http.get(path,{'content-type':'application/json'},payload)},getFavicon:function(url){if(url===undefined){throw new Error('Missing required parameter: "url"')}
let path='/avatars/favicon';let payload={};if(url){payload.url=url}
return http.get(path,{'content-type':'application/json'},payload)},getFlag:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"')}
let path='/avatars/flags/{code}'.replace(new RegExp('{code}','g'),code);let payload={};if(width){payload.width=width}
if(height){payload.height=height}
if(quality){payload.quality=quality}
return http.get(path,{'content-type':'application/json'},payload)},getImage:function(url,width=400,height=400){if(url===undefined){throw new Error('Missing required parameter: "url"')}
let path='/avatars/image';let payload={};if(url){payload.url=url}
if(width){payload.width=width}
if(height){payload.height=height}
return http.get(path,{'content-type':'application/json'},payload)},getQR:function(text,size=400,margin=1,download=0){if(text===undefined){throw new Error('Missing required parameter: "text"')}
let path='/avatars/qr';let payload={};if(text){payload.text=text}
if(size){payload.size=size}
if(margin){payload.margin=margin}
if(download){payload.download=download}
return http.get(path,{'content-type':'application/json'},payload)}};let database={listCollections:function(search='',limit=25,offset=0,orderType='ASC'){let path='/database';let payload={};if(search){payload.search=search}
if(limit){payload.limit=limit}
if(offset){payload.offset=offset}
if(orderType){payload.orderType=orderType}
return http.get(path,{'content-type':'application/json'},payload)},createCollection:function(name,read=[],write=[],rules=[]){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/database';let payload={};if(name){payload.name=name}
if(read){payload.read=read}
if(write){payload.write=write}
if(rules){payload.rules=rules}
return http.post(path,{'content-type':'application/json'},payload)},getCollection:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateCollection:function(collectionId,name,read=[],write=[],rules=[]){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);return http.put(path,{'content-type':'application/json'},{'name':name,'read':read,'write':write,'rules':rules})},deleteCollection:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);return http.delete(path,{'content-type':'application/json'},{})},listDocuments:function(collectionId,filters=[],offset=0,limit=50,orderField='$uid',orderType='ASC',orderCast='string',search='',first=0,last=0){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);return http.get(path,{'content-type':'application/json'},{'filters':filters,'offset':offset,'limit':limit,'order-field':orderField,'order-type':orderType,'order-cast':orderCast,'search':search,'first':first,'last':last})},createDocument:function(collectionId,data,read=[],write=[],parentDocument='',parentProperty='',parentPropertyType='assign'){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};if(name){payload.name=name}
if(read){payload.read=read}
if(write){payload.write=write}
if(rules){payload.rules=rules}
return http.put(path,{'content-type':'application/json'},payload)},deleteCollection:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},listDocuments:function(collectionId,filters=[],offset=0,limit=50,orderField='$uid',orderType='ASC',orderCast='string',search='',first=0,last=0){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};if(filters){payload.filters=filters}
if(offset){payload.offset=offset}
if(limit){payload.limit=limit}
if(orderField){payload['order-field']=orderField}
if(orderType){payload['order-type']=orderType}
if(orderCast){payload['order-cast']=orderCast}
if(search){payload.search=search}
if(first){payload.first=first}
if(last){payload.last=last}
return http.get(path,{'content-type':'application/json'},payload)},createDocument:function(collectionId,data,read=[],write=[],parentDocument='',parentProperty='',parentPropertyType='assign'){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(data===undefined){throw new Error('Missing required parameter: "data"')}
let path='/database/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);return http.post(path,{'content-type':'application/json'},{'data':data,'read':read,'write':write,'parentDocument':parentDocument,'parentProperty':parentProperty,'parentPropertyType':parentPropertyType})},getDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};if(data){payload.data=data}
if(read){payload.read=read}
if(write){payload.write=write}
if(parentDocument){payload.parentDocument=parentDocument}
if(parentProperty){payload.parentProperty=parentProperty}
if(parentPropertyType){payload.parentPropertyType=parentPropertyType}
return http.post(path,{'content-type':'application/json'},payload)},getDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.get(path,{'content-type':'application/json'},{})},updateDocument:function(collectionId,documentId,data,read=[],write=[]){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateDocument:function(collectionId,documentId,data,read=[],write=[]){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
if(data===undefined){throw new Error('Missing required parameter: "data"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.patch(path,{'content-type':'application/json'},{'data':data,'read':read,'write':write})},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);let payload={};if(data){payload.data=data}
if(read){payload.read=read}
if(write){payload.write=write}
return http.patch(path,{'content-type':'application/json'},payload)},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.delete(path,{'content-type':'application/json'},{})}};let locale={getLocale:function(){let path='/locale';return http.get(path,{'content-type':'application/json'},{})},getCountries:function(){let path='/locale/countries';return http.get(path,{'content-type':'application/json'},{})},getCountriesEU:function(){let path='/locale/countries/eu';return http.get(path,{'content-type':'application/json'},{})},getCountriesPhones:function(){let path='/locale/countries/phones';return http.get(path,{'content-type':'application/json'},{})},getCurrencies:function(){let path='/locale/currencies';return http.get(path,{'content-type':'application/json'},{})}};let projects={listProjects:function(){let path='/projects';return http.get(path,{'content-type':'application/json'},{})},createProject:function(name,teamId,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)}};let locale={getLocale:function(){let path='/locale';let payload={};return http.get(path,{'content-type':'application/json'},payload)},getCountries:function(){let path='/locale/countries';let payload={};return http.get(path,{'content-type':'application/json'},payload)},getCountriesEU:function(){let path='/locale/countries/eu';let payload={};return http.get(path,{'content-type':'application/json'},payload)},getCountriesPhones:function(){let path='/locale/countries/phones';let payload={};return http.get(path,{'content-type':'application/json'},payload)},getCurrencies:function(){let path='/locale/currencies';let payload={};return http.get(path,{'content-type':'application/json'},payload)}};let projects={listProjects:function(){let path='/projects';let payload={};return http.get(path,{'content-type':'application/json'},payload)},createProject:function(name,teamId,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/projects';return http.post(path,{'content-type':'application/json'},{'name':name,'teamId':teamId,'description':description,'logo':logo,'url':url,'legalName':legalName,'legalCountry':legalCountry,'legalState':legalState,'legalCity':legalCity,'legalAddress':legalAddress,'legalTaxId':legalTaxId})},getProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},updateProject:function(projectId,name,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects';let payload={};if(name){payload.name=name}
if(teamId){payload.teamId=teamId}
if(description){payload.description=description}
if(logo){payload.logo=logo}
if(url){payload.url=url}
if(legalName){payload.legalName=legalName}
if(legalCountry){payload.legalCountry=legalCountry}
if(legalState){payload.legalState=legalState}
if(legalCity){payload.legalCity=legalCity}
if(legalAddress){payload.legalAddress=legalAddress}
if(legalTaxId){payload.legalTaxId=legalTaxId}
return http.post(path,{'content-type':'application/json'},payload)},getProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateProject:function(projectId,name,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.patch(path,{'content-type':'application/json'},{'name':name,'description':description,'logo':logo,'url':url,'legalName':legalName,'legalCountry':legalCountry,'legalState':legalState,'legalCity':legalCity,'legalAddress':legalAddress,'legalTaxId':legalTaxId})},deleteProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.delete(path,{'content-type':'application/json'},{})},listKeys:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},createKey:function(projectId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(name){payload.name=name}
if(description){payload.description=description}
if(logo){payload.logo=logo}
if(url){payload.url=url}
if(legalName){payload.legalName=legalName}
if(legalCountry){payload.legalCountry=legalCountry}
if(legalState){payload.legalState=legalState}
if(legalCity){payload.legalCity=legalCity}
if(legalAddress){payload.legalAddress=legalAddress}
if(legalTaxId){payload.legalTaxId=legalTaxId}
return http.patch(path,{'content-type':'application/json'},payload)},deleteProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},listKeys:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},createKey:function(projectId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(scopes===undefined){throw new Error('Missing required parameter: "scopes"')}
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'scopes':scopes})},getKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(name){payload.name=name}
if(scopes){payload.scopes=scopes}
return http.post(path,{'content-type':'application/json'},payload)},getKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.get(path,{'content-type':'application/json'},{})},updateKey:function(projectId,keyId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateKey:function(projectId,keyId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(scopes===undefined){throw new Error('Missing required parameter: "scopes"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.put(path,{'content-type':'application/json'},{'name':name,'scopes':scopes})},deleteKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);let payload={};if(name){payload.name=name}
if(scopes){payload.scopes=scopes}
return http.put(path,{'content-type':'application/json'},payload)},deleteKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.delete(path,{'content-type':'application/json'},{})},updateProjectOAuth:function(projectId,provider,appId='',secret=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},updateProjectOAuth:function(projectId,provider,appId='',secret=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(provider===undefined){throw new Error('Missing required parameter: "provider"')}
let path='/projects/{projectId}/oauth'.replace(new RegExp('{projectId}','g'),projectId);return http.patch(path,{'content-type':'application/json'},{'provider':provider,'appId':appId,'secret':secret})},listPlatforms:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},createPlatform:function(projectId,type,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/oauth'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(provider){payload.provider=provider}
if(appId){payload.appId=appId}
if(secret){payload.secret=secret}
return http.patch(path,{'content-type':'application/json'},payload)},listPlatforms:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},createPlatform:function(projectId,type,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(type===undefined){throw new Error('Missing required parameter: "type"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'type':type,'name':name,'key':key,'store':store,'url':url})},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(type){payload.type=type}
if(name){payload.name=name}
if(key){payload.key=key}
if(store){payload.store=store}
if(url){payload.url=url}
return http.post(path,{'content-type':'application/json'},payload)},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{})},updatePlatform:function(projectId,platformId,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updatePlatform:function(projectId,platformId,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.put(path,{'content-type':'application/json'},{'name':name,'key':key,'store':store,'url':url})},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);let payload={};if(name){payload.name=name}
if(key){payload.key=key}
if(store){payload.store=store}
if(url){payload.url=url}
return http.put(path,{'content-type':'application/json'},payload)},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.delete(path,{'content-type':'application/json'},{})},listTasks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},createTask:function(projectId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},listTasks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},createTask:function(projectId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(status===undefined){throw new Error('Missing required parameter: "status"')}
if(schedule===undefined){throw new Error('Missing required parameter: "schedule"')}
if(security===undefined){throw new Error('Missing required parameter: "security"')}
if(httpMethod===undefined){throw new Error('Missing required parameter: "httpMethod"')}
if(httpUrl===undefined){throw new Error('Missing required parameter: "httpUrl"')}
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'status':status,'schedule':schedule,'security':security,'httpMethod':httpMethod,'httpUrl':httpUrl,'httpHeaders':httpHeaders,'httpUser':httpUser,'httpPass':httpPass})},getTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(name){payload.name=name}
if(status){payload.status=status}
if(schedule){payload.schedule=schedule}
if(security){payload.security=security}
if(httpMethod){payload.httpMethod=httpMethod}
if(httpUrl){payload.httpUrl=httpUrl}
if(httpHeaders){payload.httpHeaders=httpHeaders}
if(httpUser){payload.httpUser=httpUser}
if(httpPass){payload.httpPass=httpPass}
return http.post(path,{'content-type':'application/json'},payload)},getTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.get(path,{'content-type':'application/json'},{})},updateTask:function(projectId,taskId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateTask:function(projectId,taskId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(status===undefined){throw new Error('Missing required parameter: "status"')}
@ -105,60 +225,126 @@ if(schedule===undefined){throw new Error('Missing required parameter: "schedule"
if(security===undefined){throw new Error('Missing required parameter: "security"')}
if(httpMethod===undefined){throw new Error('Missing required parameter: "httpMethod"')}
if(httpUrl===undefined){throw new Error('Missing required parameter: "httpUrl"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.put(path,{'content-type':'application/json'},{'name':name,'status':status,'schedule':schedule,'security':security,'httpMethod':httpMethod,'httpUrl':httpUrl,'httpHeaders':httpHeaders,'httpUser':httpUser,'httpPass':httpPass})},deleteTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);let payload={};if(name){payload.name=name}
if(status){payload.status=status}
if(schedule){payload.schedule=schedule}
if(security){payload.security=security}
if(httpMethod){payload.httpMethod=httpMethod}
if(httpUrl){payload.httpUrl=httpUrl}
if(httpHeaders){payload.httpHeaders=httpHeaders}
if(httpUser){payload.httpUser=httpUser}
if(httpPass){payload.httpPass=httpPass}
return http.put(path,{'content-type':'application/json'},payload)},deleteTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.delete(path,{'content-type':'application/json'},{})},getProjectUsage:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/usage'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},listWebhooks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},createWebhook:function(projectId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},getProjectUsage:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/usage'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},listWebhooks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},createWebhook:function(projectId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(events===undefined){throw new Error('Missing required parameter: "events"')}
if(url===undefined){throw new Error('Missing required parameter: "url"')}
if(security===undefined){throw new Error('Missing required parameter: "security"')}
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'events':events,'url':url,'security':security,'httpUser':httpUser,'httpPass':httpPass})},getWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);let payload={};if(name){payload.name=name}
if(events){payload.events=events}
if(url){payload.url=url}
if(security){payload.security=security}
if(httpUser){payload.httpUser=httpUser}
if(httpPass){payload.httpPass=httpPass}
return http.post(path,{'content-type':'application/json'},payload)},getWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.get(path,{'content-type':'application/json'},{})},updateWebhook:function(projectId,webhookId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateWebhook:function(projectId,webhookId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(events===undefined){throw new Error('Missing required parameter: "events"')}
if(url===undefined){throw new Error('Missing required parameter: "url"')}
if(security===undefined){throw new Error('Missing required parameter: "security"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.put(path,{'content-type':'application/json'},{'name':name,'events':events,'url':url,'security':security,'httpUser':httpUser,'httpPass':httpPass})},deleteWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);let payload={};if(name){payload.name=name}
if(events){payload.events=events}
if(url){payload.url=url}
if(security){payload.security=security}
if(httpUser){payload.httpUser=httpUser}
if(httpPass){payload.httpPass=httpPass}
return http.put(path,{'content-type':'application/json'},payload)},deleteWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.delete(path,{'content-type':'application/json'},{})}};let storage={listFiles:function(search='',limit=25,offset=0,orderType='ASC'){let path='/storage/files';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType})},createFile:function(files,read=[],write=[],folderId=''){if(files===undefined){throw new Error('Missing required parameter: "files"')}
let path='/storage/files';return http.post(path,{'content-type':'multipart/form-data'},{'files':files,'read':read,'write':write,'folderId':folderId})},getFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);return http.get(path,{'content-type':'application/json'},{})},updateFile:function(fileId,read=[],write=[],folderId=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);return http.put(path,{'content-type':'application/json'},{'read':read,'write':write,'folderId':folderId})},deleteFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);return http.delete(path,{'content-type':'application/json'},{})},getFileDownload:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/download'.replace(new RegExp('{fileId}','g'),fileId);return http.get(path,{'content-type':'application/json'},{})},getFilePreview:function(fileId,width=0,height=0,quality=100,background='',output=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}','g'),fileId);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality,'background':background,'output':output})},getFileView:function(fileId,as=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/view'.replace(new RegExp('{fileId}','g'),fileId);return http.get(path,{'content-type':'application/json'},{'as':as})}};let teams={listTeams:function(search='',limit=25,offset=0,orderType='ASC'){let path='/teams';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType})},createTeam:function(name,roles=["owner"]){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/teams';return http.post(path,{'content-type':'application/json'},{'name':name,'roles':roles})},getTeam:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);return http.get(path,{'content-type':'application/json'},{})},updateTeam:function(teamId,name){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)}};let storage={listFiles:function(search='',limit=25,offset=0,orderType='ASC'){let path='/storage/files';let payload={};if(search){payload.search=search}
if(limit){payload.limit=limit}
if(offset){payload.offset=offset}
if(orderType){payload.orderType=orderType}
return http.get(path,{'content-type':'application/json'},payload)},createFile:function(files,read=[],write=[],folderId=''){if(files===undefined){throw new Error('Missing required parameter: "files"')}
let path='/storage/files';let payload={};if(files){payload.files=files}
if(read){payload.read=read}
if(write){payload.write=write}
if(folderId){payload.folderId=folderId}
return http.post(path,{'content-type':'multipart/form-data'},payload)},getFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateFile:function(fileId,read=[],write=[],folderId=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);let payload={};if(read){payload.read=read}
if(write){payload.write=write}
if(folderId){payload.folderId=folderId}
return http.put(path,{'content-type':'application/json'},payload)},deleteFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},getFileDownload:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/download'.replace(new RegExp('{fileId}','g'),fileId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},getFilePreview:function(fileId,width=0,height=0,quality=100,background='',output=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}','g'),fileId);let payload={};if(width){payload.width=width}
if(height){payload.height=height}
if(quality){payload.quality=quality}
if(background){payload.background=background}
if(output){payload.output=output}
return http.get(path,{'content-type':'application/json'},payload)},getFileView:function(fileId,as=''){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"')}
let path='/storage/files/{fileId}/view'.replace(new RegExp('{fileId}','g'),fileId);let payload={};if(as){payload.as=as}
return http.get(path,{'content-type':'application/json'},payload)}};let teams={listTeams:function(search='',limit=25,offset=0,orderType='ASC'){let path='/teams';let payload={};if(search){payload.search=search}
if(limit){payload.limit=limit}
if(offset){payload.offset=offset}
if(orderType){payload.orderType=orderType}
return http.get(path,{'content-type':'application/json'},payload)},createTeam:function(name,roles=["owner"]){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/teams';let payload={};if(name){payload.name=name}
if(roles){payload.roles=roles}
return http.post(path,{'content-type':'application/json'},payload)},getTeam:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateTeam:function(teamId,name){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);return http.put(path,{'content-type':'application/json'},{'name':name})},deleteTeam:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);return http.delete(path,{'content-type':'application/json'},{})},getTeamMembers:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}/members'.replace(new RegExp('{teamId}','g'),teamId);return http.get(path,{'content-type':'application/json'},{})},createTeamMembership:function(teamId,email,roles,redirect,name=''){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);let payload={};if(name){payload.name=name}
return http.put(path,{'content-type':'application/json'},payload)},deleteTeam:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}'.replace(new RegExp('{teamId}','g'),teamId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},getTeamMembers:function(teamId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}/members'.replace(new RegExp('{teamId}','g'),teamId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},createTeamMembership:function(teamId,email,roles,redirect,name=''){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(roles===undefined){throw new Error('Missing required parameter: "roles"')}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"')}
let path='/teams/{teamId}/memberships'.replace(new RegExp('{teamId}','g'),teamId);return http.post(path,{'content-type':'application/json'},{'email':email,'name':name,'roles':roles,'redirect':redirect})},deleteTeamMembership:function(teamId,inviteId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}/memberships'.replace(new RegExp('{teamId}','g'),teamId);let payload={};if(email){payload.email=email}
if(name){payload.name=name}
if(roles){payload.roles=roles}
if(redirect){payload.redirect=redirect}
return http.post(path,{'content-type':'application/json'},payload)},deleteTeamMembership:function(teamId,inviteId){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
if(inviteId===undefined){throw new Error('Missing required parameter: "inviteId"')}
let path='/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);return http.delete(path,{'content-type':'application/json'},{})},createTeamMembershipResend:function(teamId,inviteId,redirect){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},createTeamMembershipResend:function(teamId,inviteId,redirect){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
if(inviteId===undefined){throw new Error('Missing required parameter: "inviteId"')}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"')}
let path='/teams/{teamId}/memberships/{inviteId}/resend'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);return http.post(path,{'content-type':'application/json'},{'redirect':redirect})},updateTeamMembershipStatus:function(teamId,inviteId,userId,secret,success='',failure=''){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/teams/{teamId}/memberships/{inviteId}/resend'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);let payload={};if(redirect){payload.redirect=redirect}
return http.post(path,{'content-type':'application/json'},payload)},updateTeamMembershipStatus:function(teamId,inviteId,userId,secret,success='',failure=''){if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
if(inviteId===undefined){throw new Error('Missing required parameter: "inviteId"')}
if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
if(secret===undefined){throw new Error('Missing required parameter: "secret"')}
let path='/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);return iframe('patch',path,{project:config.project,'userId':userId,'secret':secret,'success':success,'failure':failure})}};let users={listUsers:function(search='',limit=25,offset=0,orderType='ASC'){let path='/users';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType})},createUser:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')}
let path='/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}','g'),teamId).replace(new RegExp('{inviteId}','g'),inviteId);let payload={};if(userId){payload.userId=userId}
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}
if(limit){payload.limit=limit}
if(offset){payload.offset=offset}
if(orderType){payload.orderType=orderType}
return http.get(path,{'content-type':'application/json'},payload)},createUser:function(email,password,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"')}
if(password===undefined){throw new Error('Missing required parameter: "password"')}
let path='/users';return http.post(path,{'content-type':'application/json'},{'email':email,'password':password,'name':name})},getUser:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}'.replace(new RegExp('{userId}','g'),userId);return http.get(path,{'content-type':'application/json'},{})},getUserLogs:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/logs'.replace(new RegExp('{userId}','g'),userId);return http.get(path,{'content-type':'application/json'},{})},getUserPrefs:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/prefs'.replace(new RegExp('{userId}','g'),userId);return http.get(path,{'content-type':'application/json'},{})},getUserSessions:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/sessions'.replace(new RegExp('{userId}','g'),userId);return http.get(path,{'content-type':'application/json'},{})},deleteUserSessions:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/sessions'.replace(new RegExp('{userId}','g'),userId);return http.delete(path,{'content-type':'application/json'},{})},deleteUsersSession:function(userId,sessionId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users';let payload={};if(email){payload.email=email}
if(password){payload.password=password}
if(name){payload.name=name}
return http.post(path,{'content-type':'application/json'},payload)},getUser:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}'.replace(new RegExp('{userId}','g'),userId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},getUserLogs:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/logs'.replace(new RegExp('{userId}','g'),userId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},getUserPrefs:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/prefs'.replace(new RegExp('{userId}','g'),userId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},updateUserPrefs:function(userId,prefs){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
if(prefs===undefined){throw new Error('Missing required parameter: "prefs"')}
let path='/users/{userId}/prefs'.replace(new RegExp('{userId}','g'),userId);let payload={};if(prefs){payload.prefs=prefs}
return http.patch(path,{'content-type':'application/json'},payload)},getUserSessions:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/sessions'.replace(new RegExp('{userId}','g'),userId);let payload={};return http.get(path,{'content-type':'application/json'},payload)},deleteUserSessions:function(userId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/sessions'.replace(new RegExp('{userId}','g'),userId);let payload={};return http.delete(path,{'content-type':'application/json'},payload)},deleteUserSession:function(userId,sessionId){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"')}
let path='/users/{userId}/sessions/:session'.replace(new RegExp('{userId}','g'),userId);return http.delete(path,{'content-type':'application/json'},{'sessionId':sessionId})},updateUserStatus:function(userId,status){if(userId===undefined){throw new Error('Missing required parameter: "userId"')}
let path='/users/{userId}/sessions/:session'.replace(new RegExp('{userId}','g'),userId);let payload={};if(sessionId){payload.sessionId=sessionId}
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);return http.patch(path,{'content-type':'application/json'},{'status':status})}};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}}})(window)
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:{})

View file

@ -1,7 +1,7 @@
# Appwrite SDK for NodeJS
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**This SDK is compatible with Appwrite server version 0.2.0. For older versions, please check previous releases.**

View file

@ -0,0 +1,19 @@
const sdk = require('node-appwrite');
// Init SDK
let client = new sdk.Client();
let users = new sdk.Users(client);
client
.setProject('')
.setKey('')
;
let promise = users.deleteUserSession('[USER_ID]', '[SESSION_ID]');
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -0,0 +1,19 @@
const sdk = require('node-appwrite');
// Init SDK
let client = new sdk.Client();
let users = new sdk.Users(client);
client
.setProject('')
.setKey('')
;
let promise = users.updateUserPrefs('[USER_ID]', '{}');
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -4,7 +4,7 @@ const request = require('request-promise-native');
class Client {
constructor() {
this.endpoint = 'https://https://appwrite.io/v1';
this.endpoint = 'https://appwrite.io/v1';
this.headers = {
'content-type': '',
'x-sdk-version': 'appwrite:nodejs:1.0.26',
@ -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

@ -14,7 +14,7 @@ class Auth extends Service {
* the only valid redirect URL's are the once from domains you have set when
* added your platforms in the console interface.
*
* When accessing this route using JavaScript from the browser, success and
* 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
@ -170,7 +170,7 @@ class Auth extends Service {
* the only valid redirect URL's are the once from domains you have set when
* added your platforms in the console interface.
*
* When accessing this route using JavaScript from the browser, success and
* 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

View file

@ -76,9 +76,9 @@ class Locale extends Service {
/**
* List of currencies
*
* List of all currencies, including currency symbol, name, plural, and
* decimal digits for all major and minor currencies. You can use the locale
* header to get the data in supported language.
* List of all currencies, including currency symol, name, plural, and decimal
* digits for all major and minor currencies. You can use the locale header to
* get the data in supported language.
*
* @throws Exception
* @return {}

View file

@ -100,6 +100,26 @@ class Users extends Service {
});
}
/**
* Update Account Prefs
*
* Update user preferences by its unique ID. You can pass only the specific
* settings you wish to update.
*
* @param string userId
* @param string prefs
* @throws Exception
* @return {}
*/
async updateUserPrefs(userId, prefs) {
let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId);
return await this.client.call('patch', path, {'content-type': 'application/json'},
{
'prefs': prefs
});
}
/**
* Get User Sessions
*
@ -144,7 +164,7 @@ class Users extends Service {
* @throws Exception
* @return {}
*/
async deleteUsersSession(userId, sessionId) {
async deleteUserSession(userId, sessionId) {
let path = '/users/{userId}/sessions/:session'.replace(new RegExp('{userId}', 'g'), userId);
return await this.client.call('delete', path, {'content-type': 'application/json'},

View file

@ -1,7 +1,7 @@
# Appwrite SDK for PHP
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**This SDK is compatible with Appwrite server version 0.2.0. For older versions, please check previous releases.**
@ -13,7 +13,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
## Installation
To install via [Composer](https://getcomposer.org/):
To install via [Composer](http://getcomposer.org/):
```bash
composer require appwrite/appwrite
@ -21,4 +21,4 @@ composer require appwrite/appwrite
## License
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

View file

@ -3,7 +3,7 @@
## Get Account
```http request
GET https://https://appwrite.io/v1/account
GET https://appwrite.io/v1/account
```
** Get currently logged in user data as JSON object. **
@ -11,7 +11,7 @@ GET https://https://appwrite.io/v1/account
## Delete Account
```http request
DELETE https://https://appwrite.io/v1/account
DELETE https://appwrite.io/v1/account
```
** Delete currently logged in user account. **
@ -19,7 +19,7 @@ DELETE https://https://appwrite.io/v1/account
## Update Account Email
```http request
PATCH https://https://appwrite.io/v1/account/email
PATCH https://appwrite.io/v1/account/email
```
** Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. **
@ -34,7 +34,7 @@ PATCH https://https://appwrite.io/v1/account/email
## Update Account Name
```http request
PATCH https://https://appwrite.io/v1/account/name
PATCH https://appwrite.io/v1/account/name
```
** Update currently logged in user account name. **
@ -48,7 +48,7 @@ PATCH https://https://appwrite.io/v1/account/name
## Update Account Password
```http request
PATCH https://https://appwrite.io/v1/account/password
PATCH https://appwrite.io/v1/account/password
```
** Update currently logged in user password. For validation, user is required to pass the password twice. **
@ -63,7 +63,7 @@ PATCH https://https://appwrite.io/v1/account/password
## Get Account Preferences
```http request
GET https://https://appwrite.io/v1/account/prefs
GET https://appwrite.io/v1/account/prefs
```
** Get currently logged in user preferences key-value object. **
@ -71,7 +71,7 @@ GET https://https://appwrite.io/v1/account/prefs
## Update Account Prefs
```http request
PATCH https://https://appwrite.io/v1/account/prefs
PATCH https://appwrite.io/v1/account/prefs
```
** Update currently logged in user account preferences. You can pass only the specific settings you wish to update. **
@ -85,7 +85,7 @@ PATCH https://https://appwrite.io/v1/account/prefs
## Get Account Security Log
```http request
GET https://https://appwrite.io/v1/account/security
GET https://appwrite.io/v1/account/security
```
** Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log. **
@ -93,7 +93,7 @@ GET https://https://appwrite.io/v1/account/security
## Get Account Active Sessions
```http request
GET https://https://appwrite.io/v1/account/sessions
GET https://appwrite.io/v1/account/sessions
```
** Get currently logged in user list of active sessions across different devices. **

View file

@ -3,14 +3,14 @@
## Login User
```http request
POST https://https://appwrite.io/v1/auth/login
POST https://appwrite.io/v1/auth/login
```
** 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\&#039;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&#039;s are the once from domains you have set when added 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. **
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. **
### Parameters
@ -24,7 +24,7 @@ When accessing this route using JavaScript from the browser, success and failure
## Logout Current Session
```http request
DELETE https://https://appwrite.io/v1/auth/logout
DELETE https://appwrite.io/v1/auth/logout
```
** 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. **
@ -32,7 +32,7 @@ DELETE https://https://appwrite.io/v1/auth/logout
## Logout Specific Session
```http request
DELETE https://https://appwrite.io/v1/auth/logout/{id}
DELETE https://appwrite.io/v1/auth/logout/{id}
```
** Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted. **
@ -46,7 +46,7 @@ DELETE https://https://appwrite.io/v1/auth/logout/{id}
## OAuth Login
```http request
GET https://https://appwrite.io/v1/auth/oauth/{provider}
GET https://appwrite.io/v1/auth/oauth/{provider}
```
### Parameters
@ -60,7 +60,7 @@ GET https://https://appwrite.io/v1/auth/oauth/{provider}
## Password Recovery
```http request
POST https://https://appwrite.io/v1/auth/recovery
POST https://appwrite.io/v1/auth/recovery
```
** Sends the user an email with a temporary secret token for password reset. When the user clicks the confirmation link he is redirected back to your app password reset redirect URL with a secret token and email address values attached to the URL query string. Use the query string params to submit a request to the /auth/password/reset endpoint to complete the process. **
@ -75,7 +75,7 @@ POST https://https://appwrite.io/v1/auth/recovery
## Password Reset
```http request
PUT https://https://appwrite.io/v1/auth/recovery/reset
PUT https://appwrite.io/v1/auth/recovery/reset
```
** 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.
@ -94,7 +94,7 @@ Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWA
## Register User
```http request
POST https://https://appwrite.io/v1/auth/register
POST https://appwrite.io/v1/auth/register
```
** Use this endpoint to allow a new user to register an account in your project. Use the success and failure URL&#039;s to redirect users back to your application after signup completes.
@ -103,7 +103,7 @@ If registration completes successfully user will be sent with a confirmation ema
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&#039;s are the once from domains you have set when added 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. **
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. **
### Parameters
@ -119,7 +119,7 @@ When accessing this route using JavaScript from the browser, success and failure
## Confirm User
```http request
POST https://https://appwrite.io/v1/auth/register/confirm
POST https://appwrite.io/v1/auth/register/confirm
```
** Use this endpoint to complete the confirmation of the user account email address. 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/register endpoint. **
@ -134,7 +134,7 @@ POST https://https://appwrite.io/v1/auth/register/confirm
## Resend Confirmation
```http request
POST https://https://appwrite.io/v1/auth/register/confirm/resend
POST https://appwrite.io/v1/auth/register/confirm/resend
```
** 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.

View file

@ -3,7 +3,7 @@
## Get Browser Icon
```http request
GET https://https://appwrite.io/v1/avatars/browsers/{code}
GET https://appwrite.io/v1/avatars/browsers/{code}
```
** 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. **
@ -20,7 +20,7 @@ GET https://https://appwrite.io/v1/avatars/browsers/{code}
## Get Credit Card Icon
```http request
GET https://https://appwrite.io/v1/avatars/credit-cards/{code}
GET https://appwrite.io/v1/avatars/credit-cards/{code}
```
** 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. **
@ -37,7 +37,7 @@ GET https://https://appwrite.io/v1/avatars/credit-cards/{code}
## Get Favicon
```http request
GET https://https://appwrite.io/v1/avatars/favicon
GET https://appwrite.io/v1/avatars/favicon
```
** Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL. **
@ -51,7 +51,7 @@ GET https://https://appwrite.io/v1/avatars/favicon
## Get Country Flag
```http request
GET https://https://appwrite.io/v1/avatars/flags/{code}
GET https://appwrite.io/v1/avatars/flags/{code}
```
** 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. **
@ -68,7 +68,7 @@ GET https://https://appwrite.io/v1/avatars/flags/{code}
## Get Image from URL
```http request
GET https://https://appwrite.io/v1/avatars/image
GET https://appwrite.io/v1/avatars/image
```
** 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. **
@ -84,7 +84,7 @@ GET https://https://appwrite.io/v1/avatars/image
## Text to QR Generator
```http request
GET https://https://appwrite.io/v1/avatars/qr
GET https://appwrite.io/v1/avatars/qr
```
** Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. **

View file

@ -3,7 +3,7 @@
## List Collections
```http request
GET https://https://appwrite.io/v1/database
GET https://appwrite.io/v1/database
```
** Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](/docs/modes). **
@ -20,7 +20,7 @@ GET https://https://appwrite.io/v1/database
## Create Collection
```http request
POST https://https://appwrite.io/v1/database
POST https://appwrite.io/v1/database
```
** Create a new Collection. **
@ -37,7 +37,7 @@ POST https://https://appwrite.io/v1/database
## Get Collection
```http request
GET https://https://appwrite.io/v1/database/{collectionId}
GET https://appwrite.io/v1/database/{collectionId}
```
** Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. **
@ -51,7 +51,7 @@ GET https://https://appwrite.io/v1/database/{collectionId}
## Update Collection
```http request
PUT https://https://appwrite.io/v1/database/{collectionId}
PUT https://appwrite.io/v1/database/{collectionId}
```
** Update collection by its unique ID. **
@ -69,7 +69,7 @@ PUT https://https://appwrite.io/v1/database/{collectionId}
## Delete Collection
```http request
DELETE https://https://appwrite.io/v1/database/{collectionId}
DELETE https://appwrite.io/v1/database/{collectionId}
```
** Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. **
@ -83,7 +83,7 @@ DELETE https://https://appwrite.io/v1/database/{collectionId}
## List Documents
```http request
GET https://https://appwrite.io/v1/database/{collectionId}/documents
GET https://appwrite.io/v1/database/{collectionId}/documents
```
** Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/modes). **
@ -106,7 +106,7 @@ GET https://https://appwrite.io/v1/database/{collectionId}/documents
## Create Document
```http request
POST https://https://appwrite.io/v1/database/{collectionId}/documents
POST https://appwrite.io/v1/database/{collectionId}/documents
```
** Create a new Document. **
@ -126,7 +126,7 @@ POST https://https://appwrite.io/v1/database/{collectionId}/documents
## Get Document
```http request
GET https://https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
GET https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
```
** Get document by its unique ID. This endpoint response returns a JSON object with the document data. **
@ -141,7 +141,7 @@ GET https://https://appwrite.io/v1/database/{collectionId}/documents/{documentId
## Update Document
```http request
PATCH https://https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
PATCH https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
```
### Parameters
@ -157,7 +157,7 @@ PATCH https://https://appwrite.io/v1/database/{collectionId}/documents/{document
## Delete Document
```http request
DELETE https://https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
DELETE https://appwrite.io/v1/database/{collectionId}/documents/{documentId}
```
** Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted. **

View file

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

View file

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

View file

@ -0,0 +1,15 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Users;
$client = new Client();
$client
->setProject('')
->setKey('')
;
$users = new Users($client);
$result = $users->deleteUserSession('[USER_ID]', '[SESSION_ID]');

View file

@ -0,0 +1,15 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Users;
$client = new Client();
$client
->setProject('')
->setKey('')
;
$users = new Users($client);
$result = $users->updateUserPrefs('[USER_ID]', '{}');

View file

@ -3,7 +3,7 @@
## Get User Locale
```http request
GET https://https://appwrite.io/v1/locale
GET https://appwrite.io/v1/locale
```
** Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in supported language. **
@ -11,7 +11,7 @@ GET https://https://appwrite.io/v1/locale
## List Countries
```http request
GET https://https://appwrite.io/v1/locale/countries
GET https://appwrite.io/v1/locale/countries
```
** List of all countries. You can use the locale header to get the data in supported language. **
@ -19,7 +19,7 @@ GET https://https://appwrite.io/v1/locale/countries
## List EU Countries
```http request
GET https://https://appwrite.io/v1/locale/countries/eu
GET https://appwrite.io/v1/locale/countries/eu
```
** List of all countries that are currently members of the EU. You can use the locale header to get the data in supported language. UK brexit date is currently set to 2019-10-31 and will be updated if and when needed. **
@ -27,7 +27,7 @@ GET https://https://appwrite.io/v1/locale/countries/eu
## List Countries Phone Codes
```http request
GET https://https://appwrite.io/v1/locale/countries/phones
GET https://appwrite.io/v1/locale/countries/phones
```
** List of all countries phone codes. You can use the locale header to get the data in supported language. **
@ -35,8 +35,8 @@ GET https://https://appwrite.io/v1/locale/countries/phones
## List of currencies
```http request
GET https://https://appwrite.io/v1/locale/currencies
GET https://appwrite.io/v1/locale/currencies
```
** List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language. **
** List of all currencies, including currency symol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language. **

View file

@ -3,13 +3,13 @@
## List Projects
```http request
GET https://https://appwrite.io/v1/projects
GET https://appwrite.io/v1/projects
```
## Create Project
```http request
POST https://https://appwrite.io/v1/projects
POST https://appwrite.io/v1/projects
```
### Parameters
@ -31,7 +31,7 @@ POST https://https://appwrite.io/v1/projects
## Get Project
```http request
GET https://https://appwrite.io/v1/projects/{projectId}
GET https://appwrite.io/v1/projects/{projectId}
```
### Parameters
@ -43,7 +43,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}
## Update Project
```http request
PATCH https://https://appwrite.io/v1/projects/{projectId}
PATCH https://appwrite.io/v1/projects/{projectId}
```
### Parameters
@ -65,7 +65,7 @@ PATCH https://https://appwrite.io/v1/projects/{projectId}
## Delete Project
```http request
DELETE https://https://appwrite.io/v1/projects/{projectId}
DELETE https://appwrite.io/v1/projects/{projectId}
```
### Parameters
@ -77,7 +77,7 @@ DELETE https://https://appwrite.io/v1/projects/{projectId}
## List Keys
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/keys
GET https://appwrite.io/v1/projects/{projectId}/keys
```
### Parameters
@ -89,7 +89,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/keys
## Create Key
```http request
POST https://https://appwrite.io/v1/projects/{projectId}/keys
POST https://appwrite.io/v1/projects/{projectId}/keys
```
### Parameters
@ -103,7 +103,7 @@ POST https://https://appwrite.io/v1/projects/{projectId}/keys
## Get Key
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
GET https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
```
### Parameters
@ -116,7 +116,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
## Update Key
```http request
PUT https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
PUT https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
```
### Parameters
@ -131,7 +131,7 @@ PUT https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
## Delete Key
```http request
DELETE https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
DELETE https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
```
### Parameters
@ -144,7 +144,7 @@ DELETE https://https://appwrite.io/v1/projects/{projectId}/keys/{keyId}
## Update Project OAuth
```http request
PATCH https://https://appwrite.io/v1/projects/{projectId}/oauth
PATCH https://appwrite.io/v1/projects/{projectId}/oauth
```
### Parameters
@ -159,7 +159,7 @@ PATCH https://https://appwrite.io/v1/projects/{projectId}/oauth
## List Platforms
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/platforms
GET https://appwrite.io/v1/projects/{projectId}/platforms
```
### Parameters
@ -171,7 +171,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/platforms
## Create Platform
```http request
POST https://https://appwrite.io/v1/projects/{projectId}/platforms
POST https://appwrite.io/v1/projects/{projectId}/platforms
```
### Parameters
@ -188,7 +188,7 @@ POST https://https://appwrite.io/v1/projects/{projectId}/platforms
## Get Platform
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
GET https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
```
### Parameters
@ -201,7 +201,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
## Update Platform
```http request
PUT https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
PUT https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
```
### Parameters
@ -218,7 +218,7 @@ PUT https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
## Delete Platform
```http request
DELETE https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
DELETE https://appwrite.io/v1/projects/{projectId}/platforms/{platformId}
```
### Parameters
@ -231,7 +231,7 @@ DELETE https://https://appwrite.io/v1/projects/{projectId}/platforms/{platformId
## List Tasks
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/tasks
GET https://appwrite.io/v1/projects/{projectId}/tasks
```
### Parameters
@ -243,7 +243,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/tasks
## Create Task
```http request
POST https://https://appwrite.io/v1/projects/{projectId}/tasks
POST https://appwrite.io/v1/projects/{projectId}/tasks
```
### Parameters
@ -264,7 +264,7 @@ POST https://https://appwrite.io/v1/projects/{projectId}/tasks
## Get Task
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
GET https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
```
### Parameters
@ -277,7 +277,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
## Update Task
```http request
PUT https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
PUT https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
```
### Parameters
@ -299,7 +299,7 @@ PUT https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
## Delete Task
```http request
DELETE https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
DELETE https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
```
### Parameters
@ -312,7 +312,7 @@ DELETE https://https://appwrite.io/v1/projects/{projectId}/tasks/{taskId}
## Get Project
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/usage
GET https://appwrite.io/v1/projects/{projectId}/usage
```
### Parameters
@ -324,7 +324,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/usage
## List Webhooks
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/webhooks
GET https://appwrite.io/v1/projects/{projectId}/webhooks
```
### Parameters
@ -336,7 +336,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/webhooks
## Create Webhook
```http request
POST https://https://appwrite.io/v1/projects/{projectId}/webhooks
POST https://appwrite.io/v1/projects/{projectId}/webhooks
```
### Parameters
@ -354,7 +354,7 @@ POST https://https://appwrite.io/v1/projects/{projectId}/webhooks
## Get Webhook
```http request
GET https://https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
GET https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
```
### Parameters
@ -367,7 +367,7 @@ GET https://https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
## Update Webhook
```http request
PUT https://https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
PUT https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
```
### Parameters
@ -386,7 +386,7 @@ PUT https://https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
## Delete Webhook
```http request
DELETE https://https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
DELETE https://appwrite.io/v1/projects/{projectId}/webhooks/{webhookId}
```
### Parameters

View file

@ -3,7 +3,7 @@
## List Files
```http request
GET https://https://appwrite.io/v1/storage/files
GET https://appwrite.io/v1/storage/files
```
** Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/modes). **
@ -20,7 +20,7 @@ GET https://https://appwrite.io/v1/storage/files
## Create File
```http request
POST https://https://appwrite.io/v1/storage/files
POST https://appwrite.io/v1/storage/files
```
** Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments. **
@ -37,7 +37,7 @@ POST https://https://appwrite.io/v1/storage/files
## Get File
```http request
GET https://https://appwrite.io/v1/storage/files/{fileId}
GET https://appwrite.io/v1/storage/files/{fileId}
```
** Get file by its unique ID. This endpoint response returns a JSON object with the file metadata. **
@ -51,7 +51,7 @@ GET https://https://appwrite.io/v1/storage/files/{fileId}
## Update File
```http request
PUT https://https://appwrite.io/v1/storage/files/{fileId}
PUT https://appwrite.io/v1/storage/files/{fileId}
```
** Update file by its unique ID. Only users with write permissions have access to update this resource. **
@ -68,7 +68,7 @@ PUT https://https://appwrite.io/v1/storage/files/{fileId}
## Delete File
```http request
DELETE https://https://appwrite.io/v1/storage/files/{fileId}
DELETE https://appwrite.io/v1/storage/files/{fileId}
```
** Delete a file by its unique ID. Only users with write permissions have access to delete this resource. **
@ -82,7 +82,7 @@ DELETE https://https://appwrite.io/v1/storage/files/{fileId}
## Get File for Download
```http request
GET https://https://appwrite.io/v1/storage/files/{fileId}/download
GET https://appwrite.io/v1/storage/files/{fileId}/download
```
** Get file content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; header that tells the browser to start downloading the file to user downloads directory. **
@ -96,7 +96,7 @@ GET https://https://appwrite.io/v1/storage/files/{fileId}/download
## Get File Preview
```http request
GET https://https://appwrite.io/v1/storage/files/{fileId}/preview
GET https://appwrite.io/v1/storage/files/{fileId}/preview
```
** Get file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets will return file icon image. You can also pass query string arguments for cutting and resizing your preview image. **
@ -115,7 +115,7 @@ GET https://https://appwrite.io/v1/storage/files/{fileId}/preview
## Get File for View
```http request
GET https://https://appwrite.io/v1/storage/files/{fileId}/view
GET https://appwrite.io/v1/storage/files/{fileId}/view
```
** Get file content by its unique ID. This endpoint is similar to the download method but returns with no &#039;Content-Disposition: attachment&#039; header. **

View file

@ -3,7 +3,7 @@
## List Teams
```http request
GET https://https://appwrite.io/v1/teams
GET https://appwrite.io/v1/teams
```
** Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/modes). **
@ -20,7 +20,7 @@ GET https://https://appwrite.io/v1/teams
## Create Team
```http request
POST https://https://appwrite.io/v1/teams
POST https://appwrite.io/v1/teams
```
** Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. **
@ -35,7 +35,7 @@ POST https://https://appwrite.io/v1/teams
## Get Team
```http request
GET https://https://appwrite.io/v1/teams/{teamId}
GET https://appwrite.io/v1/teams/{teamId}
```
** Get team by its unique ID. All team members have read access for this resource. **
@ -49,7 +49,7 @@ GET https://https://appwrite.io/v1/teams/{teamId}
## Update Team
```http request
PUT https://https://appwrite.io/v1/teams/{teamId}
PUT https://appwrite.io/v1/teams/{teamId}
```
** Update team by its unique ID. Only team owners have write access for this resource. **
@ -64,7 +64,7 @@ PUT https://https://appwrite.io/v1/teams/{teamId}
## Delete Team
```http request
DELETE https://https://appwrite.io/v1/teams/{teamId}
DELETE https://appwrite.io/v1/teams/{teamId}
```
** Delete team by its unique ID. Only team owners have write access for this resource. **
@ -78,7 +78,7 @@ DELETE https://https://appwrite.io/v1/teams/{teamId}
## Get Team Members
```http request
GET https://https://appwrite.io/v1/teams/{teamId}/members
GET https://appwrite.io/v1/teams/{teamId}/members
```
** Get team members by the team unique ID. All team members have read access for this list of resources. **
@ -92,7 +92,7 @@ GET https://https://appwrite.io/v1/teams/{teamId}/members
## Create Team Membership
```http request
POST https://https://appwrite.io/v1/teams/{teamId}/memberships
POST https://appwrite.io/v1/teams/{teamId}/memberships
```
** Use this endpoint to invite a new member to your team. An email with a link to join the team will be sent to the new member email address. If member doesn&#039;t exists in the project it will be automatically created.
@ -114,7 +114,7 @@ Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWA
## Delete Team Membership
```http request
DELETE https://https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}
DELETE https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}
```
** This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. **
@ -129,7 +129,7 @@ DELETE https://https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}
## Create Team Membership (Resend)
```http request
POST https://https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/resend
POST https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/resend
```
** Use this endpoint to resend your invitation email for a user to join a team. **
@ -145,7 +145,7 @@ POST https://https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/resend
## Update Team Membership Status
```http request
PATCH https://https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/status
PATCH https://appwrite.io/v1/teams/{teamId}/memberships/{inviteId}/status
```
** Use this endpoint to let user accept an invitation to join a team after he is being redirect back to your app from the invitation email. Use the success and failure URL&#039;s to redirect users back to your application after the request completes.

View file

@ -3,7 +3,7 @@
## List Users
```http request
GET https://https://appwrite.io/v1/users
GET https://appwrite.io/v1/users
```
** Get a list of all the project users. You can use the query params to filter your results. **
@ -20,7 +20,7 @@ GET https://https://appwrite.io/v1/users
## Create User
```http request
POST https://https://appwrite.io/v1/users
POST https://appwrite.io/v1/users
```
** Create a new user. **
@ -36,7 +36,7 @@ POST https://https://appwrite.io/v1/users
## Get User
```http request
GET https://https://appwrite.io/v1/users/{userId}
GET https://appwrite.io/v1/users/{userId}
```
** Get user by its unique ID. **
@ -50,7 +50,7 @@ GET https://https://appwrite.io/v1/users/{userId}
## Get User Logs
```http request
GET https://https://appwrite.io/v1/users/{userId}/logs
GET https://appwrite.io/v1/users/{userId}/logs
```
** Get user activity logs list by its unique ID. **
@ -64,7 +64,7 @@ GET https://https://appwrite.io/v1/users/{userId}/logs
## Get User Prefs
```http request
GET https://https://appwrite.io/v1/users/{userId}/prefs
GET https://appwrite.io/v1/users/{userId}/prefs
```
** Get user preferences by its unique ID. **
@ -75,10 +75,25 @@ GET https://https://appwrite.io/v1/users/{userId}/prefs
| --- | --- | --- | --- |
| userId | string | **Required** User unique ID. | |
## Update Account Prefs
```http request
PATCH https://appwrite.io/v1/users/{userId}/prefs
```
** Update user preferences by its unique ID. You can pass only the specific settings you wish to update. **
### Parameters
| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| userId | string | **Required** User unique ID. | |
| prefs | string | Prefs key-value JSON object string. | |
## Get User Sessions
```http request
GET https://https://appwrite.io/v1/users/{userId}/sessions
GET https://appwrite.io/v1/users/{userId}/sessions
```
** Get user sessions list by its unique ID. **
@ -92,7 +107,7 @@ GET https://https://appwrite.io/v1/users/{userId}/sessions
## Delete User Sessions
```http request
DELETE https://https://appwrite.io/v1/users/{userId}/sessions
DELETE https://appwrite.io/v1/users/{userId}/sessions
```
** Delete all user sessions by its unique ID. **
@ -106,7 +121,7 @@ DELETE https://https://appwrite.io/v1/users/{userId}/sessions
## Delete User Session
```http request
DELETE https://https://appwrite.io/v1/users/{userId}/sessions/:session
DELETE https://appwrite.io/v1/users/{userId}/sessions/:session
```
** Delete user sessions by its unique ID. **
@ -121,7 +136,7 @@ DELETE https://https://appwrite.io/v1/users/{userId}/sessions/:session
## Update user status
```http request
PATCH https://https://appwrite.io/v1/users/{userId}/status
PATCH https://appwrite.io/v1/users/{userId}/status
```
** Update user status by its unique ID. **

View file

@ -28,7 +28,7 @@ class Client
*
* @var string
*/
protected $endpoint = 'https://https://appwrite.io/v1';
protected $endpoint = 'https://appwrite.io/v1';
/**
* Global Headers
@ -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

@ -20,7 +20,7 @@ class Auth extends Service
* the only valid redirect URL's are the once from domains you have set when
* added your platforms in the console interface.
*
* When accessing this route using JavaScript from the browser, success and
* 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
@ -188,7 +188,7 @@ class Auth extends Service
* the only valid redirect URL's are the once from domains you have set when
* added your platforms in the console interface.
*
* When accessing this route using JavaScript from the browser, success and
* 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

View file

@ -90,9 +90,9 @@ class Locale extends Service
/**
* List of currencies
*
* List of all currencies, including currency symbol, name, plural, and
* decimal digits for all major and minor currencies. You can use the locale
* header to get the data in supported language.
* List of all currencies, including currency symol, name, plural, and decimal
* digits for all major and minor currencies. You can use the locale header to
* get the data in supported language.
*
* @throws Exception
* @return array

View file

@ -116,6 +116,28 @@ class Users extends Service
], $params);
}
/**
* Update Account Prefs
*
* Update user preferences by its unique ID. You can pass only the specific
* settings you wish to update.
*
* @param string $userId
* @param string $prefs
* @throws Exception
* @return array
*/
public function updateUserPrefs($userId, $prefs)
{
$path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs');
$params = [];
$params['prefs'] = $prefs;
return $this->client->call(Client::METHOD_PATCH, $path, [
], $params);
}
/**
* Get User Sessions
*
@ -164,7 +186,7 @@ class Users extends Service
* @throws Exception
* @return array
*/
public function deleteUsersSession($userId, $sessionId)
public function deleteUserSession($userId, $sessionId)
{
$path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions/:session');
$params = [];

View file

@ -1,7 +1,7 @@
# Appwrite SDK for Python
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**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).**

View file

@ -4,7 +4,7 @@ import requests
class Client:
def __init__(self):
self._self_signed = False
self._endpoint = 'https://https://appwrite.io/v1'
self._endpoint = 'https://appwrite.io/v1'
self._global_headers = {
'content-type': '',
'x-sdk-version': 'appwrite:python:1.0.0',
@ -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

@ -58,6 +58,17 @@ class Users(Service):
return self.client.call('get', path, {
}, params)
def update_user_prefs(self, user_id, prefs):
"""Update Account Prefs"""
params = {}
path = '/users/{userId}/prefs'
path.replace('{userId}', user_id)
params['prefs'] = prefs
return self.client.call('patch', path, {
}, params)
def get_user_sessions(self, user_id):
"""Get User Sessions"""
@ -78,7 +89,7 @@ class Users(Service):
return self.client.call('delete', path, {
}, params)
def delete_users_session(self, user_id, session_id):
def delete_user_session(self, user_id, session_id):
"""Delete User Session"""
params = {}

View file

@ -1,7 +1,7 @@
# Appwrite SDK for Ruby
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-latest-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.2.0-blue.svg?v=1)
**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).**

View file

@ -61,6 +61,18 @@ module Appwrite
}, params);
end
def update_user_prefs(user_id:, prefs:)
path = '/users/{userId}/prefs'
.gsub('{user_id}', user_id)
params = {
'prefs': prefs
}
return @client.call('patch', path, {
}, params);
end
def get_user_sessions(user_id:)
path = '/users/{userId}/sessions'
.gsub('{user_id}', user_id)
@ -83,7 +95,7 @@ module Appwrite
}, params);
end
def delete_users_session(user_id:, session_id:)
def delete_user_session(user_id:, session_id:)
path = '/users/{userId}/sessions/:session'
.gsub('{user_id}', user_id)

View file

@ -45,16 +45,18 @@ $cli
'gitRepoName' => 'sdk-for-php',
'gitUserName' => 'appwrite',
'warning' => $warning,
'readme' => false,
'platform' => 'server',
],
'js' => [
'version' => '1.0.22',
'version' => '1.0.23',
'result' => __DIR__.'/../sdks/js/',
'gitURL' => 'https://github.com/appwrite/sdk-for-js.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-js.git',
'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">

28
composer.lock generated
View file

@ -12,12 +12,12 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-for-php.git",
"reference": "ab0fe8f5669e6a8fc7a8d5e8c711f939412fb33e"
"reference": "ac310ede83c8520c038fdab6e646322eb634d9e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/ab0fe8f5669e6a8fc7a8d5e8c711f939412fb33e",
"reference": "ab0fe8f5669e6a8fc7a8d5e8c711f939412fb33e",
"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-03T22:07:26+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": "0ece44cf81c04ebb8784a60830b088238189ec78"
"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-04 05:50:53"
"time": "2019-10-09 14:12:31"
},
{
"name": "bacon/bacon-qr-code",
@ -1440,12 +1440,12 @@
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "4625774716e3737580e407a02e53ff4defd3cdfa"
"reference": "23419a940881f50525515726eec7507792ace5e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/4625774716e3737580e407a02e53ff4defd3cdfa",
"reference": "4625774716e3737580e407a02e53ff4defd3cdfa",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/23419a940881f50525515726eec7507792ace5e0",
"reference": "23419a940881f50525515726eec7507792ace5e0",
"shasum": ""
},
"require": {
@ -1499,7 +1499,7 @@
"keywords": [
"templating"
],
"time": "2019-10-01T10:31:38+00:00"
"time": "2019-10-05T16:44:39+00:00"
},
{
"name": "utopia-php/abuse",
@ -2409,12 +2409,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
"reference": "36bdcb91de0484f77e256fd3d6119dcf7171c164"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
"reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/36bdcb91de0484f77e256fd3d6119dcf7171c164",
"reference": "36bdcb91de0484f77e256fd3d6119dcf7171c164",
"shasum": ""
},
"require": {
@ -2450,7 +2450,7 @@
"keywords": [
"tokenizer"
],
"time": "2019-09-17T06:23:10+00:00"
"time": "2019-10-05T05:20:56+00:00"
},
{
"name": "phpunit/phpunit",

View file

@ -6,6 +6,7 @@ services:
restart: unless-stopped
volumes:
- ./app:/usr/share/nginx/html/app
- ./docs:/usr/share/nginx/html/docs
- ./public:/usr/share/nginx/html/public
- ./src:/usr/share/nginx/html/src
- ./vendor:/usr/share/nginx/html/vendor

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.

Some files were not shown because too many files have changed in this diff Show more