From f532b12458d99ef896cda682d8a78ffc40efe86d Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sat, 19 Oct 2019 20:21:36 +0300 Subject: [PATCH] Updated SKDs --- app/sdks/dart/.packages | 2 +- app/sdks/js/src/sdk.js | 360 +++++++++++++----- app/sdks/js/src/sdk.min.js | 160 ++++---- app/sdks/node/lib/services/account.js | 54 ++- app/sdks/node/lib/services/auth.js | 54 ++- app/sdks/node/lib/services/avatars.js | 36 +- app/sdks/node/lib/services/database.js | 60 ++- app/sdks/node/lib/services/locale.js | 30 +- app/sdks/node/lib/services/projects.js | 162 +++++--- app/sdks/node/lib/services/storage.js | 48 ++- app/sdks/node/lib/services/teams.js | 60 ++- app/sdks/node/lib/services/users.js | 60 ++- app/sdks/php/src/Appwrite/Client.php | 2 +- .../php/src/Appwrite/Services/Account.php | 30 +- app/sdks/php/src/Appwrite/Services/Auth.php | 64 ++-- .../php/src/Appwrite/Services/Avatars.php | 52 +-- .../php/src/Appwrite/Services/Database.php | 102 ++--- app/sdks/php/src/Appwrite/Services/Locale.php | 10 +- .../php/src/Appwrite/Services/Projects.php | 262 ++++++------- .../php/src/Appwrite/Services/Storage.php | 63 ++- app/sdks/php/src/Appwrite/Services/Teams.php | 74 ++-- app/sdks/php/src/Appwrite/Services/Users.php | 56 +-- app/sdks/python/appwrite/services/account.py | 9 + app/sdks/python/appwrite/services/auth.py | 9 + app/sdks/python/appwrite/services/avatars.py | 6 + app/sdks/python/appwrite/services/database.py | 10 + app/sdks/python/appwrite/services/locale.py | 5 + app/sdks/python/appwrite/services/projects.py | 27 ++ app/sdks/python/appwrite/services/storage.py | 7 + app/sdks/python/appwrite/services/teams.py | 10 + app/sdks/python/appwrite/services/users.py | 10 + app/tasks/sdks.php | 2 +- composer.lock | 12 +- 33 files changed, 1184 insertions(+), 724 deletions(-) diff --git a/app/sdks/dart/.packages b/app/sdks/dart/.packages index d00e734676..6bb3915c4b 100644 --- a/app/sdks/dart/.packages +++ b/app/sdks/dart/.packages @@ -1,4 +1,4 @@ -# Generated by pub on 2019-10-19 03:03:25.181202. +# Generated by pub on 2019-10-19 20:17:36.182857. charcode:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ collection:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/ cookie_jar:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/cookie_jar-1.0.1/lib/ diff --git a/app/sdks/js/src/sdk.js b/app/sdks/js/src/sdk.js index ad4c7c283a..544f24a024 100644 --- a/app/sdks/js/src/sdk.js +++ b/app/sdks/js/src/sdk.js @@ -313,7 +313,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -330,7 +332,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -368,7 +372,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -394,7 +400,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -430,7 +438,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -447,7 +457,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -474,7 +486,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -492,7 +506,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -510,7 +526,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -591,7 +609,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -615,7 +635,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -695,7 +717,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -756,7 +780,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -873,7 +899,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -906,7 +934,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -949,7 +979,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -989,7 +1021,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1016,7 +1050,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1055,7 +1091,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1094,7 +1132,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1136,7 +1176,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -1179,7 +1221,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1232,7 +1276,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1255,7 +1301,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1301,7 +1349,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1324,7 +1374,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1394,7 +1446,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1450,7 +1504,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1478,7 +1534,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1523,7 +1581,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1552,7 +1612,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -1575,7 +1637,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1593,7 +1657,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1612,7 +1678,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1630,7 +1698,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1649,7 +1719,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -1668,7 +1740,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1747,7 +1821,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1768,7 +1844,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1843,7 +1921,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1864,7 +1944,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1885,7 +1967,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1924,7 +2008,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1950,7 +2036,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -1994,7 +2082,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2020,7 +2110,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2060,7 +2152,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2081,7 +2175,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2135,7 +2231,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2161,7 +2259,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2211,7 +2311,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2237,7 +2339,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2258,7 +2362,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2348,7 +2454,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2374,7 +2482,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2469,7 +2579,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2495,7 +2607,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2516,7 +2630,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2537,7 +2653,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2604,7 +2722,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2630,7 +2750,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2702,7 +2824,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2728,7 +2852,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -2770,7 +2896,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2813,7 +2941,9 @@ } return http - .post(path, {'content-type': 'multipart/form-data'}, payload); + .post(path, { + 'content-type': 'multipart/form-data', + }, payload); }, /** @@ -2836,7 +2966,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2874,7 +3006,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2897,7 +3031,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2921,7 +3057,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2971,7 +3109,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -2999,7 +3139,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); } }; @@ -3041,7 +3183,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3075,7 +3219,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3098,7 +3244,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3130,7 +3278,9 @@ } return http - .put(path, {'content-type': 'application/json'}, payload); + .put(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3153,7 +3303,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3176,7 +3328,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3242,7 +3396,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3270,7 +3426,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3307,7 +3465,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3418,7 +3578,9 @@ } return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3458,7 +3620,9 @@ } return http - .post(path, {'content-type': 'application/json'}, payload); + .post(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3480,7 +3644,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3502,7 +3668,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3524,7 +3692,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3556,7 +3726,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3578,7 +3750,9 @@ let payload = {}; return http - .get(path, {'content-type': 'application/json'}, payload); + .get(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3600,7 +3774,9 @@ let payload = {}; return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3631,7 +3807,9 @@ } return http - .delete(path, {'content-type': 'application/json'}, payload); + .delete(path, { + 'content-type': 'application/json', + }, payload); }, /** @@ -3662,7 +3840,9 @@ } return http - .patch(path, {'content-type': 'application/json'}, payload); + .patch(path, { + 'content-type': 'application/json', + }, payload); } }; diff --git a/app/sdks/js/src/sdk.min.js b/app/sdks/js/src/sdk.min.js index fc8e5d0843..75df47faa7 100644 --- a/app/sdks/js/src/sdk.min.js +++ b/app/sdks/js/src/sdk.min.js @@ -11,26 +11,26 @@ 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';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"')} +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';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"')} +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"')} +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';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"')} +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"')} +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"')} 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"')} +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"')} if(success===undefined){throw new Error('Missing required parameter: "success"')} if(failure===undefined){throw new Error('Missing required parameter: "failure"')} let path='/auth/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} @@ -39,7 +39,7 @@ payload.project=config.project;return iframe('get',path,payload)},recovery:funct if(reset===undefined){throw new Error('Missing required parameter: "reset"')} 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"')} +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"')} @@ -47,7 +47,7 @@ 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"')} +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';let payload={};if(email){payload.email=email} @@ -60,36 +60,36 @@ payload.project=config.project;return iframe('post',path,payload)},confirm:funct if(token===undefined){throw new Error('Missing required parameter: "token"')} let path='/auth/register/confirm';let payload={};if(userId){payload.userId=userId} if(token){payload.token=token} -return http.post(path,{'content-type':'application/json'},payload)},confirmResend:function(confirm){if(confirm===undefined){throw new Error('Missing required parameter: "confirm"')} +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"')} +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"')} +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"')} +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"')} +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"')} +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"')} +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} +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"')} +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"')} if(read===undefined){throw new Error('Missing required parameter: "read"')} if(write===undefined){throw new Error('Missing required parameter: "write"')} if(rules===undefined){throw new Error('Missing required parameter: "rules"')} @@ -97,15 +97,15 @@ 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"')} +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);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"')} +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} @@ -115,7 +115,7 @@ 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"')} +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);let payload={};if(data){payload.data=data} if(read){payload.read=read} @@ -123,17 +123,17 @@ 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"')} +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);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"')} +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);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"')} +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);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"')} +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';let payload={};if(name){payload.name=name} if(teamId){payload.teamId=teamId} @@ -146,8 +146,8 @@ 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"')} +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);let payload={};if(name){payload.name=name} if(description){payload.description=description} @@ -159,30 +159,30 @@ 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"')} +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);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"')} +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);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"')} +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);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"')} +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);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"')} +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);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"')} +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);let payload={};if(type){payload.type=type} @@ -190,19 +190,19 @@ 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"')} +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);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"')} +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);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"')} +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);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"')} +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"')} @@ -218,9 +218,9 @@ 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"')} +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);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"')} +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"')} @@ -237,11 +237,11 @@ 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"')} +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);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"')} +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"')} @@ -252,9 +252,9 @@ 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"')} +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);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"')} +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"')} @@ -266,46 +266,46 @@ 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"')} +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);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} +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"')} +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"')} +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"')} +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"')} +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} +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"')} +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"')} +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);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"')} +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"')} @@ -313,13 +313,13 @@ let path='/teams/{teamId}/memberships'.replace(new RegExp('{teamId}','g'),teamId 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"')} +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);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"')} +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);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"')} +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"')} @@ -331,23 +331,23 @@ payload.project=config.project;return iframe('patch',path,payload)}};let users={ 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"')} +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';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"')} +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"')} +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);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"')} +return http.delete(path,{'content-type':'application/json',},payload)},updateUserStatus:function(userId,status){if(userId===undefined){throw new Error('Missing required parameter: "userId"')} if(status===undefined){throw new Error('Missing required parameter: "status"')} let path='/users/{userId}/status'.replace(new RegExp('{userId}','g'),userId);let payload={};if(status){payload.status=status} -return http.patch(path,{'content-type':'application/json'},payload)}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users}};if(typeof module!=="undefined"){module.exports=window.Appwrite}})((typeof window!=="undefined")?window:{}) \ No newline at end of file +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:{}) \ No newline at end of file diff --git a/app/sdks/node/lib/services/account.js b/app/sdks/node/lib/services/account.js index 05eee7c34e..313e9ce78c 100644 --- a/app/sdks/node/lib/services/account.js +++ b/app/sdks/node/lib/services/account.js @@ -13,8 +13,10 @@ class Account extends Service { async get() { let path = '/account'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -29,8 +31,10 @@ class Account extends Service { async delete() { let path = '/account'; - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -50,8 +54,10 @@ class Account extends Service { async updateEmail(email, password) { let path = '/account/email'; - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'password': password }); @@ -69,8 +75,10 @@ class Account extends Service { async updateName(name) { let path = '/account/name'; - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'name': name }); } @@ -89,8 +97,10 @@ class Account extends Service { async updatePassword(password, oldPassword) { let path = '/account/password'; - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'password': password, 'old-password': oldPassword }); @@ -107,8 +117,10 @@ class Account extends Service { async getPrefs() { let path = '/account/prefs'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -125,8 +137,10 @@ class Account extends Service { async updatePrefs(prefs) { let path = '/account/prefs'; - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'prefs': prefs }); } @@ -143,8 +157,10 @@ class Account extends Service { async getSecurity() { let path = '/account/security'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -160,8 +176,10 @@ class Account extends Service { async getSessions() { let path = '/account/sessions'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } } diff --git a/app/sdks/node/lib/services/auth.js b/app/sdks/node/lib/services/auth.js index f277707bff..03c2cf1e26 100644 --- a/app/sdks/node/lib/services/auth.js +++ b/app/sdks/node/lib/services/auth.js @@ -30,8 +30,10 @@ 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'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'password': password, 'success': success, @@ -52,8 +54,10 @@ class Auth extends Service { async logout() { let path = '/auth/logout'; - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -71,8 +75,10 @@ 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'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -88,8 +94,10 @@ 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'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'success': success, 'failure': failure }); @@ -113,8 +121,10 @@ class Auth extends Service { async recovery(email, reset) { let path = '/auth/recovery'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'reset': reset }); @@ -143,8 +153,10 @@ 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'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'userId': userId, 'token': token, 'password-a': passwordA, @@ -188,8 +200,10 @@ 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'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'password': password, 'confirm': confirm, @@ -215,8 +229,10 @@ class Auth extends Service { async confirm(userId, token) { let path = '/auth/register/confirm'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'userId': userId, 'token': token }); @@ -241,8 +257,10 @@ class Auth extends Service { async confirmResend(confirm) { let path = '/auth/register/confirm/resend'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'confirm': confirm }); } diff --git a/app/sdks/node/lib/services/avatars.js b/app/sdks/node/lib/services/avatars.js index cf10cbbecd..ef2295c2ae 100644 --- a/app/sdks/node/lib/services/avatars.js +++ b/app/sdks/node/lib/services/avatars.js @@ -20,8 +20,10 @@ class Avatars extends Service { async getBrowser(code, width = 100, height = 100, quality = 100) { let path = '/avatars/browsers/{code}'.replace(new RegExp('{code}', 'g'), code); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'width': width, 'height': height, 'quality': quality @@ -46,8 +48,10 @@ class Avatars extends Service { async getCreditCard(code, width = 100, height = 100, quality = 100) { let path = '/avatars/credit-cards/{code}'.replace(new RegExp('{code}', 'g'), code); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'width': width, 'height': height, 'quality': quality @@ -67,8 +71,10 @@ class Avatars extends Service { async getFavicon(url) { let path = '/avatars/favicon'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'url': url }); } @@ -90,8 +96,10 @@ class Avatars extends Service { async getFlag(code, width = 100, height = 100, quality = 100) { let path = '/avatars/flags/{code}'.replace(new RegExp('{code}', 'g'), code); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'width': width, 'height': height, 'quality': quality @@ -115,8 +123,10 @@ class Avatars extends Service { async getImage(url, width = 400, height = 400) { let path = '/avatars/image'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'url': url, 'width': width, 'height': height @@ -139,8 +149,10 @@ class Avatars extends Service { async getQR(text, size = 400, margin = 1, download = 0) { let path = '/avatars/qr'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'text': text, 'size': size, 'margin': margin, diff --git a/app/sdks/node/lib/services/database.js b/app/sdks/node/lib/services/database.js index 5fc46dd57a..80a34ae662 100644 --- a/app/sdks/node/lib/services/database.js +++ b/app/sdks/node/lib/services/database.js @@ -20,8 +20,10 @@ class Database extends Service { async listCollections(search = '', limit = 25, offset = 0, orderType = 'ASC') { let path = '/database'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'search': search, 'limit': limit, 'offset': offset, @@ -44,8 +46,10 @@ class Database extends Service { async createCollection(name, read, write, rules) { let path = '/database'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'read': read, 'write': write, @@ -66,8 +70,10 @@ class Database extends Service { async getCollection(collectionId) { let path = '/database/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -87,8 +93,10 @@ class Database extends Service { async updateCollection(collectionId, name, read = [], write = [], rules = []) { let path = '/database/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'read': read, 'write': write, @@ -109,8 +117,10 @@ class Database extends Service { async deleteCollection(collectionId) { let path = '/database/{collectionId}'.replace(new RegExp('{collectionId}', 'g'), collectionId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -138,8 +148,10 @@ class Database extends Service { async listDocuments(collectionId, filters = [], offset = 0, limit = 50, orderField = '$uid', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) { let path = '/database/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'filters': filters, 'offset': offset, 'limit': limit, @@ -170,8 +182,10 @@ class Database extends Service { async createDocument(collectionId, data, read = [], write = [], parentDocument = '', parentProperty = '', parentPropertyType = 'assign') { let path = '/database/{collectionId}/documents'.replace(new RegExp('{collectionId}', 'g'), collectionId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'data': data, 'read': read, 'write': write, @@ -195,8 +209,10 @@ class Database extends Service { async getDocument(collectionId, documentId) { let path = '/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -214,8 +230,10 @@ class Database extends Service { async updateDocument(collectionId, documentId, data, read = [], write = []) { let path = '/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'data': data, 'read': read, 'write': write @@ -237,8 +255,10 @@ class Database extends Service { async deleteDocument(collectionId, documentId) { let path = '/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}', 'g'), collectionId).replace(new RegExp('{documentId}', 'g'), documentId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } } diff --git a/app/sdks/node/lib/services/locale.js b/app/sdks/node/lib/services/locale.js index 0a9ffad1a9..8702c3a6b1 100644 --- a/app/sdks/node/lib/services/locale.js +++ b/app/sdks/node/lib/services/locale.js @@ -16,8 +16,10 @@ class Locale extends Service { async getLocale() { let path = '/locale'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -33,8 +35,10 @@ class Locale extends Service { async getCountries() { let path = '/locale/countries'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -51,8 +55,10 @@ class Locale extends Service { async getCountriesEU() { let path = '/locale/countries/eu'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -68,8 +74,10 @@ class Locale extends Service { async getCountriesPhones() { let path = '/locale/countries/phones'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -86,8 +94,10 @@ class Locale extends Service { async getCurrencies() { let path = '/locale/currencies'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } } diff --git a/app/sdks/node/lib/services/projects.js b/app/sdks/node/lib/services/projects.js index 7995345636..58a03980a2 100644 --- a/app/sdks/node/lib/services/projects.js +++ b/app/sdks/node/lib/services/projects.js @@ -11,8 +11,10 @@ class Projects extends Service { async listProjects() { let path = '/projects'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -36,8 +38,10 @@ class Projects extends Service { async createProject(name, teamId, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { let path = '/projects'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'teamId': teamId, 'description': description, @@ -62,8 +66,10 @@ class Projects extends Service { async getProject(projectId) { let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -87,8 +93,10 @@ class Projects extends Service { async updateProject(projectId, name, description = '', logo = '', url = '', legalName = '', legalCountry = '', legalState = '', legalCity = '', legalAddress = '', legalTaxId = '') { let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'description': description, 'logo': logo, @@ -112,8 +120,10 @@ class Projects extends Service { async deleteProject(projectId) { let path = '/projects/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -127,8 +137,10 @@ class Projects extends Service { async listKeys(projectId) { let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -144,8 +156,10 @@ class Projects extends Service { async createKey(projectId, name, scopes) { let path = '/projects/{projectId}/keys'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'scopes': scopes }); @@ -162,8 +176,10 @@ class Projects extends Service { async getKey(projectId, keyId) { let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -180,8 +196,10 @@ class Projects extends Service { async updateKey(projectId, keyId, name, scopes) { let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'scopes': scopes }); @@ -198,8 +216,10 @@ class Projects extends Service { async deleteKey(projectId, keyId) { let path = '/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{keyId}', 'g'), keyId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -216,8 +236,10 @@ class Projects extends Service { async updateProjectOAuth(projectId, provider, appId = '', secret = '') { let path = '/projects/{projectId}/oauth'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'provider': provider, 'appId': appId, 'secret': secret @@ -234,8 +256,10 @@ class Projects extends Service { async listPlatforms(projectId) { let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -254,8 +278,10 @@ class Projects extends Service { async createPlatform(projectId, type, name, key = '', store = '', url = '') { let path = '/projects/{projectId}/platforms'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'type': type, 'name': name, 'key': key, @@ -275,8 +301,10 @@ class Projects extends Service { async getPlatform(projectId, platformId) { let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -295,8 +323,10 @@ class Projects extends Service { async updatePlatform(projectId, platformId, name, key = '', store = '', url = '') { let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'key': key, 'store': store, @@ -315,8 +345,10 @@ class Projects extends Service { async deletePlatform(projectId, platformId) { let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -330,8 +362,10 @@ class Projects extends Service { async listTasks(projectId) { let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -354,8 +388,10 @@ class Projects extends Service { async createTask(projectId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { let path = '/projects/{projectId}/tasks'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'status': status, 'schedule': schedule, @@ -379,8 +415,10 @@ class Projects extends Service { async getTask(projectId, taskId) { let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -404,8 +442,10 @@ class Projects extends Service { async updateTask(projectId, taskId, name, status, schedule, security, httpMethod, httpUrl, httpHeaders = [], httpUser = '', httpPass = '') { let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'status': status, 'schedule': schedule, @@ -429,8 +469,10 @@ class Projects extends Service { async deleteTask(projectId, taskId) { let path = '/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{taskId}', 'g'), taskId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -444,8 +486,10 @@ class Projects extends Service { async getProjectUsage(projectId) { let path = '/projects/{projectId}/usage'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -459,8 +503,10 @@ class Projects extends Service { async listWebhooks(projectId) { let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -480,8 +526,10 @@ class Projects extends Service { async createWebhook(projectId, name, events, url, security, httpUser = '', httpPass = '') { let path = '/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}', 'g'), projectId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'events': events, 'url': url, @@ -502,8 +550,10 @@ class Projects extends Service { async getWebhook(projectId, webhookId) { let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -524,8 +574,10 @@ class Projects extends Service { async updateWebhook(projectId, webhookId, name, events, url, security, httpUser = '', httpPass = '') { let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'events': events, 'url': url, @@ -546,8 +598,10 @@ class Projects extends Service { async deleteWebhook(projectId, webhookId) { let path = '/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{webhookId}', 'g'), webhookId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } } diff --git a/app/sdks/node/lib/services/storage.js b/app/sdks/node/lib/services/storage.js index 7498022ddf..40e51ce9c6 100644 --- a/app/sdks/node/lib/services/storage.js +++ b/app/sdks/node/lib/services/storage.js @@ -19,8 +19,10 @@ class Storage extends Service { async listFiles(search = '', limit = 25, offset = 0, orderType = 'ASC') { let path = '/storage/files'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'search': search, 'limit': limit, 'offset': offset, @@ -45,8 +47,10 @@ class Storage extends Service { async createFile(files, read = [], write = [], folderId = '') { let path = '/storage/files'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'multipart/form-data', + }, + { 'files': files, 'read': read, 'write': write, @@ -67,8 +71,10 @@ class Storage extends Service { async getFile(fileId) { let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -88,8 +94,10 @@ class Storage extends Service { async updateFile(fileId, read = [], write = [], folderId = '') { let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'read': read, 'write': write, 'folderId': folderId @@ -109,8 +117,10 @@ class Storage extends Service { async deleteFile(fileId) { let path = '/storage/files/{fileId}'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -128,8 +138,10 @@ class Storage extends Service { async getFileDownload(fileId) { let path = '/storage/files/{fileId}/download'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -153,8 +165,10 @@ class Storage extends Service { async getFilePreview(fileId, width = 0, height = 0, quality = 100, background = '', output = '') { let path = '/storage/files/{fileId}/preview'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'width': width, 'height': height, 'quality': quality, @@ -177,8 +191,10 @@ class Storage extends Service { async getFileView(fileId, as = '') { let path = '/storage/files/{fileId}/view'.replace(new RegExp('{fileId}', 'g'), fileId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'as': as }); } diff --git a/app/sdks/node/lib/services/teams.js b/app/sdks/node/lib/services/teams.js index a1bc682322..181a060d7c 100644 --- a/app/sdks/node/lib/services/teams.js +++ b/app/sdks/node/lib/services/teams.js @@ -19,8 +19,10 @@ class Teams extends Service { async listTeams(search = '', limit = 25, offset = 0, orderType = 'ASC') { let path = '/teams'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'search': search, 'limit': limit, 'offset': offset, @@ -44,8 +46,10 @@ class Teams extends Service { async createTeam(name, roles = ["owner"]) { let path = '/teams'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'name': name, 'roles': roles }); @@ -64,8 +68,10 @@ class Teams extends Service { async getTeam(teamId) { let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -83,8 +89,10 @@ class Teams extends Service { async updateTeam(teamId, name) { let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - return await this.client.call('put', path, {'content-type': 'application/json'}, - { + return await this.client.call('put', path, { + 'content-type': 'application/json', + }, + { 'name': name }); } @@ -102,8 +110,10 @@ class Teams extends Service { async deleteTeam(teamId) { let path = '/teams/{teamId}'.replace(new RegExp('{teamId}', 'g'), teamId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -120,8 +130,10 @@ class Teams extends Service { async getTeamMembers(teamId) { let path = '/teams/{teamId}/members'.replace(new RegExp('{teamId}', 'g'), teamId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -153,8 +165,10 @@ class Teams extends Service { async createTeamMembership(teamId, email, roles, redirect, name = '') { let path = '/teams/{teamId}/memberships'.replace(new RegExp('{teamId}', 'g'), teamId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'name': name, 'roles': roles, @@ -176,8 +190,10 @@ class Teams extends Service { async deleteTeamMembership(teamId, inviteId) { let path = '/teams/{teamId}/memberships/{inviteId}'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -196,8 +212,10 @@ class Teams extends Service { async createTeamMembershipResend(teamId, inviteId, redirect) { let path = '/teams/{teamId}/memberships/{inviteId}/resend'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'redirect': redirect }); } @@ -233,8 +251,10 @@ class Teams extends Service { async updateTeamMembershipStatus(teamId, inviteId, userId, secret, success = '', failure = '') { let path = '/teams/{teamId}/memberships/{inviteId}/status'.replace(new RegExp('{teamId}', 'g'), teamId).replace(new RegExp('{inviteId}', 'g'), inviteId); - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'userId': userId, 'secret': secret, 'success': success, diff --git a/app/sdks/node/lib/services/users.js b/app/sdks/node/lib/services/users.js index 08567374b0..85da0ae9b8 100644 --- a/app/sdks/node/lib/services/users.js +++ b/app/sdks/node/lib/services/users.js @@ -18,8 +18,10 @@ class Users extends Service { async listUsers(search = '', limit = 25, offset = 0, orderType = 'ASC') { let path = '/users'; - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { 'search': search, 'limit': limit, 'offset': offset, @@ -41,8 +43,10 @@ class Users extends Service { async createUser(email, password, name = '') { let path = '/users'; - return await this.client.call('post', path, {'content-type': 'application/json'}, - { + return await this.client.call('post', path, { + 'content-type': 'application/json', + }, + { 'email': email, 'password': password, 'name': name @@ -61,8 +65,10 @@ class Users extends Service { async getUser(userId) { let path = '/users/{userId}'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -78,8 +84,10 @@ class Users extends Service { async getUserLogs(userId) { let path = '/users/{userId}/logs'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -95,8 +103,10 @@ class Users extends Service { async getUserPrefs(userId) { let path = '/users/{userId}/prefs'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -114,8 +124,10 @@ class Users extends Service { 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'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'prefs': prefs }); } @@ -132,8 +144,10 @@ class Users extends Service { async getUserSessions(userId) { let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('get', path, {'content-type': 'application/json'}, - { + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { }); } @@ -149,8 +163,10 @@ class Users extends Service { async deleteUserSessions(userId) { let path = '/users/{userId}/sessions'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('delete', path, {'content-type': 'application/json'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { }); } @@ -167,8 +183,10 @@ class Users extends Service { 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'}, - { + return await this.client.call('delete', path, { + 'content-type': 'application/json', + }, + { 'sessionId': sessionId }); } @@ -186,8 +204,10 @@ class Users extends Service { async updateUserStatus(userId, status) { let path = '/users/{userId}/status'.replace(new RegExp('{userId}', 'g'), userId); - return await this.client.call('patch', path, {'content-type': 'application/json'}, - { + return await this.client.call('patch', path, { + 'content-type': 'application/json', + }, + { 'status': status }); } diff --git a/app/sdks/php/src/Appwrite/Client.php b/app/sdks/php/src/Appwrite/Client.php index 1f62277e8b..da9f3dbe64 100644 --- a/app/sdks/php/src/Appwrite/Client.php +++ b/app/sdks/php/src/Appwrite/Client.php @@ -37,7 +37,7 @@ class Client */ protected $headers = [ 'content-type' => '', - 'x-sdk-version' => 'appwrite:php:1.0.11', + 'x-sdk-version' => 'appwrite:php:1.0.12', ]; /** diff --git a/app/sdks/php/src/Appwrite/Services/Account.php b/app/sdks/php/src/Appwrite/Services/Account.php index 25b4815d0b..a6256e2ab4 100644 --- a/app/sdks/php/src/Appwrite/Services/Account.php +++ b/app/sdks/php/src/Appwrite/Services/Account.php @@ -16,7 +16,7 @@ class Account extends Service * @throws Exception * @return array */ - public function get() + public function get():array { $path = str_replace([], [], '/account'); $params = []; @@ -35,7 +35,7 @@ class Account extends Service * @throws Exception * @return array */ - public function delete() + public function delete():array { $path = str_replace([], [], '/account'); $params = []; @@ -54,12 +54,12 @@ class Account extends Service * mail is sent. For security measures, user password is required to complete * this request. * - * @param string $email - * @param string $password + * @param string $email + * @param string $password * @throws Exception * @return array */ - public function updateEmail($email, $password) + public function updateEmail(string $email, string $password):array { $path = str_replace([], [], '/account/email'); $params = []; @@ -77,11 +77,11 @@ class Account extends Service * * Update currently logged in user account name. * - * @param string $name + * @param string $name * @throws Exception * @return array */ - public function updateName($name) + public function updateName(string $name):array { $path = str_replace([], [], '/account/name'); $params = []; @@ -99,12 +99,12 @@ class Account extends Service * Update currently logged in user password. For validation, user is required * to pass the password twice. * - * @param string $password - * @param string $oldPassword + * @param string $password + * @param string $oldPassword * @throws Exception * @return array */ - public function updatePassword($password, $oldPassword) + public function updatePassword(string $password, string $oldPassword):array { $path = str_replace([], [], '/account/password'); $params = []; @@ -125,7 +125,7 @@ class Account extends Service * @throws Exception * @return array */ - public function getPrefs() + public function getPrefs():array { $path = str_replace([], [], '/account/prefs'); $params = []; @@ -142,11 +142,11 @@ class Account extends Service * Update currently logged in user account preferences. You can pass only the * specific settings you wish to update. * - * @param string $prefs + * @param string $prefs * @throws Exception * @return array */ - public function updatePrefs($prefs) + public function updatePrefs(string $prefs):array { $path = str_replace([], [], '/account/prefs'); $params = []; @@ -167,7 +167,7 @@ class Account extends Service * @throws Exception * @return array */ - public function getSecurity() + public function getSecurity():array { $path = str_replace([], [], '/account/security'); $params = []; @@ -187,7 +187,7 @@ class Account extends Service * @throws Exception * @return array */ - public function getSessions() + public function getSessions():array { $path = str_replace([], [], '/account/sessions'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Auth.php b/app/sdks/php/src/Appwrite/Services/Auth.php index d4aaa8d742..ed3f7d2e1a 100644 --- a/app/sdks/php/src/Appwrite/Services/Auth.php +++ b/app/sdks/php/src/Appwrite/Services/Auth.php @@ -26,14 +26,14 @@ class Auth extends Service * behavior is enforced because modern browsers are limiting 3rd party cookies * in XHR of fetch requests to protect user privacy. * - * @param string $email - * @param string $password - * @param string $success - * @param string $failure + * @param string $email + * @param string $password + * @param string $success + * @param string $failure * @throws Exception * @return array */ - public function login($email, $password, $success = '', $failure = '') + public function login(string $email, string $password, string $success = '', string $failure = ''):array { $path = str_replace([], [], '/auth/login'); $params = []; @@ -58,7 +58,7 @@ class Auth extends Service * @throws Exception * @return array */ - public function logout() + public function logout():array { $path = str_replace([], [], '/auth/logout'); $params = []; @@ -76,11 +76,11 @@ class Auth extends Service * account sessions across all his different devices. When using the option id * argument, only the session unique ID provider will be deleted. * - * @param string $id + * @param string $id * @throws Exception * @return array */ - public function logoutBySession($id) + public function logoutBySession(string $id):array { $path = str_replace(['{id}'], [$id], '/auth/logout/{id}'); $params = []; @@ -94,13 +94,13 @@ class Auth extends Service /** * OAuth Login * - * @param string $provider - * @param string $success - * @param string $failure + * @param string $provider + * @param string $success + * @param string $failure * @throws Exception * @return array */ - public function oauth($provider, $success, $failure) + public function oauth(string $provider, string $success, string $failure):array { $path = str_replace(['{provider}'], [$provider], '/auth/oauth/{provider}'); $params = []; @@ -123,12 +123,12 @@ class Auth extends Service * submit a request to the /auth/password/reset endpoint to complete the * process. * - * @param string $email - * @param string $reset + * @param string $email + * @param string $reset * @throws Exception * @return array */ - public function recovery($email, $reset) + public function recovery(string $email, string $reset):array { $path = str_replace([], [], '/auth/recovery'); $params = []; @@ -154,14 +154,14 @@ class Auth extends Service * the only valid redirect URLs are the ones from domains you have set when * adding your platforms in the console interface. * - * @param string $userId - * @param string $token - * @param string $passwordA - * @param string $passwordB + * @param string $userId + * @param string $token + * @param string $passwordA + * @param string $passwordB * @throws Exception * @return array */ - public function recoveryReset($userId, $token, $passwordA, $passwordB) + public function recoveryReset(string $userId, string $token, string $passwordA, string $passwordB):array { $path = str_replace([], [], '/auth/recovery/reset'); $params = []; @@ -200,16 +200,16 @@ class Auth extends Service * behavior is enforced because modern browsers are limiting 3rd party cookies * in XHR of fetch requests to protect user privacy. * - * @param string $email - * @param string $password - * @param string $confirm - * @param string $success - * @param string $failure - * @param string $name + * @param string $email + * @param string $password + * @param string $confirm + * @param string $success + * @param string $failure + * @param string $name * @throws Exception * @return array */ - public function register($email, $password, $confirm, $success = '', $failure = '', $name = '') + public function register(string $email, string $password, string $confirm, string $success = '', string $failure = '', string $name = ''):array { $path = str_replace([], [], '/auth/register'); $params = []; @@ -234,12 +234,12 @@ class Auth extends Service * query parameters to the redirect URL you have provided when sending your * request to the /auth/register endpoint. * - * @param string $userId - * @param string $token + * @param string $userId + * @param string $token * @throws Exception * @return array */ - public function confirm($userId, $token) + public function confirm(string $userId, string $token):array { $path = str_replace([], [], '/auth/register/confirm'); $params = []; @@ -264,11 +264,11 @@ class Auth extends Service * the only valid redirect URLs are the ones from domains you have set when * adding your platforms in the console interface. * - * @param string $confirm + * @param string $confirm * @throws Exception * @return array */ - public function confirmResend($confirm) + public function confirmResend(string $confirm):array { $path = str_replace([], [], '/auth/register/confirm/resend'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Avatars.php b/app/sdks/php/src/Appwrite/Services/Avatars.php index 5a420b143a..9eeccb56e1 100644 --- a/app/sdks/php/src/Appwrite/Services/Avatars.php +++ b/app/sdks/php/src/Appwrite/Services/Avatars.php @@ -16,14 +16,14 @@ class Avatars extends Service * /account/sessions endpoint. Use width, height and quality arguments to * change the output settings. * - * @param string $code - * @param integer $width - * @param integer $height - * @param integer $quality + * @param string $code + * @param int $width + * @param int $height + * @param int $quality * @throws Exception * @return array */ - public function getBrowser($code, $width = 100, $height = 100, $quality = 100) + public function getBrowser(string $code, int $width = 100, int $height = 100, int $quality = 100):array { $path = str_replace(['{code}'], [$code], '/avatars/browsers/{code}'); $params = []; @@ -45,14 +45,14 @@ class Avatars extends Service * card provider you need. Use width, height and quality arguments to change * the output settings. * - * @param string $code - * @param integer $width - * @param integer $height - * @param integer $quality + * @param string $code + * @param int $width + * @param int $height + * @param int $quality * @throws Exception * @return array */ - public function getCreditCard($code, $width = 100, $height = 100, $quality = 100) + public function getCreditCard(string $code, int $width = 100, int $height = 100, int $quality = 100):array { $path = str_replace(['{code}'], [$code], '/avatars/credit-cards/{code}'); $params = []; @@ -72,11 +72,11 @@ class Avatars extends Service * Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote * website URL. * - * @param string $url + * @param string $url * @throws Exception * @return array */ - public function getFavicon($url) + public function getFavicon(string $url):array { $path = str_replace([], [], '/avatars/favicon'); $params = []; @@ -95,14 +95,14 @@ class Avatars extends Service * users. The code argument receives the 2 letter country code. Use width, * height and quality arguments to change the output settings. * - * @param string $code - * @param integer $width - * @param integer $height - * @param integer $quality + * @param string $code + * @param int $width + * @param int $height + * @param int $quality * @throws Exception * @return array */ - public function getFlag($code, $width = 100, $height = 100, $quality = 100) + public function getFlag(string $code, int $width = 100, int $height = 100, int $quality = 100):array { $path = str_replace(['{code}'], [$code], '/avatars/flags/{code}'); $params = []; @@ -124,13 +124,13 @@ class Avatars extends Service * remote images in your app or in case you want to make sure a 3rd party * image is properly served using a TLS protocol. * - * @param string $url - * @param integer $width - * @param integer $height + * @param string $url + * @param int $width + * @param int $height * @throws Exception * @return array */ - public function getImage($url, $width = 400, $height = 400) + public function getImage(string $url, int $width = 400, int $height = 400):array { $path = str_replace([], [], '/avatars/image'); $params = []; @@ -150,14 +150,14 @@ class Avatars extends Service * 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. * - * @param string $text - * @param integer $size - * @param integer $margin - * @param integer $download + * @param string $text + * @param int $size + * @param int $margin + * @param int $download * @throws Exception * @return array */ - public function getQR($text, $size = 400, $margin = 1, $download = 0) + public function getQR(string $text, int $size = 400, int $margin = 1, int $download = 0):array { $path = str_replace([], [], '/avatars/qr'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Database.php b/app/sdks/php/src/Appwrite/Services/Database.php index d30f667e90..899f193607 100644 --- a/app/sdks/php/src/Appwrite/Services/Database.php +++ b/app/sdks/php/src/Appwrite/Services/Database.php @@ -16,14 +16,14 @@ class Database extends Service * of the project collections. [Learn more about different API * modes](/docs/modes). * - * @param string $search - * @param integer $limit - * @param integer $offset - * @param string $orderType + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType * @throws Exception * @return array */ - public function listCollections($search = '', $limit = 25, $offset = 0, $orderType = 'ASC') + public function listCollections(string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array { $path = str_replace([], [], '/database'); $params = []; @@ -43,14 +43,14 @@ class Database extends Service * * Create a new Collection. * - * @param string $name - * @param array $read - * @param array $write - * @param array $rules + * @param string $name + * @param array $read + * @param array $write + * @param array $rules * @throws Exception * @return array */ - public function createCollection($name, $read, $write, $rules) + public function createCollection(string $name, array $read, array $write, array $rules):array { $path = str_replace([], [], '/database'); $params = []; @@ -71,11 +71,11 @@ class Database extends Service * Get collection by its unique ID. This endpoint response returns a JSON * object with the collection metadata. * - * @param string $collectionId + * @param string $collectionId * @throws Exception * @return array */ - public function getCollection($collectionId) + public function getCollection(string $collectionId):array { $path = str_replace(['{collectionId}'], [$collectionId], '/database/{collectionId}'); $params = []; @@ -91,15 +91,15 @@ class Database extends Service * * Update collection by its unique ID. * - * @param string $collectionId - * @param string $name - * @param array $read - * @param array $write - * @param array $rules + * @param string $collectionId + * @param string $name + * @param array $read + * @param array $write + * @param array $rules * @throws Exception * @return array */ - public function updateCollection($collectionId, $name, $read = [], $write = [], $rules = []) + public function updateCollection(string $collectionId, string $name, array $read = [], array $write = [], array $rules = []):array { $path = str_replace(['{collectionId}'], [$collectionId], '/database/{collectionId}'); $params = []; @@ -120,11 +120,11 @@ class Database extends Service * Delete a collection by its unique ID. Only users with write permissions * have access to delete this resource. * - * @param string $collectionId + * @param string $collectionId * @throws Exception * @return array */ - public function deleteCollection($collectionId) + public function deleteCollection(string $collectionId):array { $path = str_replace(['{collectionId}'], [$collectionId], '/database/{collectionId}'); $params = []; @@ -143,20 +143,20 @@ class Database extends Service * of the project documents. [Learn more about different API * modes](/docs/modes). * - * @param string $collectionId - * @param array $filters - * @param integer $offset - * @param integer $limit - * @param string $orderField - * @param string $orderType - * @param string $orderCast - * @param string $search - * @param integer $first - * @param integer $last + * @param string $collectionId + * @param array $filters + * @param int $offset + * @param int $limit + * @param string $orderField + * @param string $orderType + * @param string $orderCast + * @param string $search + * @param int $first + * @param int $last * @throws Exception * @return array */ - public function listDocuments($collectionId, $filters = [], $offset = 0, $limit = 50, $orderField = '$uid', $orderType = 'ASC', $orderCast = 'string', $search = '', $first = 0, $last = 0) + public function listDocuments(string $collectionId, array $filters = [], int $offset = 0, int $limit = 50, string $orderField = '$uid', string $orderType = 'ASC', string $orderCast = 'string', string $search = '', int $first = 0, int $last = 0):array { $path = str_replace(['{collectionId}'], [$collectionId], '/database/{collectionId}/documents'); $params = []; @@ -181,17 +181,17 @@ class Database extends Service * * Create a new Document. * - * @param string $collectionId - * @param string $data - * @param array $read - * @param array $write - * @param string $parentDocument - * @param string $parentProperty - * @param string $parentPropertyType + * @param string $collectionId + * @param string $data + * @param array $read + * @param array $write + * @param string $parentDocument + * @param string $parentProperty + * @param string $parentPropertyType * @throws Exception * @return array */ - public function createDocument($collectionId, $data, $read = [], $write = [], $parentDocument = '', $parentProperty = '', $parentPropertyType = 'assign') + public function createDocument(string $collectionId, string $data, array $read = [], array $write = [], string $parentDocument = '', string $parentProperty = '', string $parentPropertyType = 'assign'):array { $path = str_replace(['{collectionId}'], [$collectionId], '/database/{collectionId}/documents'); $params = []; @@ -214,12 +214,12 @@ class Database extends Service * Get document by its unique ID. This endpoint response returns a JSON object * with the document data. * - * @param string $collectionId - * @param string $documentId + * @param string $collectionId + * @param string $documentId * @throws Exception * @return array */ - public function getDocument($collectionId, $documentId) + public function getDocument(string $collectionId, string $documentId):array { $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/{collectionId}/documents/{documentId}'); $params = []; @@ -233,15 +233,15 @@ class Database extends Service /** * Update Document * - * @param string $collectionId - * @param string $documentId - * @param string $data - * @param array $read - * @param array $write + * @param string $collectionId + * @param string $documentId + * @param string $data + * @param array $read + * @param array $write * @throws Exception * @return array */ - public function updateDocument($collectionId, $documentId, $data, $read = [], $write = []) + public function updateDocument(string $collectionId, string $documentId, string $data, array $read = [], array $write = []):array { $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/{collectionId}/documents/{documentId}'); $params = []; @@ -262,12 +262,12 @@ class Database extends Service * documents, his attributes and relations to other documents. Child documents * **will not** be deleted. * - * @param string $collectionId - * @param string $documentId + * @param string $collectionId + * @param string $documentId * @throws Exception * @return array */ - public function deleteDocument($collectionId, $documentId) + public function deleteDocument(string $collectionId, string $documentId):array { $path = str_replace(['{collectionId}', '{documentId}'], [$collectionId, $documentId], '/database/{collectionId}/documents/{documentId}'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Locale.php b/app/sdks/php/src/Appwrite/Services/Locale.php index e921dd928e..d7b11169ae 100644 --- a/app/sdks/php/src/Appwrite/Services/Locale.php +++ b/app/sdks/php/src/Appwrite/Services/Locale.php @@ -19,7 +19,7 @@ class Locale extends Service * @throws Exception * @return array */ - public function getLocale() + public function getLocale():array { $path = str_replace([], [], '/locale'); $params = []; @@ -39,7 +39,7 @@ class Locale extends Service * @throws Exception * @return array */ - public function getCountries() + public function getCountries():array { $path = str_replace([], [], '/locale/countries'); $params = []; @@ -60,7 +60,7 @@ class Locale extends Service * @throws Exception * @return array */ - public function getCountriesEU() + public function getCountriesEU():array { $path = str_replace([], [], '/locale/countries/eu'); $params = []; @@ -80,7 +80,7 @@ class Locale extends Service * @throws Exception * @return array */ - public function getCountriesPhones() + public function getCountriesPhones():array { $path = str_replace([], [], '/locale/countries/phones'); $params = []; @@ -101,7 +101,7 @@ class Locale extends Service * @throws Exception * @return array */ - public function getCurrencies() + public function getCurrencies():array { $path = str_replace([], [], '/locale/currencies'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Projects.php b/app/sdks/php/src/Appwrite/Services/Projects.php index 9df241b57f..701c3cc523 100644 --- a/app/sdks/php/src/Appwrite/Services/Projects.php +++ b/app/sdks/php/src/Appwrite/Services/Projects.php @@ -14,7 +14,7 @@ class Projects extends Service * @throws Exception * @return array */ - public function listProjects() + public function listProjects():array { $path = str_replace([], [], '/projects'); $params = []; @@ -28,21 +28,21 @@ class Projects extends Service /** * Create Project * - * @param string $name - * @param string $teamId - * @param string $description - * @param string $logo - * @param string $url - * @param string $legalName - * @param string $legalCountry - * @param string $legalState - * @param string $legalCity - * @param string $legalAddress - * @param string $legalTaxId + * @param string $name + * @param string $teamId + * @param string $description + * @param string $logo + * @param string $url + * @param string $legalName + * @param string $legalCountry + * @param string $legalState + * @param string $legalCity + * @param string $legalAddress + * @param string $legalTaxId * @throws Exception * @return array */ - public function createProject($name, $teamId, $description = '', $logo = '', $url = '', $legalName = '', $legalCountry = '', $legalState = '', $legalCity = '', $legalAddress = '', $legalTaxId = '') + public function createProject(string $name, string $teamId, string $description = '', string $logo = '', string $url = '', string $legalName = '', string $legalCountry = '', string $legalState = '', string $legalCity = '', string $legalAddress = '', string $legalTaxId = ''):array { $path = str_replace([], [], '/projects'); $params = []; @@ -67,11 +67,11 @@ class Projects extends Service /** * Get Project * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function getProject($projectId) + public function getProject(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}'); $params = []; @@ -85,21 +85,21 @@ class Projects extends Service /** * Update Project * - * @param string $projectId - * @param string $name - * @param string $description - * @param string $logo - * @param string $url - * @param string $legalName - * @param string $legalCountry - * @param string $legalState - * @param string $legalCity - * @param string $legalAddress - * @param string $legalTaxId + * @param string $projectId + * @param string $name + * @param string $description + * @param string $logo + * @param string $url + * @param string $legalName + * @param string $legalCountry + * @param string $legalState + * @param string $legalCity + * @param string $legalAddress + * @param string $legalTaxId * @throws Exception * @return array */ - public function updateProject($projectId, $name, $description = '', $logo = '', $url = '', $legalName = '', $legalCountry = '', $legalState = '', $legalCity = '', $legalAddress = '', $legalTaxId = '') + public function updateProject(string $projectId, string $name, string $description = '', string $logo = '', string $url = '', string $legalName = '', string $legalCountry = '', string $legalState = '', string $legalCity = '', string $legalAddress = '', string $legalTaxId = ''):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}'); $params = []; @@ -123,11 +123,11 @@ class Projects extends Service /** * Delete Project * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function deleteProject($projectId) + public function deleteProject(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}'); $params = []; @@ -141,11 +141,11 @@ class Projects extends Service /** * List Keys * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function listKeys($projectId) + public function listKeys(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/keys'); $params = []; @@ -159,13 +159,13 @@ class Projects extends Service /** * Create Key * - * @param string $projectId - * @param string $name - * @param array $scopes + * @param string $projectId + * @param string $name + * @param array $scopes * @throws Exception * @return array */ - public function createKey($projectId, $name, $scopes) + public function createKey(string $projectId, string $name, array $scopes):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/keys'); $params = []; @@ -181,12 +181,12 @@ class Projects extends Service /** * Get Key * - * @param string $projectId - * @param string $keyId + * @param string $projectId + * @param string $keyId * @throws Exception * @return array */ - public function getKey($projectId, $keyId) + public function getKey(string $projectId, string $keyId):array { $path = str_replace(['{projectId}', '{keyId}'], [$projectId, $keyId], '/projects/{projectId}/keys/{keyId}'); $params = []; @@ -200,14 +200,14 @@ class Projects extends Service /** * Update Key * - * @param string $projectId - * @param string $keyId - * @param string $name - * @param array $scopes + * @param string $projectId + * @param string $keyId + * @param string $name + * @param array $scopes * @throws Exception * @return array */ - public function updateKey($projectId, $keyId, $name, $scopes) + public function updateKey(string $projectId, string $keyId, string $name, array $scopes):array { $path = str_replace(['{projectId}', '{keyId}'], [$projectId, $keyId], '/projects/{projectId}/keys/{keyId}'); $params = []; @@ -223,12 +223,12 @@ class Projects extends Service /** * Delete Key * - * @param string $projectId - * @param string $keyId + * @param string $projectId + * @param string $keyId * @throws Exception * @return array */ - public function deleteKey($projectId, $keyId) + public function deleteKey(string $projectId, string $keyId):array { $path = str_replace(['{projectId}', '{keyId}'], [$projectId, $keyId], '/projects/{projectId}/keys/{keyId}'); $params = []; @@ -242,14 +242,14 @@ class Projects extends Service /** * Update Project OAuth * - * @param string $projectId - * @param string $provider - * @param string $appId - * @param string $secret + * @param string $projectId + * @param string $provider + * @param string $appId + * @param string $secret * @throws Exception * @return array */ - public function updateProjectOAuth($projectId, $provider, $appId = '', $secret = '') + public function updateProjectOAuth(string $projectId, string $provider, string $appId = '', string $secret = ''):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/oauth'); $params = []; @@ -266,11 +266,11 @@ class Projects extends Service /** * List Platforms * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function listPlatforms($projectId) + public function listPlatforms(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/platforms'); $params = []; @@ -284,16 +284,16 @@ class Projects extends Service /** * Create Platform * - * @param string $projectId - * @param string $type - * @param string $name - * @param string $key - * @param string $store - * @param string $url + * @param string $projectId + * @param string $type + * @param string $name + * @param string $key + * @param string $store + * @param string $url * @throws Exception * @return array */ - public function createPlatform($projectId, $type, $name, $key = '', $store = '', $url = '') + public function createPlatform(string $projectId, string $type, string $name, string $key = '', string $store = '', string $url = ''):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/platforms'); $params = []; @@ -312,12 +312,12 @@ class Projects extends Service /** * Get Platform * - * @param string $projectId - * @param string $platformId + * @param string $projectId + * @param string $platformId * @throws Exception * @return array */ - public function getPlatform($projectId, $platformId) + public function getPlatform(string $projectId, string $platformId):array { $path = str_replace(['{projectId}', '{platformId}'], [$projectId, $platformId], '/projects/{projectId}/platforms/{platformId}'); $params = []; @@ -331,16 +331,16 @@ class Projects extends Service /** * Update Platform * - * @param string $projectId - * @param string $platformId - * @param string $name - * @param string $key - * @param string $store - * @param string $url + * @param string $projectId + * @param string $platformId + * @param string $name + * @param string $key + * @param string $store + * @param string $url * @throws Exception * @return array */ - public function updatePlatform($projectId, $platformId, $name, $key = '', $store = '', $url = '') + public function updatePlatform(string $projectId, string $platformId, string $name, string $key = '', string $store = '', string $url = ''):array { $path = str_replace(['{projectId}', '{platformId}'], [$projectId, $platformId], '/projects/{projectId}/platforms/{platformId}'); $params = []; @@ -358,12 +358,12 @@ class Projects extends Service /** * Delete Platform * - * @param string $projectId - * @param string $platformId + * @param string $projectId + * @param string $platformId * @throws Exception * @return array */ - public function deletePlatform($projectId, $platformId) + public function deletePlatform(string $projectId, string $platformId):array { $path = str_replace(['{projectId}', '{platformId}'], [$projectId, $platformId], '/projects/{projectId}/platforms/{platformId}'); $params = []; @@ -377,11 +377,11 @@ class Projects extends Service /** * List Tasks * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function listTasks($projectId) + public function listTasks(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/tasks'); $params = []; @@ -395,20 +395,20 @@ class Projects extends Service /** * Create Task * - * @param string $projectId - * @param string $name - * @param string $status - * @param string $schedule - * @param integer $security - * @param string $httpMethod - * @param string $httpUrl - * @param array $httpHeaders - * @param string $httpUser - * @param string $httpPass + * @param string $projectId + * @param string $name + * @param string $status + * @param string $schedule + * @param int $security + * @param string $httpMethod + * @param string $httpUrl + * @param array $httpHeaders + * @param string $httpUser + * @param string $httpPass * @throws Exception * @return array */ - public function createTask($projectId, $name, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders = [], $httpUser = '', $httpPass = '') + public function createTask(string $projectId, string $name, string $status, string $schedule, int $security, string $httpMethod, string $httpUrl, array $httpHeaders = [], string $httpUser = '', string $httpPass = ''):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/tasks'); $params = []; @@ -431,12 +431,12 @@ class Projects extends Service /** * Get Task * - * @param string $projectId - * @param string $taskId + * @param string $projectId + * @param string $taskId * @throws Exception * @return array */ - public function getTask($projectId, $taskId) + public function getTask(string $projectId, string $taskId):array { $path = str_replace(['{projectId}', '{taskId}'], [$projectId, $taskId], '/projects/{projectId}/tasks/{taskId}'); $params = []; @@ -450,21 +450,21 @@ class Projects extends Service /** * Update Task * - * @param string $projectId - * @param string $taskId - * @param string $name - * @param string $status - * @param string $schedule - * @param integer $security - * @param string $httpMethod - * @param string $httpUrl - * @param array $httpHeaders - * @param string $httpUser - * @param string $httpPass + * @param string $projectId + * @param string $taskId + * @param string $name + * @param string $status + * @param string $schedule + * @param int $security + * @param string $httpMethod + * @param string $httpUrl + * @param array $httpHeaders + * @param string $httpUser + * @param string $httpPass * @throws Exception * @return array */ - public function updateTask($projectId, $taskId, $name, $status, $schedule, $security, $httpMethod, $httpUrl, $httpHeaders = [], $httpUser = '', $httpPass = '') + public function updateTask(string $projectId, string $taskId, string $name, string $status, string $schedule, int $security, string $httpMethod, string $httpUrl, array $httpHeaders = [], string $httpUser = '', string $httpPass = ''):array { $path = str_replace(['{projectId}', '{taskId}'], [$projectId, $taskId], '/projects/{projectId}/tasks/{taskId}'); $params = []; @@ -487,12 +487,12 @@ class Projects extends Service /** * Delete Task * - * @param string $projectId - * @param string $taskId + * @param string $projectId + * @param string $taskId * @throws Exception * @return array */ - public function deleteTask($projectId, $taskId) + public function deleteTask(string $projectId, string $taskId):array { $path = str_replace(['{projectId}', '{taskId}'], [$projectId, $taskId], '/projects/{projectId}/tasks/{taskId}'); $params = []; @@ -506,11 +506,11 @@ class Projects extends Service /** * Get Project * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function getProjectUsage($projectId) + public function getProjectUsage(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/usage'); $params = []; @@ -524,11 +524,11 @@ class Projects extends Service /** * List Webhooks * - * @param string $projectId + * @param string $projectId * @throws Exception * @return array */ - public function listWebhooks($projectId) + public function listWebhooks(string $projectId):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/webhooks'); $params = []; @@ -542,17 +542,17 @@ class Projects extends Service /** * Create Webhook * - * @param string $projectId - * @param string $name - * @param array $events - * @param string $url - * @param integer $security - * @param string $httpUser - * @param string $httpPass + * @param string $projectId + * @param string $name + * @param array $events + * @param string $url + * @param int $security + * @param string $httpUser + * @param string $httpPass * @throws Exception * @return array */ - public function createWebhook($projectId, $name, $events, $url, $security, $httpUser = '', $httpPass = '') + public function createWebhook(string $projectId, string $name, array $events, string $url, int $security, string $httpUser = '', string $httpPass = ''):array { $path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/webhooks'); $params = []; @@ -572,12 +572,12 @@ class Projects extends Service /** * Get Webhook * - * @param string $projectId - * @param string $webhookId + * @param string $projectId + * @param string $webhookId * @throws Exception * @return array */ - public function getWebhook($projectId, $webhookId) + public function getWebhook(string $projectId, string $webhookId):array { $path = str_replace(['{projectId}', '{webhookId}'], [$projectId, $webhookId], '/projects/{projectId}/webhooks/{webhookId}'); $params = []; @@ -591,18 +591,18 @@ class Projects extends Service /** * Update Webhook * - * @param string $projectId - * @param string $webhookId - * @param string $name - * @param array $events - * @param string $url - * @param integer $security - * @param string $httpUser - * @param string $httpPass + * @param string $projectId + * @param string $webhookId + * @param string $name + * @param array $events + * @param string $url + * @param int $security + * @param string $httpUser + * @param string $httpPass * @throws Exception * @return array */ - public function updateWebhook($projectId, $webhookId, $name, $events, $url, $security, $httpUser = '', $httpPass = '') + public function updateWebhook(string $projectId, string $webhookId, string $name, array $events, string $url, int $security, string $httpUser = '', string $httpPass = ''):array { $path = str_replace(['{projectId}', '{webhookId}'], [$projectId, $webhookId], '/projects/{projectId}/webhooks/{webhookId}'); $params = []; @@ -622,12 +622,12 @@ class Projects extends Service /** * Delete Webhook * - * @param string $projectId - * @param string $webhookId + * @param string $projectId + * @param string $webhookId * @throws Exception * @return array */ - public function deleteWebhook($projectId, $webhookId) + public function deleteWebhook(string $projectId, string $webhookId):array { $path = str_replace(['{projectId}', '{webhookId}'], [$projectId, $webhookId], '/projects/{projectId}/webhooks/{webhookId}'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Storage.php b/app/sdks/php/src/Appwrite/Services/Storage.php index b4a8873ebe..0997850e89 100644 --- a/app/sdks/php/src/Appwrite/Services/Storage.php +++ b/app/sdks/php/src/Appwrite/Services/Storage.php @@ -15,14 +15,14 @@ class Storage extends Service * 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). * - * @param string $search - * @param integer $limit - * @param integer $offset - * @param string $orderType + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType * @throws Exception * @return array */ - public function listFiles($search = '', $limit = 25, $offset = 0, $orderType = 'ASC') + public function listFiles(string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array { $path = str_replace([], [], '/storage/files'); $params = []; @@ -44,14 +44,14 @@ class Storage extends Service * assigned to read and write access unless he has passed custom values for * read and write arguments. * - * @param \CurlFile $files - * @param array $read - * @param array $write - * @param string $folderId + * @param \CurlFile $files + * @param array $read + * @param array $write + * @param string $folderId * @throws Exception * @return array */ - public function createFile($files, $read = [], $write = [], $folderId = '') + public function createFile(\CurlFile $files, array $read = [], array $write = [], string $folderId = ''):array { $path = str_replace([], [], '/storage/files'); $params = []; @@ -63,7 +63,6 @@ class Storage extends Service return $this->client->call(Client::METHOD_POST, $path, [ 'content-type' => 'multipart/form-data', - 'content-type' => 'multipart/form-data', ], $params); } @@ -73,11 +72,11 @@ class Storage extends Service * Get file by its unique ID. This endpoint response returns a JSON object * with the file metadata. * - * @param string $fileId + * @param string $fileId * @throws Exception * @return array */ - public function getFile($fileId) + public function getFile(string $fileId):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); $params = []; @@ -94,14 +93,14 @@ class Storage extends Service * Update file by its unique ID. Only users with write permissions have access * to update this resource. * - * @param string $fileId - * @param array $read - * @param array $write - * @param string $folderId + * @param string $fileId + * @param array $read + * @param array $write + * @param string $folderId * @throws Exception * @return array */ - public function updateFile($fileId, $read = [], $write = [], $folderId = '') + public function updateFile(string $fileId, array $read = [], array $write = [], string $folderId = ''):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); $params = []; @@ -121,11 +120,11 @@ class Storage extends Service * Delete a file by its unique ID. Only users with write permissions have * access to delete this resource. * - * @param string $fileId + * @param string $fileId * @throws Exception * @return array */ - public function deleteFile($fileId) + public function deleteFile(string $fileId):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}'); $params = []; @@ -143,11 +142,11 @@ class Storage extends Service * 'Content-Disposition: attachment' header that tells the browser to start * downloading the file to user downloads directory. * - * @param string $fileId + * @param string $fileId * @throws Exception * @return array */ - public function getFileDownload($fileId) + public function getFileDownload(string $fileId):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/download'); $params = []; @@ -166,16 +165,16 @@ class Storage extends Service * and spreadsheets will return file icon image. You can also pass query * string arguments for cutting and resizing your preview image. * - * @param string $fileId - * @param integer $width - * @param integer $height - * @param integer $quality - * @param string $background - * @param string $output + * @param string $fileId + * @param int $width + * @param int $height + * @param int $quality + * @param string $background + * @param string $output * @throws Exception * @return array */ - public function getFilePreview($fileId, $width = 0, $height = 0, $quality = 100, $background = '', $output = '') + public function getFilePreview(string $fileId, int $width = 0, int $height = 0, int $quality = 100, string $background = '', string $output = ''):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/preview'); $params = []; @@ -197,12 +196,12 @@ class Storage extends Service * Get file content by its unique ID. This endpoint is similar to the download * method but returns with no 'Content-Disposition: attachment' header. * - * @param string $fileId - * @param string $as + * @param string $fileId + * @param string $as * @throws Exception * @return array */ - public function getFileView($fileId, $as = '') + public function getFileView(string $fileId, string $as = ''):array { $path = str_replace(['{fileId}'], [$fileId], '/storage/files/{fileId}/view'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Teams.php b/app/sdks/php/src/Appwrite/Services/Teams.php index 227f463a6a..4addaa03d1 100644 --- a/app/sdks/php/src/Appwrite/Services/Teams.php +++ b/app/sdks/php/src/Appwrite/Services/Teams.php @@ -15,14 +15,14 @@ class Teams extends Service * 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). * - * @param string $search - * @param integer $limit - * @param integer $offset - * @param string $orderType + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType * @throws Exception * @return array */ - public function listTeams($search = '', $limit = 25, $offset = 0, $orderType = 'ASC') + public function listTeams(string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array { $path = str_replace([], [], '/teams'); $params = []; @@ -45,12 +45,12 @@ class Teams extends Service * who will be able add new owners and update or delete the team from your * project. * - * @param string $name - * @param array $roles + * @param string $name + * @param array $roles * @throws Exception * @return array */ - public function createTeam($name, $roles = ["owner"]) + public function createTeam(string $name, array $roles = ["owner"]):array { $path = str_replace([], [], '/teams'); $params = []; @@ -69,11 +69,11 @@ class Teams extends Service * Get team by its unique ID. All team members have read access for this * resource. * - * @param string $teamId + * @param string $teamId * @throws Exception * @return array */ - public function getTeam($teamId) + public function getTeam(string $teamId):array { $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); $params = []; @@ -90,12 +90,12 @@ class Teams extends Service * Update team by its unique ID. Only team owners have write access for this * resource. * - * @param string $teamId - * @param string $name + * @param string $teamId + * @param string $name * @throws Exception * @return array */ - public function updateTeam($teamId, $name) + public function updateTeam(string $teamId, string $name):array { $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); $params = []; @@ -113,11 +113,11 @@ class Teams extends Service * Delete team by its unique ID. Only team owners have write access for this * resource. * - * @param string $teamId + * @param string $teamId * @throws Exception * @return array */ - public function deleteTeam($teamId) + public function deleteTeam(string $teamId):array { $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}'); $params = []; @@ -134,11 +134,11 @@ class Teams extends Service * Get team members by the team unique ID. All team members have read access * for this list of resources. * - * @param string $teamId + * @param string $teamId * @throws Exception * @return array */ - public function getTeamMembers($teamId) + public function getTeamMembers(string $teamId):array { $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/members'); $params = []; @@ -166,15 +166,15 @@ class Teams extends Service * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. * - * @param string $teamId - * @param string $email - * @param array $roles - * @param string $redirect - * @param string $name + * @param string $teamId + * @param string $email + * @param array $roles + * @param string $redirect + * @param string $name * @throws Exception * @return array */ - public function createTeamMembership($teamId, $email, $roles, $redirect, $name = '') + public function createTeamMembership(string $teamId, string $email, array $roles, string $redirect, string $name = ''):array { $path = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships'); $params = []; @@ -195,12 +195,12 @@ class Teams extends Service * This endpoint allows a user to leave a team or for a team owner to delete * the membership of any other team member. * - * @param string $teamId - * @param string $inviteId + * @param string $teamId + * @param string $inviteId * @throws Exception * @return array */ - public function deleteTeamMembership($teamId, $inviteId) + public function deleteTeamMembership(string $teamId, string $inviteId):array { $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}'); $params = []; @@ -217,13 +217,13 @@ class Teams extends Service * Use this endpoint to resend your invitation email for a user to join a * team. * - * @param string $teamId - * @param string $inviteId - * @param string $redirect + * @param string $teamId + * @param string $inviteId + * @param string $redirect * @throws Exception * @return array */ - public function createTeamMembershipResend($teamId, $inviteId, $redirect) + public function createTeamMembershipResend(string $teamId, string $inviteId, string $redirect):array { $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}/resend'); $params = []; @@ -254,16 +254,16 @@ class Teams extends Service * browsers who don't allow to set 3rd party HTTP cookies needed for saving * the account session token. * - * @param string $teamId - * @param string $inviteId - * @param string $userId - * @param string $secret - * @param string $success - * @param string $failure + * @param string $teamId + * @param string $inviteId + * @param string $userId + * @param string $secret + * @param string $success + * @param string $failure * @throws Exception * @return array */ - public function updateTeamMembershipStatus($teamId, $inviteId, $userId, $secret, $success = '', $failure = '') + public function updateTeamMembershipStatus(string $teamId, string $inviteId, string $userId, string $secret, string $success = '', string $failure = ''):array { $path = str_replace(['{teamId}', '{inviteId}'], [$teamId, $inviteId], '/teams/{teamId}/memberships/{inviteId}/status'); $params = []; diff --git a/app/sdks/php/src/Appwrite/Services/Users.php b/app/sdks/php/src/Appwrite/Services/Users.php index 4c5911723a..aca2a1edb1 100644 --- a/app/sdks/php/src/Appwrite/Services/Users.php +++ b/app/sdks/php/src/Appwrite/Services/Users.php @@ -14,14 +14,14 @@ class Users extends Service * Get a list of all the project users. You can use the query params to filter * your results. * - * @param string $search - * @param integer $limit - * @param integer $offset - * @param string $orderType + * @param string $search + * @param int $limit + * @param int $offset + * @param string $orderType * @throws Exception * @return array */ - public function listUsers($search = '', $limit = 25, $offset = 0, $orderType = 'ASC') + public function listUsers(string $search = '', int $limit = 25, int $offset = 0, string $orderType = 'ASC'):array { $path = str_replace([], [], '/users'); $params = []; @@ -41,13 +41,13 @@ class Users extends Service * * Create a new user. * - * @param string $email - * @param string $password - * @param string $name + * @param string $email + * @param string $password + * @param string $name * @throws Exception * @return array */ - public function createUser($email, $password, $name = '') + public function createUser(string $email, string $password, string $name = ''):array { $path = str_replace([], [], '/users'); $params = []; @@ -66,11 +66,11 @@ class Users extends Service * * Get user by its unique ID. * - * @param string $userId + * @param string $userId * @throws Exception * @return array */ - public function getUser($userId) + public function getUser(string $userId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}'); $params = []; @@ -86,11 +86,11 @@ class Users extends Service * * Get user activity logs list by its unique ID. * - * @param string $userId + * @param string $userId * @throws Exception * @return array */ - public function getUserLogs($userId) + public function getUserLogs(string $userId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/logs'); $params = []; @@ -106,11 +106,11 @@ class Users extends Service * * Get user preferences by its unique ID. * - * @param string $userId + * @param string $userId * @throws Exception * @return array */ - public function getUserPrefs($userId) + public function getUserPrefs(string $userId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); $params = []; @@ -127,12 +127,12 @@ class Users extends Service * Update user preferences by its unique ID. You can pass only the specific * settings you wish to update. * - * @param string $userId - * @param string $prefs + * @param string $userId + * @param string $prefs * @throws Exception * @return array */ - public function updateUserPrefs($userId, $prefs) + public function updateUserPrefs(string $userId, string $prefs):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/prefs'); $params = []; @@ -149,11 +149,11 @@ class Users extends Service * * Get user sessions list by its unique ID. * - * @param string $userId + * @param string $userId * @throws Exception * @return array */ - public function getUserSessions($userId) + public function getUserSessions(string $userId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); $params = []; @@ -169,11 +169,11 @@ class Users extends Service * * Delete all user sessions by its unique ID. * - * @param string $userId + * @param string $userId * @throws Exception * @return array */ - public function deleteUserSessions($userId) + public function deleteUserSessions(string $userId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions'); $params = []; @@ -189,12 +189,12 @@ class Users extends Service * * Delete user sessions by its unique ID. * - * @param string $userId - * @param string $sessionId + * @param string $userId + * @param string $sessionId * @throws Exception * @return array */ - public function deleteUserSession($userId, $sessionId) + public function deleteUserSession(string $userId, string $sessionId):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/sessions/:session'); $params = []; @@ -211,12 +211,12 @@ class Users extends Service * * Update user status by its unique ID. * - * @param string $userId - * @param string $status + * @param string $userId + * @param string $status * @throws Exception * @return array */ - public function updateUserStatus($userId, $status) + public function updateUserStatus(string $userId, string $status):array { $path = str_replace(['{userId}'], [$userId], '/users/{userId}/status'); $params = []; diff --git a/app/sdks/python/appwrite/services/account.py b/app/sdks/python/appwrite/services/account.py index 4ea82c47d7..53394a3e15 100644 --- a/app/sdks/python/appwrite/services/account.py +++ b/app/sdks/python/appwrite/services/account.py @@ -10,6 +10,7 @@ class Account(Service): path = '/account' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def delete(self): @@ -19,6 +20,7 @@ class Account(Service): path = '/account' return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def update_email(self, email, password): @@ -30,6 +32,7 @@ class Account(Service): params['password'] = password return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def update_name(self, name): @@ -40,6 +43,7 @@ class Account(Service): params['name'] = name return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def update_password(self, password, old_password): @@ -51,6 +55,7 @@ class Account(Service): params['old-password'] = old_password return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def get_prefs(self): @@ -60,6 +65,7 @@ class Account(Service): path = '/account/prefs' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_prefs(self, prefs): @@ -70,6 +76,7 @@ class Account(Service): params['prefs'] = prefs return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def get_security(self): @@ -79,6 +86,7 @@ class Account(Service): path = '/account/security' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_sessions(self): @@ -88,4 +96,5 @@ class Account(Service): path = '/account/sessions' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/auth.py b/app/sdks/python/appwrite/services/auth.py index 4ca376d14f..c7a8341869 100644 --- a/app/sdks/python/appwrite/services/auth.py +++ b/app/sdks/python/appwrite/services/auth.py @@ -14,6 +14,7 @@ class Auth(Service): params['failure'] = failure return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def logout(self): @@ -23,6 +24,7 @@ class Auth(Service): path = '/auth/logout' return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def logout_by_session(self, id): @@ -33,6 +35,7 @@ class Auth(Service): path.replace('{id}', id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def oauth(self, provider, success, failure): @@ -45,6 +48,7 @@ class Auth(Service): params['failure'] = failure return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def recovery(self, email, reset): @@ -56,6 +60,7 @@ class Auth(Service): params['reset'] = reset return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def recovery_reset(self, user_id, token, password_a, password_b): @@ -69,6 +74,7 @@ class Auth(Service): params['password-b'] = password_b return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def register(self, email, password, confirm, success='', failure='', name=''): @@ -84,6 +90,7 @@ class Auth(Service): params['name'] = name return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def confirm(self, user_id, token): @@ -95,6 +102,7 @@ class Auth(Service): params['token'] = token return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def confirm_resend(self, confirm): @@ -105,4 +113,5 @@ class Auth(Service): params['confirm'] = confirm return self.client.call('post', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/avatars.py b/app/sdks/python/appwrite/services/avatars.py index f6e463abc1..2f68663b65 100644 --- a/app/sdks/python/appwrite/services/avatars.py +++ b/app/sdks/python/appwrite/services/avatars.py @@ -14,6 +14,7 @@ class Avatars(Service): params['quality'] = quality return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_credit_card(self, code, width=100, height=100, quality=100): @@ -27,6 +28,7 @@ class Avatars(Service): params['quality'] = quality return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_favicon(self, url): @@ -37,6 +39,7 @@ class Avatars(Service): params['url'] = url return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_flag(self, code, width=100, height=100, quality=100): @@ -50,6 +53,7 @@ class Avatars(Service): params['quality'] = quality return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_image(self, url, width=400, height=400): @@ -62,6 +66,7 @@ class Avatars(Service): params['height'] = height return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_q_r(self, text, size=400, margin=1, download=0): @@ -75,4 +80,5 @@ class Avatars(Service): params['download'] = download return self.client.call('get', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/database.py b/app/sdks/python/appwrite/services/database.py index a81a7d9d70..0896879c24 100644 --- a/app/sdks/python/appwrite/services/database.py +++ b/app/sdks/python/appwrite/services/database.py @@ -14,6 +14,7 @@ class Database(Service): params['orderType'] = order_type return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_collection(self, name, read, write, rules): @@ -27,6 +28,7 @@ class Database(Service): params['rules'] = rules return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_collection(self, collection_id): @@ -37,6 +39,7 @@ class Database(Service): path.replace('{collectionId}', collection_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_collection(self, collection_id, name, readstring(4) ""[]"" @@ -54,6 +57,7 @@ class Database(Service): params['rules'] = rules return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_collection(self, collection_id): @@ -64,6 +68,7 @@ class Database(Service): path.replace('{collectionId}', collection_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def list_documents(self, collection_id, filtersstring(4) ""[]"" @@ -84,6 +89,7 @@ class Database(Service): params['last'] = last return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_document(self, collection_id, data, readstring(4) ""[]"" @@ -102,6 +108,7 @@ class Database(Service): params['parentPropertyType'] = parent_property_type return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_document(self, collection_id, document_id): @@ -113,6 +120,7 @@ class Database(Service): path.replace('{documentId}', document_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_document(self, collection_id, document_id, data, readstring(4) ""[]"" @@ -129,6 +137,7 @@ class Database(Service): params['write'] = write return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def delete_document(self, collection_id, document_id): @@ -140,4 +149,5 @@ class Database(Service): path.replace('{documentId}', document_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/locale.py b/app/sdks/python/appwrite/services/locale.py index fef156bef7..9f128d226c 100644 --- a/app/sdks/python/appwrite/services/locale.py +++ b/app/sdks/python/appwrite/services/locale.py @@ -10,6 +10,7 @@ class Locale(Service): path = '/locale' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_countries(self): @@ -19,6 +20,7 @@ class Locale(Service): path = '/locale/countries' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_countries_e_u(self): @@ -28,6 +30,7 @@ class Locale(Service): path = '/locale/countries/eu' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_countries_phones(self): @@ -37,6 +40,7 @@ class Locale(Service): path = '/locale/countries/phones' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_currencies(self): @@ -46,4 +50,5 @@ class Locale(Service): path = '/locale/currencies' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/projects.py b/app/sdks/python/appwrite/services/projects.py index 5dc676ed52..303ca7e43c 100644 --- a/app/sdks/python/appwrite/services/projects.py +++ b/app/sdks/python/appwrite/services/projects.py @@ -10,6 +10,7 @@ class Projects(Service): path = '/projects' return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_project(self, name, team_id, description='', logo='', url='', legal_name='', legal_country='', legal_state='', legal_city='', legal_address='', legal_tax_id=''): @@ -30,6 +31,7 @@ class Projects(Service): params['legalTaxId'] = legal_tax_id return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_project(self, project_id): @@ -40,6 +42,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_project(self, project_id, name, description='', logo='', url='', legal_name='', legal_country='', legal_state='', legal_city='', legal_address='', legal_tax_id=''): @@ -60,6 +63,7 @@ class Projects(Service): params['legalTaxId'] = legal_tax_id return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def delete_project(self, project_id): @@ -70,6 +74,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def list_keys(self, project_id): @@ -80,6 +85,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_key(self, project_id, name, scopes): @@ -92,6 +98,7 @@ class Projects(Service): params['scopes'] = scopes return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_key(self, project_id, key_id): @@ -103,6 +110,7 @@ class Projects(Service): path.replace('{keyId}', key_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_key(self, project_id, key_id, name, scopes): @@ -116,6 +124,7 @@ class Projects(Service): params['scopes'] = scopes return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_key(self, project_id, key_id): @@ -127,6 +136,7 @@ class Projects(Service): path.replace('{keyId}', key_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def update_project_o_auth(self, project_id, provider, app_id='', secret=''): @@ -140,6 +150,7 @@ class Projects(Service): params['secret'] = secret return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def list_platforms(self, project_id): @@ -150,6 +161,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_platform(self, project_id, type, name, key='', store='', url=''): @@ -165,6 +177,7 @@ class Projects(Service): params['url'] = url return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_platform(self, project_id, platform_id): @@ -176,6 +189,7 @@ class Projects(Service): path.replace('{platformId}', platform_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_platform(self, project_id, platform_id, name, key='', store='', url=''): @@ -191,6 +205,7 @@ class Projects(Service): params['url'] = url return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_platform(self, project_id, platform_id): @@ -202,6 +217,7 @@ class Projects(Service): path.replace('{platformId}', platform_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def list_tasks(self, project_id): @@ -212,6 +228,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_task(self, project_id, name, status, schedule, security, http_method, http_url, http_headers={}, http_user='', http_pass=''): @@ -231,6 +248,7 @@ class Projects(Service): params['httpPass'] = http_pass return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_task(self, project_id, task_id): @@ -242,6 +260,7 @@ class Projects(Service): path.replace('{taskId}', task_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_task(self, project_id, task_id, name, status, schedule, security, http_method, http_url, http_headers={}, http_user='', http_pass=''): @@ -262,6 +281,7 @@ class Projects(Service): params['httpPass'] = http_pass return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_task(self, project_id, task_id): @@ -273,6 +293,7 @@ class Projects(Service): path.replace('{taskId}', task_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def get_project_usage(self, project_id): @@ -283,6 +304,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def list_webhooks(self, project_id): @@ -293,6 +315,7 @@ class Projects(Service): path.replace('{projectId}', project_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_webhook(self, project_id, name, events, url, security, http_user='', http_pass=''): @@ -309,6 +332,7 @@ class Projects(Service): params['httpPass'] = http_pass return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_webhook(self, project_id, webhook_id): @@ -320,6 +344,7 @@ class Projects(Service): path.replace('{webhookId}', webhook_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_webhook(self, project_id, webhook_id, name, events, url, security, http_user='', http_pass=''): @@ -337,6 +362,7 @@ class Projects(Service): params['httpPass'] = http_pass return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_webhook(self, project_id, webhook_id): @@ -348,4 +374,5 @@ class Projects(Service): path.replace('{webhookId}', webhook_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/storage.py b/app/sdks/python/appwrite/services/storage.py index 0a0ac9b55e..c1213a4a71 100644 --- a/app/sdks/python/appwrite/services/storage.py +++ b/app/sdks/python/appwrite/services/storage.py @@ -14,6 +14,7 @@ class Storage(Service): params['orderType'] = order_type return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_file(self, files, readstring(4) ""[]"" @@ -40,6 +41,7 @@ class Storage(Service): path.replace('{fileId}', file_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_file(self, file_id, readstring(4) ""[]"" @@ -55,6 +57,7 @@ class Storage(Service): params['folderId'] = folder_id return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_file(self, file_id): @@ -65,6 +68,7 @@ class Storage(Service): path.replace('{fileId}', file_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def get_file_download(self, file_id): @@ -75,6 +79,7 @@ class Storage(Service): path.replace('{fileId}', file_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_file_preview(self, file_id, width=0, height=0, quality=100, background='', output=''): @@ -90,6 +95,7 @@ class Storage(Service): params['output'] = output return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_file_view(self, file_id, as=''): @@ -101,4 +107,5 @@ class Storage(Service): params['as'] = as return self.client.call('get', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/teams.py b/app/sdks/python/appwrite/services/teams.py index f7e5f62cee..85ae8f43ed 100644 --- a/app/sdks/python/appwrite/services/teams.py +++ b/app/sdks/python/appwrite/services/teams.py @@ -14,6 +14,7 @@ class Teams(Service): params['orderType'] = order_type return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_team(self, name, rolesstring(13) ""[\"owner\"]"" @@ -26,6 +27,7 @@ class Teams(Service): params['roles'] = roles return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_team(self, team_id): @@ -36,6 +38,7 @@ class Teams(Service): path.replace('{teamId}', team_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_team(self, team_id, name): @@ -47,6 +50,7 @@ class Teams(Service): params['name'] = name return self.client.call('put', path, { + 'content-type': 'application/json', }, params) def delete_team(self, team_id): @@ -57,6 +61,7 @@ class Teams(Service): path.replace('{teamId}', team_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def get_team_members(self, team_id): @@ -67,6 +72,7 @@ class Teams(Service): path.replace('{teamId}', team_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_team_membership(self, team_id, email, roles, redirect, name=''): @@ -81,6 +87,7 @@ class Teams(Service): params['redirect'] = redirect return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def delete_team_membership(self, team_id, invite_id): @@ -92,6 +99,7 @@ class Teams(Service): path.replace('{inviteId}', invite_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def create_team_membership_resend(self, team_id, invite_id, redirect): @@ -104,6 +112,7 @@ class Teams(Service): params['redirect'] = redirect return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def update_team_membership_status(self, team_id, invite_id, user_id, secret, success='', failure=''): @@ -119,4 +128,5 @@ class Teams(Service): params['failure'] = failure return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) diff --git a/app/sdks/python/appwrite/services/users.py b/app/sdks/python/appwrite/services/users.py index 7e9a8c33e7..0f15828bd4 100644 --- a/app/sdks/python/appwrite/services/users.py +++ b/app/sdks/python/appwrite/services/users.py @@ -14,6 +14,7 @@ class Users(Service): params['orderType'] = order_type return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def create_user(self, email, password, name=''): @@ -26,6 +27,7 @@ class Users(Service): params['name'] = name return self.client.call('post', path, { + 'content-type': 'application/json', }, params) def get_user(self, user_id): @@ -36,6 +38,7 @@ class Users(Service): path.replace('{userId}', user_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_user_logs(self, user_id): @@ -46,6 +49,7 @@ class Users(Service): path.replace('{userId}', user_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def get_user_prefs(self, user_id): @@ -56,6 +60,7 @@ class Users(Service): path.replace('{userId}', user_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def update_user_prefs(self, user_id, prefs): @@ -67,6 +72,7 @@ class Users(Service): params['prefs'] = prefs return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) def get_user_sessions(self, user_id): @@ -77,6 +83,7 @@ class Users(Service): path.replace('{userId}', user_id) return self.client.call('get', path, { + 'content-type': 'application/json', }, params) def delete_user_sessions(self, user_id): @@ -87,6 +94,7 @@ class Users(Service): path.replace('{userId}', user_id) return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def delete_user_session(self, user_id, session_id): @@ -98,6 +106,7 @@ class Users(Service): params['sessionId'] = session_id return self.client.call('delete', path, { + 'content-type': 'application/json', }, params) def update_user_status(self, user_id, status): @@ -109,4 +118,5 @@ class Users(Service): params['status'] = status return self.client.call('patch', path, { + 'content-type': 'application/json', }, params) diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 46e714aa5f..e461de295a 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -39,7 +39,7 @@ $cli $clients = [ 'php' => [ - 'version' => '1.0.11', + 'version' => '1.0.12', 'result' => __DIR__.'/../sdks/php/', 'gitURL' => 'https://github.com/appwrite/sdk-for-php.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-php.git', diff --git a/composer.lock b/composer.lock index c6c89cc19f..d53c772300 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "75363229b8626615d69a0437765c32bee98f9c16" + "reference": "263b9e265b8d49870f5d19cd964124a4dcd27faf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/75363229b8626615d69a0437765c32bee98f9c16", - "reference": "75363229b8626615d69a0437765c32bee98f9c16", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/263b9e265b8d49870f5d19cd964124a4dcd27faf", + "reference": "263b9e265b8d49870f5d19cd964124a4dcd27faf", "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-18T15:30:24+00:00" + "time": "2019-10-19T00:02:42+00:00" }, { "name": "appwrite/php-clamav", @@ -92,7 +92,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "4ab0600fb6e4b59824d4804fbd347050f5dc3864" + "reference": "4598cf6a767d1c5a8b0db55330933e8509670efb" }, "require": { "ext-curl": "*", @@ -122,7 +122,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2019-10-18 21:12:43" + "time": "2019-10-19 10:34:29" }, { "name": "bacon/bacon-qr-code",