@smartico/public-api 0.0.167 → 0.0.169

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.
@@ -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,4 @@
1
+ import { ProtocolRequest } from '../Base/ProtocolRequest';
2
+ export interface SAWDoAcknowledgeBatchRequest extends ProtocolRequest {
3
+ request_ids: string[];
4
+ }
@@ -0,0 +1,8 @@
1
+ import { ProtocolRequest } from '../Base/ProtocolRequest';
2
+ export interface SAWDoAcknowledgeBatchResponse extends ProtocolRequest {
3
+ results: Array<{
4
+ request_id: string;
5
+ errCode: number;
6
+ errMessage?: string;
7
+ }>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { ProtocolMessage } from 'src/SmarticoLib';
2
+ export interface SAWDoSpinBatchRequest extends ProtocolMessage {
3
+ spins: Array<{
4
+ request_id: string;
5
+ saw_template_id: number;
6
+ }>;
7
+ }
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  import { SAWGPMarketType } from './MarketsType';
2
2
  export declare const QuizMarketPerSport: {
3
- 6: SAWGPMarketType[];
3
+ 2: SAWGPMarketType[];
4
4
  1: SAWGPMarketType[];
5
5
  5: SAWGPMarketType[];
6
6
  };
@@ -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>;
@@ -0,0 +1,3 @@
1
+ import { TUserProfile } from "src/WSAPI/WSAPITypes";
2
+ export interface UserProfile extends TUserProfile {
3
+ }
@@ -0,0 +1 @@
1
+ export * from './UserProfile';
@@ -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';
@@ -253,9 +253,28 @@ export declare class WSAPI {
253
253
  /**
254
254
  * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
255
255
  *
256
+ * **Example**:
257
+ * ```
258
+ * _smartico.api.playMiniGame(55).then((result) => {
259
+ * console.log(result);
260
+ * });
261
+ * ```
262
+ *
256
263
  * **Visitor mode: not supported**
257
264
  */
258
265
  playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
266
+ /**
267
+ * Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
268
+ *
269
+ * **Example**:
270
+ * ```
271
+ * _smartico.api.playMiniGameBatch(55, 10).then((result) => {
272
+ * console.log(result);
273
+ * });
274
+ * ```
275
+ * **Visitor mode: not supported**
276
+ */
277
+ playMiniGameBatch(template_id: number, spin_count: number): Promise<TMiniGamePlayBatchResult[]>;
259
278
  /**
260
279
  * Requests an opt-in for the specified mission_id. Returns the err_code.
261
280
  *
@@ -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
  */
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './ILogger';
3
3
  export * from './SmarticoAPI';
4
4
  export * from './CookieStore';
5
5
  export * from './Core';
6
+ export * from './UserProfile';
6
7
  export * from './Inbox';
7
8
  export * from './Leaderboard';
8
9
  export * from './MiniGames';