/*
# API version V1

> [Base URL: http://localhost:8000/api/v1/*]

Purpose to handle authentication with [JWT](https://jwt-auth.readthedocs.io/en/develop/quick-start/)

*/
/*
## Response
### 200
Success:
```js
  {
    "data": [] | {},
    "status": true
  }
```
Fail:
```js
    {
        "data": [] | {},
        "status": false
    }
```
### 203
* On/Off for button switch:
* Success/Fail:
```js
    {
        // no content
    }
```
### 400
* Validate fail.
* Fail:
```js
    {
        "attribute": [
            "The :attribute field is required.",
            ...
        ]
        ...
    }
```
### 401
* Unauthentication, not login.
* Fail:
```js
    {
        "message": "Token has expired"
    }
```
### 403
* Permission denied.
* Fail:
```js 
    {
        "message": "..."
    }
```
### 404
* Page not found.
* Fail:
```js 
    {
        "message": "The route {path} could not be found."
    }
```
### 500
* Server error.
* Fail:
```js 
    {
        "message": "..."
    }
```
### 503
* Server maintain.
* Fail:
```js 
    {
        "message": "..."
    }
```
*/
@url=http://localhost:8000
@token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvYXBpL3YxL2xvZ2luIiwiaWF0IjoxNzAwMTIyNzkwLCJleHAiOjE3MDAxMjYzOTAsIm5iZiI6MTcwMDEyMjc5MCwianRpIjoiT1FyWW9mazkwWXJSTnlyWSIsInN1YiI6IjEiLCJwcnYiOiI5Yjk4MmUxNDA4MzM2MmVjMmViZjE4MDQxM2NmNGVlMGFjM2VkY2U4In0.VT1-FwvSdMsbHiJ6-dQfoH3LfF2_14GxzgYbQWdRATc

{{
    exports.defaultHeaders = {
        "Content-Type": "application/json",
        "Accept": "application/json" 
    }
}}
###
# @name logout
POST {{url}}/api/v1/logout
...defaultHeaders
Authorization: Bearer {{token}}

HTTP/1.1 200  - OK
host: localhost:8000
date: Thu, 16 Nov 2023 08:20:13 GMT, Thu, 16 Nov 2023 08:20:13 GMT
connection: close
x-powered-by: PHP/8.2.11
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
phpdebugbar-id: X29245e892030a261594af408e13086a3
access-control-allow-origin: *
###
# @name login
POST {{url}}/api/v1/login
...defaultHeaders
{
    "email": "admin@apactech.io",
    "password": "admin123"
}

HTTP/1.1 200  - OK
date: Wed, 15 Nov 2023 07:53:31 GMT
server: Apache/2.4.58 (Unix)
x-powered-by: PHP/8.1.25
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
phpdebugbar-id: Xf53438d0027647cec2211e26f376006b
access-control-allow-origin: *
connection: close
transfer-encoding: chunked
content-type: application/json
###
# @name register
POST {{url}}/api/v1/register
...defaultHeaders
{
    "name": "kai.t",
    "email": "kai.t@apachtech.io",
    "password": "kai.t123"
}

HTTP/1.1 400  - Bad Request
date: Wed, 15 Nov 2023 08:15:31 GMT
server: Apache/2.4.58 (Unix)
x-powered-by: PHP/8.1.25
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
phpdebugbar-id: X740ed6622628ede300ed7be424860462
access-control-allow-origin: *
connection: close
transfer-encoding: chunked
content-type: application/json; charset=utf-8
###
# @name get-users
GET {{url}}/api/v1/users
...defaultHeaders
Authorization: Bearer {{token}}

HTTP/1.1 401  - Unauthorized
date: Wed, 15 Nov 2023 08:15:35 GMT
server: Apache/2.4.58 (Unix)
vary: Authorization
x-powered-by: PHP/8.1.25
www-authenticate: jwt-auth
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
phpdebugbar-id: X9d6118350a6e5a23aea55d495a056cc6
access-control-allow-origin: *
connection: close
transfer-encoding: chunked
content-type: application/json