front-back-poker-types 5.0.225 → 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.
@@ -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
  };
@@ -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
@@ -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,7 @@ type TournamentData = {
746
746
  /**
747
747
  * Первые 3 места игроков по стеку в турнире, сидящие в этой комнате
748
748
  */
749
- topUsers: Record<UserId, number> | undefined;
749
+ topUsers: Nullable<Record<UserId, number>>;
750
750
  };
751
751
  type Showdown = Record<UserId, Cards>;
752
752
  type ActionMessageContentToFront = {
@@ -756,7 +756,7 @@ type ActionMessageContentToFront = {
756
756
  * Следующий юзер, который будет нажать кнопку
757
757
  * Не отправляется, если в олл ин ушли все, или был последних ход в раунде
758
758
  */
759
- nextUserId?: UserId | null;
759
+ nextUserId: Nullable<UserId>;
760
760
  minRaiseAmount: number;
761
761
  };
762
762
  declare const WsErrorCode: {
@@ -882,12 +882,12 @@ type TournamentGameStart = {
882
882
  /**
883
883
  * Приходит только в турнире (если есть какие-то ставки до сб и бб)
884
884
  */
885
- pot: number | undefined;
885
+ pot: Nullable<number>;
886
886
  /**
887
887
  * Приходит только в турнире, когда обновились сб и бб
888
888
  */
889
- newSmallBlind: number | undefined;
890
- newBigBlind: number | undefined;
889
+ newSmallBlind: Nullable<number>;
890
+ newBigBlind: Nullable<number>;
891
891
  } & Omit<TournamentData, 'tournamentId' | 'levelDuration' | 'tournamentWaiting'>;
892
892
  declare enum WSMessageTypeToFront {
893
893
  TableData = "TableData",
@@ -931,11 +931,12 @@ type NewRoundWSMessageToFront = {
931
931
  content: {
932
932
  pot: number;
933
933
  tableCards: Cards;
934
+ minRaiseAmount: number;
934
935
  /**
935
- * Следующий юзер, который будет нажать кнопку
936
+ * Следующий юзер, который будет ходить
936
937
  * Не отправляется, если все в олл ин или был последний раунд в раздаче
937
938
  */
938
- nextUserId?: UserId | null;
939
+ nextUserId: Nullable<UserId>;
939
940
  };
940
941
  };
941
942
  type GetUpWSMessageToFront = {
@@ -952,6 +953,12 @@ type KickedByTimeWSMessageToFront = {
952
953
  };
953
954
  type SitOutWSMessageToFront = {
954
955
  type: WSMessageTypeToFront.SitOut;
956
+ content: {
957
+ /**
958
+ * Максимальное время ситаут во время турнира, в мс
959
+ */
960
+ maxSitOutDuration: number;
961
+ };
955
962
  };
956
963
  type SitDownWSMessageToFront = {
957
964
  type: WSMessageTypeToFront.SitDown;
@@ -1022,7 +1029,7 @@ type GameStartWSMessageToFront = {
1022
1029
  /**
1023
1030
  * Следующий юзер, не приходит если блайнд = олл ин
1024
1031
  */
1025
- nextUserId: UserId | undefined;
1032
+ nextUserId: Nullable<UserId>;
1026
1033
  currentUserCards: Cards;
1027
1034
  users: GameStartUser[];
1028
1035
  minRaiseAmount: number;
@@ -1039,7 +1046,6 @@ type GameStartWSMessageToFront = {
1039
1046
  type EndGameWSMessageToFront = {
1040
1047
  type: WSMessageTypeToFront.EndGame;
1041
1048
  content: {
1042
- tableCards?: Cards;
1043
1049
  winners: Winners;
1044
1050
  offExtraTime: boolean;
1045
1051
  };
@@ -1061,7 +1067,7 @@ type TableDataWSMessageToFront = {
1061
1067
  buyinMax?: number;
1062
1068
  buyinMin?: number;
1063
1069
  type: RoomType;
1064
- minRaiseAmount: number | null;
1070
+ minRaiseAmount: Nullable<number>;
1065
1071
  seatsCount: number;
1066
1072
  smallBlind: number;
1067
1073
  bigBlind: number;
@@ -1081,7 +1087,7 @@ type ShowCardsWSMessageToFront = {
1081
1087
  type: WSMessageTypeToFront.ShowCards;
1082
1088
  content: {
1083
1089
  userId: UserId;
1084
- cards: Array<Card | null>;
1090
+ cards: Array<Nullable<Card>>;
1085
1091
  };
1086
1092
  };
1087
1093
  type ShowdownCardsWSMessageToFront = {
@@ -1134,7 +1140,7 @@ type TournamentResultWSMessageToFront = {
1134
1140
  /**
1135
1141
  * Можно ли ребайнуться и за сколько
1136
1142
  */
1137
- buyIn: number | undefined;
1143
+ buyIn: Nullable<number>;
1138
1144
  tournamentId: number;
1139
1145
  };
1140
1146
  };
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.226",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "files": [