front-back-poker-types 5.0.224 → 5.0.226

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.
@@ -44,7 +44,10 @@ export type GetTournamentGeneralInfoResponse = {
44
44
  * Сумма которую игрок заплатил за вход в турнир, обновленная в из-за тикета
45
45
  */
46
46
  playerBuyIn: Nullable<number>;
47
- playersCount: number;
47
+ /**
48
+ * Всего игроков в турнире включая ребай
49
+ */
50
+ totalPlayersCount: number;
48
51
  totalPrize: number;
49
52
  maxTablePlaces: number;
50
53
  startingChips: number;
@@ -42,16 +42,16 @@ export type GameStartUser = {
42
42
  /**
43
43
  * Оставшееся время резерва места
44
44
  */
45
- reserveRemainingTime: number | undefined;
45
+ reserveRemainingTime: Nullable<number>;
46
46
  /**
47
47
  * Обновленный баланс юзера, если происходит автобайин
48
48
  * Или же в турнирах, если списывается анте
49
49
  */
50
- updatedChipCount: number | undefined;
50
+ updatedChipCount: Nullable<number>;
51
51
  /**
52
52
  * в игре ли юзер
53
53
  */
54
- withoutCards: true | undefined;
54
+ withoutCards: Nullable<true>;
55
55
  };
56
56
  export type User = {
57
57
  avatarId: number;
@@ -60,7 +60,7 @@ export type User = {
60
60
  cards?: Cards;
61
61
  chipsCount: number;
62
62
  place: number;
63
- actionType?: ActionType | null;
63
+ actionType?: Nullable<ActionType>;
64
64
  /**
65
65
  * Сколько поставил юзер
66
66
  */
@@ -73,7 +73,7 @@ export type User = {
73
73
  /**
74
74
  * Сколько добавили к стеку юзера
75
75
  */
76
- plusChipsCount?: number | null;
76
+ plusChipsCount?: Nullable<number>;
77
77
  withCards?: boolean;
78
78
  extraTimeActive?: boolean;
79
79
  /**
@@ -115,7 +115,7 @@ export type TournamentData = {
115
115
  /**
116
116
  * Место игрока в турнире
117
117
  */
118
- currentUserPlace: number | undefined;
118
+ currentUserPlace: Nullable<number>;
119
119
  /**
120
120
  * Средний стек, должен писаться в блайндах
121
121
  */
@@ -135,7 +135,7 @@ export type TournamentData = {
135
135
  /**
136
136
  * Уровень в турнире
137
137
  */
138
- level: number | undefined;
138
+ level: Nullable<number>;
139
139
  /**
140
140
  * Длительность уровня, в мс
141
141
  */
@@ -143,7 +143,7 @@ export type TournamentData = {
143
143
  /**
144
144
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
145
145
  */
146
- topUsers: Record<UserId, number> | undefined;
146
+ topUsers: Nullable<Record<UserId, number>>;
147
147
  };
148
148
  type Showdown = Record<UserId, Cards>;
149
149
  export type ActionMessageContentToFront = {
@@ -153,7 +153,7 @@ export type ActionMessageContentToFront = {
153
153
  * Следующий юзер, который будет нажать кнопку
154
154
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
155
155
  */
156
- nextUserId?: UserId | null;
156
+ nextUserId: Nullable<UserId>;
157
157
  minRaiseAmount: number;
158
158
  };
159
159
  export declare const WsErrorCode: {
@@ -279,12 +279,12 @@ type TournamentGameStart = {
279
279
  /**
280
280
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
281
281
  */
282
- pot: number | undefined;
282
+ pot: Nullable<number>;
283
283
  /**
284
284
  * Приходит только в турнире, когда обновились сб и бб
285
285
  */
286
- newSmallBlind: number | undefined;
287
- newBigBlind: number | undefined;
286
+ newSmallBlind: Nullable<number>;
287
+ newBigBlind: Nullable<number>;
288
288
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
289
289
  export declare enum WSMessageTypeToFront {
290
290
  TableData = "TableData",
@@ -328,11 +328,12 @@ export type NewRoundWSMessageToFront = {
328
328
  content: {
329
329
  pot: number;
330
330
  tableCards: Cards;
331
+ minRaiseAmount: number;
331
332
  /**
332
- * Следующий юзер, который будет нажать кнопку
333
+ * Следующий юзер, который будет ходить
333
334
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
334
335
  */
335
- nextUserId?: UserId | null;
336
+ nextUserId: Nullable<UserId>;
336
337
  };
337
338
  };
338
339
  export type GetUpWSMessageToFront = {
@@ -349,6 +350,12 @@ export type KickedByTimeWSMessageToFront = {
349
350
  };
350
351
  export type SitOutWSMessageToFront = {
351
352
  type: WSMessageTypeToFront.SitOut;
353
+ content: {
354
+ /**
355
+ * Максимальное время ситаут во время турнира, в мс
356
+ */
357
+ maxSitOutDuration: number;
358
+ };
352
359
  };
353
360
  export type SitDownWSMessageToFront = {
354
361
  type: WSMessageTypeToFront.SitDown;
@@ -419,7 +426,7 @@ export type GameStartWSMessageToFront = {
419
426
  /**
420
427
  * Следующий юзер, не приходит если блайнд = олл ин
421
428
  */
422
- nextUserId: UserId | undefined;
429
+ nextUserId: Nullable<UserId>;
423
430
  currentUserCards: Cards;
424
431
  users: GameStartUser[];
425
432
  minRaiseAmount: number;
@@ -436,7 +443,6 @@ export type GameStartWSMessageToFront = {
436
443
  export type EndGameWSMessageToFront = {
437
444
  type: WSMessageTypeToFront.EndGame;
438
445
  content: {
439
- tableCards?: Cards;
440
446
  winners: Winners;
441
447
  offExtraTime: boolean;
442
448
  };
@@ -458,7 +464,7 @@ export type TableDataWSMessageToFront = {
458
464
  buyinMax?: number;
459
465
  buyinMin?: number;
460
466
  type: RoomType;
461
- minRaiseAmount: number | null;
467
+ minRaiseAmount: Nullable<number>;
462
468
  seatsCount: number;
463
469
  smallBlind: number;
464
470
  bigBlind: number;
@@ -478,7 +484,7 @@ export type ShowCardsWSMessageToFront = {
478
484
  type: WSMessageTypeToFront.ShowCards;
479
485
  content: {
480
486
  userId: UserId;
481
- cards: Array<Card | null>;
487
+ cards: Array<Nullable<Card>>;
482
488
  };
483
489
  };
484
490
  export type ShowdownCardsWSMessageToFront = {
@@ -531,7 +537,7 @@ export type TournamentResultWSMessageToFront = {
531
537
  /**
532
538
  * Можно ли ребайнуться и за сколько
533
539
  */
534
- buyIn: number | undefined;
540
+ buyIn: Nullable<number>;
535
541
  tournamentId: number;
536
542
  };
537
543
  };
@@ -44,7 +44,10 @@ export type GetTournamentGeneralInfoResponse = {
44
44
  * Сумма которую игрок заплатил за вход в турнир, обновленная в из-за тикета
45
45
  */
46
46
  playerBuyIn: Nullable<number>;
47
- playersCount: number;
47
+ /**
48
+ * Всего игроков в турнире включая ребай
49
+ */
50
+ totalPlayersCount: number;
48
51
  totalPrize: number;
49
52
  maxTablePlaces: number;
50
53
  startingChips: number;
@@ -42,16 +42,16 @@ export type GameStartUser = {
42
42
  /**
43
43
  * Оставшееся время резерва места
44
44
  */
45
- reserveRemainingTime: number | undefined;
45
+ reserveRemainingTime: Nullable<number>;
46
46
  /**
47
47
  * Обновленный баланс юзера, если происходит автобайин
48
48
  * Или же в турнирах, если списывается анте
49
49
  */
50
- updatedChipCount: number | undefined;
50
+ updatedChipCount: Nullable<number>;
51
51
  /**
52
52
  * в игре ли юзер
53
53
  */
54
- withoutCards: true | undefined;
54
+ withoutCards: Nullable<true>;
55
55
  };
56
56
  export type User = {
57
57
  avatarId: number;
@@ -60,7 +60,7 @@ export type User = {
60
60
  cards?: Cards;
61
61
  chipsCount: number;
62
62
  place: number;
63
- actionType?: ActionType | null;
63
+ actionType?: Nullable<ActionType>;
64
64
  /**
65
65
  * Сколько поставил юзер
66
66
  */
@@ -73,7 +73,7 @@ export type User = {
73
73
  /**
74
74
  * Сколько добавили к стеку юзера
75
75
  */
76
- plusChipsCount?: number | null;
76
+ plusChipsCount?: Nullable<number>;
77
77
  withCards?: boolean;
78
78
  extraTimeActive?: boolean;
79
79
  /**
@@ -115,7 +115,7 @@ export type TournamentData = {
115
115
  /**
116
116
  * Место игрока в турнире
117
117
  */
118
- currentUserPlace: number | undefined;
118
+ currentUserPlace: Nullable<number>;
119
119
  /**
120
120
  * Средний стек, должен писаться в блайндах
121
121
  */
@@ -135,7 +135,7 @@ export type TournamentData = {
135
135
  /**
136
136
  * Уровень в турнире
137
137
  */
138
- level: number | undefined;
138
+ level: Nullable<number>;
139
139
  /**
140
140
  * Длительность уровня, в мс
141
141
  */
@@ -143,7 +143,7 @@ export type TournamentData = {
143
143
  /**
144
144
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
145
145
  */
146
- topUsers: Record<UserId, number> | undefined;
146
+ topUsers: Nullable<Record<UserId, number>>;
147
147
  };
148
148
  type Showdown = Record<UserId, Cards>;
149
149
  export type ActionMessageContentToFront = {
@@ -153,7 +153,7 @@ export type ActionMessageContentToFront = {
153
153
  * Следующий юзер, который будет нажать кнопку
154
154
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
155
155
  */
156
- nextUserId?: UserId | null;
156
+ nextUserId: Nullable<UserId>;
157
157
  minRaiseAmount: number;
158
158
  };
159
159
  export declare const WsErrorCode: {
@@ -279,12 +279,12 @@ type TournamentGameStart = {
279
279
  /**
280
280
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
281
281
  */
282
- pot: number | undefined;
282
+ pot: Nullable<number>;
283
283
  /**
284
284
  * Приходит только в турнире, когда обновились сб и бб
285
285
  */
286
- newSmallBlind: number | undefined;
287
- newBigBlind: number | undefined;
286
+ newSmallBlind: Nullable<number>;
287
+ newBigBlind: Nullable<number>;
288
288
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
289
289
  export declare enum WSMessageTypeToFront {
290
290
  TableData = "TableData",
@@ -328,11 +328,12 @@ export type NewRoundWSMessageToFront = {
328
328
  content: {
329
329
  pot: number;
330
330
  tableCards: Cards;
331
+ minRaiseAmount: number;
331
332
  /**
332
- * Следующий юзер, который будет нажать кнопку
333
+ * Следующий юзер, который будет ходить
333
334
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
334
335
  */
335
- nextUserId?: UserId | null;
336
+ nextUserId: Nullable<UserId>;
336
337
  };
337
338
  };
338
339
  export type GetUpWSMessageToFront = {
@@ -349,6 +350,12 @@ export type KickedByTimeWSMessageToFront = {
349
350
  };
350
351
  export type SitOutWSMessageToFront = {
351
352
  type: WSMessageTypeToFront.SitOut;
353
+ content: {
354
+ /**
355
+ * Максимальное время ситаут во время турнира, в мс
356
+ */
357
+ maxSitOutDuration: number;
358
+ };
352
359
  };
353
360
  export type SitDownWSMessageToFront = {
354
361
  type: WSMessageTypeToFront.SitDown;
@@ -419,7 +426,7 @@ export type GameStartWSMessageToFront = {
419
426
  /**
420
427
  * Следующий юзер, не приходит если блайнд = олл ин
421
428
  */
422
- nextUserId: UserId | undefined;
429
+ nextUserId: Nullable<UserId>;
423
430
  currentUserCards: Cards;
424
431
  users: GameStartUser[];
425
432
  minRaiseAmount: number;
@@ -436,7 +443,6 @@ export type GameStartWSMessageToFront = {
436
443
  export type EndGameWSMessageToFront = {
437
444
  type: WSMessageTypeToFront.EndGame;
438
445
  content: {
439
- tableCards?: Cards;
440
446
  winners: Winners;
441
447
  offExtraTime: boolean;
442
448
  };
@@ -458,7 +464,7 @@ export type TableDataWSMessageToFront = {
458
464
  buyinMax?: number;
459
465
  buyinMin?: number;
460
466
  type: RoomType;
461
- minRaiseAmount: number | null;
467
+ minRaiseAmount: Nullable<number>;
462
468
  seatsCount: number;
463
469
  smallBlind: number;
464
470
  bigBlind: number;
@@ -478,7 +484,7 @@ export type ShowCardsWSMessageToFront = {
478
484
  type: WSMessageTypeToFront.ShowCards;
479
485
  content: {
480
486
  userId: UserId;
481
- cards: Array<Card | null>;
487
+ cards: Array<Nullable<Card>>;
482
488
  };
483
489
  };
484
490
  export type ShowdownCardsWSMessageToFront = {
@@ -531,7 +537,7 @@ export type TournamentResultWSMessageToFront = {
531
537
  /**
532
538
  * Можно ли ребайнуться и за сколько
533
539
  */
534
- buyIn: number | undefined;
540
+ buyIn: Nullable<number>;
535
541
  tournamentId: number;
536
542
  };
537
543
  };
package/dist/index.d.ts CHANGED
@@ -337,7 +337,10 @@ type GetTournamentGeneralInfoResponse = {
337
337
  * Сумма которую игрок заплатил за вход в турнир, обновленная в из-за тикета
338
338
  */
339
339
  playerBuyIn: Nullable<number>;
340
- playersCount: number;
340
+ /**
341
+ * Всего игроков в турнире включая ребай
342
+ */
343
+ totalPlayersCount: number;
341
344
  totalPrize: number;
342
345
  maxTablePlaces: number;
343
346
  startingChips: number;
@@ -642,16 +645,16 @@ type GameStartUser = {
642
645
  /**
643
646
  * Оставшееся время резерва места
644
647
  */
645
- reserveRemainingTime: number | undefined;
648
+ reserveRemainingTime: Nullable<number>;
646
649
  /**
647
650
  * Обновленный баланс юзера, если происходит автобайин
648
651
  * Или же в турнирах, если списывается анте
649
652
  */
650
- updatedChipCount: number | undefined;
653
+ updatedChipCount: Nullable<number>;
651
654
  /**
652
655
  * в игре ли юзер
653
656
  */
654
- withoutCards: true | undefined;
657
+ withoutCards: Nullable<true>;
655
658
  };
656
659
  type User = {
657
660
  avatarId: number;
@@ -660,7 +663,7 @@ type User = {
660
663
  cards?: Cards;
661
664
  chipsCount: number;
662
665
  place: number;
663
- actionType?: ActionType | null;
666
+ actionType?: Nullable<ActionType>;
664
667
  /**
665
668
  * Сколько поставил юзер
666
669
  */
@@ -673,7 +676,7 @@ type User = {
673
676
  /**
674
677
  * Сколько добавили к стеку юзера
675
678
  */
676
- plusChipsCount?: number | null;
679
+ plusChipsCount?: Nullable<number>;
677
680
  withCards?: boolean;
678
681
  extraTimeActive?: boolean;
679
682
  /**
@@ -715,7 +718,7 @@ type TournamentData = {
715
718
  /**
716
719
  * Место игрока в турнире
717
720
  */
718
- currentUserPlace: number | undefined;
721
+ currentUserPlace: Nullable<number>;
719
722
  /**
720
723
  * Средний стек, должен писаться в блайндах
721
724
  */
@@ -735,7 +738,7 @@ type TournamentData = {
735
738
  /**
736
739
  * Уровень в турнире
737
740
  */
738
- level: number | undefined;
741
+ level: Nullable<number>;
739
742
  /**
740
743
  * Длительность уровня, в мс
741
744
  */
@@ -743,7 +746,7 @@ type TournamentData = {
743
746
  /**
744
747
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
745
748
  */
746
- topUsers: Record<UserId, number> | undefined;
749
+ topUsers: Nullable<Record<UserId, number>>;
747
750
  };
748
751
  type Showdown = Record<UserId, Cards>;
749
752
  type ActionMessageContentToFront = {
@@ -753,7 +756,7 @@ type ActionMessageContentToFront = {
753
756
  * Следующий юзер, который будет нажать кнопку
754
757
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
755
758
  */
756
- nextUserId?: UserId | null;
759
+ nextUserId: Nullable<UserId>;
757
760
  minRaiseAmount: number;
758
761
  };
759
762
  declare const WsErrorCode: {
@@ -879,12 +882,12 @@ type TournamentGameStart = {
879
882
  /**
880
883
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
881
884
  */
882
- pot: number | undefined;
885
+ pot: Nullable<number>;
883
886
  /**
884
887
  * Приходит только в турнире, когда обновились сб и бб
885
888
  */
886
- newSmallBlind: number | undefined;
887
- newBigBlind: number | undefined;
889
+ newSmallBlind: Nullable<number>;
890
+ newBigBlind: Nullable<number>;
888
891
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
889
892
  declare enum WSMessageTypeToFront {
890
893
  TableData = "TableData",
@@ -928,11 +931,12 @@ type NewRoundWSMessageToFront = {
928
931
  content: {
929
932
  pot: number;
930
933
  tableCards: Cards;
934
+ minRaiseAmount: number;
931
935
  /**
932
- * Следующий юзер, который будет нажать кнопку
936
+ * Следующий юзер, который будет ходить
933
937
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
934
938
  */
935
- nextUserId?: UserId | null;
939
+ nextUserId: Nullable<UserId>;
936
940
  };
937
941
  };
938
942
  type GetUpWSMessageToFront = {
@@ -949,6 +953,12 @@ type KickedByTimeWSMessageToFront = {
949
953
  };
950
954
  type SitOutWSMessageToFront = {
951
955
  type: WSMessageTypeToFront.SitOut;
956
+ content: {
957
+ /**
958
+ * Максимальное время ситаут во время турнира, в мс
959
+ */
960
+ maxSitOutDuration: number;
961
+ };
952
962
  };
953
963
  type SitDownWSMessageToFront = {
954
964
  type: WSMessageTypeToFront.SitDown;
@@ -1019,7 +1029,7 @@ type GameStartWSMessageToFront = {
1019
1029
  /**
1020
1030
  * Следующий юзер, не приходит если блайнд = олл ин
1021
1031
  */
1022
- nextUserId: UserId | undefined;
1032
+ nextUserId: Nullable<UserId>;
1023
1033
  currentUserCards: Cards;
1024
1034
  users: GameStartUser[];
1025
1035
  minRaiseAmount: number;
@@ -1036,7 +1046,6 @@ type GameStartWSMessageToFront = {
1036
1046
  type EndGameWSMessageToFront = {
1037
1047
  type: WSMessageTypeToFront.EndGame;
1038
1048
  content: {
1039
- tableCards?: Cards;
1040
1049
  winners: Winners;
1041
1050
  offExtraTime: boolean;
1042
1051
  };
@@ -1058,7 +1067,7 @@ type TableDataWSMessageToFront = {
1058
1067
  buyinMax?: number;
1059
1068
  buyinMin?: number;
1060
1069
  type: RoomType;
1061
- minRaiseAmount: number | null;
1070
+ minRaiseAmount: Nullable<number>;
1062
1071
  seatsCount: number;
1063
1072
  smallBlind: number;
1064
1073
  bigBlind: number;
@@ -1078,7 +1087,7 @@ type ShowCardsWSMessageToFront = {
1078
1087
  type: WSMessageTypeToFront.ShowCards;
1079
1088
  content: {
1080
1089
  userId: UserId;
1081
- cards: Array<Card | null>;
1090
+ cards: Array<Nullable<Card>>;
1082
1091
  };
1083
1092
  };
1084
1093
  type ShowdownCardsWSMessageToFront = {
@@ -1131,7 +1140,7 @@ type TournamentResultWSMessageToFront = {
1131
1140
  /**
1132
1141
  * Можно ли ребайнуться и за сколько
1133
1142
  */
1134
- buyIn: number | undefined;
1143
+ buyIn: Nullable<number>;
1135
1144
  tournamentId: number;
1136
1145
  };
1137
1146
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "front-back-poker-types",
3
- "version": "5.0.224",
3
+ "version": "5.0.226",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "files": [