rclone-openapi 1.74.1 → 1.74.2-r1

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
@@ -45,6 +45,9 @@ type ListRemotesResponse = paths['/config/listremotes']['post']['responses']['20
45
45
 
46
46
  // Example: Type for operations
47
47
  type CopyFileParams = operations['operationsCopyfile']['parameters']['query'];
48
+
49
+ // Example: Async operations return 202 with a job ID
50
+ type AsyncJob = components['responses']['AsyncJobResponse']['content']['application/json'];
48
51
  ```
49
52
 
50
53
  Works great with API clients like [**openapi-fetch**](https://openapi-ts.dev/openapi-fetch/):
@@ -55,7 +58,14 @@ import type { paths } from 'rclone-openapi';
55
58
 
56
59
  const client = createClient<paths>({ baseUrl: 'http://localhost:5572' });
57
60
 
61
+ // Synchronous call
58
62
  const { data, error } = await client.POST('/config/listremotes');
63
+
64
+ // Async call — returns 202 with { jobid }
65
+ const { data: job } = await client.POST('/sync/copy', {
66
+ body: { srcFs: 'drive:src', dstFs: 'drive:dst', _async: true },
67
+ headers: { Prefer: 'respond-async' },
68
+ });
59
69
  ```
60
70
 
61
71
  ## Files
@@ -90,5 +100,5 @@ MIT
90
100
  <br />
91
101
 
92
102
  <div align="center">
93
- <sub>Made with ☁️ for the rclone community</sub>
103
+ <sub>Made with ☁️ for the <a href="https://discord.gg/rclone">rclone community</a></sub>
94
104
  </div>