@smartico/public-api 0.0.282 → 0.0.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/README.md +1 -0
- package/docs/classes/WSAPI.md +21 -0
- package/docs/interfaces/TLevel.md +6 -0
- package/docs/interfaces/TLevelCurrent.md +139 -0
- package/package.json +1 -1
package/docs/README.md
CHANGED
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
- [TMiniGameTemplate](interfaces/TMiniGameTemplate.md)
|
|
107
107
|
- [TUserProfile](interfaces/TUserProfile.md)
|
|
108
108
|
- [TLevel](interfaces/TLevel.md)
|
|
109
|
+
- [TLevelCurrent](interfaces/TLevelCurrent.md)
|
|
109
110
|
- [TTournament](interfaces/TTournament.md)
|
|
110
111
|
- [TTournamentDetailed](interfaces/TTournamentDetailed.md)
|
|
111
112
|
- [TStoreCategory](interfaces/TStoreCategory.md)
|
package/docs/classes/WSAPI.md
CHANGED
|
@@ -98,6 +98,27 @@ _smartico.vapi('EN').getLevels().then((result) => {
|
|
|
98
98
|
|
|
99
99
|
___
|
|
100
100
|
|
|
101
|
+
### getCurrentLevel
|
|
102
|
+
|
|
103
|
+
▸ **getCurrentLevel**(): `Promise`\<[`TLevelCurrent`](../interfaces/TLevelCurrent.md)\>
|
|
104
|
+
|
|
105
|
+
Returns the current level of the user with extended information including ordinal position and progress.
|
|
106
|
+
|
|
107
|
+
**Example**:
|
|
108
|
+
```
|
|
109
|
+
_smartico.api.getCurrentLevel().then((result) => {
|
|
110
|
+
console.log(result);
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Visitor mode: not supported**
|
|
115
|
+
|
|
116
|
+
#### Returns
|
|
117
|
+
|
|
118
|
+
`Promise`\<[`TLevelCurrent`](../interfaces/TLevelCurrent.md)\>
|
|
119
|
+
|
|
120
|
+
___
|
|
121
|
+
|
|
101
122
|
### getMissions
|
|
102
123
|
|
|
103
124
|
▸ **getMissions**(`«destructured»?`): `Promise`\<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
@@ -5,6 +5,12 @@ There is no order of the levels, but it can be calculated using required_points
|
|
|
5
5
|
The current level of user can be taken from the user object using ach_level_current_id property
|
|
6
6
|
The progress to the next level can be calculated using ach_points_ever and required_points properties of next level
|
|
7
7
|
|
|
8
|
+
## Hierarchy
|
|
9
|
+
|
|
10
|
+
- **`TLevel`**
|
|
11
|
+
|
|
12
|
+
↳ [`TLevelCurrent`](TLevelCurrent.md)
|
|
13
|
+
|
|
8
14
|
## Properties
|
|
9
15
|
|
|
10
16
|
### id
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Interface: TLevelCurrent
|
|
2
|
+
|
|
3
|
+
TLevelCurrent describes the information of each level defined in the system along with ordinal position and progress of the current level
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`TLevel`](TLevel.md)
|
|
8
|
+
|
|
9
|
+
↳ **`TLevelCurrent`**
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### id
|
|
14
|
+
|
|
15
|
+
• **id**: `number`
|
|
16
|
+
|
|
17
|
+
The ID of the Level
|
|
18
|
+
|
|
19
|
+
#### Inherited from
|
|
20
|
+
|
|
21
|
+
[TLevel](TLevel.md).[id](TLevel.md#id)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### name
|
|
26
|
+
|
|
27
|
+
• **name**: `string`
|
|
28
|
+
|
|
29
|
+
The name of the Level, translated to the user language
|
|
30
|
+
|
|
31
|
+
#### Inherited from
|
|
32
|
+
|
|
33
|
+
[TLevel](TLevel.md).[name](TLevel.md#name)
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### description
|
|
38
|
+
|
|
39
|
+
• **description**: `string`
|
|
40
|
+
|
|
41
|
+
The description of the Level, translated to the user language
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[TLevel](TLevel.md).[description](TLevel.md#description)
|
|
46
|
+
|
|
47
|
+
___
|
|
48
|
+
|
|
49
|
+
### image
|
|
50
|
+
|
|
51
|
+
• **image**: `string`
|
|
52
|
+
|
|
53
|
+
The URL of the image of the Level
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
[TLevel](TLevel.md).[image](TLevel.md#image)
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### required\_points
|
|
62
|
+
|
|
63
|
+
• **required\_points**: `number`
|
|
64
|
+
|
|
65
|
+
The amount of points required to reach the Level
|
|
66
|
+
|
|
67
|
+
#### Inherited from
|
|
68
|
+
|
|
69
|
+
[TLevel](TLevel.md).[required_points](TLevel.md#required_points)
|
|
70
|
+
|
|
71
|
+
___
|
|
72
|
+
|
|
73
|
+
### visibility\_points
|
|
74
|
+
|
|
75
|
+
• **visibility\_points**: `number`
|
|
76
|
+
|
|
77
|
+
Number of points that user should collect in order to see this level
|
|
78
|
+
|
|
79
|
+
#### Inherited from
|
|
80
|
+
|
|
81
|
+
[TLevel](TLevel.md).[visibility_points](TLevel.md#visibility_points)
|
|
82
|
+
|
|
83
|
+
___
|
|
84
|
+
|
|
85
|
+
### required\_level\_counter\_1
|
|
86
|
+
|
|
87
|
+
• **required\_level\_counter\_1**: `number`
|
|
88
|
+
|
|
89
|
+
The counter of 1st metric used to reach the Level.
|
|
90
|
+
Relevant in case of using advanced leveling logic
|
|
91
|
+
https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
92
|
+
|
|
93
|
+
#### Inherited from
|
|
94
|
+
|
|
95
|
+
[TLevel](TLevel.md).[required_level_counter_1](TLevel.md#required_level_counter_1)
|
|
96
|
+
|
|
97
|
+
___
|
|
98
|
+
|
|
99
|
+
### required\_level\_counter\_2
|
|
100
|
+
|
|
101
|
+
• **required\_level\_counter\_2**: `number`
|
|
102
|
+
|
|
103
|
+
The counter of 2nd metric used to reach the Level.
|
|
104
|
+
Relevant in case of using advanced leveling logic
|
|
105
|
+
https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
106
|
+
|
|
107
|
+
#### Inherited from
|
|
108
|
+
|
|
109
|
+
[TLevel](TLevel.md).[required_level_counter_2](TLevel.md#required_level_counter_2)
|
|
110
|
+
|
|
111
|
+
___
|
|
112
|
+
|
|
113
|
+
### custom\_data
|
|
114
|
+
|
|
115
|
+
• **custom\_data**: `string`
|
|
116
|
+
|
|
117
|
+
Custom data as string or JSON string that can be used in API to build custom UI
|
|
118
|
+
You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
|
|
119
|
+
Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
|
|
120
|
+
|
|
121
|
+
#### Inherited from
|
|
122
|
+
|
|
123
|
+
[TLevel](TLevel.md).[custom_data](TLevel.md#custom_data)
|
|
124
|
+
|
|
125
|
+
___
|
|
126
|
+
|
|
127
|
+
### ordinal\_position
|
|
128
|
+
|
|
129
|
+
• **ordinal\_position**: `number`
|
|
130
|
+
|
|
131
|
+
The ordinal position of the level
|
|
132
|
+
|
|
133
|
+
___
|
|
134
|
+
|
|
135
|
+
### progress
|
|
136
|
+
|
|
137
|
+
• **progress**: `number`
|
|
138
|
+
|
|
139
|
+
The progress of the level
|