@smartico/public-api 0.0.166 → 0.0.167
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/Missions/GetRelatedAchTourResponse.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +2 -0
- package/dist/WSAPI/WSAPI.d.ts +23 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +31 -0
- package/dist/index.modern.mjs.map +1 -1
- package/docs/classes/WSAPI.md +43 -3
- package/package.json +1 -1
- package/src/Missions/GetRelatedAchTourResponse.ts +1 -1
- package/src/SmarticoAPI.ts +15 -0
- package/src/WSAPI/WSAPI.ts +30 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
2
|
import { Tournament } from '../Tournaments';
|
|
3
3
|
import { UserAchievement } from './UserAchievement';
|
|
4
|
-
export interface
|
|
4
|
+
export interface GetRelatedAchTourResponse extends ProtocolResponse {
|
|
5
5
|
achievements: UserAchievement[];
|
|
6
6
|
tournaments?: Tournament[];
|
|
7
7
|
}
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ 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 { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse';
|
|
19
20
|
interface Tracker {
|
|
20
21
|
label_api_key: string;
|
|
21
22
|
userPublicProps: any;
|
|
@@ -119,5 +120,6 @@ declare class SmarticoAPI {
|
|
|
119
120
|
deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse>;
|
|
120
121
|
deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse>;
|
|
121
122
|
getWSCalls(): WSAPI;
|
|
123
|
+
getRelatedItemsForGame(user_ext_id: string, related_game_id: string): Promise<GetRelatedAchTourResponse>;
|
|
122
124
|
}
|
|
123
125
|
export { SmarticoAPI, MessageSender };
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { SmarticoAPI } from '../SmarticoAPI';
|
|
|
2
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';
|
|
3
3
|
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
4
4
|
import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
|
|
5
|
+
import { GetAchievementMapResponse } from 'src/Missions';
|
|
5
6
|
/** @group General API */
|
|
6
7
|
export declare class WSAPI {
|
|
7
8
|
private api;
|
|
@@ -87,6 +88,9 @@ export declare class WSAPI {
|
|
|
87
88
|
getBadges(): Promise<TMissionOrBadge[]>;
|
|
88
89
|
/**
|
|
89
90
|
* Returns all the bonuses for the current user
|
|
91
|
+
* The returned bonuss are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
92
|
+
* Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
93
|
+
* The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.
|
|
90
94
|
*
|
|
91
95
|
* **Visitor mode: not supported**
|
|
92
96
|
*/
|
|
@@ -460,4 +464,23 @@ export declare class WSAPI {
|
|
|
460
464
|
jackpotOptOut(filter: {
|
|
461
465
|
jp_template_id: number;
|
|
462
466
|
}): Promise<JackpotsOptoutResponse>;
|
|
467
|
+
/**
|
|
468
|
+
* Returns all the related tournaments and missions for the provided game id for the current user
|
|
469
|
+
* The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api
|
|
470
|
+
*
|
|
471
|
+
* **Example**:
|
|
472
|
+
* ```
|
|
473
|
+
* _smartico.api.getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
474
|
+
* console.log(result);
|
|
475
|
+
* });
|
|
476
|
+
* ```
|
|
477
|
+
*
|
|
478
|
+
* **Example in the Visitor mode**:
|
|
479
|
+
* ```
|
|
480
|
+
* _smartico.vapi('EN').getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
481
|
+
* console.log(result);
|
|
482
|
+
* });
|
|
483
|
+
* ```
|
|
484
|
+
*/
|
|
485
|
+
getRelatedItemsForGame(related_game_id: string): Promise<GetAchievementMapResponse>;
|
|
463
486
|
}
|
package/dist/index.js
CHANGED
|
@@ -1392,6 +1392,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1392
1392
|
}
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Returns all the bonuses for the current user
|
|
1395
|
+
* The returned bonuss are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
1396
|
+
* Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1397
|
+
* The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.
|
|
1395
1398
|
*
|
|
1396
1399
|
* **Visitor mode: not supported**
|
|
1397
1400
|
*/
|
|
@@ -2236,6 +2239,33 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2236
2239
|
} catch (e) {
|
|
2237
2240
|
return Promise.reject(e);
|
|
2238
2241
|
}
|
|
2242
|
+
}
|
|
2243
|
+
/**
|
|
2244
|
+
* Returns all the related tournaments and missions for the provided game id for the current user
|
|
2245
|
+
* The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api
|
|
2246
|
+
*
|
|
2247
|
+
* **Example**:
|
|
2248
|
+
* ```
|
|
2249
|
+
* _smartico.api.getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
2250
|
+
* console.log(result);
|
|
2251
|
+
* });
|
|
2252
|
+
* ```
|
|
2253
|
+
*
|
|
2254
|
+
* **Example in the Visitor mode**:
|
|
2255
|
+
* ```
|
|
2256
|
+
* _smartico.vapi('EN').getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
2257
|
+
* console.log(result);
|
|
2258
|
+
* });
|
|
2259
|
+
* ```
|
|
2260
|
+
*/
|
|
2261
|
+
;
|
|
2262
|
+
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(related_game_id) {
|
|
2263
|
+
try {
|
|
2264
|
+
var _this43 = this;
|
|
2265
|
+
return Promise.resolve(_this43.api.getRelatedItemsForGame(null, related_game_id));
|
|
2266
|
+
} catch (e) {
|
|
2267
|
+
return Promise.reject(e);
|
|
2268
|
+
}
|
|
2239
2269
|
};
|
|
2240
2270
|
return WSAPI;
|
|
2241
2271
|
}();
|
|
@@ -3318,6 +3348,17 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
3318
3348
|
_proto.getWSCalls = function getWSCalls() {
|
|
3319
3349
|
return new WSAPI(this);
|
|
3320
3350
|
};
|
|
3351
|
+
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(user_ext_id, related_game_id) {
|
|
3352
|
+
try {
|
|
3353
|
+
var _this58 = this;
|
|
3354
|
+
var message = _this58.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
|
|
3355
|
+
related_game_id: related_game_id
|
|
3356
|
+
});
|
|
3357
|
+
return Promise.resolve(_this58.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
|
|
3358
|
+
} catch (e) {
|
|
3359
|
+
return Promise.reject(e);
|
|
3360
|
+
}
|
|
3361
|
+
};
|
|
3321
3362
|
return SmarticoAPI;
|
|
3322
3363
|
}();
|
|
3323
3364
|
|