front-back-poker-types 5.0.225 → 5.0.227

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.
@@ -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,11 @@ export type TournamentData = {
143
143
  /**
144
144
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
145
145
  */
146
- topUsers: Record<UserId, number> | undefined;
146
+ topUsers: Nullable<Record<UserId, number>>;
147
+ /**
148
+ * Сколько времени осталось до кика из-за ситаута
149
+ */
150
+ sitOutKickCountdown: Nullable<number>;
147
151
  };
148
152
  type Showdown = Record<UserId, Cards>;
149
153
  export type ActionMessageContentToFront = {
@@ -153,7 +157,7 @@ export type ActionMessageContentToFront = {
153
157
  * Следующий юзер, который будет нажать кнопку
154
158
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
155
159
  */
156
- nextUserId?: UserId | null;
160
+ nextUserId: Nullable<UserId>;
157
161
  minRaiseAmount: number;
158
162
  };
159
163
  export declare const WsErrorCode: {
@@ -279,12 +283,12 @@ type TournamentGameStart = {
279
283
  /**
280
284
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
281
285
  */
282
- pot: number | undefined;
286
+ pot: Nullable<number>;
283
287
  /**
284
288
  * Приходит только в турнире, когда обновились сб и бб
285
289
  */
286
- newSmallBlind: number | undefined;
287
- newBigBlind: number | undefined;
290
+ newSmallBlind: Nullable<number>;
291
+ newBigBlind: Nullable<number>;
288
292
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
289
293
  export declare enum WSMessageTypeToFront {
290
294
  TableData = "TableData",
@@ -328,11 +332,12 @@ export type NewRoundWSMessageToFront = {
328
332
  content: {
329
333
  pot: number;
330
334
  tableCards: Cards;
335
+ minRaiseAmount: number;
331
336
  /**
332
- * Следующий юзер, который будет нажать кнопку
337
+ * Следующий юзер, который будет ходить
333
338
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
334
339
  */
335
- nextUserId?: UserId | null;
340
+ nextUserId: Nullable<UserId>;
336
341
  };
337
342
  };
338
343
  export type GetUpWSMessageToFront = {
@@ -349,6 +354,12 @@ export type KickedByTimeWSMessageToFront = {
349
354
  };
350
355
  export type SitOutWSMessageToFront = {
351
356
  type: WSMessageTypeToFront.SitOut;
357
+ content: {
358
+ /**
359
+ * Сколько времени осталось до кика из-за ситаута, в турнире
360
+ */
361
+ sitOutKickCountdown: Nullable<number>;
362
+ };
352
363
  };
353
364
  export type SitDownWSMessageToFront = {
354
365
  type: WSMessageTypeToFront.SitDown;
@@ -419,7 +430,7 @@ export type GameStartWSMessageToFront = {
419
430
  /**
420
431
  * Следующий юзер, не приходит если блайнд = олл ин
421
432
  */
422
- nextUserId: UserId | undefined;
433
+ nextUserId: Nullable<UserId>;
423
434
  currentUserCards: Cards;
424
435
  users: GameStartUser[];
425
436
  minRaiseAmount: number;
@@ -436,7 +447,6 @@ export type GameStartWSMessageToFront = {
436
447
  export type EndGameWSMessageToFront = {
437
448
  type: WSMessageTypeToFront.EndGame;
438
449
  content: {
439
- tableCards?: Cards;
440
450
  winners: Winners;
441
451
  offExtraTime: boolean;
442
452
  };
@@ -458,7 +468,7 @@ export type TableDataWSMessageToFront = {
458
468
  buyinMax?: number;
459
469
  buyinMin?: number;
460
470
  type: RoomType;
461
- minRaiseAmount: number | null;
471
+ minRaiseAmount: Nullable<number>;
462
472
  seatsCount: number;
463
473
  smallBlind: number;
464
474
  bigBlind: number;
@@ -478,7 +488,7 @@ export type ShowCardsWSMessageToFront = {
478
488
  type: WSMessageTypeToFront.ShowCards;
479
489
  content: {
480
490
  userId: UserId;
481
- cards: Array<Card | null>;
491
+ cards: Array<Nullable<Card>>;
482
492
  };
483
493
  };
484
494
  export type ShowdownCardsWSMessageToFront = {
@@ -531,7 +541,7 @@ export type TournamentResultWSMessageToFront = {
531
541
  /**
532
542
  * Можно ли ребайнуться и за сколько
533
543
  */
534
- buyIn: number | undefined;
544
+ buyIn: Nullable<number>;
535
545
  tournamentId: number;
536
546
  };
537
547
  };
@@ -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,11 @@ export type TournamentData = {
143
143
  /**
144
144
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
145
145
  */
146
- topUsers: Record<UserId, number> | undefined;
146
+ topUsers: Nullable<Record<UserId, number>>;
147
+ /**
148
+ * Сколько времени осталось до кика из-за ситаута
149
+ */
150
+ sitOutKickCountdown: Nullable<number>;
147
151
  };
148
152
  type Showdown = Record<UserId, Cards>;
149
153
  export type ActionMessageContentToFront = {
@@ -153,7 +157,7 @@ export type ActionMessageContentToFront = {
153
157
  * Следующий юзер, который будет нажать кнопку
154
158
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
155
159
  */
156
- nextUserId?: UserId | null;
160
+ nextUserId: Nullable<UserId>;
157
161
  minRaiseAmount: number;
158
162
  };
159
163
  export declare const WsErrorCode: {
@@ -279,12 +283,12 @@ type TournamentGameStart = {
279
283
  /**
280
284
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
281
285
  */
282
- pot: number | undefined;
286
+ pot: Nullable<number>;
283
287
  /**
284
288
  * Приходит только в турнире, когда обновились сб и бб
285
289
  */
286
- newSmallBlind: number | undefined;
287
- newBigBlind: number | undefined;
290
+ newSmallBlind: Nullable<number>;
291
+ newBigBlind: Nullable<number>;
288
292
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
289
293
  export declare enum WSMessageTypeToFront {
290
294
  TableData = "TableData",
@@ -328,11 +332,12 @@ export type NewRoundWSMessageToFront = {
328
332
  content: {
329
333
  pot: number;
330
334
  tableCards: Cards;
335
+ minRaiseAmount: number;
331
336
  /**
332
- * Следующий юзер, который будет нажать кнопку
337
+ * Следующий юзер, который будет ходить
333
338
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
334
339
  */
335
- nextUserId?: UserId | null;
340
+ nextUserId: Nullable<UserId>;
336
341
  };
337
342
  };
338
343
  export type GetUpWSMessageToFront = {
@@ -349,6 +354,12 @@ export type KickedByTimeWSMessageToFront = {
349
354
  };
350
355
  export type SitOutWSMessageToFront = {
351
356
  type: WSMessageTypeToFront.SitOut;
357
+ content: {
358
+ /**
359
+ * Сколько времени осталось до кика из-за ситаута, в турнире
360
+ */
361
+ sitOutKickCountdown: Nullable<number>;
362
+ };
352
363
  };
353
364
  export type SitDownWSMessageToFront = {
354
365
  type: WSMessageTypeToFront.SitDown;
@@ -419,7 +430,7 @@ export type GameStartWSMessageToFront = {
419
430
  /**
420
431
  * Следующий юзер, не приходит если блайнд = олл ин
421
432
  */
422
- nextUserId: UserId | undefined;
433
+ nextUserId: Nullable<UserId>;
423
434
  currentUserCards: Cards;
424
435
  users: GameStartUser[];
425
436
  minRaiseAmount: number;
@@ -436,7 +447,6 @@ export type GameStartWSMessageToFront = {
436
447
  export type EndGameWSMessageToFront = {
437
448
  type: WSMessageTypeToFront.EndGame;
438
449
  content: {
439
- tableCards?: Cards;
440
450
  winners: Winners;
441
451
  offExtraTime: boolean;
442
452
  };
@@ -458,7 +468,7 @@ export type TableDataWSMessageToFront = {
458
468
  buyinMax?: number;
459
469
  buyinMin?: number;
460
470
  type: RoomType;
461
- minRaiseAmount: number | null;
471
+ minRaiseAmount: Nullable<number>;
462
472
  seatsCount: number;
463
473
  smallBlind: number;
464
474
  bigBlind: number;
@@ -478,7 +488,7 @@ export type ShowCardsWSMessageToFront = {
478
488
  type: WSMessageTypeToFront.ShowCards;
479
489
  content: {
480
490
  userId: UserId;
481
- cards: Array<Card | null>;
491
+ cards: Array<Nullable<Card>>;
482
492
  };
483
493
  };
484
494
  export type ShowdownCardsWSMessageToFront = {
@@ -531,7 +541,7 @@ export type TournamentResultWSMessageToFront = {
531
541
  /**
532
542
  * Можно ли ребайнуться и за сколько
533
543
  */
534
- buyIn: number | undefined;
544
+ buyIn: Nullable<number>;
535
545
  tournamentId: number;
536
546
  };
537
547
  };
package/dist/index.d.ts CHANGED
@@ -645,16 +645,16 @@ type GameStartUser = {
645
645
  /**
646
646
  * Оставшееся время резерва места
647
647
  */
648
- reserveRemainingTime: number | undefined;
648
+ reserveRemainingTime: Nullable<number>;
649
649
  /**
650
650
  * Обновленный баланс юзера, если происходит автобайин
651
651
  * Или же в турнирах, если списывается анте
652
652
  */
653
- updatedChipCount: number | undefined;
653
+ updatedChipCount: Nullable<number>;
654
654
  /**
655
655
  * в игре ли юзер
656
656
  */
657
- withoutCards: true | undefined;
657
+ withoutCards: Nullable<true>;
658
658
  };
659
659
  type User = {
660
660
  avatarId: number;
@@ -663,7 +663,7 @@ type User = {
663
663
  cards?: Cards;
664
664
  chipsCount: number;
665
665
  place: number;
666
- actionType?: ActionType | null;
666
+ actionType?: Nullable<ActionType>;
667
667
  /**
668
668
  * Сколько поставил юзер
669
669
  */
@@ -676,7 +676,7 @@ type User = {
676
676
  /**
677
677
  * Сколько добавили к стеку юзера
678
678
  */
679
- plusChipsCount?: number | null;
679
+ plusChipsCount?: Nullable<number>;
680
680
  withCards?: boolean;
681
681
  extraTimeActive?: boolean;
682
682
  /**
@@ -718,7 +718,7 @@ type TournamentData = {
718
718
  /**
719
719
  * Место игрока в турнире
720
720
  */
721
- currentUserPlace: number | undefined;
721
+ currentUserPlace: Nullable<number>;
722
722
  /**
723
723
  * Средний стек, должен писаться в блайндах
724
724
  */
@@ -738,7 +738,7 @@ type TournamentData = {
738
738
  /**
739
739
  * Уровень в турнире
740
740
  */
741
- level: number | undefined;
741
+ level: Nullable<number>;
742
742
  /**
743
743
  * Длительность уровня, в мс
744
744
  */
@@ -746,7 +746,11 @@ type TournamentData = {
746
746
  /**
747
747
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
748
748
  */
749
- topUsers: Record<UserId, number> | undefined;
749
+ topUsers: Nullable<Record<UserId, number>>;
750
+ /**
751
+ * Сколько времени осталось до кика из-за ситаута
752
+ */
753
+ sitOutKickCountdown: Nullable<number>;
750
754
  };
751
755
  type Showdown = Record<UserId, Cards>;
752
756
  type ActionMessageContentToFront = {
@@ -756,7 +760,7 @@ type ActionMessageContentToFront = {
756
760
  * Следующий юзер, который будет нажать кнопку
757
761
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
758
762
  */
759
- nextUserId?: UserId | null;
763
+ nextUserId: Nullable<UserId>;
760
764
  minRaiseAmount: number;
761
765
  };
762
766
  declare const WsErrorCode: {
@@ -882,12 +886,12 @@ type TournamentGameStart = {
882
886
  /**
883
887
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
884
888
  */
885
- pot: number | undefined;
889
+ pot: Nullable<number>;
886
890
  /**
887
891
  * Приходит только в турнире, когда обновились сб и бб
888
892
  */
889
- newSmallBlind: number | undefined;
890
- newBigBlind: number | undefined;
893
+ newSmallBlind: Nullable<number>;
894
+ newBigBlind: Nullable<number>;
891
895
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
892
896
  declare enum WSMessageTypeToFront {
893
897
  TableData = "TableData",
@@ -931,11 +935,12 @@ type NewRoundWSMessageToFront = {
931
935
  content: {
932
936
  pot: number;
933
937
  tableCards: Cards;
938
+ minRaiseAmount: number;
934
939
  /**
935
- * Следующий юзер, который будет нажать кнопку
940
+ * Следующий юзер, который будет ходить
936
941
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
937
942
  */
938
- nextUserId?: UserId | null;
943
+ nextUserId: Nullable<UserId>;
939
944
  };
940
945
  };
941
946
  type GetUpWSMessageToFront = {
@@ -952,6 +957,12 @@ type KickedByTimeWSMessageToFront = {
952
957
  };
953
958
  type SitOutWSMessageToFront = {
954
959
  type: WSMessageTypeToFront.SitOut;
960
+ content: {
961
+ /**
962
+ * Сколько времени осталось до кика из-за ситаута, в турнире
963
+ */
964
+ sitOutKickCountdown: Nullable<number>;
965
+ };
955
966
  };
956
967
  type SitDownWSMessageToFront = {
957
968
  type: WSMessageTypeToFront.SitDown;
@@ -1022,7 +1033,7 @@ type GameStartWSMessageToFront = {
1022
1033
  /**
1023
1034
  * Следующий юзер, не приходит если блайнд = олл ин
1024
1035
  */
1025
- nextUserId: UserId | undefined;
1036
+ nextUserId: Nullable<UserId>;
1026
1037
  currentUserCards: Cards;
1027
1038
  users: GameStartUser[];
1028
1039
  minRaiseAmount: number;
@@ -1039,7 +1050,6 @@ type GameStartWSMessageToFront = {
1039
1050
  type EndGameWSMessageToFront = {
1040
1051
  type: WSMessageTypeToFront.EndGame;
1041
1052
  content: {
1042
- tableCards?: Cards;
1043
1053
  winners: Winners;
1044
1054
  offExtraTime: boolean;
1045
1055
  };
@@ -1061,7 +1071,7 @@ type TableDataWSMessageToFront = {
1061
1071
  buyinMax?: number;
1062
1072
  buyinMin?: number;
1063
1073
  type: RoomType;
1064
- minRaiseAmount: number | null;
1074
+ minRaiseAmount: Nullable<number>;
1065
1075
  seatsCount: number;
1066
1076
  smallBlind: number;
1067
1077
  bigBlind: number;
@@ -1081,7 +1091,7 @@ type ShowCardsWSMessageToFront = {
1081
1091
  type: WSMessageTypeToFront.ShowCards;
1082
1092
  content: {
1083
1093
  userId: UserId;
1084
- cards: Array<Card | null>;
1094
+ cards: Array<Nullable<Card>>;
1085
1095
  };
1086
1096
  };
1087
1097
  type ShowdownCardsWSMessageToFront = {
@@ -1134,7 +1144,7 @@ type TournamentResultWSMessageToFront = {
1134
1144
  /**
1135
1145
  * Можно ли ребайнуться и за сколько
1136
1146
  */
1137
- buyIn: number | undefined;
1147
+ buyIn: Nullable<number>;
1138
1148
  tournamentId: number;
1139
1149
  };
1140
1150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "front-back-poker-types",
3
- "version": "5.0.225",
3
+ "version": "5.0.227",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "files": [