@spawnco/sdk-types 0.0.43 → 0.0.45

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
@@ -14,6 +14,26 @@ interface MagicCdnApi {
14
14
  type ClipFormat = 'gif' | 'webm' | 'mp4';
15
15
  type ClipKind = 'world' | (string & {});
16
16
  type ClipStatus = 'ready' | 'processing' | 'hidden';
17
+ interface SoundSettings {
18
+ master: number;
19
+ music: number;
20
+ sfx: number;
21
+ ui: number;
22
+ ambience: number;
23
+ voice: number;
24
+ }
25
+ interface ClipThumbnailDescriptor {
26
+ assetUrl: string;
27
+ contentType: string;
28
+ width: number;
29
+ height: number;
30
+ fileSizeBytes?: number;
31
+ capturedAtMs?: number;
32
+ sourceOffsetMs?: number;
33
+ score?: number;
34
+ dominantColor?: string;
35
+ metadata?: Record<string, unknown>;
36
+ }
17
37
  interface ClipDescriptor {
18
38
  clipId: string;
19
39
  kind: ClipKind;
@@ -30,6 +50,7 @@ interface ClipDescriptor {
30
50
  metadata?: Record<string, unknown>;
31
51
  createdAtMs: number;
32
52
  updatedAtMs: number;
53
+ thumbnail?: ClipThumbnailDescriptor;
33
54
  }
34
55
  interface ClipLookupOptions {
35
56
  clipId: string;
@@ -50,6 +71,17 @@ interface UploadClipOptions {
50
71
  height?: number;
51
72
  metadata?: Record<string, unknown>;
52
73
  signal?: AbortSignal;
74
+ thumbnail?: {
75
+ blob: Blob;
76
+ contentType?: string;
77
+ width?: number;
78
+ height?: number;
79
+ capturedAtMs?: number;
80
+ sourceOffsetMs?: number;
81
+ score?: number;
82
+ dominantColor?: string;
83
+ metadata?: Record<string, unknown>;
84
+ };
53
85
  }
54
86
  interface SpawnClientSDK__V1<TConfig = any> {
55
87
  ready(): Promise<void>;
@@ -150,6 +182,9 @@ interface SpawnClientSDK__V1<TConfig = any> {
150
182
  }>;
151
183
  };
152
184
  magicCdn: MagicCdnApi;
185
+ sound: {
186
+ get(): Promise<SoundSettings>;
187
+ };
153
188
  }
154
189
  interface SpawnServerSDK__V1<TConfig = any> {
155
190
  user: {
@@ -314,4 +349,4 @@ interface LeaderboardEntry {
314
349
  type SpawnClientSDK__V0<TConfig = any> = Omit<SpawnClientSDK__V1<TConfig>, 'economy'>;
315
350
  type SpawnServerSDK__V0<TConfig = any> = Omit<SpawnServerSDK__V1<TConfig>, 'economy' | 'room'>;
316
351
 
317
- export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, TokenPayload, UploadClipOptions, User };
352
+ export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, ClipThumbnailDescriptor, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, SoundSettings, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, TokenPayload, UploadClipOptions, User };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,26 @@ interface MagicCdnApi {
14
14
  type ClipFormat = 'gif' | 'webm' | 'mp4';
15
15
  type ClipKind = 'world' | (string & {});
16
16
  type ClipStatus = 'ready' | 'processing' | 'hidden';
17
+ interface SoundSettings {
18
+ master: number;
19
+ music: number;
20
+ sfx: number;
21
+ ui: number;
22
+ ambience: number;
23
+ voice: number;
24
+ }
25
+ interface ClipThumbnailDescriptor {
26
+ assetUrl: string;
27
+ contentType: string;
28
+ width: number;
29
+ height: number;
30
+ fileSizeBytes?: number;
31
+ capturedAtMs?: number;
32
+ sourceOffsetMs?: number;
33
+ score?: number;
34
+ dominantColor?: string;
35
+ metadata?: Record<string, unknown>;
36
+ }
17
37
  interface ClipDescriptor {
18
38
  clipId: string;
19
39
  kind: ClipKind;
@@ -30,6 +50,7 @@ interface ClipDescriptor {
30
50
  metadata?: Record<string, unknown>;
31
51
  createdAtMs: number;
32
52
  updatedAtMs: number;
53
+ thumbnail?: ClipThumbnailDescriptor;
33
54
  }
34
55
  interface ClipLookupOptions {
35
56
  clipId: string;
@@ -50,6 +71,17 @@ interface UploadClipOptions {
50
71
  height?: number;
51
72
  metadata?: Record<string, unknown>;
52
73
  signal?: AbortSignal;
74
+ thumbnail?: {
75
+ blob: Blob;
76
+ contentType?: string;
77
+ width?: number;
78
+ height?: number;
79
+ capturedAtMs?: number;
80
+ sourceOffsetMs?: number;
81
+ score?: number;
82
+ dominantColor?: string;
83
+ metadata?: Record<string, unknown>;
84
+ };
53
85
  }
54
86
  interface SpawnClientSDK__V1<TConfig = any> {
55
87
  ready(): Promise<void>;
@@ -150,6 +182,9 @@ interface SpawnClientSDK__V1<TConfig = any> {
150
182
  }>;
151
183
  };
152
184
  magicCdn: MagicCdnApi;
185
+ sound: {
186
+ get(): Promise<SoundSettings>;
187
+ };
153
188
  }
154
189
  interface SpawnServerSDK__V1<TConfig = any> {
155
190
  user: {
@@ -314,4 +349,4 @@ interface LeaderboardEntry {
314
349
  type SpawnClientSDK__V0<TConfig = any> = Omit<SpawnClientSDK__V1<TConfig>, 'economy'>;
315
350
  type SpawnServerSDK__V0<TConfig = any> = Omit<SpawnServerSDK__V1<TConfig>, 'economy' | 'room'>;
316
351
 
317
- export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, TokenPayload, UploadClipOptions, User };
352
+ export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, ClipThumbnailDescriptor, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, SoundSettings, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, TokenPayload, UploadClipOptions, User };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
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
@@ -18,6 +18,28 @@ export type ClipFormat = 'gif' | 'webm' | 'mp4';
18
18
  export type ClipKind = 'world' | (string & {});
19
19
  export type ClipStatus = 'ready' | 'processing' | 'hidden';
20
20
 
21
+ export interface SoundSettings {
22
+ master: number; // 0-1
23
+ music: number; // 0-1
24
+ sfx: number; // 0-1
25
+ ui: number; // 0-1
26
+ ambience: number; // 0-1
27
+ voice: number; // 0-1
28
+ }
29
+
30
+ export interface ClipThumbnailDescriptor {
31
+ assetUrl: string;
32
+ contentType: string;
33
+ width: number;
34
+ height: number;
35
+ fileSizeBytes?: number;
36
+ capturedAtMs?: number;
37
+ sourceOffsetMs?: number;
38
+ score?: number;
39
+ dominantColor?: string;
40
+ metadata?: Record<string, unknown>;
41
+ }
42
+
21
43
  export interface ClipDescriptor {
22
44
  clipId: string;
23
45
  kind: ClipKind;
@@ -34,6 +56,7 @@ export interface ClipDescriptor {
34
56
  metadata?: Record<string, unknown>;
35
57
  createdAtMs: number;
36
58
  updatedAtMs: number;
59
+ thumbnail?: ClipThumbnailDescriptor;
37
60
  }
38
61
 
39
62
  export interface ClipLookupOptions {
@@ -57,6 +80,17 @@ export interface UploadClipOptions {
57
80
  height?: number;
58
81
  metadata?: Record<string, unknown>;
59
82
  signal?: AbortSignal;
83
+ thumbnail?: {
84
+ blob: Blob;
85
+ contentType?: string;
86
+ width?: number;
87
+ height?: number;
88
+ capturedAtMs?: number;
89
+ sourceOffsetMs?: number;
90
+ score?: number;
91
+ dominantColor?: string;
92
+ metadata?: Record<string, unknown>;
93
+ };
60
94
  }
61
95
 
62
96
  // Client SDK - available in browser
@@ -176,6 +210,10 @@ export interface SpawnClientSDK__V1<TConfig = any> {
176
210
  };
177
211
 
178
212
  magicCdn: MagicCdnApi;
213
+
214
+ sound: {
215
+ get(): Promise<SoundSettings>;
216
+ };
179
217
  }
180
218
 
181
219
  // Server SDK - available in Durable Objects