@elizaos/plugin-elizacloud 1.7.0-alpha.0 → 1.7.2
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/browser/index.browser.js +3 -3
- package/dist/browser/index.browser.js.map +10 -12
- package/dist/cjs/index.node.cjs +113 -611
- package/dist/cjs/index.node.js.map +10 -16
- package/dist/index.browser.d.ts +2 -16
- package/dist/index.d.ts +0 -11
- package/dist/models/image.d.ts +6 -8
- package/dist/models/object.d.ts +2 -3
- package/dist/models/text.d.ts +11 -3
- package/dist/node/index.node.js +114 -612
- package/dist/node/index.node.js.map +10 -16
- package/package.json +8 -18
- package/dist/database/adapter.d.ts +0 -27
- package/dist/database/direct-adapter.d.ts +0 -31
- package/dist/database/index.d.ts +0 -14
- package/dist/database/schema.d.ts +0 -11
- package/dist/database/types.d.ts +0 -22
- package/dist/storage/index.d.ts +0 -8
- package/dist/storage/service.d.ts +0 -62
- package/dist/storage/types.d.ts +0 -44
package/dist/storage/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ElizaOS Cloud Storage Module
|
|
3
|
-
*
|
|
4
|
-
* Provides file storage capabilities via ElizaOS Cloud.
|
|
5
|
-
* Supports uploading, downloading, and listing files.
|
|
6
|
-
*/
|
|
7
|
-
export { CloudStorageService, createCloudStorageService } from "./service";
|
|
8
|
-
export type { CloudStorageConfig, StorageUploadResult, StorageListResult, StorageItem, } from "./types";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Storage Service
|
|
3
|
-
*
|
|
4
|
-
* Provides file storage operations via ElizaOS Cloud API.
|
|
5
|
-
* Uses credit-based authenticated storage endpoints.
|
|
6
|
-
*
|
|
7
|
-
* Storage costs are deducted from your credit balance automatically.
|
|
8
|
-
* - Upload: ~$0.01 per MB (minimum $0.001)
|
|
9
|
-
* - Download: Free for your own files
|
|
10
|
-
* - Delete: Free for your own files
|
|
11
|
-
*/
|
|
12
|
-
import type { CloudStorageConfig, StorageUploadResult, StorageListResult, StorageUploadOptions } from "./types";
|
|
13
|
-
/**
|
|
14
|
-
* Creates a cloud storage service instance
|
|
15
|
-
*/
|
|
16
|
-
export declare function createCloudStorageService(config: CloudStorageConfig): CloudStorageService;
|
|
17
|
-
/**
|
|
18
|
-
* Cloud Storage Service for ElizaOS Cloud
|
|
19
|
-
*/
|
|
20
|
-
export declare class CloudStorageService {
|
|
21
|
-
private apiKey;
|
|
22
|
-
private baseUrl;
|
|
23
|
-
constructor(config: CloudStorageConfig);
|
|
24
|
-
/**
|
|
25
|
-
* Upload a file to cloud storage
|
|
26
|
-
*/
|
|
27
|
-
upload(file: Buffer | Blob | File, options?: StorageUploadOptions): Promise<StorageUploadResult>;
|
|
28
|
-
/**
|
|
29
|
-
* Download a file from cloud storage
|
|
30
|
-
* @param id - File ID
|
|
31
|
-
* @param url - Full URL of the file (required for download)
|
|
32
|
-
*/
|
|
33
|
-
download(id: string, url?: string): Promise<Buffer | null>;
|
|
34
|
-
/**
|
|
35
|
-
* List files in cloud storage
|
|
36
|
-
* Lists files owned by your organization
|
|
37
|
-
*/
|
|
38
|
-
list(options?: {
|
|
39
|
-
prefix?: string;
|
|
40
|
-
limit?: number;
|
|
41
|
-
cursor?: string;
|
|
42
|
-
}): Promise<StorageListResult>;
|
|
43
|
-
/**
|
|
44
|
-
* Delete a file from cloud storage
|
|
45
|
-
* @param id - File ID
|
|
46
|
-
* @param url - Full URL of the file (required for deletion)
|
|
47
|
-
*/
|
|
48
|
-
delete(id: string, url?: string): Promise<boolean>;
|
|
49
|
-
/**
|
|
50
|
-
* Get storage stats for your organization
|
|
51
|
-
*/
|
|
52
|
-
getStats(): Promise<{
|
|
53
|
-
totalFiles: number;
|
|
54
|
-
totalSize: number;
|
|
55
|
-
totalSizeGB: number;
|
|
56
|
-
pricing: {
|
|
57
|
-
uploadPerMB: string;
|
|
58
|
-
retrievalPerMB: string;
|
|
59
|
-
minUploadFee: string;
|
|
60
|
-
};
|
|
61
|
-
} | null>;
|
|
62
|
-
}
|
package/dist/storage/types.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Storage Types
|
|
3
|
-
*/
|
|
4
|
-
/** Configuration for cloud storage */
|
|
5
|
-
export interface CloudStorageConfig {
|
|
6
|
-
apiKey: string;
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
}
|
|
9
|
-
/** Result of a storage upload */
|
|
10
|
-
export interface StorageUploadResult {
|
|
11
|
-
success: boolean;
|
|
12
|
-
id?: string;
|
|
13
|
-
url?: string;
|
|
14
|
-
pathname?: string;
|
|
15
|
-
contentType?: string;
|
|
16
|
-
size?: number;
|
|
17
|
-
/** Cost charged for this upload (e.g., "$0.01") */
|
|
18
|
-
cost?: string;
|
|
19
|
-
/** Remaining credit balance after upload (e.g., "$99.99") */
|
|
20
|
-
creditsRemaining?: string;
|
|
21
|
-
error?: string;
|
|
22
|
-
}
|
|
23
|
-
/** A stored item */
|
|
24
|
-
export interface StorageItem {
|
|
25
|
-
id: string;
|
|
26
|
-
url: string;
|
|
27
|
-
pathname: string;
|
|
28
|
-
contentType: string;
|
|
29
|
-
size: number;
|
|
30
|
-
/** ISO timestamp of when the file was uploaded */
|
|
31
|
-
uploadedAt: string;
|
|
32
|
-
}
|
|
33
|
-
/** Result of listing stored items */
|
|
34
|
-
export interface StorageListResult {
|
|
35
|
-
items: StorageItem[];
|
|
36
|
-
cursor?: string;
|
|
37
|
-
hasMore: boolean;
|
|
38
|
-
}
|
|
39
|
-
/** Upload options */
|
|
40
|
-
export interface StorageUploadOptions {
|
|
41
|
-
filename?: string;
|
|
42
|
-
contentType?: string;
|
|
43
|
-
metadata?: Record<string, string>;
|
|
44
|
-
}
|