:construction: Section under Construction :construction:
:construction: Section under Construction :construction:
\ No newline at end of file
# Timeseries doctypes
Each fluid has its own doctype wildcard and one doctype per time step. Each available time step for a fluid depends of the available data from the energy provider. Here are the different time step:
gaz fluid / grdf | **`com.grandlyon.grdf.*`** | **`com.grandlyon.grdf.hour`**<br>**`com.grandlyon.grdf.day`**<br>**`com.grandlyon.grdf.month`**<br>**`com.grandlyon.grdf.year`**
water fluid / eau du grand lyon | **`com.grandlyon.egl.*`** | **`com.grandlyon.egl.day`**<br>**`com.grandlyon.egl.month`**<br>**`com.grandlyon.egl.year`**
#### Structure
Field | Type | Description
----- | -----|------------
load | number | load (in kWh or L)
minute | number | minute of the date<br>*set to 0 except for minute serie*
hour | number | hour of the date<br>*set to 0 except for minute and hour series*
day | number | day of the date<br>*set to 1 for month and year series*
month | number | month of the date<br>*set to 1 for year series*
year | number | year of the date
#### Example
```
{
"load": 770.18,
"minute": 0,
"hour": 0,
"day": 1,
"month": 1,
"year": 2020
}
```
# User profile
#### Description
This doctype is used to store all information about the user.
#### Doctype
**`com.grandlyon.ecolyo.userprofile`**
#### Structure
Field | Type | Description
----- | -----|------------
level | number | challenge level of the user
challengeTypeHash | string | Hash used to verify the content of challenge type
ecogestureHash | string | Hash used to verify the content of ecogesture
haveSeenWelcomeModal | boolean | flag to inform is the user have seen the welcome modal
shortDescription | string | short description of the ecogesture
longDescription | string | long description of the ecogesture
usage | string | usage of the ecogesture
fluidTypes | FluidType[] | Array of fluid type on which ecogesture can have an impact<br><br>*FluidType enum:*<br>- *ELECTRICITY = 0*<br>- *WATER = 1*<br>- *GAS = 2*<br>- *MULTIFLUID = 3*
nwh | number | negawattheure - impact of the ecogesture from 0 to 10
pack | number | pack number of the ecogesture (1 pack contain 2 ecogestures)
iconName | string | icon name for ecogesture
unlocked | boolean| (Optional) state for unlocked ecogesture
#### Example
```
{
"shortName": "Contrôle du nuage",
"longName": "Je règle la température de mon eau chaude entre 55 et 60 °C.",
"shortDescription": "",
"longDescription": "Bien souvent les chauffe-eau sont réglés pour une température de 70 °C dans le ballon, ce qui n’est pas économique et peut même être dangereux !",
"usage": "Eau chaude sanitaire",
"fluidTypes": [
0
],
"nwh": 6,
"pack": 8
}
```
# Challenge type
#### Description
This doctype is used to store all available challenges.
#### Doctype
**`com.grandlyon.ecolyo.challengetype`**
#### Structure
Field | Type | Description
----- | -----|------------
type | TypeChallenge | type of challenge<br><br>*TypeChallenge enum:*<br>- *CHALLENGE = 0*<br>- *ACHIEVEMENT = 1*
title | string | title of the challenge
description | string | description of the challenge
level | number | level needed to unlock the challenge
duration | Duration | duration. (Duration from luxon)
fluidTypes | FluidType[] | Array of fluid type associated to the challenge<br><br>*FluidType enum:*<br>- *ELECTRICITY = 0*<br>- *WATER = 1*<br>- *GAS = 2*<br>- *MULTIFLUID = 3*
relationships | any | relation to available ecogestures for the challenge<br><br>*"availableEcogestures": {*<br>*"data": Ecogesture[]*<br>*}*
#### Example
```
{
"type": 1,
"title": "Ecolyo Royal",
"description": "Connecter l'application Ecolyo à votre distributeur d'énergie",
"level": 1,
"duration": {
"days": 0
},
"fluidTypes": [
0,
1,
2
],
"relationships": {
"availableEcogestures": {
"data": [
{
"_id": "0085",
"_type": "com.grandlyon.ecolyo.ecogesture"
},
{
"_id": "0092",
"_type": "com.grandlyon.ecolyo.ecogesture"
}
]
}
}
}
```
# User challenge
#### Description
This doctype is used to store all additionnal information about a challenge started or ended by the user.
#### Doctype
**`com.grandlyon.ecolyo.userchallenge`**
#### Structure
Field | Type | Description
----- | -----|------------
startingDate | string | starting date of the the challenge
endingDate | string | ending date of the challenge
state | ChallengeState | state of the challenge
maxEnergy | number |
currentEnergy | number |
badge | BadgeState | state of the badge<br><br>BadgeState enum<br>- *FAILED = 0*<br>- *SUCCESS = 1*
fluidTypes | FluidType[] | fluid types set when user launch the challenge<br><br>*FluidType enum:*<br>- *ELECTRICITY = 0*<br>- *WATER = 1*<br>- *GAS = 2*<br>- *MULTIFLUID = 3*
relationships | any | relation to the challenge type and selected ecogestures for the challenge<br><br>*"challengeType": {*<br>*"data": ChallengeType[]*<br>*}*<br><br>*"selectedEcogestures": {*<br>*"data": Ecogesture[]*<br>*}*