Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ For example:
+ import { defaultRemoteURL } from '@nextcloud/files/dav'
```

#### File Actions API changes
The `FileAction` API has been changed to provide a more consistent
set of context to the action handlers.
We're now using destructuring objects for the context parameters.
For example:

```diff
type ActionContext = {
nodes: Node[],
view: View,
folder: Folder,
contents: Node[],
}

- action.exec(view: View, folder: Folder, dir: string): Promise<boolean>
+ action.exec({ nodes, view, folder, contents }): Promise<boolean>
```


## 4.0.0-beta.1 - 2025-11-27
### 🐛 Fixed bugs
* fix: actions type exports by @skjnldsv in https://github.com/nextcloud-libraries/nextcloud-files/pull/1381
Expand Down
4 changes: 2 additions & 2 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export type ActionContextSingle = {
nodes: [Node],
view: View,
Comment thread
skjnldsv marked this conversation as resolved.
folder: Folder,
content: Node[],
contents: Node[],
}

export type ActionContext = {
nodes: Node[],
view: View,
folder: Folder,
content: Node[],
contents: Node[],
}

export type ViewActionContext = {
Expand Down