@smartico/public-api 0.0.167 → 0.0.168
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/Base/ClassId.d.ts +4 -0
- package/dist/MiniGames/SAWDoAcknowledgeBatchRequest.d.ts +4 -0
- package/dist/MiniGames/SAWDoAcknowledgeBatchResponse.d.ts +8 -0
- package/dist/MiniGames/SAWDoSpinBatchRequest.d.ts +7 -0
- package/dist/MiniGames/SAWDoSpinBatchResponse.d.ts +7 -0
- package/dist/Quiz/MarketsPerSport.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +4 -0
- package/dist/WSAPI/WSAPI.d.ts +7 -1
- package/dist/WSAPI/WSAPITypes.d.ts +15 -0
- package/dist/index.js +273 -194
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +54 -0
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +1 -0
- package/docs/classes/WSAPI.md +21 -0
- package/docs/interfaces/TMiniGamePlayBatchResult.md +43 -0
- package/package.json +1 -1
- package/src/Base/ClassId.ts +4 -0
- package/src/MiniGames/SAWDoAcknowledgeBatchRequest.ts +5 -0
- package/src/MiniGames/SAWDoAcknowledgeBatchResponse.ts +5 -0
- package/src/MiniGames/SAWDoSpinBatchRequest.ts +5 -0
- package/src/MiniGames/SAWDoSpinBatchResponse.ts +8 -0
- package/src/SmarticoAPI.ts +45 -0
- package/src/WSAPI/WSAPI.ts +24 -1
- package/src/WSAPI/WSAPITypes.ts +16 -0
package/dist/Base/ClassId.d.ts
CHANGED
|
@@ -84,6 +84,10 @@ export declare enum ClassId {
|
|
|
84
84
|
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,
|
|
85
85
|
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,
|
|
86
86
|
SAW_AKNOWLEDGE_SPIN_PUSH = 711,
|
|
87
|
+
SAW_DO_SPIN_BATCH_REQUEST = 712,
|
|
88
|
+
SAW_DO_SPIN_BATCH_RESPONSE = 713,
|
|
89
|
+
SAW_AKNOWLEDGE_BATCH_REQUEST = 714,
|
|
90
|
+
SAW_AKNOWLEDGE_BATCH_RESPONSE = 715,
|
|
87
91
|
JP_GET_JACKPOTS_REQUEST = 800,
|
|
88
92
|
JP_GET_JACKPOTS_RESPONSE = 801,
|
|
89
93
|
JP_GET_LATEST_POTS_REQUEST = 802,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
|
+
import { SAWDoSpinResponse } from './SAWDoSpinResponse';
|
|
3
|
+
import { SAWSpinErrorCode } from './SAWSpinErrorCode';
|
|
4
|
+
export interface SAWDoSpinBatchResponse extends ProtocolResponse {
|
|
5
|
+
results: SAWDoSpinResponse[];
|
|
6
|
+
errCode: SAWSpinErrorCode;
|
|
7
|
+
}
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoR
|
|
|
16
16
|
import { GetJackpotsPotsResponse, GetJackpotsResponse, JackpotsOptinResponse, JackpotsOptoutResponse } from './Jackpots';
|
|
17
17
|
import { GetCustomSectionsResponse } from './CustomSections';
|
|
18
18
|
import { ClaimBonusResponse, GetBonusesResponse } from './Bonuses';
|
|
19
|
+
import { SAWDoSpinBatchResponse } from './MiniGames/SAWDoSpinBatchResponse';
|
|
20
|
+
import { SAWDoAcknowledgeBatchResponse } from './MiniGames/SAWDoAcknowledgeBatchResponse';
|
|
19
21
|
import { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse';
|
|
20
22
|
interface Tracker {
|
|
21
23
|
label_api_key: string;
|
|
@@ -77,6 +79,8 @@ declare class SmarticoAPI {
|
|
|
77
79
|
sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
|
|
78
80
|
doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
|
|
79
81
|
sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse>;
|
|
82
|
+
doAcknowledgeBatchRequest(user_ext_id: string, request_ids: string[]): Promise<SAWDoAcknowledgeBatchResponse>;
|
|
83
|
+
sawSpinBatchRequest(user_ext_id: string, saw_template_id: number, spins_count: number): Promise<SAWDoSpinBatchResponse>;
|
|
80
84
|
missionOptIn(user_ext_id: string, mission_id: number): Promise<AchievementOptinResponse>;
|
|
81
85
|
missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise<AchClaimPrizeResponse>;
|
|
82
86
|
registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SmarticoAPI } from '../SmarticoAPI';
|
|
2
|
-
import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT, TBonus, TClaimBonusResult } from './WSAPITypes';
|
|
2
|
+
import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT, TBonus, TClaimBonusResult, TMiniGamePlayBatchResult } from './WSAPITypes';
|
|
3
3
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
4
4
|
import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
|
|
5
5
|
import { GetAchievementMapResponse } from 'src/Missions';
|
|
@@ -256,6 +256,12 @@ export declare class WSAPI {
|
|
|
256
256
|
* **Visitor mode: not supported**
|
|
257
257
|
*/
|
|
258
258
|
playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
|
|
259
|
+
/**
|
|
260
|
+
* Plays the specified by template_id mini-game on behalf of user {count} times and returns prizes or err_code
|
|
261
|
+
*
|
|
262
|
+
* **Visitor mode: not supported**
|
|
263
|
+
*/
|
|
264
|
+
playMiniGameBatch(template_id: number, spin_count: number): Promise<TMiniGamePlayBatchResult[]>;
|
|
259
265
|
/**
|
|
260
266
|
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
261
267
|
*
|
|
@@ -42,6 +42,21 @@ export interface TMiniGamePlayResult {
|
|
|
42
42
|
/** The prize_id that user won, details of the prize can be found in the mini-game definition */
|
|
43
43
|
prize_id: number;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* TMiniGamePlayBatchResult describes the response of call to _smartico.api.playMiniGameBatch(template_id, spin_count) method
|
|
47
|
+
*/
|
|
48
|
+
export interface TMiniGamePlayBatchResult {
|
|
49
|
+
/** The saw_prize_id that user won, details of the prize can be found in the mini-game definition */
|
|
50
|
+
saw_prize_id: number;
|
|
51
|
+
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
52
|
+
errCode: SAWSpinErrorCode;
|
|
53
|
+
/** Optional error message */
|
|
54
|
+
errMessage?: string;
|
|
55
|
+
/** Jackpot amount what user won */
|
|
56
|
+
jackpot_amount?: number;
|
|
57
|
+
/** Period in miliseconds from last spin */
|
|
58
|
+
first_spin_in_period?: number;
|
|
59
|
+
}
|
|
45
60
|
/**
|
|
46
61
|
* TMiniGameTemplate describes the information of mini-games available for the user
|
|
47
62
|
*/
|