@smartico/public-api 0.0.355 → 0.0.356
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/dist/SmarticoAPI.d.ts +1 -1
- package/dist/WSAPI/WSAPI.d.ts +1 -30
- package/dist/WSAPI/WSAPITypes.d.ts +515 -32
- package/dist/index.d.ts +0 -1
- package/dist/index.js +66 -205
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -133
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +27 -0
- package/docs/api/classes/WSAPI.md +27 -47
- package/docs/api/enums/GPRoundStatus.md +43 -0
- package/docs/api/enums/GamePickMarketType.md +19 -0
- package/docs/api/enums/GamePickResolutionType.md +35 -0
- package/docs/api/enums/GamePickScoreType.md +19 -0
- package/docs/api/enums/GamePickSportType.md +375 -0
- package/docs/api/enums/GameRoundOrderType.md +35 -0
- package/docs/api/enums/PointChangeSourceType.md +6 -0
- package/docs/api/interfaces/AchRelatedGame-1.md +1 -1
- package/docs/api/interfaces/BonusTemplateMetaMap.md +1 -1
- package/docs/api/interfaces/GamePickBoardUser.md +75 -0
- package/docs/api/interfaces/GamePickEvent.md +121 -0
- package/docs/api/interfaces/GamePickEventMeta.md +181 -0
- package/docs/api/interfaces/GamePickGameInfo.md +27 -0
- package/docs/api/interfaces/GamePickRequestParams.md +41 -0
- package/docs/api/interfaces/GamePickRound.md +385 -0
- package/docs/api/interfaces/GamePickRoundBase.md +235 -0
- package/docs/api/interfaces/GamePickRoundBoard.md +361 -0
- package/docs/api/interfaces/GamePickRoundPublicMeta.md +103 -0
- package/docs/api/interfaces/GamePickRoundRequestParams.md +65 -0
- package/docs/api/interfaces/GamePickUserInfo.md +107 -0
- package/docs/api/interfaces/GamesApiResponse.md +33 -0
- package/docs/api/interfaces/QuizEventMeta.md +41 -0
- package/docs/api/interfaces/TInboxMessageBody.md +1 -1
- package/docs/api/interfaces/TLevel.md +1 -1
- package/docs/api/interfaces/TLevelCurrent.md +1 -1
- package/docs/api/interfaces/TMiniGamePrize.md +1 -1
- package/docs/api/interfaces/TMiniGameTemplate.md +2 -2
- package/docs/api/interfaces/TMissionOrBadge.md +2 -2
- package/docs/api/interfaces/TRaffle.md +2 -2
- package/docs/api/interfaces/TRaffleDraw.md +14 -2
- package/docs/api/interfaces/TRaffleDrawRun.md +20 -0
- package/docs/api/interfaces/TRafflePrize.md +1 -1
- package/docs/api/interfaces/TStoreItem.md +3 -3
- package/docs/api/interfaces/TTournament.md +4 -4
- package/docs/api/interfaces/TTournamentDetailed.md +4 -4
- package/docs/api/interfaces/TUICustomSection.md +1 -1
- package/package.json +6 -6
- package/src/SmarticoAPI.ts +1 -1
- package/src/WSAPI/WSAPI.ts +1 -37
- package/src/WSAPI/WSAPITypes.ts +525 -32
- package/src/index.ts +1 -2
- package/dist/GamePick/GPTypes.d.ts +0 -268
- package/dist/GamePick/index.d.ts +0 -1
- package/src/GamePick/GPTypes.ts +0 -277
- package/src/GamePick/index.ts +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Interface: GamePickRoundRequestParams
|
|
2
|
+
|
|
3
|
+
GamePickRoundRequestParams extends base params with a specific round ID
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- [`GamePickRequestParams`](GamePickRequestParams.md)
|
|
8
|
+
|
|
9
|
+
↳ **`GamePickRoundRequestParams`**
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### saw\_template\_id
|
|
14
|
+
|
|
15
|
+
• **saw\_template\_id**: `number`
|
|
16
|
+
|
|
17
|
+
ID of the MatchX or Quiz game template
|
|
18
|
+
|
|
19
|
+
#### Inherited from
|
|
20
|
+
|
|
21
|
+
[GamePickRequestParams](GamePickRequestParams.md).[saw_template_id](GamePickRequestParams.md#saw_template_id)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### ext\_user\_id
|
|
26
|
+
|
|
27
|
+
• **ext\_user\_id**: `string`
|
|
28
|
+
|
|
29
|
+
External user ID
|
|
30
|
+
|
|
31
|
+
#### Inherited from
|
|
32
|
+
|
|
33
|
+
[GamePickRequestParams](GamePickRequestParams.md).[ext_user_id](GamePickRequestParams.md#ext_user_id)
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### smartico\_ext\_user\_id
|
|
38
|
+
|
|
39
|
+
• **smartico\_ext\_user\_id**: `string`
|
|
40
|
+
|
|
41
|
+
Smartico external user ID used for platform API calls
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[GamePickRequestParams](GamePickRequestParams.md).[smartico_ext_user_id](GamePickRequestParams.md#smartico_ext_user_id)
|
|
46
|
+
|
|
47
|
+
___
|
|
48
|
+
|
|
49
|
+
### lang
|
|
50
|
+
|
|
51
|
+
• `Optional` **lang**: `string`
|
|
52
|
+
|
|
53
|
+
Language code for translations (e.g. 'EN', 'DE')
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
[GamePickRequestParams](GamePickRequestParams.md).[lang](GamePickRequestParams.md#lang)
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### round\_id
|
|
62
|
+
|
|
63
|
+
• **round\_id**: `number`
|
|
64
|
+
|
|
65
|
+
ID of the specific round
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Interface: GamePickUserInfo
|
|
2
|
+
|
|
3
|
+
GamePickUserInfo describes the current user's profile in the games system
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### ext\_user\_id
|
|
8
|
+
|
|
9
|
+
• **ext\_user\_id**: `string`
|
|
10
|
+
|
|
11
|
+
External user ID (Smartico numeric user ID)
|
|
12
|
+
|
|
13
|
+
___
|
|
14
|
+
|
|
15
|
+
### int\_user\_id
|
|
16
|
+
|
|
17
|
+
• **int\_user\_id**: `number`
|
|
18
|
+
|
|
19
|
+
Internal user ID within the games system
|
|
20
|
+
|
|
21
|
+
___
|
|
22
|
+
|
|
23
|
+
### public\_username
|
|
24
|
+
|
|
25
|
+
• **public\_username**: `string`
|
|
26
|
+
|
|
27
|
+
Display name
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### avatar\_url
|
|
32
|
+
|
|
33
|
+
• **avatar\_url**: `string`
|
|
34
|
+
|
|
35
|
+
URL of the user's avatar image
|
|
36
|
+
|
|
37
|
+
___
|
|
38
|
+
|
|
39
|
+
### gp\_position
|
|
40
|
+
|
|
41
|
+
• `Optional` **gp\_position**: `number`
|
|
42
|
+
|
|
43
|
+
User's leaderboard rank position
|
|
44
|
+
|
|
45
|
+
___
|
|
46
|
+
|
|
47
|
+
### full\_wins\_count
|
|
48
|
+
|
|
49
|
+
• `Optional` **full\_wins\_count**: `number`
|
|
50
|
+
|
|
51
|
+
Number of fully correct predictions
|
|
52
|
+
|
|
53
|
+
___
|
|
54
|
+
|
|
55
|
+
### part\_wins\_count
|
|
56
|
+
|
|
57
|
+
• `Optional` **part\_wins\_count**: `number`
|
|
58
|
+
|
|
59
|
+
Number of partially correct predictions
|
|
60
|
+
|
|
61
|
+
___
|
|
62
|
+
|
|
63
|
+
### resolution\_score
|
|
64
|
+
|
|
65
|
+
• `Optional` **resolution\_score**: `number`
|
|
66
|
+
|
|
67
|
+
User's total score
|
|
68
|
+
|
|
69
|
+
___
|
|
70
|
+
|
|
71
|
+
### last\_wallet\_sync\_time
|
|
72
|
+
|
|
73
|
+
• `Optional` **last\_wallet\_sync\_time**: `Date`
|
|
74
|
+
|
|
75
|
+
Last time the user's balance was synced from the Smartico platform
|
|
76
|
+
|
|
77
|
+
___
|
|
78
|
+
|
|
79
|
+
### ach\_points\_balance
|
|
80
|
+
|
|
81
|
+
• `Optional` **ach\_points\_balance**: `number`
|
|
82
|
+
|
|
83
|
+
User's current points balance
|
|
84
|
+
|
|
85
|
+
___
|
|
86
|
+
|
|
87
|
+
### ach\_gems\_balance
|
|
88
|
+
|
|
89
|
+
• `Optional` **ach\_gems\_balance**: `number`
|
|
90
|
+
|
|
91
|
+
User's current gems balance
|
|
92
|
+
|
|
93
|
+
___
|
|
94
|
+
|
|
95
|
+
### ach\_diamonds\_balance
|
|
96
|
+
|
|
97
|
+
• `Optional` **ach\_diamonds\_balance**: `number`
|
|
98
|
+
|
|
99
|
+
User's current diamonds balance
|
|
100
|
+
|
|
101
|
+
___
|
|
102
|
+
|
|
103
|
+
### pubic\_username\_set
|
|
104
|
+
|
|
105
|
+
• `Optional` **pubic\_username\_set**: `boolean`
|
|
106
|
+
|
|
107
|
+
Whether the user has set a custom public username
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Interface: GamesApiResponse\<T\>
|
|
2
|
+
|
|
3
|
+
GamesApiResponse is the standard response wrapper for all GamePick/Quiz API calls
|
|
4
|
+
|
|
5
|
+
## Type parameters
|
|
6
|
+
|
|
7
|
+
| Name |
|
|
8
|
+
| :------ |
|
|
9
|
+
| `T` |
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### errCode
|
|
14
|
+
|
|
15
|
+
• **errCode**: `number`
|
|
16
|
+
|
|
17
|
+
Error code: 0 on success, non-zero on failure
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### errMessage
|
|
22
|
+
|
|
23
|
+
• `Optional` **errMessage**: `string`
|
|
24
|
+
|
|
25
|
+
Human-readable error message when errCode is non-zero
|
|
26
|
+
|
|
27
|
+
___
|
|
28
|
+
|
|
29
|
+
### data
|
|
30
|
+
|
|
31
|
+
• `Optional` **data**: `T`
|
|
32
|
+
|
|
33
|
+
Response payload, present on success
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Interface: QuizEventMeta
|
|
2
|
+
|
|
3
|
+
QuizEventMeta describes metadata for a quiz-type event (custom question with answer options)
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
- **`QuizEventMeta`**
|
|
8
|
+
|
|
9
|
+
↳ [`GamePickEventMeta`](GamePickEventMeta.md)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### answers
|
|
14
|
+
|
|
15
|
+
• `Optional` **answers**: \{ `value`: `string` ; `text`: `string` ; `_translations`: \{ `[key: string]`: \{ `text`: `string` }; } }[]
|
|
16
|
+
|
|
17
|
+
List of possible answer options for the quiz question
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### question\_image
|
|
22
|
+
|
|
23
|
+
• `Optional` **question\_image**: `string`
|
|
24
|
+
|
|
25
|
+
URL of an image associated with the question
|
|
26
|
+
|
|
27
|
+
___
|
|
28
|
+
|
|
29
|
+
### result
|
|
30
|
+
|
|
31
|
+
• `Optional` **result**: [`QuizAnswersValueType`](../enums/QuizAnswersValueType.md)
|
|
32
|
+
|
|
33
|
+
Correct answer value after resolution
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### custom\_question
|
|
38
|
+
|
|
39
|
+
• **custom\_question**: `string`
|
|
40
|
+
|
|
41
|
+
Custom question text displayed to the user
|
|
@@ -32,7 +32,7 @@ ___
|
|
|
32
32
|
|
|
33
33
|
• **thumbnail**: `string`
|
|
34
34
|
|
|
35
|
-
URL of the icon of the mini-game template
|
|
35
|
+
URL of the icon of the mini-game template, 256x256px
|
|
36
36
|
|
|
37
37
|
___
|
|
38
38
|
|
|
@@ -147,7 +147,7 @@ ___
|
|
|
147
147
|
|
|
148
148
|
• **promo\_image**: `string`
|
|
149
149
|
|
|
150
|
-
The promo image
|
|
150
|
+
The promo image, 500x240px
|
|
151
151
|
|
|
152
152
|
___
|
|
153
153
|
|
|
@@ -56,7 +56,7 @@ ___
|
|
|
56
56
|
|
|
57
57
|
• **image**: `string`
|
|
58
58
|
|
|
59
|
-
URL of the image of the mission or badge
|
|
59
|
+
URL of the image of the mission or badge, 256x256px
|
|
60
60
|
|
|
61
61
|
___
|
|
62
62
|
|
|
@@ -228,7 +228,7 @@ ___
|
|
|
228
228
|
|
|
229
229
|
• `Optional` **ribbon**: `string`
|
|
230
230
|
|
|
231
|
-
The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
|
|
231
|
+
The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px
|
|
232
232
|
|
|
233
233
|
___
|
|
234
234
|
|
|
@@ -38,7 +38,7 @@ ___
|
|
|
38
38
|
|
|
39
39
|
• **image\_url**: `string`
|
|
40
40
|
|
|
41
|
-
URL of the image that represents the raffle
|
|
41
|
+
URL of the image that represents the raffle, 890x193px
|
|
42
42
|
|
|
43
43
|
___
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ ___
|
|
|
46
46
|
|
|
47
47
|
• **image\_url\_mobile**: `string`
|
|
48
48
|
|
|
49
|
-
URL of the mobile image that represents the raffle
|
|
49
|
+
URL of the mobile image that represents the raffle, 300x142px
|
|
50
50
|
|
|
51
51
|
___
|
|
52
52
|
|
|
@@ -31,7 +31,7 @@ ___
|
|
|
31
31
|
|
|
32
32
|
• **image\_url**: `string`
|
|
33
33
|
|
|
34
|
-
URL of the image that represents the draw
|
|
34
|
+
URL of the image that represents the draw, 365x175px
|
|
35
35
|
|
|
36
36
|
___
|
|
37
37
|
|
|
@@ -39,7 +39,7 @@ ___
|
|
|
39
39
|
|
|
40
40
|
• **image\_url\_mobile**: `string`
|
|
41
41
|
|
|
42
|
-
URL of the moible image that represents the draw
|
|
42
|
+
URL of the moible image that represents the draw, 300x145px
|
|
43
43
|
|
|
44
44
|
___
|
|
45
45
|
|
|
@@ -49,6 +49,10 @@ ___
|
|
|
49
49
|
|
|
50
50
|
URL of the icon that represents the draw
|
|
51
51
|
|
|
52
|
+
**`Remarks`**
|
|
53
|
+
|
|
54
|
+
Square icon target **256×256 px**
|
|
55
|
+
|
|
52
56
|
___
|
|
53
57
|
|
|
54
58
|
### background\_image\_url
|
|
@@ -57,6 +61,10 @@ ___
|
|
|
57
61
|
|
|
58
62
|
URL of the background image that will be used in the draw list item
|
|
59
63
|
|
|
64
|
+
**`Remarks`**
|
|
65
|
+
|
|
66
|
+
Desktop draw list strip: **900×85 px**.
|
|
67
|
+
|
|
60
68
|
___
|
|
61
69
|
|
|
62
70
|
### background\_image\_url\_mobile
|
|
@@ -65,6 +73,10 @@ ___
|
|
|
65
73
|
|
|
66
74
|
URL of the moible background image that will be used in the draw list item
|
|
67
75
|
|
|
76
|
+
**`Remarks`**
|
|
77
|
+
|
|
78
|
+
Mobile draw list background: **1328×240 px**.
|
|
79
|
+
|
|
68
80
|
___
|
|
69
81
|
|
|
70
82
|
### is\_grand
|
|
@@ -41,6 +41,10 @@ ___
|
|
|
41
41
|
|
|
42
42
|
URL of the image that represents the draw
|
|
43
43
|
|
|
44
|
+
**`Remarks`**
|
|
45
|
+
|
|
46
|
+
Same as [image_url](TRaffleDraw.md#image_url): **365×175 px** desktop promo.
|
|
47
|
+
|
|
44
48
|
___
|
|
45
49
|
|
|
46
50
|
### image\_url\_mobile
|
|
@@ -49,6 +53,10 @@ ___
|
|
|
49
53
|
|
|
50
54
|
URL of the moible image that represents the draw
|
|
51
55
|
|
|
56
|
+
**`Remarks`**
|
|
57
|
+
|
|
58
|
+
Same as [image_url_mobile](TRaffleDraw.md#image_url_mobile): **300×145 px** mobile promo.
|
|
59
|
+
|
|
52
60
|
___
|
|
53
61
|
|
|
54
62
|
### icon\_url
|
|
@@ -57,6 +65,10 @@ ___
|
|
|
57
65
|
|
|
58
66
|
URL of the icon that represents the draw
|
|
59
67
|
|
|
68
|
+
**`Remarks`**
|
|
69
|
+
|
|
70
|
+
Same as [icon_url](TRaffleDraw.md#icon_url): **256×256 px** square.
|
|
71
|
+
|
|
60
72
|
___
|
|
61
73
|
|
|
62
74
|
### background\_image\_url
|
|
@@ -65,6 +77,10 @@ ___
|
|
|
65
77
|
|
|
66
78
|
URL of the background image that will be used in the draw list item
|
|
67
79
|
|
|
80
|
+
**`Remarks`**
|
|
81
|
+
|
|
82
|
+
Same as [background_image_url](TRaffleDraw.md#background_image_url): **900×85 px**.
|
|
83
|
+
|
|
68
84
|
___
|
|
69
85
|
|
|
70
86
|
### background\_image\_url\_mobile
|
|
@@ -73,6 +89,10 @@ ___
|
|
|
73
89
|
|
|
74
90
|
URL of the moible background image that will be used in the draw list item
|
|
75
91
|
|
|
92
|
+
**`Remarks`**
|
|
93
|
+
|
|
94
|
+
Same as [background_image_url_mobile](TRaffleDraw.md#background_image_url_mobile): **1328×240 px**.
|
|
95
|
+
|
|
76
96
|
___
|
|
77
97
|
|
|
78
98
|
### is\_grand
|
|
@@ -32,7 +32,7 @@ ___
|
|
|
32
32
|
|
|
33
33
|
• **image**: `string`
|
|
34
34
|
|
|
35
|
-
URL of the image of the store item
|
|
35
|
+
URL of the image of the store item, 256x256px
|
|
36
36
|
|
|
37
37
|
___
|
|
38
38
|
|
|
@@ -56,7 +56,7 @@ ___
|
|
|
56
56
|
|
|
57
57
|
• **ribbon**: `string`
|
|
58
58
|
|
|
59
|
-
The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
|
|
59
|
+
The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px
|
|
60
60
|
|
|
61
61
|
___
|
|
62
62
|
|
|
@@ -213,7 +213,7 @@ ___
|
|
|
213
213
|
|
|
214
214
|
• `Optional` **custom\_ribbon\_image**: `string`
|
|
215
215
|
|
|
216
|
-
The custom ribbon image of the discounted price
|
|
216
|
+
The custom ribbon image of the discounted price, 250x300px
|
|
217
217
|
|
|
218
218
|
___
|
|
219
219
|
|
|
@@ -46,7 +46,7 @@ ___
|
|
|
46
46
|
|
|
47
47
|
• **image1**: `string`
|
|
48
48
|
|
|
49
|
-
1st image URL representing the tournament
|
|
49
|
+
1st image URL representing the tournament, 544×216px
|
|
50
50
|
|
|
51
51
|
___
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ ___
|
|
|
54
54
|
|
|
55
55
|
• **image2**: `string`
|
|
56
56
|
|
|
57
|
-
2nd image URL representing the tournament
|
|
57
|
+
2nd image URL representing the tournament, 920x200px
|
|
58
58
|
|
|
59
59
|
___
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ ___
|
|
|
62
62
|
|
|
63
63
|
• **image2\_mobile**: `string`
|
|
64
64
|
|
|
65
|
-
2nd image URL representing the tournament for mobile
|
|
65
|
+
2nd image URL representing the tournament for mobile, 720x400px
|
|
66
66
|
|
|
67
67
|
___
|
|
68
68
|
|
|
@@ -119,7 +119,7 @@ ___
|
|
|
119
119
|
|
|
120
120
|
• **ribbon**: `string`
|
|
121
121
|
|
|
122
|
-
The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
|
|
122
|
+
The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250×300px
|
|
123
123
|
|
|
124
124
|
___
|
|
125
125
|
|
|
@@ -62,7 +62,7 @@ ___
|
|
|
62
62
|
|
|
63
63
|
• **image1**: `string`
|
|
64
64
|
|
|
65
|
-
1st image URL representing the tournament
|
|
65
|
+
1st image URL representing the tournament, 544×216px
|
|
66
66
|
|
|
67
67
|
#### Inherited from
|
|
68
68
|
|
|
@@ -74,7 +74,7 @@ ___
|
|
|
74
74
|
|
|
75
75
|
• **image2**: `string`
|
|
76
76
|
|
|
77
|
-
2nd image URL representing the tournament
|
|
77
|
+
2nd image URL representing the tournament, 920x200px
|
|
78
78
|
|
|
79
79
|
#### Inherited from
|
|
80
80
|
|
|
@@ -86,7 +86,7 @@ ___
|
|
|
86
86
|
|
|
87
87
|
• **image2\_mobile**: `string`
|
|
88
88
|
|
|
89
|
-
2nd image URL representing the tournament for mobile
|
|
89
|
+
2nd image URL representing the tournament for mobile, 720x400px
|
|
90
90
|
|
|
91
91
|
#### Inherited from
|
|
92
92
|
|
|
@@ -171,7 +171,7 @@ ___
|
|
|
171
171
|
|
|
172
172
|
• **ribbon**: `string`
|
|
173
173
|
|
|
174
|
-
The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
|
|
174
|
+
The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250×300px
|
|
175
175
|
|
|
176
176
|
#### Inherited from
|
|
177
177
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartico/public-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.356",
|
|
4
4
|
"description": "Smartico public API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"typescript-map": "^0.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^18.19.130",
|
|
37
36
|
"@types/node-fetch": "^2.6.2",
|
|
38
37
|
"microbundle": "0.15.0",
|
|
39
38
|
"npm-run-all": "4.1.5",
|
|
40
|
-
"typedoc": "^0.
|
|
41
|
-
"typedoc-plugin-markdown": "^
|
|
42
|
-
"typedoc-plugin-merge-modules": "^
|
|
43
|
-
"typescript": "~5.1.0"
|
|
39
|
+
"typedoc": "^0.28.17",
|
|
40
|
+
"typedoc-plugin-markdown": "^4.11.0",
|
|
41
|
+
"typedoc-plugin-merge-modules": "^7.0.0",
|
|
42
|
+
"typescript": "~5.1.0",
|
|
43
|
+
"@types/node": "^18.19.130"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/src/SmarticoAPI.ts
CHANGED
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
GamePickRoundBoard,
|
|
140
140
|
GamePickUserInfo,
|
|
141
141
|
GamePickGameInfo,
|
|
142
|
-
} from './
|
|
142
|
+
} from './WSAPI/WSAPITypes';
|
|
143
143
|
|
|
144
144
|
const PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';
|
|
145
145
|
const C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';
|
package/src/WSAPI/WSAPI.ts
CHANGED
|
@@ -39,8 +39,6 @@ import {
|
|
|
39
39
|
TLevelCurrent,
|
|
40
40
|
TActivityLog,
|
|
41
41
|
TRaffleOptinResponse,
|
|
42
|
-
} from './WSAPITypes';
|
|
43
|
-
import {
|
|
44
42
|
GamesApiResponse,
|
|
45
43
|
GamePickRound,
|
|
46
44
|
GamePickRoundBoard,
|
|
@@ -48,7 +46,7 @@ import {
|
|
|
48
46
|
GamePickGameInfo,
|
|
49
47
|
GamePickRequestParams,
|
|
50
48
|
GamePickRoundRequestParams,
|
|
51
|
-
} from '
|
|
49
|
+
} from './WSAPITypes';
|
|
52
50
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
53
51
|
import {
|
|
54
52
|
JackpotDetails,
|
|
@@ -1403,40 +1401,6 @@ export class WSAPI {
|
|
|
1403
1401
|
return this.api.gpGetGameInfo(props.saw_template_id);
|
|
1404
1402
|
}
|
|
1405
1403
|
|
|
1406
|
-
/**
|
|
1407
|
-
* Returns translations for the MatchX/Quiz game UI.
|
|
1408
|
-
* Translations are returned as a key-value map for the Gamification and RetentionGames areas,
|
|
1409
|
-
* resolved to the current user's language.
|
|
1410
|
-
*
|
|
1411
|
-
* @param props.saw_template_id - The ID of the MatchX or Quiz game template
|
|
1412
|
-
*
|
|
1413
|
-
* **Response** `GamesApiResponse<any>`:
|
|
1414
|
-
* - `errCode` - 0 on success
|
|
1415
|
-
* - `data`:
|
|
1416
|
-
* - `translations` - Key-value map of translation strings (e.g. `rgSubmitSelection`, `rgLeaderboardTitle`, `quizConfirmAnswer`, etc.)
|
|
1417
|
-
* - `hash_code` - Hash for cache invalidation
|
|
1418
|
-
* - `lang_code` - Resolved language code (e.g. 'EN')
|
|
1419
|
-
*
|
|
1420
|
-
* **Example**:
|
|
1421
|
-
* ```
|
|
1422
|
-
* _smartico.api.getGamePickTranslations({
|
|
1423
|
-
* saw_template_id: 1083,
|
|
1424
|
-
* }).then((result) => {
|
|
1425
|
-
* const tr = result.data.translations;
|
|
1426
|
-
* console.log(tr.rgSubmitSelection); // "Submit selection"
|
|
1427
|
-
* console.log(tr.rgLeaderboardTitle); // "Leaderboard"
|
|
1428
|
-
* });
|
|
1429
|
-
* ```
|
|
1430
|
-
*
|
|
1431
|
-
* **Visitor mode: not supported**
|
|
1432
|
-
*/
|
|
1433
|
-
public async getGamePickTranslations(props: GamePickRequestParams): Promise<GamesApiResponse<any>> {
|
|
1434
|
-
if (!props.saw_template_id) {
|
|
1435
|
-
throw new Error('saw_template_id is required');
|
|
1436
|
-
}
|
|
1437
|
-
return this.api.gpGetTranslations(props.saw_template_id);
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
1404
|
/**
|
|
1441
1405
|
* Returns round data with events and picks for a specific user (identified by their internal user ID).
|
|
1442
1406
|
* Useful for viewing another user's predictions from the leaderboard.
|