├── .cargo └── config.toml ├── .editorconfig ├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md ├── codecov.yml ├── renovate.json ├── secrets │ └── devid-app-cert.p12.gpg └── workflows │ ├── build-android.yml │ ├── build-rust-crates.yml │ ├── build-swift.yml │ ├── build-wasm-internal.yml │ ├── check-powerset.yml │ ├── cloc.yml │ ├── delete-old-packages.yml │ ├── direct-minimal-versions.yml │ ├── enforce-labels.yml │ ├── lint.yml │ ├── memory-testing.yml │ ├── minimum-rust-version.yml │ ├── publish-rust-crates.yml │ ├── publish-wasm-internal.yml │ ├── release-rust-crates.yml │ ├── release-swift.yml │ ├── rust-test.yml │ ├── rustdoc.yml │ ├── scan.yml │ └── version-bump.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── Cargo.lock ├── Cargo.toml ├── DISCLAIMER.md ├── LICENSE ├── LICENSE_GPL.txt ├── LICENSE_SDK.txt ├── README.md ├── SECURITY.md ├── about.hbs ├── about.toml ├── bacon.toml ├── bitwarden_license └── bitwarden-sm │ ├── Cargo.toml │ ├── README.md │ └── src │ ├── client_projects.rs │ ├── client_secrets.rs │ ├── error.rs │ ├── lib.rs │ ├── projects │ ├── create.rs │ ├── delete.rs │ ├── get.rs │ ├── list.rs │ ├── mod.rs │ ├── project_response.rs │ └── update.rs │ └── secrets │ ├── create.rs │ ├── delete.rs │ ├── get.rs │ ├── get_by_ids.rs │ ├── list.rs │ ├── mod.rs │ ├── secret_response.rs │ ├── sync.rs │ └── update.rs ├── clippy.toml ├── crates ├── bitwarden-api-api │ ├── .gitignore │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── apis │ │ ├── access_policies_api.rs │ │ ├── accounts_api.rs │ │ ├── accounts_billing_api.rs │ │ ├── accounts_key_management_api.rs │ │ ├── auth_requests_api.rs │ │ ├── ciphers_api.rs │ │ ├── collections_api.rs │ │ ├── config_api.rs │ │ ├── configuration.rs │ │ ├── counts_api.rs │ │ ├── devices_api.rs │ │ ├── emergency_access_api.rs │ │ ├── events_api.rs │ │ ├── folders_api.rs │ │ ├── groups_api.rs │ │ ├── hibp_api.rs │ │ ├── import_ciphers_api.rs │ │ ├── info_api.rs │ │ ├── installations_api.rs │ │ ├── invoices_api.rs │ │ ├── licenses_api.rs │ │ ├── misc_api.rs │ │ ├── mod.rs │ │ ├── notifications_api.rs │ │ ├── organization_auth_requests_api.rs │ │ ├── organization_billing_api.rs │ │ ├── organization_connections_api.rs │ │ ├── organization_domain_api.rs │ │ ├── organization_export_api.rs │ │ ├── organization_sponsorships_api.rs │ │ ├── organization_users_api.rs │ │ ├── organizations_api.rs │ │ ├── plans_api.rs │ │ ├── policies_api.rs │ │ ├── projects_api.rs │ │ ├── provider_billing_api.rs │ │ ├── provider_clients_api.rs │ │ ├── provider_organizations_api.rs │ │ ├── provider_users_api.rs │ │ ├── providers_api.rs │ │ ├── push_api.rs │ │ ├── reports_api.rs │ │ ├── request_sm_access_api.rs │ │ ├── secrets_api.rs │ │ ├── secrets_manager_events_api.rs │ │ ├── secrets_manager_porting_api.rs │ │ ├── security_task_api.rs │ │ ├── self_hosted_organization_licenses_api.rs │ │ ├── self_hosted_organization_sponsorships_api.rs │ │ ├── sends_api.rs │ │ ├── service_accounts_api.rs │ │ ├── settings_api.rs │ │ ├── stripe_api.rs │ │ ├── sync_api.rs │ │ ├── trash_api.rs │ │ ├── two_factor_api.rs │ │ ├── users_api.rs │ │ └── web_authn_api.rs │ │ ├── lib.rs │ │ └── models │ │ ├── access_policy_request.rs │ │ ├── access_token_create_request_model.rs │ │ ├── access_token_creation_response_model.rs │ │ ├── access_token_response_model.rs │ │ ├── access_token_response_model_list_response_model.rs │ │ ├── add_existing_organization_request_body.rs │ │ ├── admin_auth_request_update_request_model.rs │ │ ├── algorithm.rs │ │ ├── api_key_response_model.rs │ │ ├── assertion_options.rs │ │ ├── assertion_response.rs │ │ ├── attachment_request_model.rs │ │ ├── attachment_response_model.rs │ │ ├── attachment_upload_data_response_model.rs │ │ ├── attestation_conveyance_preference.rs │ │ ├── auth_request_create_request_model.rs │ │ ├── auth_request_response_model.rs │ │ ├── auth_request_response_model_list_response_model.rs │ │ ├── auth_request_type.rs │ │ ├── auth_request_update_request_model.rs │ │ ├── authentication_extensions_client_inputs.rs │ │ ├── authentication_extensions_client_outputs.rs │ │ ├── authenticator_assertion_raw_response.rs │ │ ├── authenticator_attachment.rs │ │ ├── authenticator_attestation_raw_response.rs │ │ ├── authenticator_selection.rs │ │ ├── authenticator_transport.rs │ │ ├── base_secret_response_model.rs │ │ ├── base_secret_response_model_list_response_model.rs │ │ ├── billing_customer_discount.rs │ │ ├── billing_history_response_model.rs │ │ ├── billing_invoice.rs │ │ ├── billing_payment_response_model.rs │ │ ├── billing_source.rs │ │ ├── billing_subscription.rs │ │ ├── billing_subscription_item.rs │ │ ├── billing_subscription_upcoming_invoice.rs │ │ ├── billing_transaction.rs │ │ ├── bit_pay_invoice_request_model.rs │ │ ├── bulk_collection_access_request_model.rs │ │ ├── bulk_create_security_tasks_request_model.rs │ │ ├── bulk_delete_response_model.rs │ │ ├── bulk_delete_response_model_list_response_model.rs │ │ ├── bulk_deny_admin_auth_request_request_model.rs │ │ ├── cipher.rs │ │ ├── cipher_attachment_model.rs │ │ ├── cipher_bulk_delete_request_model.rs │ │ ├── cipher_bulk_move_request_model.rs │ │ ├── cipher_bulk_restore_request_model.rs │ │ ├── cipher_bulk_share_request_model.rs │ │ ├── cipher_bulk_update_collections_request_model.rs │ │ ├── cipher_card_model.rs │ │ ├── cipher_collections_request_model.rs │ │ ├── cipher_create_request_model.rs │ │ ├── cipher_details_response_model.rs │ │ ├── cipher_details_response_model_list_response_model.rs │ │ ├── cipher_fido2_credential_model.rs │ │ ├── cipher_field_model.rs │ │ ├── cipher_identity_model.rs │ │ ├── cipher_login_model.rs │ │ ├── cipher_login_uri_model.rs │ │ ├── cipher_mini_details_response_model.rs │ │ ├── cipher_mini_details_response_model_list_response_model.rs │ │ ├── cipher_mini_response_model.rs │ │ ├── cipher_mini_response_model_list_response_model.rs │ │ ├── cipher_partial_request_model.rs │ │ ├── cipher_password_history_model.rs │ │ ├── cipher_permissions_response_model.rs │ │ ├── cipher_reprompt_type.rs │ │ ├── cipher_request_model.rs │ │ ├── cipher_response_model.rs │ │ ├── cipher_secure_note_model.rs │ │ ├── cipher_share_request_model.rs │ │ ├── cipher_ssh_key_model.rs │ │ ├── cipher_type.rs │ │ ├── cipher_with_id_request_model.rs │ │ ├── client_type.rs │ │ ├── collection_access_details_response_model.rs │ │ ├── collection_access_details_response_model_list_response_model.rs │ │ ├── collection_bulk_delete_request_model.rs │ │ ├── collection_details_response_model.rs │ │ ├── collection_details_response_model_list_response_model.rs │ │ ├── collection_request_model.rs │ │ ├── collection_response_model.rs │ │ ├── collection_response_model_list_response_model.rs │ │ ├── collection_with_id_request_model.rs │ │ ├── config_response_model.rs │ │ ├── create_client_organization_request_body.rs │ │ ├── credential_create_options.rs │ │ ├── delete_attachment_response_data.rs │ │ ├── delete_recover_request_model.rs │ │ ├── device_auth_request_response_model.rs │ │ ├── device_auth_request_response_model_list_response_model.rs │ │ ├── device_keys_request_model.rs │ │ ├── device_keys_update_request_model.rs │ │ ├── device_request_model.rs │ │ ├── device_response_model.rs │ │ ├── device_token_request_model.rs │ │ ├── device_type.rs │ │ ├── device_verification_request_model.rs │ │ ├── device_verification_response_model.rs │ │ ├── domains_response_model.rs │ │ ├── drop_password_health_report_application_request.rs │ │ ├── email_request_model.rs │ │ ├── email_token_request_model.rs │ │ ├── emergency_access_grantee_details_response_model.rs │ │ ├── emergency_access_grantee_details_response_model_list_response_model.rs │ │ ├── emergency_access_grantor_details_response_model.rs │ │ ├── emergency_access_grantor_details_response_model_list_response_model.rs │ │ ├── emergency_access_invite_request_model.rs │ │ ├── emergency_access_password_request_model.rs │ │ ├── emergency_access_status_type.rs │ │ ├── emergency_access_takeover_response_model.rs │ │ ├── emergency_access_type.rs │ │ ├── emergency_access_update_request_model.rs │ │ ├── emergency_access_view_response_model.rs │ │ ├── emergency_access_with_id_request_model.rs │ │ ├── environment_config_response_model.rs │ │ ├── event_response_model.rs │ │ ├── event_response_model_list_response_model.rs │ │ ├── event_system_user.rs │ │ ├── event_type.rs │ │ ├── expanded_tax_info_update_request_model.rs │ │ ├── fido2_user.rs │ │ ├── field_type.rs │ │ ├── file_upload_type.rs │ │ ├── folder_request_model.rs │ │ ├── folder_response_model.rs │ │ ├── folder_response_model_list_response_model.rs │ │ ├── folder_with_id_request_model.rs │ │ ├── get_secrets_request_model.rs │ │ ├── global_domains.rs │ │ ├── global_equivalent_domains_type.rs │ │ ├── granted_access_policy_request.rs │ │ ├── granted_project_access_policy_permission_details_response_model.rs │ │ ├── granted_project_access_policy_response_model.rs │ │ ├── group_access_policy_response_model.rs │ │ ├── group_bulk_request_model.rs │ │ ├── group_details_response_model.rs │ │ ├── group_details_response_model_list_response_model.rs │ │ ├── group_request_model.rs │ │ ├── group_response_model.rs │ │ ├── group_response_model_list_response_model.rs │ │ ├── import_ciphers_request_model.rs │ │ ├── import_organization_ciphers_request_model.rs │ │ ├── individual_password_manager_request_model.rs │ │ ├── inner_project_export_response_model.rs │ │ ├── inner_project_import_request_model.rs │ │ ├── inner_secret_export_response_model.rs │ │ ├── inner_secret_import_request_model.rs │ │ ├── installation_request_model.rs │ │ ├── installation_response_model.rs │ │ ├── int32_int32_key_value_pair.rs │ │ ├── kdf_request_model.rs │ │ ├── kdf_type.rs │ │ ├── key_model.rs │ │ ├── key_pair_request_body.rs │ │ ├── key_regeneration_request_model.rs │ │ ├── keys_request_model.rs │ │ ├── keys_response_model.rs │ │ ├── license_type.rs │ │ ├── master_password_policy_response_model.rs │ │ ├── member_access_details.rs │ │ ├── member_access_report_response_model.rs │ │ ├── member_cipher_details_response_model.rs │ │ ├── member_decryption_type.rs │ │ ├── mod.rs │ │ ├── notification_response_model.rs │ │ ├── notification_response_model_list_response_model.rs │ │ ├── open_id_connect_redirect_behavior.rs │ │ ├── optional_cipher_details_response_model.rs │ │ ├── organization_api_key_information.rs │ │ ├── organization_api_key_information_list_response_model.rs │ │ ├── organization_api_key_request_model.rs │ │ ├── organization_api_key_type.rs │ │ ├── organization_auth_request_update_many_request_model.rs │ │ ├── organization_auto_enroll_status_response_model.rs │ │ ├── organization_collection_management_update_request_model.rs │ │ ├── organization_connection_request_model.rs │ │ ├── organization_connection_response_model.rs │ │ ├── organization_connection_type.rs │ │ ├── organization_counts_response_model.rs │ │ ├── organization_create_request_model.rs │ │ ├── organization_domain_request_model.rs │ │ ├── organization_domain_response_model.rs │ │ ├── organization_domain_response_model_list_response_model.rs │ │ ├── organization_domain_sso_details_request_model.rs │ │ ├── organization_domain_sso_details_response_model.rs │ │ ├── organization_keys_request_model.rs │ │ ├── organization_keys_response_model.rs │ │ ├── organization_license.rs │ │ ├── organization_no_payment_create_request.rs │ │ ├── organization_password_manager_request_model.rs │ │ ├── organization_public_key_response_model.rs │ │ ├── organization_response_model.rs │ │ ├── organization_seat_request_model.rs │ │ ├── organization_sponsorship_create_request_model.rs │ │ ├── organization_sponsorship_redeem_request_model.rs │ │ ├── organization_sponsorship_request_model.rs │ │ ├── organization_sponsorship_response_model.rs │ │ ├── organization_sponsorship_sync_request_model.rs │ │ ├── organization_sponsorship_sync_response_model.rs │ │ ├── organization_sso_request_model.rs │ │ ├── organization_sso_response_model.rs │ │ ├── organization_subscription_response_model.rs │ │ ├── organization_subscription_update_request_model.rs │ │ ├── organization_update_request_model.rs │ │ ├── organization_upgrade_request_model.rs │ │ ├── organization_user_accept_init_request_model.rs │ │ ├── organization_user_accept_request_model.rs │ │ ├── organization_user_bulk_confirm_request_model.rs │ │ ├── organization_user_bulk_confirm_request_model_entry.rs │ │ ├── organization_user_bulk_request_model.rs │ │ ├── organization_user_bulk_response_model.rs │ │ ├── organization_user_bulk_response_model_list_response_model.rs │ │ ├── organization_user_confirm_request_model.rs │ │ ├── organization_user_details_response_model.rs │ │ ├── organization_user_invite_request_model.rs │ │ ├── organization_user_public_key_response_model.rs │ │ ├── organization_user_public_key_response_model_list_response_model.rs │ │ ├── organization_user_reset_password_details_response_model.rs │ │ ├── organization_user_reset_password_details_response_model_list_response_model.rs │ │ ├── organization_user_reset_password_enrollment_request_model.rs │ │ ├── organization_user_reset_password_request_model.rs │ │ ├── organization_user_status_type.rs │ │ ├── organization_user_type.rs │ │ ├── organization_user_update_request_model.rs │ │ ├── organization_user_user_details_response_model.rs │ │ ├── organization_user_user_details_response_model_list_response_model.rs │ │ ├── organization_user_user_mini_details_response_model.rs │ │ ├── organization_user_user_mini_details_response_model_list_response_model.rs │ │ ├── organization_verify_bank_request_model.rs │ │ ├── organization_verify_delete_recover_request_model.rs │ │ ├── other_device_keys_update_request_model.rs │ │ ├── password_health_report_application.rs │ │ ├── password_health_report_application_model.rs │ │ ├── password_hint_request_model.rs │ │ ├── password_manager_plan_features_response_model.rs │ │ ├── password_request_model.rs │ │ ├── payment_method_type.rs │ │ ├── payment_request_model.rs │ │ ├── payment_response_model.rs │ │ ├── pending_auth_request.rs │ │ ├── pending_organization_auth_request_response_model.rs │ │ ├── pending_organization_auth_request_response_model_list_response_model.rs │ │ ├── people_access_policies_request_model.rs │ │ ├── permissions.rs │ │ ├── plan_response_model.rs │ │ ├── plan_response_model_list_response_model.rs │ │ ├── plan_sponsorship_type.rs │ │ ├── plan_type.rs │ │ ├── policy_detail_response_model.rs │ │ ├── policy_request_model.rs │ │ ├── policy_response_model.rs │ │ ├── policy_response_model_list_response_model.rs │ │ ├── policy_type.rs │ │ ├── potential_grantee_response_model.rs │ │ ├── potential_grantee_response_model_list_response_model.rs │ │ ├── pre_validate_sponsorship_response_model.rs │ │ ├── preview_individual_invoice_request_body.rs │ │ ├── preview_organization_invoice_request_body.rs │ │ ├── priority.rs │ │ ├── product_tier_type.rs │ │ ├── profile_organization_response_model.rs │ │ ├── profile_organization_response_model_list_response_model.rs │ │ ├── profile_provider_organization_response_model.rs │ │ ├── profile_provider_response_model.rs │ │ ├── profile_response_model.rs │ │ ├── project_counts_response_model.rs │ │ ├── project_create_request_model.rs │ │ ├── project_people_access_policies_response_model.rs │ │ ├── project_response_model.rs │ │ ├── project_response_model_list_response_model.rs │ │ ├── project_service_accounts_access_policies_request_model.rs │ │ ├── project_service_accounts_access_policies_response_model.rs │ │ ├── project_update_request_model.rs │ │ ├── protected_device_response_model.rs │ │ ├── provider_organization_add_request_model.rs │ │ ├── provider_organization_create_request_model.rs │ │ ├── provider_organization_organization_details_response_model.rs │ │ ├── provider_organization_organization_details_response_model_list_response_model.rs │ │ ├── provider_organization_response_model.rs │ │ ├── provider_response_model.rs │ │ ├── provider_setup_request_model.rs │ │ ├── provider_status_type.rs │ │ ├── provider_type.rs │ │ ├── provider_update_request_model.rs │ │ ├── provider_user_accept_request_model.rs │ │ ├── provider_user_bulk_confirm_request_model.rs │ │ ├── provider_user_bulk_confirm_request_model_entry.rs │ │ ├── provider_user_bulk_request_model.rs │ │ ├── provider_user_bulk_response_model.rs │ │ ├── provider_user_bulk_response_model_list_response_model.rs │ │ ├── provider_user_confirm_request_model.rs │ │ ├── provider_user_invite_request_model.rs │ │ ├── provider_user_public_key_response_model.rs │ │ ├── provider_user_public_key_response_model_list_response_model.rs │ │ ├── provider_user_response_model.rs │ │ ├── provider_user_status_type.rs │ │ ├── provider_user_type.rs │ │ ├── provider_user_update_request_model.rs │ │ ├── provider_user_user_details_response_model.rs │ │ ├── provider_user_user_details_response_model_list_response_model.rs │ │ ├── provider_verify_delete_recover_request_model.rs │ │ ├── pub_key_cred_param.rs │ │ ├── public_key_credential_descriptor.rs │ │ ├── public_key_credential_rp_entity.rs │ │ ├── public_key_credential_type.rs │ │ ├── push_device_request_model.rs │ │ ├── push_registration_request_model.rs │ │ ├── push_send_request_model.rs │ │ ├── push_settings.rs │ │ ├── push_technology_type.rs │ │ ├── push_type.rs │ │ ├── push_update_request_model.rs │ │ ├── request_sm_access_request_model.rs │ │ ├── reset_password_with_org_id_request_model.rs │ │ ├── response_data.rs │ │ ├── revoke_access_tokens_request.rs │ │ ├── saml2_binding_type.rs │ │ ├── saml2_name_id_format.rs │ │ ├── saml2_signing_behavior.rs │ │ ├── secret_access_policies_requests_model.rs │ │ ├── secret_access_policies_response_model.rs │ │ ├── secret_create_request_model.rs │ │ ├── secret_response_inner_project.rs │ │ ├── secret_response_model.rs │ │ ├── secret_update_request_model.rs │ │ ├── secret_verification_request_model.rs │ │ ├── secret_with_projects_inner_project.rs │ │ ├── secret_with_projects_list_response_model.rs │ │ ├── secrets_manager_plan_features_response_model.rs │ │ ├── secrets_manager_request_model.rs │ │ ├── secrets_manager_subscribe_request_model.rs │ │ ├── secrets_manager_subscription_update_request_model.rs │ │ ├── secrets_sync_response_model.rs │ │ ├── secrets_with_projects_inner_secret.rs │ │ ├── secure_note_type.rs │ │ ├── security_task_create_request.rs │ │ ├── security_task_status.rs │ │ ├── security_task_type.rs │ │ ├── security_tasks_response_model.rs │ │ ├── security_tasks_response_model_list_response_model.rs │ │ ├── selection_read_only_request_model.rs │ │ ├── selection_read_only_response_model.rs │ │ ├── self_hosted_organization_license_request_model.rs │ │ ├── send_access_request_model.rs │ │ ├── send_file_model.rs │ │ ├── send_file_upload_data_response_model.rs │ │ ├── send_request_model.rs │ │ ├── send_response_model.rs │ │ ├── send_response_model_list_response_model.rs │ │ ├── send_text_model.rs │ │ ├── send_type.rs │ │ ├── send_with_id_request_model.rs │ │ ├── server_config_response_model.rs │ │ ├── server_settings_response_model.rs │ │ ├── service_account_access_policy_response_model.rs │ │ ├── service_account_counts_response_model.rs │ │ ├── service_account_create_request_model.rs │ │ ├── service_account_granted_policies_permission_details_response_model.rs │ │ ├── service_account_granted_policies_request_model.rs │ │ ├── service_account_people_access_policies_response_model.rs │ │ ├── service_account_response_model.rs │ │ ├── service_account_secrets_details_response_model.rs │ │ ├── service_account_secrets_details_response_model_list_response_model.rs │ │ ├── service_account_update_request_model.rs │ │ ├── set_key_connector_key_request_model.rs │ │ ├── set_password_request_model.rs │ │ ├── set_verify_devices_request_model.rs │ │ ├── sm_export_response_model.rs │ │ ├── sm_import_request_model.rs │ │ ├── sso_configuration_data.rs │ │ ├── sso_configuration_data_request.rs │ │ ├── sso_type.rs │ │ ├── sso_urls.rs │ │ ├── storage_request_model.rs │ │ ├── subscription_cancellation_request_model.rs │ │ ├── subscription_response_model.rs │ │ ├── sync_response_model.rs │ │ ├── tax_info_response_model.rs │ │ ├── tax_info_update_request_model.rs │ │ ├── tax_information_request_body.rs │ │ ├── tax_information_request_model.rs │ │ ├── tokenized_payment_source_request_body.rs │ │ ├── transaction_type.rs │ │ ├── two_factor_authenticator_disable_request_model.rs │ │ ├── two_factor_authenticator_response_model.rs │ │ ├── two_factor_duo_response_model.rs │ │ ├── two_factor_email_request_model.rs │ │ ├── two_factor_email_response_model.rs │ │ ├── two_factor_provider_request_model.rs │ │ ├── two_factor_provider_response_model.rs │ │ ├── two_factor_provider_response_model_list_response_model.rs │ │ ├── two_factor_provider_type.rs │ │ ├── two_factor_recover_response_model.rs │ │ ├── two_factor_recovery_request_model.rs │ │ ├── two_factor_web_authn_delete_request_model.rs │ │ ├── two_factor_web_authn_request_model.rs │ │ ├── two_factor_web_authn_response_model.rs │ │ ├── two_factor_yubi_key_response_model.rs │ │ ├── unauthenticated_secret_verification_request_model.rs │ │ ├── update_avatar_request_model.rs │ │ ├── update_client_organization_request_body.rs │ │ ├── update_devices_trust_request_model.rs │ │ ├── update_domains_request_model.rs │ │ ├── update_key_request_model.rs │ │ ├── update_payment_method_request_body.rs │ │ ├── update_profile_request_model.rs │ │ ├── update_tde_offboarding_password_request_model.rs │ │ ├── update_temp_password_request_model.rs │ │ ├── update_two_factor_authenticator_request_model.rs │ │ ├── update_two_factor_duo_request_model.rs │ │ ├── update_two_factor_email_request_model.rs │ │ ├── update_two_factor_yubico_otp_request_model.rs │ │ ├── uri_match_type.rs │ │ ├── user_access_policy_response_model.rs │ │ ├── user_key_response_model.rs │ │ ├── user_license.rs │ │ ├── user_verification_requirement.rs │ │ ├── verified_organization_domain_sso_detail_response_model.rs │ │ ├── verified_organization_domain_sso_details_response_model.rs │ │ ├── verify_bank_account_request_body.rs │ │ ├── verify_delete_recover_request_model.rs │ │ ├── verify_email_request_model.rs │ │ ├── verify_otp_request_model.rs │ │ ├── web_authn_credential_create_options_response_model.rs │ │ ├── web_authn_credential_response_model.rs │ │ ├── web_authn_credential_response_model_list_response_model.rs │ │ ├── web_authn_login_assertion_options_response_model.rs │ │ ├── web_authn_login_credential_create_request_model.rs │ │ ├── web_authn_login_credential_update_request_model.rs │ │ ├── web_authn_login_rotate_key_request_model.rs │ │ ├── web_authn_prf_status.rs │ │ └── web_push_auth_request_model.rs ├── bitwarden-api-identity │ ├── .gitignore │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── apis │ │ ├── accounts_api.rs │ │ ├── configuration.rs │ │ ├── info_api.rs │ │ ├── mod.rs │ │ └── sso_api.rs │ │ ├── lib.rs │ │ └── models │ │ ├── assertion_options.rs │ │ ├── authentication_extensions_client_inputs.rs │ │ ├── authenticator_transport.rs │ │ ├── kdf_type.rs │ │ ├── keys_request_model.rs │ │ ├── mod.rs │ │ ├── prelogin_request_model.rs │ │ ├── prelogin_response_model.rs │ │ ├── product_tier_type.rs │ │ ├── product_type.rs │ │ ├── public_key_credential_descriptor.rs │ │ ├── public_key_credential_type.rs │ │ ├── register_finish_request_model.rs │ │ ├── register_request_model.rs │ │ ├── register_response_model.rs │ │ ├── register_send_verification_email_request_model.rs │ │ ├── register_verification_email_clicked_request_model.rs │ │ ├── trial_send_verification_email_request_model.rs │ │ ├── user_verification_requirement.rs │ │ └── web_authn_login_assertion_options_response_model.rs ├── bitwarden-cli │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── color.rs │ │ └── lib.rs ├── bitwarden-core │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── .gitignore │ │ ├── admin_console │ │ │ ├── mod.rs │ │ │ └── policy.rs │ │ ├── auth │ │ │ ├── access_token.rs │ │ │ ├── api │ │ │ │ ├── mod.rs │ │ │ │ ├── request │ │ │ │ │ ├── access_token_request.rs │ │ │ │ │ ├── api_token_request.rs │ │ │ │ │ ├── auth_request_token_request.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── password_token_request.rs │ │ │ │ │ └── renew_token_request.rs │ │ │ │ └── response │ │ │ │ │ ├── identity_captcha_response.rs │ │ │ │ │ ├── identity_payload_response.rs │ │ │ │ │ ├── identity_refresh_response.rs │ │ │ │ │ ├── identity_success_response.rs │ │ │ │ │ ├── identity_token_fail_response.rs │ │ │ │ │ ├── identity_token_response.rs │ │ │ │ │ ├── identity_two_factor_response.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── two_factor_provider_data │ │ │ │ │ ├── authenticator.rs │ │ │ │ │ ├── duo.rs │ │ │ │ │ ├── email.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── organization_duo.rs │ │ │ │ │ ├── remember.rs │ │ │ │ │ ├── web_authn.rs │ │ │ │ │ └── yubi_key.rs │ │ │ │ │ └── two_factor_providers.rs │ │ │ ├── auth_client.rs │ │ │ ├── auth_request.rs │ │ │ ├── jwt_token.rs │ │ │ ├── key_connector.rs │ │ │ ├── login │ │ │ │ ├── access_token.rs │ │ │ │ ├── api_key.rs │ │ │ │ ├── auth_request.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── password.rs │ │ │ │ ├── prelogin.rs │ │ │ │ ├── response │ │ │ │ │ ├── captcha_response.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── two_factor │ │ │ │ │ │ ├── authenticator.rs │ │ │ │ │ │ ├── duo.rs │ │ │ │ │ │ ├── email.rs │ │ │ │ │ │ ├── mod.rs │ │ │ │ │ │ ├── remember.rs │ │ │ │ │ │ ├── two_factor_providers.rs │ │ │ │ │ │ ├── web_authn.rs │ │ │ │ │ │ └── yubi_key.rs │ │ │ │ └── two_factor.rs │ │ │ ├── mod.rs │ │ │ ├── password │ │ │ │ ├── mod.rs │ │ │ │ ├── policy.rs │ │ │ │ ├── strength.rs │ │ │ │ └── validate.rs │ │ │ ├── pin.rs │ │ │ ├── register.rs │ │ │ ├── renew.rs │ │ │ └── tde.rs │ │ ├── client │ │ │ ├── client.rs │ │ │ ├── client_settings.rs │ │ │ ├── encryption_settings.rs │ │ │ ├── flags.rs │ │ │ ├── internal.rs │ │ │ ├── login_method.rs │ │ │ ├── mod.rs │ │ │ └── test_accounts.rs │ │ ├── error.rs │ │ ├── ids.rs │ │ ├── key_management │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── mobile │ │ │ ├── client_kdf.rs │ │ │ ├── crypto.rs │ │ │ ├── crypto_client.rs │ │ │ ├── kdf.rs │ │ │ └── mod.rs │ │ ├── platform │ │ │ ├── generate_fingerprint.rs │ │ │ ├── get_user_api_key.rs │ │ │ ├── mod.rs │ │ │ ├── platform_client.rs │ │ │ └── secret_verification_request.rs │ │ ├── secrets_manager │ │ │ ├── mod.rs │ │ │ └── state.rs │ │ ├── uniffi_support.rs │ │ └── util.rs │ ├── tests │ │ └── register.rs │ └── uniffi.toml ├── bitwarden-crypto │ ├── Cargo.toml │ ├── README.md │ ├── benches │ │ ├── default_allocator.rs │ │ └── zeroizing_allocator.rs │ ├── src │ │ ├── aes.rs │ │ ├── cose.rs │ │ ├── enc_string │ │ │ ├── asymmetric.rs │ │ │ ├── mod.rs │ │ │ └── symmetric.rs │ │ ├── error.rs │ │ ├── fingerprint.rs │ │ ├── keys │ │ │ ├── asymmetric_crypto_key.rs │ │ │ ├── device_key.rs │ │ │ ├── kdf.rs │ │ │ ├── key_encryptable.rs │ │ │ ├── key_id.rs │ │ │ ├── master_key.rs │ │ │ ├── mod.rs │ │ │ ├── pin_key.rs │ │ │ ├── shareable_key.rs │ │ │ ├── symmetric_crypto_key.rs │ │ │ ├── user_key.rs │ │ │ └── utils.rs │ │ ├── lib.rs │ │ ├── rsa.rs │ │ ├── store │ │ │ ├── backend │ │ │ │ ├── implementation │ │ │ │ │ ├── basic.rs │ │ │ │ │ └── mod.rs │ │ │ │ └── mod.rs │ │ │ ├── context.rs │ │ │ └── mod.rs │ │ ├── traits │ │ │ ├── decryptable.rs │ │ │ ├── encryptable.rs │ │ │ ├── key_id.rs │ │ │ └── mod.rs │ │ ├── uniffi_support.rs │ │ ├── util.rs │ │ ├── wordlist.rs │ │ └── xchacha20.rs │ └── uniffi.toml ├── bitwarden-error-macro │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── args.rs │ │ ├── attribute.rs │ │ ├── basic │ │ ├── attribute.rs │ │ └── mod.rs │ │ ├── flat │ │ ├── attribute.rs │ │ └── mod.rs │ │ ├── full │ │ ├── attribute.rs │ │ └── mod.rs │ │ └── lib.rs ├── bitwarden-error │ ├── .cargo │ │ └── config │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── flat_error.rs │ │ ├── lib.rs │ │ └── wasm.rs │ └── tests │ │ ├── basic.rs │ │ ├── compilation_tests │ │ ├── full.rs │ │ └── full.stderr │ │ ├── flat.rs │ │ ├── full.rs │ │ └── mod.rs ├── bitwarden-exporters │ ├── Cargo.toml │ ├── README.md │ ├── resources │ │ └── json_export.json │ ├── src │ │ ├── csv.rs │ │ ├── cxf │ │ │ ├── card.rs │ │ │ ├── error.rs │ │ │ ├── export.rs │ │ │ ├── import.rs │ │ │ ├── login.rs │ │ │ └── mod.rs │ │ ├── encrypted_json.rs │ │ ├── error.rs │ │ ├── export.rs │ │ ├── exporter_client.rs │ │ ├── json.rs │ │ ├── lib.rs │ │ ├── models.rs │ │ └── uniffi_support.rs │ └── uniffi.toml ├── bitwarden-fido │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── authenticator.rs │ │ ├── client.rs │ │ ├── client_fido.rs │ │ ├── crypto.rs │ │ ├── lib.rs │ │ ├── traits.rs │ │ ├── types.rs │ │ └── uniffi_support.rs │ └── uniffi.toml ├── bitwarden-generators │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── generator_client.rs │ │ ├── lib.rs │ │ ├── passphrase.rs │ │ ├── password.rs │ │ ├── username.rs │ │ ├── username_forwarders │ │ │ ├── addyio.rs │ │ │ ├── duckduckgo.rs │ │ │ ├── fastmail.rs │ │ │ ├── firefox.rs │ │ │ ├── forwardemail.rs │ │ │ ├── mod.rs │ │ │ └── simplelogin.rs │ │ └── util.rs │ └── uniffi.toml ├── bitwarden-ipc │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── endpoint.rs │ │ ├── error.rs │ │ ├── ipc_client.rs │ │ ├── lib.rs │ │ ├── message.rs │ │ ├── traits │ │ ├── communication_backend.rs │ │ ├── crypto_provider.rs │ │ ├── mod.rs │ │ └── session_repository.rs │ │ └── wasm │ │ ├── communication_backend.rs │ │ ├── error.rs │ │ ├── ipc_client.rs │ │ ├── message.rs │ │ └── mod.rs ├── bitwarden-send │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── error.rs │ │ ├── lib.rs │ │ ├── send.rs │ │ ├── send_client.rs │ │ └── uniffi_support.rs │ └── uniffi.toml ├── bitwarden-ssh │ ├── Cargo.toml │ ├── README.md │ ├── resources │ │ ├── generator │ │ │ ├── ed25519_key │ │ │ ├── rsa3072_key │ │ │ └── rsa4096_key │ │ └── import │ │ │ ├── ecdsa_openssh_unencrypted │ │ │ ├── ecdsa_openssh_unencrypted.pub │ │ │ ├── ed25519_openssh_encrypted │ │ │ ├── ed25519_openssh_encrypted.pub │ │ │ ├── ed25519_openssh_unencrypted │ │ │ ├── ed25519_openssh_unencrypted.pub │ │ │ ├── ed25519_pkcs8_unencrypted │ │ │ ├── ed25519_pkcs8_unencrypted.pub │ │ │ ├── ed25519_putty_openssh_unencrypted │ │ │ ├── rsa_openssh_encrypted │ │ │ ├── rsa_openssh_encrypted.pub │ │ │ ├── rsa_openssh_unencrypted │ │ │ ├── rsa_openssh_unencrypted.pub │ │ │ ├── rsa_pkcs8_encrypted │ │ │ ├── rsa_pkcs8_encrypted.pub │ │ │ ├── rsa_pkcs8_unencrypted │ │ │ ├── rsa_pkcs8_unencrypted.pub │ │ │ ├── rsa_putty_openssh_unencrypted │ │ │ ├── rsa_putty_pkcs1_unencrypted │ │ │ └── wrong_label │ ├── src │ │ ├── error.rs │ │ ├── generator.rs │ │ ├── import.rs │ │ └── lib.rs │ └── uniffi.toml ├── bitwarden-threading │ ├── .cargo │ │ └── config │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── cancellation_token.rs │ │ ├── lib.rs │ │ ├── thread_bound_runner.rs │ │ └── time.rs │ └── tests │ │ ├── cancellation_token │ │ ├── mod.rs │ │ └── wasm.rs │ │ ├── mod.rs │ │ └── thread_bound_runner │ │ ├── mod.rs │ │ ├── standard_tokio.rs │ │ └── wasm.rs ├── bitwarden-uniffi │ ├── Cargo.toml │ ├── README.md │ ├── kotlin │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── bitwarden │ │ │ │ │ └── myapplication │ │ │ │ │ ├── Biometrics.kt │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── ui │ │ │ │ │ └── theme │ │ │ │ │ ├── Color.kt │ │ │ │ │ ├── Theme.kt │ │ │ │ │ └── Type.kt │ │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ │ └── xml │ │ │ │ ├── backup_rules.xml │ │ │ │ ├── data_extraction_rules.xml │ │ │ │ └── network_security_config.xml │ │ ├── build-schemas.sh │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── publish-local.sh │ │ ├── sdk │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── consumer-rules.pro │ │ │ ├── lint-baseline.xml │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── jniLibs │ │ │ │ │ └── .gitignore │ │ │ │ └── resources │ │ │ │ │ └── META-INF │ │ │ │ │ └── LICENSE_GPL.txt │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── bitwarden │ │ │ │ └── sdk │ │ │ │ └── ExampleUnitTest.kt │ │ └── settings.gradle │ ├── src │ │ ├── android_support.rs │ │ ├── auth │ │ │ └── mod.rs │ │ ├── crypto.rs │ │ ├── error.rs │ │ ├── lib.rs │ │ ├── platform │ │ │ ├── fido2.rs │ │ │ └── mod.rs │ │ ├── tool │ │ │ ├── mod.rs │ │ │ ├── sends.rs │ │ │ └── ssh.rs │ │ ├── uniffi_support.rs │ │ └── vault │ │ │ ├── attachments.rs │ │ │ ├── ciphers.rs │ │ │ ├── collections.rs │ │ │ ├── folders.rs │ │ │ ├── mod.rs │ │ │ └── password_history.rs │ ├── swift │ │ ├── LICENSE_GPL.txt │ │ ├── Package.swift │ │ ├── README.md │ │ ├── Sources │ │ │ └── BitwardenSdk │ │ │ │ └── .gitignore │ │ ├── Tests │ │ │ └── BitwardenSdkTests │ │ │ │ └── BitwardenSdkTests.swift │ │ ├── build.sh │ │ └── iOS │ │ │ ├── App.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── App.xcscheme │ │ │ ├── App │ │ │ ├── Assets.xcassets │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Biometrics.swift │ │ │ ├── ContentView.swift │ │ │ ├── Preview Content │ │ │ │ └── Preview Assets.xcassets │ │ │ │ │ └── Contents.json │ │ │ └── testApp.swift │ │ │ └── swift-format.json │ └── uniffi.toml ├── bitwarden-uuid-macro │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── lib.rs ├── bitwarden-uuid │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ └── lib.rs │ └── tests │ │ └── uuid.rs ├── bitwarden-vault │ ├── Cargo.toml │ ├── README.md │ ├── src │ │ ├── cipher │ │ │ ├── attachment.rs │ │ │ ├── attachment_client.rs │ │ │ ├── card.rs │ │ │ ├── cipher.rs │ │ │ ├── cipher_client.rs │ │ │ ├── cipher_permissions.rs │ │ │ ├── field.rs │ │ │ ├── identity.rs │ │ │ ├── linked_id.rs │ │ │ ├── local_data.rs │ │ │ ├── login.rs │ │ │ ├── mod.rs │ │ │ ├── secure_note.rs │ │ │ └── ssh_key.rs │ │ ├── collection.rs │ │ ├── collection_client.rs │ │ ├── domain.rs │ │ ├── error.rs │ │ ├── folder.rs │ │ ├── folder_client.rs │ │ ├── lib.rs │ │ ├── password_history.rs │ │ ├── password_history_client.rs │ │ ├── sync.rs │ │ ├── totp.rs │ │ ├── totp_client.rs │ │ ├── uniffi_support.rs │ │ └── vault_client.rs │ └── uniffi.toml ├── bitwarden-wasm-internal │ ├── Cargo.toml │ ├── README.md │ ├── build.rs │ ├── build.sh │ ├── npm │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── package-lock.json │ │ └── package.json │ └── src │ │ ├── client.rs │ │ ├── crypto.rs │ │ ├── custom_types.rs │ │ ├── init.rs │ │ ├── lib.rs │ │ ├── pure_crypto.rs │ │ └── ssh.rs ├── bw │ ├── Cargo.toml │ ├── README.md │ └── src │ │ ├── auth │ │ ├── login.rs │ │ └── mod.rs │ │ ├── main.rs │ │ └── render.rs ├── memory-testing │ ├── .gitignore │ ├── Cargo.toml │ ├── Dockerfile │ ├── Dockerfile.dockerignore │ ├── cases.json │ ├── run_test.sh │ └── src │ │ ├── bin │ │ ├── analyze-dumps.rs │ │ └── capture-dumps.rs │ │ ├── lib.rs │ │ └── main.rs └── uniffi-bindgen │ ├── Cargo.toml │ └── uniffi-bindgen.rs ├── openapitools.json ├── package-lock.json ├── package.json ├── rust-toolchain.toml ├── rustfmt.toml └── support ├── build-api.sh └── openapi-template ├── .travis.yml ├── Cargo.mustache ├── README.mustache ├── api_doc.mustache ├── git_push.sh.mustache ├── gitignore.mustache ├── hyper ├── api.mustache ├── api_mod.mustache ├── client.mustache └── configuration.mustache ├── lib.mustache ├── model.mustache ├── model_doc.mustache ├── model_mod.mustache ├── partial_header.mustache ├── request.rs └── reqwest ├── api.mustache ├── api_mod.mustache └── configuration.mustache /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [resolver] 2 | incompatible-rust-versions = "fallback" 3 | 4 | [target.'cfg(target_arch="aarch64")'] 5 | rustflags = ["--cfg", "aes_armv8"] 6 | 7 | [target.wasm32-unknown-unknown] 8 | rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] 9 | runner = 'wasm-bindgen-test-runner' 10 | 11 | # Enable support for 16k pages on Android, JNA is using these same flags 12 | # https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html 13 | # https://github.com/java-native-access/jna/issues/1647 14 | [target.'cfg(target_os = "android")'] 15 | rustflags = [ 16 | "-C", 17 | "link-arg=-Wl,-z,max-page-size=16384", 18 | "-C", 19 | "link-arg=-Wl,-z,common-page-size=16384", 20 | ] 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.{js,ts,scss,html}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.ts] 16 | quote_type = double 17 | 18 | [*.rs] 19 | indent_style = space 20 | indent_size = 4 21 | 22 | [*.{kt,java,xml,gradle}] 23 | indent_style = space 24 | indent_size = 4 25 | 26 | [*.xml] 27 | # VS Code XML extension removes the final newline 28 | insert_final_newline = false 29 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Please sort into logical groups with comment headers. Sort groups in order of specificity. 2 | # For example, default owners should always be the first group. 3 | # Sort lines alphabetically within these groups to avoid accidentally adding duplicates. 4 | # 5 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 6 | 7 | # Platform is the default owner for all files 8 | * @bitwarden/team-platform-dev 9 | 10 | crates/bitwarden-vault/** @bitwarden/team-vault-dev @bitwarden/team-platform-dev 11 | 12 | # BRE for publish workflow changes 13 | .github/workflows/publish-*.yml @bitwarden/dept-bre 14 | .github/workflows/release-rust-crates.yml @bitwarden/dept-bre 15 | .github/workflows/release-swift.yml @bitwarden/dept-bre 16 | 17 | ## Multiple owners 18 | .github/workflows/build-* @bitwarden/team-platform-dev 19 | .github/workflows/version-bump.yml @bitwarden/team-platform-dev 20 | -------------------------------------------------------------------------------- /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "crates/sdk-schemas" # Tool 3 | - "crates/uniffi-bindgen" # Tool 4 | - "crates/memory-testing" # Testing 5 | -------------------------------------------------------------------------------- /.github/secrets/devid-app-cert.p12.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/.github/secrets/devid-app-cert.p12.gpg -------------------------------------------------------------------------------- /.github/workflows/cloc.yml: -------------------------------------------------------------------------------- 1 | name: CLOC 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: ["main"] 7 | pull_request: 8 | 9 | jobs: 10 | cloc: 11 | name: CLOC 12 | runs-on: ubuntu-24.04 13 | steps: 14 | - name: Checkout repo 15 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | 17 | - name: Set up cloc 18 | run: | 19 | sudo apt update 20 | sudo apt -y install cloc 21 | 22 | - name: Print lines of code 23 | run: cloc --vcs git 24 | -------------------------------------------------------------------------------- /.github/workflows/delete-old-packages.yml: -------------------------------------------------------------------------------- 1 | name: Delete old packages 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | workflow_dispatch: 7 | 8 | defaults: 9 | run: 10 | shell: bash 11 | 12 | jobs: 13 | delete: 14 | name: Cleanup Android SDK 15 | runs-on: ubuntu-24.04 16 | steps: 17 | - name: Delete packages 18 | uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0 19 | with: 20 | package-name: com.bitwarden.sdk-android 21 | package-type: maven 22 | min-versions-to-keep: 25 23 | 24 | # Ignore versions only containing version numbers 25 | ignore-versions: '^\d*\.\d*\.\d*(-SNAPSHOT)?$' 26 | -------------------------------------------------------------------------------- /.github/workflows/enforce-labels.yml: -------------------------------------------------------------------------------- 1 | name: Enforce PR labels 2 | 3 | on: 4 | workflow_call: 5 | pull_request: 6 | types: [labeled, unlabeled, opened, edited, synchronize] 7 | jobs: 8 | enforce-label: 9 | name: EnforceLabel 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Enforce Label 13 | uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2 14 | with: 15 | BANNED_LABELS: "hold,needs-qa" 16 | BANNED_LABELS_DESCRIPTION: "PRs with the hold or needs-qa labels cannot be merged" 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .DS_Store 3 | .pytest_cache 4 | .vscode/c_cpp_properties.json 5 | 6 | # Build results 7 | [Dd]ebug/ 8 | [Dd]ebugPublic/ 9 | [Rr]elease/ 10 | [Rr]eleases/ 11 | x64/ 12 | x86/ 13 | build/ 14 | bld/ 15 | [Oo]bj/ 16 | *.wasm 17 | 18 | # Binary files 19 | *.dylib 20 | *.a 21 | *.so 22 | *.dll 23 | *.class 24 | 25 | # Editor directories and files 26 | .idea 27 | xcuserdata/ 28 | 29 | # Added by cargo 30 | # 31 | # already existing elements were commented out 32 | 33 | #/target 34 | node_modules/ 35 | 36 | # Third party license 37 | THIRDPARTY.html 38 | 39 | # Uniffi 40 | crates/bitwarden-uniffi/swift/BitwardenFFI.xcframework 41 | crates/bitwarden-uniffi/swift/tmp 42 | crates/bitwarden-uniffi/swift/.build 43 | crates/bitwarden-uniffi/swift/.swiftpm 44 | crates/bitwarden-uniffi/kotlin/sdk/src/main/java/com/bitwarden/**/*.kt 45 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | target 2 | schemas 3 | about.hbs 4 | 5 | # Language bindings 6 | crates/bitwarden-wasm-internal/npm/bitwarden_wasm_internal_bg.wasm.js 7 | crates/bitwarden-uniffi/kotlin/* 8 | crates/bitwarden-uniffi/swift/* 9 | 10 | # Test fixtures 11 | crates/bitwarden-exporters/resources/* 12 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "overrides": [ 4 | { 5 | "files": "*.md", 6 | "options": { 7 | "proseWrap": "always" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "ms-dotnettools.csharp", 6 | "MS-vsliveshare.vsliveshare", 7 | "rust-lang.rust-analyzer", 8 | "streetsidesoftware.code-spell-checker", 9 | "tamasfe.even-better-toml", 10 | "vadimcn.vscode-lldb" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "bindgen", 4 | "Bitwarden", 5 | "Cdecl", 6 | "chrono", 7 | "ciphertext", 8 | "cloc", 9 | "COSE", 10 | "dealloc", 11 | "Decapsulates", 12 | "decapsulation", 13 | "decryptable", 14 | "dylib", 15 | "encryptable", 16 | "Hkdf", 17 | "Hmac", 18 | "Maybeable", 19 | "Oaep", 20 | "Pbkdf", 21 | "PKCS8", 22 | "repr", 23 | "reprompt", 24 | "reqwest", 25 | "rotateable", 26 | "schemars", 27 | "spki", 28 | "totp", 29 | "uniffi", 30 | "wordlist", 31 | "XCHACHA", 32 | "Zeroize", 33 | "Zeroizing", 34 | "zxcvbn" 35 | ], 36 | "rust-analyzer.cargo.targetDir": true 37 | } 38 | -------------------------------------------------------------------------------- /DISCLAIMER.md: -------------------------------------------------------------------------------- 1 | This is an internal crate for the Bitwarden SDK. Do not depend on this directly and use the 2 | [`bitwarden`](https://crates.io/crates/bitwarden) crate instead. 3 | 4 | This crate does not follow semantic versioning and the public interface may change at any time. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Source code in this repository is covered by one of two licenses: 2 | (i) the GNU General Public License (GPL) v3.0 3 | (ii) the BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE v1.0. 4 | 5 | The default license throughout the repository is your choice of GPL v3.0 OR 6 | BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE unless the header specifies another 7 | license. Anything contained within a directory named bitwarden_license is 8 | covered solely by the BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE. 9 | 10 | GPL v3.0: 11 | https://github.com/bitwarden/sdk-internal/blob/main/LICENSE_GPL.txt 12 | 13 | BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE v1.0: 14 | https://github.com/bitwarden/sdk-internal/blob/main/LICENSE_SDK.txt 15 | 16 | No grant of any rights in the trademarks, service marks, or logos of Bitwarden is 17 | made (except as may be necessary to comply with the notice requirements as 18 | applicable), and use of any Bitwarden trademarks must comply with Bitwarden 19 | Trademark Guidelines 20 | . 21 | -------------------------------------------------------------------------------- /about.toml: -------------------------------------------------------------------------------- 1 | accepted = [ 2 | "MIT", 3 | "ISC", 4 | "BSD-2-Clause", 5 | "BSD-3-Clause", 6 | "CC0-1.0", 7 | "Apache-2.0", 8 | "MPL-2.0", 9 | "LGPL-3.0", 10 | "Unicode-DFS-2016", 11 | "OpenSSL", 12 | ] 13 | 14 | # Ring has all the licenses combined into a single file, which causes cargo about to 15 | # be confused about it. Thankfully it includes a workaround for this that we can enable. 16 | workarounds = ["ring"] 17 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-sm" 3 | description = """ 4 | Internal crate for the bitwarden crate. Do not use. 5 | """ 6 | 7 | version.workspace = true 8 | authors.workspace = true 9 | edition.workspace = true 10 | rust-version.workspace = true 11 | homepage.workspace = true 12 | repository.workspace = true 13 | license-file = "../../LICENSE_SDK.txt" 14 | keywords.workspace = true 15 | 16 | [dependencies] 17 | bitwarden-api-api = { workspace = true } 18 | bitwarden-core = { workspace = true, features = ["secrets"] } 19 | bitwarden-crypto = { workspace = true } 20 | chrono = { workspace = true } 21 | log = { workspace = true } 22 | schemars = { workspace = true } 23 | serde = { workspace = true } 24 | serde_json = { workspace = true } 25 | thiserror = { workspace = true } 26 | uuid = { workspace = true } 27 | validator = { workspace = true } 28 | 29 | [dev-dependencies] 30 | tokio = { workspace = true, features = ["rt"] } 31 | wiremock = "0.6.0" 32 | 33 | [lints] 34 | workspace = true 35 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/README.md: -------------------------------------------------------------------------------- 1 | # bitwarden-sm 2 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | mod client_projects; 4 | mod client_secrets; 5 | mod error; 6 | #[allow(missing_docs)] 7 | pub mod projects; 8 | #[allow(missing_docs)] 9 | pub mod secrets; 10 | 11 | pub use client_projects::{ClientProjects, ClientProjectsExt, ProjectsClient, ProjectsClientExt}; 12 | pub use client_secrets::{ClientSecrets, ClientSecretsExt, SecretsClient, SecretsClientExt}; 13 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/src/projects/get.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_core::client::Client; 2 | use schemars::JsonSchema; 3 | use serde::{Deserialize, Serialize}; 4 | use uuid::Uuid; 5 | 6 | use crate::{error::SecretsManagerError, projects::ProjectResponse}; 7 | 8 | #[allow(missing_docs)] 9 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 10 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 11 | pub struct ProjectGetRequest { 12 | /// ID of the project to retrieve 13 | pub id: Uuid, 14 | } 15 | 16 | pub(crate) async fn get_project( 17 | client: &Client, 18 | input: &ProjectGetRequest, 19 | ) -> Result { 20 | let config = client.internal.get_api_configurations().await; 21 | 22 | let res = bitwarden_api_api::apis::projects_api::projects_id_get(&config.api, input.id).await?; 23 | 24 | let key_store = client.internal.get_key_store(); 25 | 26 | ProjectResponse::process_response(res, &mut key_store.context()) 27 | } 28 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/src/projects/mod.rs: -------------------------------------------------------------------------------- 1 | mod create; 2 | mod delete; 3 | mod get; 4 | mod list; 5 | mod project_response; 6 | mod update; 7 | 8 | pub(crate) use create::create_project; 9 | pub use create::ProjectCreateRequest; 10 | pub(crate) use delete::delete_projects; 11 | pub use delete::{ProjectsDeleteRequest, ProjectsDeleteResponse}; 12 | pub(crate) use get::get_project; 13 | pub use get::ProjectGetRequest; 14 | pub(crate) use list::list_projects; 15 | pub use list::{ProjectsListRequest, ProjectsResponse}; 16 | pub use project_response::ProjectResponse; 17 | pub(crate) use update::update_project; 18 | pub use update::ProjectPutRequest; 19 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/src/secrets/get.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_core::Client; 2 | use schemars::JsonSchema; 3 | use serde::{Deserialize, Serialize}; 4 | use uuid::Uuid; 5 | 6 | use crate::{error::SecretsManagerError, secrets::SecretResponse}; 7 | 8 | #[allow(missing_docs)] 9 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 10 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 11 | pub struct SecretGetRequest { 12 | /// ID of the secret to retrieve 13 | pub id: Uuid, 14 | } 15 | 16 | pub(crate) async fn get_secret( 17 | client: &Client, 18 | input: &SecretGetRequest, 19 | ) -> Result { 20 | let config = client.internal.get_api_configurations().await; 21 | let res = bitwarden_api_api::apis::secrets_api::secrets_id_get(&config.api, input.id).await?; 22 | 23 | let key_store = client.internal.get_key_store(); 24 | 25 | SecretResponse::process_response(res, &mut key_store.context()) 26 | } 27 | -------------------------------------------------------------------------------- /bitwarden_license/bitwarden-sm/src/secrets/mod.rs: -------------------------------------------------------------------------------- 1 | mod create; 2 | mod delete; 3 | mod get; 4 | mod get_by_ids; 5 | mod list; 6 | mod secret_response; 7 | mod sync; 8 | mod update; 9 | 10 | pub(crate) use create::create_secret; 11 | pub use create::SecretCreateRequest; 12 | pub(crate) use delete::delete_secrets; 13 | pub use delete::{SecretsDeleteRequest, SecretsDeleteResponse}; 14 | pub(crate) use get::get_secret; 15 | pub use get::SecretGetRequest; 16 | pub(crate) use get_by_ids::get_secrets_by_ids; 17 | pub use get_by_ids::SecretsGetRequest; 18 | pub(crate) use list::{list_secrets, list_secrets_by_project}; 19 | pub use list::{ 20 | SecretIdentifiersByProjectRequest, SecretIdentifiersRequest, SecretIdentifiersResponse, 21 | }; 22 | pub use secret_response::{SecretResponse, SecretsResponse}; 23 | pub(crate) use sync::sync_secrets; 24 | pub use sync::{SecretsSyncRequest, SecretsSyncResponse}; 25 | pub(crate) use update::update_secret; 26 | pub use update::SecretPutRequest; 27 | -------------------------------------------------------------------------------- /clippy.toml: -------------------------------------------------------------------------------- 1 | allow-unwrap-in-tests=true 2 | allow-expect-in-tests=true 3 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.10.0 2 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-api-api" 3 | description = "Api bindings for the Bitwarden API." 4 | categories = ["api-bindings"] 5 | 6 | version.workspace = true 7 | authors.workspace = true 8 | edition.workspace = true 9 | rust-version.workspace = true 10 | homepage.workspace = true 11 | repository.workspace = true 12 | license-file.workspace = true 13 | keywords.workspace = true 14 | 15 | [dependencies] 16 | reqwest = { workspace = true } 17 | serde = { workspace = true } 18 | serde_json = { workspace = true } 19 | serde_repr = { workspace = true } 20 | serde_with = { version = ">=3.8, <4", default-features = false, features = [ 21 | "base64", 22 | "std", 23 | "macros", 24 | ] } 25 | url = ">=2.5, <3" 26 | uuid = { workspace = true } 27 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(unused_imports, unused_variables, unused_mut, non_camel_case_types)] 2 | #![allow( 3 | clippy::too_many_arguments, 4 | clippy::empty_docs, 5 | clippy::to_string_in_format_args 6 | )] 7 | 8 | extern crate reqwest; 9 | extern crate serde; 10 | extern crate serde_json; 11 | extern crate url; 12 | 13 | pub mod apis; 14 | pub mod models; 15 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/access_policy_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AccessPolicyRequest { 17 | #[serde(rename = "granteeId")] 18 | pub grantee_id: uuid::Uuid, 19 | #[serde(rename = "read")] 20 | pub read: bool, 21 | #[serde(rename = "write")] 22 | pub write: bool, 23 | } 24 | 25 | impl AccessPolicyRequest { 26 | pub fn new(grantee_id: uuid::Uuid, read: bool, write: bool) -> AccessPolicyRequest { 27 | AccessPolicyRequest { 28 | grantee_id, 29 | read, 30 | write, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/add_existing_organization_request_body.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct AddExistingOrganizationRequestBody { 17 | #[serde(rename = "key")] 18 | pub key: String, 19 | #[serde(rename = "organizationId")] 20 | pub organization_id: uuid::Uuid, 21 | } 22 | 23 | impl AddExistingOrganizationRequestBody { 24 | pub fn new(key: String, organization_id: uuid::Uuid) -> AddExistingOrganizationRequestBody { 25 | AddExistingOrganizationRequestBody { 26 | key, 27 | organization_id, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/billing_subscription_upcoming_invoice.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct BillingSubscriptionUpcomingInvoice { 17 | #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] 18 | pub amount: Option, 19 | #[serde(rename = "date", skip_serializing_if = "Option::is_none")] 20 | pub date: Option, 21 | } 22 | 23 | impl BillingSubscriptionUpcomingInvoice { 24 | pub fn new() -> BillingSubscriptionUpcomingInvoice { 25 | BillingSubscriptionUpcomingInvoice { 26 | amount: None, 27 | date: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/bulk_create_security_tasks_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct BulkCreateSecurityTasksRequestModel { 17 | #[serde(rename = "tasks", skip_serializing_if = "Option::is_none")] 18 | pub tasks: Option>, 19 | } 20 | 21 | impl BulkCreateSecurityTasksRequestModel { 22 | pub fn new() -> BulkCreateSecurityTasksRequestModel { 23 | BulkCreateSecurityTasksRequestModel { tasks: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/bulk_deny_admin_auth_request_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct BulkDenyAdminAuthRequestRequestModel { 17 | #[serde(rename = "ids", skip_serializing_if = "Option::is_none")] 18 | pub ids: Option>, 19 | } 20 | 21 | impl BulkDenyAdminAuthRequestRequestModel { 22 | pub fn new() -> BulkDenyAdminAuthRequestRequestModel { 23 | BulkDenyAdminAuthRequestRequestModel { ids: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_attachment_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherAttachmentModel { 17 | #[serde(rename = "fileName", skip_serializing_if = "Option::is_none")] 18 | pub file_name: Option, 19 | #[serde(rename = "key", skip_serializing_if = "Option::is_none")] 20 | pub key: Option, 21 | } 22 | 23 | impl CipherAttachmentModel { 24 | pub fn new() -> CipherAttachmentModel { 25 | CipherAttachmentModel { 26 | file_name: None, 27 | key: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_bulk_delete_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherBulkDeleteRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] 20 | pub organization_id: Option, 21 | } 22 | 23 | impl CipherBulkDeleteRequestModel { 24 | pub fn new(ids: Vec) -> CipherBulkDeleteRequestModel { 25 | CipherBulkDeleteRequestModel { 26 | ids, 27 | organization_id: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_bulk_move_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherBulkMoveRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | #[serde(rename = "folderId", skip_serializing_if = "Option::is_none")] 20 | pub folder_id: Option, 21 | } 22 | 23 | impl CipherBulkMoveRequestModel { 24 | pub fn new(ids: Vec) -> CipherBulkMoveRequestModel { 25 | CipherBulkMoveRequestModel { 26 | ids, 27 | folder_id: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_bulk_restore_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherBulkRestoreRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] 20 | pub organization_id: Option, 21 | } 22 | 23 | impl CipherBulkRestoreRequestModel { 24 | pub fn new(ids: Vec) -> CipherBulkRestoreRequestModel { 25 | CipherBulkRestoreRequestModel { 26 | ids, 27 | organization_id: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_collections_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherCollectionsRequestModel { 17 | #[serde(rename = "collectionIds")] 18 | pub collection_ids: Vec, 19 | } 20 | 21 | impl CipherCollectionsRequestModel { 22 | pub fn new(collection_ids: Vec) -> CipherCollectionsRequestModel { 23 | CipherCollectionsRequestModel { collection_ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_create_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherCreateRequestModel { 17 | #[serde(rename = "collectionIds", skip_serializing_if = "Option::is_none")] 18 | pub collection_ids: Option>, 19 | #[serde(rename = "cipher")] 20 | pub cipher: Box, 21 | } 22 | 23 | impl CipherCreateRequestModel { 24 | pub fn new(cipher: models::CipherRequestModel) -> CipherCreateRequestModel { 25 | CipherCreateRequestModel { 26 | collection_ids: None, 27 | cipher: Box::new(cipher), 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_partial_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherPartialRequestModel { 17 | #[serde(rename = "folderId", skip_serializing_if = "Option::is_none")] 18 | pub folder_id: Option, 19 | #[serde(rename = "favorite", skip_serializing_if = "Option::is_none")] 20 | pub favorite: Option, 21 | } 22 | 23 | impl CipherPartialRequestModel { 24 | pub fn new() -> CipherPartialRequestModel { 25 | CipherPartialRequestModel { 26 | folder_id: None, 27 | favorite: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_password_history_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherPasswordHistoryModel { 17 | #[serde(rename = "password")] 18 | pub password: String, 19 | #[serde(rename = "lastUsedDate")] 20 | pub last_used_date: String, 21 | } 22 | 23 | impl CipherPasswordHistoryModel { 24 | pub fn new(password: String, last_used_date: String) -> CipherPasswordHistoryModel { 25 | CipherPasswordHistoryModel { 26 | password, 27 | last_used_date, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_permissions_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherPermissionsResponseModel { 17 | #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] 18 | pub delete: Option, 19 | #[serde(rename = "restore", skip_serializing_if = "Option::is_none")] 20 | pub restore: Option, 21 | } 22 | 23 | impl CipherPermissionsResponseModel { 24 | pub fn new() -> CipherPermissionsResponseModel { 25 | CipherPermissionsResponseModel { 26 | delete: None, 27 | restore: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_secure_note_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherSecureNoteModel { 17 | #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 18 | pub r#type: Option, 19 | } 20 | 21 | impl CipherSecureNoteModel { 22 | pub fn new() -> CipherSecureNoteModel { 23 | CipherSecureNoteModel { r#type: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/cipher_share_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CipherShareRequestModel { 17 | #[serde(rename = "collectionIds")] 18 | pub collection_ids: Vec, 19 | #[serde(rename = "cipher")] 20 | pub cipher: Box, 21 | } 22 | 23 | impl CipherShareRequestModel { 24 | pub fn new( 25 | collection_ids: Vec, 26 | cipher: models::CipherRequestModel, 27 | ) -> CipherShareRequestModel { 28 | CipherShareRequestModel { 29 | collection_ids, 30 | cipher: Box::new(cipher), 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/collection_bulk_delete_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct CollectionBulkDeleteRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl CollectionBulkDeleteRequestModel { 22 | pub fn new(ids: Vec) -> CollectionBulkDeleteRequestModel { 23 | CollectionBulkDeleteRequestModel { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/delete_attachment_response_data.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteAttachmentResponseData { 17 | #[serde(rename = "cipher", skip_serializing_if = "Option::is_none")] 18 | pub cipher: Option>, 19 | } 20 | 21 | impl DeleteAttachmentResponseData { 22 | pub fn new() -> DeleteAttachmentResponseData { 23 | DeleteAttachmentResponseData { cipher: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/delete_recover_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeleteRecoverRequestModel { 17 | #[serde(rename = "email")] 18 | pub email: String, 19 | } 20 | 21 | impl DeleteRecoverRequestModel { 22 | pub fn new(email: String) -> DeleteRecoverRequestModel { 23 | DeleteRecoverRequestModel { email } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/device_token_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeviceTokenRequestModel { 17 | #[serde(rename = "pushToken", skip_serializing_if = "Option::is_none")] 18 | pub push_token: Option, 19 | } 20 | 21 | impl DeviceTokenRequestModel { 22 | pub fn new() -> DeviceTokenRequestModel { 23 | DeviceTokenRequestModel { push_token: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/device_verification_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct DeviceVerificationRequestModel { 17 | #[serde(rename = "unknownDeviceVerificationEnabled")] 18 | pub unknown_device_verification_enabled: bool, 19 | } 20 | 21 | impl DeviceVerificationRequestModel { 22 | pub fn new(unknown_device_verification_enabled: bool) -> DeviceVerificationRequestModel { 23 | DeviceVerificationRequestModel { 24 | unknown_device_verification_enabled, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/emergency_access_password_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct EmergencyAccessPasswordRequestModel { 17 | #[serde(rename = "newMasterPasswordHash")] 18 | pub new_master_password_hash: String, 19 | #[serde(rename = "key")] 20 | pub key: String, 21 | } 22 | 23 | impl EmergencyAccessPasswordRequestModel { 24 | pub fn new( 25 | new_master_password_hash: String, 26 | key: String, 27 | ) -> EmergencyAccessPasswordRequestModel { 28 | EmergencyAccessPasswordRequestModel { 29 | new_master_password_hash, 30 | key, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/folder_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct FolderRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | } 20 | 21 | impl FolderRequestModel { 22 | pub fn new(name: String) -> FolderRequestModel { 23 | FolderRequestModel { name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/folder_with_id_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct FolderWithIdRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 20 | pub id: Option, 21 | } 22 | 23 | impl FolderWithIdRequestModel { 24 | pub fn new(name: String) -> FolderWithIdRequestModel { 25 | FolderWithIdRequestModel { name, id: None } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/get_secrets_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GetSecretsRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl GetSecretsRequestModel { 22 | pub fn new(ids: Vec) -> GetSecretsRequestModel { 23 | GetSecretsRequestModel { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/granted_access_policy_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GrantedAccessPolicyRequest { 17 | #[serde(rename = "grantedId")] 18 | pub granted_id: uuid::Uuid, 19 | #[serde(rename = "read")] 20 | pub read: bool, 21 | #[serde(rename = "write")] 22 | pub write: bool, 23 | } 24 | 25 | impl GrantedAccessPolicyRequest { 26 | pub fn new(granted_id: uuid::Uuid, read: bool, write: bool) -> GrantedAccessPolicyRequest { 27 | GrantedAccessPolicyRequest { 28 | granted_id, 29 | read, 30 | write, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/group_bulk_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct GroupBulkRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl GroupBulkRequestModel { 22 | pub fn new(ids: Vec) -> GroupBulkRequestModel { 23 | GroupBulkRequestModel { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/individual_password_manager_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct IndividualPasswordManagerRequestModel { 17 | #[serde(rename = "additionalStorage", skip_serializing_if = "Option::is_none")] 18 | pub additional_storage: Option, 19 | } 20 | 21 | impl IndividualPasswordManagerRequestModel { 22 | pub fn new() -> IndividualPasswordManagerRequestModel { 23 | IndividualPasswordManagerRequestModel { 24 | additional_storage: None, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/inner_project_export_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct InnerProjectExportResponseModel { 17 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 18 | pub id: Option, 19 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 20 | pub name: Option, 21 | } 22 | 23 | impl InnerProjectExportResponseModel { 24 | pub fn new() -> InnerProjectExportResponseModel { 25 | InnerProjectExportResponseModel { 26 | id: None, 27 | name: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/inner_project_import_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct InnerProjectImportRequestModel { 17 | #[serde(rename = "id")] 18 | pub id: uuid::Uuid, 19 | #[serde(rename = "name")] 20 | pub name: String, 21 | } 22 | 23 | impl InnerProjectImportRequestModel { 24 | pub fn new(id: uuid::Uuid, name: String) -> InnerProjectImportRequestModel { 25 | InnerProjectImportRequestModel { id, name } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/installation_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct InstallationRequestModel { 17 | #[serde(rename = "email")] 18 | pub email: String, 19 | } 20 | 21 | impl InstallationRequestModel { 22 | pub fn new(email: String) -> InstallationRequestModel { 23 | InstallationRequestModel { email } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/int32_int32_key_value_pair.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct Int32Int32KeyValuePair { 17 | #[serde(rename = "key", skip_serializing_if = "Option::is_none")] 18 | pub key: Option, 19 | #[serde(rename = "value", skip_serializing_if = "Option::is_none")] 20 | pub value: Option, 21 | } 22 | 23 | impl Int32Int32KeyValuePair { 24 | pub fn new() -> Int32Int32KeyValuePair { 25 | Int32Int32KeyValuePair { 26 | key: None, 27 | value: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/key_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct KeyModel { 17 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 18 | pub name: Option, 19 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 20 | pub id: Option, 21 | #[serde(rename = "migrated", skip_serializing_if = "Option::is_none")] 22 | pub migrated: Option, 23 | } 24 | 25 | impl KeyModel { 26 | pub fn new() -> KeyModel { 27 | KeyModel { 28 | name: None, 29 | id: None, 30 | migrated: None, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/key_pair_request_body.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct KeyPairRequestBody { 17 | #[serde(rename = "publicKey")] 18 | pub public_key: String, 19 | #[serde(rename = "encryptedPrivateKey")] 20 | pub encrypted_private_key: String, 21 | } 22 | 23 | impl KeyPairRequestBody { 24 | pub fn new(public_key: String, encrypted_private_key: String) -> KeyPairRequestBody { 25 | KeyPairRequestBody { 26 | public_key, 27 | encrypted_private_key, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/keys_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct KeysRequestModel { 17 | #[serde(rename = "publicKey")] 18 | pub public_key: String, 19 | #[serde(rename = "encryptedPrivateKey")] 20 | pub encrypted_private_key: String, 21 | } 22 | 23 | impl KeysRequestModel { 24 | pub fn new(public_key: String, encrypted_private_key: String) -> KeysRequestModel { 25 | KeysRequestModel { 26 | public_key, 27 | encrypted_private_key, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_domain_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationDomainRequestModel { 17 | #[serde(rename = "domainName")] 18 | pub domain_name: String, 19 | } 20 | 21 | impl OrganizationDomainRequestModel { 22 | pub fn new(domain_name: String) -> OrganizationDomainRequestModel { 23 | OrganizationDomainRequestModel { domain_name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_domain_sso_details_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationDomainSsoDetailsRequestModel { 17 | #[serde(rename = "email")] 18 | pub email: String, 19 | } 20 | 21 | impl OrganizationDomainSsoDetailsRequestModel { 22 | pub fn new(email: String) -> OrganizationDomainSsoDetailsRequestModel { 23 | OrganizationDomainSsoDetailsRequestModel { email } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_keys_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationKeysRequestModel { 17 | #[serde(rename = "publicKey")] 18 | pub public_key: String, 19 | #[serde(rename = "encryptedPrivateKey")] 20 | pub encrypted_private_key: String, 21 | } 22 | 23 | impl OrganizationKeysRequestModel { 24 | pub fn new(public_key: String, encrypted_private_key: String) -> OrganizationKeysRequestModel { 25 | OrganizationKeysRequestModel { 26 | public_key, 27 | encrypted_private_key, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_public_key_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationPublicKeyResponseModel { 17 | #[serde(rename = "object", skip_serializing_if = "Option::is_none")] 18 | pub object: Option, 19 | #[serde(rename = "publicKey", skip_serializing_if = "Option::is_none")] 20 | pub public_key: Option, 21 | } 22 | 23 | impl OrganizationPublicKeyResponseModel { 24 | pub fn new() -> OrganizationPublicKeyResponseModel { 25 | OrganizationPublicKeyResponseModel { 26 | object: None, 27 | public_key: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_seat_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationSeatRequestModel { 17 | #[serde(rename = "seatAdjustment")] 18 | pub seat_adjustment: i32, 19 | } 20 | 21 | impl OrganizationSeatRequestModel { 22 | pub fn new(seat_adjustment: i32) -> OrganizationSeatRequestModel { 23 | OrganizationSeatRequestModel { seat_adjustment } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_sponsorship_sync_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationSponsorshipSyncResponseModel { 17 | #[serde(rename = "sponsorshipsBatch", skip_serializing_if = "Option::is_none")] 18 | pub sponsorships_batch: Option>, 19 | } 20 | 21 | impl OrganizationSponsorshipSyncResponseModel { 22 | pub fn new() -> OrganizationSponsorshipSyncResponseModel { 23 | OrganizationSponsorshipSyncResponseModel { 24 | sponsorships_batch: None, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_user_accept_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationUserAcceptRequestModel { 17 | #[serde(rename = "token")] 18 | pub token: String, 19 | #[serde(rename = "resetPasswordKey", skip_serializing_if = "Option::is_none")] 20 | pub reset_password_key: Option, 21 | } 22 | 23 | impl OrganizationUserAcceptRequestModel { 24 | pub fn new(token: String) -> OrganizationUserAcceptRequestModel { 25 | OrganizationUserAcceptRequestModel { 26 | token, 27 | reset_password_key: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_user_bulk_confirm_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationUserBulkConfirmRequestModel { 17 | #[serde(rename = "keys")] 18 | pub keys: Vec, 19 | } 20 | 21 | impl OrganizationUserBulkConfirmRequestModel { 22 | pub fn new( 23 | keys: Vec, 24 | ) -> OrganizationUserBulkConfirmRequestModel { 25 | OrganizationUserBulkConfirmRequestModel { keys } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_user_bulk_confirm_request_model_entry.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationUserBulkConfirmRequestModelEntry { 17 | #[serde(rename = "id")] 18 | pub id: uuid::Uuid, 19 | #[serde(rename = "key")] 20 | pub key: String, 21 | } 22 | 23 | impl OrganizationUserBulkConfirmRequestModelEntry { 24 | pub fn new(id: uuid::Uuid, key: String) -> OrganizationUserBulkConfirmRequestModelEntry { 25 | OrganizationUserBulkConfirmRequestModelEntry { id, key } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_user_bulk_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationUserBulkRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl OrganizationUserBulkRequestModel { 22 | pub fn new(ids: Vec) -> OrganizationUserBulkRequestModel { 23 | OrganizationUserBulkRequestModel { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_user_confirm_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationUserConfirmRequestModel { 17 | #[serde(rename = "key")] 18 | pub key: String, 19 | } 20 | 21 | impl OrganizationUserConfirmRequestModel { 22 | pub fn new(key: String) -> OrganizationUserConfirmRequestModel { 23 | OrganizationUserConfirmRequestModel { key } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_verify_bank_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationVerifyBankRequestModel { 17 | #[serde(rename = "amount1")] 18 | pub amount1: i32, 19 | #[serde(rename = "amount2")] 20 | pub amount2: i32, 21 | } 22 | 23 | impl OrganizationVerifyBankRequestModel { 24 | pub fn new(amount1: i32, amount2: i32) -> OrganizationVerifyBankRequestModel { 25 | OrganizationVerifyBankRequestModel { amount1, amount2 } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/organization_verify_delete_recover_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct OrganizationVerifyDeleteRecoverRequestModel { 17 | #[serde(rename = "token")] 18 | pub token: String, 19 | } 20 | 21 | impl OrganizationVerifyDeleteRecoverRequestModel { 22 | pub fn new(token: String) -> OrganizationVerifyDeleteRecoverRequestModel { 23 | OrganizationVerifyDeleteRecoverRequestModel { token } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/password_hint_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PasswordHintRequestModel { 17 | #[serde(rename = "email")] 18 | pub email: String, 19 | } 20 | 21 | impl PasswordHintRequestModel { 22 | pub fn new(email: String) -> PasswordHintRequestModel { 23 | PasswordHintRequestModel { email } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/pending_auth_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PendingAuthRequest { 17 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 18 | pub id: Option, 19 | #[serde(rename = "creationDate", skip_serializing_if = "Option::is_none")] 20 | pub creation_date: Option, 21 | } 22 | 23 | impl PendingAuthRequest { 24 | pub fn new() -> PendingAuthRequest { 25 | PendingAuthRequest { 26 | id: None, 27 | creation_date: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/project_create_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProjectCreateRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | } 20 | 21 | impl ProjectCreateRequestModel { 22 | pub fn new(name: String) -> ProjectCreateRequestModel { 23 | ProjectCreateRequestModel { name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/project_update_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProjectUpdateRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | } 20 | 21 | impl ProjectUpdateRequestModel { 22 | pub fn new(name: String) -> ProjectUpdateRequestModel { 23 | ProjectUpdateRequestModel { name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_organization_add_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderOrganizationAddRequestModel { 17 | #[serde(rename = "organizationId")] 18 | pub organization_id: uuid::Uuid, 19 | #[serde(rename = "key")] 20 | pub key: String, 21 | } 22 | 23 | impl ProviderOrganizationAddRequestModel { 24 | pub fn new(organization_id: uuid::Uuid, key: String) -> ProviderOrganizationAddRequestModel { 25 | ProviderOrganizationAddRequestModel { 26 | organization_id, 27 | key, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_accept_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserAcceptRequestModel { 17 | #[serde(rename = "token")] 18 | pub token: String, 19 | } 20 | 21 | impl ProviderUserAcceptRequestModel { 22 | pub fn new(token: String) -> ProviderUserAcceptRequestModel { 23 | ProviderUserAcceptRequestModel { token } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_bulk_confirm_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserBulkConfirmRequestModel { 17 | #[serde(rename = "keys")] 18 | pub keys: Vec, 19 | } 20 | 21 | impl ProviderUserBulkConfirmRequestModel { 22 | pub fn new( 23 | keys: Vec, 24 | ) -> ProviderUserBulkConfirmRequestModel { 25 | ProviderUserBulkConfirmRequestModel { keys } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_bulk_confirm_request_model_entry.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserBulkConfirmRequestModelEntry { 17 | #[serde(rename = "id")] 18 | pub id: uuid::Uuid, 19 | #[serde(rename = "key")] 20 | pub key: String, 21 | } 22 | 23 | impl ProviderUserBulkConfirmRequestModelEntry { 24 | pub fn new(id: uuid::Uuid, key: String) -> ProviderUserBulkConfirmRequestModelEntry { 25 | ProviderUserBulkConfirmRequestModelEntry { id, key } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_bulk_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserBulkRequestModel { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl ProviderUserBulkRequestModel { 22 | pub fn new(ids: Vec) -> ProviderUserBulkRequestModel { 23 | ProviderUserBulkRequestModel { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_confirm_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserConfirmRequestModel { 17 | #[serde(rename = "key")] 18 | pub key: String, 19 | } 20 | 21 | impl ProviderUserConfirmRequestModel { 22 | pub fn new(key: String) -> ProviderUserConfirmRequestModel { 23 | ProviderUserConfirmRequestModel { key } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_invite_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserInviteRequestModel { 17 | #[serde(rename = "emails")] 18 | pub emails: Vec, 19 | #[serde(rename = "type")] 20 | pub r#type: models::ProviderUserType, 21 | } 22 | 23 | impl ProviderUserInviteRequestModel { 24 | pub fn new( 25 | emails: Vec, 26 | r#type: models::ProviderUserType, 27 | ) -> ProviderUserInviteRequestModel { 28 | ProviderUserInviteRequestModel { emails, r#type } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_user_update_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderUserUpdateRequestModel { 17 | #[serde(rename = "type")] 18 | pub r#type: models::ProviderUserType, 19 | } 20 | 21 | impl ProviderUserUpdateRequestModel { 22 | pub fn new(r#type: models::ProviderUserType) -> ProviderUserUpdateRequestModel { 23 | ProviderUserUpdateRequestModel { r#type } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/provider_verify_delete_recover_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ProviderVerifyDeleteRecoverRequestModel { 17 | #[serde(rename = "token")] 18 | pub token: String, 19 | } 20 | 21 | impl ProviderVerifyDeleteRecoverRequestModel { 22 | pub fn new(token: String) -> ProviderVerifyDeleteRecoverRequestModel { 23 | ProviderVerifyDeleteRecoverRequestModel { token } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/pub_key_cred_param.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PubKeyCredParam { 17 | #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 18 | pub r#type: Option, 19 | #[serde(rename = "alg", skip_serializing_if = "Option::is_none")] 20 | pub alg: Option, 21 | } 22 | 23 | impl PubKeyCredParam { 24 | pub fn new() -> PubKeyCredParam { 25 | PubKeyCredParam { 26 | r#type: None, 27 | alg: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/public_key_credential_type.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | /// 16 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 17 | pub enum PublicKeyCredentialType { 18 | #[serde(rename = "public-key")] 19 | PublicKey, 20 | } 21 | 22 | impl std::fmt::Display for PublicKeyCredentialType { 23 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 24 | match self { 25 | Self::PublicKey => write!(f, "public-key"), 26 | } 27 | } 28 | } 29 | 30 | impl Default for PublicKeyCredentialType { 31 | fn default() -> PublicKeyCredentialType { 32 | Self::PublicKey 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/push_device_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PushDeviceRequestModel { 17 | #[serde(rename = "id")] 18 | pub id: String, 19 | } 20 | 21 | impl PushDeviceRequestModel { 22 | pub fn new(id: String) -> PushDeviceRequestModel { 23 | PushDeviceRequestModel { id } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/push_settings.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PushSettings { 17 | #[serde(rename = "pushTechnology", skip_serializing_if = "Option::is_none")] 18 | pub push_technology: Option, 19 | #[serde(rename = "vapidPublicKey", skip_serializing_if = "Option::is_none")] 20 | pub vapid_public_key: Option, 21 | } 22 | 23 | impl PushSettings { 24 | pub fn new() -> PushSettings { 25 | PushSettings { 26 | push_technology: None, 27 | vapid_public_key: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/push_update_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PushUpdateRequestModel { 17 | #[serde(rename = "devices")] 18 | pub devices: Vec, 19 | #[serde(rename = "organizationId")] 20 | pub organization_id: String, 21 | } 22 | 23 | impl PushUpdateRequestModel { 24 | pub fn new( 25 | devices: Vec, 26 | organization_id: String, 27 | ) -> PushUpdateRequestModel { 28 | PushUpdateRequestModel { 29 | devices, 30 | organization_id, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/request_sm_access_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RequestSmAccessRequestModel { 17 | #[serde(rename = "organizationId")] 18 | pub organization_id: uuid::Uuid, 19 | #[serde(rename = "emailContent")] 20 | pub email_content: String, 21 | } 22 | 23 | impl RequestSmAccessRequestModel { 24 | pub fn new(organization_id: uuid::Uuid, email_content: String) -> RequestSmAccessRequestModel { 25 | RequestSmAccessRequestModel { 26 | organization_id, 27 | email_content, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/revoke_access_tokens_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RevokeAccessTokensRequest { 17 | #[serde(rename = "ids")] 18 | pub ids: Vec, 19 | } 20 | 21 | impl RevokeAccessTokensRequest { 22 | pub fn new(ids: Vec) -> RevokeAccessTokensRequest { 23 | RevokeAccessTokensRequest { ids } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/secret_response_inner_project.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SecretResponseInnerProject { 17 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 18 | pub id: Option, 19 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 20 | pub name: Option, 21 | } 22 | 23 | impl SecretResponseInnerProject { 24 | pub fn new() -> SecretResponseInnerProject { 25 | SecretResponseInnerProject { 26 | id: None, 27 | name: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/secret_with_projects_inner_project.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SecretWithProjectsInnerProject { 17 | #[serde(rename = "id", skip_serializing_if = "Option::is_none")] 18 | pub id: Option, 19 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 20 | pub name: Option, 21 | } 22 | 23 | impl SecretWithProjectsInnerProject { 24 | pub fn new() -> SecretWithProjectsInnerProject { 25 | SecretWithProjectsInnerProject { 26 | id: None, 27 | name: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/security_task_create_request.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SecurityTaskCreateRequest { 17 | #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 18 | pub r#type: Option, 19 | #[serde(rename = "cipherId", skip_serializing_if = "Option::is_none")] 20 | pub cipher_id: Option, 21 | } 22 | 23 | impl SecurityTaskCreateRequest { 24 | pub fn new() -> SecurityTaskCreateRequest { 25 | SecurityTaskCreateRequest { 26 | r#type: None, 27 | cipher_id: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/send_access_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SendAccessRequestModel { 17 | #[serde(rename = "password", skip_serializing_if = "Option::is_none")] 18 | pub password: Option, 19 | } 20 | 21 | impl SendAccessRequestModel { 22 | pub fn new() -> SendAccessRequestModel { 23 | SendAccessRequestModel { password: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/send_text_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SendTextModel { 17 | #[serde(rename = "text", skip_serializing_if = "Option::is_none")] 18 | pub text: Option, 19 | #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")] 20 | pub hidden: Option, 21 | } 22 | 23 | impl SendTextModel { 24 | pub fn new() -> SendTextModel { 25 | SendTextModel { 26 | text: None, 27 | hidden: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/server_config_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ServerConfigResponseModel { 17 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 18 | pub name: Option, 19 | #[serde(rename = "url", skip_serializing_if = "Option::is_none")] 20 | pub url: Option, 21 | } 22 | 23 | impl ServerConfigResponseModel { 24 | pub fn new() -> ServerConfigResponseModel { 25 | ServerConfigResponseModel { 26 | name: None, 27 | url: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/server_settings_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ServerSettingsResponseModel { 17 | #[serde( 18 | rename = "disableUserRegistration", 19 | skip_serializing_if = "Option::is_none" 20 | )] 21 | pub disable_user_registration: Option, 22 | } 23 | 24 | impl ServerSettingsResponseModel { 25 | pub fn new() -> ServerSettingsResponseModel { 26 | ServerSettingsResponseModel { 27 | disable_user_registration: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/service_account_create_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ServiceAccountCreateRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | } 20 | 21 | impl ServiceAccountCreateRequestModel { 22 | pub fn new(name: String) -> ServiceAccountCreateRequestModel { 23 | ServiceAccountCreateRequestModel { name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/service_account_update_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct ServiceAccountUpdateRequestModel { 17 | #[serde(rename = "name")] 18 | pub name: String, 19 | } 20 | 21 | impl ServiceAccountUpdateRequestModel { 22 | pub fn new(name: String) -> ServiceAccountUpdateRequestModel { 23 | ServiceAccountUpdateRequestModel { name } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/sm_import_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SmImportRequestModel { 17 | #[serde(rename = "projects", skip_serializing_if = "Option::is_none")] 18 | pub projects: Option>, 19 | #[serde(rename = "secrets", skip_serializing_if = "Option::is_none")] 20 | pub secrets: Option>, 21 | } 22 | 23 | impl SmImportRequestModel { 24 | pub fn new() -> SmImportRequestModel { 25 | SmImportRequestModel { 26 | projects: None, 27 | secrets: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/storage_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct StorageRequestModel { 17 | #[serde(rename = "storageGbAdjustment")] 18 | pub storage_gb_adjustment: i32, 19 | } 20 | 21 | impl StorageRequestModel { 22 | pub fn new(storage_gb_adjustment: i32) -> StorageRequestModel { 23 | StorageRequestModel { 24 | storage_gb_adjustment, 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/subscription_cancellation_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct SubscriptionCancellationRequestModel { 17 | #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] 18 | pub reason: Option, 19 | #[serde(rename = "feedback", skip_serializing_if = "Option::is_none")] 20 | pub feedback: Option, 21 | } 22 | 23 | impl SubscriptionCancellationRequestModel { 24 | pub fn new() -> SubscriptionCancellationRequestModel { 25 | SubscriptionCancellationRequestModel { 26 | reason: None, 27 | feedback: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/tax_info_update_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct TaxInfoUpdateRequestModel { 17 | #[serde(rename = "country")] 18 | pub country: String, 19 | #[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")] 20 | pub postal_code: Option, 21 | } 22 | 23 | impl TaxInfoUpdateRequestModel { 24 | pub fn new(country: String) -> TaxInfoUpdateRequestModel { 25 | TaxInfoUpdateRequestModel { 26 | country, 27 | postal_code: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/tokenized_payment_source_request_body.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct TokenizedPaymentSourceRequestBody { 17 | #[serde(rename = "type")] 18 | pub r#type: models::PaymentMethodType, 19 | #[serde(rename = "token")] 20 | pub token: String, 21 | } 22 | 23 | impl TokenizedPaymentSourceRequestBody { 24 | pub fn new( 25 | r#type: models::PaymentMethodType, 26 | token: String, 27 | ) -> TokenizedPaymentSourceRequestBody { 28 | TokenizedPaymentSourceRequestBody { r#type, token } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/two_factor_recover_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct TwoFactorRecoverResponseModel { 17 | #[serde(rename = "object", skip_serializing_if = "Option::is_none")] 18 | pub object: Option, 19 | #[serde(rename = "code", skip_serializing_if = "Option::is_none")] 20 | pub code: Option, 21 | } 22 | 23 | impl TwoFactorRecoverResponseModel { 24 | pub fn new() -> TwoFactorRecoverResponseModel { 25 | TwoFactorRecoverResponseModel { 26 | object: None, 27 | code: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/update_avatar_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UpdateAvatarRequestModel { 17 | #[serde(rename = "avatarColor", skip_serializing_if = "Option::is_none")] 18 | pub avatar_color: Option, 19 | } 20 | 21 | impl UpdateAvatarRequestModel { 22 | pub fn new() -> UpdateAvatarRequestModel { 23 | UpdateAvatarRequestModel { avatar_color: None } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/update_client_organization_request_body.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UpdateClientOrganizationRequestBody { 17 | #[serde(rename = "assignedSeats")] 18 | pub assigned_seats: i32, 19 | #[serde(rename = "name")] 20 | pub name: String, 21 | } 22 | 23 | impl UpdateClientOrganizationRequestBody { 24 | pub fn new(assigned_seats: i32, name: String) -> UpdateClientOrganizationRequestBody { 25 | UpdateClientOrganizationRequestBody { 26 | assigned_seats, 27 | name, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/update_profile_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct UpdateProfileRequestModel { 17 | #[serde(rename = "name", skip_serializing_if = "Option::is_none")] 18 | pub name: Option, 19 | #[serde(rename = "masterPasswordHint", skip_serializing_if = "Option::is_none")] 20 | pub master_password_hint: Option, 21 | } 22 | 23 | impl UpdateProfileRequestModel { 24 | pub fn new() -> UpdateProfileRequestModel { 25 | UpdateProfileRequestModel { 26 | name: None, 27 | master_password_hint: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/verify_bank_account_request_body.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct VerifyBankAccountRequestBody { 17 | #[serde(rename = "descriptorCode")] 18 | pub descriptor_code: String, 19 | } 20 | 21 | impl VerifyBankAccountRequestBody { 22 | pub fn new(descriptor_code: String) -> VerifyBankAccountRequestBody { 23 | VerifyBankAccountRequestBody { descriptor_code } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/verify_delete_recover_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct VerifyDeleteRecoverRequestModel { 17 | #[serde(rename = "userId")] 18 | pub user_id: String, 19 | #[serde(rename = "token")] 20 | pub token: String, 21 | } 22 | 23 | impl VerifyDeleteRecoverRequestModel { 24 | pub fn new(user_id: String, token: String) -> VerifyDeleteRecoverRequestModel { 25 | VerifyDeleteRecoverRequestModel { user_id, token } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/verify_email_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct VerifyEmailRequestModel { 17 | #[serde(rename = "userId")] 18 | pub user_id: String, 19 | #[serde(rename = "token")] 20 | pub token: String, 21 | } 22 | 23 | impl VerifyEmailRequestModel { 24 | pub fn new(user_id: String, token: String) -> VerifyEmailRequestModel { 25 | VerifyEmailRequestModel { user_id, token } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/verify_otp_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct VerifyOtpRequestModel { 17 | #[serde(rename = "otp")] 18 | pub otp: String, 19 | } 20 | 21 | impl VerifyOtpRequestModel { 22 | pub fn new(otp: String) -> VerifyOtpRequestModel { 23 | VerifyOtpRequestModel { otp } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-api/src/models/web_push_auth_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Internal API 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: latest 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct WebPushAuthRequestModel { 17 | #[serde(rename = "endpoint")] 18 | pub endpoint: String, 19 | #[serde(rename = "p256dh")] 20 | pub p256dh: String, 21 | #[serde(rename = "auth")] 22 | pub auth: String, 23 | } 24 | 25 | impl WebPushAuthRequestModel { 26 | pub fn new(endpoint: String, p256dh: String, auth: String) -> WebPushAuthRequestModel { 27 | WebPushAuthRequestModel { 28 | endpoint, 29 | p256dh, 30 | auth, 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.10.0 2 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-api-identity" 3 | description = "Api bindings for the Bitwarden Identity API." 4 | categories = ["api-bindings"] 5 | 6 | version.workspace = true 7 | authors.workspace = true 8 | edition.workspace = true 9 | rust-version.workspace = true 10 | homepage.workspace = true 11 | repository.workspace = true 12 | license-file.workspace = true 13 | keywords.workspace = true 14 | 15 | [dependencies] 16 | reqwest = { workspace = true } 17 | serde = { workspace = true } 18 | serde_json = { workspace = true } 19 | serde_repr = { workspace = true } 20 | serde_with = { version = ">=3.8, <4", default-features = false, features = [ 21 | "base64", 22 | "std", 23 | "macros", 24 | ] } 25 | url = ">=2.5, <3" 26 | uuid = { workspace = true } 27 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(unused_imports, unused_variables, unused_mut, non_camel_case_types)] 2 | #![allow( 3 | clippy::too_many_arguments, 4 | clippy::empty_docs, 5 | clippy::to_string_in_format_args 6 | )] 7 | 8 | extern crate reqwest; 9 | extern crate serde; 10 | extern crate serde_json; 11 | extern crate url; 12 | 13 | pub mod apis; 14 | pub mod models; 15 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/src/models/keys_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Identity 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: v1 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct KeysRequestModel { 17 | #[serde(rename = "publicKey")] 18 | pub public_key: String, 19 | #[serde(rename = "encryptedPrivateKey")] 20 | pub encrypted_private_key: String, 21 | } 22 | 23 | impl KeysRequestModel { 24 | pub fn new(public_key: String, encrypted_private_key: String) -> KeysRequestModel { 25 | KeysRequestModel { 26 | public_key, 27 | encrypted_private_key, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/src/models/prelogin_request_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Identity 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: v1 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct PreloginRequestModel { 17 | #[serde(rename = "email")] 18 | pub email: String, 19 | } 20 | 21 | impl PreloginRequestModel { 22 | pub fn new(email: String) -> PreloginRequestModel { 23 | PreloginRequestModel { email } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/src/models/public_key_credential_type.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Identity 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: v1 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | /// 16 | #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 17 | pub enum PublicKeyCredentialType { 18 | #[serde(rename = "public-key")] 19 | PublicKey, 20 | } 21 | 22 | impl std::fmt::Display for PublicKeyCredentialType { 23 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 24 | match self { 25 | Self::PublicKey => write!(f, "public-key"), 26 | } 27 | } 28 | } 29 | 30 | impl Default for PublicKeyCredentialType { 31 | fn default() -> PublicKeyCredentialType { 32 | Self::PublicKey 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /crates/bitwarden-api-identity/src/models/register_response_model.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitwarden Identity 3 | * 4 | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | * 6 | * The version of the OpenAPI document: v1 7 | * 8 | * Generated by: https://openapi-generator.tech 9 | */ 10 | 11 | use serde::{Deserialize, Serialize}; 12 | 13 | use crate::models; 14 | 15 | #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 16 | pub struct RegisterResponseModel { 17 | #[serde(rename = "object", skip_serializing_if = "Option::is_none")] 18 | pub object: Option, 19 | #[serde(rename = "captchaBypassToken", skip_serializing_if = "Option::is_none")] 20 | pub captcha_bypass_token: Option, 21 | } 22 | 23 | impl RegisterResponseModel { 24 | pub fn new() -> RegisterResponseModel { 25 | RegisterResponseModel { 26 | object: None, 27 | captcha_bypass_token: None, 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-cli/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-cli" 3 | description = """ 4 | Internal crate for the bws crate. Do not use. 5 | """ 6 | 7 | version.workspace = true 8 | authors.workspace = true 9 | edition.workspace = true 10 | rust-version.workspace = true 11 | readme.workspace = true 12 | homepage.workspace = true 13 | repository.workspace = true 14 | license-file.workspace = true 15 | keywords.workspace = true 16 | 17 | [dependencies] 18 | clap = { version = "4.5.4", features = ["derive"] } 19 | color-eyre = "0.6.3" 20 | inquire = "0.7.0" 21 | supports-color = "3.0.0" 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /crates/bitwarden-cli/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Cli 2 | 3 | Common utilities for the Bitwarden Password Manager CLI and Secrets Manager CLI. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-cli/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | mod color; 4 | 5 | pub use color::{install_color_eyre, Color}; 6 | use inquire::{error::InquireResult, Text}; 7 | 8 | /// Prompt the user for input if the value is None 9 | /// 10 | /// Typically used when the user can provide a value via CLI or prompt 11 | pub fn text_prompt_when_none(prompt: &str, val: Option) -> InquireResult { 12 | Ok(if let Some(val) = val { 13 | val 14 | } else { 15 | Text::new(prompt).prompt()? 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /crates/bitwarden-core/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Core 2 | 3 | Contains core functionality used by the feature crates. For an introduction to the Bitwarden SDK and 4 | the `bitwarden-core` create please refer to the 5 | [SDK Architecture](https://contributing.bitwarden.com/architecture/sdk/) documentation. 6 | 7 |
8 | Generally you should not find yourself needing to edit this crate! When possible, please use the feature crates instead. 9 |
10 | 11 | ## Features 12 | 13 | - `internal` - Internal unstable APIs that should only be consumed by internal Bitwarden clients. 14 | - `no-memory-hardening` - Disables `bitwarden-crypto` memory hardening. 15 | - `secrets` - Secrets Manager specific functionality. 16 | - `uniffi` - Mobile bindings. 17 | - `wasm` - WebAssembly bindings. 18 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/.gitignore: -------------------------------------------------------------------------------- 1 | !bin 2 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/admin_console/mod.rs: -------------------------------------------------------------------------------- 1 | //! Admin console module for Bitwarden Core. 2 | //! 3 | //! Contains policies. 4 | 5 | mod policy; 6 | 7 | pub use policy::Policy; 8 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod request; 2 | pub mod response; 3 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/request/renew_token_request.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::{ 4 | auth::{api::response::IdentityTokenResponse, login::LoginError}, 5 | client::ApiConfigurations, 6 | }; 7 | 8 | #[derive(Serialize, Deserialize, Debug)] 9 | pub struct RenewTokenRequest { 10 | grant_type: String, 11 | refresh_token: String, 12 | client_id: String, 13 | } 14 | 15 | impl RenewTokenRequest { 16 | pub fn new(refresh_token: String, client_id: String) -> Self { 17 | Self { 18 | refresh_token, 19 | client_id, 20 | grant_type: "refresh_token".to_string(), 21 | } 22 | } 23 | 24 | pub(crate) async fn send( 25 | &self, 26 | configurations: &ApiConfigurations, 27 | ) -> Result { 28 | super::send_identity_connect_request(configurations, None, &self).await 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/identity_captcha_response.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq)] 7 | pub struct IdentityCaptchaResponse { 8 | pub error: String, 9 | pub error_description: String, 10 | #[serde(rename = "HCaptcha_SiteKey")] 11 | pub site_key: String, 12 | 13 | /// Stores unknown api response fields 14 | extra: Option>, 15 | } 16 | 17 | #[cfg(test)] 18 | mod test { 19 | use super::*; 20 | 21 | impl Default for IdentityCaptchaResponse { 22 | fn default() -> Self { 23 | Self { 24 | error: "invalid_grant".into(), 25 | error_description: "Captcha required.".into(), 26 | site_key: Default::default(), 27 | extra: Default::default(), 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/identity_payload_response.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Serialize, Deserialize, Debug, PartialEq)] 4 | #[cfg_attr(test, derive(Default))] 5 | pub struct IdentityTokenPayloadResponse { 6 | pub access_token: String, 7 | pub expires_in: u64, 8 | pub refresh_token: Option, 9 | token_type: String, 10 | scope: String, 11 | 12 | pub(crate) encrypted_payload: String, 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/identity_refresh_response.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Serialize, Deserialize, Debug, PartialEq)] 4 | #[cfg_attr(test, derive(Default))] 5 | pub struct IdentityTokenRefreshResponse { 6 | pub access_token: String, 7 | pub expires_in: u64, 8 | pub refresh_token: Option, 9 | token_type: String, 10 | scope: String, 11 | } 12 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/mod.rs: -------------------------------------------------------------------------------- 1 | mod identity_captcha_response; 2 | mod identity_payload_response; 3 | mod identity_refresh_response; 4 | mod identity_success_response; 5 | mod identity_token_fail_response; 6 | mod identity_token_response; 7 | mod identity_two_factor_response; 8 | pub(crate) mod two_factor_provider_data; 9 | mod two_factor_providers; 10 | 11 | pub(crate) use identity_captcha_response::*; 12 | pub(crate) use identity_payload_response::*; 13 | pub(crate) use identity_refresh_response::*; 14 | pub(crate) use identity_success_response::*; 15 | pub(crate) use identity_token_fail_response::*; 16 | pub(crate) use identity_token_response::*; 17 | pub(crate) use identity_two_factor_response::*; 18 | pub(crate) use two_factor_providers::*; 19 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/authenticator.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct Authenticator { 8 | /// Stores unknown api response fields 9 | extra: Option>, 10 | } 11 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/duo.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct Duo { 8 | #[serde(alias = "Host")] 9 | pub host: String, 10 | #[serde(alias = "Signature")] 11 | pub signature: String, 12 | 13 | /// Stores unknown api response fields 14 | extra: Option>, 15 | } 16 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/email.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct Email { 8 | #[serde(alias = "Email")] 9 | pub email: String, 10 | 11 | /// Stores unknown api response fields 12 | extra: Option>, 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod authenticator; 2 | pub mod duo; 3 | pub mod email; 4 | pub mod organization_duo; 5 | pub mod remember; 6 | pub mod web_authn; 7 | pub mod yubi_key; 8 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/organization_duo.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct OrganizationDuo { 8 | #[serde(alias = "Host")] 9 | pub host: String, 10 | #[serde(alias = "Signature")] 11 | pub signature: String, 12 | 13 | /// Stores unknown api response fields 14 | extra: Option>, 15 | } 16 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/remember.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct Remember { 8 | /// Stores unknown api response fields 9 | extra: Option>, 10 | } 11 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/web_authn.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct WebAuthn { 8 | /// Stores unknown api response fields 9 | extra: Option>, 10 | } 11 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/api/response/two_factor_provider_data/yubi_key.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::Value; 5 | 6 | #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] 7 | pub struct YubiKey { 8 | #[serde(alias = "Nfc")] 9 | pub nfc: bool, 10 | 11 | /// Stores unknown api response fields 12 | extra: Option>, 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/captcha_response.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct CaptchaResponse { 8 | /// hcaptcha site key 9 | pub site_key: String, 10 | } 11 | 12 | impl From for CaptchaResponse { 13 | fn from(api: crate::auth::api::response::IdentityCaptchaResponse) -> Self { 14 | Self { 15 | site_key: api.site_key, 16 | } 17 | } 18 | } 19 | 20 | impl From for CaptchaResponse { 21 | fn from(s: String) -> Self { 22 | Self { site_key: s } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/mod.rs: -------------------------------------------------------------------------------- 1 | #[allow(missing_docs)] 2 | pub mod captcha_response; 3 | #[allow(missing_docs)] 4 | pub mod two_factor; 5 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/authenticator.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct Authenticator {} 8 | 9 | impl From 10 | for Authenticator 11 | { 12 | fn from( 13 | _: crate::auth::api::response::two_factor_provider_data::authenticator::Authenticator, 14 | ) -> Self { 15 | Self {} 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/email.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct Email { 8 | /// The email to request a 2fa TOTP for 9 | pub email: String, 10 | } 11 | 12 | impl From for Email { 13 | fn from(api: crate::auth::api::response::two_factor_provider_data::email::Email) -> Self { 14 | Self { email: api.email } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/mod.rs: -------------------------------------------------------------------------------- 1 | mod authenticator; 2 | mod duo; 3 | mod email; 4 | mod remember; 5 | mod two_factor_providers; 6 | mod web_authn; 7 | mod yubi_key; 8 | 9 | pub use authenticator::*; 10 | pub use duo::*; 11 | pub use email::*; 12 | pub use remember::*; 13 | pub use two_factor_providers::*; 14 | pub use web_authn::*; 15 | pub use yubi_key::*; 16 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/remember.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct Remember {} 8 | 9 | impl From for Remember { 10 | fn from(_: crate::auth::api::response::two_factor_provider_data::remember::Remember) -> Self { 11 | Self {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/web_authn.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct WebAuthn {} 8 | 9 | impl From for WebAuthn { 10 | fn from(_: crate::auth::api::response::two_factor_provider_data::web_authn::WebAuthn) -> Self { 11 | Self {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/auth/login/response/two_factor/yubi_key.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[allow(missing_docs)] 5 | #[derive(Serialize, Deserialize, Debug, JsonSchema)] 6 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 7 | pub struct YubiKey { 8 | /// Whether the stored yubikey supports near field communication 9 | pub nfc: bool, 10 | } 11 | 12 | impl From for YubiKey { 13 | fn from(api: crate::auth::api::response::two_factor_provider_data::yubi_key::YubiKey) -> Self { 14 | Self { nfc: api.nfc } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/client/mod.rs: -------------------------------------------------------------------------------- 1 | //! Bitwarden SDK Client 2 | 3 | #[allow(clippy::module_inception)] 4 | mod client; 5 | #[allow(missing_docs)] 6 | pub mod client_settings; 7 | #[allow(missing_docs)] 8 | pub mod encryption_settings; 9 | #[allow(missing_docs)] 10 | pub mod internal; 11 | pub use internal::ApiConfigurations; 12 | #[allow(missing_docs)] 13 | pub mod login_method; 14 | #[cfg(feature = "secrets")] 15 | pub(crate) use login_method::ServiceAccountLoginMethod; 16 | pub(crate) use login_method::{LoginMethod, UserLoginMethod}; 17 | #[cfg(feature = "internal")] 18 | mod flags; 19 | 20 | pub use client::Client; 21 | pub use client_settings::{ClientSettings, DeviceType}; 22 | 23 | #[allow(missing_docs)] 24 | #[cfg(feature = "internal")] 25 | pub mod test_accounts; 26 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/ids.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_uuid::uuid; 2 | 3 | uuid!(pub OrganizationId); 4 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | #[cfg(feature = "uniffi")] 4 | uniffi::setup_scaffolding!(); 5 | #[cfg(feature = "uniffi")] 6 | mod uniffi_support; 7 | 8 | #[cfg(feature = "internal")] 9 | pub mod admin_console; 10 | pub mod auth; 11 | pub mod client; 12 | mod error; 13 | pub mod key_management; 14 | pub use error::{ 15 | ApiError, MissingFieldError, MissingPrivateKeyError, NotAuthenticatedError, VaultLockedError, 16 | WrongPasswordError, 17 | }; 18 | #[cfg(feature = "internal")] 19 | pub mod mobile; 20 | #[cfg(feature = "internal")] 21 | pub mod platform; 22 | #[cfg(feature = "secrets")] 23 | pub mod secrets_manager; 24 | mod util; 25 | 26 | pub use bitwarden_crypto::ZeroizingAllocator; 27 | pub use client::{Client, ClientSettings, DeviceType}; 28 | 29 | mod ids; 30 | pub use ids::*; 31 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/mobile/client_kdf.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_crypto::{CryptoError, HashPurpose, Kdf}; 2 | 3 | use crate::{mobile::kdf::hash_password, Client}; 4 | 5 | /// A client for the KDF operations. 6 | pub struct KdfClient { 7 | pub(crate) _client: crate::Client, 8 | } 9 | 10 | impl KdfClient { 11 | /// Hashes the password using the provided KDF parameters and purpose. 12 | pub async fn hash_password( 13 | &self, 14 | email: String, 15 | password: String, 16 | kdf_params: Kdf, 17 | purpose: HashPurpose, 18 | ) -> Result { 19 | hash_password(email, password, kdf_params, purpose).await 20 | } 21 | } 22 | 23 | impl Client { 24 | /// Access to KDF functionality. 25 | pub fn kdf(&self) -> KdfClient { 26 | KdfClient { 27 | _client: self.clone(), 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/mobile/kdf.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_crypto::{CryptoError, HashPurpose, Kdf, MasterKey}; 2 | 3 | pub(super) async fn hash_password( 4 | email: String, 5 | password: String, 6 | kdf_params: Kdf, 7 | purpose: HashPurpose, 8 | ) -> Result { 9 | let master_key = MasterKey::derive(&password, &email, &kdf_params)?; 10 | 11 | master_key.derive_master_key_hash(password.as_bytes(), purpose) 12 | } 13 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/mobile/mod.rs: -------------------------------------------------------------------------------- 1 | //! Mobile specific functionality. 2 | //! 3 | //! This module consists of stop-gap functionality for the mobile clients until the SDK owns it's 4 | //! own state. 5 | 6 | pub mod crypto; 7 | mod kdf; 8 | 9 | mod client_kdf; 10 | mod crypto_client; 11 | 12 | pub use client_kdf::KdfClient; 13 | pub use crypto_client::CryptoClient; 14 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/platform/mod.rs: -------------------------------------------------------------------------------- 1 | //! Platform code 2 | //! 3 | //! Currently contains logic for generation of fingerprints and fetching a users api key. 4 | 5 | mod generate_fingerprint; 6 | mod get_user_api_key; 7 | mod platform_client; 8 | mod secret_verification_request; 9 | 10 | pub use generate_fingerprint::{ 11 | FingerprintError, FingerprintRequest, FingerprintResponse, UserFingerprintError, 12 | }; 13 | pub(crate) use get_user_api_key::get_user_api_key; 14 | pub use get_user_api_key::{UserApiKeyError, UserApiKeyResponse}; 15 | pub use platform_client::PlatformClient; 16 | pub use secret_verification_request::SecretVerificationRequest; 17 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/platform/secret_verification_request.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | /// Request to verify a user's secret. 4 | #[derive(Serialize, Deserialize, Debug)] 5 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 6 | pub struct SecretVerificationRequest { 7 | /// The user's master password to use for user verification. If supplied, this will be used for 8 | /// verification purposes. 9 | pub master_password: Option, 10 | /// Alternate user verification method through OTP. This is provided for users who have no 11 | /// master password due to use of Customer Managed Encryption. Must be present and valid if 12 | /// master_password is absent. 13 | pub otp: Option, 14 | } 15 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/secrets_manager/mod.rs: -------------------------------------------------------------------------------- 1 | //! Secrets Manager specific code. 2 | //! 3 | //! Note: This module should be considered deprecated and code should move to `bitwarden-secrets`. 4 | 5 | pub mod state; 6 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/uniffi_support.rs: -------------------------------------------------------------------------------- 1 | //! This module contains custom type converters for Uniffi. 2 | 3 | use std::num::NonZeroU32; 4 | 5 | use uuid::Uuid; 6 | 7 | uniffi::use_remote_type!(bitwarden_crypto::NonZeroU32); 8 | 9 | type DateTime = chrono::DateTime; 10 | uniffi::custom_type!(DateTime, std::time::SystemTime, { remote }); 11 | 12 | uniffi::custom_type!(Uuid, String, { 13 | remote, 14 | try_lift: |val| Uuid::parse_str(val.as_str()).map_err(|e| e.into()), 15 | lower: |obj| obj.to_string(), 16 | }); 17 | 18 | // Uniffi doesn't emit unused types, this is a dummy record to ensure that the custom type 19 | // converters are emitted 20 | #[allow(dead_code)] 21 | #[derive(uniffi::Record)] 22 | struct UniffiConverterDummyRecord { 23 | uuid: Uuid, 24 | date: DateTime, 25 | } 26 | -------------------------------------------------------------------------------- /crates/bitwarden-core/src/util.rs: -------------------------------------------------------------------------------- 1 | use base64::{ 2 | alphabet, 3 | engine::{DecodePaddingMode, GeneralPurpose, GeneralPurposeConfig}, 4 | }; 5 | 6 | const INDIFFERENT: GeneralPurposeConfig = 7 | GeneralPurposeConfig::new().with_decode_padding_mode(DecodePaddingMode::Indifferent); 8 | 9 | /// A [GeneralPurpose] engine using the [alphabet::STANDARD] base64 alphabet with or without valid 10 | /// padding. 11 | pub const STANDARD_INDIFFERENT: GeneralPurpose = 12 | GeneralPurpose::new(&alphabet::STANDARD, INDIFFERENT); 13 | -------------------------------------------------------------------------------- /crates/bitwarden-core/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.core" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenCoreFFI" 8 | module_name = "BitwardenCore" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/benches/default_allocator.rs: -------------------------------------------------------------------------------- 1 | #![allow(missing_docs)] 2 | 3 | use criterion::{black_box, criterion_group, criterion_main, Criterion}; 4 | 5 | fn allocate_string(s: &str) -> String { 6 | s.to_owned() 7 | } 8 | 9 | pub fn criterion_benchmark(c: &mut Criterion) { 10 | c.bench_function("string abc", |b| { 11 | b.iter(|| allocate_string(black_box("abc"))) 12 | }); 13 | } 14 | 15 | criterion_group!(benches, criterion_benchmark); 16 | criterion_main!(benches); 17 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/benches/zeroizing_allocator.rs: -------------------------------------------------------------------------------- 1 | #![allow(missing_docs)] 2 | 3 | use bitwarden_crypto::ZeroizingAllocator; 4 | use criterion::{criterion_group, criterion_main}; 5 | use default_allocator::criterion_benchmark; 6 | 7 | #[global_allocator] 8 | static ALLOC: ZeroizingAllocator = ZeroizingAllocator(std::alloc::System); 9 | 10 | mod default_allocator; 11 | 12 | criterion_group!(benches, criterion_benchmark); 13 | criterion_main!(benches); 14 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/src/keys/user_key.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | rsa::{make_key_pair, RsaKeyPair}, 3 | Result, SymmetricCryptoKey, 4 | }; 5 | 6 | /// User Key 7 | /// 8 | /// The User Key is the symmetric encryption key used to decrypt the user's vault. 9 | pub struct UserKey(pub SymmetricCryptoKey); 10 | 11 | impl UserKey { 12 | #[allow(missing_docs)] 13 | pub fn new(key: SymmetricCryptoKey) -> Self { 14 | Self(key) 15 | } 16 | 17 | #[allow(missing_docs)] 18 | pub fn make_key_pair(&self) -> Result { 19 | make_key_pair(&self.0) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/src/store/backend/implementation/mod.rs: -------------------------------------------------------------------------------- 1 | use super::StoreBackend; 2 | use crate::store::KeyId; 3 | 4 | mod basic; 5 | 6 | /// Initializes a key store backend with the best available implementation for the current platform 7 | pub fn create_store() -> Box> { 8 | Box::new(basic::BasicBackend::::new()) 9 | } 10 | 11 | #[cfg(test)] 12 | mod tests { 13 | use super::*; 14 | use crate::{traits::tests::TestSymmKey, SymmetricCryptoKey}; 15 | 16 | #[test] 17 | fn test_creates_a_valid_store() { 18 | let mut store = create_store::(); 19 | 20 | let key = SymmetricCryptoKey::make_aes256_cbc_hmac_key(); 21 | store.upsert(TestSymmKey::A(0), key.clone()); 22 | 23 | assert_eq!( 24 | store.get(TestSymmKey::A(0)).unwrap().to_base64(), 25 | key.to_base64() 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/src/uniffi_support.rs: -------------------------------------------------------------------------------- 1 | use std::{num::NonZeroU32, str::FromStr}; 2 | 3 | use crate::{CryptoError, EncString, UnsignedSharedKey}; 4 | 5 | uniffi::custom_type!(NonZeroU32, u32, { 6 | remote, 7 | try_lift: |val| { 8 | NonZeroU32::new(val).ok_or(CryptoError::ZeroNumber.into()) 9 | }, 10 | lower: |obj| obj.get(), 11 | }); 12 | 13 | uniffi::custom_type!(EncString, String, { 14 | try_lift: |val| { 15 | EncString::from_str(&val).map_err(|e: CryptoError| e.into()) 16 | }, 17 | lower: |obj| obj.to_string(), 18 | }); 19 | 20 | uniffi::custom_type!(UnsignedSharedKey, String, { 21 | try_lift: |val| { 22 | UnsignedSharedKey::from_str(&val).map_err(|e: CryptoError| e.into()) 23 | }, 24 | lower: |obj| obj.to_string(), 25 | }); 26 | -------------------------------------------------------------------------------- /crates/bitwarden-crypto/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.crypto" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenCryptoFFI" 8 | module_name = "BitwardenCrypto" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-error-macro" 3 | description = """ 4 | Internal crate for the bitwarden crate. Do not use. 5 | """ 6 | 7 | version.workspace = true 8 | authors.workspace = true 9 | edition.workspace = true 10 | rust-version.workspace = true 11 | readme.workspace = true 12 | homepage.workspace = true 13 | repository.workspace = true 14 | license-file.workspace = true 15 | keywords.workspace = true 16 | 17 | [features] 18 | wasm = [] 19 | 20 | [dependencies] 21 | darling = "0.20.10" 22 | proc-macro2 = { workspace = true } 23 | quote = { workspace = true } 24 | syn = { workspace = true } 25 | 26 | [lints] 27 | workspace = true 28 | 29 | [lib] 30 | proc-macro = true 31 | 32 | [dev-dependencies] 33 | bitwarden-error = { workspace = true, features = ["wasm"] } 34 | js-sys.workspace = true 35 | serde.workspace = true 36 | thiserror.workspace = true 37 | tsify-next.workspace = true 38 | wasm-bindgen.workspace = true 39 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Error Macro 2 | 3 | Provides error macros for simplifying error handling when working with WebAssembly. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/src/args.rs: -------------------------------------------------------------------------------- 1 | use darling::FromMeta; 2 | 3 | #[derive(FromMeta)] 4 | pub(crate) struct BitwardenErrorArgs { 5 | #[darling(flatten)] 6 | pub error_type: BitwardenErrorType, 7 | 8 | #[darling(default)] 9 | pub export_as: Option, 10 | } 11 | 12 | #[derive(FromMeta)] 13 | #[darling(rename_all = "snake_case")] 14 | pub(crate) enum BitwardenErrorType { 15 | /// The error is going to be converted into a string using the `ToString` trait 16 | Basic, 17 | 18 | /// The error is going to be converted into a flat error using the `FlatError` trait 19 | Flat, 20 | 21 | /// The entire error stack is going to be made available using `serde` 22 | Full, 23 | } 24 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/src/basic/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod attribute; 2 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/src/flat/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod attribute; 2 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/src/full/attribute.rs: -------------------------------------------------------------------------------- 1 | use darling::Error; 2 | use quote::quote; 3 | 4 | pub(crate) fn bitwarden_error_full( 5 | input: &syn::DeriveInput, 6 | type_identifier: &proc_macro2::Ident, 7 | export_as_identifier: &proc_macro2::Ident, 8 | ) -> proc_macro::TokenStream { 9 | if type_identifier != export_as_identifier { 10 | return Error::custom("`bitwarden_error(full)` does not currently support `export_as`") 11 | .write_errors() 12 | .into(); 13 | } 14 | 15 | let wasm_attributes = cfg!(feature = "wasm").then(|| { 16 | quote! { 17 | #[derive(bitwarden_error::tsify_next::Tsify)] 18 | #[tsify(into_wasm_abi)] 19 | } 20 | }); 21 | 22 | quote! { 23 | #[derive(serde::Serialize)] 24 | #wasm_attributes 25 | #input 26 | } 27 | .into() 28 | } 29 | -------------------------------------------------------------------------------- /crates/bitwarden-error-macro/src/full/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod attribute; 2 | -------------------------------------------------------------------------------- /crates/bitwarden-error/.cargo/config: -------------------------------------------------------------------------------- 1 | [target.wasm32-unknown-unknown] 2 | runner = 'wasm-bindgen-test-runner' 3 | -------------------------------------------------------------------------------- /crates/bitwarden-error/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitwarden-error" 3 | description = """ 4 | Internal crate for the bitwarden crate. Do not use. 5 | """ 6 | 7 | version.workspace = true 8 | authors.workspace = true 9 | edition.workspace = true 10 | rust-version.workspace = true 11 | readme.workspace = true 12 | homepage.workspace = true 13 | repository.workspace = true 14 | license-file.workspace = true 15 | keywords.workspace = true 16 | 17 | [features] 18 | wasm = [ 19 | "bitwarden-error-macro/wasm", 20 | "dep:js-sys", 21 | "dep:tsify-next", 22 | "dep:wasm-bindgen" 23 | ] 24 | 25 | [dependencies] 26 | bitwarden-error-macro = { workspace = true } 27 | js-sys = { workspace = true, optional = true } 28 | tsify-next = { workspace = true, optional = true } 29 | wasm-bindgen = { workspace = true, optional = true } 30 | 31 | [lints] 32 | workspace = true 33 | 34 | [dev-dependencies] 35 | serde.workspace = true 36 | trybuild = "1.0.101" 37 | wasm-bindgen-test = { workspace = true } 38 | -------------------------------------------------------------------------------- /crates/bitwarden-error/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Error 2 | 3 | Provides error macros for simplifying error handling when working with WebAssembly. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-error/src/flat_error.rs: -------------------------------------------------------------------------------- 1 | #[allow(missing_docs)] 2 | pub trait FlatError { 3 | fn error_variant(&self) -> &'static str; 4 | } 5 | -------------------------------------------------------------------------------- /crates/bitwarden-error/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | #[allow(missing_docs)] 4 | pub mod flat_error; 5 | 6 | #[cfg(feature = "wasm")] 7 | #[allow(missing_docs)] 8 | pub mod wasm; 9 | 10 | /// Re-export the `js_sys` crate since the proc macro depends on it. 11 | #[cfg(feature = "wasm")] 12 | #[doc(hidden)] 13 | pub use ::js_sys; 14 | /// Re-export the `tsify_next` crate since the proc macro depends on it. 15 | #[cfg(feature = "wasm")] 16 | #[doc(hidden)] 17 | pub use ::tsify_next; 18 | /// Re-export the `wasm_bindgen` crate since the proc macro depends on it. 19 | #[cfg(feature = "wasm")] 20 | #[doc(hidden)] 21 | pub use ::wasm_bindgen; 22 | pub use bitwarden_error_macro::bitwarden_error; 23 | -------------------------------------------------------------------------------- /crates/bitwarden-error/src/wasm.rs: -------------------------------------------------------------------------------- 1 | use wasm_bindgen::prelude::*; 2 | 3 | #[allow(missing_docs)] 4 | #[cfg_attr(feature = "wasm", wasm_bindgen)] 5 | extern "C" { 6 | #[wasm_bindgen(js_name = Error)] 7 | pub type SdkJsError; 8 | 9 | #[wasm_bindgen(constructor, js_class = Error)] 10 | pub fn new(message: String) -> SdkJsError; 11 | 12 | #[wasm_bindgen(method, getter, structural)] 13 | pub fn message(this: &SdkJsError) -> String; 14 | 15 | #[wasm_bindgen(method, getter, structural)] 16 | pub fn name(this: &SdkJsError) -> String; 17 | 18 | #[wasm_bindgen(method, setter, structural)] 19 | pub fn set_name(this: &SdkJsError, name: String); 20 | 21 | #[wasm_bindgen(method, getter, structural)] 22 | pub fn variant(this: &SdkJsError) -> String; 23 | 24 | #[wasm_bindgen(method, setter, structural)] 25 | pub fn set_variant(this: &SdkJsError, variant: String); 26 | } 27 | -------------------------------------------------------------------------------- /crates/bitwarden-error/tests/compilation_tests/full.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_error::bitwarden_error; 2 | 3 | /// Full errors do not support changing the name of the error in the generated JS 4 | #[bitwarden_error(full, export_as = "SomeOtherError")] 5 | struct SomeError; 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /crates/bitwarden-error/tests/compilation_tests/full.stderr: -------------------------------------------------------------------------------- 1 | error: `bitwarden_error(full)` does not currently support `export_as` 2 | --> tests/compilation_tests/full.rs:4:1 3 | | 4 | 4 | #[bitwarden_error(full, export_as = "SomeOtherError")] 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | | 7 | = note: this error originates in the attribute macro `bitwarden_error` (in Nightly builds, run with -Z macro-backtrace for more info) 8 | -------------------------------------------------------------------------------- /crates/bitwarden-error/tests/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(missing_docs)] 2 | 3 | mod basic; 4 | mod flat; 5 | mod full; 6 | 7 | #[test] 8 | fn compilation_tests() { 9 | let t = trybuild::TestCases::new(); 10 | t.compile_fail("tests/compilation_tests/*.rs"); 11 | } 12 | -------------------------------------------------------------------------------- /crates/bitwarden-exporters/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Exporters 2 | 3 | Contains the export and import functionality for Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-exporters/src/cxf/error.rs: -------------------------------------------------------------------------------- 1 | use std::borrow::Cow; 2 | 3 | use thiserror::Error; 4 | 5 | #[derive(Error, Debug)] 6 | pub enum CxfError { 7 | #[error("JSON error: {0}")] 8 | Serde(#[from] serde_json::Error), 9 | 10 | #[error("Internal error: {0}")] 11 | Internal(Cow<'static, str>), 12 | } 13 | -------------------------------------------------------------------------------- /crates/bitwarden-exporters/src/cxf/mod.rs: -------------------------------------------------------------------------------- 1 | //! Credential Exchange Format (CXF) 2 | //! 3 | //! This module implements support for the Credential Exchange standard as defined by the FIDO 4 | //! Alliance. 5 | //! 6 | //! 7 | mod error; 8 | pub use error::CxfError; 9 | 10 | mod export; 11 | pub(crate) use export::build_cxf; 12 | pub use export::Account; 13 | mod import; 14 | pub(crate) use import::parse_cxf; 15 | mod card; 16 | mod login; 17 | -------------------------------------------------------------------------------- /crates/bitwarden-exporters/src/uniffi_support.rs: -------------------------------------------------------------------------------- 1 | use uuid::Uuid; 2 | 3 | uniffi::use_remote_type!(bitwarden_core::Uuid); 4 | -------------------------------------------------------------------------------- /crates/bitwarden-exporters/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.exporters" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenExportersFFI" 8 | module_name = "BitwardenExporters" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-fido/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Fido 2 | 3 | Contains the FIDO2 implementation for Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-fido/src/uniffi_support.rs: -------------------------------------------------------------------------------- 1 | use uuid::Uuid; 2 | 3 | uniffi::use_remote_type!(bitwarden_core::Uuid); 4 | -------------------------------------------------------------------------------- /crates/bitwarden-fido/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.fido" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenFidoFFI" 8 | module_name = "BitwardenFido" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-generators/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Generators 2 | 3 | Contains the implementation of the generators for the Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-generators/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | mod generator_client; 4 | mod username_forwarders; 5 | pub use generator_client::{GeneratorClient, GeneratorClientsExt}; 6 | pub(crate) mod passphrase; 7 | pub use passphrase::{PassphraseError, PassphraseGeneratorRequest}; 8 | pub(crate) mod password; 9 | pub use password::{PasswordError, PasswordGeneratorRequest}; 10 | pub(crate) mod username; 11 | pub use username::{ForwarderServiceType, UsernameError, UsernameGeneratorRequest}; 12 | mod util; 13 | 14 | #[cfg(feature = "uniffi")] 15 | uniffi::setup_scaffolding!(); 16 | -------------------------------------------------------------------------------- /crates/bitwarden-generators/src/username_forwarders/mod.rs: -------------------------------------------------------------------------------- 1 | pub(super) mod addyio; 2 | pub(super) mod duckduckgo; 3 | pub(super) mod fastmail; 4 | pub(super) mod firefox; 5 | pub(super) mod forwardemail; 6 | pub(super) mod simplelogin; 7 | 8 | fn format_description(website: &Option) -> String { 9 | let description = website 10 | .as_ref() 11 | .map(|w| format!("Website: {w}. ")) 12 | .unwrap_or_default(); 13 | format!("{description}Generated by Bitwarden.") 14 | } 15 | 16 | fn format_description_ff(website: &Option) -> String { 17 | let description = website 18 | .as_ref() 19 | .map(|w| format!("{w} - ")) 20 | .unwrap_or_default(); 21 | format!("{description}Generated by Bitwarden.") 22 | } 23 | -------------------------------------------------------------------------------- /crates/bitwarden-generators/src/util.rs: -------------------------------------------------------------------------------- 1 | pub(crate) fn capitalize_first_letter(s: &str) -> String { 2 | // Unicode case conversion can change the length of the string, so we can't capitalize in place. 3 | // Instead we extract the first character and convert it to uppercase. This returns 4 | // an iterator which we collect into a string, and then append the rest of the input. 5 | let mut c = s.chars(); 6 | match c.next() { 7 | None => String::new(), 8 | Some(f) => f.to_uppercase().collect::() + c.as_str(), 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /crates/bitwarden-generators/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.generators" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenGeneratorsFFI" 8 | module_name = "BitwardenGenerators" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-ipc/README.md: -------------------------------------------------------------------------------- 1 | # bitwarden-ipc 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ipc/src/endpoint.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | #[cfg(feature = "wasm")] 3 | use {tsify_next::Tsify, wasm_bindgen::prelude::*}; 4 | 5 | #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash)] 6 | #[cfg_attr(feature = "wasm", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))] 7 | pub enum Endpoint { 8 | Web { id: i32 }, 9 | BrowserForeground, 10 | BrowserBackground, 11 | DesktopRenderer, 12 | DesktopMain, 13 | } 14 | -------------------------------------------------------------------------------- /crates/bitwarden-ipc/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | mod endpoint; 4 | mod error; 5 | mod ipc_client; 6 | mod message; 7 | mod traits; 8 | 9 | /// Re-export types to make sure wasm_bindgen picks them up 10 | #[cfg(feature = "wasm")] 11 | pub mod wasm; 12 | 13 | pub use ipc_client::IpcClient; 14 | -------------------------------------------------------------------------------- /crates/bitwarden-ipc/src/traits/mod.rs: -------------------------------------------------------------------------------- 1 | mod communication_backend; 2 | mod crypto_provider; 3 | mod session_repository; 4 | 5 | #[cfg(test)] 6 | pub use communication_backend::tests; 7 | pub use communication_backend::{CommunicationBackend, CommunicationBackendReceiver}; 8 | pub use crypto_provider::{CryptoProvider, NoEncryptionCryptoProvider}; 9 | pub use session_repository::{InMemorySessionRepository, SessionRepository}; 10 | -------------------------------------------------------------------------------- /crates/bitwarden-ipc/src/wasm/mod.rs: -------------------------------------------------------------------------------- 1 | mod communication_backend; 2 | mod error; 3 | mod ipc_client; 4 | mod message; 5 | 6 | // Re-export types to make sure wasm_bindgen picks them up 7 | pub use communication_backend::*; 8 | pub use error::*; 9 | pub use ipc_client::*; 10 | -------------------------------------------------------------------------------- /crates/bitwarden-send/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Send 2 | 3 | Contains the implementation of the send functionality for the Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-send/src/error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[allow(missing_docs)] 4 | #[derive(Debug, Error)] 5 | pub enum SendParseError { 6 | #[error(transparent)] 7 | Chrono(#[from] chrono::ParseError), 8 | #[error(transparent)] 9 | Crypto(#[from] bitwarden_crypto::CryptoError), 10 | #[error(transparent)] 11 | MissingFieldError(#[from] bitwarden_core::MissingFieldError), 12 | } 13 | -------------------------------------------------------------------------------- /crates/bitwarden-send/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | #[cfg(feature = "uniffi")] 4 | uniffi::setup_scaffolding!(); 5 | #[cfg(feature = "uniffi")] 6 | mod uniffi_support; 7 | 8 | mod error; 9 | pub use error::SendParseError; 10 | mod send_client; 11 | pub use send_client::{ 12 | SendClient, SendClientExt, SendDecryptError, SendDecryptFileError, SendEncryptError, 13 | SendEncryptFileError, 14 | }; 15 | mod send; 16 | pub use send::{Send, SendListView, SendView}; 17 | -------------------------------------------------------------------------------- /crates/bitwarden-send/src/uniffi_support.rs: -------------------------------------------------------------------------------- 1 | use uuid::Uuid; 2 | 3 | type DateTime = chrono::DateTime; 4 | uniffi::use_remote_type!(bitwarden_core::DateTime); 5 | uniffi::use_remote_type!(bitwarden_core::Uuid); 6 | -------------------------------------------------------------------------------- /crates/bitwarden-send/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.send" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenSendFFI" 8 | module_name = "BitwardenSend" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden SSH 2 | 3 | Contains the implementation of the ssh generators and import for the Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/generator/ed25519_key: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW 3 | QyNTUxOQAAACCWETEIh/JX+ZaK0Xlg5xZ9QIfjiKD2Qs57PjhRY45trwAAAIhqmvSbapr0 4 | mwAAAAtzc2gtZWQyNTUxOQAAACCWETEIh/JX+ZaK0Xlg5xZ9QIfjiKD2Qs57PjhRY45trw 5 | AAAEAHVflTgR/OEl8mg9UEKcO7SeB0FH4AiaUurhVfBWT4eZYRMQiH8lf5lorReWDnFn1A 6 | h+OIoPZCzns+OFFjjm2vAAAAAAECAwQF 7 | -----END OPENSSH PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ecdsa_openssh_unencrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS 3 | 1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQRQzzQ8nQEouF1FMSHkPx1nejNCzF7g 4 | Yb8MHXLdBFM0uJkWs0vzgLJkttts2eDv3SHJqIH6qHpkLtEvgMXE5WcaAAAAoOO1BebjtQ 5 | XmAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFDPNDydASi4XUUx 6 | IeQ/HWd6M0LMXuBhvwwdct0EUzS4mRazS/OAsmS222zZ4O/dIcmogfqoemQu0S+AxcTlZx 7 | oAAAAhAKnIXk6H0Hs3HblklaZ6UmEjjdE/0t7EdYixpMmtpJ4eAAAAB3Rlc3RrZXk= 8 | -----END OPENSSH PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ecdsa_openssh_unencrypted.pub: -------------------------------------------------------------------------------- 1 | ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFDPNDydASi4XUUxIeQ/HWd6M0LMXuBhvwwdct0EUzS4mRazS/OAsmS222zZ4O/dIcmogfqoemQu0S+AxcTlZxo= testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_openssh_encrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABAUTNb0if 3 | fqsoqtfv70CfukAAAAGAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIHGs3Uw3eyqnFjBI 4 | 2eb7Qto4KVc34ZdnBac59Bab54BLAAAAkPA6aovfxQbP6FoOfaRH6u22CxqiUM0bbMpuFf 5 | WETn9FLaBE6LjoHH0ZI5rzNjJaQUNfx0cRcqsIrexw8YINrdVjySmEqrl5hw8gpgy0gGP5 6 | 1Y6vKWdHdrxJCA9YMFOfDs0UhPfpLKZCwm2Sg+Bd8arlI8Gy7y4Jj/60v2bZOLhD2IZQnK 7 | NdJ8xATiIINuTy4g== 8 | -----END OPENSSH PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_openssh_encrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHGs3Uw3eyqnFjBI2eb7Qto4KVc34ZdnBac59Bab54BL testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_openssh_unencrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW 3 | QyNTUxOQAAACAyQo22TXXNqvF+L8jUSSNeu8UqrsDjvf9pwIwDC9ML6gAAAJDSHpL60h6S 4 | +gAAAAtzc2gtZWQyNTUxOQAAACAyQo22TXXNqvF+L8jUSSNeu8UqrsDjvf9pwIwDC9ML6g 5 | AAAECLdlFLIJbEiFo/f0ROdXMNZAPHGPNhvbbftaPsUZEjaDJCjbZNdc2q8X4vyNRJI167 6 | xSquwOO9/2nAjAML0wvqAAAAB3Rlc3RrZXkBAgMEBQY= 7 | -----END OPENSSH PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_openssh_unencrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDJCjbZNdc2q8X4vyNRJI167xSquwOO9/2nAjAML0wvq testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_pkcs8_unencrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MFECAQEwBQYDK2VwBCIEIDY6/OAdDr3PbDss9NsLXK4CxiKUvz5/R9uvjtIzj4Sz 3 | gSEAxsxm1xpZ/4lKIRYm0JrJ5gRZUh7H24/YT/0qGVGzPa0= 4 | -----END PRIVATE KEY----- 5 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_pkcs8_unencrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMbMZtcaWf+JSiEWJtCayeYEWVIex9uP2E/9KhlRsz2t 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/ed25519_putty_openssh_unencrypted: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtz 3 | c2gtZWQyNTUxOQAAACDp0/9zFBCyZs5BFqXCJN5i1DTanzPGHpUeo2LP8FmQ9wAA 4 | AKCyIXPqsiFz6gAAAAtzc2gtZWQyNTUxOQAAACDp0/9zFBCyZs5BFqXCJN5i1DTa 5 | nzPGHpUeo2LP8FmQ9wAAAEDQioomhjmD+sh2nsxfQLJ5YYGASNUAlUZHe9Jx0p47 6 | H+nT/3MUELJmzkEWpcIk3mLUNNqfM8YelR6jYs/wWZD3AAAAEmVkZHNhLWtleS0y 7 | MDI0MTExOAECAwQFBgcICQoL 8 | -----END OPENSSH PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/rsa_openssh_encrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/v18xGP3qzRV9iWqyiuwHZ4GpC4K2NO2/i2Yv5A3/bnal7CmiMh/S78lphgxcWtFkwrwlb321FmdHBv6KOW+EzSiPvmsdkkbpfBXB3Qf2SlhZOZZ7lYeu8KAxL3exvvn8O1GGlUjXGUrFgmC60tHWDBc1Ncmo8a2dwDLmA/sbLa8su2dvYEFmRg1vaytLDpkn8GS7zAxrUl/g0W2RwkPsByduUziQuX90v9WAy7MqOlwBRq6t5o8wdDBVODe0VIXC7N1OS42YUsKF+N0XOnLiJrIIKkXpahMDpKZHeHQAdUQzsJVhKoLJR8DNDTYyhnJoQG7Q6m2gDTca9oAWvsBiNoEwCvwrt7cDNCz/GslH9HXQgfWcVXn8+fuZgvjO3CxUI16Ev33m0jWoOKJcgK/ZLRnk8SEvsJ8NO32MeR/qUb7IN/yUcDmPMI/3ecQsakF2cwNzHkyiGVo//yVTpf+vk8b89L+GXbYU5rtswtc2ZEGsQnUkaoNqS8mHqhWQBUk= testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/rsa_openssh_unencrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1Uh7SCc+0Prb33+uhPue1mBV76oiogwiu4l0jbFNqcsaE2kE6XOBaqiRtAr5pcBNxoHuJAvVI/EhZXYziMQFBtm6KYiANC8psnhNk8oR7VV2yt+4ij72kMrtwYpz4mJaEqOp5NEyP3X+pHV9bkhY5TITWuTCFM2TAmq1gpktWZ3hNe1CxgwwL4jRzPiSt+TViqZpp7+CPXaHwG8Tdj4qih/gmguyo+58f4f9tURrK/rdHIBDX+1S/2X6vAn6y9ZXhffN/fPjSEYXjcv80aX3RW61uftv0b9GAR2JfItlyI/ddtZstQz6vuYb0o25J6iLF7mOiTXlQqoJdfFVvkgRnveRq5tJ/P0m2yq0ob86M6roVuXcrLuSO8nIaki96y5IieWnM9epstQIskl84A9RnXCLy665E14/NAEwyGrxS0BsHYPLXp34eWCCHNDTQ3G1tAx8NkF0Cl/GbeyEjGRRwfNsNK+uIdVoYag6SYc8Cax0ywyJ6S5Qx72WN06GZ1PE= testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/rsa_pkcs8_encrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCcHkc0xfH4w9aW41S9M/BfancSY4QPc2O4G1cRjFfK8QrLEGDA7NiHtoEML0afcurRXD3NVxuKaAns0w6EoS4CjzXUqVHTLA4SUyuapr8k0Eu2xOpbCwC3jDovhckoKloq7BvE6rC2i5wjSMadtIJKt/dqWI3HLjUMz1BxQJAU/qAbicj1SFZSjA/MubVBzcq93XOvByMtlIFu7wami3FTc37rVkGeUFHtK8ZbvG3n1aaTF79bBgSPuoq5BfcMdGr4WfQyGQzgse4v4hQ8yKYrtE0jo0kf06hEORimwOIU/W5IH1r+/xFs7qGKcPnFSZRIFv5LfMPTo8b+OsBRflosyfUumDEX97GZE7DSQl0EJzNvWeKwl7dQ8RUJTkbph2CjrxY77DFim+165Uj/WRr4uq2qMNhA2xNSD19+TA6AHdpGw4WZd37q2/n+EddlaJEH8MzpgtHNG9MiYh5ScZ+AG0QugflozJcQNc7n8N9Lpu1sRoejV5RhurHg/TYwVK8= testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/rsa_pkcs8_unencrypted.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCn4+QiJojZ9mgc9KYJIvDWGaz4qFhf0CButg6L8zEoHKwuiN+mqcEciCCOa9BNiJmm8NTTehZvrrglGG59zIbqYtDAHjVn+vtb49xPzIv+M651Yqj08lIbR9tEIHKCq7aH8GlDm8NgG9EzJGjlL7okQym4TH1MHl+s4mUyr/qb2unlZBDixAQsphU8iCLftukWCIkmQg4CSj1Gh3WbBlZ+EX5eW0EXuAw4XsSbBTWV9CHRowVIpYqPvEYSpHsoCjEcd988p19hpiGknA0J4z7JfUlNgyT/1chb8GCTDT+2DCBRApbsIg6TOBVS+PR6emAQ3eZzUW0+3/oRM4ip0ujltQy8uU6gvYIAqx5wXGMThVpZcUgahKiSsVo/s4b84iMe4DG3W8jz4qi6yyNv0VedEzPUZ1lXd1GJFoy9uKNuSTe+1ksicAcluZN6LuNsPHcPxFCzOcmoNnVXEKAXInt+ys//5CDVasroZSAHZnDjUD4oNsLI3VIOnGxgXrkwSH0= testkey 2 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/resources/import/wrong_label: -------------------------------------------------------------------------------- 1 | -----BEGIN WRONG LABEL KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS 3 | 1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQRQzzQ8nQEouF1FMSHkPx1nejNCzF7g 4 | Yb8MHXLdBFM0uJkWs0vzgLJkttts2eDv3SHJqIH6qHpkLtEvgMXE5WcaAAAAoOO1BebjtQ 5 | XmAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFDPNDydASi4XUUx 6 | IeQ/HWd6M0LMXuBhvwwdct0EUzS4mRazS/OAsmS222zZ4O/dIcmogfqoemQu0S+AxcTlZx 7 | oAAAAhAKnIXk6H0Hs3HblklaZ6UmEjjdE/0t7EdYixpMmtpJ4eAAAAB3Rlc3RrZXk= 8 | -----END WRONG LABEL KEY----- 9 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/src/error.rs: -------------------------------------------------------------------------------- 1 | use bitwarden_error::bitwarden_error; 2 | use thiserror::Error; 3 | 4 | #[allow(missing_docs)] 5 | #[bitwarden_error(flat)] 6 | #[derive(Error, Debug)] 7 | pub enum KeyGenerationError { 8 | #[error("Failed to generate key: {0}")] 9 | KeyGenerationError(ssh_key::Error), 10 | #[error("Failed to convert key")] 11 | KeyConversionError, 12 | } 13 | 14 | #[allow(missing_docs)] 15 | #[bitwarden_error(flat)] 16 | #[derive(Error, Debug, PartialEq)] 17 | pub enum SshKeyImportError { 18 | #[error("Failed to parse key")] 19 | ParsingError, 20 | #[error("Password required")] 21 | PasswordRequired, 22 | #[error("Wrong password")] 23 | WrongPassword, 24 | #[error("Unsupported key type")] 25 | UnsupportedKeyType, 26 | } 27 | 28 | #[allow(missing_docs)] 29 | #[bitwarden_error(flat)] 30 | #[derive(Error, Debug, PartialEq)] 31 | pub enum SshKeyExportError { 32 | #[error("Failed to convert key")] 33 | KeyConversionError, 34 | } 35 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | #[allow(missing_docs)] 4 | pub mod error; 5 | #[allow(missing_docs)] 6 | pub mod generator; 7 | #[allow(missing_docs)] 8 | pub mod import; 9 | 10 | use bitwarden_vault::SshKeyView; 11 | use error::SshKeyExportError; 12 | use pkcs8::LineEnding; 13 | use ssh_key::{HashAlg, PrivateKey}; 14 | 15 | #[cfg(feature = "uniffi")] 16 | uniffi::setup_scaffolding!(); 17 | 18 | fn ssh_private_key_to_view(value: PrivateKey) -> Result { 19 | let private_key_openssh = value 20 | .to_openssh(LineEnding::LF) 21 | .map_err(|_| SshKeyExportError::KeyConversionError)?; 22 | 23 | Ok(SshKeyView { 24 | private_key: private_key_openssh.to_string(), 25 | public_key: value.public_key().to_string(), 26 | fingerprint: value.fingerprint(HashAlg::Sha256).to_string(), 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /crates/bitwarden-ssh/uniffi.toml: -------------------------------------------------------------------------------- 1 | [bindings.kotlin] 2 | package_name = "com.bitwarden.ssh" 3 | generate_immutable_records = true 4 | android = true 5 | 6 | [bindings.swift] 7 | ffi_module_name = "BitwardenSshFFI" 8 | module_name = "BitwardenSsh" 9 | generate_immutable_records = true 10 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/.cargo/config: -------------------------------------------------------------------------------- 1 | [target.wasm32-unknown-unknown] 2 | runner = 'wasm-bindgen-test-runner' 3 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/README.md: -------------------------------------------------------------------------------- 1 | # bitwarden-threading 2 | 3 | Utility crate for Bitwarden SDK to handle threading and async quirks in FFI contexts. 4 | 5 | ## WASM Testing 6 | 7 | To run the WASM tests, you can use the following command: 8 | 9 | ```bash 10 | cargo test --target wasm32-unknown-unknown --all-features -- --nocapture 11 | ``` 12 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | 3 | #[allow(missing_docs)] 4 | pub mod cancellation_token; 5 | mod thread_bound_runner; 6 | #[allow(missing_docs)] 7 | pub mod time; 8 | 9 | pub use thread_bound_runner::ThreadBoundRunner; 10 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/tests/cancellation_token/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(target_arch = "wasm32")] 2 | mod wasm; 3 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/tests/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(missing_docs)] 2 | 3 | mod cancellation_token; 4 | mod thread_bound_runner; 5 | -------------------------------------------------------------------------------- /crates/bitwarden-threading/tests/thread_bound_runner/mod.rs: -------------------------------------------------------------------------------- 1 | mod standard_tokio; 2 | mod wasm; 3 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/README.md: -------------------------------------------------------------------------------- 1 | # Bitwarden Uniffi 2 | 3 | Contains mobile bindings for the Bitwarden Password Manager. 4 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/java/com/bitwarden/myapplication/ui/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.bitwarden.myapplication.ui.theme 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val Purple80 = Color(0xFFD0BCFF) 6 | val PurpleGrey80 = Color(0xFFCCC2DC) 7 | val Pink80 = Color(0xFFEFB8C8) 8 | 9 | val Purple40 = Color(0xFF6650a4) 10 | val PurpleGrey40 = Color(0xFF625b71) 11 | val Pink40 = Color(0xFF7D5260) 12 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitwarden/sdk-internal/38654e93f8b6d8b893cb6758fb088105739f49f5/crates/bitwarden-uniffi/kotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | My Application 3 | -------------------------------------------------------------------------------- /crates/bitwarden-uniffi/kotlin/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |