@spawnco/sdk-types 0.0.3 → 0.0.5

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/index.d.mts CHANGED
@@ -11,24 +11,7 @@ interface SpawnClientSDK__V1 {
11
11
  upgradeGuest(): Promise<void>;
12
12
  };
13
13
  room: {
14
- quick(options?: {
15
- gameMode?: string;
16
- maxWait?: number;
17
- }): Promise<Room>;
18
- create(options?: {
19
- visibility?: RoomVisibility;
20
- maxPlayers?: number;
21
- gameMode?: string;
22
- password?: string;
23
- }): Promise<Room>;
24
- join(roomId: string): Promise<Room>;
25
- browse(options?: {
26
- gameMode?: string;
27
- visibility?: Exclude<RoomVisibility, "private">;
28
- notFull?: boolean;
29
- }): Promise<RoomInfo[]>;
30
- list(): Promise<RoomInfo[]>;
31
- continue(roomId: string): Promise<Room>;
14
+ connect(): Promise<Room>;
32
15
  };
33
16
  economy: {
34
17
  balance(): Promise<{
@@ -124,7 +107,7 @@ interface Item {
124
107
  id: string;
125
108
  data?: Record<string, any>;
126
109
  }
127
- type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "room">;
110
+ type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready" | "room">;
128
111
  type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;
129
112
 
130
113
  export type { Item, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, User };
package/dist/index.d.ts CHANGED
@@ -11,24 +11,7 @@ interface SpawnClientSDK__V1 {
11
11
  upgradeGuest(): Promise<void>;
12
12
  };
13
13
  room: {
14
- quick(options?: {
15
- gameMode?: string;
16
- maxWait?: number;
17
- }): Promise<Room>;
18
- create(options?: {
19
- visibility?: RoomVisibility;
20
- maxPlayers?: number;
21
- gameMode?: string;
22
- password?: string;
23
- }): Promise<Room>;
24
- join(roomId: string): Promise<Room>;
25
- browse(options?: {
26
- gameMode?: string;
27
- visibility?: Exclude<RoomVisibility, "private">;
28
- notFull?: boolean;
29
- }): Promise<RoomInfo[]>;
30
- list(): Promise<RoomInfo[]>;
31
- continue(roomId: string): Promise<Room>;
14
+ connect(): Promise<Room>;
32
15
  };
33
16
  economy: {
34
17
  balance(): Promise<{
@@ -124,7 +107,7 @@ interface Item {
124
107
  id: string;
125
108
  data?: Record<string, any>;
126
109
  }
127
- type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "room">;
110
+ type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready" | "room">;
128
111
  type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;
129
112
 
130
113
  export type { Item, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, User };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "TypeScript type definitions for Spawn SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/v1.ts CHANGED
@@ -15,25 +15,8 @@ export interface SpawnClientSDK__V1 {
15
15
  };
16
16
 
17
17
  room: {
18
- quick(options?: { gameMode?: string; maxWait?: number }): Promise<Room>;
19
-
20
- create(options?: {
21
- visibility?: RoomVisibility;
22
- maxPlayers?: number;
23
- gameMode?: string;
24
- password?: string;
25
- }): Promise<Room>;
26
-
27
- join(roomId: string): Promise<Room>;
28
-
29
- browse(options?: {
30
- gameMode?: string;
31
- visibility?: Exclude<RoomVisibility, "private">;
32
- notFull?: boolean;
33
- }): Promise<RoomInfo[]>;
34
-
35
- list(): Promise<RoomInfo[]>; // My active rooms in this game
36
- continue(roomId: string): Promise<Room>;
18
+ // only one room per game for v1
19
+ connect(): Promise<Room>;
37
20
  };
38
21
 
39
22
  economy: {
@@ -156,5 +139,8 @@ export interface Item {
156
139
 
157
140
  // v0 sdk types for testing
158
141
 
159
- export type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "room">;
142
+ export type SpawnClientSDK__V0 = Pick<
143
+ SpawnClientSDK__V1,
144
+ "user" | "ready" | "room"
145
+ >;
160
146
  export type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;