1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Updated SDKs

This commit is contained in:
eldadfux 2019-08-10 14:38:09 +03:00
parent 0b0d26115b
commit 4bc32d4a15
30 changed files with 104 additions and 122 deletions

View file

@ -3,6 +3,27 @@ FROM ubuntu:18.04
LABEL maintainer="team@appwrite.io"
ENV TZ=Asia/Tel_Aviv
ENV _APP_ENV production
ENV _APP_EDITION community
ENV _APP_OPENSSL_KEY_V1 empty
ENV _APP_REDIS_HOST redis
ENV _APP_REDIS_PORT 6379
ENV _APP_DB_HOST mariadb
ENV _APP_DB_PORT 3306
ENV _APP_DB_USER root
ENV _APP_DB_PASS password
ENV _APP_DB_SCHEMA appwrite
ENV _APP_INFLUXDB_HOST influxdb
ENV _APP_INFLUXDB_PORT 8086
ENV _APP_STATSD_HOST telegraf
ENV _APP_STATSD_PORT 8125
ENV _APP_SMTP_HOST smtp
ENV _APP_SMTP_PORT 25
ENV _APP_SMTP_SECURE ''
ENV _APP_SMTP_USERNAME ''
ENV _APP_SMTP_PASSWORD ''
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN \

View file

@ -49,6 +49,14 @@ $utopia->init(function() use ($utopia, $request, $response, $register, &$user, $
$referrer = $request->getServer('HTTP_REFERER', '');
$origin = $request->getServer('HTTP_ORIGIN', parse_url($referrer, PHP_URL_SCHEME) . '://' . parse_url($referrer, PHP_URL_HOST));
// //var_dump($project->getAttribute('clients', []), $project);
// print_r(array_map(function($node) {
// var_dump($node);
// if(isset($node['type']) && $node['type'] === 'web') {
// return $node['domains'];
// }
// }, $project->getAttribute('platforms', [])));
// exit();
$refDomain = (in_array($origin, array_merge($project->getAttribute('clients', []))))
? $origin : 'http://localhost';

View file

@ -1264,12 +1264,12 @@ return [
],
[
'$collection' => Database::SYSTEM_COLLECTION_RULES,
'label' => 'Domains',
'key' => 'domains',
'label' => 'url',
'key' => 'url',
'type' => 'text',
'default' => '',
'required' => false,
'array' => true,
'array' => false,
],
],
],

View file

@ -1086,9 +1086,9 @@ $utopia->post('/v1/projects/:projectId/platforms')
->param('name', null, function () {return new Text(256);}, 'Platform name')
->param('key', null, function () {return new Text(256);}, 'Package name for android or bundle ID for iOS', true)
->param('store', null, function () {return new Text(256);}, 'App store or Google Play store ID', true)
->param('domains', [], function () {return new ArrayList(new Domain());}, 'Project client domains names', true)
->param('url', '', function() {return new URL();}, 'Platform client URL', true)
->action(
function($projectId, $type, $name, $key, $store, $domains) use ($request, $response, $consoleDB)
function($projectId, $type, $name, $key, $store, $url) use ($response, $consoleDB)
{
$project = $consoleDB->getDocument($projectId);
@ -1106,7 +1106,7 @@ $utopia->post('/v1/projects/:projectId/platforms')
'name' => $name,
'key' => $key,
'store' => $store,
'domains' => $domains,
'url' => $url,
'created' => time(),
'updated' => time(),
]);
@ -1140,9 +1140,9 @@ $utopia->put('/v1/projects/:projectId/platforms/:platformId')
->param('name', null, function () {return new Text(256);}, 'Platform name')
->param('key', null, function () {return new Text(256);}, 'Package name for android or bundle ID for iOS', true)
->param('store', null, function () {return new Text(256);}, 'App store or Google Play store ID', true)
->param('domains', [], function () {return new ArrayList(new Domain());}, 'Project client domains names', true)
->param('url', [], function () {return new URL();}, 'Platform client URL', true)
->action(
function($projectId, $platformId, $name, $key, $store, $domains) use ($request, $response, $consoleDB)
function($projectId, $platformId, $name, $key, $store, $url) use ($response, $consoleDB)
{
$project = $consoleDB->getDocument($projectId);
@ -1161,7 +1161,7 @@ $utopia->put('/v1/projects/:projectId/platforms/:platformId')
->setAttribute('updated', time())
->setAttribute('key', $key)
->setAttribute('store', $store)
->setAttribute('domains', $domains)
->setAttribute('url', $url)
;
if(false === $consoleDB->updateDocument($platform->getArrayCopy())) {

View file

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

View file

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

View file

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

View file

@ -2,7 +2,7 @@
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "v1.0.9",
"version": "v1.0.10",
"license": "BSD-3-Clause",
"main": "src/sdk.js",
"repository": {

View file

@ -132,7 +132,7 @@
globalParams.push({key: key, value: value});
};
addGlobalHeader('x-sdk-version', 'appwrite:javascript:v1.0.9');
addGlobalHeader('x-sdk-version', 'appwrite:javascript:v1.0.10');
addGlobalHeader('content-type', '');
/**
@ -1716,10 +1716,10 @@
* @param {string} name
* @param {string} key
* @param {string} store
* @param {array} domains
* @param {string} url
* @throws {Error}
* @return {Promise} */
createPlatform: function(projectId, type, name, key = '', store = '', domains = []) {
createPlatform: function(projectId, type, name, key = '', store = '', url = '') {
if(projectId === undefined) {
throw new Error('Missing required parameter: "projectId"');
}
@ -1741,7 +1741,7 @@
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
});
},
@ -1779,10 +1779,10 @@
* @param {string} name
* @param {string} key
* @param {string} store
* @param {array} domains
* @param {string} url
* @throws {Error}
* @return {Promise} */
updatePlatform: function(projectId, platformId, name, key = '', store = '', domains = []) {
updatePlatform: function(projectId, platformId, name, key = '', store = '', url = '[]') {
if(projectId === undefined) {
throw new Error('Missing required parameter: "projectId"');
}
@ -1803,7 +1803,7 @@
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
});
},

View file

@ -1,5 +1,5 @@
(function(window){window.Appwrite=function(){let config={endpoint:'https://appwrite.test/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(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.9');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.10');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)}
@ -78,15 +78,15 @@ 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"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},createPlatform:function(projectId,type,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
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"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'type':type,'name':name,'key':key,'store':store,'url':url})},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
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"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{})},updatePlatform:function(projectId,platformId,name,key='',store='',url='[]'){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
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"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.put(path,{'content-type':'application/json'},{'name':name,'key':key,'store':store,'url':url})},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
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"')}

View file

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

View file

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

View file

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

View file

@ -7,7 +7,7 @@ class Client {
this.endpoint = 'https://appwrite.test/v1';
this.headers = {
'content-type': '',
'x-sdk-version': 'appwrite:nodejs:v1.0.18',
'x-sdk-version': 'appwrite:nodejs:v1.0.19',
};
this.selfSigned = false;
}

View file

@ -251,11 +251,11 @@ class Projects extends Service {
* @param string name
* @param string key
* @param string store
* @param array domains
* @param string url
* @throws Exception
* @return {}
*/
async createPlatform(projectId, type, name, key = '', store = '', domains = []) {
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'},
@ -264,7 +264,7 @@ class Projects extends Service {
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
});
}
@ -292,11 +292,11 @@ class Projects extends Service {
* @param string name
* @param string key
* @param string store
* @param array domains
* @param string url
* @throws Exception
* @return {}
*/
async updatePlatform(projectId, platformId, name, key = '', store = '', domains = []) {
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'},
@ -304,7 +304,7 @@ class Projects extends Service {
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
});
}

View file

@ -2,7 +2,7 @@
"name": "node-appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "v1.0.18",
"version": "v1.0.19",
"license": "BSD-3-Clause",
"main": "index.js",
"repository": {

View file

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

View file

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

View file

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

View file

@ -185,7 +185,7 @@ POST https://appwrite.test/v1/projects/{projectId}/platforms
| name | string | Platform name | |
| key | string | Package name for android or bundle ID for iOS | |
| store | string | App store or Google Play store ID | |
| domains | array | Project client domains names | [] |
| url | string | Platform client URL | |
## Get Platform
@ -215,7 +215,7 @@ PUT https://appwrite.test/v1/projects/{projectId}/platforms/{platformId}
| name | string | Platform name | |
| key | string | Package name for android or bundle ID for iOS | |
| store | string | App store or Google Play store ID | |
| domains | array | Project client domains names | [] |
| url | string | Platform client URL | [] |
## Delete Platform

View file

@ -37,7 +37,7 @@ class Client
*/
protected $headers = [
'content-type' => '',
'x-sdk-version' => 'appwrite:php:v1.0.1',
'x-sdk-version' => 'appwrite:php:v1.0.2',
];
/**

View file

@ -281,11 +281,11 @@ class Projects extends Service
* @param string $name
* @param string $key
* @param string $store
* @param array $domains
* @param string $url
* @throws Exception
* @return array
*/
public function createPlatform($projectId, $type, $name, $key = '', $store = '', $domains = [])
public function createPlatform($projectId, $type, $name, $key = '', $store = '', $url = '')
{
$path = str_replace(['{projectId}'], [$projectId], '/projects/{projectId}/platforms');
$params = [];
@ -294,7 +294,7 @@ class Projects extends Service
$params['name'] = $name;
$params['key'] = $key;
$params['store'] = $store;
$params['domains'] = $domains;
$params['url'] = $url;
return $this->client->call(Client::METHOD_POST, $path, [
], $params);
@ -326,11 +326,11 @@ class Projects extends Service
* @param string $name
* @param string $key
* @param string $store
* @param array $domains
* @param string $url
* @throws Exception
* @return array
*/
public function updatePlatform($projectId, $platformId, $name, $key = '', $store = '', $domains = [])
public function updatePlatform($projectId, $platformId, $name, $key = '', $store = '', $url = '[]')
{
$path = str_replace(['{projectId}', '{platformId}'], [$projectId, $platformId], '/projects/{projectId}/platforms/{platformId}');
$params = [];
@ -338,7 +338,7 @@ class Projects extends Service
$params['name'] = $name;
$params['key'] = $key;
$params['store'] = $store;
$params['domains'] = $domains;
$params['url'] = $url;
return $this->client->call(Client::METHOD_PUT, $path, [
], $params);

View file

@ -156,8 +156,7 @@ class Projects(Service):
return self.client.call('get', path, {
}, params)
def create_platform(self, project_id, type, name, key='', store='', domainsstring(4) ""[]""
=[]):
def create_platform(self, project_id, type, name, key='', store='', url=''):
"""Create Platform"""
params = {}
@ -167,7 +166,7 @@ class Projects(Service):
params['name'] = name
params['key'] = key
params['store'] = store
params['domains'] = domains
params['url'] = url
return self.client.call('post', path, {
}, params)
@ -183,8 +182,7 @@ class Projects(Service):
return self.client.call('get', path, {
}, params)
def update_platform(self, project_id, platform_id, name, key='', store='', domainsstring(4) ""[]""
=[]):
def update_platform(self, project_id, platform_id, name, key='', store='', url='[]'):
"""Update Platform"""
params = {}
@ -194,7 +192,7 @@ class Projects(Service):
params['name'] = name
params['key'] = key
params['store'] = store
params['domains'] = domains
params['url'] = url
return self.client.call('put', path, {
}, params)

View file

@ -164,7 +164,7 @@ module Appwrite
}, params);
end
def create_platform(project_id:, type:, name:, key: '', store: '', domains: [])
def create_platform(project_id:, type:, name:, key: '', store: '', url: '')
path = '/projects/{projectId}/platforms'
.gsub('{project_id}', project_id)
@ -173,7 +173,7 @@ module Appwrite
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
}
return @client.call('post', path, {
@ -192,7 +192,7 @@ module Appwrite
}, params);
end
def update_platform(project_id:, platform_id:, name:, key: '', store: '', domains: [])
def update_platform(project_id:, platform_id:, name:, key: '', store: '', url: '[]')
path = '/projects/{projectId}/platforms/{platformId}'
.gsub('{project_id}', project_id)
.gsub('{platform_id}', platform_id)
@ -201,7 +201,7 @@ module Appwrite
'name': name,
'key': key,
'store': store,
'domains': domains
'url': url
}
return @client.call('put', path, {

View file

@ -38,7 +38,7 @@ $cli
$clients = [
'php' => [
'version' => 'v1.0.1',
'version' => 'v1.0.2',
'result' => __DIR__ . '/../sdks/php/',
'gitURL' => 'https://github.com/appwrite/sdk-for-php.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-php.git',
@ -46,7 +46,7 @@ $cli
'gitUserName' => 'appwrite',
],
'js' => [
'version' => 'v1.0.9',
'version' => 'v1.0.10',
'result' => __DIR__ . '/../sdks/js/',
'gitURL' => 'https://github.com/appwrite/sdk-for-js.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-js.git',
@ -54,7 +54,7 @@ $cli
'gitUserName' => 'appwrite',
],
'node' => [
'version' => 'v1.0.18',
'version' => 'v1.0.19',
'result' => __DIR__ . '/../sdks/node/',
'gitURL' => 'https://github.com/appwrite/sdk-for-node.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-node.git',

View file

@ -114,7 +114,7 @@ $graph = $this->getParam('graph', false);
<span data-ls-bind="{{platform.name}}"></span>
</div>
<p class="note margin-bottom-no"><span data-ls-bind="{{platform.domains.0}}"></span></p>
<p class="note margin-bottom-no"><span data-ls-bind="{{platform.url}}"></span></p>
</li>
</ul>
</div>
@ -169,23 +169,9 @@ $graph = $this->getParam('graph', false);
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" />
<label for="domains">Domains <span class="tooltip large" data-tooltip="List the domains your website will use to interact with the <?php echo APP_NAME; ?> API in production or development environments."><i class="icon-question"></i></span></label>
<input name="domains" type="hidden" data-cast-to="array-empty">
<div data-forms-clone="" data-first="1">
<div>
<div data-forms-remove class="row thin">
<div class="col span-10">
<input name="domains" type="text" class="margin-bottom-small" autocomplete="off" placeholder="example.com" data-cast-to="array" pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" title="Please enter a valid domain name" required>
</div>
<div class="col span-2">
<button type="button" data-remove class="reverse round danger pull-end"><i class="icon-cancel"></i></button>
</div>
</div>
</div>
</div>
<label for="url">URL <span class="tooltip large" data-tooltip="The URL that your website will use to interact with the <?php echo APP_NAME; ?> APIs in production or development environments."><i class="icon-question"></i></span></label>
<input name="url" type="url" class="margin-bottom" autocomplete="off" placeholder="https://localhost:3000" required>
<div class="info margin-top-small margin-bottom-small">
<div class="text-bold margin-bottom-small">Next Steps</div>
@ -220,36 +206,9 @@ $graph = $this->getParam('graph', false);
<label for="name">Name <span class="tooltip large" data-tooltip="Choose any name that will help you distinguish between your different apps."><i class="icon-question"></i></span></label>
<input type="text" class="full-width" id="name" name="name" required autocomplete="off" data-ls-bind="{{platform.name}}" />
<label for="domains">Domains <span class="tooltip large" data-tooltip="List the domains your website will use to interact with the <?php echo APP_NAME; ?> API in production or development environments."><i class="icon-question"></i></span></label>
<input name="domains" type="hidden" data-cast-to="array-empty">
<div data-ls-loop="platform.domains" data-ls-as="domain" style="overflow: hidden">
<div>
<div data-forms-remove class="row thin">
<div class="col span-10">
<input name="domains" type="text" class="margin-bottom-small" autocomplete="off" placeholder="example.com" data-ls-bind="{{domain}}" data-cast-to="array" pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" title="Please enter a valid domain name" required>
</div>
<div class="col span-2">
<button type="button" data-remove class="reverse round danger pull-end"><i class="icon-cancel"></i></button>
</div>
</div>
</div>
</div>
<div data-forms-clone="" data-first="0">
<div>
<div data-forms-remove class="row thin">
<div class="col span-10">
<input name="domains" type="text" class="margin-bottom-small" autocomplete="off" placeholder="example.com" data-cast-to="array" pattern="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" title="Please enter a valid domain name" required>
</div>
<div class="col span-2">
<button type="button" data-remove class="reverse round danger pull-end"><i class="icon-cancel"></i></button>
</div>
</div>
</div>
</div>
<label for="url">URL <span class="tooltip large" data-tooltip="The URL that your website will use to interact with the <?php echo APP_NAME; ?> APIs in production or development environments."><i class="icon-question"></i></span></label>
<input name="url" type="url" class="margin-bottom" autocomplete="off" placeholder="example.com" data-ls-bind="{{platform.url}}" required>
<div class="margin-top">
<button type="submit">Update</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</div>

View file

@ -25,10 +25,6 @@ services:
- _APP_INFLUXDB_PORT=8086
- _APP_STATSD_HOST=telegraf
- _APP_STATSD_PORT=8125
- _APP_NEWRELIC_KEY=
- _APP_MAILGUN_KEY=
- _APP_MAILGUN_DOMAIN=
- _APP_SENTRY_DSN=
mariadb:
image: appwrite/mariadb:1.0.0 # fix issues when upgrading using: mysql_upgrade -u root -p

6
package-lock.json generated
View file

@ -823,9 +823,9 @@
}
},
"appwrite": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.9.tgz",
"integrity": "sha512-Gr5BEEo9fWdrhiCQSU250yj+GN/Pzxa2YEMR+Lrvm6ROaMGLp6pQf64ggQTM/oa26FZTpGhRjZJNpH2Skr1Wzw==",
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.10.tgz",
"integrity": "sha512-tY+aq/4Xq4Eu5Rx9+fZMm2NSevp1gs1zwfAL5DWU0QlcB0Nx1R9MLIytnbpHMR2ywnUvP06M2La6fTahOhqwwA==",
"dev": true
},
"archy": {

View file

@ -4,7 +4,7 @@
"license": "BSD-3-Clause",
"repository": "public",
"devDependencies": {
"appwrite": "^1.0.9",
"appwrite": "^1.0.10",
"gulp": "^4.0.0",
"gulp-clean-css": "^4.0.0",
"gulp-concat": "2.5.2",

View file

@ -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=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(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.9');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.10');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);}
@ -83,15 +83,15 @@ 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"');}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{});},createPlatform:function(projectId,type,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
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"');}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'type':type,'name':name,'key':key,'store':store,'url':url});},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
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"');}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{});},updatePlatform:function(projectId,platformId,name,key='',store='',url='[]'){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
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"');}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.put(path,{'content-type':'application/json'},{'name':name,'key':key,'store':store,'url':url});},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
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"');}