From 998a2169db74f837bc0fe7f69bc8379023c2daae Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Tue, 16 Dec 2025 16:56:22 -0500 Subject: [PATCH 1/3] Updated binding docs. --- support/openapi-template/README.mustache | 29 ++++++++---------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/support/openapi-template/README.mustache b/support/openapi-template/README.mustache index 5d04c23e2..85f818ed8 100644 --- a/support/openapi-template/README.mustache +++ b/support/openapi-template/README.mustache @@ -1,14 +1,16 @@ # Rust API client for {{{packageName}}} -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} +## Updating bindings after a server API change -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} +When a server API change is made, new bindings will need to be generated to reflect this change for consumption in the SDK. -## Overview +This can be done the following ways: +1. Wait for an automatic binding update to run, which is scheduled every 2 weeks. +2. Manually run the `Update API Bindings` workflow in the `sdk-internal` repo. + +Both of these will generate a PR that will require approval from any teams whose owned code is affected by the binding updates. + +## Current binding details This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. @@ -21,15 +23,9 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - Generator version: {{generatorVersion}} - Build package: `{{{generatorClass}}}` -## Installation -Put the package under your project folder in a directory named `{{packageName}}` and add the following to `Cargo.toml` under `[dependencies]`: -``` -{{{packageName}}} = { path = "./{{{packageName}}}" } -``` - -## Documentation for API Endpoints +## Documentation for API endpoints All URIs are relative to *{{{basePath}}}* @@ -48,8 +44,3 @@ To get access to the crate's generated documentation, use: ``` cargo doc --open ``` - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{{infoEmail}}} -{{/-last}}{{/apis}}{{/apiInfo}} From a6beee3661dc8fee079044cd3ba231a0e3f2b6bd Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:57:59 +0000 Subject: [PATCH 2/3] Update API bindings - 04efe402bebc5aef3b06cd40c37474be0d114634 --- .../.openapi-generator/FILES | 1 - crates/bitwarden-api-api/README.md | 33 ++-- crates/bitwarden-api-api/src/apis/mod.rs | 12 -- .../src/apis/phishing_domains_api.rs | 170 ------------------ .../src/models/keys_request_model.rs | 7 + .../src/models/keys_response_model.rs | 9 + .../.openapi-generator/FILES | 4 + crates/bitwarden-api-identity/README.md | 35 ++-- .../src/models/account_keys_request_model.rs | 57 ++++++ .../src/models/keys_request_model.rs | 7 + .../bitwarden-api-identity/src/models/mod.rs | 8 + ...c_key_encryption_key_pair_request_model.rs | 40 +++++ .../src/models/security_state_model.rs | 30 ++++ .../signature_key_pair_request_model.rs | 37 ++++ 14 files changed, 233 insertions(+), 217 deletions(-) delete mode 100644 crates/bitwarden-api-api/src/apis/phishing_domains_api.rs create mode 100644 crates/bitwarden-api-identity/src/models/account_keys_request_model.rs create mode 100644 crates/bitwarden-api-identity/src/models/public_key_encryption_key_pair_request_model.rs create mode 100644 crates/bitwarden-api-identity/src/models/security_state_model.rs create mode 100644 crates/bitwarden-api-identity/src/models/signature_key_pair_request_model.rs diff --git a/crates/bitwarden-api-api/.openapi-generator/FILES b/crates/bitwarden-api-api/.openapi-generator/FILES index 2c631ad8e..7f002359e 100644 --- a/crates/bitwarden-api-api/.openapi-generator/FILES +++ b/crates/bitwarden-api-api/.openapi-generator/FILES @@ -33,7 +33,6 @@ src/apis/organization_reports_api.rs src/apis/organization_sponsorships_api.rs src/apis/organization_users_api.rs src/apis/organizations_api.rs -src/apis/phishing_domains_api.rs src/apis/plans_api.rs src/apis/policies_api.rs src/apis/projects_api.rs diff --git a/crates/bitwarden-api-api/README.md b/crates/bitwarden-api-api/README.md index 3bbf7d92d..6acf795a8 100644 --- a/crates/bitwarden-api-api/README.md +++ b/crates/bitwarden-api-api/README.md @@ -1,9 +1,19 @@ # Rust API client for bitwarden-api-api -No description provided (generated by Openapi Generator -https://github.com/openapitools/openapi-generator) +## Updating bindings after a server API change -## Overview +When a server API change is made, new bindings will need to be generated to reflect this change for +consumption in the SDK. + +This can be done the following ways: + +1. Wait for an automatic binding update to run, which is scheduled every 2 weeks. +2. Manually run the `Update API Bindings` workflow in the `sdk-internal` repo. + +Both of these will generate a PR that will require approval from any teams whose owned code is +affected by the binding updates. + +## Current binding details This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API @@ -12,20 +22,11 @@ client. - API version: latest - Package version: 2.0.0 - Server Git commit: - [`196e555116aba4666ae8c9cc9080291c42c1fe46`](https://github.com/bitwarden/server/commit/196e555116aba4666ae8c9cc9080291c42c1fe46) + [`04efe402bebc5aef3b06cd40c37474be0d114634`](https://github.com/bitwarden/server/commit/04efe402bebc5aef3b06cd40c37474be0d114634) - Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` -## Installation - -Put the package under your project folder in a directory named `bitwarden-api-api` and add the -following to `Cargo.toml` under `[dependencies]`: - -``` -bitwarden-api-api = { path = "./bitwarden-api-api" } -``` - -## Documentation for API Endpoints +## Documentation for API endpoints All URIs are relative to *https://api.bitwarden.com* @@ -342,8 +343,6 @@ All URIs are relative to *https://api.bitwarden.com* | _OrganizationsApi_ | [**put**](docs/OrganizationsApi.md#organizations_put) | **PUT** /organizations/{organizationId} | | _OrganizationsApi_ | [**put_collection_management**](docs/OrganizationsApi.md#organizations_put_collection_management) | **PUT** /organizations/{id}/collection-management | | _OrganizationsApi_ | [**rotate_api_key**](docs/OrganizationsApi.md#organizations_rotate_api_key) | **POST** /organizations/{id}/rotate-api-key | -| _PhishingDomainsApi_ | [**get_checksum**](docs/PhishingDomainsApi.md#phishing_domains_get_checksum) | **GET** /phishing-domains/checksum | -| _PhishingDomainsApi_ | [**get_phishing_domains**](docs/PhishingDomainsApi.md#phishing_domains_get_phishing_domains) | **GET** /phishing-domains | | _PlansApi_ | [**get**](docs/PlansApi.md#plans_get) | **GET** /plans | | _PlansApi_ | [**get_premium_plan**](docs/PlansApi.md#plans_get_premium_plan) | **GET** /plans/premium | | _PoliciesApi_ | [**get**](docs/PoliciesApi.md#policies_get) | **GET** /organizations/{orgId}/policies/{type} | @@ -992,5 +991,3 @@ To get access to the crate's generated documentation, use: ``` cargo doc --open ``` - -## Author diff --git a/crates/bitwarden-api-api/src/apis/mod.rs b/crates/bitwarden-api-api/src/apis/mod.rs index 0d302a7b4..3548fad35 100644 --- a/crates/bitwarden-api-api/src/apis/mod.rs +++ b/crates/bitwarden-api-api/src/apis/mod.rs @@ -144,7 +144,6 @@ pub mod organization_reports_api; pub mod organization_sponsorships_api; pub mod organization_users_api; pub mod organizations_api; -pub mod phishing_domains_api; pub mod plans_api; pub mod policies_api; pub mod projects_api; @@ -226,7 +225,6 @@ struct ApiClientReal { organization_sponsorships_api: organization_sponsorships_api::OrganizationSponsorshipsApiClient, organization_users_api: organization_users_api::OrganizationUsersApiClient, organizations_api: organizations_api::OrganizationsApiClient, - phishing_domains_api: phishing_domains_api::PhishingDomainsApiClient, plans_api: plans_api::PlansApiClient, policies_api: policies_api::PoliciesApiClient, projects_api: projects_api::ProjectsApiClient, @@ -304,7 +302,6 @@ pub struct ApiClientMock { organization_sponsorships_api::MockOrganizationSponsorshipsApi, pub organization_users_api: organization_users_api::MockOrganizationUsersApi, pub organizations_api: organizations_api::MockOrganizationsApi, - pub phishing_domains_api: phishing_domains_api::MockPhishingDomainsApi, pub plans_api: plans_api::MockPlansApi, pub policies_api: policies_api::MockPoliciesApi, pub projects_api: projects_api::MockProjectsApi, @@ -379,7 +376,6 @@ impl ApiClient { organization_sponsorships_api: organization_sponsorships_api::OrganizationSponsorshipsApiClient::new(configuration.clone()), organization_users_api: organization_users_api::OrganizationUsersApiClient::new(configuration.clone()), organizations_api: organizations_api::OrganizationsApiClient::new(configuration.clone()), - phishing_domains_api: phishing_domains_api::PhishingDomainsApiClient::new(configuration.clone()), plans_api: plans_api::PlansApiClient::new(configuration.clone()), policies_api: policies_api::PoliciesApiClient::new(configuration.clone()), projects_api: projects_api::ProjectsApiClient::new(configuration.clone()), @@ -451,7 +447,6 @@ impl ApiClient { organization_sponsorships_api: organization_sponsorships_api::MockOrganizationSponsorshipsApi::new(), organization_users_api: organization_users_api::MockOrganizationUsersApi::new(), organizations_api: organizations_api::MockOrganizationsApi::new(), - phishing_domains_api: phishing_domains_api::MockPhishingDomainsApi::new(), plans_api: plans_api::MockPlansApi::new(), policies_api: policies_api::MockPoliciesApi::new(), projects_api: projects_api::MockProjectsApi::new(), @@ -737,13 +732,6 @@ impl ApiClient { ApiClient::Mock(mock) => &mock.organizations_api, } } - pub fn phishing_domains_api(&self) -> &dyn phishing_domains_api::PhishingDomainsApi { - match self { - ApiClient::Real(real) => &real.phishing_domains_api, - #[cfg(feature = "mockall")] - ApiClient::Mock(mock) => &mock.phishing_domains_api, - } - } pub fn plans_api(&self) -> &dyn plans_api::PlansApi { match self { ApiClient::Real(real) => &real.plans_api, diff --git a/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs b/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs deleted file mode 100644 index ca14870d3..000000000 --- a/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Bitwarden Internal API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: latest - * - * Generated by: https://openapi-generator.tech - */ - -use std::sync::Arc; - -use async_trait::async_trait; -#[cfg(feature = "mockall")] -use mockall::automock; -use reqwest; -use serde::{Deserialize, Serialize, de::Error as _}; - -use super::{Error, configuration}; -use crate::{ - apis::{ContentType, ResponseContent}, - models, -}; - -#[cfg_attr(feature = "mockall", automock)] -#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] -#[cfg_attr(not(target_arch = "wasm32"), async_trait)] -pub trait PhishingDomainsApi: Send + Sync { - /// GET /phishing-domains/checksum - async fn get_checksum(&self) -> Result>; - - /// GET /phishing-domains - async fn get_phishing_domains(&self) -> Result, Error>; -} - -pub struct PhishingDomainsApiClient { - configuration: Arc, -} - -impl PhishingDomainsApiClient { - pub fn new(configuration: Arc) -> Self { - Self { configuration } - } -} - -#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] -#[cfg_attr(not(target_arch = "wasm32"), async_trait)] -impl PhishingDomainsApi for PhishingDomainsApiClient { - async fn get_checksum(&self) -> Result> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/phishing-domains/checksum", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder - .header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content_type = local_var_resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let local_var_content_type = super::ContentType::from(local_var_content_type); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - match local_var_content_type { - ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from), - ContentType::Text => return Ok(local_var_content), - 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 `String`" - )))); - } - } - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_phishing_domains(&self) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/phishing-domains", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder - .header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content_type = local_var_resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let local_var_content_type = super::ContentType::from(local_var_content_type); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - match local_var_content_type { - ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from), - ContentType::Text => { - return Err(Error::from(serde_json::Error::custom( - "Received `text/plain` content type response that cannot be converted to `Vec<String>`", - ))); - } - 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 `Vec<String>`" - )))); - } - } - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } - } -} - -/// struct for typed errors of method [`PhishingDomainsApi::get_checksum`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetChecksumError { - UnknownValue(serde_json::Value), -} -/// struct for typed errors of method [`PhishingDomainsApi::get_phishing_domains`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetPhishingDomainsError { - UnknownValue(serde_json::Value), -} diff --git a/crates/bitwarden-api-api/src/models/keys_request_model.rs b/crates/bitwarden-api-api/src/models/keys_request_model.rs index 316d0f860..955b0ed79 100644 --- a/crates/bitwarden-api-api/src/models/keys_request_model.rs +++ b/crates/bitwarden-api-api/src/models/keys_request_model.rs @@ -18,6 +18,12 @@ pub struct KeysRequestModel { pub public_key: String, #[serde(rename = "encryptedPrivateKey", alias = "EncryptedPrivateKey")] pub encrypted_private_key: String, + #[serde( + rename = "accountKeys", + alias = "AccountKeys", + skip_serializing_if = "Option::is_none" + )] + pub account_keys: Option>, } impl KeysRequestModel { @@ -25,6 +31,7 @@ impl KeysRequestModel { KeysRequestModel { public_key, encrypted_private_key, + account_keys: None, } } } diff --git a/crates/bitwarden-api-api/src/models/keys_response_model.rs b/crates/bitwarden-api-api/src/models/keys_response_model.rs index 14dfba5d6..740649e67 100644 --- a/crates/bitwarden-api-api/src/models/keys_response_model.rs +++ b/crates/bitwarden-api-api/src/models/keys_response_model.rs @@ -20,6 +20,8 @@ pub struct KeysResponseModel { skip_serializing_if = "Option::is_none" )] pub object: Option, + /// The master key wrapped user key. The master key can either be a master-password master key + /// or a key-connector master key. #[serde(rename = "key", alias = "Key", skip_serializing_if = "Option::is_none")] pub key: Option, #[serde( @@ -34,6 +36,12 @@ pub struct KeysResponseModel { skip_serializing_if = "Option::is_none" )] pub private_key: Option, + #[serde( + rename = "accountKeys", + alias = "AccountKeys", + skip_serializing_if = "Option::is_none" + )] + pub account_keys: Option>, } impl KeysResponseModel { @@ -43,6 +51,7 @@ impl KeysResponseModel { key: None, public_key: None, private_key: None, + account_keys: None, } } } diff --git a/crates/bitwarden-api-identity/.openapi-generator/FILES b/crates/bitwarden-api-identity/.openapi-generator/FILES index 6ac78cfb0..810b885e5 100644 --- a/crates/bitwarden-api-identity/.openapi-generator/FILES +++ b/crates/bitwarden-api-identity/.openapi-generator/FILES @@ -5,6 +5,7 @@ src/apis/info_api.rs src/apis/mod.rs src/apis/sso_api.rs src/lib.rs +src/models/account_keys_request_model.rs src/models/assertion_options.rs src/models/authentication_extensions_client_inputs.rs src/models/authenticator_transport.rs @@ -18,10 +19,13 @@ src/models/product_tier_type.rs src/models/product_type.rs src/models/public_key_credential_descriptor.rs src/models/public_key_credential_type.rs +src/models/public_key_encryption_key_pair_request_model.rs src/models/register_finish_request_model.rs src/models/register_finish_response_model.rs src/models/register_send_verification_email_request_model.rs src/models/register_verification_email_clicked_request_model.rs +src/models/security_state_model.rs +src/models/signature_key_pair_request_model.rs src/models/trial_send_verification_email_request_model.rs src/models/user_verification_requirement.rs src/models/web_authn_login_assertion_options_response_model.rs diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index f238f249a..c0bdc5735 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -1,9 +1,19 @@ # Rust API client for bitwarden-api-identity -No description provided (generated by Openapi Generator -https://github.com/openapitools/openapi-generator) +## Updating bindings after a server API change -## Overview +When a server API change is made, new bindings will need to be generated to reflect this change for +consumption in the SDK. + +This can be done the following ways: + +1. Wait for an automatic binding update to run, which is scheduled every 2 weeks. +2. Manually run the `Update API Bindings` workflow in the `sdk-internal` repo. + +Both of these will generate a PR that will require approval from any teams whose owned code is +affected by the binding updates. + +## Current binding details This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API @@ -12,20 +22,11 @@ client. - API version: v1 - Package version: 2.0.0 - Server Git commit: - [`196e555116aba4666ae8c9cc9080291c42c1fe46`](https://github.com/bitwarden/server/commit/196e555116aba4666ae8c9cc9080291c42c1fe46) + [`04efe402bebc5aef3b06cd40c37474be0d114634`](https://github.com/bitwarden/server/commit/04efe402bebc5aef3b06cd40c37474be0d114634) - Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` -## Installation - -Put the package under your project folder in a directory named `bitwarden-api-identity` and add the -following to `Cargo.toml` under `[dependencies]`: - -``` -bitwarden-api-identity = { path = "./bitwarden-api-identity" } -``` - -## Documentation for API Endpoints +## Documentation for API endpoints All URIs are relative to *https://identity.bitwarden.com* @@ -46,6 +47,7 @@ All URIs are relative to *https://identity.bitwarden.com* ## Documentation For Models +- [AccountKeysRequestModel](docs/AccountKeysRequestModel.md) - [AssertionOptions](docs/AssertionOptions.md) - [AuthenticationExtensionsClientInputs](docs/AuthenticationExtensionsClientInputs.md) - [AuthenticatorTransport](docs/AuthenticatorTransport.md) @@ -58,10 +60,13 @@ All URIs are relative to *https://identity.bitwarden.com* - [ProductType](docs/ProductType.md) - [PublicKeyCredentialDescriptor](docs/PublicKeyCredentialDescriptor.md) - [PublicKeyCredentialType](docs/PublicKeyCredentialType.md) +- [PublicKeyEncryptionKeyPairRequestModel](docs/PublicKeyEncryptionKeyPairRequestModel.md) - [RegisterFinishRequestModel](docs/RegisterFinishRequestModel.md) - [RegisterFinishResponseModel](docs/RegisterFinishResponseModel.md) - [RegisterSendVerificationEmailRequestModel](docs/RegisterSendVerificationEmailRequestModel.md) - [RegisterVerificationEmailClickedRequestModel](docs/RegisterVerificationEmailClickedRequestModel.md) +- [SecurityStateModel](docs/SecurityStateModel.md) +- [SignatureKeyPairRequestModel](docs/SignatureKeyPairRequestModel.md) - [TrialSendVerificationEmailRequestModel](docs/TrialSendVerificationEmailRequestModel.md) - [UserVerificationRequirement](docs/UserVerificationRequirement.md) - [WebAuthnLoginAssertionOptionsResponseModel](docs/WebAuthnLoginAssertionOptionsResponseModel.md) @@ -71,5 +76,3 @@ To get access to the crate's generated documentation, use: ``` cargo doc --open ``` - -## Author diff --git a/crates/bitwarden-api-identity/src/models/account_keys_request_model.rs b/crates/bitwarden-api-identity/src/models/account_keys_request_model.rs new file mode 100644 index 000000000..98f14010b --- /dev/null +++ b/crates/bitwarden-api-identity/src/models/account_keys_request_model.rs @@ -0,0 +1,57 @@ +/* + * Bitwarden Identity + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct AccountKeysRequestModel { + #[serde( + rename = "userKeyEncryptedAccountPrivateKey", + alias = "UserKeyEncryptedAccountPrivateKey" + )] + pub user_key_encrypted_account_private_key: Option, + #[serde(rename = "accountPublicKey", alias = "AccountPublicKey")] + pub account_public_key: Option, + #[serde( + rename = "publicKeyEncryptionKeyPair", + alias = "PublicKeyEncryptionKeyPair", + skip_serializing_if = "Option::is_none" + )] + pub public_key_encryption_key_pair: Option>, + #[serde( + rename = "signatureKeyPair", + alias = "SignatureKeyPair", + skip_serializing_if = "Option::is_none" + )] + pub signature_key_pair: Option>, + #[serde( + rename = "securityState", + alias = "SecurityState", + skip_serializing_if = "Option::is_none" + )] + pub security_state: Option>, +} + +impl AccountKeysRequestModel { + pub fn new( + user_key_encrypted_account_private_key: Option, + account_public_key: Option, + ) -> AccountKeysRequestModel { + AccountKeysRequestModel { + user_key_encrypted_account_private_key, + account_public_key, + public_key_encryption_key_pair: None, + signature_key_pair: None, + security_state: None, + } + } +} diff --git a/crates/bitwarden-api-identity/src/models/keys_request_model.rs b/crates/bitwarden-api-identity/src/models/keys_request_model.rs index 5362cbdc1..a6e9cd3df 100644 --- a/crates/bitwarden-api-identity/src/models/keys_request_model.rs +++ b/crates/bitwarden-api-identity/src/models/keys_request_model.rs @@ -18,6 +18,12 @@ pub struct KeysRequestModel { pub public_key: String, #[serde(rename = "encryptedPrivateKey", alias = "EncryptedPrivateKey")] pub encrypted_private_key: String, + #[serde( + rename = "accountKeys", + alias = "AccountKeys", + skip_serializing_if = "Option::is_none" + )] + pub account_keys: Option>, } impl KeysRequestModel { @@ -25,6 +31,7 @@ impl KeysRequestModel { KeysRequestModel { public_key, encrypted_private_key, + account_keys: None, } } } diff --git a/crates/bitwarden-api-identity/src/models/mod.rs b/crates/bitwarden-api-identity/src/models/mod.rs index 500492f30..12e49ab54 100644 --- a/crates/bitwarden-api-identity/src/models/mod.rs +++ b/crates/bitwarden-api-identity/src/models/mod.rs @@ -1,3 +1,5 @@ +pub mod account_keys_request_model; +pub use self::account_keys_request_model::AccountKeysRequestModel; pub mod assertion_options; pub use self::assertion_options::AssertionOptions; pub mod authentication_extensions_client_inputs; @@ -22,6 +24,8 @@ pub mod public_key_credential_descriptor; pub use self::public_key_credential_descriptor::PublicKeyCredentialDescriptor; pub mod public_key_credential_type; pub use self::public_key_credential_type::PublicKeyCredentialType; +pub mod public_key_encryption_key_pair_request_model; +pub use self::public_key_encryption_key_pair_request_model::PublicKeyEncryptionKeyPairRequestModel; pub mod register_finish_request_model; pub use self::register_finish_request_model::RegisterFinishRequestModel; pub mod register_finish_response_model; @@ -30,6 +34,10 @@ pub mod register_send_verification_email_request_model; pub use self::register_send_verification_email_request_model::RegisterSendVerificationEmailRequestModel; pub mod register_verification_email_clicked_request_model; pub use self::register_verification_email_clicked_request_model::RegisterVerificationEmailClickedRequestModel; +pub mod security_state_model; +pub use self::security_state_model::SecurityStateModel; +pub mod signature_key_pair_request_model; +pub use self::signature_key_pair_request_model::SignatureKeyPairRequestModel; pub mod trial_send_verification_email_request_model; pub use self::trial_send_verification_email_request_model::TrialSendVerificationEmailRequestModel; pub mod user_verification_requirement; diff --git a/crates/bitwarden-api-identity/src/models/public_key_encryption_key_pair_request_model.rs b/crates/bitwarden-api-identity/src/models/public_key_encryption_key_pair_request_model.rs new file mode 100644 index 000000000..07d6afa77 --- /dev/null +++ b/crates/bitwarden-api-identity/src/models/public_key_encryption_key_pair_request_model.rs @@ -0,0 +1,40 @@ +/* + * Bitwarden Identity + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PublicKeyEncryptionKeyPairRequestModel { + #[serde(rename = "wrappedPrivateKey", alias = "WrappedPrivateKey")] + pub wrapped_private_key: Option, + #[serde(rename = "publicKey", alias = "PublicKey")] + pub public_key: Option, + #[serde( + rename = "signedPublicKey", + alias = "SignedPublicKey", + skip_serializing_if = "Option::is_none" + )] + pub signed_public_key: Option, +} + +impl PublicKeyEncryptionKeyPairRequestModel { + pub fn new( + wrapped_private_key: Option, + public_key: Option, + ) -> PublicKeyEncryptionKeyPairRequestModel { + PublicKeyEncryptionKeyPairRequestModel { + wrapped_private_key, + public_key, + signed_public_key: None, + } + } +} diff --git a/crates/bitwarden-api-identity/src/models/security_state_model.rs b/crates/bitwarden-api-identity/src/models/security_state_model.rs new file mode 100644 index 000000000..74e558e0a --- /dev/null +++ b/crates/bitwarden-api-identity/src/models/security_state_model.rs @@ -0,0 +1,30 @@ +/* + * Bitwarden Identity + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityStateModel { + #[serde(rename = "securityState", alias = "SecurityState")] + pub security_state: Option, + #[serde(rename = "securityVersion", alias = "SecurityVersion")] + pub security_version: i32, +} + +impl SecurityStateModel { + pub fn new(security_state: Option, security_version: i32) -> SecurityStateModel { + SecurityStateModel { + security_state, + security_version, + } + } +} diff --git a/crates/bitwarden-api-identity/src/models/signature_key_pair_request_model.rs b/crates/bitwarden-api-identity/src/models/signature_key_pair_request_model.rs new file mode 100644 index 000000000..4509af850 --- /dev/null +++ b/crates/bitwarden-api-identity/src/models/signature_key_pair_request_model.rs @@ -0,0 +1,37 @@ +/* + * Bitwarden Identity + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1 + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SignatureKeyPairRequestModel { + #[serde(rename = "signatureAlgorithm", alias = "SignatureAlgorithm")] + pub signature_algorithm: Option, + #[serde(rename = "wrappedSigningKey", alias = "WrappedSigningKey")] + pub wrapped_signing_key: Option, + #[serde(rename = "verifyingKey", alias = "VerifyingKey")] + pub verifying_key: Option, +} + +impl SignatureKeyPairRequestModel { + pub fn new( + signature_algorithm: Option, + wrapped_signing_key: Option, + verifying_key: Option, + ) -> SignatureKeyPairRequestModel { + SignatureKeyPairRequestModel { + signature_algorithm, + wrapped_signing_key, + verifying_key, + } + } +} From 1fcbfaff0c60c9c416d3cd67f5eef98b6aa0d210 Mon Sep 17 00:00:00 2001 From: "bw-ghapp[bot]" <178206702+bw-ghapp[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 12:03:50 +0000 Subject: [PATCH 3/3] Update API bindings - d03277323fb9957c3d8cc5ae2d17f07efc9ad0f3 --- crates/bitwarden-api-api/README.md | 2 +- crates/bitwarden-api-identity/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bitwarden-api-api/README.md b/crates/bitwarden-api-api/README.md index 6acf795a8..03c2e3fce 100644 --- a/crates/bitwarden-api-api/README.md +++ b/crates/bitwarden-api-api/README.md @@ -22,7 +22,7 @@ client. - API version: latest - Package version: 2.0.0 - Server Git commit: - [`04efe402bebc5aef3b06cd40c37474be0d114634`](https://github.com/bitwarden/server/commit/04efe402bebc5aef3b06cd40c37474be0d114634) + [`d03277323fb9957c3d8cc5ae2d17f07efc9ad0f3`](https://github.com/bitwarden/server/commit/d03277323fb9957c3d8cc5ae2d17f07efc9ad0f3) - Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index c0bdc5735..41bdcf272 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -22,7 +22,7 @@ client. - API version: v1 - Package version: 2.0.0 - Server Git commit: - [`04efe402bebc5aef3b06cd40c37474be0d114634`](https://github.com/bitwarden/server/commit/04efe402bebc5aef3b06cd40c37474be0d114634) + [`d03277323fb9957c3d8cc5ae2d17f07efc9ad0f3`](https://github.com/bitwarden/server/commit/d03277323fb9957c3d8cc5ae2d17f07efc9ad0f3) - Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen`