Merge branch 'master' into bn-locale
This commit is contained in:
commit
80a1910916
|
@ -1,5 +1,4 @@
|
|||
app/db/SQL
|
||||
docs
|
||||
node_modules
|
||||
storage
|
||||
public/scripts
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Version 0.3.0 (PRE-RELEASE)
|
||||
# Version 0.3.0 (PRE-RELEASE) - PLANNED
|
||||
|
||||
## Planned Issues
|
||||
## 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)
|
||||
* New users service routes to allow updates pref and name update
|
||||
|
@ -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
|
||||
|
||||
## Breaking Changs
|
||||
|
||||
* users/deleteUsersSession method name changed to users/deleteUserSession in all SDKs for better consistency
|
||||
|
||||
# Version 0.2.0 (PRE-RELEASE)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -66,7 +66,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
|
|||
* [**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.
|
||||
* [**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).
|
||||
|
||||
|
|
15
app/app.php
15
app/app.php
|
@ -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')
|
||||
;
|
||||
|
@ -251,7 +251,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 +490,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 +499,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 +590,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 +607,7 @@ $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', ''),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -680,7 +681,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';
|
||||
|
|
|
@ -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'),
|
||||
],
|
||||
],
|
||||
|
|
|
@ -145,7 +145,7 @@ return [
|
|||
'KP' => 'Corea del Norte',
|
||||
'PT' => 'Portugal',
|
||||
'PY' => 'Paraguay',
|
||||
'QA' => 'Katar',
|
||||
'QA' => 'Catar',
|
||||
'RO' => 'Rumania',
|
||||
'RU' => 'Rusia',
|
||||
'RW' => 'Ruanda',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'AF' => 'अफ्रीका',
|
||||
'AF' => 'अफ़्रीका',
|
||||
'AN' => 'अंटार्कटिका',
|
||||
'AS' => 'एशिया',
|
||||
'EU' => 'यूरोप',
|
||||
|
|
|
@ -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',
|
||||
|
||||
|
|
11
app/config/locale/hy.continents.php
Normal file
11
app/config/locale/hy.continents.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'AF' => 'Աֆրիկա',
|
||||
'AN' => 'Անտարկտիկա',
|
||||
'AS' => 'Ասիա',
|
||||
'EU' => 'Եվրոպա',
|
||||
'NA' => 'Հյուսիսային Ամերիկա',
|
||||
'OC' => 'Օկեանիա',
|
||||
'SA' => 'Հարավային Ամերիկա',
|
||||
];
|
198
app/config/locale/hy.countries.php
Normal file
198
app/config/locale/hy.countries.php
Normal 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
20
app/config/locale/hy.php
Normal 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',
|
||||
];
|
11
app/config/locale/ja.continents.php
Normal file
11
app/config/locale/ja.continents.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'AF' => 'アフリカ',
|
||||
'AN' => '南極',
|
||||
'AS' => 'アジア',
|
||||
'EU' => 'ヨーロッパ',
|
||||
'NA' => '北米',
|
||||
'OC' => 'オセアニア',
|
||||
'SA' => '南アメリカ',
|
||||
];
|
198
app/config/locale/ja.countries.php
Normal file
198
app/config/locale/ja.countries.php
Normal 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
21
app/config/locale/ja.php
Normal 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',
|
||||
];
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
||||
|
|
|
@ -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> ज्वाइन करने के लिए इस लिंक पर क्लिक करे :
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
नमस्ते {{name}},
|
||||
<br />
|
||||
<br />
|
||||
{{project}} का पासवर्ड रिसेट करने के लिए लिंक पर क्लिक करे
|
||||
{{project}} का पासवर्ड रिसेट करने के लिए इस लिंक पर क्लिक करे।
|
||||
<br />
|
||||
<a href="{{redirect}}">{{redirect}}</a>
|
||||
<br />
|
||||
|
|
24
app/config/locale/templates/hy.email.auth.confirm.tpl
Normal file
24
app/config/locale/templates/hy.email.auth.confirm.tpl
Normal 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>
|
27
app/config/locale/templates/hy.email.auth.invitation.tpl
Normal file
27
app/config/locale/templates/hy.email.auth.invitation.tpl
Normal 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>
|
24
app/config/locale/templates/hy.email.auth.recovery.tpl
Normal file
24
app/config/locale/templates/hy.email.auth.recovery.tpl
Normal 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>
|
24
app/config/locale/templates/ja.email.auth.confirm.tpl
Normal file
24
app/config/locale/templates/ja.email.auth.confirm.tpl
Normal 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>
|
27
app/config/locale/templates/ja.email.auth.invitation.tpl
Normal file
27
app/config/locale/templates/ja.email.auth.invitation.tpl
Normal 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>
|
24
app/config/locale/templates/ja.email.auth.recovery.tpl
Normal file
24
app/config/locale/templates/ja.email.auth.recovery.tpl
Normal 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>
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -13,33 +13,31 @@ return [
|
|||
],
|
||||
'v1/account' => [
|
||||
'name' => 'Account',
|
||||
'description' => 'The account service allow you to fetch and update information related to the currently logged in user. You can also retrieve a list of all the user sessions across different devices and a security log with the account recent activity.',
|
||||
'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' => "The authentication service allows you to verify users accounts using basic email and password login or with a supported OAuth provider. The auth service also exposes methods to confirm users email account and recover users forgotten passwords.\n\nYou can review our currently available OAuth providers from your project console under the **'users'** menu.",
|
||||
'description' => '/docs/services/auth.md',
|
||||
'controller' => 'controllers/auth.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
'v1/avatars' => [
|
||||
'name' => 'Avatars',
|
||||
'description' => 'The avatars service aims to help you complete common and recitative tasks related to your app images, icons and avatars. Using this service we hope to save you some precious time and help you focus on solving your app real challenges.',
|
||||
'description' => '/docs/services/avatars.md',
|
||||
'controller' => 'controllers/avatars.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
'v1/database' => [
|
||||
'name' => 'Database',
|
||||
'description' => "The database service allows you to create structured document collections, query and filter lists of documents and manage an advanced set of read and write access.
|
||||
\n\nAll the data in the database service is stored in JSON format. The service also allows you to nest child documents and use advanced filters to search and query the database just like you would with a classic graph database.
|
||||
\n\nBy leveraging the database permission management you can assign read or write access to the database documents for a specific user, team, user role or even grant public access to all visitors of your project. You can learn more about [how ".APP_NAME.' handles permissions and role access control](/docs/permissions).',
|
||||
'description' => '/docs/services/database.md',
|
||||
'controller' => 'controllers/database.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
'v1/locale' => [
|
||||
'name' => 'Locale',
|
||||
'description' => 'The locale service allow you customize your app based on your user location. Get your user location, IP address, list of countries names, phone codes, currencies and more. This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com).',
|
||||
'description' => '/docs/services/locale.md',
|
||||
'controller' => 'controllers/locale.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
|
@ -55,19 +53,19 @@ return [
|
|||
],
|
||||
'v1/storage' => [
|
||||
'name' => 'Storage',
|
||||
'description' => "The storage service allows you to manage your project files. You can upload, view, download, and query your files and media.\n\nEach file is granted read and write permissions to manage who has access to view or manage it. You can also learn more about how to manage your [resources permissions](/docs/permissions).\n\n You can also use the storage file preview endpoint to show the app users preview images of your files. The preview endpoint also allows you to manipulate the resulting image, so it will fit perfectly inside your app.",
|
||||
'description' => '/docs/services/storage.md',
|
||||
'controller' => 'controllers/storage.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
'v1/teams' => [
|
||||
'name' => 'Teams',
|
||||
'description' => "The teams' service allows you to group together users of your project and allow them to share read and write access to your project resources, such as, database documents or storage files.\n\nEach user who creates a team becomes the team owner and can delegate the ownership role by inviting a new team member. Only team owners can invite new users to the team.",
|
||||
'description' => '/docs/services/teams.md',
|
||||
'controller' => 'controllers/teams.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
'v1/users' => [
|
||||
'name' => 'Users',
|
||||
'description' => "The users' service allows you to to manage your users in admin mode, you can search, block and view your users' current sessions and latest activity.",
|
||||
'description' => '/docs/services/users.md',
|
||||
'controller' => 'controllers/users.php',
|
||||
'sdk' => true,
|
||||
],
|
||||
|
|
|
@ -18,7 +18,7 @@ $utopia->get('/v1/account')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'get')
|
||||
->label('sdk.description', 'Get currently logged in user data as JSON object.')
|
||||
->label('sdk.description', '/docs/references/account/get.md')
|
||||
->action(
|
||||
function () use ($response, &$user, $providers) {
|
||||
$oauthKeys = [];
|
||||
|
@ -50,7 +50,7 @@ $utopia->get('/v1/account/prefs')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'getPrefs')
|
||||
->label('sdk.description', 'Get currently logged in user preferences key-value object.')
|
||||
->label('sdk.description', '/docs/references/account/get-prefs.md')
|
||||
->action(
|
||||
function () use ($response, $user) {
|
||||
$prefs = $user->getAttribute('prefs', '{}');
|
||||
|
@ -74,7 +74,7 @@ $utopia->get('/v1/account/sessions')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'getSessions')
|
||||
->label('sdk.description', 'Get currently logged in user list of active sessions across different devices.')
|
||||
->label('sdk.description', '/docs/references/account/get-sessions.md')
|
||||
->action(
|
||||
function () use ($response, $user) {
|
||||
$tokens = $user->getAttribute('tokens', []);
|
||||
|
@ -131,7 +131,7 @@ $utopia->get('/v1/account/security')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'getSecurity')
|
||||
->label('sdk.description', 'Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.')
|
||||
->label('sdk.description', '/docs/references/account/get-security.md')
|
||||
->action(
|
||||
function () use ($response, $register, $project, $user) {
|
||||
$ad = new \Audit\Adapter\MySQL($register->get('db'));
|
||||
|
@ -201,7 +201,7 @@ $utopia->patch('/v1/account/name')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'updateName')
|
||||
->label('sdk.description', 'Update currently logged in user account name.')
|
||||
->label('sdk.description', '/docs/references/account/update-name.md')
|
||||
->param('name', '', function () { return new Text(100); }, 'User name')
|
||||
->action(
|
||||
function ($name) use ($response, $user, $projectDB, $audit) {
|
||||
|
@ -225,7 +225,7 @@ $utopia->patch('/v1/account/password')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'updatePassword')
|
||||
->label('sdk.description', 'Update currently logged in user password. For validation, user is required to pass the password twice.')
|
||||
->label('sdk.description', '/docs/references/account/update-password.md')
|
||||
->param('password', '', function () { return new Password(); }, 'New password')
|
||||
->param('old-password', '', function () { return new Password(); }, 'Old password')
|
||||
->action(
|
||||
|
@ -254,7 +254,7 @@ $utopia->patch('/v1/account/email')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'updateEmail')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/account/update-email.md')
|
||||
->param('email', '', function () { return new Email(); }, 'Email Address')
|
||||
->param('password', '', function () { return new Password(); }, 'User Password')
|
||||
->action(
|
||||
|
@ -299,7 +299,7 @@ $utopia->patch('/v1/account/prefs')
|
|||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'updatePrefs')
|
||||
->param('prefs', '', function () { return new \Utopia\Validator\Mock();}, 'Prefs key-value JSON object string.')
|
||||
->label('sdk.description', 'Update currently logged in user account preferences. You can pass only the specific settings you wish to update.')
|
||||
->label('sdk.description', '/docs/references/account/update-prefs.md')
|
||||
->action(
|
||||
function ($prefs) use ($response, $user, $projectDB, $audit) {
|
||||
$user = $projectDB->updateDocument(array_merge($user->getArrayCopy(), [
|
||||
|
@ -322,7 +322,7 @@ $utopia->delete('/v1/account')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'delete')
|
||||
->label('sdk.description', 'Delete currently logged in user account.')
|
||||
->label('sdk.description', '/docs/references/account/delete.md')
|
||||
->action(
|
||||
function () use ($response, $request, $user, $projectDB, $audit) {
|
||||
$user = $projectDB->updateDocument(array_merge($user->getArrayCopy(), [
|
||||
|
|
|
@ -24,7 +24,7 @@ $utopia->post('/v1/auth/register')
|
|||
->label('scope', 'auth')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'register')
|
||||
->label('sdk.description', '/docs/refernces/register.md')
|
||||
->label('sdk.description', '/docs/references/auth/register.md')
|
||||
->label('sdk.cookies', true)
|
||||
->label('abuse-limit', 10)
|
||||
->param('email', '', function () { return new Email(); }, 'Account email')
|
||||
|
@ -190,7 +190,7 @@ $utopia->post('/v1/auth/register/confirm')
|
|||
->label('scope', 'public')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'confirm')
|
||||
->label('sdk.description', '/docs/refernces/confirm.md')
|
||||
->label('sdk.description', '/docs/references/auth/confirm.md')
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},userId:{param-userId}')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID')
|
||||
|
@ -240,7 +240,7 @@ $utopia->post('/v1/auth/register/confirm/resend')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'confirmResend')
|
||||
->label('sdk.description', '/docs/refernces/confirm-resend.md')
|
||||
->label('sdk.description', '/docs/references/auth/confirm-resend.md')
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},userId:{param-userId}')
|
||||
->param('confirm', '', function () use ($clients) { return new Host($clients); }, 'Confirmation URL to redirect user to your app after confirm token has been sent to user email.')
|
||||
|
@ -304,7 +304,7 @@ $utopia->post('/v1/auth/login')
|
|||
->label('scope', 'auth')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'login')
|
||||
->label('sdk.description', '/docs/refernces/login.md')
|
||||
->label('sdk.description', '/docs/references/auth/login.md')
|
||||
->label('sdk.cookies', true)
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},email:{param-email}')
|
||||
|
@ -389,7 +389,7 @@ $utopia->delete('/v1/auth/logout')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'logout')
|
||||
->label('sdk.description', '/docs/refernces/logout.md')
|
||||
->label('sdk.description', '/docs/references/auth/logout.md')
|
||||
->label('abuse-limit', 100)
|
||||
->action(
|
||||
function () use ($response, $request, $user, $projectDB, $audit, $webhook) {
|
||||
|
@ -420,7 +420,7 @@ $utopia->delete('/v1/auth/logout/:id')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'logoutBySession')
|
||||
->label('sdk.description', '/docs/refernces/logout-by-session.md')
|
||||
->label('sdk.description', '/docs/references/auth/logout-by-session.md')
|
||||
->label('abuse-limit', 100)
|
||||
->param('id', null, function () { return new UID(); }, 'User specific session unique ID number. if 0 delete all sessions.')
|
||||
->action(
|
||||
|
@ -453,7 +453,7 @@ $utopia->post('/v1/auth/recovery')
|
|||
->label('scope', 'auth')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'recovery')
|
||||
->label('sdk.description', '/docs/refernces/recovery.md')
|
||||
->label('sdk.description', '/docs/references/auth/recovery.md')
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},email:{param-email}')
|
||||
->param('email', '', function () { return new Email(); }, 'User account email address.')
|
||||
|
@ -533,7 +533,7 @@ $utopia->put('/v1/auth/recovery/reset')
|
|||
->label('scope', 'auth')
|
||||
->label('sdk.namespace', 'auth')
|
||||
->label('sdk.method', 'recoveryReset')
|
||||
->label('sdk.description', '/docs/refernces/recovery-reset.md')
|
||||
->label('sdk.description', '/docs/references/auth/recovery-reset.md')
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},userId:{param-userId}')
|
||||
->param('userId', '', function () { return new UID(); }, 'User account email address.')
|
||||
|
|
|
@ -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', '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.')
|
||||
->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);
|
||||
});
|
||||
|
||||
|
@ -107,7 +107,7 @@ $utopia->get('/v1/avatars/browsers/:code')
|
|||
->label('scope', 'avatars.read')
|
||||
->label('sdk.namespace', 'avatars')
|
||||
->label('sdk.method', 'getBrowser')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/avatars/get-browser.md')
|
||||
->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('browsers', $code, $width, $height, $quality);
|
||||
});
|
||||
|
||||
|
@ -120,7 +120,7 @@ $utopia->get('/v1/avatars/flags/:code')
|
|||
->label('scope', 'avatars.read')
|
||||
->label('sdk.namespace', 'avatars')
|
||||
->label('sdk.method', 'getFlag')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/avatars/get-flag.md')
|
||||
->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('flags', $code, $width, $height, $quality);
|
||||
});
|
||||
|
||||
|
@ -132,9 +132,9 @@ $utopia->get('/v1/avatars/image')
|
|||
->label('scope', 'avatars.read')
|
||||
->label('sdk.namespace', 'avatars')
|
||||
->label('sdk.method', 'getImage')
|
||||
->label('sdk.description', '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.')
|
||||
->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
|
||||
|
@ -197,9 +197,9 @@ $utopia->get('/v1/avatars/favicon')
|
|||
->label('scope', 'avatars.read')
|
||||
->label('sdk.namespace', 'avatars')
|
||||
->label('sdk.method', 'getFavicon')
|
||||
->label('sdk.description', 'Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.')
|
||||
->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;
|
||||
|
@ -349,7 +349,7 @@ $utopia->get('/v1/avatars/qr')
|
|||
->label('scope', 'avatars.read')
|
||||
->label('sdk.namespace', 'avatars')
|
||||
->label('sdk.method', 'getQR')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/avatars/get-qr.md')
|
||||
->action(
|
||||
function ($text, $size, $margin, $download) use ($response) {
|
||||
$renderer = new ImageRenderer(
|
||||
|
|
|
@ -26,7 +26,7 @@ $utopia->get('/v1/database')
|
|||
->label('scope', 'collections.read')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'listCollections')
|
||||
->label('sdk.description', '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).')
|
||||
->label('sdk.description', '/docs/references/database/list-collections.md')
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true)
|
||||
->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||
->param('offset', 0, function () { return new Range(0, 40000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true)
|
||||
|
@ -73,7 +73,7 @@ $utopia->get('/v1/database/:collectionId')
|
|||
->label('scope', 'collections.read')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'getCollection')
|
||||
->label('sdk.description', 'Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.')
|
||||
->label('sdk.description', '/docs/references/database/get-collection.md')
|
||||
->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.')
|
||||
->action(
|
||||
function ($collectionId) use ($response, $projectDB) {
|
||||
|
@ -93,7 +93,7 @@ $utopia->post('/v1/database')
|
|||
->label('scope', 'collections.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'createCollection')
|
||||
->label('sdk.description', 'Create a new Collection.')
|
||||
->label('sdk.description', '/docs/references/database/create-collection.md')
|
||||
->param('name', '', function () { return new Text(256); }, 'Collection name.')
|
||||
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
|
@ -160,7 +160,7 @@ $utopia->put('/v1/database/:collectionId')
|
|||
->label('scope', 'collections.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'updateCollection')
|
||||
->label('sdk.description', 'Update collection by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/database/update-collection.md')
|
||||
->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.')
|
||||
->param('name', null, function () { return new Text(256); }, 'Collection name.')
|
||||
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
|
@ -210,7 +210,7 @@ $utopia->delete('/v1/database/:collectionId')
|
|||
->label('scope', 'collections.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'deleteCollection')
|
||||
->label('sdk.description', 'Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.')
|
||||
->label('sdk.description', '/docs/references/database/delete-collection.md')
|
||||
->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.')
|
||||
->action(
|
||||
function ($collectionId) use ($response, $projectDB, $audit) {
|
||||
|
@ -239,7 +239,7 @@ $utopia->get('/v1/database/:collectionId/documents')
|
|||
->label('scope', 'documents.read')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'listDocuments')
|
||||
->label('sdk.description', '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).')
|
||||
->label('sdk.description', '/docs/references/database/list-documents.md')
|
||||
->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID.')
|
||||
->param('filters', [], function () { return new ArrayList(new Text(128)); }, 'Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: \'name=John Doe\' or \'category.$uid>=5bed2d152c362\'', true)
|
||||
->param('offset', 0, function () { return new Range(0, 900000000); }, 'Offset value. Use this value to manage pagination.', true)
|
||||
|
@ -305,7 +305,7 @@ $utopia->get('/v1/database/:collectionId/documents/:documentId')
|
|||
->label('scope', 'documents.read')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'getDocument')
|
||||
->label('sdk.description', 'Get document by its unique ID. This endpoint response returns a JSON object with the document data.')
|
||||
->label('sdk.description', '/docs/references/database/get-document.md')
|
||||
->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID')
|
||||
->param('documentId', null, function () { return new UID(); }, 'Document unique ID')
|
||||
->action(
|
||||
|
@ -350,7 +350,7 @@ $utopia->post('/v1/database/:collectionId/documents')
|
|||
->label('scope', 'documents.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'createDocument')
|
||||
->label('sdk.description', 'Create a new Document.')
|
||||
->label('sdk.description', '/docs/references/database/create-document.md')
|
||||
->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID.')
|
||||
->param('data', [], function () { return new \Utopia\Validator\Mock(); }, 'Document data as JSON string.')
|
||||
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
|
@ -456,6 +456,7 @@ $utopia->patch('/v1/database/:collectionId/documents/:documentId')
|
|||
->label('scope', 'documents.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'updateDocument')
|
||||
->label('sdk.description', '/docs/references/database/update-document.md')
|
||||
->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID')
|
||||
->param('documentId', null, function () { return new UID(); }, 'Document unique ID')
|
||||
->param('data', [], function () { return new \Utopia\Validator\Mock(); }, 'Document data as JSON string')
|
||||
|
@ -532,7 +533,7 @@ $utopia->delete('/v1/database/:collectionId/documents/:documentId')
|
|||
->label('scope', 'documents.write')
|
||||
->label('sdk.namespace', 'database')
|
||||
->label('sdk.method', 'deleteDocument')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/database/delete-document.md')
|
||||
->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID')
|
||||
->param('documentId', null, function () { return new UID(); }, 'Document unique ID')
|
||||
->action(
|
||||
|
|
|
@ -11,7 +11,7 @@ $utopia->get('/v1/locale')
|
|||
->label('scope', 'locale.read')
|
||||
->label('sdk.namespace', 'locale')
|
||||
->label('sdk.method', 'getLocale')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/locale/get-locale.md')
|
||||
->action(
|
||||
function () use ($response, $request, $utopia) {
|
||||
$eu = include __DIR__.'/../config/eu.php';
|
||||
|
@ -68,7 +68,7 @@ $utopia->get('/v1/locale/countries')
|
|||
->label('scope', 'locale.read')
|
||||
->label('sdk.namespace', 'locale')
|
||||
->label('sdk.method', 'getCountries')
|
||||
->label('sdk.description', 'List of all countries. You can use the locale header to get the data in supported language.')
|
||||
->label('sdk.description', '/docs/references/locale/get-countries.md')
|
||||
->action(
|
||||
function () use ($response, $request) {
|
||||
$list = Locale::getText('countries'); /* @var $list array */
|
||||
|
@ -84,7 +84,7 @@ $utopia->get('/v1/locale/countries/eu')
|
|||
->label('scope', 'locale.read')
|
||||
->label('sdk.namespace', 'locale')
|
||||
->label('sdk.method', 'getCountriesEU')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/locale/get-countries-eu.md')
|
||||
->action(
|
||||
function () use ($response) {
|
||||
$countries = Locale::getText('countries'); /* @var $countries array */
|
||||
|
@ -108,7 +108,7 @@ $utopia->get('/v1/locale/countries/phones')
|
|||
->label('scope', 'locale.read')
|
||||
->label('sdk.namespace', 'locale')
|
||||
->label('sdk.method', 'getCountriesPhones')
|
||||
->label('sdk.description', 'List of all countries phone codes. You can use the locale header to get the data in supported language.')
|
||||
->label('sdk.description', '/docs/references/locale/get-countries-phones.md')
|
||||
->action(
|
||||
function () use ($response) {
|
||||
$list = include __DIR__.'/../config/phones.php'; /* @var $list array */
|
||||
|
@ -132,7 +132,7 @@ $utopia->get('/v1/locale/currencies')
|
|||
->label('scope', 'locale.read')
|
||||
->label('sdk.namespace', 'locale')
|
||||
->label('sdk.method', 'getCurrencies')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/locale/get-currencies.md')
|
||||
->action(
|
||||
function () use ($response) {
|
||||
$currencies = include __DIR__.'/../config/currencies.php';
|
||||
|
|
|
@ -118,7 +118,7 @@ $utopia->get('/v1/storage/files')
|
|||
->label('scope', 'files.read')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'listFiles')
|
||||
->label('sdk.description', '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).')
|
||||
->label('sdk.description', '/docs/references/storage/list-files.md')
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true)
|
||||
->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||
->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true)
|
||||
|
@ -150,7 +150,7 @@ $utopia->get('/v1/storage/files/:fileId')
|
|||
->label('scope', 'files.read')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'getFile')
|
||||
->label('sdk.description', 'Get file by its unique ID. This endpoint response returns a JSON object with the file metadata.')
|
||||
->label('sdk.description', '/docs/references/storage/get-file.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||
->action(
|
||||
function ($fileId) use ($response, $projectDB) {
|
||||
|
@ -169,7 +169,7 @@ $utopia->get('/v1/storage/files/:fileId/preview')
|
|||
->label('scope', 'files.read')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'getFilePreview')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/storage/get-file-preview.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID')
|
||||
->param('width', 0, function () { return new Range(0, 4000); }, 'Resize preview image width, Pass an integer between 0 to 4000', true)
|
||||
->param('height', 0, function () { return new Range(0, 4000); }, 'Resize preview image height, Pass an integer between 0 to 4000', true)
|
||||
|
@ -281,7 +281,7 @@ $utopia->get('/v1/storage/files/:fileId/download')
|
|||
->label('scope', 'files.read')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'getFileDownload')
|
||||
->label('sdk.description', 'Get file content by its unique ID. The endpoint response return with a \'Content-Disposition: attachment\' header that tells the browser to start downloading the file to user downloads directory.')
|
||||
->label('sdk.description', '/docs/references/storage/get-file-download.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||
->action(
|
||||
function ($fileId) use ($response, $request, $projectDB) {
|
||||
|
@ -331,7 +331,7 @@ $utopia->get('/v1/storage/files/:fileId/view')
|
|||
->label('scope', 'files.read')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'getFileView')
|
||||
->label('sdk.description', 'Get file content by its unique ID. This endpoint is similar to the download method but returns with no \'Content-Disposition: attachment\' header.')
|
||||
->label('sdk.description', '/docs/references/storage/get-file-view.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||
->param('as', '', function () { return new WhiteList(['pdf', /*'html',*/ 'text']); }, 'Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.', true)
|
||||
->action(
|
||||
|
@ -398,7 +398,7 @@ $utopia->post('/v1/storage/files')
|
|||
->label('scope', 'files.write')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'createFile')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/storage/create-file.md')
|
||||
->label('sdk.consumes', 'multipart/form-data')
|
||||
->param('files', [], function () { return new File(); }, 'Binary Files.', false)
|
||||
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
|
@ -521,7 +521,7 @@ $utopia->put('/v1/storage/files/:fileId')
|
|||
->label('scope', 'files.write')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'updateFile')
|
||||
->label('sdk.description', 'Update file by its unique ID. Only users with write permissions have access to update this resource.')
|
||||
->label('sdk.description', '/docs/references/storage/update-file.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||
->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true)
|
||||
|
@ -555,7 +555,7 @@ $utopia->delete('/v1/storage/files/:fileId')
|
|||
->label('scope', 'files.write')
|
||||
->label('sdk.namespace', 'storage')
|
||||
->label('sdk.method', 'deleteFile')
|
||||
->label('sdk.description', 'Delete a file by its unique ID. Only users with write permissions have access to delete this resource.')
|
||||
->label('sdk.description', '/docs/references/storage/delete-file.md')
|
||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||
->action(
|
||||
function ($fileId) use ($response, $projectDB, $audit, $usage) {
|
||||
|
|
|
@ -23,7 +23,7 @@ $utopia->get('/v1/teams')
|
|||
->label('scope', 'teams.read')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'listTeams')
|
||||
->label('sdk.description', '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).')
|
||||
->label('sdk.description', '/docs/references/teams/list-teams.md')
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true)
|
||||
->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||
->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true)
|
||||
|
@ -51,7 +51,7 @@ $utopia->get('/v1/teams/:teamId')
|
|||
->label('scope', 'teams.read')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'getTeam')
|
||||
->label('sdk.description', 'Get team by its unique ID. All team members have read access for this resource.')
|
||||
->label('sdk.description', '/docs/references/teams/get-team.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->action(
|
||||
function ($teamId) use ($response, $projectDB) {
|
||||
|
@ -70,7 +70,7 @@ $utopia->get('/v1/teams/:teamId/members')
|
|||
->label('scope', 'teams.read')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'getTeamMembers')
|
||||
->label('sdk.description', 'Get team members by the team unique ID. All team members have read access for this list of resources.')
|
||||
->label('sdk.description', '/docs/references/teams/get-team-members.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->action(
|
||||
function ($teamId) use ($response, $projectDB) {
|
||||
|
@ -122,7 +122,7 @@ $utopia->post('/v1/teams')
|
|||
->label('scope', 'teams.write')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'createTeam')
|
||||
->label('sdk.description', '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.')
|
||||
->label('sdk.description', '/docs/references/teams/create-team.md')
|
||||
->param('name', null, function () { return new Text(100); }, 'Team name.')
|
||||
->param('roles', ['owner'], function () { return new ArrayList(new Text(128)); }, 'User roles array. Use this param to set the roles in the team for the user who created the team. The default role is **owner**, a role can be any string.', true)
|
||||
->action(
|
||||
|
@ -184,7 +184,7 @@ $utopia->put('/v1/teams/:teamId')
|
|||
->label('scope', 'teams.write')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'updateTeam')
|
||||
->label('sdk.description', 'Update team by its unique ID. Only team owners have write access for this resource.')
|
||||
->label('sdk.description', '/docs/references/teams/update-team.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('name', null, function () { return new Text(100); }, 'Team name.')
|
||||
->action(
|
||||
|
@ -212,7 +212,7 @@ $utopia->delete('/v1/teams/:teamId')
|
|||
->label('scope', 'teams.write')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'deleteTeam')
|
||||
->label('sdk.description', 'Delete team by its unique ID. Only team owners have write access for this resource.')
|
||||
->label('sdk.description', '/docs/references/teams/delete-team.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->action(
|
||||
function ($teamId) use ($response, $projectDB) {
|
||||
|
@ -252,7 +252,7 @@ $utopia->post('/v1/teams/:teamId/memberships')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'createTeamMembership')
|
||||
->label('sdk.description', "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't exists in the project it will be automatically created.\n\nUse the redirect parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the /teams/{teamId}/memberships/{inviteId}/status endpoint to finally join the user to the team.\n\nPlease 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.")
|
||||
->label('sdk.description', '/docs/references/teams/create-team-membership.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('email', '', function () { return new Email(); }, 'New team member email address.')
|
||||
->param('name', '', function () { return new Text(100); }, 'New team member name.', true)
|
||||
|
@ -395,7 +395,7 @@ $utopia->post('/v1/teams/:teamId/memberships/:inviteId/resend')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'createTeamMembershipResend')
|
||||
->label('sdk.description', 'Use this endpoint to resend your invitation email for a user to join a team.')
|
||||
->label('sdk.description', '/docs/references/teams/create-team-membership-resend.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID.')
|
||||
->param('redirect', '', function () use ($clients) { return new Host($clients); }, 'Reset page to redirect user back to your app from the invitation email.')
|
||||
|
@ -475,7 +475,7 @@ $utopia->patch('/v1/teams/:teamId/memberships/:inviteId/status')
|
|||
->label('scope', 'auth')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'updateTeamMembershipStatus')
|
||||
->label('sdk.description', "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's to redirect users back to your application after the request completes.\n\nPlease 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.\n\nWhen not using the success or failure redirect arguments this endpoint will result with a 200 status code on success and with 401 status error on failure. This behavior was applied to help the web clients deal with browsers who don't allow to set 3rd party HTTP cookies needed for saving the account session token.")
|
||||
->label('sdk.description', '/docs/references/teams/update-team-membership-status.md')
|
||||
->label('sdk.cookies', true)
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID')
|
||||
|
@ -607,7 +607,7 @@ $utopia->delete('/v1/teams/:teamId/memberships/:inviteId')
|
|||
->label('scope', 'account')
|
||||
->label('sdk.namespace', 'teams')
|
||||
->label('sdk.method', 'deleteTeamMembership')
|
||||
->label('sdk.description', 'This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member.')
|
||||
->label('sdk.description', '/docs/references/teams/delete-team-membership.md')
|
||||
->param('teamId', '', function () { return new UID(); }, 'Team unique ID.')
|
||||
->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID')
|
||||
->action(
|
||||
|
|
|
@ -22,7 +22,7 @@ $utopia->get('/v1/users')
|
|||
->label('scope', 'users.read')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'listUsers')
|
||||
->label('sdk.description', 'Get a list of all the project users. You can use the query params to filter your results.')
|
||||
->label('sdk.description', '/docs/references/users/list-users.md')
|
||||
->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true)
|
||||
->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||
->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true)
|
||||
|
@ -74,7 +74,7 @@ $utopia->get('/v1/users/:userId')
|
|||
->label('scope', 'users.read')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'getUser')
|
||||
->label('sdk.description', 'Get user by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/users/get-user.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->action(
|
||||
function ($userId) use ($response, $projectDB, $providers) {
|
||||
|
@ -113,7 +113,7 @@ $utopia->get('/v1/users/:userId/prefs')
|
|||
->label('scope', 'users.read')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'getUserPrefs')
|
||||
->label('sdk.description', 'Get user preferences by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/users/get-user-prefs.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->action(
|
||||
function ($userId) use ($response, $projectDB) {
|
||||
|
@ -144,7 +144,7 @@ $utopia->get('/v1/users/:userId/sessions')
|
|||
->label('scope', 'users.read')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'getUserSessions')
|
||||
->label('sdk.description', 'Get user sessions list by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/users/get-user-sessions.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->action(
|
||||
function ($userId) use ($response, $projectDB) {
|
||||
|
@ -206,7 +206,7 @@ $utopia->get('/v1/users/:userId/logs')
|
|||
->label('scope', 'users.read')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'getUserLogs')
|
||||
->label('sdk.description', 'Get user activity logs list by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/users/get-user-logs.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->action(
|
||||
function ($userId) use ($response, $register, $projectDB, $project) {
|
||||
|
@ -267,7 +267,7 @@ $utopia->post('/v1/users')
|
|||
->label('scope', 'users.write')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'createUser')
|
||||
->label('sdk.description', 'Create a new user.')
|
||||
->label('sdk.description', '/docs/references/users/create-user.md')
|
||||
->param('email', '', function () { return new Email(); }, 'User account email.')
|
||||
->param('password', '', function () { return new Password(); }, 'User account password.')
|
||||
->param('name', '', function () { return new Text(100); }, 'User account name.', true)
|
||||
|
@ -327,11 +327,11 @@ $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')
|
||||
->label('sdk.description', 'Update user status by its unique ID.')
|
||||
->label('sdk.description', '/docs/references/users/update-user-status.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->param('status', '', function () { return new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED]); }, 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to blocking the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED)
|
||||
->action(
|
||||
|
@ -356,13 +356,13 @@ $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')
|
||||
->label('sdk.description', '/docs/references/users/update-user-prefs.md')
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->param('prefs', '', function () { return new \Utopia\Validator\Mock(); }, 'Prefs key-value JSON object string.')
|
||||
->label('sdk.description', 'Update user preferences by its unique ID. You can pass only the specific settings you wish to update.')
|
||||
->action(
|
||||
function ($userId, $prefs) use ($response, $projectDB) {
|
||||
$user = $projectDB->getDocument($userId);
|
||||
|
@ -387,8 +387,8 @@ $utopia->delete('/v1/users/:userId/sessions/:session')
|
|||
->desc('Delete User Session')
|
||||
->label('scope', 'users.write')
|
||||
->label('sdk.namespace', 'users')
|
||||
->label('sdk.method', 'deleteUsersSession')
|
||||
->label('sdk.description', 'Delete user sessions by its unique ID.')
|
||||
->label('sdk.method', 'deleteUserSession')
|
||||
->label('sdk.description', '/docs/references/users/delete-user-session.md')
|
||||
->label('abuse-limit', 100)
|
||||
->param('userId', '', function () { return new UID(); }, 'User unique ID.')
|
||||
->param('sessionId', null, function () { return new UID(); }, 'User unique session ID.')
|
||||
|
@ -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(
|
||||
|
|
|
@ -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', 'bn', '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,7 +128,6 @@ $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');
|
||||
|
@ -143,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');
|
||||
|
@ -164,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);
|
||||
}
|
||||
|
|
|
@ -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).**
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
13
app/sdks/js/docs/examples/users/delete-user-session.md
Normal file
13
app/sdks/js/docs/examples/users/delete-user-session.md
Normal 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);
|
||||
});
|
13
app/sdks/js/docs/examples/users/update-user-prefs.md
Normal file
13
app/sdks/js/docs/examples/users/update-user-prefs.md
Normal 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);
|
||||
});
|
|
@ -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
346
app/sdks/js/src/sdk.min.js
vendored
346
app/sdks/js/src/sdk.min.js
vendored
|
@ -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=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/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=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/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:{})
|
|
@ -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.**
|
||||
|
||||
|
|
19
app/sdks/node/docs/examples/users/delete-user-session.md
Normal file
19
app/sdks/node/docs/examples/users/delete-user-session.md
Normal 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);
|
||||
});
|
19
app/sdks/node/docs/examples/users/update-user-prefs.md
Normal file
19
app/sdks/node/docs/examples/users/update-user-prefs.md
Normal 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);
|
||||
});
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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'},
|
||||
|
|
|
@ -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.
|
|
@ -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. **
|
||||
|
|
|
@ -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\'s back to your app when login is completed.
|
||||
|
||||
Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.
|
||||
|
||||
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'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'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.
|
||||
|
|
|
@ -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. **
|
||||
|
|
|
@ -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. **
|
||||
|
|
|
@ -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');
|
|
@ -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);
|
15
app/sdks/php/docs/examples/users/delete-user-session.md
Normal file
15
app/sdks/php/docs/examples/users/delete-user-session.md
Normal 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]');
|
15
app/sdks/php/docs/examples/users/update-user-prefs.md
Normal file
15
app/sdks/php/docs/examples/users/update-user-prefs.md
Normal 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]', '{}');
|
|
@ -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. **
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 'Content-Disposition: attachment' 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 'Content-Disposition: attachment' header. **
|
||||
|
|
|
@ -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'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's to redirect users back to your application after the request completes.
|
||||
|
|
|
@ -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. **
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
|
@ -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).**
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {}
|
||||
|
|
|
@ -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).**
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
28
composer.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
1
docs/examples/javascript/auth/login.md
Normal file
1
docs/examples/javascript/auth/login.md
Normal file
|
@ -0,0 +1 @@
|
|||
test
|
1
docs/examples/javascript/auth/oauth.md
Normal file
1
docs/examples/javascript/auth/oauth.md
Normal file
|
@ -0,0 +1 @@
|
|||
test 1
|
1
docs/examples/javascript/auth/register.md
Normal file
1
docs/examples/javascript/auth/register.md
Normal file
|
@ -0,0 +1 @@
|
|||
test 2
|
1
docs/references/account/delete.md
Normal file
1
docs/references/account/delete.md
Normal file
|
@ -0,0 +1 @@
|
|||
Delete currently logged in user account.
|
1
docs/references/account/get-prefs.md
Normal file
1
docs/references/account/get-prefs.md
Normal file
|
@ -0,0 +1 @@
|
|||
Get currently logged in user preferences key-value object.
|
1
docs/references/account/get-security.md
Normal file
1
docs/references/account/get-security.md
Normal file
|
@ -0,0 +1 @@
|
|||
Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.
|
1
docs/references/account/get-sessions.md
Normal file
1
docs/references/account/get-sessions.md
Normal file
|
@ -0,0 +1 @@
|
|||
Get currently logged in user list of active sessions across different devices.
|
1
docs/references/account/get.md
Normal file
1
docs/references/account/get.md
Normal file
|
@ -0,0 +1 @@
|
|||
Get currently logged in user data as JSON object.
|
1
docs/references/account/update-email.md
Normal file
1
docs/references/account/update-email.md
Normal file
|
@ -0,0 +1 @@
|
|||
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.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue