lumiverse-spindle-types 0.5.28 → 0.5.29
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 +7 -0
- package/src/index.ts +1 -0
- package/src/spindle-api.ts +12 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -2347,6 +2347,13 @@ export interface TokenCountResultDTO {
|
|
|
2347
2347
|
approximate: boolean;
|
|
2348
2348
|
}
|
|
2349
2349
|
|
|
2350
|
+
/** A completed resumable upload read back by `spindle.uploads.get`. */
|
|
2351
|
+
export interface SpindleUploadDTO {
|
|
2352
|
+
fileName: string;
|
|
2353
|
+
size: number;
|
|
2354
|
+
data: Uint8Array;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2350
2357
|
/** Context delivered to an on-request shared RPC endpoint handler. */
|
|
2351
2358
|
export interface SharedRpcRequestContextDTO {
|
|
2352
2359
|
/** Fully-qualified endpoint name (for example `weather_ext.status.current`). */
|
package/src/index.ts
CHANGED
package/src/spindle-api.ts
CHANGED
|
@@ -100,6 +100,7 @@ import type {
|
|
|
100
100
|
StreamChunkDTO,
|
|
101
101
|
TokenCountOptionsDTO,
|
|
102
102
|
TokenCountResultDTO,
|
|
103
|
+
SpindleUploadDTO,
|
|
103
104
|
MacroInterceptorCtxDTO,
|
|
104
105
|
MacroInterceptorResultDTO,
|
|
105
106
|
WorldInfoInterceptorCtxDTO,
|
|
@@ -719,6 +720,17 @@ export interface SpindleAPI {
|
|
|
719
720
|
countChat(chatId: string, options?: TokenCountOptionsDTO): Promise<TokenCountResultDTO>;
|
|
720
721
|
};
|
|
721
722
|
|
|
723
|
+
/**
|
|
724
|
+
* Resumable uploads (free tier). Consume a file the user streamed to the host
|
|
725
|
+
* tus endpoint (`/api/v1/spindle-uploads`), scoped to this extension + user.
|
|
726
|
+
*/
|
|
727
|
+
uploads: {
|
|
728
|
+
/** Read a completed upload's bytes. Null if missing, expired, or not owned by this extension + user. */
|
|
729
|
+
get(uploadId: string, userId?: string): Promise<SpindleUploadDTO | null>;
|
|
730
|
+
/** Delete a staged upload once consumed. Returns false if it was already gone. */
|
|
731
|
+
delete(uploadId: string, userId?: string): Promise<boolean>;
|
|
732
|
+
};
|
|
733
|
+
|
|
722
734
|
/**
|
|
723
735
|
* Image generation (permission: "image_gen").
|
|
724
736
|
* Generate images via the user's configured image gen connection profiles.
|