front-back-poker-types 5.0.202 → 5.0.204
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/cjs/index.js +42 -7
- package/dist/cjs/types/api/user.d.ts +51 -4
- package/dist/cjs/types/config.d.ts +0 -1
- package/dist/cjs/types/ws/notifications.d.ts +4 -5
- package/dist/cjs/types/ws/room/to-front.d.ts +4 -17
- package/dist/esm/index.js +43 -7
- package/dist/esm/types/api/user.d.ts +51 -4
- package/dist/esm/types/config.d.ts +0 -1
- package/dist/esm/types/ws/notifications.d.ts +4 -5
- package/dist/esm/types/ws/room/to-front.d.ts +4 -17
- package/dist/index.d.ts +61 -28
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9,8 +9,50 @@ var TRANSACTIONS_PATHNAME = '/transactions';
|
|
|
9
9
|
var USER_TRANSACTIONS_PATHNAME = "".concat(USER_PATHNAME).concat(TRANSACTIONS_PATHNAME);
|
|
10
10
|
exports.TransactionType = void 0;
|
|
11
11
|
(function (TransactionType) {
|
|
12
|
+
/**
|
|
13
|
+
* Вывод денег из системы
|
|
14
|
+
*/
|
|
12
15
|
TransactionType[TransactionType["Withdraw"] = 0] = "Withdraw";
|
|
16
|
+
/**
|
|
17
|
+
* Пополнение счета
|
|
18
|
+
*/
|
|
13
19
|
TransactionType[TransactionType["Deposit"] = 1] = "Deposit";
|
|
20
|
+
/**
|
|
21
|
+
* Начисление по промокоду
|
|
22
|
+
*/
|
|
23
|
+
TransactionType[TransactionType["PromoCode"] = 2] = "PromoCode";
|
|
24
|
+
/**
|
|
25
|
+
* Игрок садится за стол (баланс → стол)
|
|
26
|
+
*/
|
|
27
|
+
TransactionType[TransactionType["BuyIn"] = 3] = "BuyIn";
|
|
28
|
+
/**
|
|
29
|
+
* Игрок встает из-за стола (стол → баланс)
|
|
30
|
+
*/
|
|
31
|
+
TransactionType[TransactionType["CashOut"] = 4] = "CashOut";
|
|
32
|
+
/**
|
|
33
|
+
* Перевод другому пользователю
|
|
34
|
+
*/
|
|
35
|
+
TransactionType[TransactionType["Transfer"] = 5] = "Transfer";
|
|
36
|
+
/**
|
|
37
|
+
* Перевод от другого пользователя
|
|
38
|
+
*/
|
|
39
|
+
TransactionType[TransactionType["TransferFrom"] = 6] = "TransferFrom";
|
|
40
|
+
/**
|
|
41
|
+
* Вход в турнир
|
|
42
|
+
*/
|
|
43
|
+
TransactionType[TransactionType["TournamentBuyIn"] = 7] = "TournamentBuyIn";
|
|
44
|
+
/**
|
|
45
|
+
* Выигрыш в турнире
|
|
46
|
+
*/
|
|
47
|
+
TransactionType[TransactionType["TournamentPrize"] = 8] = "TournamentPrize";
|
|
48
|
+
/**
|
|
49
|
+
* Отмена турнира
|
|
50
|
+
*/
|
|
51
|
+
TransactionType[TransactionType["TournamentCancel"] = 9] = "TournamentCancel";
|
|
52
|
+
/**
|
|
53
|
+
* Профит от рефералов
|
|
54
|
+
*/
|
|
55
|
+
TransactionType[TransactionType["ReferralProfit"] = 10] = "ReferralProfit";
|
|
14
56
|
})(exports.TransactionType || (exports.TransactionType = {}));
|
|
15
57
|
var PROMO_CODE_PATHNAME = '/promo-code';
|
|
16
58
|
var USER_PROMO_CODE_PATHNAME = "".concat(USER_PATHNAME).concat(PROMO_CODE_PATHNAME);
|
|
@@ -440,11 +482,6 @@ exports.NotificationType = void 0;
|
|
|
440
482
|
NotificationType["BalanceUpdate"] = "BalanceUpdate";
|
|
441
483
|
NotificationType["UsersOnline"] = "UsersOnline";
|
|
442
484
|
})(exports.NotificationType || (exports.NotificationType = {}));
|
|
443
|
-
exports.BalanceUpdateType = void 0;
|
|
444
|
-
(function (BalanceUpdateType) {
|
|
445
|
-
BalanceUpdateType[BalanceUpdateType["Deposit"] = 0] = "Deposit";
|
|
446
|
-
BalanceUpdateType[BalanceUpdateType["PromoCode"] = 1] = "PromoCode";
|
|
447
|
-
})(exports.BalanceUpdateType || (exports.BalanceUpdateType = {}));
|
|
448
485
|
|
|
449
486
|
exports.RoomType = void 0;
|
|
450
487
|
(function (RoomType) {
|
|
@@ -487,7 +524,6 @@ var StartAppParamKey = {
|
|
|
487
524
|
ReferralProgram: 'referral-program',
|
|
488
525
|
};
|
|
489
526
|
|
|
490
|
-
var WITHDRAW_COMMISSION_USDT_CENTS = 10;
|
|
491
527
|
// tg bot
|
|
492
528
|
var DEVELOPMENT_USERNAME_TG_BOT = 'nah_bot';
|
|
493
529
|
var DEVELOPMENT_SHORT_NAME_TG_BOT = 'nah';
|
|
@@ -558,7 +594,6 @@ exports.USER_ROOMS_PATHNAME = USER_ROOMS_PATHNAME;
|
|
|
558
594
|
exports.USER_SETTINGS_PATHNAME = USER_SETTINGS_PATHNAME;
|
|
559
595
|
exports.USER_TRANSACTIONS_PATHNAME = USER_TRANSACTIONS_PATHNAME;
|
|
560
596
|
exports.USER_WITHDRAW_PATHNAME = USER_WITHDRAW_PATHNAME;
|
|
561
|
-
exports.WITHDRAW_COMMISSION_USDT_CENTS = WITHDRAW_COMMISSION_USDT_CENTS;
|
|
562
597
|
exports.WITHDRAW_PATHNAME = WITHDRAW_PATHNAME;
|
|
563
598
|
exports.WsCloseCode = WsCloseCode;
|
|
564
599
|
exports.WsErrorCode = WsErrorCode;
|
|
@@ -33,16 +33,63 @@ export type PostUserWithdrawRequest = {
|
|
|
33
33
|
export declare const TRANSACTIONS_PATHNAME = "/transactions";
|
|
34
34
|
export declare const USER_TRANSACTIONS_PATHNAME = "/user/transactions";
|
|
35
35
|
export declare enum TransactionType {
|
|
36
|
+
/**
|
|
37
|
+
* Вывод денег из системы
|
|
38
|
+
*/
|
|
36
39
|
Withdraw = 0,
|
|
37
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Пополнение счета
|
|
42
|
+
*/
|
|
43
|
+
Deposit = 1,
|
|
44
|
+
/**
|
|
45
|
+
* Начисление по промокоду
|
|
46
|
+
*/
|
|
47
|
+
PromoCode = 2,
|
|
48
|
+
/**
|
|
49
|
+
* Игрок садится за стол (баланс → стол)
|
|
50
|
+
*/
|
|
51
|
+
BuyIn = 3,
|
|
52
|
+
/**
|
|
53
|
+
* Игрок встает из-за стола (стол → баланс)
|
|
54
|
+
*/
|
|
55
|
+
CashOut = 4,
|
|
56
|
+
/**
|
|
57
|
+
* Перевод другому пользователю
|
|
58
|
+
*/
|
|
59
|
+
Transfer = 5,
|
|
60
|
+
/**
|
|
61
|
+
* Перевод от другого пользователя
|
|
62
|
+
*/
|
|
63
|
+
TransferFrom = 6,
|
|
64
|
+
/**
|
|
65
|
+
* Вход в турнир
|
|
66
|
+
*/
|
|
67
|
+
TournamentBuyIn = 7,
|
|
68
|
+
/**
|
|
69
|
+
* Выигрыш в турнире
|
|
70
|
+
*/
|
|
71
|
+
TournamentPrize = 8,
|
|
72
|
+
/**
|
|
73
|
+
* Отмена турнира
|
|
74
|
+
*/
|
|
75
|
+
TournamentCancel = 9,
|
|
76
|
+
/**
|
|
77
|
+
* Профит от рефералов
|
|
78
|
+
*/
|
|
79
|
+
ReferralProfit = 10
|
|
38
80
|
}
|
|
81
|
+
export type WithdrawUserTransaction = {
|
|
82
|
+
type: TransactionType.Withdraw;
|
|
83
|
+
withdrawAddress: string;
|
|
84
|
+
commission: number;
|
|
85
|
+
};
|
|
39
86
|
export type UserTransaction = {
|
|
40
87
|
id: number;
|
|
41
88
|
amount: number;
|
|
42
89
|
createdAt: number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
90
|
+
} & (WithdrawUserTransaction | {
|
|
91
|
+
type: Exclude<TransactionType, TransactionType.Withdraw>;
|
|
92
|
+
});
|
|
46
93
|
export type GetUserTransactionsResponse = UserTransaction[];
|
|
47
94
|
export declare const PROMO_CODE_PATHNAME = "/promo-code";
|
|
48
95
|
export declare const USER_PROMO_CODE_PATHNAME = "/user/promo-code";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionType } from 'api';
|
|
1
2
|
import { Nullable } from '../types';
|
|
2
3
|
export declare const NOTIFICATION_WS_PATHNAME = "/notification";
|
|
3
4
|
/**
|
|
@@ -25,6 +26,8 @@ export type UserDataNotification = {
|
|
|
25
26
|
referralCount: number;
|
|
26
27
|
nickname: string;
|
|
27
28
|
usersOnline: number;
|
|
29
|
+
minWithdrawAmount: number;
|
|
30
|
+
withdrawCommission: number;
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
export type TournamentStartNotification = {
|
|
@@ -33,17 +36,13 @@ export type TournamentStartNotification = {
|
|
|
33
36
|
roomId: number;
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
|
-
export declare enum BalanceUpdateType {
|
|
37
|
-
Deposit = 0,
|
|
38
|
-
PromoCode = 1
|
|
39
|
-
}
|
|
40
39
|
export type BalanceUpdateNotification = {
|
|
41
40
|
type: NotificationType.BalanceUpdate;
|
|
42
41
|
content: {
|
|
43
42
|
updatedBalance: number;
|
|
44
43
|
amount: number;
|
|
45
44
|
isFree: boolean;
|
|
46
|
-
type: Nullable<
|
|
45
|
+
type: Nullable<TransactionType>;
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
export type UsersOnlineNotification = {
|
|
@@ -303,22 +303,18 @@ export declare enum WSMessageTypeToFront {
|
|
|
303
303
|
}
|
|
304
304
|
export type CallWSMessageToFront = {
|
|
305
305
|
type: WSMessageTypeToFront.Call;
|
|
306
|
-
sequence: number;
|
|
307
306
|
content: ActionMessageContentToFront;
|
|
308
307
|
};
|
|
309
308
|
export type RaiseWSMessageToFront = {
|
|
310
309
|
type: WSMessageTypeToFront.Raise;
|
|
311
|
-
sequence: number;
|
|
312
310
|
content: ActionMessageContentToFront;
|
|
313
311
|
};
|
|
314
312
|
export type FoldWSMessageToFront = {
|
|
315
313
|
type: WSMessageTypeToFront.Fold;
|
|
316
|
-
sequence: number;
|
|
317
314
|
content: ActionMessageContentToFront;
|
|
318
315
|
};
|
|
319
316
|
export type NewRoundWSMessageToFront = {
|
|
320
317
|
type: WSMessageTypeToFront.NewRound;
|
|
321
|
-
sequence: number;
|
|
322
318
|
content: {
|
|
323
319
|
pot: number;
|
|
324
320
|
tableCards: Cards;
|
|
@@ -337,7 +333,6 @@ export type GetUpWSMessageToFront = {
|
|
|
337
333
|
};
|
|
338
334
|
export type KickedByTimeWSMessageToFront = {
|
|
339
335
|
type: WSMessageTypeToFront.KickedByTime;
|
|
340
|
-
sequence: number;
|
|
341
336
|
content: {
|
|
342
337
|
userId: UserId;
|
|
343
338
|
};
|
|
@@ -347,7 +342,6 @@ export type SitOutWSMessageToFront = {
|
|
|
347
342
|
};
|
|
348
343
|
export type SitDownWSMessageToFront = {
|
|
349
344
|
type: WSMessageTypeToFront.SitDown;
|
|
350
|
-
sequence: number;
|
|
351
345
|
content: {
|
|
352
346
|
userId: UserId;
|
|
353
347
|
};
|
|
@@ -357,7 +351,6 @@ export type ExtendTimeWSMessageToFront = {
|
|
|
357
351
|
};
|
|
358
352
|
export type StartExtraTimeWSMessageToFront = {
|
|
359
353
|
type: WSMessageTypeToFront.StartExtraTime;
|
|
360
|
-
sequence: number;
|
|
361
354
|
content: {
|
|
362
355
|
userId: UserId;
|
|
363
356
|
/**
|
|
@@ -389,7 +382,6 @@ export type ChatWSMessageToFront = {
|
|
|
389
382
|
};
|
|
390
383
|
export type SitWSMessageToFront = {
|
|
391
384
|
type: WSMessageTypeToFront.Sit;
|
|
392
|
-
sequence: number;
|
|
393
385
|
content: {
|
|
394
386
|
id: number;
|
|
395
387
|
place: number;
|
|
@@ -404,7 +396,6 @@ export type SitWSMessageToFront = {
|
|
|
404
396
|
};
|
|
405
397
|
export type GameStartWSMessageToFront = {
|
|
406
398
|
type: WSMessageTypeToFront.GameStart;
|
|
407
|
-
sequence: number;
|
|
408
399
|
content: {
|
|
409
400
|
smallBlind: {
|
|
410
401
|
userId: UserId;
|
|
@@ -434,7 +425,6 @@ export type GameStartWSMessageToFront = {
|
|
|
434
425
|
};
|
|
435
426
|
export type EndGameWSMessageToFront = {
|
|
436
427
|
type: WSMessageTypeToFront.EndGame;
|
|
437
|
-
sequence: number;
|
|
438
428
|
content: {
|
|
439
429
|
tableCards?: Cards;
|
|
440
430
|
winners: Winners;
|
|
@@ -443,14 +433,12 @@ export type EndGameWSMessageToFront = {
|
|
|
443
433
|
};
|
|
444
434
|
export type GameNotStartWSMessageToFront = {
|
|
445
435
|
type: WSMessageTypeToFront.GameNotStart;
|
|
446
|
-
sequence: number;
|
|
447
436
|
content: {
|
|
448
437
|
users: GameStartUser[];
|
|
449
438
|
};
|
|
450
439
|
};
|
|
451
440
|
export type TableDataWSMessageToFront = {
|
|
452
441
|
type: WSMessageTypeToFront.TableData;
|
|
453
|
-
currentSequence: number;
|
|
454
442
|
content: {
|
|
455
443
|
users: User[];
|
|
456
444
|
buttonPlace?: number;
|
|
@@ -478,7 +466,6 @@ export type ErrorWSMessageToFront = {
|
|
|
478
466
|
};
|
|
479
467
|
export type ShowCardsWSMessageToFront = {
|
|
480
468
|
type: WSMessageTypeToFront.ShowCards;
|
|
481
|
-
sequence: number;
|
|
482
469
|
content: {
|
|
483
470
|
userId: UserId;
|
|
484
471
|
cards: Array<Card | null>;
|
|
@@ -486,21 +473,18 @@ export type ShowCardsWSMessageToFront = {
|
|
|
486
473
|
};
|
|
487
474
|
export type ShowdownCardsWSMessageToFront = {
|
|
488
475
|
type: WSMessageTypeToFront.ShowdownCards;
|
|
489
|
-
sequence: number;
|
|
490
476
|
content: {
|
|
491
477
|
showdown: Showdown;
|
|
492
478
|
};
|
|
493
479
|
};
|
|
494
480
|
export type ChangeRoomWSMessageToFront = {
|
|
495
481
|
type: WSMessageTypeToFront.ChangeRoom;
|
|
496
|
-
sequence: number;
|
|
497
482
|
content: {
|
|
498
483
|
roomId: number;
|
|
499
484
|
};
|
|
500
485
|
};
|
|
501
486
|
export type TournamentResultWSMessageToFront = {
|
|
502
487
|
type: WSMessageTypeToFront.TournamentResult;
|
|
503
|
-
sequence: number;
|
|
504
488
|
content: {
|
|
505
489
|
/**
|
|
506
490
|
* Массив игроков кого выбил
|
|
@@ -542,5 +526,8 @@ export declare enum RoomWSErrorToFront {
|
|
|
542
526
|
TokenNotValid = "TokenNotValid",
|
|
543
527
|
RoomNotFound = "RoomNotFound"
|
|
544
528
|
}
|
|
545
|
-
export type WSMessageToFront = EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront
|
|
529
|
+
export type WSMessageToFront = (EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront) & {
|
|
530
|
+
sequence?: number;
|
|
531
|
+
currentSequence?: number;
|
|
532
|
+
};
|
|
546
533
|
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -7,8 +7,50 @@ var TRANSACTIONS_PATHNAME = '/transactions';
|
|
|
7
7
|
var USER_TRANSACTIONS_PATHNAME = "".concat(USER_PATHNAME).concat(TRANSACTIONS_PATHNAME);
|
|
8
8
|
var TransactionType;
|
|
9
9
|
(function (TransactionType) {
|
|
10
|
+
/**
|
|
11
|
+
* Вывод денег из системы
|
|
12
|
+
*/
|
|
10
13
|
TransactionType[TransactionType["Withdraw"] = 0] = "Withdraw";
|
|
14
|
+
/**
|
|
15
|
+
* Пополнение счета
|
|
16
|
+
*/
|
|
11
17
|
TransactionType[TransactionType["Deposit"] = 1] = "Deposit";
|
|
18
|
+
/**
|
|
19
|
+
* Начисление по промокоду
|
|
20
|
+
*/
|
|
21
|
+
TransactionType[TransactionType["PromoCode"] = 2] = "PromoCode";
|
|
22
|
+
/**
|
|
23
|
+
* Игрок садится за стол (баланс → стол)
|
|
24
|
+
*/
|
|
25
|
+
TransactionType[TransactionType["BuyIn"] = 3] = "BuyIn";
|
|
26
|
+
/**
|
|
27
|
+
* Игрок встает из-за стола (стол → баланс)
|
|
28
|
+
*/
|
|
29
|
+
TransactionType[TransactionType["CashOut"] = 4] = "CashOut";
|
|
30
|
+
/**
|
|
31
|
+
* Перевод другому пользователю
|
|
32
|
+
*/
|
|
33
|
+
TransactionType[TransactionType["Transfer"] = 5] = "Transfer";
|
|
34
|
+
/**
|
|
35
|
+
* Перевод от другого пользователя
|
|
36
|
+
*/
|
|
37
|
+
TransactionType[TransactionType["TransferFrom"] = 6] = "TransferFrom";
|
|
38
|
+
/**
|
|
39
|
+
* Вход в турнир
|
|
40
|
+
*/
|
|
41
|
+
TransactionType[TransactionType["TournamentBuyIn"] = 7] = "TournamentBuyIn";
|
|
42
|
+
/**
|
|
43
|
+
* Выигрыш в турнире
|
|
44
|
+
*/
|
|
45
|
+
TransactionType[TransactionType["TournamentPrize"] = 8] = "TournamentPrize";
|
|
46
|
+
/**
|
|
47
|
+
* Отмена турнира
|
|
48
|
+
*/
|
|
49
|
+
TransactionType[TransactionType["TournamentCancel"] = 9] = "TournamentCancel";
|
|
50
|
+
/**
|
|
51
|
+
* Профит от рефералов
|
|
52
|
+
*/
|
|
53
|
+
TransactionType[TransactionType["ReferralProfit"] = 10] = "ReferralProfit";
|
|
12
54
|
})(TransactionType || (TransactionType = {}));
|
|
13
55
|
var PROMO_CODE_PATHNAME = '/promo-code';
|
|
14
56
|
var USER_PROMO_CODE_PATHNAME = "".concat(USER_PATHNAME).concat(PROMO_CODE_PATHNAME);
|
|
@@ -438,11 +480,6 @@ var NotificationType;
|
|
|
438
480
|
NotificationType["BalanceUpdate"] = "BalanceUpdate";
|
|
439
481
|
NotificationType["UsersOnline"] = "UsersOnline";
|
|
440
482
|
})(NotificationType || (NotificationType = {}));
|
|
441
|
-
var BalanceUpdateType;
|
|
442
|
-
(function (BalanceUpdateType) {
|
|
443
|
-
BalanceUpdateType[BalanceUpdateType["Deposit"] = 0] = "Deposit";
|
|
444
|
-
BalanceUpdateType[BalanceUpdateType["PromoCode"] = 1] = "PromoCode";
|
|
445
|
-
})(BalanceUpdateType || (BalanceUpdateType = {}));
|
|
446
483
|
|
|
447
484
|
var RoomType;
|
|
448
485
|
(function (RoomType) {
|
|
@@ -485,7 +522,6 @@ var StartAppParamKey = {
|
|
|
485
522
|
ReferralProgram: 'referral-program',
|
|
486
523
|
};
|
|
487
524
|
|
|
488
|
-
var WITHDRAW_COMMISSION_USDT_CENTS = 10;
|
|
489
525
|
// tg bot
|
|
490
526
|
var DEVELOPMENT_USERNAME_TG_BOT = 'nah_bot';
|
|
491
527
|
var DEVELOPMENT_SHORT_NAME_TG_BOT = 'nah';
|
|
@@ -520,4 +556,4 @@ function decodeBase64(base64) {
|
|
|
520
556
|
// need timestamp from server
|
|
521
557
|
// (0-6 0-60 seconds)(timestamp / 10000)BufferedBySecret
|
|
522
558
|
|
|
523
|
-
export { AUTH_PATHNAME, ActionType, ApiErrorCode,
|
|
559
|
+
export { AUTH_PATHNAME, ActionType, ApiErrorCode, CONTACT_US_URL, CardRank, CardSuit, CardView, DEVELOPMENT_SHORT_NAME_TG_BOT, DEVELOPMENT_USERNAME_TG_BOT, FREE_CHIPS_AMOUNT, FREE_CHIPS_COOLDOWN_SECONDS, FREE_CHIPS_PATHNAME, NOTIFICATION_WS_PATHNAME, NotificationType, PROD_SHORT_NAME_TG_BOT, PROD_USERNAME_TG_BOT, PROMO_CODE_PATHNAME, REFERRALS_PATHNAME, REFERRAL_COMMISSION_PERCENT, REGISTRATION_PATHNAME, ROOMS_LOGS_PATHNAME, ROOMS_PATHNAME, ROOM_COMMISSION_PERCENT, ROOM_PATHNAME, ROOM_WS_PATHNAME, RoomType, RoomWSErrorToFront, SETTINGS_PATHNAME, ShowCardsType, StartAppParamKey, TEST_SHORT_NAME_TG_BOT, TEST_USERNAME_TG_BOT, TOURNAMENT_PATHNAME, TOURNAMENT_REGISTRATION_PATHNAME, TRANSACTIONS_PATHNAME, TournamentInfoType, TournamentPrizeType, TournamentStatus, TournamentType, TransactionType, USER_AUTH_PATHNAME, USER_FREE_CHIPS_PATHNAME, USER_PATHNAME, USER_PROMO_CODE_PATHNAME, USER_REFERRALS_PATHNAME, USER_ROOMS_PATHNAME, USER_SETTINGS_PATHNAME, USER_TRANSACTIONS_PATHNAME, USER_WITHDRAW_PATHNAME, WITHDRAW_PATHNAME, WSMessageTypeToBack, WSMessageTypeToFront, WSNotificationSearchParams, WSRoomSearchParams, WsCloseCode, WsErrorCode, decodeBase64, encodeBase64 };
|
|
@@ -33,16 +33,63 @@ export type PostUserWithdrawRequest = {
|
|
|
33
33
|
export declare const TRANSACTIONS_PATHNAME = "/transactions";
|
|
34
34
|
export declare const USER_TRANSACTIONS_PATHNAME = "/user/transactions";
|
|
35
35
|
export declare enum TransactionType {
|
|
36
|
+
/**
|
|
37
|
+
* Вывод денег из системы
|
|
38
|
+
*/
|
|
36
39
|
Withdraw = 0,
|
|
37
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Пополнение счета
|
|
42
|
+
*/
|
|
43
|
+
Deposit = 1,
|
|
44
|
+
/**
|
|
45
|
+
* Начисление по промокоду
|
|
46
|
+
*/
|
|
47
|
+
PromoCode = 2,
|
|
48
|
+
/**
|
|
49
|
+
* Игрок садится за стол (баланс → стол)
|
|
50
|
+
*/
|
|
51
|
+
BuyIn = 3,
|
|
52
|
+
/**
|
|
53
|
+
* Игрок встает из-за стола (стол → баланс)
|
|
54
|
+
*/
|
|
55
|
+
CashOut = 4,
|
|
56
|
+
/**
|
|
57
|
+
* Перевод другому пользователю
|
|
58
|
+
*/
|
|
59
|
+
Transfer = 5,
|
|
60
|
+
/**
|
|
61
|
+
* Перевод от другого пользователя
|
|
62
|
+
*/
|
|
63
|
+
TransferFrom = 6,
|
|
64
|
+
/**
|
|
65
|
+
* Вход в турнир
|
|
66
|
+
*/
|
|
67
|
+
TournamentBuyIn = 7,
|
|
68
|
+
/**
|
|
69
|
+
* Выигрыш в турнире
|
|
70
|
+
*/
|
|
71
|
+
TournamentPrize = 8,
|
|
72
|
+
/**
|
|
73
|
+
* Отмена турнира
|
|
74
|
+
*/
|
|
75
|
+
TournamentCancel = 9,
|
|
76
|
+
/**
|
|
77
|
+
* Профит от рефералов
|
|
78
|
+
*/
|
|
79
|
+
ReferralProfit = 10
|
|
38
80
|
}
|
|
81
|
+
export type WithdrawUserTransaction = {
|
|
82
|
+
type: TransactionType.Withdraw;
|
|
83
|
+
withdrawAddress: string;
|
|
84
|
+
commission: number;
|
|
85
|
+
};
|
|
39
86
|
export type UserTransaction = {
|
|
40
87
|
id: number;
|
|
41
88
|
amount: number;
|
|
42
89
|
createdAt: number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
90
|
+
} & (WithdrawUserTransaction | {
|
|
91
|
+
type: Exclude<TransactionType, TransactionType.Withdraw>;
|
|
92
|
+
});
|
|
46
93
|
export type GetUserTransactionsResponse = UserTransaction[];
|
|
47
94
|
export declare const PROMO_CODE_PATHNAME = "/promo-code";
|
|
48
95
|
export declare const USER_PROMO_CODE_PATHNAME = "/user/promo-code";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionType } from 'api';
|
|
1
2
|
import { Nullable } from '../types';
|
|
2
3
|
export declare const NOTIFICATION_WS_PATHNAME = "/notification";
|
|
3
4
|
/**
|
|
@@ -25,6 +26,8 @@ export type UserDataNotification = {
|
|
|
25
26
|
referralCount: number;
|
|
26
27
|
nickname: string;
|
|
27
28
|
usersOnline: number;
|
|
29
|
+
minWithdrawAmount: number;
|
|
30
|
+
withdrawCommission: number;
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
export type TournamentStartNotification = {
|
|
@@ -33,17 +36,13 @@ export type TournamentStartNotification = {
|
|
|
33
36
|
roomId: number;
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
|
-
export declare enum BalanceUpdateType {
|
|
37
|
-
Deposit = 0,
|
|
38
|
-
PromoCode = 1
|
|
39
|
-
}
|
|
40
39
|
export type BalanceUpdateNotification = {
|
|
41
40
|
type: NotificationType.BalanceUpdate;
|
|
42
41
|
content: {
|
|
43
42
|
updatedBalance: number;
|
|
44
43
|
amount: number;
|
|
45
44
|
isFree: boolean;
|
|
46
|
-
type: Nullable<
|
|
45
|
+
type: Nullable<TransactionType>;
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
export type UsersOnlineNotification = {
|
|
@@ -303,22 +303,18 @@ export declare enum WSMessageTypeToFront {
|
|
|
303
303
|
}
|
|
304
304
|
export type CallWSMessageToFront = {
|
|
305
305
|
type: WSMessageTypeToFront.Call;
|
|
306
|
-
sequence: number;
|
|
307
306
|
content: ActionMessageContentToFront;
|
|
308
307
|
};
|
|
309
308
|
export type RaiseWSMessageToFront = {
|
|
310
309
|
type: WSMessageTypeToFront.Raise;
|
|
311
|
-
sequence: number;
|
|
312
310
|
content: ActionMessageContentToFront;
|
|
313
311
|
};
|
|
314
312
|
export type FoldWSMessageToFront = {
|
|
315
313
|
type: WSMessageTypeToFront.Fold;
|
|
316
|
-
sequence: number;
|
|
317
314
|
content: ActionMessageContentToFront;
|
|
318
315
|
};
|
|
319
316
|
export type NewRoundWSMessageToFront = {
|
|
320
317
|
type: WSMessageTypeToFront.NewRound;
|
|
321
|
-
sequence: number;
|
|
322
318
|
content: {
|
|
323
319
|
pot: number;
|
|
324
320
|
tableCards: Cards;
|
|
@@ -337,7 +333,6 @@ export type GetUpWSMessageToFront = {
|
|
|
337
333
|
};
|
|
338
334
|
export type KickedByTimeWSMessageToFront = {
|
|
339
335
|
type: WSMessageTypeToFront.KickedByTime;
|
|
340
|
-
sequence: number;
|
|
341
336
|
content: {
|
|
342
337
|
userId: UserId;
|
|
343
338
|
};
|
|
@@ -347,7 +342,6 @@ export type SitOutWSMessageToFront = {
|
|
|
347
342
|
};
|
|
348
343
|
export type SitDownWSMessageToFront = {
|
|
349
344
|
type: WSMessageTypeToFront.SitDown;
|
|
350
|
-
sequence: number;
|
|
351
345
|
content: {
|
|
352
346
|
userId: UserId;
|
|
353
347
|
};
|
|
@@ -357,7 +351,6 @@ export type ExtendTimeWSMessageToFront = {
|
|
|
357
351
|
};
|
|
358
352
|
export type StartExtraTimeWSMessageToFront = {
|
|
359
353
|
type: WSMessageTypeToFront.StartExtraTime;
|
|
360
|
-
sequence: number;
|
|
361
354
|
content: {
|
|
362
355
|
userId: UserId;
|
|
363
356
|
/**
|
|
@@ -389,7 +382,6 @@ export type ChatWSMessageToFront = {
|
|
|
389
382
|
};
|
|
390
383
|
export type SitWSMessageToFront = {
|
|
391
384
|
type: WSMessageTypeToFront.Sit;
|
|
392
|
-
sequence: number;
|
|
393
385
|
content: {
|
|
394
386
|
id: number;
|
|
395
387
|
place: number;
|
|
@@ -404,7 +396,6 @@ export type SitWSMessageToFront = {
|
|
|
404
396
|
};
|
|
405
397
|
export type GameStartWSMessageToFront = {
|
|
406
398
|
type: WSMessageTypeToFront.GameStart;
|
|
407
|
-
sequence: number;
|
|
408
399
|
content: {
|
|
409
400
|
smallBlind: {
|
|
410
401
|
userId: UserId;
|
|
@@ -434,7 +425,6 @@ export type GameStartWSMessageToFront = {
|
|
|
434
425
|
};
|
|
435
426
|
export type EndGameWSMessageToFront = {
|
|
436
427
|
type: WSMessageTypeToFront.EndGame;
|
|
437
|
-
sequence: number;
|
|
438
428
|
content: {
|
|
439
429
|
tableCards?: Cards;
|
|
440
430
|
winners: Winners;
|
|
@@ -443,14 +433,12 @@ export type EndGameWSMessageToFront = {
|
|
|
443
433
|
};
|
|
444
434
|
export type GameNotStartWSMessageToFront = {
|
|
445
435
|
type: WSMessageTypeToFront.GameNotStart;
|
|
446
|
-
sequence: number;
|
|
447
436
|
content: {
|
|
448
437
|
users: GameStartUser[];
|
|
449
438
|
};
|
|
450
439
|
};
|
|
451
440
|
export type TableDataWSMessageToFront = {
|
|
452
441
|
type: WSMessageTypeToFront.TableData;
|
|
453
|
-
currentSequence: number;
|
|
454
442
|
content: {
|
|
455
443
|
users: User[];
|
|
456
444
|
buttonPlace?: number;
|
|
@@ -478,7 +466,6 @@ export type ErrorWSMessageToFront = {
|
|
|
478
466
|
};
|
|
479
467
|
export type ShowCardsWSMessageToFront = {
|
|
480
468
|
type: WSMessageTypeToFront.ShowCards;
|
|
481
|
-
sequence: number;
|
|
482
469
|
content: {
|
|
483
470
|
userId: UserId;
|
|
484
471
|
cards: Array<Card | null>;
|
|
@@ -486,21 +473,18 @@ export type ShowCardsWSMessageToFront = {
|
|
|
486
473
|
};
|
|
487
474
|
export type ShowdownCardsWSMessageToFront = {
|
|
488
475
|
type: WSMessageTypeToFront.ShowdownCards;
|
|
489
|
-
sequence: number;
|
|
490
476
|
content: {
|
|
491
477
|
showdown: Showdown;
|
|
492
478
|
};
|
|
493
479
|
};
|
|
494
480
|
export type ChangeRoomWSMessageToFront = {
|
|
495
481
|
type: WSMessageTypeToFront.ChangeRoom;
|
|
496
|
-
sequence: number;
|
|
497
482
|
content: {
|
|
498
483
|
roomId: number;
|
|
499
484
|
};
|
|
500
485
|
};
|
|
501
486
|
export type TournamentResultWSMessageToFront = {
|
|
502
487
|
type: WSMessageTypeToFront.TournamentResult;
|
|
503
|
-
sequence: number;
|
|
504
488
|
content: {
|
|
505
489
|
/**
|
|
506
490
|
* Массив игроков кого выбил
|
|
@@ -542,5 +526,8 @@ export declare enum RoomWSErrorToFront {
|
|
|
542
526
|
TokenNotValid = "TokenNotValid",
|
|
543
527
|
RoomNotFound = "RoomNotFound"
|
|
544
528
|
}
|
|
545
|
-
export type WSMessageToFront = EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront
|
|
529
|
+
export type WSMessageToFront = (EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront) & {
|
|
530
|
+
sequence?: number;
|
|
531
|
+
currentSequence?: number;
|
|
532
|
+
};
|
|
546
533
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TransactionType as TransactionType$1 } from 'api';
|
|
2
|
+
|
|
1
3
|
type Nullable<T> = T | null | undefined;
|
|
2
4
|
type PlainObject<K extends string = string, T = unknown> = Record<K, T>;
|
|
3
5
|
type Keys<T extends PlainObject> = keyof T;
|
|
@@ -74,16 +76,63 @@ type PostUserWithdrawRequest = {
|
|
|
74
76
|
declare const TRANSACTIONS_PATHNAME = "/transactions";
|
|
75
77
|
declare const USER_TRANSACTIONS_PATHNAME = "/user/transactions";
|
|
76
78
|
declare enum TransactionType {
|
|
79
|
+
/**
|
|
80
|
+
* Вывод денег из системы
|
|
81
|
+
*/
|
|
77
82
|
Withdraw = 0,
|
|
78
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Пополнение счета
|
|
85
|
+
*/
|
|
86
|
+
Deposit = 1,
|
|
87
|
+
/**
|
|
88
|
+
* Начисление по промокоду
|
|
89
|
+
*/
|
|
90
|
+
PromoCode = 2,
|
|
91
|
+
/**
|
|
92
|
+
* Игрок садится за стол (баланс → стол)
|
|
93
|
+
*/
|
|
94
|
+
BuyIn = 3,
|
|
95
|
+
/**
|
|
96
|
+
* Игрок встает из-за стола (стол → баланс)
|
|
97
|
+
*/
|
|
98
|
+
CashOut = 4,
|
|
99
|
+
/**
|
|
100
|
+
* Перевод другому пользователю
|
|
101
|
+
*/
|
|
102
|
+
Transfer = 5,
|
|
103
|
+
/**
|
|
104
|
+
* Перевод от другого пользователя
|
|
105
|
+
*/
|
|
106
|
+
TransferFrom = 6,
|
|
107
|
+
/**
|
|
108
|
+
* Вход в турнир
|
|
109
|
+
*/
|
|
110
|
+
TournamentBuyIn = 7,
|
|
111
|
+
/**
|
|
112
|
+
* Выигрыш в турнире
|
|
113
|
+
*/
|
|
114
|
+
TournamentPrize = 8,
|
|
115
|
+
/**
|
|
116
|
+
* Отмена турнира
|
|
117
|
+
*/
|
|
118
|
+
TournamentCancel = 9,
|
|
119
|
+
/**
|
|
120
|
+
* Профит от рефералов
|
|
121
|
+
*/
|
|
122
|
+
ReferralProfit = 10
|
|
79
123
|
}
|
|
124
|
+
type WithdrawUserTransaction = {
|
|
125
|
+
type: TransactionType.Withdraw;
|
|
126
|
+
withdrawAddress: string;
|
|
127
|
+
commission: number;
|
|
128
|
+
};
|
|
80
129
|
type UserTransaction = {
|
|
81
130
|
id: number;
|
|
82
131
|
amount: number;
|
|
83
132
|
createdAt: number;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
133
|
+
} & (WithdrawUserTransaction | {
|
|
134
|
+
type: Exclude<TransactionType, TransactionType.Withdraw>;
|
|
135
|
+
});
|
|
87
136
|
type GetUserTransactionsResponse = UserTransaction[];
|
|
88
137
|
declare const PROMO_CODE_PATHNAME = "/promo-code";
|
|
89
138
|
declare const USER_PROMO_CODE_PATHNAME = "/user/promo-code";
|
|
@@ -814,22 +863,18 @@ declare enum WSMessageTypeToFront {
|
|
|
814
863
|
}
|
|
815
864
|
type CallWSMessageToFront = {
|
|
816
865
|
type: WSMessageTypeToFront.Call;
|
|
817
|
-
sequence: number;
|
|
818
866
|
content: ActionMessageContentToFront;
|
|
819
867
|
};
|
|
820
868
|
type RaiseWSMessageToFront = {
|
|
821
869
|
type: WSMessageTypeToFront.Raise;
|
|
822
|
-
sequence: number;
|
|
823
870
|
content: ActionMessageContentToFront;
|
|
824
871
|
};
|
|
825
872
|
type FoldWSMessageToFront = {
|
|
826
873
|
type: WSMessageTypeToFront.Fold;
|
|
827
|
-
sequence: number;
|
|
828
874
|
content: ActionMessageContentToFront;
|
|
829
875
|
};
|
|
830
876
|
type NewRoundWSMessageToFront = {
|
|
831
877
|
type: WSMessageTypeToFront.NewRound;
|
|
832
|
-
sequence: number;
|
|
833
878
|
content: {
|
|
834
879
|
pot: number;
|
|
835
880
|
tableCards: Cards;
|
|
@@ -848,7 +893,6 @@ type GetUpWSMessageToFront = {
|
|
|
848
893
|
};
|
|
849
894
|
type KickedByTimeWSMessageToFront = {
|
|
850
895
|
type: WSMessageTypeToFront.KickedByTime;
|
|
851
|
-
sequence: number;
|
|
852
896
|
content: {
|
|
853
897
|
userId: UserId;
|
|
854
898
|
};
|
|
@@ -858,7 +902,6 @@ type SitOutWSMessageToFront = {
|
|
|
858
902
|
};
|
|
859
903
|
type SitDownWSMessageToFront = {
|
|
860
904
|
type: WSMessageTypeToFront.SitDown;
|
|
861
|
-
sequence: number;
|
|
862
905
|
content: {
|
|
863
906
|
userId: UserId;
|
|
864
907
|
};
|
|
@@ -868,7 +911,6 @@ type ExtendTimeWSMessageToFront = {
|
|
|
868
911
|
};
|
|
869
912
|
type StartExtraTimeWSMessageToFront = {
|
|
870
913
|
type: WSMessageTypeToFront.StartExtraTime;
|
|
871
|
-
sequence: number;
|
|
872
914
|
content: {
|
|
873
915
|
userId: UserId;
|
|
874
916
|
/**
|
|
@@ -900,7 +942,6 @@ type ChatWSMessageToFront = {
|
|
|
900
942
|
};
|
|
901
943
|
type SitWSMessageToFront = {
|
|
902
944
|
type: WSMessageTypeToFront.Sit;
|
|
903
|
-
sequence: number;
|
|
904
945
|
content: {
|
|
905
946
|
id: number;
|
|
906
947
|
place: number;
|
|
@@ -915,7 +956,6 @@ type SitWSMessageToFront = {
|
|
|
915
956
|
};
|
|
916
957
|
type GameStartWSMessageToFront = {
|
|
917
958
|
type: WSMessageTypeToFront.GameStart;
|
|
918
|
-
sequence: number;
|
|
919
959
|
content: {
|
|
920
960
|
smallBlind: {
|
|
921
961
|
userId: UserId;
|
|
@@ -945,7 +985,6 @@ type GameStartWSMessageToFront = {
|
|
|
945
985
|
};
|
|
946
986
|
type EndGameWSMessageToFront = {
|
|
947
987
|
type: WSMessageTypeToFront.EndGame;
|
|
948
|
-
sequence: number;
|
|
949
988
|
content: {
|
|
950
989
|
tableCards?: Cards;
|
|
951
990
|
winners: Winners;
|
|
@@ -954,14 +993,12 @@ type EndGameWSMessageToFront = {
|
|
|
954
993
|
};
|
|
955
994
|
type GameNotStartWSMessageToFront = {
|
|
956
995
|
type: WSMessageTypeToFront.GameNotStart;
|
|
957
|
-
sequence: number;
|
|
958
996
|
content: {
|
|
959
997
|
users: GameStartUser[];
|
|
960
998
|
};
|
|
961
999
|
};
|
|
962
1000
|
type TableDataWSMessageToFront = {
|
|
963
1001
|
type: WSMessageTypeToFront.TableData;
|
|
964
|
-
currentSequence: number;
|
|
965
1002
|
content: {
|
|
966
1003
|
users: User[];
|
|
967
1004
|
buttonPlace?: number;
|
|
@@ -989,7 +1026,6 @@ type ErrorWSMessageToFront = {
|
|
|
989
1026
|
};
|
|
990
1027
|
type ShowCardsWSMessageToFront = {
|
|
991
1028
|
type: WSMessageTypeToFront.ShowCards;
|
|
992
|
-
sequence: number;
|
|
993
1029
|
content: {
|
|
994
1030
|
userId: UserId;
|
|
995
1031
|
cards: Array<Card | null>;
|
|
@@ -997,21 +1033,18 @@ type ShowCardsWSMessageToFront = {
|
|
|
997
1033
|
};
|
|
998
1034
|
type ShowdownCardsWSMessageToFront = {
|
|
999
1035
|
type: WSMessageTypeToFront.ShowdownCards;
|
|
1000
|
-
sequence: number;
|
|
1001
1036
|
content: {
|
|
1002
1037
|
showdown: Showdown;
|
|
1003
1038
|
};
|
|
1004
1039
|
};
|
|
1005
1040
|
type ChangeRoomWSMessageToFront = {
|
|
1006
1041
|
type: WSMessageTypeToFront.ChangeRoom;
|
|
1007
|
-
sequence: number;
|
|
1008
1042
|
content: {
|
|
1009
1043
|
roomId: number;
|
|
1010
1044
|
};
|
|
1011
1045
|
};
|
|
1012
1046
|
type TournamentResultWSMessageToFront = {
|
|
1013
1047
|
type: WSMessageTypeToFront.TournamentResult;
|
|
1014
|
-
sequence: number;
|
|
1015
1048
|
content: {
|
|
1016
1049
|
/**
|
|
1017
1050
|
* Массив игроков кого выбил
|
|
@@ -1053,7 +1086,10 @@ declare enum RoomWSErrorToFront {
|
|
|
1053
1086
|
TokenNotValid = "TokenNotValid",
|
|
1054
1087
|
RoomNotFound = "RoomNotFound"
|
|
1055
1088
|
}
|
|
1056
|
-
type WSMessageToFront = EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront
|
|
1089
|
+
type WSMessageToFront = (EndGameWSMessageToFront | TableDataWSMessageToFront | SitWSMessageToFront | CallWSMessageToFront | RaiseWSMessageToFront | FoldWSMessageToFront | NewRoundWSMessageToFront | GetUpWSMessageToFront | ChipsUpdateWSMessageToFront | GameStartWSMessageToFront | GameNotStartWSMessageToFront | SitDownWSMessageToFront | ExtendTimeWSMessageToFront | StartExtraTimeWSMessageToFront | SitOutWSMessageToFront | EmojiWSMessageToFront | ChatWSMessageToFront | ErrorWSMessageToFront | KickedByTimeWSMessageToFront | ShowCardsWSMessageToFront | ShowdownCardsWSMessageToFront | ChangeRoomWSMessageToFront | TournamentResultWSMessageToFront) & {
|
|
1090
|
+
sequence?: number;
|
|
1091
|
+
currentSequence?: number;
|
|
1092
|
+
};
|
|
1057
1093
|
|
|
1058
1094
|
declare const ROOM_WS_PATHNAME = "/room";
|
|
1059
1095
|
/**
|
|
@@ -1173,6 +1209,8 @@ type UserDataNotification = {
|
|
|
1173
1209
|
referralCount: number;
|
|
1174
1210
|
nickname: string;
|
|
1175
1211
|
usersOnline: number;
|
|
1212
|
+
minWithdrawAmount: number;
|
|
1213
|
+
withdrawCommission: number;
|
|
1176
1214
|
};
|
|
1177
1215
|
};
|
|
1178
1216
|
type TournamentStartNotification = {
|
|
@@ -1181,17 +1219,13 @@ type TournamentStartNotification = {
|
|
|
1181
1219
|
roomId: number;
|
|
1182
1220
|
};
|
|
1183
1221
|
};
|
|
1184
|
-
declare enum BalanceUpdateType {
|
|
1185
|
-
Deposit = 0,
|
|
1186
|
-
PromoCode = 1
|
|
1187
|
-
}
|
|
1188
1222
|
type BalanceUpdateNotification = {
|
|
1189
1223
|
type: NotificationType.BalanceUpdate;
|
|
1190
1224
|
content: {
|
|
1191
1225
|
updatedBalance: number;
|
|
1192
1226
|
amount: number;
|
|
1193
1227
|
isFree: boolean;
|
|
1194
|
-
type: Nullable<
|
|
1228
|
+
type: Nullable<TransactionType$1>;
|
|
1195
1229
|
};
|
|
1196
1230
|
};
|
|
1197
1231
|
type UsersOnlineNotification = {
|
|
@@ -1202,7 +1236,6 @@ type UsersOnlineNotification = {
|
|
|
1202
1236
|
};
|
|
1203
1237
|
type Notification = UserDataNotification | TournamentStartNotification | BalanceUpdateNotification | UsersOnlineNotification;
|
|
1204
1238
|
|
|
1205
|
-
declare const WITHDRAW_COMMISSION_USDT_CENTS = 10;
|
|
1206
1239
|
declare const DEVELOPMENT_USERNAME_TG_BOT = "nah_bot";
|
|
1207
1240
|
declare const DEVELOPMENT_SHORT_NAME_TG_BOT = "nah";
|
|
1208
1241
|
declare const TEST_USERNAME_TG_BOT = "huh_bot";
|
|
@@ -1224,4 +1257,4 @@ declare function encodeBase64(str: string): string;
|
|
|
1224
1257
|
*/
|
|
1225
1258
|
declare function decodeBase64(base64: string): string;
|
|
1226
1259
|
|
|
1227
|
-
export { AUTH_PATHNAME, ActionMessageContentToFront, ActionType, AmountWSMessageContent, ApiErrorCode, BalanceUpdateNotification,
|
|
1260
|
+
export { AUTH_PATHNAME, ActionMessageContentToFront, ActionType, AmountWSMessageContent, ApiErrorCode, BalanceUpdateNotification, CONTACT_US_URL, CallWSMessageToBack, CallWSMessageToFront, Card, CardRank, CardSuit, CardView, Cards, ChangeRoomWSMessageToFront, ChatWSMessageToBack, ChatWSMessageToFront, ChipsUpdateWSMessageToBack, ChipsUpdateWSMessageToFront, DEVELOPMENT_SHORT_NAME_TG_BOT, DEVELOPMENT_USERNAME_TG_BOT, EmojiWSMessageToBack, EmojiWSMessageToFront, EndGameWSMessageToFront, ErrorWSMessageToFront, ExtendTimeWSMessageToBack, ExtendTimeWSMessageToFront, FREE_CHIPS_AMOUNT, FREE_CHIPS_COOLDOWN_SECONDS, FREE_CHIPS_PATHNAME, FoldWSMessageToBack, FoldWSMessageToFront, GameNotStartWSMessageToFront, GameStartUser, GameStartWSMessageToFront, GetFreeChipsDataResponse, GetReferralsResponse, GetRoomsLogsQuery, GetRoomsLogsResponse, GetRoomsQuery, GetRoomsResponse, GetSettingsResponse, GetTournamentBlindsInfoResponse, GetTournamentGeneralInfoResponse, GetTournamentInfoQuery, GetTournamentInfoResponse, GetTournamentMainInfoResponse, GetTournamentPlayersInfoResponse, GetTournamentPrizePoolInfoResponse, GetTournamentTablesInfoResponse, GetTournamentsResponse, GetUpWSMessageToBack, GetUpWSMessageToFront, GetUserRoomIdsResponse, GetUserTransactionsResponse, Keys, KickedByTimeWSMessageToFront, NOTIFICATION_WS_PATHNAME, NewRoundWSMessageToFront, Notification, NotificationType, Nullable, PROD_SHORT_NAME_TG_BOT, PROD_USERNAME_TG_BOT, PROMO_CODE_PATHNAME, PlainObject, PostActivePromoCodeRequest, PostActivePromoCodeResponse, PostFreeChipsResponse, PostRoomLogRequest, PostSettingsRequest, PostTournamentRegistrationRequest, PostTournamentRegistrationResponse, PostUserWithdrawRequest, REFERRALS_PATHNAME, REFERRAL_COMMISSION_PERCENT, REGISTRATION_PATHNAME, ROOMS_LOGS_PATHNAME, ROOMS_PATHNAME, ROOM_COMMISSION_PERCENT, ROOM_PATHNAME, ROOM_WS_PATHNAME, RaiseWSMessageToBack, RaiseWSMessageToFront, RoomLog, RoomLogSource, RoomType, RoomWSErrorToFront, SETTINGS_PATHNAME, ShowCardsType, ShowCardsWSMessageToBack, ShowCardsWSMessageToFront, ShowdownCardsWSMessageToFront, SitDownWSMessageToBack, SitDownWSMessageToFront, SitOutWSMessageToBack, SitOutWSMessageToFront, SitWSMessageToBack, SitWSMessageToFront, StartAppParamKey, StartExtraTimeWSMessageToFront, TEST_SHORT_NAME_TG_BOT, TEST_USERNAME_TG_BOT, TOURNAMENT_PATHNAME, TOURNAMENT_REGISTRATION_PATHNAME, TRANSACTIONS_PATHNAME, TableDataWSMessageToBack, TableDataWSMessageToFront, TournamentData, TournamentInfoType, TournamentPrizeType, TournamentResultWSMessageToFront, TournamentStartNotification, TournamentStatus, TournamentType, TransactionType, USER_AUTH_PATHNAME, USER_FREE_CHIPS_PATHNAME, USER_PATHNAME, USER_PROMO_CODE_PATHNAME, USER_REFERRALS_PATHNAME, USER_ROOMS_PATHNAME, USER_SETTINGS_PATHNAME, USER_TRANSACTIONS_PATHNAME, USER_WITHDRAW_PATHNAME, User, UserAuthRequest, UserAuthResponse, UserAuthType, UserDataNotification, UserId, UserTransaction, UsersOnlineNotification, Values, WITHDRAW_PATHNAME, WSMessageToBack, WSMessageToFront, WSMessageTypeToBack, WSMessageTypeToFront, WSNotificationSearchParams, WSRoomSearchParams, Winners, WithdrawUserTransaction, WsCloseCode, WsErrorCode, decodeBase64, encodeBase64 };
|