@spawnco/sdk-types 0.0.42 → 0.0.44

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,9 +11,21 @@ interface MagicCdnMediaToken {
11
11
  interface MagicCdnApi {
12
12
  getMediaToken(): Promise<MagicCdnMediaToken>;
13
13
  }
14
- type ClipFormat = 'gif' | 'webm';
14
+ type ClipFormat = 'gif' | 'webm' | 'mp4';
15
15
  type ClipKind = 'world' | (string & {});
16
16
  type ClipStatus = 'ready' | 'processing' | 'hidden';
17
+ interface ClipThumbnailDescriptor {
18
+ assetUrl: string;
19
+ contentType: string;
20
+ width: number;
21
+ height: number;
22
+ fileSizeBytes?: number;
23
+ capturedAtMs?: number;
24
+ sourceOffsetMs?: number;
25
+ score?: number;
26
+ dominantColor?: string;
27
+ metadata?: Record<string, unknown>;
28
+ }
17
29
  interface ClipDescriptor {
18
30
  clipId: string;
19
31
  kind: ClipKind;
@@ -30,6 +42,7 @@ interface ClipDescriptor {
30
42
  metadata?: Record<string, unknown>;
31
43
  createdAtMs: number;
32
44
  updatedAtMs: number;
45
+ thumbnail?: ClipThumbnailDescriptor;
33
46
  }
34
47
  interface ClipLookupOptions {
35
48
  clipId: string;
@@ -50,6 +63,17 @@ interface UploadClipOptions {
50
63
  height?: number;
51
64
  metadata?: Record<string, unknown>;
52
65
  signal?: AbortSignal;
66
+ thumbnail?: {
67
+ blob: Blob;
68
+ contentType?: string;
69
+ width?: number;
70
+ height?: number;
71
+ capturedAtMs?: number;
72
+ sourceOffsetMs?: number;
73
+ score?: number;
74
+ dominantColor?: string;
75
+ metadata?: Record<string, unknown>;
76
+ };
53
77
  }
54
78
  interface SpawnClientSDK__V1<TConfig = any> {
55
79
  ready(): Promise<void>;
@@ -314,4 +338,4 @@ interface LeaderboardEntry {
314
338
  type SpawnClientSDK__V0<TConfig = any> = Omit<SpawnClientSDK__V1<TConfig>, 'economy'>;
315
339
  type SpawnServerSDK__V0<TConfig = any> = Omit<SpawnServerSDK__V1<TConfig>, 'economy' | 'room'>;
316
340
 
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 };
341
+ export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, ClipThumbnailDescriptor, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, SpawnClientSDK__V0, SpawnClientSDK__V1, SpawnServerSDK__V0, SpawnServerSDK__V1, TokenPayload, UploadClipOptions, User };
package/dist/index.d.ts CHANGED
@@ -11,9 +11,21 @@ interface MagicCdnMediaToken {
11
11
  interface MagicCdnApi {
12
12
  getMediaToken(): Promise<MagicCdnMediaToken>;
13
13
  }
14
- type ClipFormat = 'gif' | 'webm';
14
+ type ClipFormat = 'gif' | 'webm' | 'mp4';
15
15
  type ClipKind = 'world' | (string & {});
16
16
  type ClipStatus = 'ready' | 'processing' | 'hidden';
17
+ interface ClipThumbnailDescriptor {
18
+ assetUrl: string;
19
+ contentType: string;
20
+ width: number;
21
+ height: number;
22
+ fileSizeBytes?: number;
23
+ capturedAtMs?: number;
24
+ sourceOffsetMs?: number;
25
+ score?: number;
26
+ dominantColor?: string;
27
+ metadata?: Record<string, unknown>;
28
+ }
17
29
  interface ClipDescriptor {
18
30
  clipId: string;
19
31
  kind: ClipKind;
@@ -30,6 +42,7 @@ interface ClipDescriptor {
30
42
  metadata?: Record<string, unknown>;
31
43
  createdAtMs: number;
32
44
  updatedAtMs: number;
45
+ thumbnail?: ClipThumbnailDescriptor;
33
46
  }
34
47
  interface ClipLookupOptions {
35
48
  clipId: string;
@@ -50,6 +63,17 @@ interface UploadClipOptions {
50
63
  height?: number;
51
64
  metadata?: Record<string, unknown>;
52
65
  signal?: AbortSignal;
66
+ thumbnail?: {
67
+ blob: Blob;
68
+ contentType?: string;
69
+ width?: number;
70
+ height?: number;
71
+ capturedAtMs?: number;
72
+ sourceOffsetMs?: number;
73
+ score?: number;
74
+ dominantColor?: string;
75
+ metadata?: Record<string, unknown>;
76
+ };
53
77
  }
54
78
  interface SpawnClientSDK__V1<TConfig = any> {
55
79
  ready(): Promise<void>;
@@ -314,4 +338,4 @@ interface LeaderboardEntry {
314
338
  type SpawnClientSDK__V0<TConfig = any> = Omit<SpawnClientSDK__V1<TConfig>, 'economy'>;
315
339
  type SpawnServerSDK__V0<TConfig = any> = Omit<SpawnServerSDK__V1<TConfig>, 'economy' | 'room'>;
316
340
 
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 };
341
+ export type { ClipDescriptor, ClipFormat, ClipKind, ClipListOptions, ClipLookupOptions, ClipStatus, ClipThumbnailDescriptor, InventoryItem, Item, LeaderboardEntry, Room, RoomInfo, RoomVisibility, 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.42",
3
+ "version": "0.0.44",
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
@@ -14,10 +14,23 @@ interface MagicCdnApi {
14
14
  getMediaToken(): Promise<MagicCdnMediaToken>;
15
15
  }
16
16
 
17
- export type ClipFormat = 'gif' | 'webm';
17
+ 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 ClipThumbnailDescriptor {
22
+ assetUrl: string;
23
+ contentType: string;
24
+ width: number;
25
+ height: number;
26
+ fileSizeBytes?: number;
27
+ capturedAtMs?: number;
28
+ sourceOffsetMs?: number;
29
+ score?: number;
30
+ dominantColor?: string;
31
+ metadata?: Record<string, unknown>;
32
+ }
33
+
21
34
  export interface ClipDescriptor {
22
35
  clipId: string;
23
36
  kind: ClipKind;
@@ -34,6 +47,7 @@ export interface ClipDescriptor {
34
47
  metadata?: Record<string, unknown>;
35
48
  createdAtMs: number;
36
49
  updatedAtMs: number;
50
+ thumbnail?: ClipThumbnailDescriptor;
37
51
  }
38
52
 
39
53
  export interface ClipLookupOptions {
@@ -57,6 +71,17 @@ export interface UploadClipOptions {
57
71
  height?: number;
58
72
  metadata?: Record<string, unknown>;
59
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
+ };
60
85
  }
61
86
 
62
87
  // Client SDK - available in browser