Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use bitwarden_core::Client;
#[cfg(feature = "wasm")]
use wasm_bindgen::prelude::*;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Clone)]
#[cfg_attr(feature = "wasm", wasm_bindgen)]
pub struct CommercialVaultClient {
#[allow(unused)]
#[expect(unused)]
pub(crate) client: Client,
}

Expand All @@ -19,7 +19,7 @@ impl CommercialVaultClient {
#[cfg_attr(feature = "wasm", wasm_bindgen)]
impl CommercialVaultClient {}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub trait CommercialVaultClientExt {
fn vault(&self) -> CommercialVaultClient;
}
Expand Down
20 changes: 10 additions & 10 deletions bitwarden_license/bitwarden-sm/src/client_projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,50 @@ use crate::{
/// Aliases to maintain backward compatibility
pub type ClientProjects = ProjectsClient;

#[allow(missing_docs)]
#[expect(missing_docs)]
pub struct ProjectsClient {
pub client: Client,
}

impl ProjectsClient {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new(client: Client) -> Self {
Self { client }
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn get(
&self,
input: &ProjectGetRequest,
) -> Result<ProjectResponse, SecretsManagerError> {
get_project(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn create(
&self,
input: &ProjectCreateRequest,
) -> Result<ProjectResponse, SecretsManagerError> {
create_project(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn list(
&self,
input: &ProjectsListRequest,
) -> Result<ProjectsResponse, SecretsManagerError> {
list_projects(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn update(
&self,
input: &ProjectPutRequest,
) -> Result<ProjectResponse, SecretsManagerError> {
update_project(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn delete(
&self,
input: ProjectsDeleteRequest,
Expand All @@ -66,7 +66,7 @@ impl ProjectsClient {

/// This trait is for backward compatibility
pub trait ClientProjectsExt {
#[allow(missing_docs)]
#[expect(missing_docs)]
fn projects(&self) -> ClientProjects;
}

Expand All @@ -76,9 +76,9 @@ impl ClientProjectsExt for Client {
}
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub trait ProjectsClientExt {
#[allow(missing_docs)]
#[expect(missing_docs)]
fn projects(&self) -> ProjectsClient;
}

Expand Down
26 changes: 13 additions & 13 deletions bitwarden_license/bitwarden-sm/src/client_secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,74 @@ use crate::{
/// Aliases to maintain backward compatibility
pub type ClientSecrets = SecretsClient;

#[allow(missing_docs)]
#[expect(missing_docs)]
pub struct SecretsClient {
client: Client,
}

impl SecretsClient {
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn new(client: Client) -> Self {
Self { client }
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn get(
&self,
input: &SecretGetRequest,
) -> Result<SecretResponse, SecretsManagerError> {
get_secret(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn get_by_ids(
&self,
input: SecretsGetRequest,
) -> Result<SecretsResponse, SecretsManagerError> {
get_secrets_by_ids(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn create(
&self,
input: &SecretCreateRequest,
) -> Result<SecretResponse, SecretsManagerError> {
create_secret(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn list(
&self,
input: &SecretIdentifiersRequest,
) -> Result<SecretIdentifiersResponse, SecretsManagerError> {
list_secrets(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn list_by_project(
&self,
input: &SecretIdentifiersByProjectRequest,
) -> Result<SecretIdentifiersResponse, SecretsManagerError> {
list_secrets_by_project(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn update(
&self,
input: &SecretPutRequest,
) -> Result<SecretResponse, SecretsManagerError> {
update_secret(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn delete(
&self,
input: SecretsDeleteRequest,
) -> Result<SecretsDeleteResponse, SecretsManagerError> {
delete_secrets(&self.client, input).await
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub async fn sync(
&self,
input: &SecretsSyncRequest,
Expand All @@ -92,7 +92,7 @@ impl SecretsClient {

/// This trait is for backward compatibility
pub trait ClientSecretsExt {
#[allow(missing_docs)]
#[expect(missing_docs)]
fn secrets(&self) -> ClientSecrets;
}

Expand All @@ -102,9 +102,9 @@ impl ClientSecretsExt for Client {
}
}

#[allow(missing_docs)]
#[expect(missing_docs)]
pub trait SecretsClientExt {
#[allow(missing_docs)]
#[expect(missing_docs)]
fn secrets(&self) -> SecretsClient;
}

Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
mod client_projects;
mod client_secrets;
mod error;
#[allow(missing_docs)]
#[expect(missing_docs)]
pub mod projects;
#[allow(missing_docs)]
#[expect(missing_docs)]
pub mod secrets;

pub use client_projects::{ClientProjects, ClientProjectsExt, ProjectsClient, ProjectsClientExt};
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/projects/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
projects::ProjectResponse,
};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema, Validate)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectCreateRequest {
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/projects/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use uuid::Uuid;

use crate::error::SecretsManagerError;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectsDeleteRequest {
Expand All @@ -30,7 +30,7 @@ pub(crate) async fn delete_projects(
ProjectsDeleteResponse::process_response(res)
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectsDeleteResponse {
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 @@ -5,7 +5,7 @@ use uuid::Uuid;

use crate::{error::SecretsManagerError, projects::ProjectResponse};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectGetRequest {
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/projects/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use uuid::Uuid;

use crate::{error::SecretsManagerError, projects::ProjectResponse};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectsListRequest {
Expand All @@ -31,7 +31,7 @@ pub(crate) async fn list_projects(
ProjectsResponse::process_response(res, &mut key_store.context())
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectsResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use uuid::Uuid;

use crate::error::SecretsManagerError;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectResponse {
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/projects/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
projects::ProjectResponse,
};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema, Validate)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct ProjectPutRequest {
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/secrets/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
secrets::SecretResponse,
};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema, Validate)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretCreateRequest {
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/secrets/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use uuid::Uuid;

use crate::error::SecretsManagerError;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsDeleteRequest {
Expand All @@ -30,7 +30,7 @@ pub(crate) async fn delete_secrets(
SecretsDeleteResponse::process_response(res)
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsDeleteResponse {
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 @@ -5,7 +5,7 @@ use uuid::Uuid;

use crate::{error::SecretsManagerError, secrets::SecretResponse};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretGetRequest {
Expand Down
2 changes: 1 addition & 1 deletion bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use uuid::Uuid;

use crate::{error::SecretsManagerError, secrets::SecretsResponse};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsGetRequest {
Expand Down
6 changes: 3 additions & 3 deletions bitwarden_license/bitwarden-sm/src/secrets/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use uuid::Uuid;

use crate::error::SecretsManagerError;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretIdentifiersRequest {
Expand All @@ -38,7 +38,7 @@ pub(crate) async fn list_secrets(
SecretIdentifiersResponse::process_response(res, &mut key_store.context())
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretIdentifiersByProjectRequest {
Expand All @@ -62,7 +62,7 @@ pub(crate) async fn list_secrets_by_project(
SecretIdentifiersResponse::process_response(res, &mut key_store.context())
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretIdentifiersResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use uuid::Uuid;

use crate::error::SecretsManagerError;

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretResponse {
Expand Down Expand Up @@ -86,7 +86,7 @@ impl SecretResponse {
}
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsResponse {
Expand Down
4 changes: 2 additions & 2 deletions bitwarden_license/bitwarden-sm/src/secrets/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use uuid::Uuid;

use crate::{error::SecretsManagerError, secrets::SecretResponse};

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsSyncRequest {
Expand Down Expand Up @@ -36,7 +36,7 @@ pub(crate) async fn sync_secrets(
SecretsSyncResponse::process_response(res, &mut key_store.context())
}

#[allow(missing_docs)]
#[expect(missing_docs)]
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct SecretsSyncResponse {
Expand Down
Loading