Using new Appwrite JS SDK
This commit is contained in:
parent
1936e20636
commit
061d558423
|
@ -1,4 +1,4 @@
|
|||
<div data-service="projects.get" data-event="project-load" data-name="console-project" data-param-project-id="{{router.params.project}}">
|
||||
<div data-service="projects.getProject" data-event="project-load" data-name="console-project" data-param-project-id="{{router.params.project}}">
|
||||
</div>
|
||||
|
||||
<header class="clear">
|
||||
|
@ -96,16 +96,16 @@
|
|||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="list pull-start project-only" data-service="projects.list" data-event="load" data-name="projects" data-scope="console" data-singleton="true">
|
||||
<div class="list pull-start project-only" data-service="projects.listProjects" data-event="load" data-name="projects" data-scope="console" data-singleton="true">
|
||||
</div>
|
||||
|
||||
<div class="" data-service="geo.get" data-name="geo" data-event="load" data-singleton="true">
|
||||
<div class="" data-service="locale.getLocale" data-name="geo" data-event="load" data-singleton="true">
|
||||
</div>
|
||||
|
||||
<div class="" data-service="geo.countries.list" data-name="geo-countries" data-event="load" data-singleton="true">
|
||||
<div class="" data-service="locale.getCountries" data-name="geo-countries" data-event="load" data-singleton="true">
|
||||
</div>
|
||||
|
||||
<div class="" data-service="geo.countries.phones" data-name="geo-countries-phones" data-event="load" data-singleton="true">
|
||||
<div class="" data-service="locale.getCountriesPhones" data-name="geo-countries-phones" data-event="load" data-singleton="true">
|
||||
</div>
|
||||
|
||||
<div data-ui-modal class="modal close" data-button-alias=".setup-new" data-button-icon="icon-plus" data-button-class="project-only" data-open-event="new-project">
|
||||
|
|
|
@ -15,15 +15,7 @@
|
|||
</div>
|
||||
|
||||
<section class="zone xl margin-bottom-large margin-top-negative-large">
|
||||
<div data-service="projects.list"
|
||||
data-scope="console"
|
||||
data-event="load"
|
||||
data-name="console-projects"
|
||||
data-success="render,trigger"
|
||||
data-error="render"
|
||||
data-success-rerender="project.new"
|
||||
data-error-rerender=""
|
||||
data-success-triggers="projects.load">
|
||||
<div data-service="projects.listProjects" data-scope="console" data-event="load" data-name="console-projects" data-success="render,trigger" data-error="render" data-success-rerender="project.new" data-error-rerender="" data-success-triggers="projects.load">
|
||||
|
||||
<div data-ls-if="0 == {{console-projects.sum}}" class="box margin-bottom" style="display: none">
|
||||
<h3 class="margin-bottom">No Projects Found</h3>
|
||||
|
|
|
@ -10,7 +10,7 @@ use Utopia\Locale\Locale;
|
|||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="zone xl" data-service="projects.get" data-scope="console" data-name="console-project" data-event="load" data-param-project-id="{{router.params.project}}" data-success="render,trigger" data-error="render" data-success-rerender="" data-error-rerender="" data-success-triggers="project.load">
|
||||
<div class="zone xl" data-service="projects.getProject" data-scope="console" data-name="console-project" data-event="load" data-param-project-id="{{router.params.project}}" data-success="render,trigger" data-error="render" data-success-rerender="" data-error-rerender="" data-success-triggers="project.load">
|
||||
|
||||
<div class="zone xl">
|
||||
<ul class="phases clear" data-ui-phases data-selected="{{router.params.tab}}">
|
||||
|
|
|
@ -47,7 +47,7 @@ $env = $this->getParam('env', '');
|
|||
NAME: '<?php echo APP_NAME; ?>',
|
||||
VERSION: '<?php echo $version; ?>',
|
||||
DOMAIN: '<?php echo $domain; ?>',
|
||||
API: '<?php echo $api; ?>',
|
||||
API: '<?php echo $api; ?>/v1',
|
||||
PROJECT: '<?php echo $project; ?>',
|
||||
LOCALE: '<?php echo $this->escape(Locale::getText('settings.locale')); ?>',
|
||||
PREFIX: '<?php echo $this->escape($this->getParam('prefix')); ?>',
|
||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -823,9 +823,9 @@
|
|||
}
|
||||
},
|
||||
"appwrite": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.6.tgz",
|
||||
"integrity": "sha512-yJkm3K11tnlggeLLBSsq/TEXoC56BYdE9PDRGo/9OgXGa/+vnYx0d1H+KyIatOABohz/iqpKPSjxoX8mhATcJQ==",
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.7.tgz",
|
||||
"integrity": "sha512-sPzz2TTbWhvHQ8fqyX9E5HJ1ovU1G8EFmBs5apYpJlM8F/3ZzJ+RiyM/hF8l39wLprdzsExMcJ4sbjbLZsZjlw==",
|
||||
"dev": true
|
||||
},
|
||||
"archy": {
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
"license": "BSD-3-Clause",
|
||||
"repository": "public",
|
||||
"devDependencies": {
|
||||
"appwrite": "^1.0.7",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-clean-css": "^4.0.0",
|
||||
"gulp-concat": "2.5.2",
|
||||
"gulp-jsmin": "^0.1.5",
|
||||
"gulp-less": "^4.0.1",
|
||||
"jest": "^24.7.1",
|
||||
"appwrite": "^1.0.6"
|
||||
"jest": "^24.7.1"
|
||||
}
|
||||
}
|
||||
|
|
82
public/dist/scripts/app-all.js
vendored
82
public/dist/scripts/app-all.js
vendored
File diff suppressed because one or more lines are too long
74
public/dist/scripts/app-dep.js
vendored
74
public/dist/scripts/app-dep.js
vendored
|
@ -4,7 +4,7 @@
|
|||
{http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this;};let setLocale=function(value)
|
||||
{http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this;};let setMode=function(value)
|
||||
{http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this;};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
|
||||
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.6');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
|
||||
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.7');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
|
||||
if(typeof path!=='string'){throw new Error('var path must be of type string');}
|
||||
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
|
||||
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
|
||||
|
@ -61,7 +61,75 @@ if(documentId===undefined){throw new Error('Missing required parameter: "documen
|
|||
if(data===undefined){throw new Error('Missing required parameter: "data"');}
|
||||
let path='/database/{collectionId}/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.patch(path,{'content-type':'application/json'},{'data':data,'read':read,'write':write});},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"');}
|
||||
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"');}
|
||||
let path='/database/{collectionId}/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.delete(path,{'content-type':'application/json'},{});}};let locale={getLocale:function(){let path='/locale';return http.get(path,{'content-type':'application/json'},{});},getCountries:function(){let path='/locale/countries';return http.get(path,{'content-type':'application/json'},{});},getCountriesEU:function(){let path='/locale/countries/eu';return http.get(path,{'content-type':'application/json'},{});},getCountriesPhones:function(){let path='/locale/countries/phones';return http.get(path,{'content-type':'application/json'},{});}};let storage={listFiles:function(search='',limit=25,offset=0,orderType='ASC'){let path='/storage/files';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType});},createFile:function(files,read=[],write=[],folderId=''){if(files===undefined){throw new Error('Missing required parameter: "files"');}
|
||||
let path='/database/{collectionId}/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.delete(path,{'content-type':'application/json'},{});}};let locale={getLocale:function(){let path='/locale';return http.get(path,{'content-type':'application/json'},{});},getCountries:function(){let path='/locale/countries';return http.get(path,{'content-type':'application/json'},{});},getCountriesEU:function(){let path='/locale/countries/eu';return http.get(path,{'content-type':'application/json'},{});},getCountriesPhones:function(){let path='/locale/countries/phones';return http.get(path,{'content-type':'application/json'},{});}};let projects={listProjects:function(){let path='/projects';return http.get(path,{'content-type':'application/json'},{});},createProject:function(name,teamId,description='',logo='',url='',clients=[],legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(teamId===undefined){throw new Error('Missing required parameter: "teamId"');}
|
||||
let path='/projects';return http.post(path,{'content-type':'application/json'},{'name':name,'teamId':teamId,'description':description,'logo':logo,'url':url,'clients':clients,'legalName':legalName,'legalCountry':legalCountry,'legalState':legalState,'legalCity':legalCity,'legalAddress':legalAddress,'legalTaxId':legalTaxId});},getProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},updateProject:function(projectId,name,description='',logo='',url='',clients=[],legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.patch(path,{'content-type':'application/json'},{'name':name,'description':description,'logo':logo,'url':url,'clients':clients,'legalName':legalName,'legalCountry':legalCountry,'legalState':legalState,'legalCity':legalCity,'legalAddress':legalAddress,'legalTaxId':legalTaxId});},deleteProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.delete(path,{'content-type':'application/json'},{});},listKeys:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},createKey:function(projectId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(scopes===undefined){throw new Error('Missing required parameter: "scopes"');}
|
||||
let path='/projects/{projectId}/keys'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'scopes':scopes});},getKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"');}
|
||||
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.get(path,{'content-type':'application/json'},{});},updateKey:function(projectId,keyId,name,scopes){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(scopes===undefined){throw new Error('Missing required parameter: "scopes"');}
|
||||
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.put(path,{'content-type':'application/json'},{'name':name,'scopes':scopes});},deleteKey:function(projectId,keyId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(keyId===undefined){throw new Error('Missing required parameter: "keyId"');}
|
||||
let path='/projects/{projectId}/keys/{keyId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{keyId}','g'),keyId);return http.delete(path,{'content-type':'application/json'},{});},updateProjectOAuth:function(projectId,provider,appId='',secret=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
|
||||
let path='/projects/{projectId}/oauth'.replace(new RegExp('{projectId}','g'),projectId);return http.patch(path,{'content-type':'application/json'},{'provider':provider,'appId':appId,'secret':secret});},listPlatforms:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},createPlatform:function(projectId,type,name,key='',store='',domains=[]){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(type===undefined){throw new Error('Missing required parameter: "type"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'type':type,'name':name,'key':key,'store':store,'domains':domains});},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"');}
|
||||
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{});},updatePlatform:function(projectId,platformId,name,key='',store='',domains=[]){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.put(path,{'content-type':'application/json'},{'name':name,'key':key,'store':store,'domains':domains});},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"');}
|
||||
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.delete(path,{'content-type':'application/json'},{});},listTasks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},createTask:function(projectId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(status===undefined){throw new Error('Missing required parameter: "status"');}
|
||||
if(schedule===undefined){throw new Error('Missing required parameter: "schedule"');}
|
||||
if(security===undefined){throw new Error('Missing required parameter: "security"');}
|
||||
if(httpMethod===undefined){throw new Error('Missing required parameter: "httpMethod"');}
|
||||
if(httpUrl===undefined){throw new Error('Missing required parameter: "httpUrl"');}
|
||||
let path='/projects/{projectId}/tasks'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'status':status,'schedule':schedule,'security':security,'httpMethod':httpMethod,'httpUrl':httpUrl,'httpHeaders':httpHeaders,'httpUser':httpUser,'httpPass':httpPass});},getTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"');}
|
||||
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.get(path,{'content-type':'application/json'},{});},updateTask:function(projectId,taskId,name,status,schedule,security,httpMethod,httpUrl,httpHeaders=[],httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(status===undefined){throw new Error('Missing required parameter: "status"');}
|
||||
if(schedule===undefined){throw new Error('Missing required parameter: "schedule"');}
|
||||
if(security===undefined){throw new Error('Missing required parameter: "security"');}
|
||||
if(httpMethod===undefined){throw new Error('Missing required parameter: "httpMethod"');}
|
||||
if(httpUrl===undefined){throw new Error('Missing required parameter: "httpUrl"');}
|
||||
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.put(path,{'content-type':'application/json'},{'name':name,'status':status,'schedule':schedule,'security':security,'httpMethod':httpMethod,'httpUrl':httpUrl,'httpHeaders':httpHeaders,'httpUser':httpUser,'httpPass':httpPass});},deleteTask:function(projectId,taskId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(taskId===undefined){throw new Error('Missing required parameter: "taskId"');}
|
||||
let path='/projects/{projectId}/tasks/{taskId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{taskId}','g'),taskId);return http.delete(path,{'content-type':'application/json'},{});},getProjectUsage:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}/usage'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},listWebhooks:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},createWebhook:function(projectId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(events===undefined){throw new Error('Missing required parameter: "events"');}
|
||||
if(url===undefined){throw new Error('Missing required parameter: "url"');}
|
||||
if(security===undefined){throw new Error('Missing required parameter: "security"');}
|
||||
let path='/projects/{projectId}/webhooks'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'name':name,'events':events,'url':url,'security':security,'httpUser':httpUser,'httpPass':httpPass});},getWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"');}
|
||||
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.get(path,{'content-type':'application/json'},{});},updateWebhook:function(projectId,webhookId,name,events,url,security,httpUser='',httpPass=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"');}
|
||||
if(name===undefined){throw new Error('Missing required parameter: "name"');}
|
||||
if(events===undefined){throw new Error('Missing required parameter: "events"');}
|
||||
if(url===undefined){throw new Error('Missing required parameter: "url"');}
|
||||
if(security===undefined){throw new Error('Missing required parameter: "security"');}
|
||||
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.put(path,{'content-type':'application/json'},{'name':name,'events':events,'url':url,'security':security,'httpUser':httpUser,'httpPass':httpPass});},deleteWebhook:function(projectId,webhookId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
|
||||
if(webhookId===undefined){throw new Error('Missing required parameter: "webhookId"');}
|
||||
let path='/projects/{projectId}/webhooks/{webhookId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{webhookId}','g'),webhookId);return http.delete(path,{'content-type':'application/json'},{});}};let storage={listFiles:function(search='',limit=25,offset=0,orderType='ASC'){let path='/storage/files';return http.get(path,{'content-type':'application/json'},{'search':search,'limit':limit,'offset':offset,'orderType':orderType});},createFile:function(files,read=[],write=[],folderId=''){if(files===undefined){throw new Error('Missing required parameter: "files"');}
|
||||
let path='/storage/files';return http.post(path,{'content-type':'application/json'},{'files':files,'read':read,'write':write,'folderId':folderId});},getFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"');}
|
||||
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);return http.get(path,{'content-type':'application/json'},{});},deleteFile:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"');}
|
||||
let path='/storage/files/{fileId}'.replace(new RegExp('{fileId}','g'),fileId);return http.delete(path,{'content-type':'application/json'},{});},getFileDownload:function(fileId){if(fileId===undefined){throw new Error('Missing required parameter: "fileId"');}
|
||||
|
@ -97,7 +165,7 @@ let path='/users/{userId}/sessions'.replace(new RegExp('{userId}','g'),userId);r
|
|||
if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"');}
|
||||
let path='/users/{userId}/sessions/:session'.replace(new RegExp('{userId}','g'),userId);return http.delete(path,{'content-type':'application/json'},{'sessionId':sessionId});},updateUserStatus:function(userId,status){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
|
||||
if(status===undefined){throw new Error('Missing required parameter: "status"');}
|
||||
let path='/users/{userId}/status'.replace(new RegExp('{userId}','g'),userId);return http.patch(path,{'content-type':'application/json'},{'status':status});}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,storage:storage,teams:teams,users:users};};})(window);(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
|
||||
let path='/users/{userId}/status'.replace(new RegExp('{userId}','g'),userId);return http.patch(path,{'content-type':'application/json'},{'status':status});}};return{setEndpoint:setEndpoint,setProject:setProject,setKey:setKey,setLocale:setLocale,setMode:setMode,account:account,auth:auth,avatars:avatars,database:database,locale:locale,projects:projects,storage:storage,teams:teams,users:users};};})(window);(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart=f()}})(function(){var define,module,exports;return(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){var colorNames=require(5);module.exports={getRgba:getRgba,getHsla:getHsla,getRgb:getRgb,getHsl:getHsl,getHwb:getHwb,getAlpha:getAlpha,hexString:hexString,rgbString:rgbString,rgbaString:rgbaString,percentString:percentString,percentaString:percentaString,hslString:hslString,hslaString:hslaString,hwbString:hwbString,keyword:keyword}
|
||||
function getRgba(string){if(!string){return;}
|
||||
var abbr=/^#([a-fA-F0-9]{3})$/i,hex=/^#([a-fA-F0-9]{6})$/i,rgba=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,per=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,keyword=/(\w+)/;var rgb=[0,0,0],a=1,match=string.match(abbr);if(match){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match[i]+match[i],16);}}
|
||||
else if(match=string.match(hex)){match=match[1];for(var i=0;i<rgb.length;i++){rgb[i]=parseInt(match.slice(i*2,i*2+2),16);}}
|
||||
|
|
8
public/dist/scripts/app.js
vendored
8
public/dist/scripts/app.js
vendored
File diff suppressed because one or more lines are too long
|
@ -6,11 +6,9 @@
|
|||
|
||||
sdk
|
||||
.setEndpoint(APP_ENV.API)
|
||||
.setEndpoint(APP_ENV.API)
|
||||
.setProject(0)
|
||||
.setProject('console')
|
||||
.setLocale(APP_ENV.LOCALE)
|
||||
.setMode('admin')
|
||||
;
|
||||
;
|
||||
|
||||
return sdk;
|
||||
}, true);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
sdk
|
||||
.setEndpoint(APP_ENV.API)
|
||||
.setProject(router.params.project || null)
|
||||
.setProject(router.params.project || '')
|
||||
.setLocale(APP_ENV.LOCALE)
|
||||
.setMode('admin')
|
||||
;
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
}
|
||||
|
||||
let result = resolve(method);
|
||||
console.log(result);
|
||||
|
||||
if(!result) {
|
||||
return;
|
||||
|
@ -97,13 +98,13 @@
|
|||
if(loaderId !== null) { // Remove loader if needed
|
||||
alerts.remove(loaderId);
|
||||
}
|
||||
|
||||
|
||||
if(!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
container.set(service.replace('.', '-'), JSON.parse(data), true, true);
|
||||
container.set(service.replace('.', '-'), data, true, true);
|
||||
if (debug) console.log('%cservice ready: "' + service.replace('.', '-') + '"', 'color:green');
|
||||
if (debug) console.log('%cservice:', 'color:blue', container.get(service.replace('.', '-')));
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue