bytex-sdk 1.2.0 → 1.3.0

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.
Files changed (2) hide show
  1. package/index.js +15 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -54,11 +54,26 @@ export class BytexCloud {
54
54
  return { success: true, url: `https://bytex.work/v1/${name}` };
55
55
  }
56
56
 
57
+ // Storage: Download file
58
+ async download(name) {
59
+ if (!this.apiKey) throw new Error("API Key Required!");
60
+ console.log(`[ByteX] 📥 Downloading ${name} from Cloud...`);
61
+ // Mock return file buffer
62
+ return { success: true, data: new Blob() };
63
+ }
64
+
57
65
  // Storage: Delete file
58
66
  async delete(name) {
59
67
  if (!this.apiKey) throw new Error("API Key Required!");
60
68
  console.log(`[ByteX] 🗑️ Removing ${name} from Cloud...`);
61
69
  return { success: true };
62
70
  }
71
+
72
+ // Storage: Rename file
73
+ async rename(oldName, newName) {
74
+ if (!this.apiKey) throw new Error("API Key Required!");
75
+ console.log(`[ByteX] ✏️ Renaming ${oldName} to ${newName}...`);
76
+ return { success: true };
77
+ }
63
78
  }
64
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bytex-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {