@smartico/public-api 0.0.253 → 0.0.254
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/.github/workflows/semgrep.yml +26 -0
- package/dist/Base/ClassId.d.ts +2 -0
- package/dist/Jackpots/GetJackpotEligibleGamesRequest.d.ts +4 -0
- package/dist/Jackpots/GetJackpotEligibleGamesResponse.d.ts +34 -0
- package/dist/Jackpots/index.d.ts +2 -0
- package/dist/SmarticoAPI.d.ts +3 -0
- package/dist/WSAPI/WSAPI.d.ts +18 -0
- package/dist/index.js +256 -180
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +58 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +4 -0
- package/docs/classes/WSAPI.md +29 -0
- package/docs/interfaces/GetJackpotEligibleGamesRequest.md +43 -0
- package/docs/interfaces/GetJackpotEligibleGamesResponse.md +63 -0
- package/docs/interfaces/JackpotEligibleGame.md +71 -0
- package/docs/interfaces/TGetJackpotEligibleGamesResponse.md +7 -0
- package/package.json +1 -1
- package/src/Base/ClassId.ts +3 -0
- package/src/Jackpots/GetJackpotEligibleGamesRequest.ts +5 -0
- package/src/Jackpots/GetJackpotEligibleGamesResponse.ts +50 -0
- package/src/Jackpots/index.ts +2 -0
- package/src/SmarticoAPI.ts +16 -2
- package/src/WSAPI/WSAPI.ts +30 -0
- package/dist/Quiz/MarketsAnswersType.d.ts +0 -22
- package/dist/Raffle/GetDrawResponse.d.ts +0 -5
- package/dist/SmarticoPublicAPI.d.ts +0 -23
- package/dist/Store/BuyShopItemErrorCode.d.ts +0 -10
- package/dist/Store/BuyShopItemRequest.d.ts +0 -4
- package/dist/Store/BuyShopItemResponse.d.ts +0 -4
- package/dist/Store/GetCategoriesShopResponse.d.ts +0 -5
- package/dist/Store/GetShopItemsResponse.d.ts +0 -5
- package/dist/Store/ShopCategory.d.ts +0 -5
- package/dist/Store/ShopCategoryPublicMeta.d.ts +0 -4
- package/dist/Store/ShopItem.d.ts +0 -9
- package/dist/Store/ShopItemPublicMeta.d.ts +0 -10
- package/dist/Store/ShopItemType.d.ts +0 -4
- package/dist/Store/StorItemPruchased.d.ts +0 -6
- package/dist/service/index.d.ts +0 -5
- package/dist/service/types/ErrorCodes.d.ts +0 -13
- package/dist/service/types/GRequest.d.ts +0 -16
- package/dist/service/types/GResponse.d.ts +0 -10
- package/dist/service/types/Game/GameAttemptType.d.ts +0 -6
- package/dist/service/types/Game/GameCanPlayType.d.ts +0 -10
- package/dist/service/types/Game/GameExternalStatus.d.ts +0 -6
- package/dist/service/types/Game/GameInfo.d.ts +0 -9
- package/dist/service/types/Game/GamePick.d.ts +0 -90
- package/dist/service/types/Game/GameUtil.d.ts +0 -7
- package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +0 -7
- package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +0 -7
- package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +0 -5
- package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +0 -6
- package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +0 -5
- package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +0 -34
- package/dist/service/types/SmarticoProto/PublicProperties.d.ts +0 -11
- package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +0 -12
- package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +0 -15
- package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +0 -10
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +0 -3
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +0 -5
- package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +0 -11
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +0 -8
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +0 -13
- package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +0 -21
- package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +0 -31
- package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +0 -12
- package/dist/service/types/SmarticoProto/TranslationArea.d.ts +0 -9
- package/dist/service/types/User/UserInfo.d.ts +0 -10
- package/dist/util/Util.d.ts +0 -51
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_dispatch: {}
|
|
3
|
+
pull_request: {}
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
paths:
|
|
9
|
+
- .github/workflows/semgrep.yml
|
|
10
|
+
schedule:
|
|
11
|
+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
|
12
|
+
- cron: 3 21 * * *
|
|
13
|
+
name: Semgrep
|
|
14
|
+
jobs:
|
|
15
|
+
semgrep:
|
|
16
|
+
name: semgrep/ci
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
env:
|
|
21
|
+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
|
22
|
+
container:
|
|
23
|
+
image: semgrep/semgrep
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- run: semgrep ci
|
package/dist/Base/ClassId.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export declare enum ClassId {
|
|
|
101
101
|
JP_WIN_PUSH = 808,
|
|
102
102
|
JP_GET_WINNERS_REQUEST = 809,
|
|
103
103
|
JP_GET_WINNERS_RESPONSE = 810,
|
|
104
|
+
JP_GET_ELIGIBLE_GAMES_REQUEST = 811,
|
|
105
|
+
JP_GET_ELIGIBLE_GAMES_RESPONSE = 812,
|
|
104
106
|
RAF_GET_RAFFLES_REQUEST = 902,
|
|
105
107
|
RAF_GET_RAFFLES_RESPONSE = 903,
|
|
106
108
|
RAF_GET_DRAW_RUN_REQUEST = 904,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
|
+
import { AchRelatedGame } from '../Base/AchRelatedGame';
|
|
3
|
+
export interface GetJackpotEligibleGamesResponse extends ProtocolResponse {
|
|
4
|
+
eligible_games: AchRelatedGame[];
|
|
5
|
+
}
|
|
6
|
+
export interface TGetJackpotEligibleGamesResponse {
|
|
7
|
+
eligible_games: JackpotEligibleGame[];
|
|
8
|
+
}
|
|
9
|
+
export interface JackpotEligibleGame {
|
|
10
|
+
/** ID of the game on Smartico side */
|
|
11
|
+
game_id: number;
|
|
12
|
+
/** ID of the game on operator side */
|
|
13
|
+
ext_game_id: string;
|
|
14
|
+
/** Name of the game */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Link to the game */
|
|
17
|
+
link: string;
|
|
18
|
+
/** Image of the game */
|
|
19
|
+
image: string;
|
|
20
|
+
/** Whether the game is enabled */
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
/** Categories of the game */
|
|
23
|
+
game_categories: string[];
|
|
24
|
+
/** Provider of the game */
|
|
25
|
+
game_provider: string;
|
|
26
|
+
/** The link to the mobile game */
|
|
27
|
+
mobile_spec_link: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
export declare const GetJackpotEligibleGamesResponseTransform: ({ eligible_games }: {
|
|
33
|
+
eligible_games: AchRelatedGame[];
|
|
34
|
+
}) => TGetJackpotEligibleGamesResponse;
|
package/dist/Jackpots/index.d.ts
CHANGED
|
@@ -16,3 +16,5 @@ export * from './JackpotsOptoutResponse';
|
|
|
16
16
|
export * from './JackpotHtmlTemplate';
|
|
17
17
|
export * from './GetJackpotWinnersRequest';
|
|
18
18
|
export * from './GetJackpotWinnersResponse';
|
|
19
|
+
export * from './GetJackpotEligibleGamesRequest';
|
|
20
|
+
export * from './GetJackpotEligibleGamesResponse';
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { GetRafflesResponse } from './Raffle/GetRafflesResponse';
|
|
|
23
23
|
import { InboxCategories } from './Inbox/InboxCategories';
|
|
24
24
|
import { GetDrawRunResponse, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeResponse } from './Raffle';
|
|
25
25
|
import { GetJackpotWinnersResponse, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';
|
|
26
|
+
import { GetJackpotEligibleGamesResponse, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';
|
|
26
27
|
interface Tracker {
|
|
27
28
|
label_api_key: string;
|
|
28
29
|
userPublicProps: any;
|
|
@@ -84,6 +85,8 @@ declare class SmarticoAPI {
|
|
|
84
85
|
}): Promise<JackpotsOptoutResponse>;
|
|
85
86
|
getJackpotWinners(user_ext_id: string, limit: number, offset: number, jp_template_id: number): Promise<GetJackpotWinnersResponse>;
|
|
86
87
|
getJackpotWinnersT(user_ext_id: string, limit: number, offset: number, jp_template_id: number): Promise<JackpotWinnerHistory[]>;
|
|
88
|
+
getJackpotEligibleGames(user_ext_id: string, jp_template_id: number): Promise<GetJackpotEligibleGamesResponse>;
|
|
89
|
+
getJackpotEligibleGamesT(user_ext_id: string, jp_template_id: number): Promise<TGetJackpotEligibleGamesResponse>;
|
|
87
90
|
sawGetTemplates(user_ext_id: string, force_language?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
|
|
88
91
|
sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
|
|
89
92
|
doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
|
4
4
|
import { JackpotDetails, JackpotWinnerHistory, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
|
|
5
5
|
import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';
|
|
6
6
|
import { InboxCategories } from '../Inbox/InboxCategories';
|
|
7
|
+
import { TGetJackpotEligibleGamesResponse } from 'src/Jackpots/GetJackpotEligibleGamesResponse';
|
|
7
8
|
/** @group General API */
|
|
8
9
|
export declare class WSAPI {
|
|
9
10
|
private api;
|
|
@@ -545,6 +546,23 @@ export declare class WSAPI {
|
|
|
545
546
|
offset?: number;
|
|
546
547
|
jp_template_id?: number;
|
|
547
548
|
}): Promise<JackpotWinnerHistory[]>;
|
|
549
|
+
/**
|
|
550
|
+
* Returns the eligible games for the jackpot with the specified jp_template_id.
|
|
551
|
+
*
|
|
552
|
+
* **Example**:
|
|
553
|
+
* ```
|
|
554
|
+
* _smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {
|
|
555
|
+
* console.log(result);
|
|
556
|
+
* });
|
|
557
|
+
* ```
|
|
558
|
+
*
|
|
559
|
+
* **Visitor mode: not supported**
|
|
560
|
+
*
|
|
561
|
+
*/
|
|
562
|
+
getJackpotEligibleGames({ jp_template_id, onUpdate }: {
|
|
563
|
+
jp_template_id: number;
|
|
564
|
+
onUpdate?: () => void;
|
|
565
|
+
}): Promise<TGetJackpotEligibleGamesResponse>;
|
|
548
566
|
/**
|
|
549
567
|
* Returns all the related tournaments and missions for the provided game id for the current user
|
|
550
568
|
* The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api
|