@plugable-io/js 0.0.8 → 0.0.9

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/README.md CHANGED
@@ -106,6 +106,30 @@ const response = await client.list({
106
106
  console.log('Files:', response.files);
107
107
  ```
108
108
 
109
+ #### Ordering Results
110
+
111
+ You can order files by `created_at`, `name`, or `byte_size`. The default ordering is `created_at` in descending order (newest first).
112
+
113
+ ```typescript
114
+ // Order by name (ascending)
115
+ const response = await client.list({
116
+ order_by: 'name',
117
+ order_direction: 'asc'
118
+ });
119
+
120
+ // Order by file size (descending - largest first)
121
+ const response = await client.list({
122
+ order_by: 'byte_size',
123
+ order_direction: 'desc'
124
+ });
125
+
126
+ // Order by creation date (ascending - oldest first)
127
+ const response = await client.list({
128
+ order_by: 'created_at',
129
+ order_direction: 'asc'
130
+ });
131
+ ```
132
+
109
133
  ### Finding a File
110
134
 
111
135
  You can find a single file using `find`. This is a convenience method that searches for files and returns the first match. It's useful for finding files by metadata or other criteria.
package/dist/index.d.mts CHANGED
@@ -33,6 +33,8 @@ interface SearchOptions {
33
33
  page?: number;
34
34
  per_page?: number;
35
35
  with_download_url?: boolean;
36
+ order_by?: 'created_at' | 'name' | 'byte_size';
37
+ order_direction?: 'asc' | 'desc';
36
38
  }
37
39
  interface UploadOptions {
38
40
  metadata?: Record<string, any>;
package/dist/index.d.ts CHANGED
@@ -33,6 +33,8 @@ interface SearchOptions {
33
33
  page?: number;
34
34
  per_page?: number;
35
35
  with_download_url?: boolean;
36
+ order_by?: 'created_at' | 'name' | 'byte_size';
37
+ order_direction?: 'asc' | 'desc';
36
38
  }
37
39
  interface UploadOptions {
38
40
  metadata?: Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugable-io/js",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "JavaScript client for Plugable File Management API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",