lumiverse-spindle-types 0.4.30 → 0.4.31
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/package.json +1 -1
- package/src/api.ts +10 -0
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +2 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -293,6 +293,15 @@ export interface CharacterUpdateDTO {
|
|
|
293
293
|
world_book_ids?: string[];
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
+
export interface CharacterAvatarUploadDTO {
|
|
297
|
+
/** Raw avatar bytes. Extensions can source these from fetch(), storage, etc. */
|
|
298
|
+
data: Uint8Array;
|
|
299
|
+
/** Optional filename used to preserve the extension/MIME when storing the image. */
|
|
300
|
+
filename?: string;
|
|
301
|
+
/** Optional content type for the uploaded avatar. Defaults to image/png. */
|
|
302
|
+
mime_type?: string;
|
|
303
|
+
}
|
|
304
|
+
|
|
296
305
|
// ─── Chat DTOs ──────────────────────────────────────────────────────────
|
|
297
306
|
|
|
298
307
|
/**
|
|
@@ -1288,6 +1297,7 @@ export type WorkerToHost =
|
|
|
1288
1297
|
| { type: "characters_list"; requestId: string; limit?: number; offset?: number; userId?: string }
|
|
1289
1298
|
| { type: "characters_get"; requestId: string; characterId: string; userId?: string }
|
|
1290
1299
|
| { type: "characters_create"; requestId: string; input: CharacterCreateDTO; userId?: string }
|
|
1300
|
+
| { type: "characters_set_avatar"; requestId: string; characterId: string; avatar: CharacterAvatarUploadDTO; userId?: string }
|
|
1291
1301
|
| { type: "characters_update"; requestId: string; characterId: string; input: CharacterUpdateDTO; userId?: string }
|
|
1292
1302
|
| { type: "characters_delete"; requestId: string; characterId: string; userId?: string }
|
|
1293
1303
|
// ─── Chats (gated: "chats") ────────────────────────────────────────
|
package/src/index.ts
CHANGED
package/src/spindle-api.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
PermissionChangedDetail,
|
|
12
12
|
CharacterDTO,
|
|
13
13
|
CharacterCreateDTO,
|
|
14
|
+
CharacterAvatarUploadDTO,
|
|
14
15
|
CharacterUpdateDTO,
|
|
15
16
|
ChatDTO,
|
|
16
17
|
ChatUpdateDTO,
|
|
@@ -561,6 +562,7 @@ export interface SpindleAPI {
|
|
|
561
562
|
list(options?: { limit?: number; offset?: number; userId?: string }): Promise<{ data: CharacterDTO[]; total: number }>;
|
|
562
563
|
get(characterId: string, userId?: string): Promise<CharacterDTO | null>;
|
|
563
564
|
create(input: CharacterCreateDTO, userId?: string): Promise<CharacterDTO>;
|
|
565
|
+
setAvatar(characterId: string, avatar: CharacterAvatarUploadDTO, userId?: string): Promise<CharacterDTO>;
|
|
564
566
|
update(characterId: string, input: CharacterUpdateDTO, userId?: string): Promise<CharacterDTO>;
|
|
565
567
|
delete(characterId: string, userId?: string): Promise<boolean>;
|
|
566
568
|
};
|