From c76dcd9c7a14c4292f234f095653c44e839a2912 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 17 May 2020 08:29:57 +0300 Subject: [PATCH] Updated SDKs --- app/sdks/console-javascript/README.md | 2 +- .../docs/examples/health/get-anti-virus.md | 14 ++++ .../examples/health/get-queue-functions.md | 14 ++++ app/sdks/console-javascript/src/sdk.js | 78 ++++++++++++------- app/sdks/console-javascript/src/sdk.min.js | 4 +- app/sdks/console-javascript/types/index.d.ts | 49 +++++++----- app/sdks/flutter-dart/README.md | 4 +- .../flutter-dart/lib/services/account.dart | 2 +- app/sdks/git/ruby | 1 - app/sdks/server-go/README.md | 4 +- .../docs/examples/health/get-anti-virus.md | 25 ++++++ .../examples/health/get-queue-functions.md | 25 ++++++ app/sdks/server-go/health.go | 32 +++++--- app/sdks/server-java/README.md | 4 +- .../src/main/java/services/Health.java | 74 +++++++++++------- app/sdks/server-nodejs/README.md | 2 +- .../docs/examples/health/get-anti-virus.md | 19 +++++ .../examples/health/get-queue-functions.md | 19 +++++ app/sdks/server-nodejs/lib/services/health.js | 72 ++++++++++------- app/sdks/server-php/README.md | 2 +- app/sdks/server-php/composer.json | 2 +- .../docs/examples/health/get-anti-virus.md | 15 ++++ .../examples/health/get-queue-functions.md | 15 ++++ app/sdks/server-php/docs/health.md | 42 +++++----- .../src/Appwrite/Services/Health.php | 75 +++++++++++------- app/sdks/server-python/README.md | 4 +- .../server-python/appwrite/services/health.py | 50 +++++++----- .../docs/examples/health/get-anti-virus.md | 13 ++++ .../examples/health/get-queue-functions.md | 13 ++++ app/sdks/server-python/setup.py | 4 +- app/sdks/server-ruby/README.md | 4 +- app/sdks/server-ruby/appwrite.gemspec | 2 +- .../lib/appwrite/services/health.rb | 33 +++++--- app/sdks/web-javascript/README.md | 2 +- app/sdks/web-javascript/src/sdk.js | 2 +- app/sdks/web-javascript/src/sdk.min.js | 2 +- 36 files changed, 504 insertions(+), 220 deletions(-) create mode 100644 app/sdks/console-javascript/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/console-javascript/docs/examples/health/get-queue-functions.md delete mode 160000 app/sdks/git/ruby create mode 100644 app/sdks/server-go/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/server-go/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/server-php/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/server-php/docs/examples/health/get-queue-functions.md create mode 100644 app/sdks/server-python/docs/examples/health/get-anti-virus.md create mode 100644 app/sdks/server-python/docs/examples/health/get-queue-functions.md diff --git a/app/sdks/console-javascript/README.md b/app/sdks/console-javascript/README.md index 3911d7c430..6fbd838de0 100644 --- a/app/sdks/console-javascript/README.md +++ b/app/sdks/console-javascript/README.md @@ -1,7 +1,7 @@ # Appwrite SDK for JavaScript ![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the JS SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/console-javascript/docs/examples/health/get-anti-virus.md b/app/sdks/console-javascript/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..37ff9d820d --- /dev/null +++ b/app/sdks/console-javascript/docs/examples/health/get-anti-virus.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getAntiVirus(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/console-javascript/docs/examples/health/get-queue-functions.md b/app/sdks/console-javascript/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..6cbfbc342c --- /dev/null +++ b/app/sdks/console-javascript/docs/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +let sdk = new Appwrite(); + +sdk + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = sdk.health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); // Success +}, function (error) { + console.log(error); // Failure +}); \ No newline at end of file diff --git a/app/sdks/console-javascript/src/sdk.js b/app/sdks/console-javascript/src/sdk.js index 1379f8ced7..deea4b7e3a 100644 --- a/app/sdks/console-javascript/src/sdk.js +++ b/app/sdks/console-javascript/src/sdk.js @@ -748,7 +748,7 @@ * @throws {Error} * @return {Promise} */ - createOAuth2Session: function(provider, success = 'https://localhost:2444/auth/oauth2/success', failure = 'https://localhost:2444/auth/oauth2/failure') { + createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure') { if(provider === undefined) { throw new Error('Missing required parameter: "provider"'); } @@ -1609,7 +1609,7 @@ let health = { /** - * Check API HTTP Health + * Get HTTP * * Check the Appwrite HTTP server is up and responsive. * @@ -1628,7 +1628,26 @@ }, /** - * Check Cache Health + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getAntiVirus: function() { + let path = '/health/anti-virus'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Cache * * Check the Appwrite in-memory cache server is up and connection is * successful. @@ -1648,7 +1667,7 @@ }, /** - * Check DB Health + * Get DB * * Check the Appwrite database server is up and connection is successful. * @@ -1667,7 +1686,7 @@ }, /** - * Check the number of pending certificate messages + * Get Certificate Queue * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -1688,7 +1707,25 @@ }, /** - * Check the number of pending log messages + * Get Functions Queue + * + * + * @throws {Error} + * @return {Promise} + */ + getQueueFunctions: function() { + let path = '/health/queue/functions'; + + let payload = {}; + + return http + .get(path, { + 'content-type': 'application/json', + }, payload); + }, + + /** + * Get Logs Queue * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. @@ -1708,7 +1745,7 @@ }, /** - * Check the number of pending task messages + * Get Tasks Queue * * Get the number of tasks that are waiting to be processed in the Appwrite * internal queue server. @@ -1728,7 +1765,7 @@ }, /** - * Check the number of pending usage messages + * Get Usage Queue * * Get the number of usage stats that are waiting to be processed in the * Appwrite internal queue server. @@ -1748,7 +1785,7 @@ }, /** - * Check number of pending webhook messages + * Get Webhooks Queue * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. @@ -1768,26 +1805,7 @@ }, /** - * Check Anti virus Health - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageAntiVirus: function() { - let path = '/health/storage/anti-virus'; - - let payload = {}; - - return http - .get(path, { - 'content-type': 'application/json', - }, payload); - }, - - /** - * Check File System Health + * Get Local Storage * * Check the Appwrite local storage device is up and connection is successful. * @@ -1806,7 +1824,7 @@ }, /** - * Check Time Health + * Get Time * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/app/sdks/console-javascript/src/sdk.min.js b/app/sdks/console-javascript/src/sdk.min.js index 0023277bf9..b75329efc0 100644 --- a/app/sdks/console-javascript/src/sdk.min.js +++ b/app/sdks/console-javascript/src/sdk.min.js @@ -45,7 +45,7 @@ return http.put(path,{'content-type':'application/json',},payload)},getSessions: if(password===undefined){throw new Error('Missing required parameter: "password"')} let path='/account/sessions';let payload={};if(email){payload.email=email} if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://localhost:2444/auth/oauth2/success',failure='https://localhost:2444/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} +return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} if(failure){payload.failure=failure} payload.project=config.project;payload.key=config.key;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');window.location=config.endpoint+path+((query)?'?'+query:'')},deleteSession:function(sessionId){if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"')} @@ -133,7 +133,7 @@ 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 health={get:function(){let path='/health';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)},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)},getStorageAntiVirus:function(){let path='/health/storage/anti-virus';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)}};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='/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.get(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)}};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"')} 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} diff --git a/app/sdks/console-javascript/types/index.d.ts b/app/sdks/console-javascript/types/index.d.ts index 5416bcd5a9..8530579023 100644 --- a/app/sdks/console-javascript/types/index.d.ts +++ b/app/sdks/console-javascript/types/index.d.ts @@ -592,7 +592,7 @@ declare namespace Appwrite { export interface Health { /** - * Check API HTTP Health + * Get HTTP * * Check the Appwrite HTTP server is up and responsive. * @@ -602,7 +602,17 @@ declare namespace Appwrite { get(): Promise; /** - * Check Cache Health + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws {Error} + * @return {Promise} + */ + getAntiVirus(): Promise; + + /** + * Get Cache * * Check the Appwrite in-memory cache server is up and connection is * successful. @@ -613,7 +623,7 @@ declare namespace Appwrite { getCache(): Promise; /** - * Check DB Health + * Get DB * * Check the Appwrite database server is up and connection is successful. * @@ -623,7 +633,7 @@ declare namespace Appwrite { getDB(): Promise; /** - * Check the number of pending certificate messages + * Get Certificate Queue * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -635,7 +645,16 @@ declare namespace Appwrite { getQueueCertificates(): Promise; /** - * Check the number of pending log messages + * Get Functions Queue + * + * + * @throws {Error} + * @return {Promise} + */ + getQueueFunctions(): Promise; + + /** + * Get Logs Queue * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. @@ -646,7 +665,7 @@ declare namespace Appwrite { getQueueLogs(): Promise; /** - * Check the number of pending task messages + * Get Tasks Queue * * Get the number of tasks that are waiting to be processed in the Appwrite * internal queue server. @@ -657,7 +676,7 @@ declare namespace Appwrite { getQueueTasks(): Promise; /** - * Check the number of pending usage messages + * Get Usage Queue * * Get the number of usage stats that are waiting to be processed in the * Appwrite internal queue server. @@ -668,7 +687,7 @@ declare namespace Appwrite { getQueueUsage(): Promise; /** - * Check number of pending webhook messages + * Get Webhooks Queue * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. @@ -679,17 +698,7 @@ declare namespace Appwrite { getQueueWebhooks(): Promise; /** - * Check Anti virus Health - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws {Error} - * @return {Promise} - */ - getStorageAntiVirus(): Promise; - - /** - * Check File System Health + * Get Local Storage * * Check the Appwrite local storage device is up and connection is successful. * @@ -699,7 +708,7 @@ declare namespace Appwrite { getStorageLocal(): Promise; /** - * Check Time Health + * Get Time * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/app/sdks/flutter-dart/README.md b/app/sdks/flutter-dart/README.md index 7c84ddd863..e51c6681c5 100644 --- a/app/sdks/flutter-dart/README.md +++ b/app/sdks/flutter-dart/README.md @@ -2,9 +2,9 @@ [![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite) ![License](https://img.shields.io/github/license/appwrite/sdk-for-dart.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/flutter-dart/lib/services/account.dart b/app/sdks/flutter-dart/lib/services/account.dart index 92951ce5cf..21ed4cd24d 100644 --- a/app/sdks/flutter-dart/lib/services/account.dart +++ b/app/sdks/flutter-dart/lib/services/account.dart @@ -305,7 +305,7 @@ class Account extends Service { /// first. Use the success and failure arguments to provide a redirect URL's /// back to your app when login is completed. /// - Future createOAuth2Session({@required String provider, String success = 'https://localhost:2444/auth/oauth2/success', String failure = 'https://localhost:2444/auth/oauth2/failure'}) { + Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) { final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider); final Map params = { diff --git a/app/sdks/git/ruby b/app/sdks/git/ruby deleted file mode 160000 index f7e122b5a4..0000000000 --- a/app/sdks/git/ruby +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7e122b5a4153b5a2249ce0375db9555644450da diff --git a/app/sdks/server-go/README.md b/app/sdks/server-go/README.md index 6769ae8da2..3b46d51f79 100644 --- a/app/sdks/server-go/README.md +++ b/app/sdks/server-go/README.md @@ -1,9 +1,9 @@ # Appwrite SDK for Go ![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-go/docs/examples/health/get-anti-virus.md b/app/sdks/server-go/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..a6f363dde1 --- /dev/null +++ b/app/sdks/server-go/docs/examples/health/get-anti-virus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetAntiVirus() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/server-go/docs/examples/health/get-queue-functions.md b/app/sdks/server-go/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..5df453068b --- /dev/null +++ b/app/sdks/server-go/docs/examples/health/get-queue-functions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go" +) + +func main() { + var client := appwrite.Client{} + + client.SetProject("5df5acd0d48c2") // Your project ID + client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key + + var service := appwrite.Health{ + client: &client + } + + var response, error := service.GetQueueFunctions() + + if error != nil { + panic(error) + } + + fmt.Println(response) +} \ No newline at end of file diff --git a/app/sdks/server-go/health.go b/app/sdks/server-go/health.go index eb4832cebf..d3b6b3a926 100644 --- a/app/sdks/server-go/health.go +++ b/app/sdks/server-go/health.go @@ -26,6 +26,17 @@ func (srv *Health) Get() (map[string]interface{}, error) { return srv.client.Call("GET", path, nil, params) } +// GetAntiVirus check the Appwrite Anti Virus server is up and connection is +// successful. +func (srv *Health) GetAntiVirus() (map[string]interface{}, error) { + path := "/health/anti-virus" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + // GetCache check the Appwrite in-memory cache server is up and connection is // successful. func (srv *Health) GetCache() (map[string]interface{}, error) { @@ -60,6 +71,16 @@ func (srv *Health) GetQueueCertificates() (map[string]interface{}, error) { return srv.client.Call("GET", path, nil, params) } +// GetQueueFunctions +func (srv *Health) GetQueueFunctions() (map[string]interface{}, error) { + path := "/health/queue/functions" + + params := map[string]interface{}{ + } + + return srv.client.Call("GET", path, nil, params) +} + // GetQueueLogs get the number of logs that are waiting to be processed in the // Appwrite internal queue server. func (srv *Health) GetQueueLogs() (map[string]interface{}, error) { @@ -104,17 +125,6 @@ func (srv *Health) GetQueueWebhooks() (map[string]interface{}, error) { return srv.client.Call("GET", path, nil, params) } -// GetStorageAntiVirus check the Appwrite Anti Virus server is up and -// connection is successful. -func (srv *Health) GetStorageAntiVirus() (map[string]interface{}, error) { - path := "/health/storage/anti-virus" - - params := map[string]interface{}{ - } - - return srv.client.Call("GET", path, nil, params) -} - // GetStorageLocal check the Appwrite local storage device is up and // connection is successful. func (srv *Health) GetStorageLocal() (map[string]interface{}, error) { diff --git a/app/sdks/server-java/README.md b/app/sdks/server-java/README.md index 85d13be4e6..05e7d85945 100644 --- a/app/sdks/server-java/README.md +++ b/app/sdks/server-java/README.md @@ -1,9 +1,9 @@ # Appwrite SDK for Java ![License](https://img.shields.io/github/license/appwrite/sdk-for-java.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Java SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-java/src/main/java/services/Health.java b/app/sdks/server-java/src/main/java/services/Health.java index 2d9ff9d360..08e23433d1 100644 --- a/app/sdks/server-java/src/main/java/services/Health.java +++ b/app/sdks/server-java/src/main/java/services/Health.java @@ -18,7 +18,7 @@ public class Health extends Service { super(client); } - /// Check API HTTP Health + /// Get HTTP /* * Check the Appwrite HTTP server is up and responsive. */ @@ -37,7 +37,26 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check Cache Health + /// Get Anti virus + /* + * Check the Appwrite Anti Virus server is up and connection is successful. + */ + public Call getAntiVirus() { + final String path = "/health/anti-virus"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Cache /* * Check the Appwrite in-memory cache server is up and connection is * successful. @@ -57,7 +76,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check DB Health + /// Get DB /* * Check the Appwrite database server is up and connection is successful. */ @@ -76,7 +95,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check the number of pending certificate messages + /// Get Certificate Queue /* * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -97,7 +116,23 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check the number of pending log messages + /// Get Functions Queue + public Call getQueueFunctions() { + final String path = "/health/queue/functions"; + + final Map params = Map.ofEntries( + ); + + + + final Map headers = Map.ofEntries( + entry("content-type", "application/json") + ); + + return client.call("GET", path, headers, params); + } + + /// Get Logs Queue /* * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. @@ -117,7 +152,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check the number of pending task messages + /// Get Tasks Queue /* * Get the number of tasks that are waiting to be processed in the Appwrite * internal queue server. @@ -137,7 +172,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check the number of pending usage messages + /// Get Usage Queue /* * Get the number of usage stats that are waiting to be processed in the * Appwrite internal queue server. @@ -157,7 +192,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check number of pending webhook messages + /// Get Webhooks Queue /* * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. @@ -177,26 +212,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check Anti virus Health - /* - * Check the Appwrite Anti Virus server is up and connection is successful. - */ - public Call getStorageAntiVirus() { - final String path = "/health/storage/anti-virus"; - - final Map params = Map.ofEntries( - ); - - - - final Map headers = Map.ofEntries( - entry("content-type", "application/json") - ); - - return client.call("GET", path, headers, params); - } - - /// Check File System Health + /// Get Local Storage /* * Check the Appwrite local storage device is up and connection is successful. */ @@ -215,7 +231,7 @@ public class Health extends Service { return client.call("GET", path, headers, params); } - /// Check Time Health + /// Get Time /* * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/app/sdks/server-nodejs/README.md b/app/sdks/server-nodejs/README.md index b51df55ce9..8cfa194a15 100644 --- a/app/sdks/server-nodejs/README.md +++ b/app/sdks/server-nodejs/README.md @@ -1,7 +1,7 @@ # Appwrite SDK for NodeJS ![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md b/app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..8d09508218 --- /dev/null +++ b/app/sdks/server-nodejs/docs/examples/health/get-anti-virus.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getAntiVirus(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md b/app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..a799c29805 --- /dev/null +++ b/app/sdks/server-nodejs/docs/examples/health/get-queue-functions.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +// Init SDK +let client = new sdk.Client(); + +let health = new sdk.Health(client); + +client + .setProject('5df5acd0d48c2') // Your project ID + .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +let promise = health.getQueueFunctions(); + +promise.then(function (response) { + console.log(response); +}, function (error) { + console.log(error); +}); \ No newline at end of file diff --git a/app/sdks/server-nodejs/lib/services/health.js b/app/sdks/server-nodejs/lib/services/health.js index a77e07eb64..a0aed052ce 100644 --- a/app/sdks/server-nodejs/lib/services/health.js +++ b/app/sdks/server-nodejs/lib/services/health.js @@ -3,7 +3,7 @@ const Service = require('../service.js'); class Health extends Service { /** - * Check API HTTP Health + * Get HTTP * * Check the Appwrite HTTP server is up and responsive. * @@ -21,7 +21,25 @@ class Health extends Service { } /** - * Check Cache Health + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws Exception + * @return {} + */ + async getAntiVirus() { + let path = '/health/anti-virus'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Cache * * Check the Appwrite in-memory cache server is up and connection is * successful. @@ -40,7 +58,7 @@ class Health extends Service { } /** - * Check DB Health + * Get DB * * Check the Appwrite database server is up and connection is successful. * @@ -58,7 +76,7 @@ class Health extends Service { } /** - * Check the number of pending certificate messages + * Get Certificate Queue * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -78,7 +96,23 @@ class Health extends Service { } /** - * Check the number of pending log messages + * Get Functions Queue + * + * @throws Exception + * @return {} + */ + async getQueueFunctions() { + let path = '/health/queue/functions'; + + return await this.client.call('get', path, { + 'content-type': 'application/json', + }, + { + }); + } + + /** + * Get Logs Queue * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. @@ -97,7 +131,7 @@ class Health extends Service { } /** - * Check the number of pending task messages + * Get Tasks Queue * * Get the number of tasks that are waiting to be processed in the Appwrite * internal queue server. @@ -116,7 +150,7 @@ class Health extends Service { } /** - * Check the number of pending usage messages + * Get Usage Queue * * Get the number of usage stats that are waiting to be processed in the * Appwrite internal queue server. @@ -135,7 +169,7 @@ class Health extends Service { } /** - * Check number of pending webhook messages + * Get Webhooks Queue * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. @@ -154,25 +188,7 @@ class Health extends Service { } /** - * Check Anti virus Health - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return {} - */ - async getStorageAntiVirus() { - let path = '/health/storage/anti-virus'; - - return await this.client.call('get', path, { - 'content-type': 'application/json', - }, - { - }); - } - - /** - * Check File System Health + * Get Local Storage * * Check the Appwrite local storage device is up and connection is successful. * @@ -190,7 +206,7 @@ class Health extends Service { } /** - * Check Time Health + * Get Time * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/app/sdks/server-php/README.md b/app/sdks/server-php/README.md index 140173b028..745f390e9b 100644 --- a/app/sdks/server-php/README.md +++ b/app/sdks/server-php/README.md @@ -1,7 +1,7 @@ # Appwrite SDK for PHP ![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-php/composer.json b/app/sdks/server-php/composer.json index fc13cb3bed..64d2e1746f 100644 --- a/app/sdks/server-php/composer.json +++ b/app/sdks/server-php/composer.json @@ -7,7 +7,7 @@ "license": "BSD-3-Clause", "support": { "url": "https://appwrite.io/support", - "email": "team@appwrite.io" + "email": "team@localhost.test" }, "autoload": { "psr-4": { diff --git a/app/sdks/server-php/docs/examples/health/get-anti-virus.md b/app/sdks/server-php/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..a1e5b66a9b --- /dev/null +++ b/app/sdks/server-php/docs/examples/health/get-anti-virus.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getAntiVirus(); \ No newline at end of file diff --git a/app/sdks/server-php/docs/examples/health/get-queue-functions.md b/app/sdks/server-php/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..b8df530241 --- /dev/null +++ b/app/sdks/server-php/docs/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +setProject('5df5acd0d48c2') // Your project ID + ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key +; + +$health = new Health($client); + +$result = $health->getQueueFunctions(); \ No newline at end of file diff --git a/app/sdks/server-php/docs/health.md b/app/sdks/server-php/docs/health.md index 0161105d15..38b814b633 100644 --- a/app/sdks/server-php/docs/health.md +++ b/app/sdks/server-php/docs/health.md @@ -1,6 +1,6 @@ # Health Service -## Check API HTTP Health +## Get HTTP ```http request GET https://appwrite.io/v1/health @@ -8,7 +8,15 @@ GET https://appwrite.io/v1/health ** Check the Appwrite HTTP server is up and responsive. ** -## Check Cache Health +## Get Anti virus + +```http request +GET https://appwrite.io/v1/health/anti-virus +``` + +** Check the Appwrite Anti Virus server is up and connection is successful. ** + +## Get Cache ```http request GET https://appwrite.io/v1/health/cache @@ -16,7 +24,7 @@ GET https://appwrite.io/v1/health/cache ** Check the Appwrite in-memory cache server is up and connection is successful. ** -## Check DB Health +## Get DB ```http request GET https://appwrite.io/v1/health/db @@ -24,7 +32,7 @@ GET https://appwrite.io/v1/health/db ** Check the Appwrite database server is up and connection is successful. ** -## Check the number of pending certificate messages +## Get Certificate Queue ```http request GET https://appwrite.io/v1/health/queue/certificates @@ -32,7 +40,13 @@ GET https://appwrite.io/v1/health/queue/certificates ** Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. ** -## Check the number of pending log messages +## Get Functions Queue + +```http request +GET https://appwrite.io/v1/health/queue/functions +``` + +## Get Logs Queue ```http request GET https://appwrite.io/v1/health/queue/logs @@ -40,7 +54,7 @@ GET https://appwrite.io/v1/health/queue/logs ** Get the number of logs that are waiting to be processed in the Appwrite internal queue server. ** -## Check the number of pending task messages +## Get Tasks Queue ```http request GET https://appwrite.io/v1/health/queue/tasks @@ -48,7 +62,7 @@ GET https://appwrite.io/v1/health/queue/tasks ** Get the number of tasks that are waiting to be processed in the Appwrite internal queue server. ** -## Check the number of pending usage messages +## Get Usage Queue ```http request GET https://appwrite.io/v1/health/queue/usage @@ -56,7 +70,7 @@ GET https://appwrite.io/v1/health/queue/usage ** Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. ** -## Check number of pending webhook messages +## Get Webhooks Queue ```http request GET https://appwrite.io/v1/health/queue/webhooks @@ -64,15 +78,7 @@ GET https://appwrite.io/v1/health/queue/webhooks ** Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. ** -## Check Anti virus Health - -```http request -GET https://appwrite.io/v1/health/storage/anti-virus -``` - -** Check the Appwrite Anti Virus server is up and connection is successful. ** - -## Check File System Health +## Get Local Storage ```http request GET https://appwrite.io/v1/health/storage/local @@ -80,7 +86,7 @@ GET https://appwrite.io/v1/health/storage/local ** Check the Appwrite local storage device is up and connection is successful. ** -## Check Time Health +## Get Time ```http request GET https://appwrite.io/v1/health/time diff --git a/app/sdks/server-php/src/Appwrite/Services/Health.php b/app/sdks/server-php/src/Appwrite/Services/Health.php index a8423aa188..d39f1f406d 100644 --- a/app/sdks/server-php/src/Appwrite/Services/Health.php +++ b/app/sdks/server-php/src/Appwrite/Services/Health.php @@ -9,7 +9,7 @@ use Appwrite\Service; class Health extends Service { /** - * Check API HTTP Health + * Get HTTP * * Check the Appwrite HTTP server is up and responsive. * @@ -28,7 +28,26 @@ class Health extends Service } /** - * Check Cache Health + * Get Anti virus + * + * Check the Appwrite Anti Virus server is up and connection is successful. + * + * @throws Exception + * @return array + */ + public function getAntiVirus():array + { + $path = str_replace([], [], '/health/anti-virus'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Cache * * Check the Appwrite in-memory cache server is up and connection is * successful. @@ -48,7 +67,7 @@ class Health extends Service } /** - * Check DB Health + * Get DB * * Check the Appwrite database server is up and connection is successful. * @@ -67,7 +86,7 @@ class Health extends Service } /** - * Check the number of pending certificate messages + * Get Certificate Queue * * Get the number of certificates that are waiting to be issued against * [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue @@ -88,7 +107,24 @@ class Health extends Service } /** - * Check the number of pending log messages + * Get Functions Queue + * + * @throws Exception + * @return array + */ + public function getQueueFunctions():array + { + $path = str_replace([], [], '/health/queue/functions'); + $params = []; + + + return $this->client->call(Client::METHOD_GET, $path, [ + 'content-type' => 'application/json', + ], $params); + } + + /** + * Get Logs Queue * * Get the number of logs that are waiting to be processed in the Appwrite * internal queue server. @@ -108,7 +144,7 @@ class Health extends Service } /** - * Check the number of pending task messages + * Get Tasks Queue * * Get the number of tasks that are waiting to be processed in the Appwrite * internal queue server. @@ -128,7 +164,7 @@ class Health extends Service } /** - * Check the number of pending usage messages + * Get Usage Queue * * Get the number of usage stats that are waiting to be processed in the * Appwrite internal queue server. @@ -148,7 +184,7 @@ class Health extends Service } /** - * Check number of pending webhook messages + * Get Webhooks Queue * * Get the number of webhooks that are waiting to be processed in the Appwrite * internal queue server. @@ -168,26 +204,7 @@ class Health extends Service } /** - * Check Anti virus Health - * - * Check the Appwrite Anti Virus server is up and connection is successful. - * - * @throws Exception - * @return array - */ - public function getStorageAntiVirus():array - { - $path = str_replace([], [], '/health/storage/anti-virus'); - $params = []; - - - return $this->client->call(Client::METHOD_GET, $path, [ - 'content-type' => 'application/json', - ], $params); - } - - /** - * Check File System Health + * Get Local Storage * * Check the Appwrite local storage device is up and connection is successful. * @@ -206,7 +223,7 @@ class Health extends Service } /** - * Check Time Health + * Get Time * * Check the Appwrite server time is synced with Google remote NTP server. We * use this technology to smoothly handle leap seconds with no disruptive diff --git a/app/sdks/server-python/README.md b/app/sdks/server-python/README.md index 11e9a9a7cd..aefae272c2 100644 --- a/app/sdks/server-python/README.md +++ b/app/sdks/server-python/README.md @@ -1,9 +1,9 @@ # Appwrite SDK for Python ![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-python/appwrite/services/health.py b/app/sdks/server-python/appwrite/services/health.py index aa2a3fe37e..5e08ebe6e8 100644 --- a/app/sdks/server-python/appwrite/services/health.py +++ b/app/sdks/server-python/appwrite/services/health.py @@ -7,7 +7,7 @@ class Health(Service): super(Health, self).__init__(client) def get(self): - """Check API HTTP Health""" + """Get HTTP""" params = {} path = '/health' @@ -16,8 +16,18 @@ class Health(Service): 'content-type': 'application/json', }, params) + def get_anti_virus(self): + """Get Anti virus""" + + params = {} + path = '/health/anti-virus' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + def get_cache(self): - """Check Cache Health""" + """Get Cache""" params = {} path = '/health/cache' @@ -27,7 +37,7 @@ class Health(Service): }, params) def get_d_b(self): - """Check DB Health""" + """Get DB""" params = {} path = '/health/db' @@ -37,7 +47,7 @@ class Health(Service): }, params) def get_queue_certificates(self): - """Check the number of pending certificate messages""" + """Get Certificate Queue""" params = {} path = '/health/queue/certificates' @@ -46,8 +56,18 @@ class Health(Service): 'content-type': 'application/json', }, params) + def get_queue_functions(self): + """Get Functions Queue""" + + params = {} + path = '/health/queue/functions' + + return self.client.call('get', path, { + 'content-type': 'application/json', + }, params) + def get_queue_logs(self): - """Check the number of pending log messages""" + """Get Logs Queue""" params = {} path = '/health/queue/logs' @@ -57,7 +77,7 @@ class Health(Service): }, params) def get_queue_tasks(self): - """Check the number of pending task messages""" + """Get Tasks Queue""" params = {} path = '/health/queue/tasks' @@ -67,7 +87,7 @@ class Health(Service): }, params) def get_queue_usage(self): - """Check the number of pending usage messages""" + """Get Usage Queue""" params = {} path = '/health/queue/usage' @@ -77,7 +97,7 @@ class Health(Service): }, params) def get_queue_webhooks(self): - """Check number of pending webhook messages""" + """Get Webhooks Queue""" params = {} path = '/health/queue/webhooks' @@ -86,18 +106,8 @@ class Health(Service): 'content-type': 'application/json', }, params) - def get_storage_anti_virus(self): - """Check Anti virus Health""" - - params = {} - path = '/health/storage/anti-virus' - - return self.client.call('get', path, { - 'content-type': 'application/json', - }, params) - def get_storage_local(self): - """Check File System Health""" + """Get Local Storage""" params = {} path = '/health/storage/local' @@ -107,7 +117,7 @@ class Health(Service): }, params) def get_time(self): - """Check Time Health""" + """Get Time""" params = {} path = '/health/time' diff --git a/app/sdks/server-python/docs/examples/health/get-anti-virus.md b/app/sdks/server-python/docs/examples/health/get-anti-virus.md new file mode 100644 index 0000000000..51e301c12a --- /dev/null +++ b/app/sdks/server-python/docs/examples/health/get-anti-virus.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_anti_virus() diff --git a/app/sdks/server-python/docs/examples/health/get-queue-functions.md b/app/sdks/server-python/docs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..c282ba7969 --- /dev/null +++ b/app/sdks/server-python/docs/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() + +(client + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +health = Health(client) + +result = health.get_queue_functions() diff --git a/app/sdks/server-python/setup.py b/app/sdks/server-python/setup.py index 6446e4cb4e..85c64b9c28 100644 --- a/app/sdks/server-python/setup.py +++ b/app/sdks/server-python/setup.py @@ -7,9 +7,9 @@ setuptools.setup( license='BSD-3-Clause', description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API', author = 'Appwrite Team', - author_email = 'team@appwrite.io', + author_email = 'team@localhost.test', maintainer = 'Appwrite Team', - maintainer_email = 'team@appwrite.io', + maintainer_email = 'team@localhost.test', url = 'https://appwrite.io/support', download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.4.tar.gz', # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], diff --git a/app/sdks/server-ruby/README.md b/app/sdks/server-ruby/README.md index 6b71d0ccee..00cb7fad0f 100644 --- a/app/sdks/server-ruby/README.md +++ b/app/sdks/server-ruby/README.md @@ -1,9 +1,9 @@ # Appwrite SDK for Ruby ![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.** Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/server-ruby/appwrite.gemspec b/app/sdks/server-ruby/appwrite.gemspec index 99fa047a96..aba1f90947 100644 --- a/app/sdks/server-ruby/appwrite.gemspec +++ b/app/sdks/server-ruby/appwrite.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |s| For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)" s.author = 'Appwrite Team' s.homepage = 'https://appwrite.io/support' - s.email = 'team@appwrite.io' + s.email = 'team@localhost.test' s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) end \ No newline at end of file diff --git a/app/sdks/server-ruby/lib/appwrite/services/health.rb b/app/sdks/server-ruby/lib/appwrite/services/health.rb index f48069ff25..d2c6bc7b60 100644 --- a/app/sdks/server-ruby/lib/appwrite/services/health.rb +++ b/app/sdks/server-ruby/lib/appwrite/services/health.rb @@ -12,6 +12,17 @@ module Appwrite }, params); end + def get_anti_virus() + path = '/health/anti-virus' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + def get_cache() path = '/health/cache' @@ -45,6 +56,17 @@ module Appwrite }, params); end + def get_queue_functions() + path = '/health/queue/functions' + + params = { + } + + return @client.call('get', path, { + 'content-type' => 'application/json', + }, params); + end + def get_queue_logs() path = '/health/queue/logs' @@ -89,17 +111,6 @@ module Appwrite }, params); end - def get_storage_anti_virus() - path = '/health/storage/anti-virus' - - params = { - } - - return @client.call('get', path, { - 'content-type' => 'application/json', - }, params); - end - def get_storage_local() path = '/health/storage/local' diff --git a/app/sdks/web-javascript/README.md b/app/sdks/web-javascript/README.md index 812e31fd29..e7008d9087 100644 --- a/app/sdks/web-javascript/README.md +++ b/app/sdks/web-javascript/README.md @@ -1,7 +1,7 @@ # Appwrite SDK for JavaScript ![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.5.3-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1) Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. diff --git a/app/sdks/web-javascript/src/sdk.js b/app/sdks/web-javascript/src/sdk.js index 4e8f1b0197..62852fea60 100644 --- a/app/sdks/web-javascript/src/sdk.js +++ b/app/sdks/web-javascript/src/sdk.js @@ -712,7 +712,7 @@ * @throws {Error} * @return {Promise} */ - createOAuth2Session: function(provider, success = 'https://localhost:2444/auth/oauth2/success', failure = 'https://localhost:2444/auth/oauth2/failure') { + createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure') { if(provider === undefined) { throw new Error('Missing required parameter: "provider"'); } diff --git a/app/sdks/web-javascript/src/sdk.min.js b/app/sdks/web-javascript/src/sdk.min.js index b2af28282a..3fa2a38b3b 100644 --- a/app/sdks/web-javascript/src/sdk.min.js +++ b/app/sdks/web-javascript/src/sdk.min.js @@ -45,7 +45,7 @@ return http.put(path,{'content-type':'application/json',},payload)},getSessions: if(password===undefined){throw new Error('Missing required parameter: "password"')} let path='/account/sessions';let payload={};if(email){payload.email=email} if(password){payload.password=password} -return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://localhost:2444/auth/oauth2/success',failure='https://localhost:2444/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} +return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')} let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success} if(failure){payload.failure=failure} payload.project=config.project;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');window.location=config.endpoint+path+((query)?'?'+query:'')},deleteSession:function(sessionId){if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"')}