1Password / onepassword-sdk-go

https://developer.1password.com/docs/sdks/
MIT License
52 stars 5 forks source link

Support getting and updating secure notes #136

Open karlpokus opened 2 months ago

karlpokus commented 2 months ago

Scenario & Reproduction Steps

I'm trying to create a Secure note but I can't seem to get the ItemField right. It seems to be kind of a built-in type with no title. Looking at the template I get:

$ op item template get "Secure Note"
{
  "title": "",
  "category": "SECURE_NOTE",
  "fields": [
    {
      "id": "notesPlain",
      "type": "STRING",
      "purpose": "NOTES",
      "label": "notesPlain",
      "value": ""
    }
  ]
}

so I can set the id but how do I set type and label with the sdk?

Actual Behavior

2024/08/20 09:42:37 invalid user input: encountered the following errors: custom field with id 'notesPlain' must be part of a section

What section is this?

Expected Behavior

The Secure note should be created with the value I supplied.

SDK version

v0.1.1

Additional information

No response

Marton6 commented 2 months ago

Hi @karlpokus! Thanks for reaching out about this issue. Getting and updating secure notes of items is not currently supported by the 1Password SDKs, we will look into adding support for this in the future.

karlpokus commented 2 months ago

Maybe I can help? Are you accepting PRs?

hculea commented 2 months ago

Hey @karlpokus,

Thank you for your offer to help out! Appreciate it! Unfortunately this feature requires changes to code that's not (yet) open source. We've build SDKs using a common core that's shared across all programming languages in which we build SDKs. This common core shares a lot of logic with our desktop and mobile applications, as well as the browser extension. The development of this core is currently too coupled to internal processes and our closed source repository (of the apps) to easily open source. While we'd love for this to be available for you and open to contributions, this is not (yet) the case today.

In the meantime, thanks for expressing your interest! This helps for prioritization with our development team.

Thanks again for your willingness to help! 💙

karlpokus commented 2 months ago

No worries. I found a work-around by creating a custom section. It'll do for now.

sadiaazmal commented 2 weeks ago

Hi @karlpokus,

Thank you for sharing your feedback. I'd love to learn more about your need for secure notes support—specifically, what challenges it would help you/your team overcome and how valuable this functionality would be for your workflows.

karlpokus commented 2 weeks ago

Hi @karlpokus,

Thank you for sharing your feedback. I'd love to learn more about your need for secure notes support—specifically, what challenges it would help you/your team overcome and how valuable this functionality would be for your workflows.

Oh it was just something I wanted to build for fun. Not work. Mounting the 1p api to disk with fuse to I can use a common text editor with a 1p backend.