Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions bitwarden_license/bitwarden-sm/src/projects/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ pub(crate) async fn create_project(
});

let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::projects_api::projects_create(
&config.api,
input.organization_id,
project,
)
.await?;
let res = config
.api_client
.projects_api()
.create(input.organization_id, project)
.await?;

ProjectResponse::process_response(res, &mut key_store.context())
}
Expand Down
8 changes: 5 additions & 3 deletions bitwarden_license/bitwarden-sm/src/projects/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ pub(crate) async fn delete_projects(
input: ProjectsDeleteRequest,
) -> Result<ProjectsDeleteResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res =
bitwarden_api_api::apis::projects_api::projects_bulk_delete(&config.api, Some(input.ids))
.await?;
let res = config
.api_client
.projects_api()
.bulk_delete(Some(input.ids))
.await?;

ProjectsDeleteResponse::process_response(res)
}
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/projects/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(crate) async fn get_project(
) -> Result<ProjectResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;

let res = bitwarden_api_api::apis::projects_api::projects_get(&config.api, input.id).await?;
let res = config.api_client.projects_api().get(input.id).await?;

let key_store = client.internal.get_key_store();

Expand Down
10 changes: 5 additions & 5 deletions bitwarden_license/bitwarden-sm/src/projects/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ pub(crate) async fn list_projects(
input: &ProjectsListRequest,
) -> Result<ProjectsResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::projects_api::projects_list_by_organization(
&config.api,
input.organization_id,
)
.await?;
let res = config
.api_client
.projects_api()
.list_by_organization(input.organization_id)
.await?;

let key_store = client.internal.get_key_store();

Expand Down
8 changes: 5 additions & 3 deletions bitwarden_license/bitwarden-sm/src/projects/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ pub(crate) async fn update_project(
});

let config = client.internal.get_api_configurations().await;
let res =
bitwarden_api_api::apis::projects_api::projects_update(&config.api, input.id, project)
.await?;
let res = config
.api_client
.projects_api()
.update(input.id, project)
.await?;

ProjectResponse::process_response(res, &mut key_store.context())
}
Expand Down
11 changes: 5 additions & 6 deletions bitwarden_license/bitwarden-sm/src/secrets/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ pub(crate) async fn create_secret(
};

let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::secrets_api::secrets_create(
&config.api,
input.organization_id,
secret,
)
.await?;
let res = config
.api_client
.secrets_api()
.create(input.organization_id, secret)
.await?;

SecretResponse::process_response(res, &mut key_store.context())
}
Expand Down
8 changes: 5 additions & 3 deletions bitwarden_license/bitwarden-sm/src/secrets/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ pub(crate) async fn delete_secrets(
input: SecretsDeleteRequest,
) -> Result<SecretsDeleteResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res =
bitwarden_api_api::apis::secrets_api::secrets_bulk_delete(&config.api, Some(input.ids))
.await?;
let res = config
.api_client
.secrets_api()
.bulk_delete(Some(input.ids))
.await?;

SecretsDeleteResponse::process_response(res)
}
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/secrets/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) async fn get_secret(
input: &SecretGetRequest,
) -> Result<SecretResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::secrets_api::secrets_get(&config.api, input.id).await?;
let res = config.api_client.secrets_api().get(input.id).await?;

let key_store = client.internal.get_key_store();

Expand Down
8 changes: 5 additions & 3 deletions bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ pub(crate) async fn get_secrets_by_ids(

let config = client.internal.get_api_configurations().await;

let res =
bitwarden_api_api::apis::secrets_api::secrets_get_secrets_by_ids(&config.api, request)
.await?;
let res = config
.api_client
.secrets_api()
.get_secrets_by_ids(request)
.await?;

let key_store = client.internal.get_key_store();

Expand Down
20 changes: 10 additions & 10 deletions bitwarden_license/bitwarden-sm/src/secrets/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ pub(crate) async fn list_secrets(
input: &SecretIdentifiersRequest,
) -> Result<SecretIdentifiersResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::secrets_api::secrets_list_by_organization(
&config.api,
input.organization_id,
)
.await?;
let res = config
.api_client
.secrets_api()
.list_by_organization(input.organization_id)
.await?;

let key_store = client.internal.get_key_store();

Expand All @@ -50,11 +50,11 @@ pub(crate) async fn list_secrets_by_project(
input: &SecretIdentifiersByProjectRequest,
) -> Result<SecretIdentifiersResponse, SecretsManagerError> {
let config = client.internal.get_api_configurations().await;
let res = bitwarden_api_api::apis::secrets_api::secrets_get_secrets_by_project(
&config.api,
input.project_id,
)
.await?;
let res = config
.api_client
.secrets_api()
.get_secrets_by_project(input.project_id)
.await?;

let key_store = client.internal.get_key_store();

Expand Down
11 changes: 5 additions & 6 deletions bitwarden_license/bitwarden-sm/src/secrets/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ pub(crate) async fn sync_secrets(
let config = client.internal.get_api_configurations().await;
let last_synced_date = input.last_synced_date.map(|date| date.to_rfc3339());

let res = bitwarden_api_api::apis::secrets_api::secrets_get_secrets_sync(
&config.api,
input.organization_id,
last_synced_date,
)
.await?;
let res = config
.api_client
.secrets_api()
.get_secrets_sync(input.organization_id, last_synced_date)
.await?;

let key_store = client.internal.get_key_store();

Expand Down
8 changes: 5 additions & 3 deletions bitwarden_license/bitwarden-sm/src/secrets/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ pub(crate) async fn update_secret(
};

let config = client.internal.get_api_configurations().await;
let res =
bitwarden_api_api::apis::secrets_api::secrets_update_secret(&config.api, input.id, secret)
.await?;
let res = config
.api_client
.secrets_api()
.update_secret(input.id, secret)
.await?;

SecretResponse::process_response(res, &mut key_store.context())
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-api-api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.13.0
7.15.0
5 changes: 5 additions & 0 deletions crates/bitwarden-api-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ repository.workspace = true
license-file.workspace = true
keywords.workspace = true

[features]
mockall = ["dep:mockall"]

[dependencies]
async-trait = { workspace = true }
mockall = { version = ">=0.13.1, <0.14", optional = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
Loading
Loading