Skip to content

Commit a53b233

Browse files
committed
Merge branch 'main' into PM-25568-build-bitwarden-commercial-sdk-internal-in-sdk
2 parents 89b4a4c + 12fdb4d commit a53b233

File tree

251 files changed

+4485
-1342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+4485
-1342
lines changed

Cargo.lock

Lines changed: 458 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ exclude = ["support/lints"]
88
# Update using `cargo set-version -p bitwarden-core <new-version>`
99
version = "1.0.0"
1010
authors = ["Bitwarden Inc"]
11-
edition = "2021"
11+
edition = "2024"
1212
# Important: Changing rust-version should be considered a breaking change
13-
rust-version = "1.82"
13+
rust-version = "1.85"
1414
homepage = "https://bitwarden.com"
1515
repository = "https://github.com/bitwarden/sdk-internal"
1616
license-file = "LICENSE"

crates/bitwarden-api-api/src/apis/access_policies_api.rs

Lines changed: 122 additions & 26 deletions
Large diffs are not rendered by default.

crates/bitwarden-api-api/src/apis/account_billing_v_next_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use async_trait::async_trait;
1414
#[cfg(feature = "mockall")]
1515
use mockall::automock;
1616
use reqwest;
17-
use serde::{de::Error as _, Deserialize, Serialize};
17+
use serde::{Deserialize, Serialize, de::Error as _};
1818

19-
use super::{configuration, Error};
19+
use super::{Error, configuration};
2020
use crate::{
2121
apis::{ContentType, ResponseContent},
2222
models,

crates/bitwarden-api-api/src/apis/accounts_api.rs

Lines changed: 147 additions & 31 deletions
Large diffs are not rendered by default.

crates/bitwarden-api-api/src/apis/accounts_billing_api.rs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use async_trait::async_trait;
1414
#[cfg(feature = "mockall")]
1515
use mockall::automock;
1616
use reqwest;
17-
use serde::{de::Error as _, Deserialize, Serialize};
17+
use serde::{Deserialize, Serialize, de::Error as _};
1818

19-
use super::{configuration, Error};
19+
use super::{Error, configuration};
2020
use crate::{
2121
apis::{ContentType, ResponseContent},
2222
models,
@@ -106,8 +106,16 @@ impl AccountsBillingApi for AccountsBillingApiClient {
106106
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
107107
match local_var_content_type {
108108
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
109-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BillingHistoryResponseModel`"))),
110-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BillingHistoryResponseModel`")))),
109+
ContentType::Text => {
110+
return Err(Error::from(serde_json::Error::custom(
111+
"Received `text/plain` content type response that cannot be converted to `models::BillingHistoryResponseModel`",
112+
)));
113+
}
114+
ContentType::Unsupported(local_var_unknown_type) => {
115+
return Err(Error::from(serde_json::Error::custom(format!(
116+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BillingHistoryResponseModel`"
117+
))));
118+
}
111119
}
112120
} else {
113121
let local_var_entity: Option<GetBillingHistoryError> =
@@ -210,8 +218,16 @@ impl AccountsBillingApi for AccountsBillingApiClient {
210218
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
211219
match local_var_content_type {
212220
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
213-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BillingPaymentResponseModel`"))),
214-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BillingPaymentResponseModel`")))),
221+
ContentType::Text => {
222+
return Err(Error::from(serde_json::Error::custom(
223+
"Received `text/plain` content type response that cannot be converted to `models::BillingPaymentResponseModel`",
224+
)));
225+
}
226+
ContentType::Unsupported(local_var_unknown_type) => {
227+
return Err(Error::from(serde_json::Error::custom(format!(
228+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::BillingPaymentResponseModel`"
229+
))));
230+
}
215231
}
216232
} else {
217233
let local_var_entity: Option<GetPaymentMethodError> =

crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use async_trait::async_trait;
1414
#[cfg(feature = "mockall")]
1515
use mockall::automock;
1616
use reqwest;
17-
use serde::{de::Error as _, Deserialize, Serialize};
17+
use serde::{Deserialize, Serialize, de::Error as _};
1818

19-
use super::{configuration, Error};
19+
use super::{Error, configuration};
2020
use crate::{
2121
apis::{ContentType, ResponseContent},
2222
models,

crates/bitwarden-api-api/src/apis/auth_requests_api.rs

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use async_trait::async_trait;
1414
#[cfg(feature = "mockall")]
1515
use mockall::automock;
1616
use reqwest;
17-
use serde::{de::Error as _, Deserialize, Serialize};
17+
use serde::{Deserialize, Serialize, de::Error as _};
1818

19-
use super::{configuration, Error};
19+
use super::{Error, configuration};
2020
use crate::{
2121
apis::{ContentType, ResponseContent},
2222
models,
@@ -122,8 +122,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
122122
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
123123
match local_var_content_type {
124124
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
125-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))),
126-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))),
125+
ContentType::Text => {
126+
return Err(Error::from(serde_json::Error::custom(
127+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`",
128+
)));
129+
}
130+
ContentType::Unsupported(local_var_unknown_type) => {
131+
return Err(Error::from(serde_json::Error::custom(format!(
132+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`"
133+
))));
134+
}
127135
}
128136
} else {
129137
let local_var_entity: Option<GetError> = serde_json::from_str(&local_var_content).ok();
@@ -170,8 +178,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
170178
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
171179
match local_var_content_type {
172180
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
173-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModelListResponseModel`"))),
174-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModelListResponseModel`")))),
181+
ContentType::Text => {
182+
return Err(Error::from(serde_json::Error::custom(
183+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModelListResponseModel`",
184+
)));
185+
}
186+
ContentType::Unsupported(local_var_unknown_type) => {
187+
return Err(Error::from(serde_json::Error::custom(format!(
188+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModelListResponseModel`"
189+
))));
190+
}
175191
}
176192
} else {
177193
let local_var_entity: Option<GetAllError> =
@@ -225,8 +241,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
225241
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
226242
match local_var_content_type {
227243
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
228-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`"))),
229-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`")))),
244+
ContentType::Text => {
245+
return Err(Error::from(serde_json::Error::custom(
246+
"Received `text/plain` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`",
247+
)));
248+
}
249+
ContentType::Unsupported(local_var_unknown_type) => {
250+
return Err(Error::from(serde_json::Error::custom(format!(
251+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`"
252+
))));
253+
}
230254
}
231255
} else {
232256
let local_var_entity: Option<GetPendingAuthRequestsError> =
@@ -284,8 +308,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
284308
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
285309
match local_var_content_type {
286310
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
287-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))),
288-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))),
311+
ContentType::Text => {
312+
return Err(Error::from(serde_json::Error::custom(
313+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`",
314+
)));
315+
}
316+
ContentType::Unsupported(local_var_unknown_type) => {
317+
return Err(Error::from(serde_json::Error::custom(format!(
318+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`"
319+
))));
320+
}
289321
}
290322
} else {
291323
let local_var_entity: Option<GetResponseError> =
@@ -335,8 +367,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
335367
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
336368
match local_var_content_type {
337369
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
338-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))),
339-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))),
370+
ContentType::Text => {
371+
return Err(Error::from(serde_json::Error::custom(
372+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`",
373+
)));
374+
}
375+
ContentType::Unsupported(local_var_unknown_type) => {
376+
return Err(Error::from(serde_json::Error::custom(format!(
377+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`"
378+
))));
379+
}
340380
}
341381
} else {
342382
let local_var_entity: Option<PostError> = serde_json::from_str(&local_var_content).ok();
@@ -388,8 +428,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
388428
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
389429
match local_var_content_type {
390430
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
391-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))),
392-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))),
431+
ContentType::Text => {
432+
return Err(Error::from(serde_json::Error::custom(
433+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`",
434+
)));
435+
}
436+
ContentType::Unsupported(local_var_unknown_type) => {
437+
return Err(Error::from(serde_json::Error::custom(format!(
438+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`"
439+
))));
440+
}
393441
}
394442
} else {
395443
let local_var_entity: Option<PostAdminRequestError> =
@@ -444,8 +492,16 @@ impl AuthRequestsApi for AuthRequestsApiClient {
444492
if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
445493
match local_var_content_type {
446494
ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
447-
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))),
448-
ContentType::Unsupported(local_var_unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))),
495+
ContentType::Text => {
496+
return Err(Error::from(serde_json::Error::custom(
497+
"Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`",
498+
)));
499+
}
500+
ContentType::Unsupported(local_var_unknown_type) => {
501+
return Err(Error::from(serde_json::Error::custom(format!(
502+
"Received `{local_var_unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`"
503+
))));
504+
}
449505
}
450506
} else {
451507
let local_var_entity: Option<PutError> = serde_json::from_str(&local_var_content).ok();

0 commit comments

Comments
 (0)