From 9226568bb0f95bf7cc112d469520b3cb1dec4dca Mon Sep 17 00:00:00 2001 From: eldadfux Date: Tue, 8 Oct 2019 07:54:46 +0300 Subject: [PATCH 1/4] Updated service docs --- docs/services/account.md | 6 +++++- docs/services/auth.md | 4 ++-- docs/services/avatars.md | 6 +++++- docs/services/database.md | 6 ++---- docs/services/locale.md | 6 +++++- docs/services/storage.md | 2 +- docs/services/teams.md | 4 ++-- docs/services/users.md | 2 +- 8 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/services/account.md b/docs/services/account.md index cecc3e239..54985c7de 100644 --- a/docs/services/account.md +++ b/docs/services/account.md @@ -1 +1,5 @@ -The account service allow you to fetch and update information related to the currently logged in user. You can also retrieve a list of all the user sessions across different devices and a security log with the account recent activity. \ No newline at end of file +The account service allows you to fetch and update information related to the currently logged-in user. You can use the service to retrieve a list of all the user sessions across different devices and a security log with the recent account activity. + +Using the account service, you can also allow the logged-in user to update his account name, email, or passwords. + +This service also exposes an endpoint to save and read [user preferences](/docs/account#updatePrefs) as a key-value object. This feature is handy if you want to allow extra customization in your app. Common usage for this feature may include saving the user preferred locale, timezone, or custom app theme. The usage of this feature is only limited only by your imagination. \ No newline at end of file diff --git a/docs/services/auth.md b/docs/services/auth.md index ea2f2bcb9..8e18022b2 100644 --- a/docs/services/auth.md +++ b/docs/services/auth.md @@ -1,3 +1,3 @@ -The authentication service allows you to verify users accounts using basic email and password login or with a supported OAuth provider. The auth service also exposes methods to confirm users email account and recover users forgotten passwords. +The authentication service allows you to verify users' accounts using basic email and password login or with a supported OAuth provider. The auth service also exposes methods to confirm users' email account and recover users forgotten passwords. -You can review our currently available OAuth providers from your project console under the **'users'** menu. \ No newline at end of file +You can review and enable our currently available OAuth providers from your project console under the **'users -> providers'** menu. \ No newline at end of file diff --git a/docs/services/avatars.md b/docs/services/avatars.md index a0475bce9..e0ed2ebbc 100644 --- a/docs/services/avatars.md +++ b/docs/services/avatars.md @@ -1 +1,5 @@ -The avatars service aims to help you complete common and recitative tasks related to your app images, icons and avatars. Using this service we hope to save you some precious time and help you focus on solving your app real challenges. \ No newline at end of file +The avatars service aims to help you complete everyday tasks related to your app images, icons, and avatars. Using this service, we hope to save you some precious time and help you focus on solving your real app challenges. + +The Avatars service allows you to fetch countries' flags, browser icons, payment methods logos, websites favicons, generate QR codes, and manipulate remote images URLs. + +All endpoints in this service allow you to resize, crop, and change the output image quality to best fit in your app both in terms of look and performance. \ No newline at end of file diff --git a/docs/services/database.md b/docs/services/database.md index 84a0aa1b0..30a0f314e 100644 --- a/docs/services/database.md +++ b/docs/services/database.md @@ -1,7 +1,5 @@ -The database service allows you to create structured document collections, query and filter lists of documents and manage an advanced set of read and write access. - +The database service allows you to create structured document collections, query and filter lists of documents, and manage an advanced set of read and write access. All the data in the database service is stored in JSON format. The service also allows you to nest child documents and use advanced filters to search and query the database just like you would with a classic graph database. - -By leveraging the database permission management you can assign read or write access to the database documents for a specific user, team, user role or even grant public access to all visitors of your project. You can learn more about [how Appwrite handles permissions and role access control](/docs/permissions). \ No newline at end of file +By leveraging the database permission management, you can assign read or write access to the database documents for a specific user, team, user role, or even grant public access to all visitors to your project. You can learn more about [how Appwrite handles permissions and role access control](/docs/permissions). \ No newline at end of file diff --git a/docs/services/locale.md b/docs/services/locale.md index 060d45bf2..12cde8b8c 100644 --- a/docs/services/locale.md +++ b/docs/services/locale.md @@ -1 +1,5 @@ -The locale service allow you customize your app based on your user location. Get your user location, IP address, list of countries names, phone codes, currencies and more. This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com). \ No newline at end of file +The locale service allows you to customize your app based on your users' location. Using this service, you can get your users' location, IP address, list of countries and continents names, phone codes, currencies, and more. + +The user service supports multiple locales. This feature allows you to fetch countries and continents information in your app language. To switch locales, all you need to do is pass the 'X-Appwrite-Locale' header or set the 'setLocale' method using any of our available SDKs. [View here the list of available locales](https://github.com/appwrite/appwrite/blob/master/app/init.php#L13). + +This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com). \ No newline at end of file diff --git a/docs/services/storage.md b/docs/services/storage.md index 77253b4ee..822715463 100644 --- a/docs/services/storage.md +++ b/docs/services/storage.md @@ -2,4 +2,4 @@ The storage service allows you to manage your project files. You can upload, vie Each file is granted read and write permissions to manage who has access to view or manage it. You can also learn more about how to manage your [resources permissions](/docs/permissions). - You can also use the storage file preview endpoint to show the app users preview images of your files. The preview endpoint also allows you to manipulate the resulting image, so it will fit perfectly inside your app. \ No newline at end of file + You can also use the storage service file preview endpoint to show the app users' preview images of your files. The preview endpoint also allows you to manipulate the resulting image so that it will fit perfectly inside your app in terms of size and style. \ No newline at end of file diff --git a/docs/services/teams.md b/docs/services/teams.md index a074be96e..729975a02 100644 --- a/docs/services/teams.md +++ b/docs/services/teams.md @@ -1,3 +1,3 @@ -The teams' service allows you to group together users of your project and allow them to share read and write access to your project resources, such as, database documents or storage files. +The teams' service allows you to group users of your project and will enable them to share read and write access to your project resources, such as database documents or storage files. -Each user who creates a team becomes the team owner and can delegate the ownership role by inviting a new team member. Only team owners can invite new users to the team. \ No newline at end of file +Each user who creates a team becomes the team owner and can delegate the ownership role by inviting a new team member. Only team owners can invite new users to their team. \ No newline at end of file diff --git a/docs/services/users.md b/docs/services/users.md index b1d24362c..c3dba6dbe 100644 --- a/docs/services/users.md +++ b/docs/services/users.md @@ -1 +1 @@ -The users' service allows you to to manage your users in admin mode, you can search, block and view your users' current sessions and latest activity. \ No newline at end of file +The users' service allows you to manage your users in admin mode (AKA server-side integration). Use this service to search, block, and view your Users info, current sessions, and latest activities. You can also use the Users service to edit your users' preferences and personal info. \ No newline at end of file From cad690cf8b887a7085d07cb52bbf01f94c7f80d8 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Tue, 8 Oct 2019 10:09:35 +0300 Subject: [PATCH 2/4] Modes routes docs to md files --- CHANGES.md | 8 ++++++-- app/controllers/auth.php | 16 +++++++-------- app/controllers/avatars.php | 12 +++++------ app/controllers/database.php | 19 +++++++++--------- app/controllers/locale.php | 10 +++++----- app/controllers/storage.php | 16 +++++++-------- app/controllers/teams.php | 20 +++++++++---------- app/controllers/users.php | 20 +++++++++---------- ...sers-session.md => delete-user-session.md} | 0 docs/references/users/update-user-prefs.md | 1 + 10 files changed, 64 insertions(+), 58 deletions(-) rename docs/references/users/{delete-users-session.md => delete-user-session.md} (100%) create mode 100644 docs/references/users/update-user-prefs.md diff --git a/CHANGES.md b/CHANGES.md index 3f97b3706..7a9e43b64 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ -# Version 0.3.0 (PRE-RELEASE) +# Version 0.3.0 (PRE-RELEASE) - PLANNED -## Planned Issues +## Features * Added 7 new locales for locale service and email templates (af, ar, cz, hu, lt, no, ru, si, sv, ta, vi, zh-cn, zh-tw) * New users service routes to allow updates pref and name update @@ -11,6 +11,10 @@ * Allow electron apps to not pass origin header * New OAuth adapters (Amazon, Dropbox, Microsoft, Slack, VK) +## Breaking Changs + +* deleteUsersSession method name changed to deleteUserSession in all SDKs for better consistency + # Version 0.2.0 (PRE-RELEASE) ## Features diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 1d0e260c9..c1f2ec008 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -24,7 +24,7 @@ $utopia->post('/v1/auth/register') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'register') - ->label('sdk.description', '/docs/refernces/register.md') + ->label('sdk.description', '/docs/references/auth/register.md') ->label('sdk.cookies', true) ->label('abuse-limit', 10) ->param('email', '', function () { return new Email(); }, 'Account email') @@ -190,7 +190,7 @@ $utopia->post('/v1/auth/register/confirm') ->label('scope', 'public') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'confirm') - ->label('sdk.description', '/docs/refernces/confirm.md') + ->label('sdk.description', '/docs/references/auth/confirm.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{param-userId}') ->param('userId', '', function () { return new UID(); }, 'User unique ID') @@ -240,7 +240,7 @@ $utopia->post('/v1/auth/register/confirm/resend') ->label('scope', 'account') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'confirmResend') - ->label('sdk.description', '/docs/refernces/confirm-resend.md') + ->label('sdk.description', '/docs/references/auth/confirm-resend.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{param-userId}') ->param('confirm', '', function () use ($clients) { return new Host($clients); }, 'Confirmation URL to redirect user to your app after confirm token has been sent to user email.') @@ -304,7 +304,7 @@ $utopia->post('/v1/auth/login') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'login') - ->label('sdk.description', '/docs/refernces/login.md') + ->label('sdk.description', '/docs/references/auth/login.md') ->label('sdk.cookies', true) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') @@ -389,7 +389,7 @@ $utopia->delete('/v1/auth/logout') ->label('scope', 'account') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'logout') - ->label('sdk.description', '/docs/refernces/logout.md') + ->label('sdk.description', '/docs/references/auth/logout.md') ->label('abuse-limit', 100) ->action( function () use ($response, $request, $user, $projectDB, $audit, $webhook) { @@ -420,7 +420,7 @@ $utopia->delete('/v1/auth/logout/:id') ->label('scope', 'account') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'logoutBySession') - ->label('sdk.description', '/docs/refernces/logout-by-session.md') + ->label('sdk.description', '/docs/references/auth/logout-by-session.md') ->label('abuse-limit', 100) ->param('id', null, function () { return new UID(); }, 'User specific session unique ID number. if 0 delete all sessions.') ->action( @@ -453,7 +453,7 @@ $utopia->post('/v1/auth/recovery') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'recovery') - ->label('sdk.description', '/docs/refernces/recovery.md') + ->label('sdk.description', '/docs/references/auth/recovery.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') ->param('email', '', function () { return new Email(); }, 'User account email address.') @@ -533,7 +533,7 @@ $utopia->put('/v1/auth/recovery/reset') ->label('scope', 'auth') ->label('sdk.namespace', 'auth') ->label('sdk.method', 'recoveryReset') - ->label('sdk.description', '/docs/refernces/recovery-reset.md') + ->label('sdk.description', '/docs/references/auth/recovery-reset.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},userId:{param-userId}') ->param('userId', '', function () { return new UID(); }, 'User account email address.') diff --git a/app/controllers/avatars.php b/app/controllers/avatars.php index 0f4226449..8d6dcde88 100644 --- a/app/controllers/avatars.php +++ b/app/controllers/avatars.php @@ -94,7 +94,7 @@ $utopia->get('/v1/avatars/credit-cards/:code') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getCreditCard') - ->label('sdk.description', 'Need to display your users with your billing method or there payment methods? The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.') + ->label('sdk.description', '/docs/references/avatars/get-credit-cards.md') ->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('credit-cards', $code, $width, $height, $quality); }); @@ -107,7 +107,7 @@ $utopia->get('/v1/avatars/browsers/:code') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getBrowser') - ->label('sdk.description', 'You can use this endpoint to show different browser icons to your users, The code argument receives the browser code as appear in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.') + ->label('sdk.description', '/docs/references/avatars/get-browser.md') ->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('browsers', $code, $width, $height, $quality); }); @@ -120,7 +120,7 @@ $utopia->get('/v1/avatars/flags/:code') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getFlag') - ->label('sdk.description', 'You can use this endpoint to show different country flags icons to your users, The code argument receives the a 2 letter country code. Use width, height and quality arguments to change the output settings.') + ->label('sdk.description', '/docs/references/avatars/get-flag.md') ->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('flags', $code, $width, $height, $quality); }); @@ -132,7 +132,7 @@ $utopia->get('/v1/avatars/image') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getImage') - ->label('sdk.description', 'Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in cases, you want to make sure a 3rd party image is properly served using a TLS protocol.') + ->label('sdk.description', '/docs/references/avatars/get-image.md') ->action( function ($url, $width, $height) use ($response, $request, $version) { $quality = 80; @@ -197,7 +197,7 @@ $utopia->get('/v1/avatars/favicon') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getFavicon') - ->label('sdk.description', 'Use this endpoint to fetch the favorite icon (AKA favicon) of a any remote website URL.') + ->label('sdk.description', '/docs/references/avatars/get-favicon.md') ->action( function ($url) use ($response, $request, $version) { $width = 56; @@ -349,7 +349,7 @@ $utopia->get('/v1/avatars/qr') ->label('scope', 'avatars.read') ->label('sdk.namespace', 'avatars') ->label('sdk.method', 'getQR') - ->label('sdk.description', 'Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.') + ->label('sdk.description', '/docs/references/avatars/get-qr.md') ->action( function ($text, $size, $margin, $download) use ($response) { $renderer = new ImageRenderer( diff --git a/app/controllers/database.php b/app/controllers/database.php index 6b2a2460a..4b18b0a58 100644 --- a/app/controllers/database.php +++ b/app/controllers/database.php @@ -26,7 +26,7 @@ $utopia->get('/v1/database') ->label('scope', 'collections.read') ->label('sdk.namespace', 'database') ->label('sdk.method', 'listCollections') - ->label('sdk.description', 'Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project collections. [Learn more about different API modes](/docs/modes).') + ->label('sdk.description', '/docs/references/database/list-collections.md') ->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true) ->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, function () { return new Range(0, 40000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -73,7 +73,7 @@ $utopia->get('/v1/database/:collectionId') ->label('scope', 'collections.read') ->label('sdk.namespace', 'database') ->label('sdk.method', 'getCollection') - ->label('sdk.description', 'Get collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.') + ->label('sdk.description', '/docs/references/database/get-collection.md') ->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.') ->action( function ($collectionId) use ($response, $projectDB) { @@ -93,7 +93,7 @@ $utopia->post('/v1/database') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'createCollection') - ->label('sdk.description', 'Create a new Collection.') + ->label('sdk.description', '/docs/references/database/create-collection.md') ->param('name', '', function () { return new Text(256); }, 'Collection name.') ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true) @@ -160,7 +160,7 @@ $utopia->put('/v1/database/:collectionId') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'updateCollection') - ->label('sdk.description', 'Update collection by its unique ID.') + ->label('sdk.description', '/docs/references/database/update-collection.md') ->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.') ->param('name', null, function () { return new Text(256); }, 'Collection name.') ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) @@ -210,7 +210,7 @@ $utopia->delete('/v1/database/:collectionId') ->label('scope', 'collections.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'deleteCollection') - ->label('sdk.description', 'Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.') + ->label('sdk.description', '/docs/references/database/delete-collection.md') ->param('collectionId', '', function () { return new UID(); }, 'Collection unique ID.') ->action( function ($collectionId) use ($response, $projectDB, $audit) { @@ -239,7 +239,7 @@ $utopia->get('/v1/database/:collectionId/documents') ->label('scope', 'documents.read') ->label('sdk.namespace', 'database') ->label('sdk.method', 'listDocuments') - ->label('sdk.description', 'Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project documents. [Learn more about different API modes](/docs/modes).') + ->label('sdk.description', '/docs/references/database/list-documents.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID.') ->param('filters', [], function () { return new ArrayList(new Text(128)); }, 'Array of filter strings. Each filter is constructed from a key name, comparison operator (=, !=, >, <, <=, >=) and a value. You can also use a dot (.) separator in attribute names to filter by child document attributes. Examples: \'name=John Doe\' or \'category.$uid>=5bed2d152c362\'', true) ->param('offset', 0, function () { return new Range(0, 900000000); }, 'Offset value. Use this value to manage pagination.', true) @@ -305,7 +305,7 @@ $utopia->get('/v1/database/:collectionId/documents/:documentId') ->label('scope', 'documents.read') ->label('sdk.namespace', 'database') ->label('sdk.method', 'getDocument') - ->label('sdk.description', 'Get document by its unique ID. This endpoint response returns a JSON object with the document data.') + ->label('sdk.description', '/docs/references/database/get-document.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID') ->param('documentId', null, function () { return new UID(); }, 'Document unique ID') ->action( @@ -350,7 +350,7 @@ $utopia->post('/v1/database/:collectionId/documents') ->label('scope', 'documents.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'createDocument') - ->label('sdk.description', 'Create a new Document.') + ->label('sdk.description', '/docs/references/database/create-document.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID.') ->param('data', [], function () { return new \Utopia\Validator\Mock(); }, 'Document data as JSON string.') ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) @@ -456,6 +456,7 @@ $utopia->patch('/v1/database/:collectionId/documents/:documentId') ->label('scope', 'documents.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'updateDocument') + ->label('sdk.description', '/docs/references/database/update-document.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID') ->param('documentId', null, function () { return new UID(); }, 'Document unique ID') ->param('data', [], function () { return new \Utopia\Validator\Mock(); }, 'Document data as JSON string') @@ -532,7 +533,7 @@ $utopia->delete('/v1/database/:collectionId/documents/:documentId') ->label('scope', 'documents.write') ->label('sdk.namespace', 'database') ->label('sdk.method', 'deleteDocument') - ->label('sdk.description', 'Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted.') + ->label('sdk.description', '/docs/references/database/delete-document.md') ->param('collectionId', null, function () { return new UID(); }, 'Collection unique ID') ->param('documentId', null, function () { return new UID(); }, 'Document unique ID') ->action( diff --git a/app/controllers/locale.php b/app/controllers/locale.php index f9c68c2c4..1126701d6 100644 --- a/app/controllers/locale.php +++ b/app/controllers/locale.php @@ -11,7 +11,7 @@ $utopia->get('/v1/locale') ->label('scope', 'locale.read') ->label('sdk.namespace', 'locale') ->label('sdk.method', 'getLocale') - ->label('sdk.description', 'Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in supported language.') + ->label('sdk.description', '/docs/references/locale/get-locale.md') ->action( function () use ($response, $request, $utopia) { $eu = include __DIR__.'/../config/eu.php'; @@ -68,7 +68,7 @@ $utopia->get('/v1/locale/countries') ->label('scope', 'locale.read') ->label('sdk.namespace', 'locale') ->label('sdk.method', 'getCountries') - ->label('sdk.description', 'List of all countries. You can use the locale header to get the data in supported language.') + ->label('sdk.description', '/docs/references/locale/get-countires.md') ->action( function () use ($response, $request) { $list = Locale::getText('countries'); /* @var $list array */ @@ -84,7 +84,7 @@ $utopia->get('/v1/locale/countries/eu') ->label('scope', 'locale.read') ->label('sdk.namespace', 'locale') ->label('sdk.method', 'getCountriesEU') - ->label('sdk.description', 'List of all countries that are currently members of the EU. You can use the locale header to get the data in supported language. UK brexit date is currently set to 2019-10-31 and will be updated if and when needed.') + ->label('sdk.description', '/docs/references/locale/get-countries-eu.md') ->action( function () use ($response) { $countries = Locale::getText('countries'); /* @var $countries array */ @@ -108,7 +108,7 @@ $utopia->get('/v1/locale/countries/phones') ->label('scope', 'locale.read') ->label('sdk.namespace', 'locale') ->label('sdk.method', 'getCountriesPhones') - ->label('sdk.description', 'List of all countries phone codes. You can use the locale header to get the data in supported language.') + ->label('sdk.description', '/docs/references/locale/get-countries-phones.md') ->action( function () use ($response) { $list = include __DIR__.'/../config/phones.php'; /* @var $list array */ @@ -132,7 +132,7 @@ $utopia->get('/v1/locale/currencies') ->label('scope', 'locale.read') ->label('sdk.namespace', 'locale') ->label('sdk.method', 'getCurrencies') - ->label('sdk.description', 'List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language.') + ->label('sdk.description', '/docs/references/locale/get-currencies.md') ->action( function () use ($response) { $currencies = include __DIR__.'/../config/currencies.php'; diff --git a/app/controllers/storage.php b/app/controllers/storage.php index 81c1b6cea..964ecb85a 100644 --- a/app/controllers/storage.php +++ b/app/controllers/storage.php @@ -118,7 +118,7 @@ $utopia->get('/v1/storage/files') ->label('scope', 'files.read') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'listFiles') - ->label('sdk.description', 'Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project files. [Learn more about different API modes](/docs/modes).') + ->label('sdk.description', '/docs/references/storage/list-files.md') ->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true) ->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -150,7 +150,7 @@ $utopia->get('/v1/storage/files/:fileId') ->label('scope', 'files.read') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFile') - ->label('sdk.description', 'Get file by its unique ID. This endpoint response returns a JSON object with the file metadata.') + ->label('sdk.description', '/docs/references/storage/get-file.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') ->action( function ($fileId) use ($response, $projectDB) { @@ -169,7 +169,7 @@ $utopia->get('/v1/storage/files/:fileId/preview') ->label('scope', 'files.read') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFilePreview') - ->label('sdk.description', 'Get file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets will return file icon image. You can also pass query string arguments for cutting and resizing your preview image.') + ->label('sdk.description', '/docs/references/storage/get-file-preview.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID') ->param('width', 0, function () { return new Range(0, 4000); }, 'Resize preview image width, Pass an integer between 0 to 4000', true) ->param('height', 0, function () { return new Range(0, 4000); }, 'Resize preview image height, Pass an integer between 0 to 4000', true) @@ -281,7 +281,7 @@ $utopia->get('/v1/storage/files/:fileId/download') ->label('scope', 'files.read') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileDownload') - ->label('sdk.description', 'Get file content by its unique ID. The endpoint response return with a \'Content-Disposition: attachment\' header that tells the browser to start downloading the file to user downloads directory.') + ->label('sdk.description', '/docs/references/storage/get-file-download.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') ->action( function ($fileId) use ($response, $request, $projectDB) { @@ -331,7 +331,7 @@ $utopia->get('/v1/storage/files/:fileId/view') ->label('scope', 'files.read') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'getFileView') - ->label('sdk.description', 'Get file content by its unique ID. This endpoint is similar to the download method but returns with no \'Content-Disposition: attachment\' header.') + ->label('sdk.description', '/docs/references/storage/get-file-view.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') ->param('as', '', function () { return new WhiteList(['pdf', /*'html',*/ 'text']); }, 'Choose a file format to convert your file to. Currently you can only convert word and pdf files to pdf or txt. This option is currently experimental only, use at your own risk.', true) ->action( @@ -398,7 +398,7 @@ $utopia->post('/v1/storage/files') ->label('scope', 'files.write') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createFile') - ->label('sdk.description', 'Create a new file. The user who creates the file will automatically be assigned to read and write access unless he has passed custom values for read and write arguments.') + ->label('sdk.description', '/docs/references/storage/create-file.md') ->label('sdk.consumes', 'multipart/form-data') ->param('files', [], function () { return new File(); }, 'Binary Files.', false) ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) @@ -521,7 +521,7 @@ $utopia->put('/v1/storage/files/:fileId') ->label('scope', 'files.write') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'updateFile') - ->label('sdk.description', 'Update file by its unique ID. Only users with write permissions have access to update this resource.') + ->label('sdk.description', '/docs/references/storage/update-file.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') ->param('read', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions).', true) ->param('write', [], function () { return new ArrayList(new Text(64)); }, 'An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions).', true) @@ -555,7 +555,7 @@ $utopia->delete('/v1/storage/files/:fileId') ->label('scope', 'files.write') ->label('sdk.namespace', 'storage') ->label('sdk.method', 'deleteFile') - ->label('sdk.description', 'Delete a file by its unique ID. Only users with write permissions have access to delete this resource.') + ->label('sdk.description', '/docs/references/storage/delete-file.md') ->param('fileId', '', function () { return new UID(); }, 'File unique ID.') ->action( function ($fileId) use ($response, $projectDB, $audit, $usage) { diff --git a/app/controllers/teams.php b/app/controllers/teams.php index 84da0f23e..9ab3dfe53 100644 --- a/app/controllers/teams.php +++ b/app/controllers/teams.php @@ -23,7 +23,7 @@ $utopia->get('/v1/teams') ->label('scope', 'teams.read') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'listTeams') - ->label('sdk.description', 'Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project teams. [Learn more about different API modes](/docs/modes).') + ->label('sdk.description', '/docs/references/teams/list-teams.md') ->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true) ->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -51,7 +51,7 @@ $utopia->get('/v1/teams/:teamId') ->label('scope', 'teams.read') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'getTeam') - ->label('sdk.description', 'Get team by its unique ID. All team members have read access for this resource.') + ->label('sdk.description', '/docs/references/teams/get-team.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->action( function ($teamId) use ($response, $projectDB) { @@ -70,7 +70,7 @@ $utopia->get('/v1/teams/:teamId/members') ->label('scope', 'teams.read') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'getTeamMembers') - ->label('sdk.description', 'Get team members by the team unique ID. All team members have read access for this list of resources.') + ->label('sdk.description', '/docs/references/teams/get-team-members.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->action( function ($teamId) use ($response, $projectDB) { @@ -122,7 +122,7 @@ $utopia->post('/v1/teams') ->label('scope', 'teams.write') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'createTeam') - ->label('sdk.description', 'Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project.') + ->label('sdk.description', '/docs/references/teams/create-team.md') ->param('name', null, function () { return new Text(100); }, 'Team name.') ->param('roles', ['owner'], function () { return new ArrayList(new Text(128)); }, 'User roles array. Use this param to set the roles in the team for the user who created the team. The default role is **owner**, a role can be any string.', true) ->action( @@ -184,7 +184,7 @@ $utopia->put('/v1/teams/:teamId') ->label('scope', 'teams.write') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'updateTeam') - ->label('sdk.description', 'Update team by its unique ID. Only team owners have write access for this resource.') + ->label('sdk.description', '/docs/references/teams/update-team.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->param('name', null, function () { return new Text(100); }, 'Team name.') ->action( @@ -212,7 +212,7 @@ $utopia->delete('/v1/teams/:teamId') ->label('scope', 'teams.write') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'deleteTeam') - ->label('sdk.description', 'Delete team by its unique ID. Only team owners have write access for this resource.') + ->label('sdk.description', '/docs/references/teams/delete-team.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->action( function ($teamId) use ($response, $projectDB) { @@ -252,7 +252,7 @@ $utopia->post('/v1/teams/:teamId/memberships') ->label('scope', 'account') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'createTeamMembership') - ->label('sdk.description', "Use this endpoint to invite a new member to your team. An email with a link to join the team will be sent to the new member email address. If member doesn't exists in the project it will be automatically created.\n\nUse the redirect parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the /teams/{teamId}/memberships/{inviteId}/status endpoint to finally join the user to the team.\n\nPlease notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.") + ->label('sdk.description', '/docs/references/teams/create-team-membership.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->param('email', '', function () { return new Email(); }, 'New team member email address.') ->param('name', '', function () { return new Text(100); }, 'New team member name.', true) @@ -395,7 +395,7 @@ $utopia->post('/v1/teams/:teamId/memberships/:inviteId/resend') ->label('scope', 'account') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'createTeamMembershipResend') - ->label('sdk.description', 'Use this endpoint to resend your invitation email for a user to join a team.') + ->label('sdk.description', '/docs/references/teams/create-team-membership-resend.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID.') ->param('redirect', '', function () use ($clients) { return new Host($clients); }, 'Reset page to redirect user back to your app from the invitation email.') @@ -475,7 +475,7 @@ $utopia->patch('/v1/teams/:teamId/memberships/:inviteId/status') ->label('scope', 'auth') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'updateTeamMembershipStatus') - ->label('sdk.description', "Use this endpoint to let user accept an invitation to join a team after he is being redirect back to your app from the invitation email. Use the success and failure URL's to redirect users back to your application after the request completes.\n\nPlease notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.\n\nWhen not using the success or failure redirect arguments this endpoint will result with a 200 status code on success and with 401 status error on failure. This behavior was applied to help the web clients deal with browsers who don't allow to set 3rd party HTTP cookies needed for saving the account session token.") + ->label('sdk.description', '/docs/references/teams/update-team-membership-status.md') ->label('sdk.cookies', true) ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID') @@ -607,7 +607,7 @@ $utopia->delete('/v1/teams/:teamId/memberships/:inviteId') ->label('scope', 'account') ->label('sdk.namespace', 'teams') ->label('sdk.method', 'deleteTeamMembership') - ->label('sdk.description', 'This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member.') + ->label('sdk.description', '/docs/references/teams/delete-team-membership.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') ->param('inviteId', '', function () { return new UID(); }, 'Invite unique ID') ->action( diff --git a/app/controllers/users.php b/app/controllers/users.php index 7cc4b4ed3..eff5010ae 100644 --- a/app/controllers/users.php +++ b/app/controllers/users.php @@ -22,7 +22,7 @@ $utopia->get('/v1/users') ->label('scope', 'users.read') ->label('sdk.namespace', 'users') ->label('sdk.method', 'listUsers') - ->label('sdk.description', 'Get a list of all the project users. You can use the query params to filter your results.') + ->label('sdk.description', '/docs/references/users/list-users.md') ->param('search', '', function () { return new Text(256); }, 'Search term to filter your list results.', true) ->param('limit', 25, function () { return new Range(0, 100); }, 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, function () { return new Range(0, 2000); }, 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -74,7 +74,7 @@ $utopia->get('/v1/users/:userId') ->label('scope', 'users.read') ->label('sdk.namespace', 'users') ->label('sdk.method', 'getUser') - ->label('sdk.description', 'Get user by its unique ID.') + ->label('sdk.description', '/docs/references/users/get-user.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->action( function ($userId) use ($response, $projectDB, $providers) { @@ -113,7 +113,7 @@ $utopia->get('/v1/users/:userId/prefs') ->label('scope', 'users.read') ->label('sdk.namespace', 'users') ->label('sdk.method', 'getUserPrefs') - ->label('sdk.description', 'Get user preferences by its unique ID.') + ->label('sdk.description', '/docs/references/users/get-user-prefs.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->action( function ($userId) use ($response, $projectDB) { @@ -144,7 +144,7 @@ $utopia->get('/v1/users/:userId/sessions') ->label('scope', 'users.read') ->label('sdk.namespace', 'users') ->label('sdk.method', 'getUserSessions') - ->label('sdk.description', 'Get user sessions list by its unique ID.') + ->label('sdk.description', '/docs/references/users/get-user-sessions.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->action( function ($userId) use ($response, $projectDB) { @@ -206,7 +206,7 @@ $utopia->get('/v1/users/:userId/logs') ->label('scope', 'users.read') ->label('sdk.namespace', 'users') ->label('sdk.method', 'getUserLogs') - ->label('sdk.description', 'Get user activity logs list by its unique ID.') + ->label('sdk.description', '/docs/references/users/get-user-logs.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->action( function ($userId) use ($response, $register, $projectDB, $project) { @@ -267,7 +267,7 @@ $utopia->post('/v1/users') ->label('scope', 'users.write') ->label('sdk.namespace', 'users') ->label('sdk.method', 'createUser') - ->label('sdk.description', 'Create a new user.') + ->label('sdk.description', '/docs/references/users/create-user.md') ->param('email', '', function () { return new Email(); }, 'User account email.') ->param('password', '', function () { return new Password(); }, 'User account password.') ->param('name', '', function () { return new Text(100); }, 'User account name.', true) @@ -331,7 +331,7 @@ $utopia->patch('/v1/users/:userId/status') ->label('scope', 'users.write') ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateUserStatus') - ->label('sdk.description', 'Update user status by its unique ID.') + ->label('sdk.description', '/docs/references/users/update-user-status.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->param('status', '', function () { return new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED]); }, 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to blocking the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) ->action( @@ -360,9 +360,9 @@ $utopia->patch('/v1/users/:userId/prefs') ->label('scope', 'users.write') ->label('sdk.namespace', 'users') ->label('sdk.method', 'updateUserPrefs') + ->label('sdk.description', '/docs/references/users/update-user-prefs.md') ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->param('prefs', '', function () { return new \Utopia\Validator\Mock(); }, 'Prefs key-value JSON object string.') - ->label('sdk.description', 'Update user preferences by its unique ID. You can pass only the specific settings you wish to update.') ->action( function ($userId, $prefs) use ($response, $projectDB) { $user = $projectDB->getDocument($userId); @@ -387,8 +387,8 @@ $utopia->delete('/v1/users/:userId/sessions/:session') ->desc('Delete User Session') ->label('scope', 'users.write') ->label('sdk.namespace', 'users') - ->label('sdk.method', 'deleteUsersSession') - ->label('sdk.description', 'Delete user sessions by its unique ID.') + ->label('sdk.method', 'deleteUserSession') + ->label('sdk.description', '/docs/references/users/delete-user-session.md') ->label('abuse-limit', 100) ->param('userId', '', function () { return new UID(); }, 'User unique ID.') ->param('sessionId', null, function () { return new UID(); }, 'User unique session ID.') diff --git a/docs/references/users/delete-users-session.md b/docs/references/users/delete-user-session.md similarity index 100% rename from docs/references/users/delete-users-session.md rename to docs/references/users/delete-user-session.md diff --git a/docs/references/users/update-user-prefs.md b/docs/references/users/update-user-prefs.md new file mode 100644 index 000000000..b61a54c6a --- /dev/null +++ b/docs/references/users/update-user-prefs.md @@ -0,0 +1 @@ +Update user preferences by its unique ID. You can pass only the specific settings you wish to update. \ No newline at end of file From cffb1fd993b9a024810556303f29196a970b1926 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Tue, 8 Oct 2019 10:11:54 +0300 Subject: [PATCH 3/4] Updated Change Log --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7a9e43b64..81f860607 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,7 +13,7 @@ ## Breaking Changs -* deleteUsersSession method name changed to deleteUserSession in all SDKs for better consistency +* users/deleteUsersSession method name changed to users/deleteUserSession in all SDKs for better consistency # Version 0.2.0 (PRE-RELEASE) From bfc510cb56480bbcca38d5122cc4f2ba46a11c07 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Tue, 8 Oct 2019 10:21:54 +0300 Subject: [PATCH 4/4] Updated account routes --- app/controllers/account.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/account.php b/app/controllers/account.php index 1809ade66..ec92ade8f 100644 --- a/app/controllers/account.php +++ b/app/controllers/account.php @@ -18,7 +18,7 @@ $utopia->get('/v1/account') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'get') - ->label('sdk.description', 'Get currently logged in user data as JSON object.') + ->label('sdk.description', '/docs/references/account/get.md') ->action( function () use ($response, &$user, $providers) { $oauthKeys = []; @@ -50,7 +50,7 @@ $utopia->get('/v1/account/prefs') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'getPrefs') - ->label('sdk.description', 'Get currently logged in user preferences key-value object.') + ->label('sdk.description', '/docs/references/account/get-prefs.md') ->action( function () use ($response, $user) { $prefs = $user->getAttribute('prefs', '{}'); @@ -74,7 +74,7 @@ $utopia->get('/v1/account/sessions') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'getSessions') - ->label('sdk.description', 'Get currently logged in user list of active sessions across different devices.') + ->label('sdk.description', '/docs/references/account/get-sessions.md') ->action( function () use ($response, $user) { $tokens = $user->getAttribute('tokens', []); @@ -131,7 +131,7 @@ $utopia->get('/v1/account/security') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'getSecurity') - ->label('sdk.description', 'Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.') + ->label('sdk.description', '/docs/references/account/get-security.md') ->action( function () use ($response, $register, $project, $user) { $ad = new \Audit\Adapter\MySQL($register->get('db')); @@ -201,7 +201,7 @@ $utopia->patch('/v1/account/name') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateName') - ->label('sdk.description', 'Update currently logged in user account name.') + ->label('sdk.description', '/docs/references/account/update-name.md') ->param('name', '', function () { return new Text(100); }, 'User name') ->action( function ($name) use ($response, $user, $projectDB, $audit) { @@ -225,7 +225,7 @@ $utopia->patch('/v1/account/password') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePassword') - ->label('sdk.description', 'Update currently logged in user password. For validation, user is required to pass the password twice.') + ->label('sdk.description', '/docs/references/account/update-password.md') ->param('password', '', function () { return new Password(); }, 'New password') ->param('old-password', '', function () { return new Password(); }, 'Old password') ->action( @@ -254,7 +254,7 @@ $utopia->patch('/v1/account/email') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateEmail') - ->label('sdk.description', 'Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request.') + ->label('sdk.description', '/docs/references/account/update-email.md') ->param('email', '', function () { return new Email(); }, 'Email Address') ->param('password', '', function () { return new Password(); }, 'User Password') ->action( @@ -299,7 +299,7 @@ $utopia->patch('/v1/account/prefs') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePrefs') ->param('prefs', '', function () { return new \Utopia\Validator\Mock();}, 'Prefs key-value JSON object string.') - ->label('sdk.description', 'Update currently logged in user account preferences. You can pass only the specific settings you wish to update.') + ->label('sdk.description', '/docs/references/account/update-prefs.md') ->action( function ($prefs) use ($response, $user, $projectDB, $audit) { $user = $projectDB->updateDocument(array_merge($user->getArrayCopy(), [ @@ -322,7 +322,7 @@ $utopia->delete('/v1/account') ->label('scope', 'account') ->label('sdk.namespace', 'account') ->label('sdk.method', 'delete') - ->label('sdk.description', 'Delete currently logged in user account.') + ->label('sdk.description', '/docs/references/account/delete.md') ->action( function () use ($response, $request, $user, $projectDB, $audit) { $user = $projectDB->updateDocument(array_merge($user->getArrayCopy(), [