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 would have expected the .project() property to be set in the BitwardenClient class similar to .secret()
I would also assume that a new ProjectsClient class will be needed similar to the SecretsClient class found in crates/bitwarden-napi/src-ts/bitwarden_client/index.ts
Actual Result
There is currently not a easy supported method to get project information like there is for secrets.
Screenshots or Videos
No response
Additional Context
The relavant information needed to successfully run the commands is in the schema file.
So the following works to list the projects.
const{ BitwardenClient }=require("@bitwarden/sdk-napi");const{
Convert,}=require("@bitwarden/sdk-napi/dist/bitwarden_client/schemas");asyncfunctionmain(){constorganizationId=process.env.BWS_ORG_ID;constaccessToken=process.env.BWS_ACCESS_TOKEN;if(typeoforganizationId!=="string"||!organizationId||typeofaccessToken!=="string"||!accessToken){thrownewError("Missing required environment variables");}// setup the bitwarden secrets managerconstsettings={};constclient=newBitwardenClient(settings);constresult=awaitclient.loginWithAccessToken(accessToken);if(!result.success){thrownewError("Failed to login with access token");}constcmdResult=awaitclient.client.runCommand(Convert.commandToJson({projects: {list: {
organizationId,},},}));constlist=Convert.toResponseForProjectsResponse(cmdResult).data;console.log(list);}main();
I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
The text was updated successfully, but these errors were encountered:
Steps To Reproduce
npm i @bitwarden/sdk-napi
Expected Result
I would have expected the .project() property to be set in the BitwardenClient class similar to .secret()
I would also assume that a new ProjectsClient class will be needed similar to the SecretsClient class found in
crates/bitwarden-napi/src-ts/bitwarden_client/index.ts
Actual Result
There is currently not a easy supported method to get project information like there is for secrets.
Screenshots or Videos
No response
Additional Context
The relavant information needed to successfully run the commands is in the schema file.
So the following works to list the projects.
More Detailed Version Info
Operating System
Linux
Operating System Version
Pop!_OS 22.04 LTS
Build Version
@0.3.1
Issue Tracking Info
The text was updated successfully, but these errors were encountered: