@masterunoco/casinowebengine-api 0.1.5 → 0.1.7
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/index.cjs +199 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +135 -3
- package/dist/index.d.ts +135 -3
- package/dist/index.js +199 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -370,11 +370,29 @@ interface ContentPage {
|
|
|
370
370
|
createdAt: string;
|
|
371
371
|
updatedAt: string;
|
|
372
372
|
}
|
|
373
|
+
interface AnnouncementsResponse {
|
|
374
|
+
message: string;
|
|
375
|
+
announcements: Announcement[] | string;
|
|
376
|
+
gameAnnouncements: Announcement[] | string;
|
|
377
|
+
}
|
|
378
|
+
interface Announcement {
|
|
379
|
+
createdAt: string;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
id: number;
|
|
382
|
+
state: string;
|
|
383
|
+
title: string;
|
|
384
|
+
text: string;
|
|
385
|
+
category: string;
|
|
386
|
+
startDate: string;
|
|
387
|
+
endDate: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
373
390
|
declare class ContentAPI {
|
|
374
391
|
private http;
|
|
375
392
|
constructor(http: HttpClient);
|
|
376
393
|
list(): Promise<ContentPage[]>;
|
|
377
394
|
get(slug: string): Promise<ContentPage>;
|
|
395
|
+
getAnnouncements(): Promise<AnnouncementsResponse>;
|
|
378
396
|
}
|
|
379
397
|
|
|
380
398
|
interface ChargeData {
|
|
@@ -636,6 +654,12 @@ interface GlobalFavorite {
|
|
|
636
654
|
interface Providers {
|
|
637
655
|
providers: string[];
|
|
638
656
|
}
|
|
657
|
+
interface CategoryProvider {
|
|
658
|
+
id: number;
|
|
659
|
+
name: string;
|
|
660
|
+
parentId?: number;
|
|
661
|
+
providers: string;
|
|
662
|
+
}
|
|
639
663
|
interface Lobby {
|
|
640
664
|
[key: string]: LobbyGame[];
|
|
641
665
|
}
|
|
@@ -670,6 +694,18 @@ interface TopRated {
|
|
|
670
694
|
favorites: number;
|
|
671
695
|
isInRegion: number;
|
|
672
696
|
}
|
|
697
|
+
interface GameOfTheWeek {
|
|
698
|
+
id: number;
|
|
699
|
+
externalId: string;
|
|
700
|
+
name: string;
|
|
701
|
+
vendor: string;
|
|
702
|
+
thumbnail: string;
|
|
703
|
+
provider: string;
|
|
704
|
+
category: string;
|
|
705
|
+
}
|
|
706
|
+
interface GamesOfTheWeekResponse {
|
|
707
|
+
gamesOfTheWeek: GameOfTheWeek[];
|
|
708
|
+
}
|
|
673
709
|
|
|
674
710
|
interface GameLinkResponse {
|
|
675
711
|
message: string;
|
|
@@ -685,7 +721,7 @@ declare class GamesAPI {
|
|
|
685
721
|
/** Requires auth: player link */
|
|
686
722
|
getLink(gameId: string): Promise<GameLinkResponse>;
|
|
687
723
|
/** Public: demo link */
|
|
688
|
-
getDemoLink(
|
|
724
|
+
getDemoLink(gameExternalId: string): Promise<GameLinkResponse>;
|
|
689
725
|
setFavorite(gameId: number, isFavorite: boolean): Promise<SetFavoriteGamesResponse>;
|
|
690
726
|
getFavorite(): Promise<FavoriteGamesResponse[]>;
|
|
691
727
|
getRecentBigWins(category: string): Promise<recentBigWinsResponse[]>;
|
|
@@ -695,7 +731,11 @@ declare class GamesAPI {
|
|
|
695
731
|
topRated: TopRated[];
|
|
696
732
|
}>;
|
|
697
733
|
getProviders(): Promise<Providers>;
|
|
734
|
+
getCategoriesProviders(): Promise<{
|
|
735
|
+
categoryProviders: CategoryProvider[];
|
|
736
|
+
}>;
|
|
698
737
|
getLobby(): Promise<Lobby[]>;
|
|
738
|
+
getGameOfTheWeek(): Promise<GamesOfTheWeekResponse>;
|
|
699
739
|
}
|
|
700
740
|
|
|
701
741
|
declare class GeolocationAPI {
|
|
@@ -973,9 +1013,20 @@ declare class PlayerAPI {
|
|
|
973
1013
|
}): Promise<{
|
|
974
1014
|
message: string;
|
|
975
1015
|
}>;
|
|
1016
|
+
verifyPhoneSignup(data: PhoneVerifyProps): Promise<{
|
|
1017
|
+
message: string;
|
|
1018
|
+
}>;
|
|
1019
|
+
verifyPhoneCodeSignup(data: {
|
|
1020
|
+
verificationCode: string;
|
|
1021
|
+
verificationToken: string;
|
|
1022
|
+
}): Promise<{
|
|
1023
|
+
message: string;
|
|
1024
|
+
}>;
|
|
976
1025
|
getVerificationStatus(): Promise<VerificationStatus[]>;
|
|
977
1026
|
getAvatars(): Promise<Avatar$1[]>;
|
|
978
|
-
changeAvatar(data:
|
|
1027
|
+
changeAvatar(data: {
|
|
1028
|
+
avatarId: number;
|
|
1029
|
+
}): Promise<{
|
|
979
1030
|
message: string;
|
|
980
1031
|
avatar: Avatar$1;
|
|
981
1032
|
}>;
|
|
@@ -1193,6 +1244,16 @@ interface Currency {
|
|
|
1193
1244
|
currencyName: string;
|
|
1194
1245
|
id: number;
|
|
1195
1246
|
}
|
|
1247
|
+
interface CurrencyRates {
|
|
1248
|
+
provider: string;
|
|
1249
|
+
base: string;
|
|
1250
|
+
date: string;
|
|
1251
|
+
updatedAt: string;
|
|
1252
|
+
rates: Rates;
|
|
1253
|
+
}
|
|
1254
|
+
interface Rates {
|
|
1255
|
+
[key: string]: number;
|
|
1256
|
+
}
|
|
1196
1257
|
interface Preferences {
|
|
1197
1258
|
createdAt?: string;
|
|
1198
1259
|
updatedAt?: string;
|
|
@@ -1231,6 +1292,7 @@ declare class SettingsAPI {
|
|
|
1231
1292
|
getPreferences(): Promise<Preferences>;
|
|
1232
1293
|
updatePreferences(data: Partial<Preferences>): Promise<Preferences>;
|
|
1233
1294
|
getCurrencies(): Promise<Currency[]>;
|
|
1295
|
+
getCurrenciesRates(): Promise<CurrencyRates>;
|
|
1234
1296
|
getWebSetting(lang: string): Promise<WebSetting[]>;
|
|
1235
1297
|
getWebSettingProviders(lang: string): Promise<WebSetting[]>;
|
|
1236
1298
|
getWebSettingPin(): Promise<WebSetting[]>;
|
|
@@ -1242,6 +1304,8 @@ declare class SettingsAPI {
|
|
|
1242
1304
|
getWebSettingLiveCasinoCategories(lang: string): Promise<WebSetting[]>;
|
|
1243
1305
|
getWebsiteAllowedPlayerTags(lang: string): Promise<WebSetting[]>;
|
|
1244
1306
|
getSupportEmail(lang: string): Promise<WebSetting[]>;
|
|
1307
|
+
getReferralBannersPack(lang: string): Promise<WebSetting[]>;
|
|
1308
|
+
getReferralGraphicsPack(lang: string): Promise<WebSetting[]>;
|
|
1245
1309
|
}
|
|
1246
1310
|
|
|
1247
1311
|
interface SportConfig {
|
|
@@ -1350,13 +1414,81 @@ declare class WithdrawAPI {
|
|
|
1350
1414
|
getAnindaBankList(methodId: number): Promise<AnindaBank[]>;
|
|
1351
1415
|
}
|
|
1352
1416
|
|
|
1417
|
+
type SocketMessage<TPayload = any> = {
|
|
1418
|
+
type: string;
|
|
1419
|
+
payload?: TPayload;
|
|
1420
|
+
message?: any;
|
|
1421
|
+
};
|
|
1422
|
+
type SocketStatus = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'reconnecting';
|
|
1423
|
+
type SocketEventHandler<T = any> = (data: T, raw: SocketMessage) => void;
|
|
1424
|
+
type SocketClientOptions = {
|
|
1425
|
+
/** Example: wss://socketservice.moneycloud.vip/socket/public-room/join */
|
|
1426
|
+
url: string;
|
|
1427
|
+
/** joinPublic payload name (default: "player1") */
|
|
1428
|
+
publicName?: string;
|
|
1429
|
+
/** Ping interval (ms). Default: 5000 */
|
|
1430
|
+
pingIntervalMs?: number;
|
|
1431
|
+
/** Auto reconnect on close (default: true) */
|
|
1432
|
+
autoReconnect?: boolean;
|
|
1433
|
+
/** Max reconnect delay (ms). Default: 30000 */
|
|
1434
|
+
maxReconnectDelayMs?: number;
|
|
1435
|
+
/** Provide socket token from your storage (localStorage helper, etc.) */
|
|
1436
|
+
getSocketToken?: () => string | null;
|
|
1437
|
+
/** Provide user identity when logged in */
|
|
1438
|
+
getUser?: () => {
|
|
1439
|
+
id: number;
|
|
1440
|
+
name?: string | null;
|
|
1441
|
+
} | null;
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
declare class SocketClient {
|
|
1445
|
+
private opts;
|
|
1446
|
+
private ws;
|
|
1447
|
+
private status;
|
|
1448
|
+
private pingTimer;
|
|
1449
|
+
private reconnectTimer;
|
|
1450
|
+
private reconnectAttempt;
|
|
1451
|
+
private manualClose;
|
|
1452
|
+
private hasJoinedAfterLogin;
|
|
1453
|
+
private handlers;
|
|
1454
|
+
constructor(opts: SocketClientOptions);
|
|
1455
|
+
/** Current status useful for UI */
|
|
1456
|
+
getStatus(): SocketStatus;
|
|
1457
|
+
/** Raw socket access (optional) */
|
|
1458
|
+
getSocket(): WebSocket | null;
|
|
1459
|
+
/** Connect (idempotent) */
|
|
1460
|
+
connect(): void;
|
|
1461
|
+
/** Disconnect gracefully */
|
|
1462
|
+
disconnect(code?: number, reason?: string): void;
|
|
1463
|
+
/** Call after login (or whenever token/user changes) */
|
|
1464
|
+
onLogin(): void;
|
|
1465
|
+
/** Reset join flag (call on logout) */
|
|
1466
|
+
onLogout(): void;
|
|
1467
|
+
/** Subscribe to message type (e.g. 'happyHourStarted', 'latest-bet'). Use '*' to receive everything. */
|
|
1468
|
+
on<T = any>(type: string, handler: SocketEventHandler<T>): () => void;
|
|
1469
|
+
off<T = any>(type: string, handler: SocketEventHandler<T>): void;
|
|
1470
|
+
/** Send a typed message (SDK-side helper) */
|
|
1471
|
+
send(type: string, payload?: any): void;
|
|
1472
|
+
private emit;
|
|
1473
|
+
private sendRaw;
|
|
1474
|
+
private tryJoinAfterLogin;
|
|
1475
|
+
private startPing;
|
|
1476
|
+
private stopPing;
|
|
1477
|
+
private scheduleReconnect;
|
|
1478
|
+
private clearReconnect;
|
|
1479
|
+
private setStatus;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1353
1482
|
interface SDKConfig {
|
|
1354
1483
|
baseUrl: string;
|
|
1355
1484
|
timeoutMs?: number;
|
|
1485
|
+
socketUrl?: string;
|
|
1486
|
+
getSocketToken?: () => string | null;
|
|
1356
1487
|
}
|
|
1357
1488
|
declare class GameSDK {
|
|
1358
1489
|
readonly http: HttpClient;
|
|
1359
1490
|
readonly auth: JwtAuth;
|
|
1491
|
+
readonly ws: SocketClient;
|
|
1360
1492
|
readonly affiliate: AffiliateAPI;
|
|
1361
1493
|
readonly content: ContentAPI;
|
|
1362
1494
|
readonly deposit: DepositAPI;
|
|
@@ -1376,4 +1508,4 @@ declare class GameSDK {
|
|
|
1376
1508
|
}
|
|
1377
1509
|
declare const createGameSDK: (cfg: SDKConfig) => GameSDK;
|
|
1378
1510
|
|
|
1379
|
-
export { ApiError, type AuthResponse, ContentAPI, type
|
|
1511
|
+
export { ApiError, type AuthResponse, ContentAPI, type CreatePlayerInput, type CreatePlayerV2Input, type CreatePlayerV2Step2Input, type GameLinkResponse, GameSDK, GamesAPI, type GeoInfo, type GoogleLoginRequest, type GoogleProfile, type ISODateString, JwtAuth, PromotionsAPI, type RegisterResponse, type SDKConfig, type SignupResponse, type SignupV2ValidateResponse, USERNAME_REGEX, type User, type Wallet, createGameSDK, isApiError, type pinCodeCheckResponse, type pinCodeResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -370,11 +370,29 @@ interface ContentPage {
|
|
|
370
370
|
createdAt: string;
|
|
371
371
|
updatedAt: string;
|
|
372
372
|
}
|
|
373
|
+
interface AnnouncementsResponse {
|
|
374
|
+
message: string;
|
|
375
|
+
announcements: Announcement[] | string;
|
|
376
|
+
gameAnnouncements: Announcement[] | string;
|
|
377
|
+
}
|
|
378
|
+
interface Announcement {
|
|
379
|
+
createdAt: string;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
id: number;
|
|
382
|
+
state: string;
|
|
383
|
+
title: string;
|
|
384
|
+
text: string;
|
|
385
|
+
category: string;
|
|
386
|
+
startDate: string;
|
|
387
|
+
endDate: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
373
390
|
declare class ContentAPI {
|
|
374
391
|
private http;
|
|
375
392
|
constructor(http: HttpClient);
|
|
376
393
|
list(): Promise<ContentPage[]>;
|
|
377
394
|
get(slug: string): Promise<ContentPage>;
|
|
395
|
+
getAnnouncements(): Promise<AnnouncementsResponse>;
|
|
378
396
|
}
|
|
379
397
|
|
|
380
398
|
interface ChargeData {
|
|
@@ -636,6 +654,12 @@ interface GlobalFavorite {
|
|
|
636
654
|
interface Providers {
|
|
637
655
|
providers: string[];
|
|
638
656
|
}
|
|
657
|
+
interface CategoryProvider {
|
|
658
|
+
id: number;
|
|
659
|
+
name: string;
|
|
660
|
+
parentId?: number;
|
|
661
|
+
providers: string;
|
|
662
|
+
}
|
|
639
663
|
interface Lobby {
|
|
640
664
|
[key: string]: LobbyGame[];
|
|
641
665
|
}
|
|
@@ -670,6 +694,18 @@ interface TopRated {
|
|
|
670
694
|
favorites: number;
|
|
671
695
|
isInRegion: number;
|
|
672
696
|
}
|
|
697
|
+
interface GameOfTheWeek {
|
|
698
|
+
id: number;
|
|
699
|
+
externalId: string;
|
|
700
|
+
name: string;
|
|
701
|
+
vendor: string;
|
|
702
|
+
thumbnail: string;
|
|
703
|
+
provider: string;
|
|
704
|
+
category: string;
|
|
705
|
+
}
|
|
706
|
+
interface GamesOfTheWeekResponse {
|
|
707
|
+
gamesOfTheWeek: GameOfTheWeek[];
|
|
708
|
+
}
|
|
673
709
|
|
|
674
710
|
interface GameLinkResponse {
|
|
675
711
|
message: string;
|
|
@@ -685,7 +721,7 @@ declare class GamesAPI {
|
|
|
685
721
|
/** Requires auth: player link */
|
|
686
722
|
getLink(gameId: string): Promise<GameLinkResponse>;
|
|
687
723
|
/** Public: demo link */
|
|
688
|
-
getDemoLink(
|
|
724
|
+
getDemoLink(gameExternalId: string): Promise<GameLinkResponse>;
|
|
689
725
|
setFavorite(gameId: number, isFavorite: boolean): Promise<SetFavoriteGamesResponse>;
|
|
690
726
|
getFavorite(): Promise<FavoriteGamesResponse[]>;
|
|
691
727
|
getRecentBigWins(category: string): Promise<recentBigWinsResponse[]>;
|
|
@@ -695,7 +731,11 @@ declare class GamesAPI {
|
|
|
695
731
|
topRated: TopRated[];
|
|
696
732
|
}>;
|
|
697
733
|
getProviders(): Promise<Providers>;
|
|
734
|
+
getCategoriesProviders(): Promise<{
|
|
735
|
+
categoryProviders: CategoryProvider[];
|
|
736
|
+
}>;
|
|
698
737
|
getLobby(): Promise<Lobby[]>;
|
|
738
|
+
getGameOfTheWeek(): Promise<GamesOfTheWeekResponse>;
|
|
699
739
|
}
|
|
700
740
|
|
|
701
741
|
declare class GeolocationAPI {
|
|
@@ -973,9 +1013,20 @@ declare class PlayerAPI {
|
|
|
973
1013
|
}): Promise<{
|
|
974
1014
|
message: string;
|
|
975
1015
|
}>;
|
|
1016
|
+
verifyPhoneSignup(data: PhoneVerifyProps): Promise<{
|
|
1017
|
+
message: string;
|
|
1018
|
+
}>;
|
|
1019
|
+
verifyPhoneCodeSignup(data: {
|
|
1020
|
+
verificationCode: string;
|
|
1021
|
+
verificationToken: string;
|
|
1022
|
+
}): Promise<{
|
|
1023
|
+
message: string;
|
|
1024
|
+
}>;
|
|
976
1025
|
getVerificationStatus(): Promise<VerificationStatus[]>;
|
|
977
1026
|
getAvatars(): Promise<Avatar$1[]>;
|
|
978
|
-
changeAvatar(data:
|
|
1027
|
+
changeAvatar(data: {
|
|
1028
|
+
avatarId: number;
|
|
1029
|
+
}): Promise<{
|
|
979
1030
|
message: string;
|
|
980
1031
|
avatar: Avatar$1;
|
|
981
1032
|
}>;
|
|
@@ -1193,6 +1244,16 @@ interface Currency {
|
|
|
1193
1244
|
currencyName: string;
|
|
1194
1245
|
id: number;
|
|
1195
1246
|
}
|
|
1247
|
+
interface CurrencyRates {
|
|
1248
|
+
provider: string;
|
|
1249
|
+
base: string;
|
|
1250
|
+
date: string;
|
|
1251
|
+
updatedAt: string;
|
|
1252
|
+
rates: Rates;
|
|
1253
|
+
}
|
|
1254
|
+
interface Rates {
|
|
1255
|
+
[key: string]: number;
|
|
1256
|
+
}
|
|
1196
1257
|
interface Preferences {
|
|
1197
1258
|
createdAt?: string;
|
|
1198
1259
|
updatedAt?: string;
|
|
@@ -1231,6 +1292,7 @@ declare class SettingsAPI {
|
|
|
1231
1292
|
getPreferences(): Promise<Preferences>;
|
|
1232
1293
|
updatePreferences(data: Partial<Preferences>): Promise<Preferences>;
|
|
1233
1294
|
getCurrencies(): Promise<Currency[]>;
|
|
1295
|
+
getCurrenciesRates(): Promise<CurrencyRates>;
|
|
1234
1296
|
getWebSetting(lang: string): Promise<WebSetting[]>;
|
|
1235
1297
|
getWebSettingProviders(lang: string): Promise<WebSetting[]>;
|
|
1236
1298
|
getWebSettingPin(): Promise<WebSetting[]>;
|
|
@@ -1242,6 +1304,8 @@ declare class SettingsAPI {
|
|
|
1242
1304
|
getWebSettingLiveCasinoCategories(lang: string): Promise<WebSetting[]>;
|
|
1243
1305
|
getWebsiteAllowedPlayerTags(lang: string): Promise<WebSetting[]>;
|
|
1244
1306
|
getSupportEmail(lang: string): Promise<WebSetting[]>;
|
|
1307
|
+
getReferralBannersPack(lang: string): Promise<WebSetting[]>;
|
|
1308
|
+
getReferralGraphicsPack(lang: string): Promise<WebSetting[]>;
|
|
1245
1309
|
}
|
|
1246
1310
|
|
|
1247
1311
|
interface SportConfig {
|
|
@@ -1350,13 +1414,81 @@ declare class WithdrawAPI {
|
|
|
1350
1414
|
getAnindaBankList(methodId: number): Promise<AnindaBank[]>;
|
|
1351
1415
|
}
|
|
1352
1416
|
|
|
1417
|
+
type SocketMessage<TPayload = any> = {
|
|
1418
|
+
type: string;
|
|
1419
|
+
payload?: TPayload;
|
|
1420
|
+
message?: any;
|
|
1421
|
+
};
|
|
1422
|
+
type SocketStatus = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'reconnecting';
|
|
1423
|
+
type SocketEventHandler<T = any> = (data: T, raw: SocketMessage) => void;
|
|
1424
|
+
type SocketClientOptions = {
|
|
1425
|
+
/** Example: wss://socketservice.moneycloud.vip/socket/public-room/join */
|
|
1426
|
+
url: string;
|
|
1427
|
+
/** joinPublic payload name (default: "player1") */
|
|
1428
|
+
publicName?: string;
|
|
1429
|
+
/** Ping interval (ms). Default: 5000 */
|
|
1430
|
+
pingIntervalMs?: number;
|
|
1431
|
+
/** Auto reconnect on close (default: true) */
|
|
1432
|
+
autoReconnect?: boolean;
|
|
1433
|
+
/** Max reconnect delay (ms). Default: 30000 */
|
|
1434
|
+
maxReconnectDelayMs?: number;
|
|
1435
|
+
/** Provide socket token from your storage (localStorage helper, etc.) */
|
|
1436
|
+
getSocketToken?: () => string | null;
|
|
1437
|
+
/** Provide user identity when logged in */
|
|
1438
|
+
getUser?: () => {
|
|
1439
|
+
id: number;
|
|
1440
|
+
name?: string | null;
|
|
1441
|
+
} | null;
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
declare class SocketClient {
|
|
1445
|
+
private opts;
|
|
1446
|
+
private ws;
|
|
1447
|
+
private status;
|
|
1448
|
+
private pingTimer;
|
|
1449
|
+
private reconnectTimer;
|
|
1450
|
+
private reconnectAttempt;
|
|
1451
|
+
private manualClose;
|
|
1452
|
+
private hasJoinedAfterLogin;
|
|
1453
|
+
private handlers;
|
|
1454
|
+
constructor(opts: SocketClientOptions);
|
|
1455
|
+
/** Current status useful for UI */
|
|
1456
|
+
getStatus(): SocketStatus;
|
|
1457
|
+
/** Raw socket access (optional) */
|
|
1458
|
+
getSocket(): WebSocket | null;
|
|
1459
|
+
/** Connect (idempotent) */
|
|
1460
|
+
connect(): void;
|
|
1461
|
+
/** Disconnect gracefully */
|
|
1462
|
+
disconnect(code?: number, reason?: string): void;
|
|
1463
|
+
/** Call after login (or whenever token/user changes) */
|
|
1464
|
+
onLogin(): void;
|
|
1465
|
+
/** Reset join flag (call on logout) */
|
|
1466
|
+
onLogout(): void;
|
|
1467
|
+
/** Subscribe to message type (e.g. 'happyHourStarted', 'latest-bet'). Use '*' to receive everything. */
|
|
1468
|
+
on<T = any>(type: string, handler: SocketEventHandler<T>): () => void;
|
|
1469
|
+
off<T = any>(type: string, handler: SocketEventHandler<T>): void;
|
|
1470
|
+
/** Send a typed message (SDK-side helper) */
|
|
1471
|
+
send(type: string, payload?: any): void;
|
|
1472
|
+
private emit;
|
|
1473
|
+
private sendRaw;
|
|
1474
|
+
private tryJoinAfterLogin;
|
|
1475
|
+
private startPing;
|
|
1476
|
+
private stopPing;
|
|
1477
|
+
private scheduleReconnect;
|
|
1478
|
+
private clearReconnect;
|
|
1479
|
+
private setStatus;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1353
1482
|
interface SDKConfig {
|
|
1354
1483
|
baseUrl: string;
|
|
1355
1484
|
timeoutMs?: number;
|
|
1485
|
+
socketUrl?: string;
|
|
1486
|
+
getSocketToken?: () => string | null;
|
|
1356
1487
|
}
|
|
1357
1488
|
declare class GameSDK {
|
|
1358
1489
|
readonly http: HttpClient;
|
|
1359
1490
|
readonly auth: JwtAuth;
|
|
1491
|
+
readonly ws: SocketClient;
|
|
1360
1492
|
readonly affiliate: AffiliateAPI;
|
|
1361
1493
|
readonly content: ContentAPI;
|
|
1362
1494
|
readonly deposit: DepositAPI;
|
|
@@ -1376,4 +1508,4 @@ declare class GameSDK {
|
|
|
1376
1508
|
}
|
|
1377
1509
|
declare const createGameSDK: (cfg: SDKConfig) => GameSDK;
|
|
1378
1510
|
|
|
1379
|
-
export { ApiError, type AuthResponse, ContentAPI, type
|
|
1511
|
+
export { ApiError, type AuthResponse, ContentAPI, type CreatePlayerInput, type CreatePlayerV2Input, type CreatePlayerV2Step2Input, type GameLinkResponse, GameSDK, GamesAPI, type GeoInfo, type GoogleLoginRequest, type GoogleProfile, type ISODateString, JwtAuth, PromotionsAPI, type RegisterResponse, type SDKConfig, type SignupResponse, type SignupV2ValidateResponse, USERNAME_REGEX, type User, type Wallet, createGameSDK, isApiError, type pinCodeCheckResponse, type pinCodeResponse };
|