@smartico/public-api 0.0.139 → 0.0.141
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/Jackpots/JackPotWinner.d.ts +5 -0
- package/dist/Missions/AchievementStatus.d.ts +2 -1
- package/dist/Quiz/MarketsInfo.d.ts +8 -0
- package/dist/Quiz/MarketsType.d.ts +3 -1
- package/dist/index.js +32 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +19 -13
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/JackPotWinner.md +10 -0
- package/package.json +1 -1
- package/src/Jackpots/JackPotWinner.ts +6 -1
- package/src/Missions/AchievementStatus.ts +2 -1
- package/src/Quiz/MarketsInfo.ts +17 -16
- package/src/Quiz/MarketsType.ts +4 -1
- package/src/SmarticoAPI.ts +3 -1
- package/src/WSAPI/WSAPI.ts +3 -5
package/dist/index.modern.mjs
CHANGED
|
@@ -726,6 +726,7 @@ var AchievementStatus;
|
|
|
726
726
|
AchievementStatus[AchievementStatus["Archived"] = 4] = "Archived";
|
|
727
727
|
AchievementStatus[AchievementStatus["FeaturedManually"] = 5] = "FeaturedManually";
|
|
728
728
|
AchievementStatus[AchievementStatus["FeaturedAI"] = 6] = "FeaturedAI";
|
|
729
|
+
AchievementStatus[AchievementStatus["Recurring"] = 7] = "Recurring";
|
|
729
730
|
})(AchievementStatus || (AchievementStatus = {}));
|
|
730
731
|
|
|
731
732
|
var AchievementTaskType;
|
|
@@ -1130,6 +1131,8 @@ class WSAPI {
|
|
|
1130
1131
|
on(ClassId.LOGOUT_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));
|
|
1131
1132
|
on(ClassId.IDENTIFY_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));
|
|
1132
1133
|
on(ClassId.JP_WIN_PUSH, data => this.jackpotClearCache());
|
|
1134
|
+
on(ClassId.JP_OPTOUT_RESPONSE, data => this.jackpotClearCache());
|
|
1135
|
+
on(ClassId.JP_OPTIN_RESPONSE, data => this.jackpotClearCache());
|
|
1133
1136
|
}
|
|
1134
1137
|
/** Returns information about current user
|
|
1135
1138
|
* Example usage:
|
|
@@ -1527,7 +1530,6 @@ class WSAPI {
|
|
|
1527
1530
|
throw new Error('jp_template_id is required in jackpotOptIn');
|
|
1528
1531
|
}
|
|
1529
1532
|
const result = await this.api.jackpotOptIn(null, filter);
|
|
1530
|
-
this.jackpotClearCache();
|
|
1531
1533
|
return result;
|
|
1532
1534
|
}
|
|
1533
1535
|
/** Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
@@ -1544,7 +1546,6 @@ class WSAPI {
|
|
|
1544
1546
|
throw new Error('jp_template_id is required in jackpotOptOut');
|
|
1545
1547
|
}
|
|
1546
1548
|
const result = await this.api.jackpotOptOut(null, filter);
|
|
1547
|
-
this.jackpotClearCache();
|
|
1548
1549
|
return result;
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
@@ -1708,6 +1709,8 @@ class SmarticoAPI {
|
|
|
1708
1709
|
}
|
|
1709
1710
|
buildMessage(user_ext_id, cid, payload = {}) {
|
|
1710
1711
|
const message = _extends({
|
|
1712
|
+
// AA: in fact we need api and brand keys and ext_user_id only in the context of HTTP
|
|
1713
|
+
// its not needed in WebSocket and can be deleted
|
|
1711
1714
|
api_key: this.label_api_key,
|
|
1712
1715
|
brand_key: this.brand_api_key,
|
|
1713
1716
|
ext_user_id: user_ext_id,
|
|
@@ -2171,6 +2174,8 @@ var QuizMarketType;
|
|
|
2171
2174
|
QuizMarketType[QuizMarketType["PlayerOneWinsOneSet"] = 23] = "PlayerOneWinsOneSet";
|
|
2172
2175
|
QuizMarketType[QuizMarketType["PlayerTwoWinsOneSet"] = 24] = "PlayerTwoWinsOneSet";
|
|
2173
2176
|
QuizMarketType[QuizMarketType["LastGoal"] = 25] = "LastGoal";
|
|
2177
|
+
QuizMarketType[QuizMarketType["CustomSport"] = 26] = "CustomSport";
|
|
2178
|
+
QuizMarketType[QuizMarketType["CustomNonSport"] = 27] = "CustomNonSport";
|
|
2174
2179
|
})(QuizMarketType || (QuizMarketType = {}));
|
|
2175
2180
|
|
|
2176
2181
|
var MarketsValueType;
|
|
@@ -2199,11 +2204,12 @@ var MarketsValueType;
|
|
|
2199
2204
|
|
|
2200
2205
|
const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';
|
|
2201
2206
|
const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';
|
|
2202
|
-
const
|
|
2207
|
+
const quizDrawReplacementText = '{quiz_draw}';
|
|
2203
2208
|
const quizYesReplacementText = '{yes}';
|
|
2204
2209
|
const quizNoReplacementText = '{no}';
|
|
2205
2210
|
const quizOddReplacementText = '{odd}';
|
|
2206
2211
|
const quizEvenReplacementText = '{even}';
|
|
2212
|
+
const quizOrReplacementText = '{or}';
|
|
2207
2213
|
const yesNoAnswers = [{
|
|
2208
2214
|
text: quizYesReplacementText,
|
|
2209
2215
|
value: MarketsValueType.Yes
|
|
@@ -2219,7 +2225,7 @@ const homeAwayAnswers = [{
|
|
|
2219
2225
|
value: MarketsValueType.AwayTeam
|
|
2220
2226
|
}];
|
|
2221
2227
|
const homeAwayDrawAnswers = [...homeAwayAnswers, {
|
|
2222
|
-
text:
|
|
2228
|
+
text: quizDrawReplacementText,
|
|
2223
2229
|
value: MarketsValueType.Draw
|
|
2224
2230
|
}];
|
|
2225
2231
|
const marketsInfo = [{
|
|
@@ -2249,25 +2255,25 @@ const marketsInfo = [{
|
|
|
2249
2255
|
text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
2250
2256
|
value: MarketsValueType.HomeTeamHomeTeam
|
|
2251
2257
|
}, {
|
|
2252
|
-
text: `${quizAnswerHomeTeamReplacementText} / ${
|
|
2258
|
+
text: `${quizAnswerHomeTeamReplacementText} / ${quizDrawReplacementText}`,
|
|
2253
2259
|
value: MarketsValueType.HomeTeamDraw
|
|
2254
2260
|
}, {
|
|
2255
2261
|
text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
2256
2262
|
value: MarketsValueType.HomeTeamAwayTeam
|
|
2257
2263
|
}, {
|
|
2258
|
-
text: `${
|
|
2264
|
+
text: `${quizDrawReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
2259
2265
|
value: MarketsValueType.DrawHomeTeam
|
|
2260
2266
|
}, {
|
|
2261
|
-
text: `${
|
|
2267
|
+
text: `${quizDrawReplacementText} / ${quizDrawReplacementText}`,
|
|
2262
2268
|
value: MarketsValueType.DrawDraw
|
|
2263
2269
|
}, {
|
|
2264
|
-
text: `${
|
|
2270
|
+
text: `${quizDrawReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
2265
2271
|
value: MarketsValueType.DrawAwayTeam
|
|
2266
2272
|
}, {
|
|
2267
2273
|
text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
2268
2274
|
value: MarketsValueType.AwayTeamHomeTeam
|
|
2269
2275
|
}, {
|
|
2270
|
-
text: `${quizAnswerAwayTeamReplacementText} / ${
|
|
2276
|
+
text: `${quizAnswerAwayTeamReplacementText} / ${quizDrawReplacementText}`,
|
|
2271
2277
|
value: MarketsValueType.AwayTeamDraw
|
|
2272
2278
|
}, {
|
|
2273
2279
|
text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
@@ -2297,13 +2303,13 @@ const marketsInfo = [{
|
|
|
2297
2303
|
trKey: 'quizQuestion_doubleChance'
|
|
2298
2304
|
},
|
|
2299
2305
|
answers: [{
|
|
2300
|
-
text: `${
|
|
2306
|
+
text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerHomeTeamReplacementText}`,
|
|
2301
2307
|
value: MarketsValueType.HomeTeamDraw
|
|
2302
2308
|
}, {
|
|
2303
|
-
text: `${quizAnswerHomeTeamReplacementText}
|
|
2309
|
+
text: `${quizAnswerHomeTeamReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,
|
|
2304
2310
|
value: MarketsValueType.HomeTeamAwayTeam
|
|
2305
2311
|
}, {
|
|
2306
|
-
text: `${
|
|
2312
|
+
text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,
|
|
2307
2313
|
value: MarketsValueType.AwayTeamDraw
|
|
2308
2314
|
}]
|
|
2309
2315
|
}, {
|
|
@@ -2487,5 +2493,5 @@ var JackpotType;
|
|
|
2487
2493
|
JackpotType[JackpotType["Main"] = 1] = "Main";
|
|
2488
2494
|
})(JackpotType || (JackpotType = {}));
|
|
2489
2495
|
|
|
2490
|
-
export { AchCategoryTransform, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetLevelMapResponseTransform, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, JackpotContributionType, JackpotType, LeaderBoardPeriodType, MarketsValueType, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, OCache, PublicLabelSettings, QuizMarketPerSport, QuizMarketType, QuizSportType, SAWAcknowledgeType, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWinSoundFiles, SAWWinSoundType, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UserAchievementTransform, marketsInfo, quizSupportedSports, tournamentInfoItemTransform };
|
|
2496
|
+
export { AchCategoryTransform, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetLevelMapResponseTransform, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, JackpotContributionType, JackpotType, LeaderBoardPeriodType, MarketsValueType, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, OCache, PublicLabelSettings, QuizMarketPerSport, QuizMarketType, QuizSportType, SAWAcknowledgeType, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWinSoundFiles, SAWWinSoundType, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UserAchievementTransform, marketsInfo, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizDrawReplacementText, quizEvenReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, tournamentInfoItemTransform };
|
|
2491
2497
|
//# sourceMappingURL=index.modern.mjs.map
|