From 8297eec3dc39dd1649c841975403125f5812a40c Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Tue, 1 Oct 2019 18:34:49 -0700 Subject: [PATCH] Fix typos --- CHANGES.md | 4 +- README.md | 4 +- app/controllers/auth.php | 4 +- app/sdks/dart/README.md | 2 +- app/sdks/dart/lib/services/auth.dart | 24 +- app/sdks/js/README.md | 6 +- app/sdks/js/src/sdk.js | 600 ++++++++++---------- app/sdks/node/README.md | 4 +- app/sdks/node/lib/services/auth.js | 40 +- app/sdks/php/README.md | 4 +- app/sdks/php/docs/auth.md | 5 +- app/sdks/php/src/Appwrite/Services/Auth.php | 22 +- app/views/console/comps/footer.phtml | 2 +- docker/nginx.conf | 4 +- 14 files changed, 362 insertions(+), 363 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 135facb84..5ae0928e7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ * Added option to limit access to the Appwrite console * Added option to disable abuse check and rate limits * Added input field with the server API endpoint for easy access -* Added new OAuth providers for Google and Gitlab +* Added new OAuth providers for Google and GitLab * Added 15 new locales for locale service and email templates (cat, de, es, fi, fr, gr, hi, id, it, nl, pt-br, pt-pt, ro, tr, ua) * Improved test coverage for the project and synced DEV & CI environments settings @@ -20,4 +20,4 @@ * Changed auth service 'redirect' param to 'confirm' for better clarity * Updated all SDKs to sync with API changes -# Version 0.1.15 (NOT-RELEASED) \ No newline at end of file +# Version 0.1.15 (NOT-RELEASED) diff --git a/README.md b/README.md index f0138d971..90c1e0db0 100644 --- a/README.md +++ b/README.md @@ -105,11 +105,11 @@ Created by [Eldad Fux](https://twitter.com/eldadfux) with the amazing help of ou * ๐Ÿ‡ณ๐Ÿ‡ด Petter Charles Redfern ([GitHub](https://github.com/Chaaarles)) * ๐Ÿ‡ง๐Ÿ‡ท Jessรฉ Souza ([GitHub](https://github.com/jessescn)) * ๐Ÿ‡ช๐Ÿ‡ธ Esther รlvarez Feijoo ([GitHub](https://github.com/EstherAF)) -* ๐Ÿ‡ฎ๐Ÿ‡ณ Christy Jacob ([GitHub](https://github.com/christyjacob4), [Linkedin](https://www.linkedin.com/in/christyjacob4/)) +* ๐Ÿ‡ฎ๐Ÿ‡ณ Christy Jacob ([GitHub](https://github.com/christyjacob4), [LinkedIn](https://www.linkedin.com/in/christyjacob4/)) * ๐Ÿ‡บ๐Ÿ‡ฆ Dmitriy Danilov ([GitHub](https://github.com/daniloff200), [Twitter](https://twitter.com/daniloff200)) * ๐Ÿ‡ฎ๐Ÿ‡ฉ Zeet ([GitHub](https://github.com/Kiy4h)) * ๐Ÿ‡ซ๐Ÿ‡ฎ Pessi Pรคivรคrinne ([GitHub](https://github.com/pessip)) -* ๐Ÿ‡บ๐Ÿ‡ณ Sergi Vos ([GitHub](https://github.com/sergivb01), [Twitter](https://twitter.com/sergivb01), [Linkedin](https://www.linkedin.com/in/sergivb01/)) +* ๐Ÿ‡บ๐Ÿ‡ณ Sergi Vos ([GitHub](https://github.com/sergivb01), [Twitter](https://twitter.com/sergivb01), [LinkedIn](https://www.linkedin.com/in/sergivb01/)) * ๐Ÿ‡ฎ๐Ÿ‡ฑ Tomer Cohen ([GitHub](https://github.com/tomer), [Twitter](https://twitter.com/tomer)) * ๐Ÿ‡ฎ๐Ÿ‡น Tatiana ([GitHub](https://github.com/tacoelho)) * ๐Ÿ‡ฌ๐Ÿ‡ท Panagiotis Skarlas ([GitHub](https://github.com/1qk1), [Twitter](https://twitter.com/qktweets)) diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 5d07bef47..75d7da05f 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -24,7 +24,7 @@ $utopia->post('/v1/auth/register') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'register') - ->label('sdk.description', "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.\n\nIf registration completes successfully user will be sent with a confirmation email in order to confirm he is the owner of the account email address. Use the confirmation parameter to redirect the user from the confirmation email back to your app. When the user is redirected, use the /auth/confirm endpoint to complete the account confirmation.\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 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.") + ->label('sdk.description', "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.\n\nIf registration completes successfully user will be sent with a confirmation email in order to confirm he is the owner of the account email address. Use the confirmation parameter to redirect the user from the confirmation email back to your app. When the user is redirected, use the /auth/confirm endpoint to complete the account confirmation.\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 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.") ->label('sdk.cookies', true) ->label('abuse-limit', 10) ->param('email', '', function () { @@ -322,7 +322,7 @@ $utopia->post('/v1/auth/login') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'login') - ->label('sdk.description', "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. \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 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.") + ->label('sdk.description', "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. \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 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.") ->label('sdk.cookies', true) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') diff --git a/app/sdks/dart/README.md b/app/sdks/dart/README.md index 866ec3195..e7f5e5a81 100644 --- a/app/sdks/dart/README.md +++ b/app/sdks/dart/README.md @@ -30,4 +30,4 @@ pub get ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/dart/lib/services/auth.dart b/app/sdks/dart/lib/services/auth.dart index 45c0be71a..c1b1a18d5 100644 --- a/app/sdks/dart/lib/services/auth.dart +++ b/app/sdks/dart/lib/services/auth.dart @@ -3,19 +3,19 @@ import "package:appwrite/client.dart"; import 'package:dio/dio.dart'; class Auth extends Service { - + Auth(Client client): super(client); /// 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. - /// + /// 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 + /// + /// 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 @@ -84,7 +84,7 @@ class Auth extends Service { /// **userId** and **token** arguments will be passed as query parameters to /// the redirect URL you have provided when sending your request to the /// /auth/recovery endpoint. - /// + /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) /// the only valid redirect URL's are the once from domains you have set when @@ -104,19 +104,19 @@ class Auth extends Service { /// 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. - /// + /// /// If registration completes successfully user will be sent with a /// confirmation email in order to confirm he is the owner of the account email /// address. Use the confirmation parameter to redirect the user from the /// confirmation email back to your app. When the user is redirected, use the /// /auth/confirm endpoint to complete the account confirmation. - /// + /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. - /// - /// 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 @@ -152,7 +152,7 @@ class Auth extends Service { /// 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. - /// + /// /// 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 @@ -166,4 +166,4 @@ class Auth extends Service { return await this.client.call('post', path: path, params: params); } -} \ No newline at end of file +} diff --git a/app/sdks/js/README.md b/app/sdks/js/README.md index 03802a4e1..0a0a4bf1d 100644 --- a/app/sdks/js/README.md +++ b/app/sdks/js/README.md @@ -1,9 +1,9 @@ -# [Appwrite SDK for Javascript](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid) +# [Appwrite SDK for JavaScript](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid) ![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) ![Version](https://img.shields.io/badge/api%20version-0.1.15-blue.svg?v=1) -This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases. +This SDK is compatible with Appwrite server version 0.2.0 for older versions 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) @@ -23,4 +23,4 @@ npm install appwrite --save ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/js/src/sdk.js b/app/sdks/js/src/sdk.js index 5c6d2dd8b..8b5ca9f3e 100644 --- a/app/sdks/js/src/sdk.js +++ b/app/sdks/js/src/sdk.js @@ -133,7 +133,7 @@ let addGlobalHeader = function(key, value) { globalHeaders[key] = {key: key.toLowerCase(), value: value.toLowerCase()}; }; - + let addGlobalParam = function(key, value) { globalParams.push({key: key, value: value}); }; @@ -346,17 +346,17 @@ 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, + 'email': email, 'password': password }); }, @@ -373,7 +373,7 @@ if(name === undefined) { throw new Error('Missing required parameter: "name"'); } - + let path = '/account/name'; return http @@ -397,17 +397,17 @@ 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, + 'password': password, 'old-password': oldPassword }); }, @@ -441,7 +441,7 @@ if(prefs === undefined) { throw new Error('Missing required parameter: "prefs"'); } - + let path = '/account/prefs'; return http @@ -493,14 +493,14 @@ * * 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. - * + * 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 + * + * 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 @@ -516,25 +516,25 @@ 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, + 'email': email, + 'password': password, + 'success': success, 'failure': failure }); }, @@ -571,7 +571,7 @@ if(id === undefined) { throw new Error('Missing required parameter: "id"'); } - + let path = '/auth/logout/{id}'.replace(new RegExp('{id}', 'g'), id); return http @@ -593,13 +593,13 @@ 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, + 'success': success, 'failure': failure }); }, @@ -622,17 +622,17 @@ 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, + 'email': email, 'reset': reset }); }, @@ -644,7 +644,7 @@ * **userId** and **token** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the * /auth/recovery endpoint. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when @@ -660,27 +660,27 @@ 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, + 'userId': userId, + 'token': token, + 'password-a': passwordA, 'password-b': passwordB }); }, @@ -691,19 +691,19 @@ * 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. - * + * * If registration completes successfully user will be sent with a * confirmation email in order to confirm he is the owner of the account email * address. Use the confirmation parameter to redirect the user from the * confirmation email back to your app. When the user is redirected, use the * /auth/confirm endpoint to complete the account confirmation. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * - * 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 @@ -721,23 +721,23 @@ 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, + 'email': email, + 'password': password, + 'confirm': confirm, + 'success': success, + 'failure': failure, 'name': name }); }, @@ -758,17 +758,17 @@ 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, + 'userId': userId, 'token': token }); }, @@ -779,7 +779,7 @@ * 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. - * + * * 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 @@ -792,7 +792,7 @@ if(confirm === undefined) { throw new Error('Missing required parameter: "confirm"'); } - + let path = '/auth/register/confirm/resend'; return http @@ -823,14 +823,14 @@ 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, + 'width': width, + 'height': height, 'quality': quality }); }, @@ -853,14 +853,14 @@ 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, + 'width': width, + 'height': height, 'quality': quality }); }, @@ -878,7 +878,7 @@ if(url === undefined) { throw new Error('Missing required parameter: "url"'); } - + let path = '/avatars/favicon'; return http @@ -905,14 +905,14 @@ 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, + 'width': width, + 'height': height, 'quality': quality }); }, @@ -934,14 +934,14 @@ 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, + 'url': url, + 'width': width, 'height': height }); }, @@ -962,15 +962,15 @@ 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, + 'text': text, + 'size': size, + 'margin': margin, 'download': download }); } @@ -998,9 +998,9 @@ return http .get(path, {'content-type': 'application/json'}, { - 'search': search, - 'limit': limit, - 'offset': offset, + 'search': search, + 'limit': limit, + 'offset': offset, 'orderType': orderType }); }, @@ -1020,15 +1020,15 @@ 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, + 'name': name, + 'read': read, + 'write': write, 'rules': rules }); }, @@ -1046,7 +1046,7 @@ if(collectionId === undefined) { throw new Error('Missing required parameter: "collectionId"'); } - + let path = '/database/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); return http @@ -1071,19 +1071,19 @@ 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, + 'name': name, + 'read': read, + 'write': write, 'rules': rules }); }, @@ -1101,7 +1101,7 @@ if(collectionId === undefined) { throw new Error('Missing required parameter: "collectionId"'); } - + let path = '/database/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); return http @@ -1134,20 +1134,20 @@ 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, + 'filters': filters, + 'offset': offset, + 'limit': limit, + 'order-field': orderField, + 'order-type': orderType, + 'order-cast': orderCast, + 'search': search, + 'first': first, 'last': last }); }, @@ -1170,21 +1170,21 @@ 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, + 'data': data, + 'read': read, + 'write': write, + 'parentDocument': parentDocument, + 'parentProperty': parentProperty, 'parentPropertyType': parentPropertyType }); }, @@ -1203,11 +1203,11 @@ 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 @@ -1231,22 +1231,22 @@ 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, + 'data': data, + 'read': read, 'write': write }); }, @@ -1266,11 +1266,11 @@ 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 @@ -1410,26 +1410,26 @@ 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, + 'name': name, + 'teamId': teamId, + 'description': description, + 'logo': logo, + 'url': url, + 'legalName': legalName, + 'legalCountry': legalCountry, + 'legalState': legalState, + 'legalCity': legalCity, + 'legalAddress': legalAddress, 'legalTaxId': legalTaxId }); }, @@ -1445,7 +1445,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -1475,25 +1475,25 @@ 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, + 'name': name, + 'description': description, + 'logo': logo, + 'url': url, + 'legalName': legalName, + 'legalCountry': legalCountry, + 'legalState': legalState, + 'legalCity': legalCity, + 'legalAddress': legalAddress, 'legalTaxId': legalTaxId }); }, @@ -1509,7 +1509,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -1529,7 +1529,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -1551,21 +1551,21 @@ 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, + 'name': name, 'scopes': scopes }); }, @@ -1582,11 +1582,11 @@ 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 @@ -1609,25 +1609,25 @@ 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, + 'name': name, 'scopes': scopes }); }, @@ -1644,11 +1644,11 @@ 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 @@ -1671,18 +1671,18 @@ 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, + 'provider': provider, + 'appId': appId, 'secret': secret }); }, @@ -1698,7 +1698,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -1723,24 +1723,24 @@ 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, + 'type': type, + 'name': name, + 'key': key, + 'store': store, 'url': url }); }, @@ -1757,11 +1757,11 @@ 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 @@ -1786,23 +1786,23 @@ 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, + 'name': name, + 'key': key, + 'store': store, 'url': url }); }, @@ -1819,11 +1819,11 @@ 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 @@ -1843,7 +1843,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -1872,44 +1872,44 @@ 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, + 'name': name, + 'status': status, + 'schedule': schedule, + 'security': security, + 'httpMethod': httpMethod, + 'httpUrl': httpUrl, + 'httpHeaders': httpHeaders, + 'httpUser': httpUser, 'httpPass': httpPass }); }, @@ -1926,11 +1926,11 @@ 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 @@ -1960,48 +1960,48 @@ 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"'); } - + 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, + 'name': name, + 'status': status, + 'schedule': schedule, + 'security': security, + 'httpMethod': httpMethod, + 'httpUrl': httpUrl, + 'httpHeaders': httpHeaders, + 'httpUser': httpUser, 'httpPass': httpPass }); }, @@ -2018,11 +2018,11 @@ 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 @@ -2042,7 +2042,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}/usage'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -2062,7 +2062,7 @@ if(projectId === undefined) { throw new Error('Missing required parameter: "projectId"'); } - + let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); return http @@ -2088,33 +2088,33 @@ 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, + 'name': name, + 'events': events, + 'url': url, + 'security': security, + 'httpUser': httpUser, 'httpPass': httpPass }); }, @@ -2131,11 +2131,11 @@ 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 @@ -2162,37 +2162,37 @@ 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, + 'name': name, + 'events': events, + 'url': url, + 'security': security, + 'httpUser': httpUser, 'httpPass': httpPass }); }, @@ -2209,11 +2209,11 @@ 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 @@ -2244,9 +2244,9 @@ return http .get(path, {'content-type': 'application/json'}, { - 'search': search, - 'limit': limit, - 'offset': offset, + 'search': search, + 'limit': limit, + 'offset': offset, 'orderType': orderType }); }, @@ -2268,15 +2268,15 @@ 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, + 'files': files, + 'read': read, + 'write': write, 'folderId': folderId }); }, @@ -2294,7 +2294,7 @@ if(fileId === undefined) { throw new Error('Missing required parameter: "fileId"'); } - + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); return http @@ -2319,14 +2319,14 @@ 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, + 'read': read, + 'write': write, 'folderId': folderId }); }, @@ -2344,7 +2344,7 @@ if(fileId === undefined) { throw new Error('Missing required parameter: "fileId"'); } - + let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); return http @@ -2367,7 +2367,7 @@ if(fileId === undefined) { throw new Error('Missing required parameter: "fileId"'); } - + let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); return http @@ -2396,16 +2396,16 @@ 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, + 'width': width, + 'height': height, + 'quality': quality, + 'background': background, 'output': output }); }, @@ -2424,7 +2424,7 @@ if(fileId === undefined) { throw new Error('Missing required parameter: "fileId"'); } - + let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); return http @@ -2456,9 +2456,9 @@ return http .get(path, {'content-type': 'application/json'}, { - 'search': search, - 'limit': limit, - 'offset': offset, + 'search': search, + 'limit': limit, + 'offset': offset, 'orderType': orderType }); }, @@ -2479,13 +2479,13 @@ if(name === undefined) { throw new Error('Missing required parameter: "name"'); } - + let path = '/teams'; return http .post(path, {'content-type': 'application/json'}, { - 'name': name, + 'name': name, 'roles': roles }); }, @@ -2503,7 +2503,7 @@ if(teamId === undefined) { throw new Error('Missing required parameter: "teamId"'); } - + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); return http @@ -2526,11 +2526,11 @@ 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 @@ -2553,7 +2553,7 @@ if(teamId === undefined) { throw new Error('Missing required parameter: "teamId"'); } - + let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); return http @@ -2575,7 +2575,7 @@ if(teamId === undefined) { throw new Error('Missing required parameter: "teamId"'); } - + let path = '/teams/{teamId}/members'.replace(new RegExp('{teamId}', 'g'), teamId); return http @@ -2590,12 +2590,12 @@ * 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. - * + * * Use 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. - * + * * 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 @@ -2612,27 +2612,27 @@ 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, + 'email': email, + 'name': name, + 'roles': roles, 'redirect': redirect }); }, @@ -2651,11 +2651,11 @@ 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 @@ -2679,15 +2679,15 @@ 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 @@ -2704,12 +2704,12 @@ * 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. - * + * * 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 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 @@ -2728,25 +2728,25 @@ 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, + 'userId': userId, + 'secret': secret, + 'success': success, 'failure': failure }); } @@ -2772,9 +2772,9 @@ return http .get(path, {'content-type': 'application/json'}, { - 'search': search, - 'limit': limit, - 'offset': offset, + 'search': search, + 'limit': limit, + 'offset': offset, 'orderType': orderType }); }, @@ -2793,18 +2793,18 @@ 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, + 'email': email, + 'password': password, 'name': name }); }, @@ -2821,7 +2821,7 @@ if(userId === undefined) { throw new Error('Missing required parameter: "userId"'); } - + let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); return http @@ -2842,7 +2842,7 @@ if(userId === undefined) { throw new Error('Missing required parameter: "userId"'); } - + let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); return http @@ -2863,7 +2863,7 @@ if(userId === undefined) { throw new Error('Missing required parameter: "userId"'); } - + let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); return http @@ -2884,7 +2884,7 @@ if(userId === undefined) { throw new Error('Missing required parameter: "userId"'); } - + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); return http @@ -2905,7 +2905,7 @@ if(userId === undefined) { throw new Error('Missing required parameter: "userId"'); } - + let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); return http @@ -2927,11 +2927,11 @@ 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 @@ -2954,11 +2954,11 @@ 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 @@ -2987,4 +2987,4 @@ }; }; -})(window); \ No newline at end of file +})(window); diff --git a/app/sdks/node/README.md b/app/sdks/node/README.md index 74b4df7c5..ee747f480 100644 --- a/app/sdks/node/README.md +++ b/app/sdks/node/README.md @@ -3,7 +3,7 @@ ![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1) ![Version](https://img.shields.io/badge/api%20version-0.1.15-blue.svg?v=1) -This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases. +This SDK is compatible with Appwrite server version 0.2.0 for older versions 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) @@ -23,4 +23,4 @@ npm install node-appwrite --save ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/node/lib/services/auth.js b/app/sdks/node/lib/services/auth.js index f31d24b01..39cf72ad1 100644 --- a/app/sdks/node/lib/services/auth.js +++ b/app/sdks/node/lib/services/auth.js @@ -7,14 +7,14 @@ class Auth extends Service { * * 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. - * + * 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 + * + * 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 @@ -29,7 +29,7 @@ class Auth extends Service { */ async login(email, password, success, failure) { let path = '/auth/login'; - + return await this.client.call('post', path, {'content-type': 'application/json'}, { 'email': email, @@ -51,7 +51,7 @@ class Auth extends Service { */ async logout() { let path = '/auth/logout'; - + return await this.client.call('delete', path, {'content-type': 'application/json'}, { }); @@ -70,7 +70,7 @@ class Auth extends Service { */ async logoutBySession(id) { let path = '/auth/logout/{id}'.replace(new RegExp('{id}', 'g'), id); - + return await this.client.call('delete', path, {'content-type': 'application/json'}, { }); @@ -87,7 +87,7 @@ class Auth extends Service { */ async oauth(provider, success = '', failure = '') { let path = '/auth/oauth/{provider}'.replace(new RegExp('{provider}', 'g'), provider); - + return await this.client.call('get', path, {'content-type': 'application/json'}, { 'success': success, @@ -112,7 +112,7 @@ class Auth extends Service { */ async recovery(email, reset) { let path = '/auth/recovery'; - + return await this.client.call('post', path, {'content-type': 'application/json'}, { 'email': email, @@ -127,7 +127,7 @@ class Auth extends Service { * **userId** and **token** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the * /auth/recovery endpoint. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when @@ -142,7 +142,7 @@ class Auth extends Service { */ async recoveryReset(userId, token, passwordA, passwordB) { let path = '/auth/recovery/reset'; - + return await this.client.call('put', path, {'content-type': 'application/json'}, { 'userId': userId, @@ -158,19 +158,19 @@ class Auth extends Service { * 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. - * + * * If registration completes successfully user will be sent with a * confirmation email in order to confirm he is the owner of the account email * address. Use the confirmation parameter to redirect the user from the * confirmation email back to your app. When the user is redirected, use the * /auth/confirm endpoint to complete the account confirmation. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * - * 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 @@ -187,7 +187,7 @@ class Auth extends Service { */ async register(email, password, confirm, success = '', failure = '', name = '') { let path = '/auth/register'; - + return await this.client.call('post', path, {'content-type': 'application/json'}, { 'email': email, @@ -214,7 +214,7 @@ class Auth extends Service { */ async confirm(userId, token) { let path = '/auth/register/confirm'; - + return await this.client.call('post', path, {'content-type': 'application/json'}, { 'userId': userId, @@ -228,7 +228,7 @@ class Auth extends Service { * 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. - * + * * 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 @@ -240,7 +240,7 @@ class Auth extends Service { */ async confirmResend(confirm) { let path = '/auth/register/confirm/resend'; - + return await this.client.call('post', path, {'content-type': 'application/json'}, { 'confirm': confirm @@ -248,4 +248,4 @@ class Auth extends Service { } } -module.exports = Auth; \ No newline at end of file +module.exports = Auth; diff --git a/app/sdks/php/README.md b/app/sdks/php/README.md index 820edf0b7..0e095a413 100644 --- a/app/sdks/php/README.md +++ b/app/sdks/php/README.md @@ -3,7 +3,7 @@ ![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1) ![Version](https://img.shields.io/badge/api%20version-0.1.15-blue.svg?v=1) -This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases. +This SDK is compatible with Appwrite server version 0.2.0 for older versions 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) @@ -23,4 +23,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. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/php/docs/auth.md b/app/sdks/php/docs/auth.md index 32927befb..880823747 100644 --- a/app/sdks/php/docs/auth.md +++ b/app/sdks/php/docs/auth.md @@ -10,7 +10,7 @@ POST https://appwrite.test/v1/auth/login 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 @@ -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 @@ -146,4 +146,3 @@ Please notice that in order to avoid a [Redirect Attacks](https://github.com/OWA | Field Name | Type | Description | Default | | --- | --- | --- | --- | | confirm | string | Confirmation URL to redirect user to your app after confirm token has been sent to user email. | | - diff --git a/app/sdks/php/src/Appwrite/Services/Auth.php b/app/sdks/php/src/Appwrite/Services/Auth.php index dae305144..818a5e1db 100644 --- a/app/sdks/php/src/Appwrite/Services/Auth.php +++ b/app/sdks/php/src/Appwrite/Services/Auth.php @@ -13,14 +13,14 @@ class Auth extends Service * * 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. - * + * 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 + * + * 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 @@ -143,7 +143,7 @@ class Auth extends Service * **userId** and **token** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the * /auth/recovery endpoint. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when @@ -176,19 +176,19 @@ class Auth extends Service * 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. - * + * * If registration completes successfully user will be sent with a * confirmation email in order to confirm he is the owner of the account email * address. Use the confirmation parameter to redirect the user from the * confirmation email back to your app. When the user is redirected, use the * /auth/confirm endpoint to complete the account confirmation. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * - * 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 @@ -250,7 +250,7 @@ class Auth extends Service * 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. - * + * * 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 @@ -271,4 +271,4 @@ class Auth extends Service ], $params); } -} \ No newline at end of file +} diff --git a/app/views/console/comps/footer.phtml b/app/views/console/comps/footer.phtml index bde82eeb0..9e6d0383e 100644 --- a/app/views/console/comps/footer.phtml +++ b/app/views/console/comps/footer.phtml @@ -16,4 +16,4 @@ $home = $this->getParam('home', ''); v: - \ No newline at end of file + diff --git a/docker/nginx.conf b/docker/nginx.conf index d92e24fbb..db1dc8c20 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -88,7 +88,7 @@ http { add_header Cache-Control "public"; } - # CSS and Javascript + # CSS and JavaScript location ~* \.(?:css|js)$ { expires 1y; access_log off; @@ -145,4 +145,4 @@ http { deny all; } } -} \ No newline at end of file +}