You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a single item in a vault, which is a Secure Note containing a JSON blob. I'm attempting to use opClient.items.get(vaultId, itemId) to retrieve the value in the note. This is the relevant part of my code:
const vaultId = process.env[`${env.toUpperCase()}_SENDGRID_VAULT_ID`]!;
const itemId = process.env[`${env.toUpperCase()}_SENDGRID_ITEM_ID`]!;
const item = await onepasswordClient.items.get(vaultId, itemId);
const notesField = item.fields?.find(field => field.id == 'notesPlain');
console.log('ITEM:', item)
if (!notesField?.value) {
throw new Error('Notes field not found or empty');
}
const onePasswordParameters = JSON.parse(notesField.value) as Record<string, string>;
Actual Behavior
When I use the CLI to get the item (with the --format json flag), I see:
I would expect the same fields returned by the CLI to be returned by the SDK. The item is clearly defined and is being correctly fetched from 1Password, but the fields are just empty.
SDK version
0.1.2 (downgraded after first encountering the issue on 0.1.4)
Additional information
I'm initializing my client using the createClient method like so:
Hello @dillon-brock, 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.
Scenario & Reproduction Steps
I have a single item in a vault, which is a Secure Note containing a JSON blob. I'm attempting to use
opClient.items.get(vaultId, itemId)
to retrieve the value in the note. This is the relevant part of my code:Actual Behavior
When I use the CLI to get the item (with the
--format json
flag), I see:And without the json flag, I see:
However, when I log the item in my code, I see the following:
Expected Behavior
I would expect the same fields returned by the CLI to be returned by the SDK. The item is clearly defined and is being correctly fetched from 1Password, but the fields are just empty.
SDK version
0.1.2 (downgraded after first encountering the issue on 0.1.4)
Additional information
I'm initializing my client using the
createClient
method like so:The text was updated successfully, but these errors were encountered: