@spawnco/sdk-types 0.0.39 → 0.0.40
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/v1.ts +11 -0
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* Current modules: user, room, economy, inventory, storage
|
|
5
5
|
* Future modules: friends, achievements, chat, ai, leaderboards, tournaments
|
|
6
6
|
*/
|
|
7
|
+
interface MagicCdnMediaToken {
|
|
8
|
+
token: string;
|
|
9
|
+
expiresAtMs: number;
|
|
10
|
+
}
|
|
11
|
+
interface MagicCdnApi {
|
|
12
|
+
getMediaToken(): Promise<MagicCdnMediaToken>;
|
|
13
|
+
}
|
|
7
14
|
interface SpawnClientSDK__V1<TConfig = any> {
|
|
8
15
|
ready(): Promise<void>;
|
|
9
16
|
user: {
|
|
@@ -96,6 +103,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
|
|
|
96
103
|
error?: string;
|
|
97
104
|
}>;
|
|
98
105
|
};
|
|
106
|
+
magicCdn: MagicCdnApi;
|
|
99
107
|
}
|
|
100
108
|
interface SpawnServerSDK__V1<TConfig = any> {
|
|
101
109
|
user: {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* Current modules: user, room, economy, inventory, storage
|
|
5
5
|
* Future modules: friends, achievements, chat, ai, leaderboards, tournaments
|
|
6
6
|
*/
|
|
7
|
+
interface MagicCdnMediaToken {
|
|
8
|
+
token: string;
|
|
9
|
+
expiresAtMs: number;
|
|
10
|
+
}
|
|
11
|
+
interface MagicCdnApi {
|
|
12
|
+
getMediaToken(): Promise<MagicCdnMediaToken>;
|
|
13
|
+
}
|
|
7
14
|
interface SpawnClientSDK__V1<TConfig = any> {
|
|
8
15
|
ready(): Promise<void>;
|
|
9
16
|
user: {
|
|
@@ -96,6 +103,7 @@ interface SpawnClientSDK__V1<TConfig = any> {
|
|
|
96
103
|
error?: string;
|
|
97
104
|
}>;
|
|
98
105
|
};
|
|
106
|
+
magicCdn: MagicCdnApi;
|
|
99
107
|
}
|
|
100
108
|
interface SpawnServerSDK__V1<TConfig = any> {
|
|
101
109
|
user: {
|
package/package.json
CHANGED
package/src/v1.ts
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
* Future modules: friends, achievements, chat, ai, leaderboards, tournaments
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
interface MagicCdnMediaToken {
|
|
9
|
+
token: string;
|
|
10
|
+
expiresAtMs: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface MagicCdnApi {
|
|
14
|
+
getMediaToken(): Promise<MagicCdnMediaToken>;
|
|
15
|
+
}
|
|
16
|
+
|
|
8
17
|
// Client SDK - available in browser
|
|
9
18
|
export interface SpawnClientSDK__V1<TConfig = any> {
|
|
10
19
|
ready(): Promise<void>;
|
|
@@ -113,6 +122,8 @@ export interface SpawnClientSDK__V1<TConfig = any> {
|
|
|
113
122
|
error?: string;
|
|
114
123
|
}>;
|
|
115
124
|
};
|
|
125
|
+
|
|
126
|
+
magicCdn: MagicCdnApi;
|
|
116
127
|
}
|
|
117
128
|
|
|
118
129
|
// Server SDK - available in Durable Objects
|