@smartico/public-api 0.0.140 → 0.0.142
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/OCache.d.ts +1 -0
- package/dist/Quiz/MarketsInfo.d.ts +8 -0
- package/dist/Quiz/MarketsType.d.ts +3 -1
- package/dist/SmarticoAPI.d.ts +13 -13
- package/dist/WSAPI/WSAPI.d.ts +249 -48
- package/dist/index.js +381 -129
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +314 -106
- package/dist/index.modern.mjs.map +1 -1
- package/docs/classes/WSAPI.md +205 -27
- package/package.json +1 -1
- package/src/Level/GetLevelMapResponse.ts +1 -1
- package/src/OCache.ts +5 -0
- package/src/Quiz/MarketsInfo.ts +17 -16
- package/src/Quiz/MarketsType.ts +4 -1
- package/src/SmarticoAPI.ts +30 -32
- package/src/WSAPI/WSAPI.ts +270 -63
package/dist/OCache.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export declare class OCache {
|
|
|
11
11
|
static use<T>(oKey: any, cacheContext: ECacheContext, f: () => Promise<T>, ttlSeconds?: number): Promise<T>;
|
|
12
12
|
static clear(cacheContext: ECacheContext, oKey: any): Promise<void>;
|
|
13
13
|
static clearContext(cacheContext: ECacheContext): Promise<void>;
|
|
14
|
+
static clearAll(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { MarketsValueType } from "./MarketsAnswersType";
|
|
2
2
|
import { QuizMarketType } from "./MarketsType";
|
|
3
|
+
export declare const quizAnswerHomeTeamReplacementText = "{quiz_home_team}";
|
|
4
|
+
export declare const quizAnswerAwayTeamReplacementText = "{quiz_away_team}";
|
|
5
|
+
export declare const quizDrawReplacementText = "{quiz_draw}";
|
|
6
|
+
export declare const quizYesReplacementText = "{yes}";
|
|
7
|
+
export declare const quizNoReplacementText = "{no}";
|
|
8
|
+
export declare const quizOddReplacementText = "{odd}";
|
|
9
|
+
export declare const quizEvenReplacementText = "{even}";
|
|
10
|
+
export declare const quizOrReplacementText = "{or}";
|
|
3
11
|
export declare const marketsInfo: {
|
|
4
12
|
type: QuizMarketType;
|
|
5
13
|
name: string;
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { GetLevelMapResponse } from "./Level";
|
|
|
13
13
|
import { WSAPI } from "./WSAPI/WSAPI";
|
|
14
14
|
import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult } from "./WSAPI/WSAPITypes";
|
|
15
15
|
import { GetAchievementsUserInfoResponse } from "./Core/GetAchievementsUserInfoResponse";
|
|
16
|
-
import {
|
|
16
|
+
import { GetJackpotsPotsResponse, GetJackpotsResponse, JackpotsOptinResponse, JackpotsOptoutResponse } from "./Jackpots";
|
|
17
17
|
interface Tracker {
|
|
18
18
|
label_api_key: string;
|
|
19
19
|
userPublicProps: any;
|
|
@@ -60,17 +60,17 @@ declare class SmarticoAPI {
|
|
|
60
60
|
jackpotGet(user_ext_id: string, filter?: {
|
|
61
61
|
related_game_id?: string;
|
|
62
62
|
jp_template_id?: number;
|
|
63
|
-
}): Promise<
|
|
63
|
+
}, force_language?: string): Promise<GetJackpotsResponse>;
|
|
64
64
|
potGet(user_ext_id: string, filter: {
|
|
65
65
|
jp_template_ids: number[];
|
|
66
|
-
}): Promise<
|
|
66
|
+
}): Promise<GetJackpotsPotsResponse>;
|
|
67
67
|
jackpotOptIn(user_ext_id: string, payload: {
|
|
68
68
|
jp_template_id: number;
|
|
69
69
|
}): Promise<JackpotsOptinResponse>;
|
|
70
70
|
jackpotOptOut(user_ext_id: string, payload: {
|
|
71
71
|
jp_template_id: number;
|
|
72
72
|
}): Promise<JackpotsOptoutResponse>;
|
|
73
|
-
sawGetTemplates(user_ext_id: string,
|
|
73
|
+
sawGetTemplates(user_ext_id: string, force_language?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
|
|
74
74
|
sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
|
|
75
75
|
doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
|
|
76
76
|
sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse>;
|
|
@@ -79,27 +79,27 @@ declare class SmarticoAPI {
|
|
|
79
79
|
registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse>;
|
|
80
80
|
buyStoreItem(user_ext_id: string, itemId: number): Promise<BuyStoreItemResponse>;
|
|
81
81
|
inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise<GetInboxMessagesResponse>;
|
|
82
|
-
storeGetItems(user_ext_id: string): Promise<GetStoreItemsResponse>;
|
|
82
|
+
storeGetItems(user_ext_id: string, force_language?: string): Promise<GetStoreItemsResponse>;
|
|
83
83
|
storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]>;
|
|
84
|
-
storeGetCategories(user_ext_id: string): Promise<GetCategoriesStoreResponse>;
|
|
84
|
+
storeGetCategories(user_ext_id: string, force_language?: string): Promise<GetCategoriesStoreResponse>;
|
|
85
85
|
storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]>;
|
|
86
86
|
storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise<GetStoreHistoryResponse>;
|
|
87
87
|
storeGetPurchasedItemsT(user_ext_id: string, limit?: number, offset?: number): Promise<TStoreItem[]>;
|
|
88
|
-
missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
|
|
88
|
+
missionsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse>;
|
|
89
89
|
missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
|
|
90
90
|
getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse>;
|
|
91
91
|
getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT>;
|
|
92
|
-
achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse>;
|
|
92
|
+
achGetCategories(user_ext_id: string, force_language?: string): Promise<GetAchCategoriesResponse>;
|
|
93
93
|
achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]>;
|
|
94
|
-
badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
|
|
94
|
+
badgetsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse>;
|
|
95
95
|
badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
|
|
96
|
-
tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse>;
|
|
96
|
+
tournamentsGetLobby(user_ext_id: string, force_language?: string): Promise<GetTournamentsResponse>;
|
|
97
97
|
tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]>;
|
|
98
|
-
tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number): Promise<GetTournamentInfoResponse>;
|
|
98
|
+
tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number, force_language?: string): Promise<GetTournamentInfoResponse>;
|
|
99
99
|
tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed>;
|
|
100
|
-
leaderboardGet(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetails>;
|
|
100
|
+
leaderboardGet(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean, force_language?: string): Promise<LeaderBoardDetails>;
|
|
101
101
|
leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
102
|
-
levelsGet(user_ext_id: string): Promise<GetLevelMapResponse>;
|
|
102
|
+
levelsGet(user_ext_id: string, force_language?: string): Promise<GetLevelMapResponse>;
|
|
103
103
|
levelsGetT(user_ext_id: string): Promise<TLevel[]>;
|
|
104
104
|
getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
|
|
105
105
|
getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean): Promise<GetInboxMessagesResponse>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -10,37 +10,49 @@ export declare class WSAPI {
|
|
|
10
10
|
/** @private */
|
|
11
11
|
constructor(api: SmarticoAPI);
|
|
12
12
|
/** Returns information about current user
|
|
13
|
-
*
|
|
13
|
+
*
|
|
14
|
+
* **Example**:
|
|
14
15
|
* ```
|
|
15
16
|
* _smartico.api.getUserProfile().then((result) => {
|
|
16
17
|
* console.log(result);
|
|
17
18
|
* });
|
|
18
19
|
* ```
|
|
20
|
+
* **Visitor mode: not supported**
|
|
19
21
|
* */
|
|
20
22
|
getUserProfile(): TUserProfile;
|
|
21
23
|
/** Check if user belongs to specific segments
|
|
22
|
-
* Example
|
|
24
|
+
* **Example**:
|
|
23
25
|
* ```
|
|
24
26
|
* _smartico.api.checkSegmentMatch(1).then((result) => {
|
|
25
27
|
* console.log(result);
|
|
26
28
|
* });
|
|
27
29
|
* ```
|
|
30
|
+
*
|
|
31
|
+
* **Visitor mode: not supported**
|
|
28
32
|
*/
|
|
29
33
|
checkSegmentMatch(segment_id: number): Promise<boolean>;
|
|
30
34
|
/** Check if user belongs to specific list of segments
|
|
31
|
-
* Example
|
|
35
|
+
* **Example**:
|
|
32
36
|
* ```
|
|
33
37
|
* _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
|
|
34
38
|
* console.log(result);
|
|
35
39
|
* });
|
|
36
40
|
* ```
|
|
41
|
+
* **Visitor mode: not supported**
|
|
37
42
|
*/
|
|
38
43
|
checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
|
|
39
44
|
/** Returns all the levels available the current user
|
|
40
|
-
* Example
|
|
45
|
+
* **Example**:
|
|
41
46
|
* ```
|
|
42
47
|
* _smartico.api.getLevels().then((result) => {
|
|
43
|
-
*
|
|
48
|
+
* console.log(result);
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* **Example in the Visitor mode**:
|
|
53
|
+
* ```
|
|
54
|
+
* _smartico.vapi('EN').getLevels().then((result) => {
|
|
55
|
+
* console.log(result);
|
|
44
56
|
* });
|
|
45
57
|
* ```
|
|
46
58
|
*/
|
|
@@ -49,98 +61,241 @@ export declare class WSAPI {
|
|
|
49
61
|
* The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
50
62
|
* Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
51
63
|
* The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
|
|
52
|
-
*
|
|
64
|
+
*
|
|
65
|
+
* **Example**:
|
|
53
66
|
* ```
|
|
54
67
|
* _smartico.api.getMissions().then((result) => {
|
|
55
|
-
*
|
|
68
|
+
* console.log(result);
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **Example in the Visitor mode**:
|
|
73
|
+
* ```
|
|
74
|
+
* _smartico.vapi('EN').getMissions().then((result) => {
|
|
75
|
+
* console.log(result);
|
|
56
76
|
* });
|
|
57
77
|
* ```
|
|
58
|
-
/**
|
|
59
|
-
* @param params
|
|
60
78
|
*/
|
|
61
79
|
getMissions({ onUpdate }?: {
|
|
62
80
|
onUpdate?: (data: TMissionOrBadge[]) => void;
|
|
63
81
|
}): Promise<TMissionOrBadge[]>;
|
|
64
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Returns all the badges available the current user
|
|
84
|
+
*
|
|
85
|
+
* **Visitor mode: not supported**
|
|
86
|
+
*/
|
|
65
87
|
getBadges(): Promise<TMissionOrBadge[]>;
|
|
66
88
|
/**
|
|
67
89
|
* Returns the extra counters for the current user level.
|
|
68
90
|
* These are counters that are configured for each Smartico client separatly by request.
|
|
69
91
|
* For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
70
|
-
*
|
|
92
|
+
*
|
|
93
|
+
* **Example**:
|
|
71
94
|
* ```
|
|
72
95
|
* _smartico.api.getUserLevelExtraCounters().then((result) => {
|
|
73
96
|
* console.log(result);
|
|
74
97
|
* });
|
|
75
98
|
* ```
|
|
99
|
+
*
|
|
100
|
+
* **Visitor mode: not supported**
|
|
76
101
|
*/
|
|
77
102
|
getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* Returns all the store items available the current user
|
|
106
|
+
*
|
|
107
|
+
* **Example**:
|
|
80
108
|
* ```
|
|
81
109
|
* _smartico.api.getStoreItems().then((result) => {
|
|
82
110
|
* console.log(result);
|
|
83
111
|
* });
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* **Example in the Visitor mode**:
|
|
115
|
+
* ```
|
|
116
|
+
* _smartico.vapi('EN').getStoreItems().then((result) => {
|
|
117
|
+
* console.log(result);
|
|
118
|
+
* });
|
|
84
119
|
*/
|
|
85
120
|
getStoreItems(): Promise<TStoreItem[]>;
|
|
86
121
|
/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
87
|
-
* Example
|
|
122
|
+
* **Example**:
|
|
88
123
|
* ```
|
|
89
124
|
* _smartico.api.buyStoreItem(1).then((result) => {
|
|
90
125
|
* console.log(result);
|
|
91
126
|
* });
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* **Visitor mode: not supported**
|
|
92
130
|
*/
|
|
93
131
|
buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
|
|
94
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* Returns store categories
|
|
135
|
+
*
|
|
136
|
+
* **Example**:
|
|
137
|
+
* ```
|
|
138
|
+
* _smartico.api.getStoreCategories().then((result) => {
|
|
139
|
+
* console.log(result);
|
|
140
|
+
* });
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* **Example in the Visitor mode**:
|
|
144
|
+
* ```
|
|
145
|
+
* _smartico.vapi('EN').getStoreCategories().then((result) => {
|
|
146
|
+
* console.log(result);
|
|
147
|
+
* });
|
|
148
|
+
*/
|
|
95
149
|
getStoreCategories(): Promise<TStoreCategory[]>;
|
|
96
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
97
152
|
* The maximum number of items per request is limited to 20.
|
|
98
153
|
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
99
|
-
*
|
|
154
|
+
*
|
|
155
|
+
* **Example**:
|
|
100
156
|
* ```
|
|
101
157
|
* _smartico.api.getStorePurchasedItems().then((result) => {
|
|
102
158
|
* console.log(result);
|
|
103
159
|
* });
|
|
104
160
|
* ```
|
|
161
|
+
*
|
|
162
|
+
* **Visitor mode: not supported**
|
|
105
163
|
*/
|
|
106
164
|
getStorePurchasedItems({ limit, offset, onUpdate }?: {
|
|
107
165
|
limit?: number;
|
|
108
166
|
offset?: number;
|
|
109
167
|
onUpdate?: (data: TStoreItem[]) => void;
|
|
110
168
|
}): Promise<TStoreItem[]>;
|
|
111
|
-
/** Returns missions & badges categories */
|
|
112
|
-
getAchCategories(): Promise<TAchCategory[]>;
|
|
113
|
-
/** Returns the list of mini-games available for user
|
|
114
|
-
* The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
115
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback. */
|
|
116
169
|
/**
|
|
170
|
+
* Returns missions & badges categories
|
|
171
|
+
*
|
|
172
|
+
* **Example**:
|
|
173
|
+
* ```
|
|
174
|
+
* _smartico.api.getAchCategories().then((result) => {
|
|
175
|
+
* console.log(result);
|
|
176
|
+
* });
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* **Example in the Visitor mode**:
|
|
180
|
+
* ```
|
|
181
|
+
* _smartico.vapi('EN').getAchCategories().then((result) => {
|
|
182
|
+
* console.log(result);
|
|
183
|
+
* });
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* */
|
|
187
|
+
getAchCategories(): Promise<TAchCategory[]>;
|
|
117
188
|
/**
|
|
118
|
-
*
|
|
189
|
+
* Returns the list of mini-games available for user
|
|
190
|
+
* The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
191
|
+
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
192
|
+
*
|
|
193
|
+
* **Example**:
|
|
194
|
+
* ```
|
|
195
|
+
* _smartico.api.getMiniGames().then((result) => {
|
|
196
|
+
* console.log(result);
|
|
197
|
+
* });
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* **Example in the Visitor mode**:
|
|
201
|
+
* ```
|
|
202
|
+
* _smartico.vapi('EN').getMiniGames().then((result) => {
|
|
203
|
+
* console.log(result);
|
|
204
|
+
* });
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
119
207
|
*/
|
|
120
208
|
getMiniGames({ onUpdate }?: {
|
|
121
209
|
onUpdate?: (data: TMiniGameTemplate[]) => void;
|
|
122
210
|
}): Promise<TMiniGameTemplate[]>;
|
|
123
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
213
|
+
*
|
|
214
|
+
* **Visitor mode: not supported**
|
|
215
|
+
*/
|
|
124
216
|
playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
|
|
125
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
219
|
+
*
|
|
220
|
+
* **Visitor mode: not supported**
|
|
221
|
+
*/
|
|
126
222
|
requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
|
|
127
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* Request for claim reward for the specified mission id. Returns the err_code.
|
|
225
|
+
*
|
|
226
|
+
* **Visitor mode: not supported**
|
|
227
|
+
*/
|
|
128
228
|
requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
|
|
129
229
|
/** Returns all the active instances of tournaments
|
|
130
230
|
* The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
131
|
-
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
|
|
231
|
+
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
|
|
232
|
+
*
|
|
233
|
+
* **Example**:
|
|
234
|
+
* ```
|
|
235
|
+
* _smartico.api.getTournamentsList().then((result) => {
|
|
236
|
+
* console.log(result);
|
|
237
|
+
* });
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
* **Example in the Visitor mode**:
|
|
241
|
+
* ```
|
|
242
|
+
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
243
|
+
* console.log(result);
|
|
244
|
+
* });
|
|
245
|
+
* ```
|
|
246
|
+
* */
|
|
135
247
|
getTournamentsList({ onUpdate }?: {
|
|
136
248
|
onUpdate?: (data: TTournament[]) => void;
|
|
137
249
|
}): Promise<TTournament[]>;
|
|
138
|
-
/**
|
|
250
|
+
/**
|
|
251
|
+
* Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
252
|
+
*
|
|
253
|
+
* **Example**:
|
|
254
|
+
* ```
|
|
255
|
+
* _smartico.api.getTournamentsList().then((result) => {
|
|
256
|
+
* if (result.length > 0) {
|
|
257
|
+
* _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
258
|
+
* console.log(result);
|
|
259
|
+
* });
|
|
260
|
+
* }
|
|
261
|
+
* });
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
* **Example in the Visitor mode**:
|
|
265
|
+
* ```
|
|
266
|
+
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
267
|
+
* if (result.length > 0) {
|
|
268
|
+
* _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
269
|
+
* console.log(result);
|
|
270
|
+
* });
|
|
271
|
+
* }
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
139
275
|
getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
|
|
140
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* Requests registration for the specified tournament instance. Returns the err_code.
|
|
278
|
+
*
|
|
279
|
+
* **Visitor mode: not supported**
|
|
280
|
+
*/
|
|
141
281
|
registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
|
|
142
|
-
/**
|
|
143
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
284
|
+
* For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
285
|
+
*
|
|
286
|
+
* **Example**:
|
|
287
|
+
* ```
|
|
288
|
+
* _smartico.api.getLeaderBoard(1).then((result) => {
|
|
289
|
+
* console.log(result);
|
|
290
|
+
* });
|
|
291
|
+
* ```
|
|
292
|
+
*
|
|
293
|
+
* **Example in the Visitor mode**:
|
|
294
|
+
* ```
|
|
295
|
+
* _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
296
|
+
* console.log(result);
|
|
297
|
+
* });
|
|
298
|
+
* ```
|
|
144
299
|
*/
|
|
145
300
|
getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
146
301
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
@@ -149,8 +304,10 @@ export declare class WSAPI {
|
|
|
149
304
|
* This functions return list of messages without the body of the message.
|
|
150
305
|
* To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
151
306
|
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
152
|
-
* The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
|
|
153
|
-
|
|
307
|
+
* The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
|
|
308
|
+
*
|
|
309
|
+
* **Visitor mode: not supported**
|
|
310
|
+
*
|
|
154
311
|
* @param params
|
|
155
312
|
*/
|
|
156
313
|
getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
|
|
@@ -159,19 +316,45 @@ export declare class WSAPI {
|
|
|
159
316
|
onlyFavorite?: boolean;
|
|
160
317
|
onUpdate?: (data: TInboxMessage[]) => void;
|
|
161
318
|
}): Promise<TInboxMessage[]>;
|
|
162
|
-
/**
|
|
319
|
+
/**
|
|
320
|
+
* Returns the message body of the specified message guid.
|
|
321
|
+
*
|
|
322
|
+
* **Visitor mode: not supported**
|
|
323
|
+
*/
|
|
163
324
|
getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
|
|
164
|
-
/**
|
|
325
|
+
/**
|
|
326
|
+
* Requests to mark inbox message with specified guid as read
|
|
327
|
+
*
|
|
328
|
+
* **Visitor mode: not supported**
|
|
329
|
+
*/
|
|
165
330
|
markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
|
|
166
|
-
/**
|
|
331
|
+
/**
|
|
332
|
+
* Requests to mark all inbox messages as rea
|
|
333
|
+
*
|
|
334
|
+
* **Visitor mode: not supported**
|
|
335
|
+
*/
|
|
167
336
|
markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
|
|
168
|
-
/**
|
|
337
|
+
/**
|
|
338
|
+
* Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
339
|
+
*
|
|
340
|
+
* **Visitor mode: not supported**
|
|
341
|
+
*/
|
|
169
342
|
markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
|
|
170
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* Requests to delete inbox message
|
|
345
|
+
*
|
|
346
|
+
* **Visitor mode: not supported**
|
|
347
|
+
*/
|
|
171
348
|
deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
|
|
172
|
-
/**
|
|
349
|
+
/**
|
|
350
|
+
* Requests to delete all inbox messages
|
|
351
|
+
*
|
|
352
|
+
* **Visitor mode: not supported**
|
|
353
|
+
*/
|
|
173
354
|
deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
|
|
174
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
357
|
+
*/
|
|
175
358
|
getTranslations(lang_code: string): Promise<TGetTranslations>;
|
|
176
359
|
private updateOnSpin;
|
|
177
360
|
private updateOnAddSpin;
|
|
@@ -185,37 +368,55 @@ export declare class WSAPI {
|
|
|
185
368
|
* If filter is not provided, all active jackpots will be returned.
|
|
186
369
|
* Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
187
370
|
* You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
|
|
188
|
-
*
|
|
371
|
+
*
|
|
372
|
+
* **Example**:
|
|
189
373
|
* ```
|
|
190
374
|
* _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
191
375
|
* console.log(result);
|
|
192
376
|
* });
|
|
193
377
|
* ```
|
|
378
|
+
*
|
|
379
|
+
* **Example in the Visitor mode**:
|
|
380
|
+
* ```
|
|
381
|
+
* _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
382
|
+
* console.log(result);
|
|
383
|
+
* });
|
|
384
|
+
* ```
|
|
194
385
|
*/
|
|
195
386
|
jackpotGet(filter?: {
|
|
196
387
|
related_game_id?: string;
|
|
197
388
|
jp_template_id?: number;
|
|
198
389
|
}): Promise<JackpotDetails[]>;
|
|
199
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
200
392
|
* You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
201
|
-
*
|
|
393
|
+
*
|
|
394
|
+
* **Example**:
|
|
202
395
|
* ```
|
|
203
396
|
* _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
204
397
|
* console.log('Opted in to the jackpot');
|
|
205
398
|
* });
|
|
206
399
|
* ```
|
|
400
|
+
*
|
|
401
|
+
* **Visitor mode: not supported**
|
|
402
|
+
*
|
|
207
403
|
*/
|
|
208
404
|
jackpotOptIn(filter: {
|
|
209
405
|
jp_template_id: number;
|
|
210
406
|
}): Promise<JackpotsOptinResponse>;
|
|
211
|
-
/**
|
|
407
|
+
/**
|
|
408
|
+
* Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
212
409
|
* You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
213
|
-
*
|
|
410
|
+
*
|
|
411
|
+
* **Example**:
|
|
214
412
|
* ```
|
|
215
413
|
* _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
216
414
|
* console.log('Opted out from the jackpot');
|
|
217
415
|
* });
|
|
218
416
|
* ```
|
|
417
|
+
*
|
|
418
|
+
* **Visitor mode: not supported**
|
|
419
|
+
*
|
|
219
420
|
*/
|
|
220
421
|
jackpotOptOut(filter: {
|
|
221
422
|
jp_template_id: number;
|