Updated SDKs
This commit is contained in:
parent
8618f4d764
commit
60c5487c06
|
@ -25,8 +25,8 @@ use Appwrite\Utopia\Response;
|
|||
use DeviceDetector\DeviceDetector;
|
||||
use Utopia\Validator\ArrayList;
|
||||
|
||||
$oauthDefaultSuccess = '/auth/oauth2/success';
|
||||
$oauthDefaultFailure = '/auth/oauth2/failure';
|
||||
$oauthDefaultSuccess = App::getEnv('_APP_HOME').'/auth/oauth2/success';
|
||||
$oauthDefaultFailure = App::getEnv('_APP_HOME').'/auth/oauth2/failure';
|
||||
|
||||
$oauth2Keys = [];
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ App::get('/v1/mock/tests/foo')
|
|||
->label('sdk.namespace', 'foo')
|
||||
->label('sdk.method', 'get')
|
||||
->label('sdk.description', 'Mock a get request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -28,6 +29,7 @@ App::post('/v1/mock/tests/foo')
|
|||
->label('sdk.namespace', 'foo')
|
||||
->label('sdk.method', 'post')
|
||||
->label('sdk.description', 'Mock a post request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -40,6 +42,7 @@ App::patch('/v1/mock/tests/foo')
|
|||
->label('sdk.namespace', 'foo')
|
||||
->label('sdk.method', 'patch')
|
||||
->label('sdk.description', 'Mock a get request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -52,6 +55,7 @@ App::put('/v1/mock/tests/foo')
|
|||
->label('sdk.namespace', 'foo')
|
||||
->label('sdk.method', 'put')
|
||||
->label('sdk.description', 'Mock a put request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -64,6 +68,7 @@ App::delete('/v1/mock/tests/foo')
|
|||
->label('sdk.namespace', 'foo')
|
||||
->label('sdk.method', 'delete')
|
||||
->label('sdk.description', 'Mock a delete request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -76,6 +81,7 @@ App::get('/v1/mock/tests/bar')
|
|||
->label('sdk.namespace', 'bar')
|
||||
->label('sdk.method', 'get')
|
||||
->label('sdk.description', 'Mock a get request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -88,6 +94,7 @@ App::post('/v1/mock/tests/bar')
|
|||
->label('sdk.namespace', 'bar')
|
||||
->label('sdk.method', 'post')
|
||||
->label('sdk.description', 'Mock a post request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -100,6 +107,7 @@ App::patch('/v1/mock/tests/bar')
|
|||
->label('sdk.namespace', 'bar')
|
||||
->label('sdk.method', 'patch')
|
||||
->label('sdk.description', 'Mock a get request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -112,6 +120,7 @@ App::put('/v1/mock/tests/bar')
|
|||
->label('sdk.namespace', 'bar')
|
||||
->label('sdk.method', 'put')
|
||||
->label('sdk.description', 'Mock a put request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -124,6 +133,7 @@ App::delete('/v1/mock/tests/bar')
|
|||
->label('sdk.namespace', 'bar')
|
||||
->label('sdk.method', 'delete')
|
||||
->label('sdk.description', 'Mock a delete request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -137,6 +147,7 @@ App::post('/v1/mock/tests/general/upload')
|
|||
->label('sdk.method', 'upload')
|
||||
->label('sdk.description', 'Mock a delete request for SDK tests')
|
||||
->label('sdk.consumes', 'multipart/form-data')
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', function () { return new Text(100); }, 'Sample string param')
|
||||
->param('y', '', function () { return new Numeric(); }, 'Sample numeric param')
|
||||
->param('z', null, function () { return new ArrayList(new Text(256)); }, 'Sample array param')
|
||||
|
@ -174,6 +185,7 @@ App::get('/v1/mock/tests/general/redirect')
|
|||
->label('sdk.namespace', 'general')
|
||||
->label('sdk.method', 'redirect')
|
||||
->label('sdk.description', 'Mock a redirect request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->action(function ($response) {
|
||||
/** @var Utopia\Response $response */
|
||||
|
||||
|
@ -186,6 +198,7 @@ App::get('/v1/mock/tests/general/redirected')
|
|||
->label('sdk.namespace', 'general')
|
||||
->label('sdk.method', 'redirected')
|
||||
->label('sdk.description', 'Mock a redirected request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->action(function () {
|
||||
});
|
||||
|
||||
|
@ -195,6 +208,7 @@ App::get('/v1/mock/tests/general/set-cookie')
|
|||
->label('sdk.namespace', 'general')
|
||||
->label('sdk.method', 'setCookie')
|
||||
->label('sdk.description', 'Mock a set cookie request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->action(function ($response) {
|
||||
/** @var Utopia\Response $response */
|
||||
|
||||
|
@ -207,6 +221,7 @@ App::get('/v1/mock/tests/general/get-cookie')
|
|||
->label('sdk.namespace', 'general')
|
||||
->label('sdk.method', 'getCookie')
|
||||
->label('sdk.description', 'Mock a get cookie request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->action(function ($request) {
|
||||
/** @var Utopia\Request $request */
|
||||
|
||||
|
@ -221,6 +236,7 @@ App::get('/v1/mock/tests/general/empty')
|
|||
->label('sdk.namespace', 'general')
|
||||
->label('sdk.method', 'empty')
|
||||
->label('sdk.description', 'Mock a redirected request for SDK tests')
|
||||
->label('sdk.mock', true)
|
||||
->action(function ($response) {
|
||||
/** @var Utopia\Response $response */
|
||||
|
||||
|
@ -232,6 +248,7 @@ App::get('/v1/mock/tests/general/oauth2')
|
|||
->desc('Mock an OAuth2 login route')
|
||||
->label('scope', 'public')
|
||||
->label('docs', false)
|
||||
->label('sdk.mock', true)
|
||||
->param('client_id', '', function () { return new Text(100); }, 'OAuth2 Client ID.')
|
||||
->param('redirect_uri', '', function () { return new Host(['localhost']); }, 'OAuth2 Redirect URI.') // Important to deny an open redirect attack
|
||||
->param('scope', '', function () { return new Text(100); }, 'OAuth2 scope list.')
|
||||
|
@ -246,6 +263,7 @@ App::get('/v1/mock/tests/general/oauth2/token')
|
|||
->desc('Mock an OAuth2 login route')
|
||||
->label('scope', 'public')
|
||||
->label('docs', false)
|
||||
->label('sdk.mock', true)
|
||||
->param('client_id', '', function () { return new Text(100); }, 'OAuth2 Client ID.')
|
||||
->param('redirect_uri', '', function () { return new Host(['localhost']); }, 'OAuth2 Redirect URI.')
|
||||
->param('client_secret', '', function () { return new Text(100); }, 'OAuth2 scope list.')
|
||||
|
|
|
@ -363,6 +363,10 @@ App::get('/open-api-2.json')
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($route->getLabel('sdk.mock', false)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($route->getLabel('sdk.namespace', null))) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -7,4 +7,4 @@ sdk
|
|||
|
||||
let result = sdk.avatars.getInitials();
|
||||
|
||||
console.log(result); // Resource URL
|
||||
console.log(result); // Resource URL
|
|
@ -787,16 +787,17 @@
|
|||
* Use this endpoint to send a verification message to your user email address
|
||||
* to confirm they are the valid owners of that address. Both the **userId**
|
||||
* and **secret** arguments will be passed as query parameters to the URL you
|
||||
* have provider to be attached to the verification email. The provided URL
|
||||
* should redirect the user back for your app and allow you to complete the
|
||||
* have provided to be attached to the verification email. The provided URL
|
||||
* should redirect the user back to your app and allow you to complete the
|
||||
* verification process by verifying both the **userId** and **secret**
|
||||
* parameters. Learn more about how to [complete the verification
|
||||
* process](/docs/client/account#updateAccountVerification).
|
||||
*
|
||||
* Please note that in order to avoid a [Redirect
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
||||
* the only valid redirect URLs are the ones from domains you have set when
|
||||
* adding your platforms in the console interface.
|
||||
*
|
||||
*
|
||||
* @param {string} url
|
||||
* @throws {Error}
|
||||
|
@ -1208,60 +1209,6 @@
|
|||
return config.endpoint + path + ((query) ? '?' + query : '');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get User Initials
|
||||
*
|
||||
* Use this endpoint to show your user initials avatar icon on your website or
|
||||
* app. By default, this route will try to print your logged-in user name or
|
||||
* email initials. You can also overwrite the user name if you pass the 'name'
|
||||
* parameter. If no name is given and no user is logged, an empty avatar will
|
||||
* be returned.
|
||||
*
|
||||
* You can use the color and background params to change the avatar colors. By
|
||||
* default, a random theme will be selected. The random theme will persist for
|
||||
* the user's initials when reloading the same theme will always return for
|
||||
* the same initials.
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @param {string} color
|
||||
* @param {string} background
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getInitials: function(name = '', width = 500, height = 500, color = '', background = '') {
|
||||
let path = '/avatars/initials';
|
||||
|
||||
let payload = {};
|
||||
|
||||
if(name) {
|
||||
payload['name'] = name;
|
||||
}
|
||||
|
||||
if(width) {
|
||||
payload['width'] = width;
|
||||
}
|
||||
|
||||
if(height) {
|
||||
payload['height'] = height;
|
||||
}
|
||||
|
||||
if(color) {
|
||||
payload['color'] = color;
|
||||
}
|
||||
|
||||
if(background) {
|
||||
payload['background'] = background;
|
||||
}
|
||||
|
||||
payload['project'] = config.project;
|
||||
|
||||
let query = Object.keys(payload).map(key => key + '=' + encodeURIComponent(payload[key])).join('&');
|
||||
|
||||
return config.endpoint + path + ((query) ? '?' + query : '');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get QR Code
|
||||
*
|
||||
|
@ -1271,11 +1218,11 @@
|
|||
* @param {string} text
|
||||
* @param {number} size
|
||||
* @param {number} margin
|
||||
* @param {number} download
|
||||
* @param {boolean} download
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getQR: function(text, size = 400, margin = 1, download = 0) {
|
||||
getQR: function(text, size = 400, margin = 1, download = false) {
|
||||
if(text === undefined) {
|
||||
throw new Error('Missing required parameter: "text"');
|
||||
}
|
||||
|
@ -1335,18 +1282,16 @@
|
|||
*
|
||||
* @param {string} collectionId
|
||||
* @param {string[]} filters
|
||||
* @param {number} offset
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderField
|
||||
* @param {string} orderType
|
||||
* @param {string} orderCast
|
||||
* @param {string} search
|
||||
* @param {number} first
|
||||
* @param {number} last
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
listDocuments: function(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) {
|
||||
listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') {
|
||||
if(collectionId === undefined) {
|
||||
throw new Error('Missing required parameter: "collectionId"');
|
||||
}
|
||||
|
@ -1359,14 +1304,14 @@
|
|||
payload['filters'] = filters;
|
||||
}
|
||||
|
||||
if(offset) {
|
||||
payload['offset'] = offset;
|
||||
}
|
||||
|
||||
if(limit) {
|
||||
payload['limit'] = limit;
|
||||
}
|
||||
|
||||
if(offset) {
|
||||
payload['offset'] = offset;
|
||||
}
|
||||
|
||||
if(orderField) {
|
||||
payload['orderField'] = orderField;
|
||||
}
|
||||
|
@ -1383,14 +1328,6 @@
|
|||
payload['search'] = search;
|
||||
}
|
||||
|
||||
if(first) {
|
||||
payload['first'] = first;
|
||||
}
|
||||
|
||||
if(last) {
|
||||
payload['last'] = last;
|
||||
}
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
|
|
12
app/sdks/client-web/src/sdk.min.js
vendored
12
app/sdks/client-web/src/sdk.min.js
vendored
|
@ -79,27 +79,27 @@ query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getIma
|
|||
let path='/avatars/image';let payload={};if(url){payload.url=url}
|
||||
if(width){payload.width=width}
|
||||
if(height){payload.height=height}
|
||||
payload.project=config.project;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');return config.endpoint+path+((query)?'?'+query:'')},getInitials:function(name='',width=500,height=500,color='',background=''){let path='/avatars/initials';let payload={};if(name){payload.name=name}
|
||||
payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index<payload[p].length;index++){let param=payload[p][index];query.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{query.push(encodeURIComponent(p)+"="+encodeURIComponent(payload[p]))}}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getInitials:function(name='',width=500,height=500,color='',background=''){let path='/avatars/initials';let payload={};if(name){payload.name=name}
|
||||
if(width){payload.width=width}
|
||||
if(height){payload.height=height}
|
||||
if(color){payload.color=color}
|
||||
if(background){payload.background=background}
|
||||
payload.project=config.project;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');return config.endpoint+path+((query)?'?'+query:'')},getQR:function(text,size=400,margin=1,download=0){if(text===undefined){throw new Error('Missing required parameter: "text"')}
|
||||
payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index<payload[p].length;index++){let param=payload[p][index];query.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{query.push(encodeURIComponent(p)+"="+encodeURIComponent(payload[p]))}}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getQR:function(text,size=400,margin=1,download=!1){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}
|
||||
payload.project=config.project;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index<payload[p].length;index++){let param=payload[p][index];query.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{query.push(encodeURIComponent(p)+"="+encodeURIComponent(payload[p]))}}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')}};let database={listDocuments:function(collectionId,filters=[],offset=0,limit=50,orderField='$id',orderType='ASC',orderCast='string',search='',first=0,last=0){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')}};let database={listDocuments:function(collectionId,filters=[],limit=25,offset=0,orderField='$id',orderType='ASC',orderCast='string',search=''){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
let path='/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};if(filters){payload.filters=filters}
|
||||
if(offset){payload.offset=offset}
|
||||
if(limit){payload.limit=limit}
|
||||
if(offset){payload.offset=offset}
|
||||
if(orderField){payload.orderField=orderField}
|
||||
if(orderType){payload.orderType=orderType}
|
||||
if(orderCast){payload.orderCast=orderCast}
|
||||
if(search){payload.search=search}
|
||||
if(first){payload.first=first}
|
||||
if(last){payload.last=last}
|
||||
return http.get(path,{'content-type':'application/json',},payload)},createDocument:function(collectionId,data,read,write,parentDocument='',parentProperty='',parentPropertyType='assign'){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
if(data===undefined){throw new Error('Missing required parameter: "data"')}
|
||||
if(read===undefined){throw new Error('Missing required parameter: "read"')}
|
||||
|
|
17
app/sdks/client-web/types/index.d.ts
vendored
17
app/sdks/client-web/types/index.d.ts
vendored
|
@ -273,16 +273,17 @@ declare namespace Appwrite {
|
|||
* Use this endpoint to send a verification message to your user email address
|
||||
* to confirm they are the valid owners of that address. Both the **userId**
|
||||
* and **secret** arguments will be passed as query parameters to the URL you
|
||||
* have provider to be attached to the verification email. The provided URL
|
||||
* should redirect the user back for your app and allow you to complete the
|
||||
* have provided to be attached to the verification email. The provided URL
|
||||
* should redirect the user back to your app and allow you to complete the
|
||||
* verification process by verifying both the **userId** and **secret**
|
||||
* parameters. Learn more about how to [complete the verification
|
||||
* process](/docs/client/account#updateAccountVerification).
|
||||
*
|
||||
* Please note that in order to avoid a [Redirect
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
||||
* the only valid redirect URLs are the ones from domains you have set when
|
||||
* adding your platforms in the console interface.
|
||||
*
|
||||
*
|
||||
* @param {string} url
|
||||
* @throws {Error}
|
||||
|
@ -420,11 +421,11 @@ declare namespace Appwrite {
|
|||
* @param {string} text
|
||||
* @param {number} size
|
||||
* @param {number} margin
|
||||
* @param {number} download
|
||||
* @param {boolean} download
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getQR(text: string, size: number, margin: number, download: number): string;
|
||||
getQR(text: string, size: number, margin: number, download: boolean): string;
|
||||
|
||||
}
|
||||
|
||||
|
@ -440,18 +441,16 @@ declare namespace Appwrite {
|
|||
*
|
||||
* @param {string} collectionId
|
||||
* @param {string[]} filters
|
||||
* @param {number} offset
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderField
|
||||
* @param {string} orderType
|
||||
* @param {string} orderCast
|
||||
* @param {string} search
|
||||
* @param {number} first
|
||||
* @param {number} last
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
listDocuments(collectionId: string, filters: string[], offset: number, limit: number, orderField: string, orderType: string, orderCast: string, search: string, first: number, last: number): Promise<object>;
|
||||
listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Create Document
|
||||
|
|
|
@ -8,4 +8,4 @@ sdk
|
|||
|
||||
let result = sdk.avatars.getInitials();
|
||||
|
||||
console.log(result); // Resource URL
|
||||
console.log(result); // Resource URL
|
15
app/sdks/console-web/docs/examples/bar/delete.md
Normal file
15
app/sdks/console-web/docs/examples/bar/delete.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.bar.delete('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/bar/get.md
Normal file
15
app/sdks/console-web/docs/examples/bar/get.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.bar.get('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/bar/patch.md
Normal file
15
app/sdks/console-web/docs/examples/bar/patch.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.bar.patch('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/bar/post.md
Normal file
15
app/sdks/console-web/docs/examples/bar/post.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.bar.post('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/bar/put.md
Normal file
15
app/sdks/console-web/docs/examples/bar/put.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.bar.put('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/foo/delete.md
Normal file
15
app/sdks/console-web/docs/examples/foo/delete.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.foo.delete('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/foo/get.md
Normal file
15
app/sdks/console-web/docs/examples/foo/get.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.foo.get('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/foo/patch.md
Normal file
15
app/sdks/console-web/docs/examples/foo/patch.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.foo.patch('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/foo/post.md
Normal file
15
app/sdks/console-web/docs/examples/foo/post.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.foo.post('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/foo/put.md
Normal file
15
app/sdks/console-web/docs/examples/foo/put.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.foo.put('[]', null, []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.functions.createTag('[FUNCTION_ID]', 'node-14', '[COMMAND]', '[CODE]');
|
||||
let promise = sdk.functions.createTag('[FUNCTION_ID]', '[COMMAND]', '[CODE]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.functions.create('[NAME]');
|
||||
let promise = sdk.functions.create('[NAME]', 'node-14');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
15
app/sdks/console-web/docs/examples/general/empty.md
Normal file
15
app/sdks/console-web/docs/examples/general/empty.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.empty();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/general/get-cookie.md
Normal file
15
app/sdks/console-web/docs/examples/general/get-cookie.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.getCookie();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/general/redirect.md
Normal file
15
app/sdks/console-web/docs/examples/general/redirect.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.redirect();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/general/redirected.md
Normal file
15
app/sdks/console-web/docs/examples/general/redirected.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.redirected();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/general/set-cookie.md
Normal file
15
app/sdks/console-web/docs/examples/general/set-cookie.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.setCookie();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
15
app/sdks/console-web/docs/examples/general/upload.md
Normal file
15
app/sdks/console-web/docs/examples/general/upload.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.general.upload('[]', null, [], document.getElementById('uploader').files[0]);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
|
||||
let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
|
||||
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], 'https://example.com', false);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
|
||||
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', false, 'GET', 'https://example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
|
@ -6,7 +6,7 @@ sdk
|
|||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 0);
|
||||
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], 'https://example.com', false);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
|
|
@ -825,16 +825,17 @@
|
|||
* Use this endpoint to send a verification message to your user email address
|
||||
* to confirm they are the valid owners of that address. Both the **userId**
|
||||
* and **secret** arguments will be passed as query parameters to the URL you
|
||||
* have provider to be attached to the verification email. The provided URL
|
||||
* should redirect the user back for your app and allow you to complete the
|
||||
* have provided to be attached to the verification email. The provided URL
|
||||
* should redirect the user back to your app and allow you to complete the
|
||||
* verification process by verifying both the **userId** and **secret**
|
||||
* parameters. Learn more about how to [complete the verification
|
||||
* process](/docs/client/account#updateAccountVerification).
|
||||
*
|
||||
* Please note that in order to avoid a [Redirect
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
||||
* the only valid redirect URLs are the ones from domains you have set when
|
||||
* adding your platforms in the console interface.
|
||||
*
|
||||
*
|
||||
* @param {string} url
|
||||
* @throws {Error}
|
||||
|
@ -1258,62 +1259,6 @@
|
|||
return config.endpoint + path + ((query) ? '?' + query : '');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get User Initials
|
||||
*
|
||||
* Use this endpoint to show your user initials avatar icon on your website or
|
||||
* app. By default, this route will try to print your logged-in user name or
|
||||
* email initials. You can also overwrite the user name if you pass the 'name'
|
||||
* parameter. If no name is given and no user is logged, an empty avatar will
|
||||
* be returned.
|
||||
*
|
||||
* You can use the color and background params to change the avatar colors. By
|
||||
* default, a random theme will be selected. The random theme will persist for
|
||||
* the user's initials when reloading the same theme will always return for
|
||||
* the same initials.
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @param {string} color
|
||||
* @param {string} background
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getInitials: function(name = '', width = 500, height = 500, color = '', background = '') {
|
||||
let path = '/avatars/initials';
|
||||
|
||||
let payload = {};
|
||||
|
||||
if(name) {
|
||||
payload['name'] = name;
|
||||
}
|
||||
|
||||
if(width) {
|
||||
payload['width'] = width;
|
||||
}
|
||||
|
||||
if(height) {
|
||||
payload['height'] = height;
|
||||
}
|
||||
|
||||
if(color) {
|
||||
payload['color'] = color;
|
||||
}
|
||||
|
||||
if(background) {
|
||||
payload['background'] = background;
|
||||
}
|
||||
|
||||
payload['project'] = config.project;
|
||||
|
||||
payload['key'] = config.key;
|
||||
|
||||
let query = Object.keys(payload).map(key => key + '=' + encodeURIComponent(payload[key])).join('&');
|
||||
|
||||
return config.endpoint + path + ((query) ? '?' + query : '');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get QR Code
|
||||
*
|
||||
|
@ -1323,11 +1268,11 @@
|
|||
* @param {string} text
|
||||
* @param {number} size
|
||||
* @param {number} margin
|
||||
* @param {number} download
|
||||
* @param {boolean} download
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getQR: function(text, size = 400, margin = 1, download = 0) {
|
||||
getQR: function(text, size = 400, margin = 1, download = false) {
|
||||
if(text === undefined) {
|
||||
throw new Error('Missing required parameter: "text"');
|
||||
}
|
||||
|
@ -1592,18 +1537,16 @@
|
|||
*
|
||||
* @param {string} collectionId
|
||||
* @param {string[]} filters
|
||||
* @param {number} offset
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderField
|
||||
* @param {string} orderType
|
||||
* @param {string} orderCast
|
||||
* @param {string} search
|
||||
* @param {number} first
|
||||
* @param {number} last
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
listDocuments: function(collectionId, filters = [], offset = 0, limit = 50, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '', first = 0, last = 0) {
|
||||
listDocuments: function(collectionId, filters = [], limit = 25, offset = 0, orderField = '$id', orderType = 'ASC', orderCast = 'string', search = '') {
|
||||
if(collectionId === undefined) {
|
||||
throw new Error('Missing required parameter: "collectionId"');
|
||||
}
|
||||
|
@ -1616,14 +1559,14 @@
|
|||
payload['filters'] = filters;
|
||||
}
|
||||
|
||||
if(offset) {
|
||||
payload['offset'] = offset;
|
||||
}
|
||||
|
||||
if(limit) {
|
||||
payload['limit'] = limit;
|
||||
}
|
||||
|
||||
if(offset) {
|
||||
payload['offset'] = offset;
|
||||
}
|
||||
|
||||
if(orderField) {
|
||||
payload['orderField'] = orderField;
|
||||
}
|
||||
|
@ -1640,14 +1583,6 @@
|
|||
payload['search'] = search;
|
||||
}
|
||||
|
||||
if(first) {
|
||||
payload['first'] = first;
|
||||
}
|
||||
|
||||
if(last) {
|
||||
payload['last'] = last;
|
||||
}
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
|
@ -1837,29 +1772,6 @@
|
|||
.delete(path, {
|
||||
'content-type': 'application/json',
|
||||
}, payload);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get Collection Logs
|
||||
*
|
||||
*
|
||||
* @param {string} collectionId
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getCollectionLogs: function(collectionId) {
|
||||
if(collectionId === undefined) {
|
||||
throw new Error('Missing required parameter: "collectionId"');
|
||||
}
|
||||
|
||||
let path = '/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}', 'g'), collectionId);
|
||||
|
||||
let payload = {};
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
}, payload);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1908,6 +1820,7 @@
|
|||
*
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} env
|
||||
* @param {object} vars
|
||||
* @param {string[]} events
|
||||
* @param {string} schedule
|
||||
|
@ -1915,11 +1828,15 @@
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
create: function(name, vars = [], events = [], schedule = '', timeout = 15) {
|
||||
create: function(name, env, vars = [], events = [], schedule = '', timeout = 15) {
|
||||
if(name === undefined) {
|
||||
throw new Error('Missing required parameter: "name"');
|
||||
}
|
||||
|
||||
if(env === undefined) {
|
||||
throw new Error('Missing required parameter: "env"');
|
||||
}
|
||||
|
||||
let path = '/functions';
|
||||
|
||||
let payload = {};
|
||||
|
@ -1928,6 +1845,10 @@
|
|||
payload['name'] = name;
|
||||
}
|
||||
|
||||
if(env) {
|
||||
payload['env'] = env;
|
||||
}
|
||||
|
||||
if(vars) {
|
||||
payload['vars'] = vars;
|
||||
}
|
||||
|
@ -2227,21 +2148,16 @@
|
|||
*
|
||||
*
|
||||
* @param {string} functionId
|
||||
* @param {string} env
|
||||
* @param {string} command
|
||||
* @param {string} code
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createTag: function(functionId, env, command, code) {
|
||||
createTag: function(functionId, command, code) {
|
||||
if(functionId === undefined) {
|
||||
throw new Error('Missing required parameter: "functionId"');
|
||||
}
|
||||
|
||||
if(env === undefined) {
|
||||
throw new Error('Missing required parameter: "env"');
|
||||
}
|
||||
|
||||
if(command === undefined) {
|
||||
throw new Error('Missing required parameter: "command"');
|
||||
}
|
||||
|
@ -2254,10 +2170,6 @@
|
|||
|
||||
let payload = {};
|
||||
|
||||
if(env) {
|
||||
payload['env'] = env;
|
||||
}
|
||||
|
||||
if(command) {
|
||||
payload['command'] = command;
|
||||
}
|
||||
|
@ -2726,14 +2638,34 @@
|
|||
* List Projects
|
||||
*
|
||||
*
|
||||
* @param {string} search
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderType
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
list: function() {
|
||||
list: function(search = '', limit = 25, offset = 0, orderType = 'ASC') {
|
||||
let path = '/projects';
|
||||
|
||||
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',
|
||||
|
@ -3518,7 +3450,7 @@
|
|||
* @param {string} name
|
||||
* @param {string} status
|
||||
* @param {string} schedule
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpMethod
|
||||
* @param {string} httpUrl
|
||||
* @param {string[]} httpHeaders
|
||||
|
@ -3639,7 +3571,7 @@
|
|||
* @param {string} name
|
||||
* @param {string} status
|
||||
* @param {string} schedule
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpMethod
|
||||
* @param {string} httpUrl
|
||||
* @param {string[]} httpHeaders
|
||||
|
@ -3814,7 +3746,7 @@
|
|||
* @param {string} name
|
||||
* @param {string[]} events
|
||||
* @param {string} url
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpUser
|
||||
* @param {string} httpPass
|
||||
* @throws {Error}
|
||||
|
@ -3912,7 +3844,7 @@
|
|||
* @param {string} name
|
||||
* @param {string[]} events
|
||||
* @param {string} url
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpUser
|
||||
* @param {string} httpPass
|
||||
* @throws {Error}
|
||||
|
|
31
app/sdks/console-web/src/sdk.min.js
vendored
31
app/sdks/console-web/src/sdk.min.js
vendored
|
@ -79,12 +79,14 @@ query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getIma
|
|||
let path='/avatars/image';let payload={};if(url){payload.url=url}
|
||||
if(width){payload.width=width}
|
||||
if(height){payload.height=height}
|
||||
payload.project=config.project;payload.key=config.key;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');return config.endpoint+path+((query)?'?'+query:'')},getInitials:function(name='',width=500,height=500,color='',background=''){let path='/avatars/initials';let payload={};if(name){payload.name=name}
|
||||
payload.project=config.project;payload.key=config.key;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index<payload[p].length;index++){let param=payload[p][index];query.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{query.push(encodeURIComponent(p)+"="+encodeURIComponent(payload[p]))}}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getInitials:function(name='',width=500,height=500,color='',background=''){let path='/avatars/initials';let payload={};if(name){payload.name=name}
|
||||
if(width){payload.width=width}
|
||||
if(height){payload.height=height}
|
||||
if(color){payload.color=color}
|
||||
if(background){payload.background=background}
|
||||
payload.project=config.project;payload.key=config.key;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');return config.endpoint+path+((query)?'?'+query:'')},getQR:function(text,size=400,margin=1,download=0){if(text===undefined){throw new Error('Missing required parameter: "text"')}
|
||||
payload.project=config.project;payload.key=config.key;let query=[];for(let p in payload){if(Array.isArray(payload[p])){for(let index=0;index<payload[p].length;index++){let param=payload[p][index];query.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param))}}else{query.push(encodeURIComponent(p)+"="+encodeURIComponent(payload[p]))}}
|
||||
query=query.join("&");return config.endpoint+path+((query)?'?'+query:'')},getQR:function(text,size=400,margin=1,download=!1){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}
|
||||
|
@ -112,16 +114,14 @@ 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/collections/{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='$id',orderType='ASC',orderCast='string',search='',first=0,last=0){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
let path='/database/collections/{collectionId}'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.delete(path,{'content-type':'application/json',},payload)},listDocuments:function(collectionId,filters=[],limit=25,offset=0,orderField='$id',orderType='ASC',orderCast='string',search=''){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
let path='/database/collections/{collectionId}/documents'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};if(filters){payload.filters=filters}
|
||||
if(offset){payload.offset=offset}
|
||||
if(limit){payload.limit=limit}
|
||||
if(offset){payload.offset=offset}
|
||||
if(orderField){payload.orderField=orderField}
|
||||
if(orderType){payload.orderType=orderType}
|
||||
if(orderCast){payload.orderCast=orderCast}
|
||||
if(search){payload.search=search}
|
||||
if(first){payload.first=first}
|
||||
if(last){payload.last=last}
|
||||
return http.get(path,{'content-type':'application/json',},payload)},createDocument:function(collectionId,data,read,write,parentDocument='',parentProperty='',parentPropertyType='assign'){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
if(data===undefined){throw new Error('Missing required parameter: "data"')}
|
||||
if(read===undefined){throw new Error('Missing required parameter: "read"')}
|
||||
|
@ -144,13 +144,14 @@ if(read){payload.read=read}
|
|||
if(write){payload.write=write}
|
||||
return http.patch(path,{'content-type':'application/json',},payload)},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
|
||||
let path='/database/collections/{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)},getCollectionLogs:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
let path='/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let functions={list:function(search='',limit=25,offset=0,orderType='ASC'){let path='/functions';let payload={};if(search){payload.search=search}
|
||||
let path='/database/collections/{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 functions={list:function(search='',limit=25,offset=0,orderType='ASC'){let path='/functions';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)},create:function(name,vars=[],events=[],schedule='',timeout=15){if(name===undefined){throw new Error('Missing required parameter: "name"')}
|
||||
return http.get(path,{'content-type':'application/json',},payload)},create:function(name,env,vars=[],events=[],schedule='',timeout=15){if(name===undefined){throw new Error('Missing required parameter: "name"')}
|
||||
if(env===undefined){throw new Error('Missing required parameter: "env"')}
|
||||
let path='/functions';let payload={};if(name){payload.name=name}
|
||||
if(env){payload.env=env}
|
||||
if(vars){payload.vars=vars}
|
||||
if(events){payload.events=events}
|
||||
if(schedule){payload.schedule=schedule}
|
||||
|
@ -181,18 +182,20 @@ let path='/functions/{functionId}/tags'.replace(new RegExp('{functionId}','g'),f
|
|||
if(limit){payload.limit=limit}
|
||||
if(offset){payload.offset=offset}
|
||||
if(orderType){payload.orderType=orderType}
|
||||
return http.get(path,{'content-type':'application/json',},payload)},createTag:function(functionId,env,command,code){if(functionId===undefined){throw new Error('Missing required parameter: "functionId"')}
|
||||
if(env===undefined){throw new Error('Missing required parameter: "env"')}
|
||||
return http.get(path,{'content-type':'application/json',},payload)},createTag:function(functionId,command,code){if(functionId===undefined){throw new Error('Missing required parameter: "functionId"')}
|
||||
if(command===undefined){throw new Error('Missing required parameter: "command"')}
|
||||
if(code===undefined){throw new Error('Missing required parameter: "code"')}
|
||||
let path='/functions/{functionId}/tags'.replace(new RegExp('{functionId}','g'),functionId);let payload={};if(env){payload.env=env}
|
||||
if(command){payload.command=command}
|
||||
let path='/functions/{functionId}/tags'.replace(new RegExp('{functionId}','g'),functionId);let payload={};if(command){payload.command=command}
|
||||
if(code){payload.code=code}
|
||||
return http.post(path,{'content-type':'application/json',},payload)},getTag:function(functionId,tagId){if(functionId===undefined){throw new Error('Missing required parameter: "functionId"')}
|
||||
if(tagId===undefined){throw new Error('Missing required parameter: "tagId"')}
|
||||
let path='/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}','g'),functionId).replace(new RegExp('{tagId}','g'),tagId);let payload={};return http.get(path,{'content-type':'application/json',},payload)},deleteTag:function(functionId,tagId){if(functionId===undefined){throw new Error('Missing required parameter: "functionId"')}
|
||||
if(tagId===undefined){throw new Error('Missing required parameter: "tagId"')}
|
||||
let path='/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}','g'),functionId).replace(new RegExp('{tagId}','g'),tagId);let payload={};return http.delete(path,{'content-type':'application/json',},payload)}};let health={get:function(){let path='/health';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getAntiVirus:function(){let path='/health/anti-virus';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCache:function(){let path='/health/cache';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getDB:function(){let path='/health/db';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueCertificates:function(){let path='/health/queue/certificates';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueFunctions:function(){let path='/health/queue/functions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueLogs:function(){let path='/health/queue/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueTasks:function(){let path='/health/queue/tasks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueUsage:function(){let path='/health/queue/usage';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueWebhooks:function(){let path='/health/queue/webhooks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getStorageLocal:function(){let path='/health/storage/local';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getTime:function(){let path='/health/time';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let locale={get:function(){let path='/locale';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getContinents:function(){let path='/locale/continents';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)},getLanguages:function(){let path='/locale/languages';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let projects={list:function(){let path='/projects';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(name,teamId,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
|
||||
let path='/functions/{functionId}/tags/{tagId}'.replace(new RegExp('{functionId}','g'),functionId).replace(new RegExp('{tagId}','g'),tagId);let payload={};return http.delete(path,{'content-type':'application/json',},payload)}};let health={get:function(){let path='/health';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getAntiVirus:function(){let path='/health/anti-virus';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCache:function(){let path='/health/cache';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getDB:function(){let path='/health/db';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueCertificates:function(){let path='/health/queue/certificates';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueFunctions:function(){let path='/health/queue/functions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueLogs:function(){let path='/health/queue/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueTasks:function(){let path='/health/queue/tasks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueUsage:function(){let path='/health/queue/usage';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueWebhooks:function(){let path='/health/queue/webhooks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getStorageLocal:function(){let path='/health/storage/local';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getTime:function(){let path='/health/time';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let locale={get:function(){let path='/locale';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getContinents:function(){let path='/locale/continents';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)},getLanguages:function(){let path='/locale/languages';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let projects={list:function(search='',limit=25,offset=0,orderType='ASC'){let path='/projects';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)},create: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}
|
||||
|
|
55
app/sdks/console-web/types/index.d.ts
vendored
55
app/sdks/console-web/types/index.d.ts
vendored
|
@ -295,16 +295,17 @@ declare namespace Appwrite {
|
|||
* Use this endpoint to send a verification message to your user email address
|
||||
* to confirm they are the valid owners of that address. Both the **userId**
|
||||
* and **secret** arguments will be passed as query parameters to the URL you
|
||||
* have provider to be attached to the verification email. The provided URL
|
||||
* should redirect the user back for your app and allow you to complete the
|
||||
* have provided to be attached to the verification email. The provided URL
|
||||
* should redirect the user back to your app and allow you to complete the
|
||||
* verification process by verifying both the **userId** and **secret**
|
||||
* parameters. Learn more about how to [complete the verification
|
||||
* process](/docs/client/account#updateAccountVerification).
|
||||
*
|
||||
* Please note that in order to avoid a [Redirect
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
||||
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
||||
* the only valid redirect URLs are the ones from domains you have set when
|
||||
* adding your platforms in the console interface.
|
||||
*
|
||||
*
|
||||
* @param {string} url
|
||||
* @throws {Error}
|
||||
|
@ -442,11 +443,11 @@ declare namespace Appwrite {
|
|||
* @param {string} text
|
||||
* @param {number} size
|
||||
* @param {number} margin
|
||||
* @param {number} download
|
||||
* @param {boolean} download
|
||||
* @throws {Error}
|
||||
* @return {string}
|
||||
*/
|
||||
getQR(text: string, size: number, margin: number, download: number): string;
|
||||
getQR(text: string, size: number, margin: number, download: boolean): string;
|
||||
|
||||
}
|
||||
|
||||
|
@ -532,18 +533,16 @@ declare namespace Appwrite {
|
|||
*
|
||||
* @param {string} collectionId
|
||||
* @param {string[]} filters
|
||||
* @param {number} offset
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderField
|
||||
* @param {string} orderType
|
||||
* @param {string} orderCast
|
||||
* @param {string} search
|
||||
* @param {number} first
|
||||
* @param {number} last
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
listDocuments(collectionId: string, filters: string[], offset: number, limit: number, orderField: string, orderType: string, orderCast: string, search: string, first: number, last: number): Promise<object>;
|
||||
listDocuments(collectionId: string, filters: string[], limit: number, offset: number, orderField: string, orderType: string, orderCast: string, search: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Create Document
|
||||
|
@ -606,16 +605,6 @@ declare namespace Appwrite {
|
|||
*/
|
||||
deleteDocument(collectionId: string, documentId: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Collection Logs
|
||||
*
|
||||
*
|
||||
* @param {string} collectionId
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getCollectionLogs(collectionId: string): Promise<object>;
|
||||
|
||||
}
|
||||
|
||||
export interface Functions {
|
||||
|
@ -638,6 +627,7 @@ declare namespace Appwrite {
|
|||
*
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} env
|
||||
* @param {object} vars
|
||||
* @param {string[]} events
|
||||
* @param {string} schedule
|
||||
|
@ -645,7 +635,7 @@ declare namespace Appwrite {
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
create(name: string, vars: object, events: string[], schedule: string, timeout: number): Promise<object>;
|
||||
create(name: string, env: string, vars: object, events: string[], schedule: string, timeout: number): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Function
|
||||
|
@ -748,13 +738,12 @@ declare namespace Appwrite {
|
|||
*
|
||||
*
|
||||
* @param {string} functionId
|
||||
* @param {string} env
|
||||
* @param {string} command
|
||||
* @param {string} code
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createTag(functionId: string, env: string, command: string, code: string): Promise<object>;
|
||||
createTag(functionId: string, command: string, code: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Tag
|
||||
|
@ -1008,10 +997,14 @@ declare namespace Appwrite {
|
|||
* List Projects
|
||||
*
|
||||
*
|
||||
* @param {string} search
|
||||
* @param {number} limit
|
||||
* @param {number} offset
|
||||
* @param {string} orderType
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
list(): Promise<object>;
|
||||
list(search: string, limit: number, offset: number, orderType: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Create Project
|
||||
|
@ -1278,7 +1271,7 @@ declare namespace Appwrite {
|
|||
* @param {string} name
|
||||
* @param {string} status
|
||||
* @param {string} schedule
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpMethod
|
||||
* @param {string} httpUrl
|
||||
* @param {string[]} httpHeaders
|
||||
|
@ -1287,7 +1280,7 @@ declare namespace Appwrite {
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createTask(projectId: string, name: string, status: string, schedule: string, security: number, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise<object>;
|
||||
createTask(projectId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Task
|
||||
|
@ -1309,7 +1302,7 @@ declare namespace Appwrite {
|
|||
* @param {string} name
|
||||
* @param {string} status
|
||||
* @param {string} schedule
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpMethod
|
||||
* @param {string} httpUrl
|
||||
* @param {string[]} httpHeaders
|
||||
|
@ -1318,7 +1311,7 @@ declare namespace Appwrite {
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
updateTask(projectId: string, taskId: string, name: string, status: string, schedule: string, security: number, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise<object>;
|
||||
updateTask(projectId: string, taskId: string, name: string, status: string, schedule: string, security: boolean, httpMethod: string, httpUrl: string, httpHeaders: string[], httpUser: string, httpPass: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Delete Task
|
||||
|
@ -1360,13 +1353,13 @@ declare namespace Appwrite {
|
|||
* @param {string} name
|
||||
* @param {string[]} events
|
||||
* @param {string} url
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpUser
|
||||
* @param {string} httpPass
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createWebhook(projectId: string, name: string, events: string[], url: string, security: number, httpUser: string, httpPass: string): Promise<object>;
|
||||
createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Webhook
|
||||
|
@ -1388,13 +1381,13 @@ declare namespace Appwrite {
|
|||
* @param {string} name
|
||||
* @param {string[]} events
|
||||
* @param {string} url
|
||||
* @param {number} security
|
||||
* @param {boolean} security
|
||||
* @param {string} httpUser
|
||||
* @param {string} httpPass
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: number, httpUser: string, httpPass: string): Promise<object>;
|
||||
updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, httpUser: string, httpPass: string): Promise<object>;
|
||||
|
||||
/**
|
||||
* Delete Webhook
|
||||
|
|
Loading…
Reference in a new issue