@@ -5,10 +5,157 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
77## [ 3.0.0] - 2025-04-23
8- - Implementation of new file system
9- - Folders are now represented by ids and will have parents of their own
10- - File Item and Folder Item have new values with more information
11- - Categories are represented by ids, they can be found by name
8+
9+ ### 🆕 New Features
10+
11+ #### File System Overhaul
12+ - ** Complete file system redesign** with hierarchical folder structure
13+ - ** New File.Item class** with comprehensive metadata:
14+ - ` file_id ` : Unique file identifier
15+ - ` file_name ` : Name of the file
16+ - ` url ` : Download URL for the file
17+ - ` created_by ` : ID of user who created the file
18+ - ` last_modified ` : Last modification timestamp
19+ - ` file_type ` : File type information (dict with fileTypeId and name)
20+ - ` file_category ` : Optional file category (can be null)
21+ - ` size ` : File size as string
22+ - ` created_at ` : Creation timestamp
23+ - ` status ` : File status (e.g., "uploaded")
24+ - ` duration ` : Optional file duration (can be null)
25+
26+ #### New Folder System
27+ - ** New Folder.Item class** with hierarchical structure:
28+ - ` folder_id ` : Unique folder identifier
29+ - ` folder_name ` : Name of the folder
30+ - ` parent_folder_id ` : Parent folder ID (empty string for root)
31+ - ` created_by ` : ID of user who created the folder
32+ - ` last_modified ` : Optional last modification timestamp (can be null)
33+ - ` created_at ` : Creation timestamp
34+ - ** New Folder.ListResponse class** for folder listing operations
35+ - ** New Folder.get_root_folder_id()** method to get root folder ID
36+
37+ #### Enhanced File Operations
38+ - ** Improved file upload process** with automatic polling for completion
39+ - ** Timeout handling** using ` TIMEOUT_THRESHOLD_S ` for upload operations
40+ - ** Better error handling** with specific error messages for upload failures
41+
42+ ### 🔄 API Changes
43+
44+ #### File.create() Method
45+ - ** BREAKING CHANGE** : Parameter names updated to snake_case:
46+ - ` localPath ` → ` local_path `
47+ - ` uploadPath ` → ` file_name `
48+ - ` fileType ` → ** REMOVED** (no longer needed)
49+ - ** New parameter** : ` folder_id ` (Optional[ UUID] ) for specifying upload location
50+ - ** Enhanced behavior** : Now polls for upload completion and returns complete file metadata
51+
52+ #### File.get() Method
53+ - ** BREAKING CHANGE** : Parameter name updated:
54+ - ` fileId ` → ` file_id `
55+
56+ #### File.delete() Method
57+ - ** BREAKING CHANGE** : Parameter names updated:
58+ - ` fileId ` → ` file_id `
59+ - ` folderId ` → ` folder_id ` (optional, defaults to root folder)
60+ - ** Return type change** : Now returns ` None ` instead of ` APIResponseItem `
61+
62+ #### File.Item Attributes
63+ - ** BREAKING CHANGE** : All attribute names updated to snake_case:
64+ - ` fileId ` → ` file_id `
65+ - ` fileName ` → ` file_name `
66+ - ` createdBy ` → ` created_by `
67+ - ` lastModified ` → ` last_modified `
68+ - ` fileType ` → ` file_type `
69+ - ` fileCategory ` → ` file_category `
70+ - ` createdAt ` → ` created_at `
71+
72+ #### File.Item.download() Method
73+ - ** BREAKING CHANGE** : Now requires ` fileName ` parameter (no longer optional)
74+
75+ ### 🗑️ Removed Features
76+
77+ #### Deprecated Methods
78+ - ** File.modify()** - Completely removed
79+ - ** File.get_file_categories()** - Completely removed
80+ - ** File.get_category_id_by_name()** - Completely removed
81+ - ** File.Item.delete()** - Instance method removed (use static method instead)
82+
83+ #### Deprecated Classes
84+ - ** Media class** - Completely removed
85+ - ** File.List class** - Replaced with Folder.ListResponse
86+ - ** Folder.List class** - Replaced with Folder.ListResponse
87+
88+ #### Deprecated Inheritance
89+ - ** File.Item** no longer inherits from ` APIResponseItem `
90+ - ** Folder.Item** no longer inherits from ` APIResponseItem `
91+
92+ ### 🔧 Technical Improvements
93+
94+ #### Code Quality
95+ - ** Comprehensive docstrings** added to all methods and classes (PEP 257 compliant)
96+ - ** Type hints** improved throughout the codebase
97+ - ** Better error messages** with more descriptive exceptions
98+ - ** Fixed typos** in error messages ("eixst" → "exist")
99+
100+ #### Upload Process
101+ - ** Fixed upload polling logic** with proper timeout handling
102+ - ** Added mime_type parameter** to ` send_upload_request ` calls
103+ - ** Improved upload status checking** with proper boolean logic
104+
105+ ### 📝 Migration Guide
106+
107+ #### For File Operations
108+ ``` python
109+ # OLD
110+ file = File.create(localPath = " file.mp3" , uploadPath = " name.mp3" , fileType = " audio" )
111+ file_id = file .fileId
112+ file .delete(fileId = file_id, folderId = folder_id)
113+
114+ # NEW
115+ file = File.create(local_path = " file.mp3" , file_name = " name.mp3" , folder_id = folder_id)
116+ file_id = file .file_id
117+ File.delete(file_id = file_id, folder_id = folder_id)
118+ ```
119+
120+ #### For Folder Operations
121+ ``` python
122+ # OLD
123+ root = Folder.get_root() # Returns Folder.Item
124+ folder_id = root.current_path_chain[" folderId" ]
125+
126+ # NEW
127+ folder_id = Folder.get_root_folder_id() # Returns string directly
128+ ```
129+
130+ #### For File Item Access
131+ ``` python
132+ # OLD
133+ file_id = file .fileId
134+ file_name = file .fileName
135+
136+ # NEW
137+ file_id = file .file_id
138+ file_name = file .file_name
139+ ```
140+
141+ ### ⚠️ Breaking Changes Summary
142+
143+ 1 . ** All parameter names** changed from camelCase to snake_case
144+ 2 . ** All attribute names** changed from camelCase to snake_case
145+ 3 . ** File.modify()** method completely removed
146+ 4 . ** File.Item.delete()** instance method removed
147+ 5 . ** Media class** completely removed
148+ 6 . ** File.List and Folder.List** classes removed
149+ 7 . ** Inheritance from APIResponseItem** removed for Item classes
150+ 8 . ** File.create()** now requires ` fileName ` parameter in download method
151+ 9 . ** Return types** changed for some methods (e.g., delete returns None)
152+
153+ ### 🧪 Testing
154+
155+ - ** All existing tests updated** to work with new API
156+ - ** New test patterns** for folder operations
157+ - ** Conditional test skipping** for staging environment
158+ - ** Improved test coverage** for new file system features
12159
13160## [ 2.10.1] - 2025-02-24
14161- Fixed logic that removed 0 float values from payload
0 commit comments