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
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/access_policies_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AccessPoliciesApi: Send + Sync {
/// GET /organizations/{id}/access-policies/people/potential-grantees
async fn get_people_potential_grantees<'a>(
Expand Down Expand Up @@ -149,7 +150,8 @@ impl AccessPoliciesApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AccessPoliciesApi for AccessPoliciesApiClient {
async fn get_people_potential_grantees<'a>(
&self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AccountBillingVNextApi: Send + Sync {
/// POST /account/billing/vnext/credit/bitpay
async fn add_credit_via_bit_pay<'a>(
Expand Down Expand Up @@ -281,7 +282,8 @@ impl AccountBillingVNextApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AccountBillingVNextApi for AccountBillingVNextApiClient {
async fn add_credit_via_bit_pay<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/accounts_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AccountsApi: Send + Sync {
/// POST /accounts/api-key
async fn api_key<'a>(
Expand Down Expand Up @@ -258,7 +259,8 @@ impl AccountsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AccountsApi for AccountsApiClient {
async fn api_key<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/accounts_billing_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AccountsBillingApi: Send + Sync {
/// GET /accounts/billing/history
async fn get_billing_history(
Expand Down Expand Up @@ -67,7 +68,8 @@ impl AccountsBillingApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AccountsBillingApi for AccountsBillingApiClient {
async fn get_billing_history(
&self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AccountsKeyManagementApi: Send + Sync {
/// POST /accounts/convert-to-key-connector
async fn post_convert_to_key_connector(
Expand Down Expand Up @@ -61,7 +62,8 @@ impl AccountsKeyManagementApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AccountsKeyManagementApi for AccountsKeyManagementApiClient {
async fn post_convert_to_key_connector(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/auth_requests_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait AuthRequestsApi: Send + Sync {
/// GET /auth-requests/{id}
async fn get<'a>(
Expand Down Expand Up @@ -81,7 +82,8 @@ impl AuthRequestsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl AuthRequestsApi for AuthRequestsApiClient {
async fn get<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/ciphers_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait CiphersApi: Send + Sync {
/// POST /ciphers/attachment/validate/azure
async fn azure_validate_file(&self) -> Result<(), Error<AzureValidateFileError>>;
Expand Down Expand Up @@ -319,7 +320,8 @@ impl CiphersApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl CiphersApi for CiphersApiClient {
async fn azure_validate_file(&self) -> Result<(), Error<AzureValidateFileError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/collections_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait CollectionsApi: Send + Sync {
/// DELETE /organizations/{orgId}/collections/{id}
async fn delete<'a>(
Expand Down Expand Up @@ -113,7 +114,8 @@ impl CollectionsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl CollectionsApi for CollectionsApiClient {
async fn delete<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/config_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait ConfigApi: Send + Sync {
/// GET /config
async fn get_configs(&self) -> Result<models::ConfigResponseModel, Error<GetConfigsError>>;
Expand All @@ -39,7 +40,8 @@ impl ConfigApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl ConfigApi for ConfigApiClient {
async fn get_configs(&self) -> Result<models::ConfigResponseModel, Error<GetConfigsError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/counts_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait CountsApi: Send + Sync {
/// GET /organizations/{organizationId}/sm-counts
async fn get_by_organization<'a>(
Expand Down Expand Up @@ -54,7 +55,8 @@ impl CountsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl CountsApi for CountsApiClient {
async fn get_by_organization<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/devices_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait DevicesApi: Send + Sync {
/// DELETE /devices/{id}
async fn deactivate<'a>(&self, id: &'a str) -> Result<(), Error<DeactivateError>>;
Expand Down Expand Up @@ -115,7 +116,8 @@ impl DevicesApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl DevicesApi for DevicesApiClient {
async fn deactivate<'a>(&self, id: &'a str) -> Result<(), Error<DeactivateError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/emergency_access_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait EmergencyAccessApi: Send + Sync {
/// POST /emergency-access/{id}/accept
async fn accept<'a>(
Expand Down Expand Up @@ -137,7 +138,8 @@ impl EmergencyAccessApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl EmergencyAccessApi for EmergencyAccessApiClient {
async fn accept<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/events_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait EventsApi: Send + Sync {
/// GET /ciphers/{id}/events
async fn get_cipher<'a>(
Expand Down Expand Up @@ -111,7 +112,8 @@ impl EventsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl EventsApi for EventsApiClient {
async fn get_cipher<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/folders_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait FoldersApi: Send + Sync {
/// DELETE /folders/{id}
async fn delete<'a>(&self, id: &'a str) -> Result<(), Error<DeleteError>>;
Expand Down Expand Up @@ -63,7 +64,8 @@ impl FoldersApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl FoldersApi for FoldersApiClient {
async fn delete<'a>(&self, id: &'a str) -> Result<(), Error<DeleteError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/groups_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait GroupsApi: Send + Sync {
/// DELETE /organizations/{orgId}/groups
async fn bulk_delete<'a>(
Expand Down Expand Up @@ -105,7 +106,8 @@ impl GroupsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl GroupsApi for GroupsApiClient {
async fn bulk_delete<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/hibp_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait HibpApi: Send + Sync {
/// GET /hibp/breach
async fn get<'a>(&self, username: Option<&'a str>) -> Result<(), Error<GetError>>;
Expand All @@ -39,7 +40,8 @@ impl HibpApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl HibpApi for HibpApiClient {
async fn get<'a>(&self, username: Option<&'a str>) -> Result<(), Error<GetError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/import_ciphers_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait ImportCiphersApi: Send + Sync {
/// POST /ciphers/import
async fn post_import<'a>(
Expand Down Expand Up @@ -51,7 +52,8 @@ impl ImportCiphersApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl ImportCiphersApi for ImportCiphersApiClient {
async fn post_import<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/info_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait InfoApi: Send + Sync {
/// GET /alive
async fn get_alive(&self) -> Result<String, Error<GetAliveError>>;
Expand All @@ -42,7 +43,8 @@ impl InfoApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl InfoApi for InfoApiClient {
async fn get_alive(&self) -> Result<String, Error<GetAliveError>> {
let local_var_configuration = &self.configuration;
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/installations_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait InstallationsApi: Send + Sync {
/// GET /installations/{id}
async fn get<'a>(
Expand All @@ -48,7 +49,8 @@ impl InstallationsApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl InstallationsApi for InstallationsApiClient {
async fn get<'a>(
&self,
Expand Down
6 changes: 4 additions & 2 deletions crates/bitwarden-api-api/src/apis/invoices_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ use crate::{
};

#[cfg_attr(feature = "mockall", automock)]
#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait InvoicesApi: Send + Sync {
/// POST /invoices/preview-organization
async fn preview_invoice<'a>(
Expand All @@ -44,7 +45,8 @@ impl InvoicesApiClient {
}
}

#[async_trait(?Send)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl InvoicesApi for InvoicesApiClient {
async fn preview_invoice<'a>(
&self,
Expand Down
Loading
Loading