-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dbe843
commit 64e35e1
Showing
5 changed files
with
173 additions
and
131 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,61 @@ | ||
site_name: LunaCrew | Accounts-core | ||
site_description: Accounts Core API - Luna's User Management | ||
site_author: LunaCrew | ||
site_url: https://lunacrew.github.io/accounts-core | ||
|
||
repo_name: GitHub | ||
repo_url: https://github.com/LunaCrew/accounts-core | ||
|
||
docs_dir: pages | ||
site_dir: site | ||
|
||
nav: | ||
- Home: index.md | ||
- API: api.md | ||
- Architecture: architecture.md | ||
- Contribute: contribute.md | ||
- Stacks: stacks.md | ||
- References: references.md | ||
|
||
theme: | ||
name: material | ||
icon: | ||
repo: fontawesome/brands/github | ||
admonition: | ||
type: material/alert-circle | ||
logo: assets/luna.png | ||
favicon: assets/luna.png | ||
|
||
palette: | ||
# Default color palette | ||
- scheme: default | ||
toggle: | ||
icon: material/weather-night | ||
name: Switch to dark mode | ||
primary: brown | ||
accent: blue | ||
|
||
# Palette toggle for dark mode | ||
- scheme: slate | ||
toggle: | ||
icon: material/weather-sunny | ||
name: Switch to light mode | ||
primary: brown | ||
accent: blue | ||
|
||
features: | ||
- navigation.footer | ||
- navigation.top | ||
# - toc.integrate | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/LunaCrew | ||
|
||
markdown_extensions: | ||
- admonition | ||
- attr_list | ||
- pymdownx.superfences: | ||
custom_fences: | ||
- name: mermaid | ||
class: mermaid | ||
site_name: LunaCrew | Accounts-core | ||
site_description: Accounts Core API - Luna's User Management | ||
site_author: LunaCrew | ||
site_url: https://lunacrew.github.io/accounts-core | ||
|
||
repo_name: GitHub | ||
repo_url: https://github.com/LunaCrew/accounts-core | ||
|
||
docs_dir: pages | ||
site_dir: site | ||
|
||
nav: | ||
- Home: index.md | ||
- API: api.md | ||
- Architecture: architecture.md | ||
- Contribute: contribute.md | ||
- Stacks: stacks.md | ||
- References: references.md | ||
|
||
theme: | ||
name: material | ||
icon: | ||
repo: fontawesome/brands/github | ||
admonition: | ||
type: material/alert-circle | ||
logo: assets/luna.png | ||
favicon: assets/luna.png | ||
|
||
palette: | ||
# Default color palette | ||
- scheme: default | ||
toggle: | ||
icon: material/weather-night | ||
name: Switch to dark mode | ||
primary: brown | ||
accent: indigo | ||
|
||
# Palette toggle for dark mode | ||
- scheme: slate | ||
toggle: | ||
icon: material/weather-sunny | ||
name: Switch to light mode | ||
primary: brown | ||
accent: indigo | ||
|
||
features: | ||
- navigation.footer | ||
- navigation.top | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/LunaCrew | ||
|
||
markdown_extensions: | ||
- admonition | ||
- attr_list | ||
- pymdownx.superfences: | ||
custom_fences: | ||
- name: mermaid | ||
class: mermaid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,76 @@ | ||
# API | ||
|
||
!!! warning "In construction" | ||
This page is under construction. Please check back later. | ||
The `accounts-core` api provides management of the user accounts and transactional emails. | ||
|
||
## Create user | ||
|
||
Creates a new user with the schema bellow: | ||
|
||
!!! note "**POST**: `/api/user`" | ||
```json | ||
{ | ||
"name": "string", | ||
"email": "[email protected]", | ||
"password": "stringst", | ||
"settings": { | ||
"theme": "dark", // default | ||
"animations": true, // default | ||
"notificationType": "popup", // default | ||
"speechType": "neutral", // default | ||
"mfa": false, // default | ||
"language": "en-us" // default | ||
} | ||
} | ||
``` | ||
|
||
## Get user | ||
|
||
Retrieve user data. | ||
|
||
!!! abstract "**GET** `/api/user?params`" | ||
- id: `uuid` | ||
- email: `string` | ||
|
||
## Login | ||
|
||
Generates the session token for the user from its email. | ||
|
||
!!! info "**POST**: `/api/auth/login/:email`" | ||
- **email**: `string` | ||
|
||
## Update user | ||
|
||
Update one or more user configuration field. | ||
|
||
!!! note "**PATCH**: `/api/user/:id`" | ||
- **id**: `uuid` | ||
|
||
## Disable user | ||
|
||
Disable the user account and schedule it for exclusion. | ||
|
||
!!! warning "**POST**: `/api/user/:id`" | ||
- **id**: `uuid` | ||
|
||
## Delete user | ||
|
||
Permanently deletes the user account. | ||
|
||
!!! danger "**DELETE**: `/api/user/:id`" | ||
- **id**: `uuid` | ||
|
||
## Validate email | ||
|
||
Validate the email used on account creation. | ||
|
||
!!! info "**POST**: `/api/auth/email/validate/:id/:token`" | ||
- **id**: `uuid` | ||
- **token**: generated on account creation with 8 digits and alphanumeric. | ||
|
||
## Send verification code to email | ||
|
||
Send a new token to the user email. If `isEmailValidation` equals `true` it sets the account email status to not validated. | ||
|
||
!!! info "**POST**: `/api/auth/email/verify/:id?params`" | ||
- **id**: `uuid` | ||
- **isEmailValidation**: `boolean` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,14 @@ | |
"info": { | ||
"title": "Accounts Core API", | ||
"description": "API documentation for the Accounts Core service.", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"license": { | ||
"name": "AGPL-3.0", | ||
"url": "https://www.gnu.org/licenses/agpl-3.0.html" | ||
}, | ||
"contact": { | ||
"name": "Contact-us", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"externalDocs": { | ||
|
@@ -71,7 +75,8 @@ | |
"in": "query", | ||
"required": false, | ||
"schema": { | ||
"type": "string" | ||
"type": "string", | ||
"format": "email" | ||
} | ||
} | ||
], | ||
|
@@ -307,6 +312,15 @@ | |
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "isEmailValidation", | ||
"in": "query", | ||
"required": false, | ||
"schema": { | ||
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
], | ||
"responses": { | ||
|