1Password/connect-sdk-js

Add `listItemsByTag` and `listItemsByTagContains`

atuttle opened this issue · 0 comments

Summary

The REST api supports searching with tag filters, just like name filters. It would be really useful if we could do that in the JS SDK too.

Use cases

We're writing automations to perform key rotations and update 1password, but we need the flexibility to set the schedule for rotations on the item in 1Password. For example, you might use a tag named rotate:quarterly or something like that. This would make it easy to search for items that need to be rotated during the quarterly rotation.

Proposed Solution

Copy/paste the listItemsByName and listItemsByNameContains functions, and change name to tag.

Is there a workaround to accomplish this today?

Only way to perform this style of search I've found is to interact with the REST api directly. Instead, at the moment, I'm getting all items and then filtering the array by inspecting the tags on every item.