collection plugin actions + file read/write #324
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Plugin Runtime Types — Collection Actions
Primary use case: export actions or similar for all items in a collection, supporting folders, requests and exposing read/write to provide export (and potentially import)
PR should solve or enable solutions for:
httpCollectionActionsDefine custom actions that appear in folder/workspace context menus.
Field on
PluginDefinition:httpCollectionActions?: HttpCollectionActionPlugin[]HttpCollectionActionPluginshape:label: string— displayed in context menuicon?: Icon— optional icon for the actiononSelect(ctx: Context, args: CallHttpCollectionActionArgs)— called when user invokes the actionCallHttpCollectionActionArgsshape:folder?: Folder— present when action was invoked on a folderworkspace?: Workspace— present when action was invoked on a workspaceNotes:
ctx.folder.list()andctx.httpRequest.list()New Context APIs
ctx.folder.list(args)List all folders in a workspace.
ctx.file.writeText(filePath, content)Write text content to a file.
ctx.file.readText(filePath)Read text content from a file.
ctx.httpRequest.list(args)List all requests in a workspace or folder.
Notes: