@spawnco/sdk-types 0.0.4 → 0.0.6
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 +4 -18
- package/dist/index.d.ts +4 -18
- package/package.json +1 -1
- package/src/v1.ts +8 -19
package/dist/index.d.mts
CHANGED
@@ -11,24 +11,10 @@ interface SpawnClientSDK__V1 {
|
|
11
11
|
upgradeGuest(): Promise<void>;
|
12
12
|
};
|
13
13
|
room: {
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
connect(options: {
|
15
|
+
query?: Record<string, string>;
|
16
|
+
headers?: Record<string, string>;
|
17
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>;
|
32
18
|
};
|
33
19
|
economy: {
|
34
20
|
balance(): Promise<{
|
@@ -124,7 +110,7 @@ interface Item {
|
|
124
110
|
id: string;
|
125
111
|
data?: Record<string, any>;
|
126
112
|
}
|
127
|
-
type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready">;
|
113
|
+
type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready" | "room">;
|
128
114
|
type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;
|
129
115
|
|
130
116
|
export type { Item, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, User };
|
package/dist/index.d.ts
CHANGED
@@ -11,24 +11,10 @@ interface SpawnClientSDK__V1 {
|
|
11
11
|
upgradeGuest(): Promise<void>;
|
12
12
|
};
|
13
13
|
room: {
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
connect(options: {
|
15
|
+
query?: Record<string, string>;
|
16
|
+
headers?: Record<string, string>;
|
17
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>;
|
32
18
|
};
|
33
19
|
economy: {
|
34
20
|
balance(): Promise<{
|
@@ -124,7 +110,7 @@ interface Item {
|
|
124
110
|
id: string;
|
125
111
|
data?: Record<string, any>;
|
126
112
|
}
|
127
|
-
type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready">;
|
113
|
+
type SpawnClientSDK__V0 = Pick<SpawnClientSDK__V1, "user" | "ready" | "room">;
|
128
114
|
type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;
|
129
115
|
|
130
116
|
export type { Item, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, User };
|
package/package.json
CHANGED
package/src/v1.ts
CHANGED
@@ -15,25 +15,11 @@ export interface SpawnClientSDK__V1 {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
room: {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
maxPlayers?: number;
|
23
|
-
gameMode?: string;
|
24
|
-
password?: string;
|
18
|
+
// only one room per game for v1
|
19
|
+
connect(options: {
|
20
|
+
query?: Record<string, string>;
|
21
|
+
headers?: Record<string, string>;
|
25
22
|
}): 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>;
|
37
23
|
};
|
38
24
|
|
39
25
|
economy: {
|
@@ -156,5 +142,8 @@ export interface Item {
|
|
156
142
|
|
157
143
|
// v0 sdk types for testing
|
158
144
|
|
159
|
-
export type SpawnClientSDK__V0 = Pick<
|
145
|
+
export type SpawnClientSDK__V0 = Pick<
|
146
|
+
SpawnClientSDK__V1,
|
147
|
+
"user" | "ready" | "room"
|
148
|
+
>;
|
160
149
|
export type SpawnServerSDK__V0 = Pick<SpawnServerSDK__V1, "room">;
|