@battle-racing/br-common-lib 2.5.0 → 3.0.0

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.
@@ -1,3 +1,3 @@
1
1
  import type { ErrorResponse } from './ErrorResponse';
2
- import type { SuccesResponse } from './SuccesResponse';
3
- export type Response<T> = SuccesResponse<T> | ErrorResponse;
2
+ import type { SuccessResponse } from './SuccessResponse';
3
+ export type Response<T> = SuccessResponse<T> | ErrorResponse;
@@ -1,4 +1,4 @@
1
- export interface SuccesResponse<T> {
1
+ export interface SuccessResponse<T> {
2
2
  status: 'success';
3
3
  code: 200;
4
4
  data?: T;
@@ -0,0 +1,5 @@
1
+ export interface SuccessResponse<T> {
2
+ status: 'success';
3
+ code: 200;
4
+ data?: T;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,3 @@
1
1
  export type { ErrorResponse } from './ErrorResponse';
2
- export type { SuccesResponse } from './SuccesResponse';
2
+ export type { SuccessResponse } from './SuccessResponse';
3
3
  export type { Response } from './Response';
@@ -14,7 +14,10 @@ export interface SocketKartEventsParams {
14
14
  'kart:updated': {
15
15
  kart: Kart;
16
16
  };
17
- 'kart:init:response': Response<Kart>;
17
+ 'kart:init:response': Response<{
18
+ kart: Kart;
19
+ gameTrack: GameTrack;
20
+ }>;
18
21
  /** Whenever the Game Track config changed */
19
22
  'kart:gameTrack:updated': {
20
23
  gameTrack: GameTrack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "2.5.0",
3
+ "version": "3.0.0",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,4 +1,4 @@
1
1
  import type { ErrorResponse } from './ErrorResponse';
2
- import type { SuccesResponse } from './SuccesResponse';
2
+ import type { SuccessResponse } from './SuccessResponse';
3
3
 
4
- export type Response<T> = SuccesResponse<T> | ErrorResponse;
4
+ export type Response<T> = SuccessResponse<T> | ErrorResponse;
@@ -1,4 +1,4 @@
1
- export interface SuccesResponse<T> {
1
+ export interface SuccessResponse<T> {
2
2
  status: 'success';
3
3
  code: 200;
4
4
  data?: T;
@@ -1,3 +1,3 @@
1
1
  export type { ErrorResponse } from './ErrorResponse';
2
- export type { SuccesResponse } from './SuccesResponse';
2
+ export type { SuccessResponse } from './SuccessResponse';
3
3
  export type { Response } from './Response';
@@ -17,7 +17,7 @@ export type SocketKartPowerUpEventsParams = {
17
17
  export interface SocketKartEventsParams {
18
18
  'kart:updated': { kart: Kart };
19
19
  // Response from server
20
- 'kart:init:response': Response<Kart>;
20
+ 'kart:init:response': Response<{ kart: Kart; gameTrack: GameTrack }>;
21
21
  /** Whenever the Game Track config changed */
22
22
  'kart:gameTrack:updated': { gameTrack: GameTrack };
23
23
  /** When the physical button of the game track is pressed */