Commit 3b8c84f
committed
refactor: replace hand-rolled HTTP client with cozy-stack-client
The StackClient interface is unchanged — consumer.ts, migration.ts,
and tracking.ts are unmodified. Only the internals of createStackClient
now delegate to cozy-stack-client:
- listNextcloudDir → NextcloudFilesCollection.find()
- transferFile → NextcloudFilesCollection.moveToCozy(copy: true)
- createDir → FileCollection.createDirectory()
- getDiskUsage → SettingsCollection.get('io.cozy.settings.disk-usage')
- getTrackingDoc → DocumentCollection.get()
- updateTrackingDoc → DocumentCollection.update()
- Token refresh → withTokenRefresh wrapper calling setToken()
Added cozy-stack-client.d.ts for type declarations (the library
ships no TypeScript types).1 parent e8bac70 commit 3b8c84f
5 files changed
Lines changed: 12811 additions & 1377 deletions
0 commit comments