@smartico/public-api 0.0.344 → 0.0.346
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/MiniGames/SAWExposeUserSpinId.d.ts +6 -0
- package/dist/MiniGames/SAWGameLayout.d.ts +6 -0
- package/dist/WSAPI/WSAPITypes.d.ts +7 -1
- package/dist/index.js +46 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +49 -17
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +2 -8
- package/docs/api/enums/SAWExposeUserSpinIdName.md +13 -0
- package/docs/api/enums/SAWGameLayoutName.md +13 -0
- package/docs/api/interfaces/TMiniGameTemplate.md +16 -0
- package/docs/api/interfaces/TStoreItem.md +8 -0
- package/docs/native/PROTOCOL.md +907 -406
- package/package.json +1 -1
- package/src/MiniGames/SAWExposeUserSpinId.ts +16 -1
- package/src/MiniGames/SAWGameLayout.ts +16 -1
- package/src/MiniGames/SAWGetTemplatesResponse.ts +10 -1
- package/src/Store/StoreItem.ts +1 -0
- package/src/WSAPI/WSAPITypes.ts +7 -1
- package/docs/api/interfaces/GemsDiamondsLog.md +0 -43
- package/docs/api/interfaces/PointsLog.md +0 -43
|
@@ -2,3 +2,9 @@ export declare enum SAWExposeUserSpinId {
|
|
|
2
2
|
UserId = 1,
|
|
3
3
|
SpinId = 2
|
|
4
4
|
}
|
|
5
|
+
export declare enum SAWExposeUserSpinIdName {
|
|
6
|
+
UserId = "userId",
|
|
7
|
+
SpinId = "spinId"
|
|
8
|
+
}
|
|
9
|
+
/** @hidden */
|
|
10
|
+
export declare const SAWExposeUserSpinIdNamed: (id: SAWExposeUserSpinId) => SAWExposeUserSpinIdName;
|
|
@@ -2,3 +2,9 @@ export declare enum SAWGameLayout {
|
|
|
2
2
|
Horizontal = 1,
|
|
3
3
|
VerticalMap = 2
|
|
4
4
|
}
|
|
5
|
+
export declare enum SAWGameLayoutName {
|
|
6
|
+
Horizontal = "horizontal",
|
|
7
|
+
VerticalMap = "vertical-map"
|
|
8
|
+
}
|
|
9
|
+
/** @hidden */
|
|
10
|
+
export declare const SAWGameLayoutNamed: (layout: SAWGameLayout) => SAWGameLayoutName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuyStoreItemErrorCode } from '../Store';
|
|
2
|
-
import { AttemptPeriodType, MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBuyInTypeName, SAWGameLayout, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
|
|
2
|
+
import { AttemptPeriodType, MiniGamePrizeTypeName, SAWAcknowledgeTypeName, SAWAskForUsername, SAWBuyInTypeName, SAWExposeUserSpinIdName, SAWGameLayout, SAWGameLayoutName, SAWGameTypeName, SAWSpinErrorCode, SAWTemplate, SAWTemplateUI } from '../MiniGames';
|
|
3
3
|
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
|
|
4
4
|
import { AchievementAvailabilityStatus, BadgesTimeLimitStates } from '../Missions';
|
|
5
5
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
@@ -171,12 +171,16 @@ export interface TMiniGameTemplate {
|
|
|
171
171
|
custom_section_id?: number;
|
|
172
172
|
/** The UI definition of the mini-game */
|
|
173
173
|
saw_template_ui_definition: SAWTemplateUI;
|
|
174
|
+
/** The layout of the game */
|
|
175
|
+
game_layout?: SAWGameLayoutName;
|
|
174
176
|
/** When enabled the prize history icon is visible on a certain template */
|
|
175
177
|
show_prize_history?: boolean;
|
|
176
178
|
/** The maximum number of attempts that user can do during period of time */
|
|
177
179
|
max_number_of_attempts?: number;
|
|
178
180
|
/** The period of time in milliseconds during which the user can do the maximum number of attempts */
|
|
179
181
|
max_spins_period_ms?: number;
|
|
182
|
+
/** The ID of the user spin id to expose on the game */
|
|
183
|
+
expose_user_spin_id?: SAWExposeUserSpinIdName;
|
|
180
184
|
}
|
|
181
185
|
/**
|
|
182
186
|
* TUser describes the information of the user
|
|
@@ -517,6 +521,8 @@ export interface TStoreItem {
|
|
|
517
521
|
only_in_custom_section?: boolean;
|
|
518
522
|
/** ID of specific Custom Section type */
|
|
519
523
|
custom_section_type_id?: number;
|
|
524
|
+
/** The message that should be shown to the user if they are not eligible to buy it. This message can be used to explain the reason why user cannot buy the item, e.g. 'You should be VIP to buy this item'. */
|
|
525
|
+
cant_buy_message?: string;
|
|
520
526
|
}
|
|
521
527
|
/**
|
|
522
528
|
* TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
|
package/dist/index.js
CHANGED
|
@@ -390,6 +390,38 @@ var SAWGameTypeNamed = function SAWGameTypeNamed(type) {
|
|
|
390
390
|
return (_SAWGameType$SpinAWhe = {}, _SAWGameType$SpinAWhe[exports.SAWGameType.SpinAWheel] = exports.SAWGameTypeName.SpinAWheel, _SAWGameType$SpinAWhe[exports.SAWGameType.ScratchCard] = exports.SAWGameTypeName.ScratchCard, _SAWGameType$SpinAWhe[exports.SAWGameType.MatchX] = exports.SAWGameTypeName.MatchX, _SAWGameType$SpinAWhe[exports.SAWGameType.GiftBox] = exports.SAWGameTypeName.GiftBox, _SAWGameType$SpinAWhe[exports.SAWGameType.PrizeDrop] = exports.SAWGameTypeName.PrizeDrop, _SAWGameType$SpinAWhe[exports.SAWGameType.Quiz] = exports.SAWGameTypeName.Quiz, _SAWGameType$SpinAWhe[exports.SAWGameType.LootboxWeekdays] = exports.SAWGameTypeName.LootboxWeekdays, _SAWGameType$SpinAWhe[exports.SAWGameType.LootboxCalendarDays] = exports.SAWGameTypeName.LootboxCalendarDays, _SAWGameType$SpinAWhe[exports.SAWGameType.TreasureHunt] = exports.SAWGameTypeName.TreasureHunt, _SAWGameType$SpinAWhe[exports.SAWGameType.Voyager] = exports.SAWGameTypeName.Voyager, _SAWGameType$SpinAWhe[exports.SAWGameType.Plinko] = exports.SAWGameTypeName.Plinko, _SAWGameType$SpinAWhe[exports.SAWGameType.CoinFlip] = exports.SAWGameTypeName.CoinFlip, _SAWGameType$SpinAWhe)[type] || exports.SAWGameTypeName.Unknown;
|
|
391
391
|
};
|
|
392
392
|
|
|
393
|
+
exports.SAWExposeUserSpinId = void 0;
|
|
394
|
+
(function (SAWExposeUserSpinId) {
|
|
395
|
+
SAWExposeUserSpinId[SAWExposeUserSpinId["UserId"] = 1] = "UserId";
|
|
396
|
+
SAWExposeUserSpinId[SAWExposeUserSpinId["SpinId"] = 2] = "SpinId";
|
|
397
|
+
})(exports.SAWExposeUserSpinId || (exports.SAWExposeUserSpinId = {}));
|
|
398
|
+
exports.SAWExposeUserSpinIdName = void 0;
|
|
399
|
+
(function (SAWExposeUserSpinIdName) {
|
|
400
|
+
SAWExposeUserSpinIdName["UserId"] = "userId";
|
|
401
|
+
SAWExposeUserSpinIdName["SpinId"] = "spinId";
|
|
402
|
+
})(exports.SAWExposeUserSpinIdName || (exports.SAWExposeUserSpinIdName = {}));
|
|
403
|
+
/** @hidden */
|
|
404
|
+
var SAWExposeUserSpinIdNamed = function SAWExposeUserSpinIdNamed(id) {
|
|
405
|
+
var _SAWExposeUserSpinId$;
|
|
406
|
+
return (_SAWExposeUserSpinId$ = {}, _SAWExposeUserSpinId$[exports.SAWExposeUserSpinId.UserId] = exports.SAWExposeUserSpinIdName.UserId, _SAWExposeUserSpinId$[exports.SAWExposeUserSpinId.SpinId] = exports.SAWExposeUserSpinIdName.SpinId, _SAWExposeUserSpinId$)[id];
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
exports.SAWGameLayout = void 0;
|
|
410
|
+
(function (SAWGameLayout) {
|
|
411
|
+
SAWGameLayout[SAWGameLayout["Horizontal"] = 1] = "Horizontal";
|
|
412
|
+
SAWGameLayout[SAWGameLayout["VerticalMap"] = 2] = "VerticalMap";
|
|
413
|
+
})(exports.SAWGameLayout || (exports.SAWGameLayout = {}));
|
|
414
|
+
exports.SAWGameLayoutName = void 0;
|
|
415
|
+
(function (SAWGameLayoutName) {
|
|
416
|
+
SAWGameLayoutName["Horizontal"] = "horizontal";
|
|
417
|
+
SAWGameLayoutName["VerticalMap"] = "vertical-map";
|
|
418
|
+
})(exports.SAWGameLayoutName || (exports.SAWGameLayoutName = {}));
|
|
419
|
+
/** @hidden */
|
|
420
|
+
var SAWGameLayoutNamed = function SAWGameLayoutNamed(layout) {
|
|
421
|
+
var _SAWGameLayout$Horizo;
|
|
422
|
+
return (_SAWGameLayout$Horizo = {}, _SAWGameLayout$Horizo[exports.SAWGameLayout.Horizontal] = exports.SAWGameLayoutName.Horizontal, _SAWGameLayout$Horizo[exports.SAWGameLayout.VerticalMap] = exports.SAWGameLayoutName.VerticalMap, _SAWGameLayout$Horizo)[layout];
|
|
423
|
+
};
|
|
424
|
+
|
|
393
425
|
exports.SAWPrizeType = void 0;
|
|
394
426
|
(function (SAWPrizeType) {
|
|
395
427
|
SAWPrizeType[SAWPrizeType["NO_PRIZE"] = 1] = "NO_PRIZE";
|
|
@@ -457,10 +489,16 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
457
489
|
next_available_spin_ts: r.next_available_spin_ts,
|
|
458
490
|
steps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,
|
|
459
491
|
custom_section_id: r.saw_template_ui_definition.custom_section_id,
|
|
460
|
-
saw_template_ui_definition: r.saw_template_ui_definition
|
|
492
|
+
saw_template_ui_definition: r.saw_template_ui_definition
|
|
493
|
+
}, r.saw_game_type_id === exports.SAWGameType.LootboxCalendarDays || r.saw_game_type_id === exports.SAWGameType.LootboxWeekdays ? {
|
|
494
|
+
game_layout: SAWGameLayoutNamed(r.saw_template_ui_definition.game_layout)
|
|
495
|
+
} : {}, {
|
|
461
496
|
show_prize_history: r.show_prize_history,
|
|
462
497
|
max_number_of_attempts: r.maxSpinsCount,
|
|
463
|
-
max_spins_period_ms: r.maxSpinsPediodMs
|
|
498
|
+
max_spins_period_ms: r.maxSpinsPediodMs
|
|
499
|
+
}, r.saw_template_ui_definition.expose_user_spin_id ? {
|
|
500
|
+
expose_user_spin_id: SAWExposeUserSpinIdNamed(r.saw_template_ui_definition.expose_user_spin_id)
|
|
501
|
+
} : {}, {
|
|
464
502
|
prizes: r.prizes.map(function (p) {
|
|
465
503
|
var _p$saw_prize_ui_defin;
|
|
466
504
|
var y = {
|
|
@@ -557,12 +595,6 @@ var SAWHistoryTransform = function SAWHistoryTransform(items) {
|
|
|
557
595
|
});
|
|
558
596
|
};
|
|
559
597
|
|
|
560
|
-
exports.SAWGameLayout = void 0;
|
|
561
|
-
(function (SAWGameLayout) {
|
|
562
|
-
SAWGameLayout[SAWGameLayout["Horizontal"] = 1] = "Horizontal";
|
|
563
|
-
SAWGameLayout[SAWGameLayout["VerticalMap"] = 2] = "VerticalMap";
|
|
564
|
-
})(exports.SAWGameLayout || (exports.SAWGameLayout = {}));
|
|
565
|
-
|
|
566
598
|
var _PrizeModifiersKeysNa;
|
|
567
599
|
exports.PrizeModifiers = void 0;
|
|
568
600
|
(function (PrizeModifiers) {
|
|
@@ -603,12 +635,6 @@ var SawGameDifficultyTypeNamed = function SawGameDifficultyTypeNamed(type) {
|
|
|
603
635
|
return (_SAWGameDifficultyTyp = {}, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.EASY] = exports.SAWGameDifficultyTypeName.EASY, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.MEDIUM] = exports.SAWGameDifficultyTypeName.MEDIUM, _SAWGameDifficultyTyp[exports.SAWGameDifficultyType.HARD] = exports.SAWGameDifficultyTypeName.HARD, _SAWGameDifficultyTyp)[type];
|
|
604
636
|
};
|
|
605
637
|
|
|
606
|
-
exports.SAWExposeUserSpinId = void 0;
|
|
607
|
-
(function (SAWExposeUserSpinId) {
|
|
608
|
-
SAWExposeUserSpinId[SAWExposeUserSpinId["UserId"] = 1] = "UserId";
|
|
609
|
-
SAWExposeUserSpinId[SAWExposeUserSpinId["SpinId"] = 2] = "SpinId";
|
|
610
|
-
})(exports.SAWExposeUserSpinId || (exports.SAWExposeUserSpinId = {}));
|
|
611
|
-
|
|
612
638
|
exports.AttemptPeriodType = void 0;
|
|
613
639
|
(function (AttemptPeriodType) {
|
|
614
640
|
AttemptPeriodType[AttemptPeriodType["FromLastAttempt"] = 1] = "FromLastAttempt";
|
|
@@ -1000,7 +1026,7 @@ var StoreItemTransform = function StoreItemTransform(items) {
|
|
|
1000
1026
|
return r.id >= 1;
|
|
1001
1027
|
}).map(function (r) {
|
|
1002
1028
|
var _r$itemPublicMeta$pri, _r$categoryIds;
|
|
1003
|
-
var x = {
|
|
1029
|
+
var x = _extends({
|
|
1004
1030
|
id: r.id,
|
|
1005
1031
|
name: r.itemPublicMeta.name,
|
|
1006
1032
|
purchase_type: mapPurchaseType$1(r.itemPublicMeta.purchase_type),
|
|
@@ -1025,7 +1051,9 @@ var StoreItemTransform = function StoreItemTransform(items) {
|
|
|
1025
1051
|
custom_section_id: r.itemPublicMeta.custom_section_id,
|
|
1026
1052
|
only_in_custom_section: r.itemPublicMeta.only_in_custom_section,
|
|
1027
1053
|
custom_section_type_id: r.itemPublicMeta.custom_section_type_id
|
|
1028
|
-
}
|
|
1054
|
+
}, r.itemPublicMeta.cant_buy_message ? {
|
|
1055
|
+
cant_buy_message: r.itemPublicMeta.cant_buy_message
|
|
1056
|
+
} : {});
|
|
1029
1057
|
return x;
|
|
1030
1058
|
});
|
|
1031
1059
|
};
|
|
@@ -5770,6 +5798,8 @@ exports.PrizeModifiersKeysNames = PrizeModifiersKeysNames;
|
|
|
5770
5798
|
exports.QuizMarketPerSport = QuizMarketPerSport;
|
|
5771
5799
|
exports.SAWAcknowledgeTypeNamed = SAWAcknowledgeTypeNamed;
|
|
5772
5800
|
exports.SAWBuyInTypeNamed = SAWBuyInTypeNamed;
|
|
5801
|
+
exports.SAWExposeUserSpinIdNamed = SAWExposeUserSpinIdNamed;
|
|
5802
|
+
exports.SAWGameLayoutNamed = SAWGameLayoutNamed;
|
|
5773
5803
|
exports.SAWGameTypeNamed = SAWGameTypeNamed;
|
|
5774
5804
|
exports.SAWHistoryTransform = SAWHistoryTransform;
|
|
5775
5805
|
exports.SAWTemplatesTransform = SAWTemplatesTransform;
|