diff --git a/bitwarden_license/bitwarden-sm/src/projects/create.rs b/bitwarden_license/bitwarden-sm/src/projects/create.rs index 8a6561727..79673110a 100644 --- a/bitwarden_license/bitwarden-sm/src/projects/create.rs +++ b/bitwarden_license/bitwarden-sm/src/projects/create.rs @@ -40,7 +40,7 @@ pub(crate) async fn create_project( }); let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::projects_api::organizations_organization_id_projects_post( + let res = bitwarden_api_api::apis::projects_api::projects_create( &config.api, input.organization_id, project, diff --git a/bitwarden_license/bitwarden-sm/src/projects/delete.rs b/bitwarden_license/bitwarden-sm/src/projects/delete.rs index b906dab96..b405385aa 100644 --- a/bitwarden_license/bitwarden-sm/src/projects/delete.rs +++ b/bitwarden_license/bitwarden-sm/src/projects/delete.rs @@ -22,7 +22,7 @@ pub(crate) async fn delete_projects( ) -> Result { let config = client.internal.get_api_configurations().await; let res = - bitwarden_api_api::apis::projects_api::projects_delete_post(&config.api, Some(input.ids)) + bitwarden_api_api::apis::projects_api::projects_bulk_delete(&config.api, Some(input.ids)) .await?; ProjectsDeleteResponse::process_response(res) diff --git a/bitwarden_license/bitwarden-sm/src/projects/get.rs b/bitwarden_license/bitwarden-sm/src/projects/get.rs index 541e64acc..a6bdeab2a 100644 --- a/bitwarden_license/bitwarden-sm/src/projects/get.rs +++ b/bitwarden_license/bitwarden-sm/src/projects/get.rs @@ -19,7 +19,7 @@ pub(crate) async fn get_project( ) -> Result { let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::projects_api::projects_id_get(&config.api, input.id).await?; + let res = bitwarden_api_api::apis::projects_api::projects_get(&config.api, input.id).await?; let key_store = client.internal.get_key_store(); diff --git a/bitwarden_license/bitwarden-sm/src/projects/list.rs b/bitwarden_license/bitwarden-sm/src/projects/list.rs index 4859e371a..2b04145f1 100644 --- a/bitwarden_license/bitwarden-sm/src/projects/list.rs +++ b/bitwarden_license/bitwarden-sm/src/projects/list.rs @@ -20,7 +20,7 @@ pub(crate) async fn list_projects( input: &ProjectsListRequest, ) -> Result { let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::projects_api::organizations_organization_id_projects_get( + let res = bitwarden_api_api::apis::projects_api::projects_list_by_organization( &config.api, input.organization_id, ) diff --git a/bitwarden_license/bitwarden-sm/src/projects/update.rs b/bitwarden_license/bitwarden-sm/src/projects/update.rs index 36ad8228c..2f948ed5d 100644 --- a/bitwarden_license/bitwarden-sm/src/projects/update.rs +++ b/bitwarden_license/bitwarden-sm/src/projects/update.rs @@ -43,7 +43,7 @@ pub(crate) async fn update_project( let config = client.internal.get_api_configurations().await; let res = - bitwarden_api_api::apis::projects_api::projects_id_put(&config.api, input.id, project) + bitwarden_api_api::apis::projects_api::projects_update(&config.api, input.id, project) .await?; ProjectResponse::process_response(res, &mut key_store.context()) diff --git a/bitwarden_license/bitwarden-sm/src/secrets/create.rs b/bitwarden_license/bitwarden-sm/src/secrets/create.rs index 88462cd3e..a26653684 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/create.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/create.rs @@ -55,7 +55,7 @@ pub(crate) async fn create_secret( }; let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::secrets_api::organizations_organization_id_secrets_post( + let res = bitwarden_api_api::apis::secrets_api::secrets_create( &config.api, input.organization_id, secret, diff --git a/bitwarden_license/bitwarden-sm/src/secrets/delete.rs b/bitwarden_license/bitwarden-sm/src/secrets/delete.rs index 84a4a0993..b879f5b6e 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/delete.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/delete.rs @@ -22,7 +22,7 @@ pub(crate) async fn delete_secrets( ) -> Result { let config = client.internal.get_api_configurations().await; let res = - bitwarden_api_api::apis::secrets_api::secrets_delete_post(&config.api, Some(input.ids)) + bitwarden_api_api::apis::secrets_api::secrets_bulk_delete(&config.api, Some(input.ids)) .await?; SecretsDeleteResponse::process_response(res) diff --git a/bitwarden_license/bitwarden-sm/src/secrets/get.rs b/bitwarden_license/bitwarden-sm/src/secrets/get.rs index 8c26ee9bf..ae43e5b87 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/get.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/get.rs @@ -18,7 +18,7 @@ pub(crate) async fn get_secret( input: &SecretGetRequest, ) -> Result { let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::secrets_api::secrets_id_get(&config.api, input.id).await?; + let res = bitwarden_api_api::apis::secrets_api::secrets_get(&config.api, input.id).await?; let key_store = client.internal.get_key_store(); diff --git a/bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs b/bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs index 291a97a5a..564f7461a 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/get_by_ids.rs @@ -23,7 +23,8 @@ pub(crate) async fn get_secrets_by_ids( let config = client.internal.get_api_configurations().await; let res = - bitwarden_api_api::apis::secrets_api::secrets_get_by_ids_post(&config.api, request).await?; + bitwarden_api_api::apis::secrets_api::secrets_get_secrets_by_ids(&config.api, request) + .await?; let key_store = client.internal.get_key_store(); diff --git a/bitwarden_license/bitwarden-sm/src/secrets/list.rs b/bitwarden_license/bitwarden-sm/src/secrets/list.rs index 8b2090327..fc89aaffe 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/list.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/list.rs @@ -26,7 +26,7 @@ pub(crate) async fn list_secrets( input: &SecretIdentifiersRequest, ) -> Result { let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::secrets_api::organizations_organization_id_secrets_get( + let res = bitwarden_api_api::apis::secrets_api::secrets_list_by_organization( &config.api, input.organization_id, ) @@ -50,7 +50,7 @@ pub(crate) async fn list_secrets_by_project( input: &SecretIdentifiersByProjectRequest, ) -> Result { let config = client.internal.get_api_configurations().await; - let res = bitwarden_api_api::apis::secrets_api::projects_project_id_secrets_get( + let res = bitwarden_api_api::apis::secrets_api::secrets_get_secrets_by_project( &config.api, input.project_id, ) diff --git a/bitwarden_license/bitwarden-sm/src/secrets/sync.rs b/bitwarden_license/bitwarden-sm/src/secrets/sync.rs index 888ccaef6..5bf3df6da 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/sync.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/sync.rs @@ -25,7 +25,7 @@ pub(crate) async fn sync_secrets( let config = client.internal.get_api_configurations().await; let last_synced_date = input.last_synced_date.map(|date| date.to_rfc3339()); - let res = bitwarden_api_api::apis::secrets_api::organizations_organization_id_secrets_sync_get( + let res = bitwarden_api_api::apis::secrets_api::secrets_get_secrets_sync( &config.api, input.organization_id, last_synced_date, diff --git a/bitwarden_license/bitwarden-sm/src/secrets/update.rs b/bitwarden_license/bitwarden-sm/src/secrets/update.rs index 011ce6a8a..73e57318e 100644 --- a/bitwarden_license/bitwarden-sm/src/secrets/update.rs +++ b/bitwarden_license/bitwarden-sm/src/secrets/update.rs @@ -55,7 +55,8 @@ pub(crate) async fn update_secret( let config = client.internal.get_api_configurations().await; let res = - bitwarden_api_api::apis::secrets_api::secrets_id_put(&config.api, input.id, secret).await?; + bitwarden_api_api::apis::secrets_api::secrets_update_secret(&config.api, input.id, secret) + .await?; SecretResponse::process_response(res, &mut key_store.context()) } diff --git a/crates/bitwarden-api-api/.openapi-generator/FILES b/crates/bitwarden-api-api/.openapi-generator/FILES index b01ce9d70..48b67cc71 100644 --- a/crates/bitwarden-api-api/.openapi-generator/FILES +++ b/crates/bitwarden-api-api/.openapi-generator/FILES @@ -1,5 +1,3 @@ -.gitignore -Cargo.toml README.md src/apis/access_policies_api.rs src/apis/account_billing_v_next_api.rs @@ -34,6 +32,7 @@ src/apis/organization_domain_api.rs src/apis/organization_export_api.rs src/apis/organization_integration_api.rs src/apis/organization_integration_configuration_api.rs +src/apis/organization_reports_api.rs src/apis/organization_sponsorships_api.rs src/apis/organization_users_api.rs src/apis/organizations_api.rs @@ -54,6 +53,7 @@ src/apis/secrets_api.rs src/apis/secrets_manager_events_api.rs src/apis/secrets_manager_porting_api.rs src/apis/security_task_api.rs +src/apis/self_hosted_account_billing_api.rs src/apis/self_hosted_organization_licenses_api.rs src/apis/self_hosted_organization_sponsorships_api.rs src/apis/sends_api.rs @@ -158,13 +158,13 @@ src/models/collection_access_details_response_model_list_response_model.rs src/models/collection_bulk_delete_request_model.rs src/models/collection_details_response_model.rs src/models/collection_details_response_model_list_response_model.rs -src/models/collection_request_model.rs src/models/collection_response_model.rs src/models/collection_response_model_list_response_model.rs src/models/collection_type.rs src/models/collection_with_id_request_model.rs src/models/config_response_model.rs src/models/create_client_organization_request_body.rs +src/models/create_collection_request_model.rs src/models/credential_create_options.rs src/models/delete_attachment_response_data.rs src/models/delete_recover_request_model.rs @@ -179,7 +179,6 @@ src/models/device_type.rs src/models/device_verification_request_model.rs src/models/device_verification_response_model.rs src/models/domains_response_model.rs -src/models/drop_organization_report_request.rs src/models/drop_password_health_report_application_request.rs src/models/email_request_model.rs src/models/email_token_request_model.rs @@ -250,6 +249,7 @@ src/models/member_access_detail_report_response_model.rs src/models/member_cipher_details_response_model.rs src/models/member_decryption_type.rs src/models/minimal_billing_address_request.rs +src/models/minimal_tokenized_payment_method_request.rs src/models/mod.rs src/models/notification_response_model.rs src/models/notification_response_model_list_response_model.rs @@ -282,8 +282,6 @@ src/models/organization_license.rs src/models/organization_no_payment_create_request.rs src/models/organization_password_manager_request_model.rs src/models/organization_public_key_response_model.rs -src/models/organization_report.rs -src/models/organization_report_summary_model.rs src/models/organization_response_model.rs src/models/organization_seat_request_model.rs src/models/organization_sponsorship_create_request_model.rs @@ -354,6 +352,7 @@ src/models/policy_type.rs src/models/potential_grantee_response_model.rs src/models/potential_grantee_response_model_list_response_model.rs src/models/pre_validate_sponsorship_response_model.rs +src/models/premium_cloud_hosted_subscription_request.rs src/models/preview_individual_invoice_request_body.rs src/models/preview_organization_invoice_request_body.rs src/models/preview_tax_amount_for_organization_trial_request_body.rs @@ -419,6 +418,7 @@ src/models/rotate_user_account_keys_and_data_request_model.rs src/models/saml2_binding_type.rs src/models/saml2_name_id_format.rs src/models/saml2_signing_behavior.rs +src/models/save_policy_request.rs src/models/secret_access_policies_requests_model.rs src/models/secret_access_policies_response_model.rs src/models/secret_create_request_model.rs @@ -436,6 +436,7 @@ src/models/secrets_sync_response_model.rs src/models/secrets_with_projects_inner_secret.rs src/models/secure_note_type.rs src/models/security_task_create_request.rs +src/models/security_task_metrics_response_model.rs src/models/security_task_status.rs src/models/security_task_type.rs src/models/security_tasks_response_model.rs @@ -497,7 +498,6 @@ src/models/two_factor_provider_response_model.rs src/models/two_factor_provider_response_model_list_response_model.rs src/models/two_factor_provider_type.rs src/models/two_factor_recover_response_model.rs -src/models/two_factor_recovery_request_model.rs src/models/two_factor_web_authn_delete_request_model.rs src/models/two_factor_web_authn_request_model.rs src/models/two_factor_web_authn_response_model.rs @@ -507,8 +507,13 @@ src/models/unlock_data_request_model.rs src/models/untrust_devices_request_model.rs src/models/update_avatar_request_model.rs src/models/update_client_organization_request_body.rs +src/models/update_collection_request_model.rs src/models/update_devices_trust_request_model.rs src/models/update_domains_request_model.rs +src/models/update_organization_report_application_data_request.rs +src/models/update_organization_report_data_request.rs +src/models/update_organization_report_request.rs +src/models/update_organization_report_summary_request.rs src/models/update_payment_method_request_body.rs src/models/update_profile_request_model.rs src/models/update_tde_offboarding_password_request_model.rs @@ -525,7 +530,6 @@ src/models/user_license.rs src/models/user_verification_requirement.rs src/models/verified_organization_domain_sso_detail_response_model.rs src/models/verified_organization_domain_sso_details_response_model.rs -src/models/verify_bank_account_request.rs src/models/verify_bank_account_request_body.rs src/models/verify_delete_recover_request_model.rs src/models/verify_email_request_model.rs diff --git a/crates/bitwarden-api-api/README.md b/crates/bitwarden-api-api/README.md index f08240b7a..0432fb8b8 100644 --- a/crates/bitwarden-api-api/README.md +++ b/crates/bitwarden-api-api/README.md @@ -25,555 +25,563 @@ bitwarden-api-api = { path = "./bitwarden-api-api" } ## Documentation for API Endpoints -All URIs are relative to _http://localhost_ +All URIs are relative to *https://api.bitwarden.com* -| Class | Method | HTTP request | Description | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _AccessPoliciesApi_ | [**organizations_id_access_policies_people_potential_grantees_get**](docs/AccessPoliciesApi.md#organizations_id_access_policies_people_potential_grantees_get) | **GET** /organizations/{id}/access-policies/people/potential-grantees | -| _AccessPoliciesApi_ | [**organizations_id_access_policies_projects_potential_grantees_get**](docs/AccessPoliciesApi.md#organizations_id_access_policies_projects_potential_grantees_get) | **GET** /organizations/{id}/access-policies/projects/potential-grantees | -| _AccessPoliciesApi_ | [**organizations_id_access_policies_service_accounts_potential_grantees_get**](docs/AccessPoliciesApi.md#organizations_id_access_policies_service_accounts_potential_grantees_get) | **GET** /organizations/{id}/access-policies/service-accounts/potential-grantees | -| _AccessPoliciesApi_ | [**projects_id_access_policies_people_get**](docs/AccessPoliciesApi.md#projects_id_access_policies_people_get) | **GET** /projects/{id}/access-policies/people | -| _AccessPoliciesApi_ | [**projects_id_access_policies_people_put**](docs/AccessPoliciesApi.md#projects_id_access_policies_people_put) | **PUT** /projects/{id}/access-policies/people | -| _AccessPoliciesApi_ | [**projects_id_access_policies_service_accounts_get**](docs/AccessPoliciesApi.md#projects_id_access_policies_service_accounts_get) | **GET** /projects/{id}/access-policies/service-accounts | -| _AccessPoliciesApi_ | [**projects_id_access_policies_service_accounts_put**](docs/AccessPoliciesApi.md#projects_id_access_policies_service_accounts_put) | **PUT** /projects/{id}/access-policies/service-accounts | -| _AccessPoliciesApi_ | [**secrets_secret_id_access_policies_get**](docs/AccessPoliciesApi.md#secrets_secret_id_access_policies_get) | **GET** /secrets/{secretId}/access-policies | -| _AccessPoliciesApi_ | [**service_accounts_id_access_policies_people_get**](docs/AccessPoliciesApi.md#service_accounts_id_access_policies_people_get) | **GET** /service-accounts/{id}/access-policies/people | -| _AccessPoliciesApi_ | [**service_accounts_id_access_policies_people_put**](docs/AccessPoliciesApi.md#service_accounts_id_access_policies_people_put) | **PUT** /service-accounts/{id}/access-policies/people | -| _AccessPoliciesApi_ | [**service_accounts_id_granted_policies_get**](docs/AccessPoliciesApi.md#service_accounts_id_granted_policies_get) | **GET** /service-accounts/{id}/granted-policies | -| _AccessPoliciesApi_ | [**service_accounts_id_granted_policies_put**](docs/AccessPoliciesApi.md#service_accounts_id_granted_policies_put) | **PUT** /service-accounts/{id}/granted-policies | -| _AccountBillingVNextApi_ | [**account_billing_vnext_credit_bitpay_post**](docs/AccountBillingVNextApi.md#account_billing_vnext_credit_bitpay_post) | **POST** /account/billing/vnext/credit/bitpay | -| _AccountBillingVNextApi_ | [**account_billing_vnext_credit_get**](docs/AccountBillingVNextApi.md#account_billing_vnext_credit_get) | **GET** /account/billing/vnext/credit | -| _AccountBillingVNextApi_ | [**account_billing_vnext_payment_method_get**](docs/AccountBillingVNextApi.md#account_billing_vnext_payment_method_get) | **GET** /account/billing/vnext/payment-method | -| _AccountBillingVNextApi_ | [**account_billing_vnext_payment_method_put**](docs/AccountBillingVNextApi.md#account_billing_vnext_payment_method_put) | **PUT** /account/billing/vnext/payment-method | -| _AccountsApi_ | [**accounts_api_key_post**](docs/AccountsApi.md#accounts_api_key_post) | **POST** /accounts/api-key | -| _AccountsApi_ | [**accounts_avatar_post**](docs/AccountsApi.md#accounts_avatar_post) | **POST** /accounts/avatar | -| _AccountsApi_ | [**accounts_avatar_put**](docs/AccountsApi.md#accounts_avatar_put) | **PUT** /accounts/avatar | -| _AccountsApi_ | [**accounts_cancel_post**](docs/AccountsApi.md#accounts_cancel_post) | **POST** /accounts/cancel | -| _AccountsApi_ | [**accounts_delete**](docs/AccountsApi.md#accounts_delete) | **DELETE** /accounts | -| _AccountsApi_ | [**accounts_delete_post**](docs/AccountsApi.md#accounts_delete_post) | **POST** /accounts/delete | -| _AccountsApi_ | [**accounts_delete_recover_post**](docs/AccountsApi.md#accounts_delete_recover_post) | **POST** /accounts/delete-recover | -| _AccountsApi_ | [**accounts_delete_recover_token_post**](docs/AccountsApi.md#accounts_delete_recover_token_post) | **POST** /accounts/delete-recover-token | -| _AccountsApi_ | [**accounts_email_post**](docs/AccountsApi.md#accounts_email_post) | **POST** /accounts/email | -| _AccountsApi_ | [**accounts_email_token_post**](docs/AccountsApi.md#accounts_email_token_post) | **POST** /accounts/email-token | -| _AccountsApi_ | [**accounts_kdf_post**](docs/AccountsApi.md#accounts_kdf_post) | **POST** /accounts/kdf | -| _AccountsApi_ | [**accounts_keys_get**](docs/AccountsApi.md#accounts_keys_get) | **GET** /accounts/keys | -| _AccountsApi_ | [**accounts_keys_post**](docs/AccountsApi.md#accounts_keys_post) | **POST** /accounts/keys | -| _AccountsApi_ | [**accounts_license_post**](docs/AccountsApi.md#accounts_license_post) | **POST** /accounts/license | -| _AccountsApi_ | [**accounts_organizations_get**](docs/AccountsApi.md#accounts_organizations_get) | **GET** /accounts/organizations | -| _AccountsApi_ | [**accounts_password_hint_post**](docs/AccountsApi.md#accounts_password_hint_post) | **POST** /accounts/password-hint | -| _AccountsApi_ | [**accounts_password_post**](docs/AccountsApi.md#accounts_password_post) | **POST** /accounts/password | -| _AccountsApi_ | [**accounts_payment_post**](docs/AccountsApi.md#accounts_payment_post) | **POST** /accounts/payment | -| _AccountsApi_ | [**accounts_premium_post**](docs/AccountsApi.md#accounts_premium_post) | **POST** /accounts/premium | -| _AccountsApi_ | [**accounts_profile_get**](docs/AccountsApi.md#accounts_profile_get) | **GET** /accounts/profile | -| _AccountsApi_ | [**accounts_profile_post**](docs/AccountsApi.md#accounts_profile_post) | **POST** /accounts/profile | -| _AccountsApi_ | [**accounts_profile_put**](docs/AccountsApi.md#accounts_profile_put) | **PUT** /accounts/profile | -| _AccountsApi_ | [**accounts_reinstate_premium_post**](docs/AccountsApi.md#accounts_reinstate_premium_post) | **POST** /accounts/reinstate-premium | -| _AccountsApi_ | [**accounts_request_otp_post**](docs/AccountsApi.md#accounts_request_otp_post) | **POST** /accounts/request-otp | -| _AccountsApi_ | [**accounts_resend_new_device_otp_post**](docs/AccountsApi.md#accounts_resend_new_device_otp_post) | **POST** /accounts/resend-new-device-otp | -| _AccountsApi_ | [**accounts_revision_date_get**](docs/AccountsApi.md#accounts_revision_date_get) | **GET** /accounts/revision-date | -| _AccountsApi_ | [**accounts_rotate_api_key_post**](docs/AccountsApi.md#accounts_rotate_api_key_post) | **POST** /accounts/rotate-api-key | -| _AccountsApi_ | [**accounts_security_stamp_post**](docs/AccountsApi.md#accounts_security_stamp_post) | **POST** /accounts/security-stamp | -| _AccountsApi_ | [**accounts_set_password_post**](docs/AccountsApi.md#accounts_set_password_post) | **POST** /accounts/set-password | -| _AccountsApi_ | [**accounts_sso_organization_id_delete**](docs/AccountsApi.md#accounts_sso_organization_id_delete) | **DELETE** /accounts/sso/{organizationId} | -| _AccountsApi_ | [**accounts_sso_user_identifier_get**](docs/AccountsApi.md#accounts_sso_user_identifier_get) | **GET** /accounts/sso/user-identifier | -| _AccountsApi_ | [**accounts_storage_post**](docs/AccountsApi.md#accounts_storage_post) | **POST** /accounts/storage | -| _AccountsApi_ | [**accounts_subscription_get**](docs/AccountsApi.md#accounts_subscription_get) | **GET** /accounts/subscription | -| _AccountsApi_ | [**accounts_tax_get**](docs/AccountsApi.md#accounts_tax_get) | **GET** /accounts/tax | -| _AccountsApi_ | [**accounts_tax_put**](docs/AccountsApi.md#accounts_tax_put) | **PUT** /accounts/tax | -| _AccountsApi_ | [**accounts_update_tde_offboarding_password_put**](docs/AccountsApi.md#accounts_update_tde_offboarding_password_put) | **PUT** /accounts/update-tde-offboarding-password | -| _AccountsApi_ | [**accounts_update_temp_password_put**](docs/AccountsApi.md#accounts_update_temp_password_put) | **PUT** /accounts/update-temp-password | -| _AccountsApi_ | [**accounts_verify_devices_post**](docs/AccountsApi.md#accounts_verify_devices_post) | **POST** /accounts/verify-devices | -| _AccountsApi_ | [**accounts_verify_devices_put**](docs/AccountsApi.md#accounts_verify_devices_put) | **PUT** /accounts/verify-devices | -| _AccountsApi_ | [**accounts_verify_email_post**](docs/AccountsApi.md#accounts_verify_email_post) | **POST** /accounts/verify-email | -| _AccountsApi_ | [**accounts_verify_email_token_post**](docs/AccountsApi.md#accounts_verify_email_token_post) | **POST** /accounts/verify-email-token | -| _AccountsApi_ | [**accounts_verify_otp_post**](docs/AccountsApi.md#accounts_verify_otp_post) | **POST** /accounts/verify-otp | -| _AccountsApi_ | [**accounts_verify_password_post**](docs/AccountsApi.md#accounts_verify_password_post) | **POST** /accounts/verify-password | -| _AccountsBillingApi_ | [**accounts_billing_history_get**](docs/AccountsBillingApi.md#accounts_billing_history_get) | **GET** /accounts/billing/history | -| _AccountsBillingApi_ | [**accounts_billing_invoices_get**](docs/AccountsBillingApi.md#accounts_billing_invoices_get) | **GET** /accounts/billing/invoices | -| _AccountsBillingApi_ | [**accounts_billing_payment_method_get**](docs/AccountsBillingApi.md#accounts_billing_payment_method_get) | **GET** /accounts/billing/payment-method | -| _AccountsBillingApi_ | [**accounts_billing_preview_invoice_post**](docs/AccountsBillingApi.md#accounts_billing_preview_invoice_post) | **POST** /accounts/billing/preview-invoice | -| _AccountsBillingApi_ | [**accounts_billing_transactions_get**](docs/AccountsBillingApi.md#accounts_billing_transactions_get) | **GET** /accounts/billing/transactions | -| _AccountsKeyManagementApi_ | [**accounts_convert_to_key_connector_post**](docs/AccountsKeyManagementApi.md#accounts_convert_to_key_connector_post) | **POST** /accounts/convert-to-key-connector | -| _AccountsKeyManagementApi_ | [**accounts_key_management_regenerate_keys_post**](docs/AccountsKeyManagementApi.md#accounts_key_management_regenerate_keys_post) | **POST** /accounts/key-management/regenerate-keys | -| _AccountsKeyManagementApi_ | [**accounts_key_management_rotate_user_account_keys_post**](docs/AccountsKeyManagementApi.md#accounts_key_management_rotate_user_account_keys_post) | **POST** /accounts/key-management/rotate-user-account-keys | -| _AccountsKeyManagementApi_ | [**accounts_set_key_connector_key_post**](docs/AccountsKeyManagementApi.md#accounts_set_key_connector_key_post) | **POST** /accounts/set-key-connector-key | -| _AuthRequestsApi_ | [**auth_requests_admin_request_post**](docs/AuthRequestsApi.md#auth_requests_admin_request_post) | **POST** /auth-requests/admin-request | -| _AuthRequestsApi_ | [**auth_requests_get**](docs/AuthRequestsApi.md#auth_requests_get) | **GET** /auth-requests | -| _AuthRequestsApi_ | [**auth_requests_id_get**](docs/AuthRequestsApi.md#auth_requests_id_get) | **GET** /auth-requests/{id} | -| _AuthRequestsApi_ | [**auth_requests_id_put**](docs/AuthRequestsApi.md#auth_requests_id_put) | **PUT** /auth-requests/{id} | -| _AuthRequestsApi_ | [**auth_requests_id_response_get**](docs/AuthRequestsApi.md#auth_requests_id_response_get) | **GET** /auth-requests/{id}/response | -| _AuthRequestsApi_ | [**auth_requests_pending_get**](docs/AuthRequestsApi.md#auth_requests_pending_get) | **GET** /auth-requests/pending | -| _AuthRequestsApi_ | [**auth_requests_post**](docs/AuthRequestsApi.md#auth_requests_post) | **POST** /auth-requests | -| _CiphersApi_ | [**ciphers_admin_delete**](docs/CiphersApi.md#ciphers_admin_delete) | **DELETE** /ciphers/admin | -| _CiphersApi_ | [**ciphers_admin_post**](docs/CiphersApi.md#ciphers_admin_post) | **POST** /ciphers/admin | -| _CiphersApi_ | [**ciphers_archive_put**](docs/CiphersApi.md#ciphers_archive_put) | **PUT** /ciphers/archive | -| _CiphersApi_ | [**ciphers_attachment_validate_azure_post**](docs/CiphersApi.md#ciphers_attachment_validate_azure_post) | **POST** /ciphers/attachment/validate/azure | -| _CiphersApi_ | [**ciphers_bulk_collections_post**](docs/CiphersApi.md#ciphers_bulk_collections_post) | **POST** /ciphers/bulk-collections | -| _CiphersApi_ | [**ciphers_create_post**](docs/CiphersApi.md#ciphers_create_post) | **POST** /ciphers/create | -| _CiphersApi_ | [**ciphers_delete**](docs/CiphersApi.md#ciphers_delete) | **DELETE** /ciphers | -| _CiphersApi_ | [**ciphers_delete_admin_post**](docs/CiphersApi.md#ciphers_delete_admin_post) | **POST** /ciphers/delete-admin | -| _CiphersApi_ | [**ciphers_delete_admin_put**](docs/CiphersApi.md#ciphers_delete_admin_put) | **PUT** /ciphers/delete-admin | -| _CiphersApi_ | [**ciphers_delete_post**](docs/CiphersApi.md#ciphers_delete_post) | **POST** /ciphers/delete | -| _CiphersApi_ | [**ciphers_delete_put**](docs/CiphersApi.md#ciphers_delete_put) | **PUT** /ciphers/delete | -| _CiphersApi_ | [**ciphers_get**](docs/CiphersApi.md#ciphers_get) | **GET** /ciphers | -| _CiphersApi_ | [**ciphers_id_admin_delete**](docs/CiphersApi.md#ciphers_id_admin_delete) | **DELETE** /ciphers/{id}/admin | -| _CiphersApi_ | [**ciphers_id_admin_get**](docs/CiphersApi.md#ciphers_id_admin_get) | **GET** /ciphers/{id}/admin | -| _CiphersApi_ | [**ciphers_id_admin_post**](docs/CiphersApi.md#ciphers_id_admin_post) | **POST** /ciphers/{id}/admin | -| _CiphersApi_ | [**ciphers_id_admin_put**](docs/CiphersApi.md#ciphers_id_admin_put) | **PUT** /ciphers/{id}/admin | -| _CiphersApi_ | [**ciphers_id_archive_put**](docs/CiphersApi.md#ciphers_id_archive_put) | **PUT** /ciphers/{id}/archive | -| _CiphersApi_ | [**ciphers_id_attachment_admin_post**](docs/CiphersApi.md#ciphers_id_attachment_admin_post) | **POST** /ciphers/{id}/attachment-admin | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_admin_delete**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_admin_delete) | **DELETE** /ciphers/{id}/attachment/{attachmentId}/admin | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_admin_get**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_admin_get) | **GET** /ciphers/{id}/attachment/{attachmentId}/admin | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_delete**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_delete) | **DELETE** /ciphers/{id}/attachment/{attachmentId} | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_delete_admin_post**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_delete_admin_post) | **POST** /ciphers/{id}/attachment/{attachmentId}/delete-admin | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_delete_post**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_delete_post) | **POST** /ciphers/{id}/attachment/{attachmentId}/delete | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_get**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_get) | **GET** /ciphers/{id}/attachment/{attachmentId} | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_post**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_post) | **POST** /ciphers/{id}/attachment/{attachmentId} | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_renew_get**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_renew_get) | **GET** /ciphers/{id}/attachment/{attachmentId}/renew | -| _CiphersApi_ | [**ciphers_id_attachment_attachment_id_share_post**](docs/CiphersApi.md#ciphers_id_attachment_attachment_id_share_post) | **POST** /ciphers/{id}/attachment/{attachmentId}/share | -| _CiphersApi_ | [**ciphers_id_attachment_post**](docs/CiphersApi.md#ciphers_id_attachment_post) | **POST** /ciphers/{id}/attachment | -| _CiphersApi_ | [**ciphers_id_attachment_v2_post**](docs/CiphersApi.md#ciphers_id_attachment_v2_post) | **POST** /ciphers/{id}/attachment/v2 | -| _CiphersApi_ | [**ciphers_id_collections_admin_post**](docs/CiphersApi.md#ciphers_id_collections_admin_post) | **POST** /ciphers/{id}/collections-admin | -| _CiphersApi_ | [**ciphers_id_collections_admin_put**](docs/CiphersApi.md#ciphers_id_collections_admin_put) | **PUT** /ciphers/{id}/collections-admin | -| _CiphersApi_ | [**ciphers_id_collections_post**](docs/CiphersApi.md#ciphers_id_collections_post) | **POST** /ciphers/{id}/collections | -| _CiphersApi_ | [**ciphers_id_collections_put**](docs/CiphersApi.md#ciphers_id_collections_put) | **PUT** /ciphers/{id}/collections | -| _CiphersApi_ | [**ciphers_id_collections_v2_post**](docs/CiphersApi.md#ciphers_id_collections_v2_post) | **POST** /ciphers/{id}/collections_v2 | -| _CiphersApi_ | [**ciphers_id_collections_v2_put**](docs/CiphersApi.md#ciphers_id_collections_v2_put) | **PUT** /ciphers/{id}/collections_v2 | -| _CiphersApi_ | [**ciphers_id_delete**](docs/CiphersApi.md#ciphers_id_delete) | **DELETE** /ciphers/{id} | -| _CiphersApi_ | [**ciphers_id_delete_admin_post**](docs/CiphersApi.md#ciphers_id_delete_admin_post) | **POST** /ciphers/{id}/delete-admin | -| _CiphersApi_ | [**ciphers_id_delete_admin_put**](docs/CiphersApi.md#ciphers_id_delete_admin_put) | **PUT** /ciphers/{id}/delete-admin | -| _CiphersApi_ | [**ciphers_id_delete_post**](docs/CiphersApi.md#ciphers_id_delete_post) | **POST** /ciphers/{id}/delete | -| _CiphersApi_ | [**ciphers_id_delete_put**](docs/CiphersApi.md#ciphers_id_delete_put) | **PUT** /ciphers/{id}/delete | -| _CiphersApi_ | [**ciphers_id_details_get**](docs/CiphersApi.md#ciphers_id_details_get) | **GET** /ciphers/{id}/details | -| _CiphersApi_ | [**ciphers_id_full_details_get**](docs/CiphersApi.md#ciphers_id_full_details_get) | **GET** /ciphers/{id}/full-details | -| _CiphersApi_ | [**ciphers_id_get**](docs/CiphersApi.md#ciphers_id_get) | **GET** /ciphers/{id} | -| _CiphersApi_ | [**ciphers_id_partial_post**](docs/CiphersApi.md#ciphers_id_partial_post) | **POST** /ciphers/{id}/partial | -| _CiphersApi_ | [**ciphers_id_partial_put**](docs/CiphersApi.md#ciphers_id_partial_put) | **PUT** /ciphers/{id}/partial | -| _CiphersApi_ | [**ciphers_id_post**](docs/CiphersApi.md#ciphers_id_post) | **POST** /ciphers/{id} | -| _CiphersApi_ | [**ciphers_id_put**](docs/CiphersApi.md#ciphers_id_put) | **PUT** /ciphers/{id} | -| _CiphersApi_ | [**ciphers_id_restore_admin_put**](docs/CiphersApi.md#ciphers_id_restore_admin_put) | **PUT** /ciphers/{id}/restore-admin | -| _CiphersApi_ | [**ciphers_id_restore_put**](docs/CiphersApi.md#ciphers_id_restore_put) | **PUT** /ciphers/{id}/restore | -| _CiphersApi_ | [**ciphers_id_share_post**](docs/CiphersApi.md#ciphers_id_share_post) | **POST** /ciphers/{id}/share | -| _CiphersApi_ | [**ciphers_id_share_put**](docs/CiphersApi.md#ciphers_id_share_put) | **PUT** /ciphers/{id}/share | -| _CiphersApi_ | [**ciphers_id_unarchive_put**](docs/CiphersApi.md#ciphers_id_unarchive_put) | **PUT** /ciphers/{id}/unarchive | -| _CiphersApi_ | [**ciphers_move_post**](docs/CiphersApi.md#ciphers_move_post) | **POST** /ciphers/move | -| _CiphersApi_ | [**ciphers_move_put**](docs/CiphersApi.md#ciphers_move_put) | **PUT** /ciphers/move | -| _CiphersApi_ | [**ciphers_organization_details_assigned_get**](docs/CiphersApi.md#ciphers_organization_details_assigned_get) | **GET** /ciphers/organization-details/assigned | -| _CiphersApi_ | [**ciphers_organization_details_get**](docs/CiphersApi.md#ciphers_organization_details_get) | **GET** /ciphers/organization-details | -| _CiphersApi_ | [**ciphers_post**](docs/CiphersApi.md#ciphers_post) | **POST** /ciphers | -| _CiphersApi_ | [**ciphers_purge_post**](docs/CiphersApi.md#ciphers_purge_post) | **POST** /ciphers/purge | -| _CiphersApi_ | [**ciphers_restore_admin_put**](docs/CiphersApi.md#ciphers_restore_admin_put) | **PUT** /ciphers/restore-admin | -| _CiphersApi_ | [**ciphers_restore_put**](docs/CiphersApi.md#ciphers_restore_put) | **PUT** /ciphers/restore | -| _CiphersApi_ | [**ciphers_share_post**](docs/CiphersApi.md#ciphers_share_post) | **POST** /ciphers/share | -| _CiphersApi_ | [**ciphers_share_put**](docs/CiphersApi.md#ciphers_share_put) | **PUT** /ciphers/share | -| _CiphersApi_ | [**ciphers_unarchive_put**](docs/CiphersApi.md#ciphers_unarchive_put) | **PUT** /ciphers/unarchive | -| _CollectionsApi_ | [**collections_get**](docs/CollectionsApi.md#collections_get) | **GET** /collections | -| _CollectionsApi_ | [**organizations_org_id_collections_bulk_access_post**](docs/CollectionsApi.md#organizations_org_id_collections_bulk_access_post) | **POST** /organizations/{orgId}/collections/bulk-access | -| _CollectionsApi_ | [**organizations_org_id_collections_delete**](docs/CollectionsApi.md#organizations_org_id_collections_delete) | **DELETE** /organizations/{orgId}/collections | -| _CollectionsApi_ | [**organizations_org_id_collections_delete_post**](docs/CollectionsApi.md#organizations_org_id_collections_delete_post) | **POST** /organizations/{orgId}/collections/delete | -| _CollectionsApi_ | [**organizations_org_id_collections_details_get**](docs/CollectionsApi.md#organizations_org_id_collections_details_get) | **GET** /organizations/{orgId}/collections/details | -| _CollectionsApi_ | [**organizations_org_id_collections_get**](docs/CollectionsApi.md#organizations_org_id_collections_get) | **GET** /organizations/{orgId}/collections | -| _CollectionsApi_ | [**organizations_org_id_collections_id_delete**](docs/CollectionsApi.md#organizations_org_id_collections_id_delete) | **DELETE** /organizations/{orgId}/collections/{id} | -| _CollectionsApi_ | [**organizations_org_id_collections_id_delete_post**](docs/CollectionsApi.md#organizations_org_id_collections_id_delete_post) | **POST** /organizations/{orgId}/collections/{id}/delete | -| _CollectionsApi_ | [**organizations_org_id_collections_id_details_get**](docs/CollectionsApi.md#organizations_org_id_collections_id_details_get) | **GET** /organizations/{orgId}/collections/{id}/details | -| _CollectionsApi_ | [**organizations_org_id_collections_id_get**](docs/CollectionsApi.md#organizations_org_id_collections_id_get) | **GET** /organizations/{orgId}/collections/{id} | -| _CollectionsApi_ | [**organizations_org_id_collections_id_post**](docs/CollectionsApi.md#organizations_org_id_collections_id_post) | **POST** /organizations/{orgId}/collections/{id} | -| _CollectionsApi_ | [**organizations_org_id_collections_id_put**](docs/CollectionsApi.md#organizations_org_id_collections_id_put) | **PUT** /organizations/{orgId}/collections/{id} | -| _CollectionsApi_ | [**organizations_org_id_collections_id_users_get**](docs/CollectionsApi.md#organizations_org_id_collections_id_users_get) | **GET** /organizations/{orgId}/collections/{id}/users | -| _CollectionsApi_ | [**organizations_org_id_collections_post**](docs/CollectionsApi.md#organizations_org_id_collections_post) | **POST** /organizations/{orgId}/collections | -| _ConfigApi_ | [**config_get**](docs/ConfigApi.md#config_get) | **GET** /config | -| _CountsApi_ | [**organizations_organization_id_sm_counts_get**](docs/CountsApi.md#organizations_organization_id_sm_counts_get) | **GET** /organizations/{organizationId}/sm-counts | -| _CountsApi_ | [**projects_project_id_sm_counts_get**](docs/CountsApi.md#projects_project_id_sm_counts_get) | **GET** /projects/{projectId}/sm-counts | -| _CountsApi_ | [**service_accounts_service_account_id_sm_counts_get**](docs/CountsApi.md#service_accounts_service_account_id_sm_counts_get) | **GET** /service-accounts/{serviceAccountId}/sm-counts | -| _DevicesApi_ | [**devices_get**](docs/DevicesApi.md#devices_get) | **GET** /devices | -| _DevicesApi_ | [**devices_id_deactivate_post**](docs/DevicesApi.md#devices_id_deactivate_post) | **POST** /devices/{id}/deactivate | -| _DevicesApi_ | [**devices_id_delete**](docs/DevicesApi.md#devices_id_delete) | **DELETE** /devices/{id} | -| _DevicesApi_ | [**devices_id_get**](docs/DevicesApi.md#devices_id_get) | **GET** /devices/{id} | -| _DevicesApi_ | [**devices_id_post**](docs/DevicesApi.md#devices_id_post) | **POST** /devices/{id} | -| _DevicesApi_ | [**devices_id_put**](docs/DevicesApi.md#devices_id_put) | **PUT** /devices/{id} | -| _DevicesApi_ | [**devices_identifier_identifier_clear_token_post**](docs/DevicesApi.md#devices_identifier_identifier_clear_token_post) | **POST** /devices/identifier/{identifier}/clear-token | -| _DevicesApi_ | [**devices_identifier_identifier_clear_token_put**](docs/DevicesApi.md#devices_identifier_identifier_clear_token_put) | **PUT** /devices/identifier/{identifier}/clear-token | -| _DevicesApi_ | [**devices_identifier_identifier_get**](docs/DevicesApi.md#devices_identifier_identifier_get) | **GET** /devices/identifier/{identifier} | -| _DevicesApi_ | [**devices_identifier_identifier_token_post**](docs/DevicesApi.md#devices_identifier_identifier_token_post) | **POST** /devices/identifier/{identifier}/token | -| _DevicesApi_ | [**devices_identifier_identifier_token_put**](docs/DevicesApi.md#devices_identifier_identifier_token_put) | **PUT** /devices/identifier/{identifier}/token | -| _DevicesApi_ | [**devices_identifier_identifier_web_push_auth_post**](docs/DevicesApi.md#devices_identifier_identifier_web_push_auth_post) | **POST** /devices/identifier/{identifier}/web-push-auth | -| _DevicesApi_ | [**devices_identifier_identifier_web_push_auth_put**](docs/DevicesApi.md#devices_identifier_identifier_web_push_auth_put) | **PUT** /devices/identifier/{identifier}/web-push-auth | -| _DevicesApi_ | [**devices_identifier_keys_post**](docs/DevicesApi.md#devices_identifier_keys_post) | **POST** /devices/{identifier}/keys | -| _DevicesApi_ | [**devices_identifier_keys_put**](docs/DevicesApi.md#devices_identifier_keys_put) | **PUT** /devices/{identifier}/keys | -| _DevicesApi_ | [**devices_identifier_retrieve_keys_post**](docs/DevicesApi.md#devices_identifier_retrieve_keys_post) | **POST** /devices/{identifier}/retrieve-keys | -| _DevicesApi_ | [**devices_knowndevice_email_identifier_get**](docs/DevicesApi.md#devices_knowndevice_email_identifier_get) | **GET** /devices/knowndevice/{email}/{identifier} | -| _DevicesApi_ | [**devices_knowndevice_get**](docs/DevicesApi.md#devices_knowndevice_get) | **GET** /devices/knowndevice | -| _DevicesApi_ | [**devices_lost_trust_post**](docs/DevicesApi.md#devices_lost_trust_post) | **POST** /devices/lost-trust | -| _DevicesApi_ | [**devices_post**](docs/DevicesApi.md#devices_post) | **POST** /devices | -| _DevicesApi_ | [**devices_untrust_post**](docs/DevicesApi.md#devices_untrust_post) | **POST** /devices/untrust | -| _DevicesApi_ | [**devices_update_trust_post**](docs/DevicesApi.md#devices_update_trust_post) | **POST** /devices/update-trust | -| _EmergencyAccessApi_ | [**emergency_access_granted_get**](docs/EmergencyAccessApi.md#emergency_access_granted_get) | **GET** /emergency-access/granted | -| _EmergencyAccessApi_ | [**emergency_access_id_accept_post**](docs/EmergencyAccessApi.md#emergency_access_id_accept_post) | **POST** /emergency-access/{id}/accept | -| _EmergencyAccessApi_ | [**emergency_access_id_approve_post**](docs/EmergencyAccessApi.md#emergency_access_id_approve_post) | **POST** /emergency-access/{id}/approve | -| _EmergencyAccessApi_ | [**emergency_access_id_cipher_id_attachment_attachment_id_get**](docs/EmergencyAccessApi.md#emergency_access_id_cipher_id_attachment_attachment_id_get) | **GET** /emergency-access/{id}/{cipherId}/attachment/{attachmentId} | -| _EmergencyAccessApi_ | [**emergency_access_id_confirm_post**](docs/EmergencyAccessApi.md#emergency_access_id_confirm_post) | **POST** /emergency-access/{id}/confirm | -| _EmergencyAccessApi_ | [**emergency_access_id_delete**](docs/EmergencyAccessApi.md#emergency_access_id_delete) | **DELETE** /emergency-access/{id} | -| _EmergencyAccessApi_ | [**emergency_access_id_delete_post**](docs/EmergencyAccessApi.md#emergency_access_id_delete_post) | **POST** /emergency-access/{id}/delete | -| _EmergencyAccessApi_ | [**emergency_access_id_get**](docs/EmergencyAccessApi.md#emergency_access_id_get) | **GET** /emergency-access/{id} | -| _EmergencyAccessApi_ | [**emergency_access_id_initiate_post**](docs/EmergencyAccessApi.md#emergency_access_id_initiate_post) | **POST** /emergency-access/{id}/initiate | -| _EmergencyAccessApi_ | [**emergency_access_id_password_post**](docs/EmergencyAccessApi.md#emergency_access_id_password_post) | **POST** /emergency-access/{id}/password | -| _EmergencyAccessApi_ | [**emergency_access_id_policies_get**](docs/EmergencyAccessApi.md#emergency_access_id_policies_get) | **GET** /emergency-access/{id}/policies | -| _EmergencyAccessApi_ | [**emergency_access_id_post**](docs/EmergencyAccessApi.md#emergency_access_id_post) | **POST** /emergency-access/{id} | -| _EmergencyAccessApi_ | [**emergency_access_id_put**](docs/EmergencyAccessApi.md#emergency_access_id_put) | **PUT** /emergency-access/{id} | -| _EmergencyAccessApi_ | [**emergency_access_id_reinvite_post**](docs/EmergencyAccessApi.md#emergency_access_id_reinvite_post) | **POST** /emergency-access/{id}/reinvite | -| _EmergencyAccessApi_ | [**emergency_access_id_reject_post**](docs/EmergencyAccessApi.md#emergency_access_id_reject_post) | **POST** /emergency-access/{id}/reject | -| _EmergencyAccessApi_ | [**emergency_access_id_takeover_post**](docs/EmergencyAccessApi.md#emergency_access_id_takeover_post) | **POST** /emergency-access/{id}/takeover | -| _EmergencyAccessApi_ | [**emergency_access_id_view_post**](docs/EmergencyAccessApi.md#emergency_access_id_view_post) | **POST** /emergency-access/{id}/view | -| _EmergencyAccessApi_ | [**emergency_access_invite_post**](docs/EmergencyAccessApi.md#emergency_access_invite_post) | **POST** /emergency-access/invite | -| _EmergencyAccessApi_ | [**emergency_access_trusted_get**](docs/EmergencyAccessApi.md#emergency_access_trusted_get) | **GET** /emergency-access/trusted | -| _EventsApi_ | [**ciphers_id_events_get**](docs/EventsApi.md#ciphers_id_events_get) | **GET** /ciphers/{id}/events | -| _EventsApi_ | [**events_get**](docs/EventsApi.md#events_get) | **GET** /events | -| _EventsApi_ | [**organizations_id_events_get**](docs/EventsApi.md#organizations_id_events_get) | **GET** /organizations/{id}/events | -| _EventsApi_ | [**organizations_org_id_users_id_events_get**](docs/EventsApi.md#organizations_org_id_users_id_events_get) | **GET** /organizations/{orgId}/users/{id}/events | -| _EventsApi_ | [**providers_provider_id_events_get**](docs/EventsApi.md#providers_provider_id_events_get) | **GET** /providers/{providerId}/events | -| _EventsApi_ | [**providers_provider_id_users_id_events_get**](docs/EventsApi.md#providers_provider_id_users_id_events_get) | **GET** /providers/{providerId}/users/{id}/events | -| _FoldersApi_ | [**folders_all_delete**](docs/FoldersApi.md#folders_all_delete) | **DELETE** /folders/all | -| _FoldersApi_ | [**folders_get**](docs/FoldersApi.md#folders_get) | **GET** /folders | -| _FoldersApi_ | [**folders_id_delete**](docs/FoldersApi.md#folders_id_delete) | **DELETE** /folders/{id} | -| _FoldersApi_ | [**folders_id_delete_post**](docs/FoldersApi.md#folders_id_delete_post) | **POST** /folders/{id}/delete | -| _FoldersApi_ | [**folders_id_get**](docs/FoldersApi.md#folders_id_get) | **GET** /folders/{id} | -| _FoldersApi_ | [**folders_id_post**](docs/FoldersApi.md#folders_id_post) | **POST** /folders/{id} | -| _FoldersApi_ | [**folders_id_put**](docs/FoldersApi.md#folders_id_put) | **PUT** /folders/{id} | -| _FoldersApi_ | [**folders_post**](docs/FoldersApi.md#folders_post) | **POST** /folders | -| _GroupsApi_ | [**organizations_org_id_groups_delete**](docs/GroupsApi.md#organizations_org_id_groups_delete) | **DELETE** /organizations/{orgId}/groups | -| _GroupsApi_ | [**organizations_org_id_groups_delete_post**](docs/GroupsApi.md#organizations_org_id_groups_delete_post) | **POST** /organizations/{orgId}/groups/delete | -| _GroupsApi_ | [**organizations_org_id_groups_details_get**](docs/GroupsApi.md#organizations_org_id_groups_details_get) | **GET** /organizations/{orgId}/groups/details | -| _GroupsApi_ | [**organizations_org_id_groups_get**](docs/GroupsApi.md#organizations_org_id_groups_get) | **GET** /organizations/{orgId}/groups | -| _GroupsApi_ | [**organizations_org_id_groups_id_delete**](docs/GroupsApi.md#organizations_org_id_groups_id_delete) | **DELETE** /organizations/{orgId}/groups/{id} | -| _GroupsApi_ | [**organizations_org_id_groups_id_delete_post**](docs/GroupsApi.md#organizations_org_id_groups_id_delete_post) | **POST** /organizations/{orgId}/groups/{id}/delete | -| _GroupsApi_ | [**organizations_org_id_groups_id_delete_user_org_user_id_post**](docs/GroupsApi.md#organizations_org_id_groups_id_delete_user_org_user_id_post) | **POST** /organizations/{orgId}/groups/{id}/delete-user/{orgUserId} | -| _GroupsApi_ | [**organizations_org_id_groups_id_details_get**](docs/GroupsApi.md#organizations_org_id_groups_id_details_get) | **GET** /organizations/{orgId}/groups/{id}/details | -| _GroupsApi_ | [**organizations_org_id_groups_id_get**](docs/GroupsApi.md#organizations_org_id_groups_id_get) | **GET** /organizations/{orgId}/groups/{id} | -| _GroupsApi_ | [**organizations_org_id_groups_id_post**](docs/GroupsApi.md#organizations_org_id_groups_id_post) | **POST** /organizations/{orgId}/groups/{id} | -| _GroupsApi_ | [**organizations_org_id_groups_id_put**](docs/GroupsApi.md#organizations_org_id_groups_id_put) | **PUT** /organizations/{orgId}/groups/{id} | -| _GroupsApi_ | [**organizations_org_id_groups_id_user_org_user_id_delete**](docs/GroupsApi.md#organizations_org_id_groups_id_user_org_user_id_delete) | **DELETE** /organizations/{orgId}/groups/{id}/user/{orgUserId} | -| _GroupsApi_ | [**organizations_org_id_groups_id_users_get**](docs/GroupsApi.md#organizations_org_id_groups_id_users_get) | **GET** /organizations/{orgId}/groups/{id}/users | -| _GroupsApi_ | [**organizations_org_id_groups_post**](docs/GroupsApi.md#organizations_org_id_groups_post) | **POST** /organizations/{orgId}/groups | -| _HibpApi_ | [**hibp_breach_get**](docs/HibpApi.md#hibp_breach_get) | **GET** /hibp/breach | -| _ImportCiphersApi_ | [**ciphers_import_organization_post**](docs/ImportCiphersApi.md#ciphers_import_organization_post) | **POST** /ciphers/import-organization | -| _ImportCiphersApi_ | [**ciphers_import_post**](docs/ImportCiphersApi.md#ciphers_import_post) | **POST** /ciphers/import | -| _InfoApi_ | [**alive_get**](docs/InfoApi.md#alive_get) | **GET** /alive | -| _InfoApi_ | [**now_get**](docs/InfoApi.md#now_get) | **GET** /now | -| _InfoApi_ | [**version_get**](docs/InfoApi.md#version_get) | **GET** /version | -| _InstallationsApi_ | [**installations_id_get**](docs/InstallationsApi.md#installations_id_get) | **GET** /installations/{id} | -| _InstallationsApi_ | [**installations_post**](docs/InstallationsApi.md#installations_post) | **POST** /installations | -| _InvoicesApi_ | [**invoices_preview_organization_post**](docs/InvoicesApi.md#invoices_preview_organization_post) | **POST** /invoices/preview-organization | -| _LicensesApi_ | [**licenses_organization_id_get**](docs/LicensesApi.md#licenses_organization_id_get) | **GET** /licenses/organization/{id} | Used by self-hosted installations to get an updated license file | -| _LicensesApi_ | [**licenses_user_id_get**](docs/LicensesApi.md#licenses_user_id_get) | **GET** /licenses/user/{id} | -| _MiscApi_ | [**bitpay_invoice_post**](docs/MiscApi.md#bitpay_invoice_post) | **POST** /bitpay-invoice | -| _MiscApi_ | [**setup_payment_post**](docs/MiscApi.md#setup_payment_post) | **POST** /setup-payment | -| _NotificationsApi_ | [**notifications_get**](docs/NotificationsApi.md#notifications_get) | **GET** /notifications | -| _NotificationsApi_ | [**notifications_id_delete_patch**](docs/NotificationsApi.md#notifications_id_delete_patch) | **PATCH** /notifications/{id}/delete | -| _NotificationsApi_ | [**notifications_id_read_patch**](docs/NotificationsApi.md#notifications_id_read_patch) | **PATCH** /notifications/{id}/read | -| _OrganizationAuthRequestsApi_ | [**organizations_org_id_auth_requests_deny_post**](docs/OrganizationAuthRequestsApi.md#organizations_org_id_auth_requests_deny_post) | **POST** /organizations/{orgId}/auth-requests/deny | -| _OrganizationAuthRequestsApi_ | [**organizations_org_id_auth_requests_get**](docs/OrganizationAuthRequestsApi.md#organizations_org_id_auth_requests_get) | **GET** /organizations/{orgId}/auth-requests | -| _OrganizationAuthRequestsApi_ | [**organizations_org_id_auth_requests_post**](docs/OrganizationAuthRequestsApi.md#organizations_org_id_auth_requests_post) | **POST** /organizations/{orgId}/auth-requests | -| _OrganizationAuthRequestsApi_ | [**organizations_org_id_auth_requests_request_id_post**](docs/OrganizationAuthRequestsApi.md#organizations_org_id_auth_requests_request_id_post) | **POST** /organizations/{orgId}/auth-requests/{requestId} | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_change_frequency_post**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_change_frequency_post) | **POST** /organizations/{organizationId}/billing/change-frequency | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_get) | **GET** /organizations/{organizationId}/billing | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_history_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_history_get) | **GET** /organizations/{organizationId}/billing/history | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_invoices_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_invoices_get) | **GET** /organizations/{organizationId}/billing/invoices | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_metadata_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_metadata_get) | **GET** /organizations/{organizationId}/billing/metadata | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_payment_method_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_payment_method_get) | **GET** /organizations/{organizationId}/billing/payment-method | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_payment_method_put**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_payment_method_put) | **PUT** /organizations/{organizationId}/billing/payment-method | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_payment_method_verify_bank_account_post**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_payment_method_verify_bank_account_post) | **POST** /organizations/{organizationId}/billing/payment-method/verify-bank-account | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_restart_subscription_post**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_restart_subscription_post) | **POST** /organizations/{organizationId}/billing/restart-subscription | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_setup_business_unit_post**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_setup_business_unit_post) | **POST** /organizations/{organizationId}/billing/setup-business-unit | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_tax_information_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_tax_information_get) | **GET** /organizations/{organizationId}/billing/tax-information | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_tax_information_put**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_tax_information_put) | **PUT** /organizations/{organizationId}/billing/tax-information | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_transactions_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_transactions_get) | **GET** /organizations/{organizationId}/billing/transactions | -| _OrganizationBillingApi_ | [**organizations_organization_id_billing_warnings_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_warnings_get) | **GET** /organizations/{organizationId}/billing/warnings | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_address_get**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_address_get) | **GET** /organizations/{organizationId}/billing/vnext/address | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_address_put**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_address_put) | **PUT** /organizations/{organizationId}/billing/vnext/address | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_credit_bitpay_post**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_credit_bitpay_post) | **POST** /organizations/{organizationId}/billing/vnext/credit/bitpay | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_credit_get**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_credit_get) | **GET** /organizations/{organizationId}/billing/vnext/credit | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_payment_method_get**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_payment_method_get) | **GET** /organizations/{organizationId}/billing/vnext/payment-method | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_payment_method_put**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_payment_method_put) | **PUT** /organizations/{organizationId}/billing/vnext/payment-method | -| _OrganizationBillingVNextApi_ | [**organizations_organization_id_billing_vnext_payment_method_verify_bank_account_post**](docs/OrganizationBillingVNextApi.md#organizations_organization_id_billing_vnext_payment_method_verify_bank_account_post) | **POST** /organizations/{organizationId}/billing/vnext/payment-method/verify-bank-account | -| _OrganizationConnectionsApi_ | [**organizations_connections_enabled_get**](docs/OrganizationConnectionsApi.md#organizations_connections_enabled_get) | **GET** /organizations/connections/enabled | -| _OrganizationConnectionsApi_ | [**organizations_connections_organization_connection_id_delete**](docs/OrganizationConnectionsApi.md#organizations_connections_organization_connection_id_delete) | **DELETE** /organizations/connections/{organizationConnectionId} | -| _OrganizationConnectionsApi_ | [**organizations_connections_organization_connection_id_delete_post**](docs/OrganizationConnectionsApi.md#organizations_connections_organization_connection_id_delete_post) | **POST** /organizations/connections/{organizationConnectionId}/delete | -| _OrganizationConnectionsApi_ | [**organizations_connections_organization_connection_id_put**](docs/OrganizationConnectionsApi.md#organizations_connections_organization_connection_id_put) | **PUT** /organizations/connections/{organizationConnectionId} | -| _OrganizationConnectionsApi_ | [**organizations_connections_organization_id_type_get**](docs/OrganizationConnectionsApi.md#organizations_connections_organization_id_type_get) | **GET** /organizations/connections/{organizationId}/{type} | -| _OrganizationConnectionsApi_ | [**organizations_connections_post**](docs/OrganizationConnectionsApi.md#organizations_connections_post) | **POST** /organizations/connections | -| _OrganizationDomainApi_ | [**organizations_domain_sso_details_post**](docs/OrganizationDomainApi.md#organizations_domain_sso_details_post) | **POST** /organizations/domain/sso/details | -| _OrganizationDomainApi_ | [**organizations_domain_sso_verified_post**](docs/OrganizationDomainApi.md#organizations_domain_sso_verified_post) | **POST** /organizations/domain/sso/verified | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_get**](docs/OrganizationDomainApi.md#organizations_org_id_domain_get) | **GET** /organizations/{orgId}/domain | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_id_delete**](docs/OrganizationDomainApi.md#organizations_org_id_domain_id_delete) | **DELETE** /organizations/{orgId}/domain/{id} | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_id_get**](docs/OrganizationDomainApi.md#organizations_org_id_domain_id_get) | **GET** /organizations/{orgId}/domain/{id} | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_id_remove_post**](docs/OrganizationDomainApi.md#organizations_org_id_domain_id_remove_post) | **POST** /organizations/{orgId}/domain/{id}/remove | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_id_verify_post**](docs/OrganizationDomainApi.md#organizations_org_id_domain_id_verify_post) | **POST** /organizations/{orgId}/domain/{id}/verify | -| _OrganizationDomainApi_ | [**organizations_org_id_domain_post**](docs/OrganizationDomainApi.md#organizations_org_id_domain_post) | **POST** /organizations/{orgId}/domain | -| _OrganizationExportApi_ | [**organizations_organization_id_export_get**](docs/OrganizationExportApi.md#organizations_organization_id_export_get) | **GET** /organizations/{organizationId}/export | -| _OrganizationIntegrationApi_ | [**organizations_organization_id_integrations_get**](docs/OrganizationIntegrationApi.md#organizations_organization_id_integrations_get) | **GET** /organizations/{organizationId}/integrations | -| _OrganizationIntegrationApi_ | [**organizations_organization_id_integrations_integration_id_delete**](docs/OrganizationIntegrationApi.md#organizations_organization_id_integrations_integration_id_delete) | **DELETE** /organizations/{organizationId}/integrations/{integrationId} | -| _OrganizationIntegrationApi_ | [**organizations_organization_id_integrations_integration_id_delete_post**](docs/OrganizationIntegrationApi.md#organizations_organization_id_integrations_integration_id_delete_post) | **POST** /organizations/{organizationId}/integrations/{integrationId}/delete | -| _OrganizationIntegrationApi_ | [**organizations_organization_id_integrations_integration_id_put**](docs/OrganizationIntegrationApi.md#organizations_organization_id_integrations_integration_id_put) | **PUT** /organizations/{organizationId}/integrations/{integrationId} | -| _OrganizationIntegrationApi_ | [**organizations_organization_id_integrations_post**](docs/OrganizationIntegrationApi.md#organizations_organization_id_integrations_post) | **POST** /organizations/{organizationId}/integrations | -| _OrganizationIntegrationConfigurationApi_ | [**organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete**](docs/OrganizationIntegrationConfigurationApi.md#organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete) | **DELETE** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId} | -| _OrganizationIntegrationConfigurationApi_ | [**organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete_post**](docs/OrganizationIntegrationConfigurationApi.md#organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete_post) | **POST** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}/delete | -| _OrganizationIntegrationConfigurationApi_ | [**organizations_organization_id_integrations_integration_id_configurations_configuration_id_put**](docs/OrganizationIntegrationConfigurationApi.md#organizations_organization_id_integrations_integration_id_configurations_configuration_id_put) | **PUT** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId} | -| _OrganizationIntegrationConfigurationApi_ | [**organizations_organization_id_integrations_integration_id_configurations_get**](docs/OrganizationIntegrationConfigurationApi.md#organizations_organization_id_integrations_integration_id_configurations_get) | **GET** /organizations/{organizationId}/integrations/{integrationId}/configurations | -| _OrganizationIntegrationConfigurationApi_ | [**organizations_organization_id_integrations_integration_id_configurations_post**](docs/OrganizationIntegrationConfigurationApi.md#organizations_organization_id_integrations_integration_id_configurations_post) | **POST** /organizations/{organizationId}/integrations/{integrationId}/configurations | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_redeem_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_redeem_post) | **POST** /organization/sponsorship/redeem | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsored_sponsored_org_id_delete**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsored_sponsored_org_id_delete) | **DELETE** /organization/sponsorship/sponsored/{sponsoredOrgId} | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsored_sponsored_org_id_remove_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsored_sponsored_org_id_remove_post) | **POST** /organization/sponsorship/sponsored/{sponsoredOrgId}/remove | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_org_id_families_for_enterprise_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_org_id_families_for_enterprise_post) | **POST** /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post) | **POST** /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_revoke_delete**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_revoke_delete) | **DELETE** /organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_org_id_sponsored_get**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_org_id_sponsored_get) | **GET** /organization/sponsorship/{sponsoringOrgId}/sponsored | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_org_id_sync_status_get**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_org_id_sync_status_get) | **GET** /organization/sponsorship/{sponsoringOrgId}/sync-status | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_organization_id_delete**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_organization_id_delete) | **DELETE** /organization/sponsorship/{sponsoringOrganizationId} | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sponsoring_organization_id_delete_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sponsoring_organization_id_delete_post) | **POST** /organization/sponsorship/{sponsoringOrganizationId}/delete | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_sync_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_sync_post) | **POST** /organization/sponsorship/sync | -| _OrganizationSponsorshipsApi_ | [**organization_sponsorship_validate_token_post**](docs/OrganizationSponsorshipsApi.md#organization_sponsorship_validate_token_post) | **POST** /organization/sponsorship/validate-token | -| _OrganizationUsersApi_ | [**organizations_org_id_users_account_recovery_details_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_account_recovery_details_post) | **POST** /organizations/{orgId}/users/account-recovery-details | -| _OrganizationUsersApi_ | [**organizations_org_id_users_confirm_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_confirm_post) | **POST** /organizations/{orgId}/users/confirm | -| _OrganizationUsersApi_ | [**organizations_org_id_users_delete**](docs/OrganizationUsersApi.md#organizations_org_id_users_delete) | **DELETE** /organizations/{orgId}/users | -| _OrganizationUsersApi_ | [**organizations_org_id_users_delete_account_delete**](docs/OrganizationUsersApi.md#organizations_org_id_users_delete_account_delete) | **DELETE** /organizations/{orgId}/users/delete-account | -| _OrganizationUsersApi_ | [**organizations_org_id_users_delete_account_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_delete_account_post) | **POST** /organizations/{orgId}/users/delete-account | -| _OrganizationUsersApi_ | [**organizations_org_id_users_enable_secrets_manager_patch**](docs/OrganizationUsersApi.md#organizations_org_id_users_enable_secrets_manager_patch) | **PATCH** /organizations/{orgId}/users/enable-secrets-manager | -| _OrganizationUsersApi_ | [**organizations_org_id_users_enable_secrets_manager_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_enable_secrets_manager_put) | **PUT** /organizations/{orgId}/users/enable-secrets-manager | -| _OrganizationUsersApi_ | [**organizations_org_id_users_get**](docs/OrganizationUsersApi.md#organizations_org_id_users_get) | **GET** /organizations/{orgId}/users | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_confirm_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_confirm_post) | **POST** /organizations/{orgId}/users/{id}/confirm | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_delete**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_delete) | **DELETE** /organizations/{orgId}/users/{id} | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_delete_account_delete**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_delete_account_delete) | **DELETE** /organizations/{orgId}/users/{id}/delete-account | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_delete_account_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_delete_account_post) | **POST** /organizations/{orgId}/users/{id}/delete-account | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_get**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_get) | **GET** /organizations/{orgId}/users/{id} | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_post) | **POST** /organizations/{orgId}/users/{id} | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_put) | **PUT** /organizations/{orgId}/users/{id} | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_reinvite_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_reinvite_post) | **POST** /organizations/{orgId}/users/{id}/reinvite | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_remove_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_remove_post) | **POST** /organizations/{orgId}/users/{id}/remove | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_reset_password_details_get**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_reset_password_details_get) | **GET** /organizations/{orgId}/users/{id}/reset-password-details | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_reset_password_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_reset_password_put) | **PUT** /organizations/{orgId}/users/{id}/reset-password | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_restore_patch**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_restore_patch) | **PATCH** /organizations/{orgId}/users/{id}/restore | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_restore_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_restore_put) | **PUT** /organizations/{orgId}/users/{id}/restore | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_revoke_patch**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_revoke_patch) | **PATCH** /organizations/{orgId}/users/{id}/revoke | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_revoke_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_revoke_put) | **PUT** /organizations/{orgId}/users/{id}/revoke | -| _OrganizationUsersApi_ | [**organizations_org_id_users_invite_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_invite_post) | **POST** /organizations/{orgId}/users/invite | -| _OrganizationUsersApi_ | [**organizations_org_id_users_mini_details_get**](docs/OrganizationUsersApi.md#organizations_org_id_users_mini_details_get) | **GET** /organizations/{orgId}/users/mini-details | Returns a set of basic information about all members of the organization. This is available to all members of the organization to manage collections. For this reason, it contains as little information as possible and no cryptographic keys or other sensitive data. | -| _OrganizationUsersApi_ | [**organizations_org_id_users_organization_user_id_accept_init_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_organization_user_id_accept_init_post) | **POST** /organizations/{orgId}/users/{organizationUserId}/accept-init | -| _OrganizationUsersApi_ | [**organizations_org_id_users_organization_user_id_accept_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_organization_user_id_accept_post) | **POST** /organizations/{orgId}/users/{organizationUserId}/accept | -| _OrganizationUsersApi_ | [**organizations_org_id_users_public_keys_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_public_keys_post) | **POST** /organizations/{orgId}/users/public-keys | -| _OrganizationUsersApi_ | [**organizations_org_id_users_reinvite_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_reinvite_post) | **POST** /organizations/{orgId}/users/reinvite | -| _OrganizationUsersApi_ | [**organizations_org_id_users_remove_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_remove_post) | **POST** /organizations/{orgId}/users/remove | -| _OrganizationUsersApi_ | [**organizations_org_id_users_restore_patch**](docs/OrganizationUsersApi.md#organizations_org_id_users_restore_patch) | **PATCH** /organizations/{orgId}/users/restore | -| _OrganizationUsersApi_ | [**organizations_org_id_users_restore_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_restore_put) | **PUT** /organizations/{orgId}/users/restore | -| _OrganizationUsersApi_ | [**organizations_org_id_users_revoke_patch**](docs/OrganizationUsersApi.md#organizations_org_id_users_revoke_patch) | **PATCH** /organizations/{orgId}/users/revoke | -| _OrganizationUsersApi_ | [**organizations_org_id_users_revoke_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_revoke_put) | **PUT** /organizations/{orgId}/users/revoke | -| _OrganizationUsersApi_ | [**organizations_org_id_users_user_id_reset_password_enrollment_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_user_id_reset_password_enrollment_put) | **PUT** /organizations/{orgId}/users/{userId}/reset-password-enrollment | -| _OrganizationsApi_ | [**organizations_create_without_payment_post**](docs/OrganizationsApi.md#organizations_create_without_payment_post) | **POST** /organizations/create-without-payment | -| _OrganizationsApi_ | [**organizations_get**](docs/OrganizationsApi.md#organizations_get) | **GET** /organizations | -| _OrganizationsApi_ | [**organizations_id_api_key_information_type_get**](docs/OrganizationsApi.md#organizations_id_api_key_information_type_get) | **GET** /organizations/{id}/api-key-information/{type} | -| _OrganizationsApi_ | [**organizations_id_api_key_post**](docs/OrganizationsApi.md#organizations_id_api_key_post) | **POST** /organizations/{id}/api-key | -| _OrganizationsApi_ | [**organizations_id_cancel_post**](docs/OrganizationsApi.md#organizations_id_cancel_post) | **POST** /organizations/{id}/cancel | -| _OrganizationsApi_ | [**organizations_id_collection_management_put**](docs/OrganizationsApi.md#organizations_id_collection_management_put) | **PUT** /organizations/{id}/collection-management | -| _OrganizationsApi_ | [**organizations_id_delete**](docs/OrganizationsApi.md#organizations_id_delete) | **DELETE** /organizations/{id} | -| _OrganizationsApi_ | [**organizations_id_delete_post**](docs/OrganizationsApi.md#organizations_id_delete_post) | **POST** /organizations/{id}/delete | -| _OrganizationsApi_ | [**organizations_id_delete_recover_token_post**](docs/OrganizationsApi.md#organizations_id_delete_recover_token_post) | **POST** /organizations/{id}/delete-recover-token | -| _OrganizationsApi_ | [**organizations_id_get**](docs/OrganizationsApi.md#organizations_id_get) | **GET** /organizations/{id} | -| _OrganizationsApi_ | [**organizations_id_keys_get**](docs/OrganizationsApi.md#organizations_id_keys_get) | **GET** /organizations/{id}/keys | -| _OrganizationsApi_ | [**organizations_id_keys_post**](docs/OrganizationsApi.md#organizations_id_keys_post) | **POST** /organizations/{id}/keys | -| _OrganizationsApi_ | [**organizations_id_leave_post**](docs/OrganizationsApi.md#organizations_id_leave_post) | **POST** /organizations/{id}/leave | -| _OrganizationsApi_ | [**organizations_id_license_get**](docs/OrganizationsApi.md#organizations_id_license_get) | **GET** /organizations/{id}/license | -| _OrganizationsApi_ | [**organizations_id_plan_type_get**](docs/OrganizationsApi.md#organizations_id_plan_type_get) | **GET** /organizations/{id}/plan-type | -| _OrganizationsApi_ | [**organizations_id_post**](docs/OrganizationsApi.md#organizations_id_post) | **POST** /organizations/{id} | -| _OrganizationsApi_ | [**organizations_id_public_key_get**](docs/OrganizationsApi.md#organizations_id_public_key_get) | **GET** /organizations/{id}/public-key | -| _OrganizationsApi_ | [**organizations_id_put**](docs/OrganizationsApi.md#organizations_id_put) | **PUT** /organizations/{id} | -| _OrganizationsApi_ | [**organizations_id_reinstate_post**](docs/OrganizationsApi.md#organizations_id_reinstate_post) | **POST** /organizations/{id}/reinstate | -| _OrganizationsApi_ | [**organizations_id_rotate_api_key_post**](docs/OrganizationsApi.md#organizations_id_rotate_api_key_post) | **POST** /organizations/{id}/rotate-api-key | -| _OrganizationsApi_ | [**organizations_id_seat_post**](docs/OrganizationsApi.md#organizations_id_seat_post) | **POST** /organizations/{id}/seat | -| _OrganizationsApi_ | [**organizations_id_sm_subscription_post**](docs/OrganizationsApi.md#organizations_id_sm_subscription_post) | **POST** /organizations/{id}/sm-subscription | -| _OrganizationsApi_ | [**organizations_id_sso_get**](docs/OrganizationsApi.md#organizations_id_sso_get) | **GET** /organizations/{id}/sso | -| _OrganizationsApi_ | [**organizations_id_sso_post**](docs/OrganizationsApi.md#organizations_id_sso_post) | **POST** /organizations/{id}/sso | -| _OrganizationsApi_ | [**organizations_id_storage_post**](docs/OrganizationsApi.md#organizations_id_storage_post) | **POST** /organizations/{id}/storage | -| _OrganizationsApi_ | [**organizations_id_subscribe_secrets_manager_post**](docs/OrganizationsApi.md#organizations_id_subscribe_secrets_manager_post) | **POST** /organizations/{id}/subscribe-secrets-manager | -| _OrganizationsApi_ | [**organizations_id_subscription_get**](docs/OrganizationsApi.md#organizations_id_subscription_get) | **GET** /organizations/{id}/subscription | -| _OrganizationsApi_ | [**organizations_id_subscription_post**](docs/OrganizationsApi.md#organizations_id_subscription_post) | **POST** /organizations/{id}/subscription | -| _OrganizationsApi_ | [**organizations_id_tax_get**](docs/OrganizationsApi.md#organizations_id_tax_get) | **GET** /organizations/{id}/tax | -| _OrganizationsApi_ | [**organizations_id_tax_put**](docs/OrganizationsApi.md#organizations_id_tax_put) | **PUT** /organizations/{id}/tax | -| _OrganizationsApi_ | [**organizations_id_upgrade_post**](docs/OrganizationsApi.md#organizations_id_upgrade_post) | **POST** /organizations/{id}/upgrade | -| _OrganizationsApi_ | [**organizations_id_verify_bank_post**](docs/OrganizationsApi.md#organizations_id_verify_bank_post) | **POST** /organizations/{id}/verify-bank | -| _OrganizationsApi_ | [**organizations_identifier_auto_enroll_status_get**](docs/OrganizationsApi.md#organizations_identifier_auto_enroll_status_get) | **GET** /organizations/{identifier}/auto-enroll-status | -| _OrganizationsApi_ | [**organizations_post**](docs/OrganizationsApi.md#organizations_post) | **POST** /organizations | -| _PhishingDomainsApi_ | [**phishing_domains_checksum_get**](docs/PhishingDomainsApi.md#phishing_domains_checksum_get) | **GET** /phishing-domains/checksum | -| _PhishingDomainsApi_ | [**phishing_domains_get**](docs/PhishingDomainsApi.md#phishing_domains_get) | **GET** /phishing-domains | -| _PlansApi_ | [**plans_get**](docs/PlansApi.md#plans_get) | **GET** /plans | -| _PoliciesApi_ | [**organizations_org_id_policies_get**](docs/PoliciesApi.md#organizations_org_id_policies_get) | **GET** /organizations/{orgId}/policies | -| _PoliciesApi_ | [**organizations_org_id_policies_invited_user_get**](docs/PoliciesApi.md#organizations_org_id_policies_invited_user_get) | **GET** /organizations/{orgId}/policies/invited-user | -| _PoliciesApi_ | [**organizations_org_id_policies_master_password_get**](docs/PoliciesApi.md#organizations_org_id_policies_master_password_get) | **GET** /organizations/{orgId}/policies/master-password | -| _PoliciesApi_ | [**organizations_org_id_policies_token_get**](docs/PoliciesApi.md#organizations_org_id_policies_token_get) | **GET** /organizations/{orgId}/policies/token | -| _PoliciesApi_ | [**organizations_org_id_policies_type_get**](docs/PoliciesApi.md#organizations_org_id_policies_type_get) | **GET** /organizations/{orgId}/policies/{type} | -| _PoliciesApi_ | [**organizations_org_id_policies_type_put**](docs/PoliciesApi.md#organizations_org_id_policies_type_put) | **PUT** /organizations/{orgId}/policies/{type} | -| _ProjectsApi_ | [**organizations_organization_id_projects_get**](docs/ProjectsApi.md#organizations_organization_id_projects_get) | **GET** /organizations/{organizationId}/projects | -| _ProjectsApi_ | [**organizations_organization_id_projects_post**](docs/ProjectsApi.md#organizations_organization_id_projects_post) | **POST** /organizations/{organizationId}/projects | -| _ProjectsApi_ | [**projects_delete_post**](docs/ProjectsApi.md#projects_delete_post) | **POST** /projects/delete | -| _ProjectsApi_ | [**projects_id_get**](docs/ProjectsApi.md#projects_id_get) | **GET** /projects/{id} | -| _ProjectsApi_ | [**projects_id_put**](docs/ProjectsApi.md#projects_id_put) | **PUT** /projects/{id} | -| _ProviderBillingApi_ | [**providers_provider_id_billing_invoices_get**](docs/ProviderBillingApi.md#providers_provider_id_billing_invoices_get) | **GET** /providers/{providerId}/billing/invoices | -| _ProviderBillingApi_ | [**providers_provider_id_billing_invoices_invoice_id_get**](docs/ProviderBillingApi.md#providers_provider_id_billing_invoices_invoice_id_get) | **GET** /providers/{providerId}/billing/invoices/{invoiceId} | -| _ProviderBillingApi_ | [**providers_provider_id_billing_payment_method_put**](docs/ProviderBillingApi.md#providers_provider_id_billing_payment_method_put) | **PUT** /providers/{providerId}/billing/payment-method | -| _ProviderBillingApi_ | [**providers_provider_id_billing_payment_method_verify_bank_account_post**](docs/ProviderBillingApi.md#providers_provider_id_billing_payment_method_verify_bank_account_post) | **POST** /providers/{providerId}/billing/payment-method/verify-bank-account | -| _ProviderBillingApi_ | [**providers_provider_id_billing_subscription_get**](docs/ProviderBillingApi.md#providers_provider_id_billing_subscription_get) | **GET** /providers/{providerId}/billing/subscription | -| _ProviderBillingApi_ | [**providers_provider_id_billing_tax_information_get**](docs/ProviderBillingApi.md#providers_provider_id_billing_tax_information_get) | **GET** /providers/{providerId}/billing/tax-information | -| _ProviderBillingApi_ | [**providers_provider_id_billing_tax_information_put**](docs/ProviderBillingApi.md#providers_provider_id_billing_tax_information_put) | **PUT** /providers/{providerId}/billing/tax-information | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_address_get**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_address_get) | **GET** /providers/{providerId}/billing/vnext/address | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_address_put**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_address_put) | **PUT** /providers/{providerId}/billing/vnext/address | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_credit_bitpay_post**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_credit_bitpay_post) | **POST** /providers/{providerId}/billing/vnext/credit/bitpay | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_credit_get**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_credit_get) | **GET** /providers/{providerId}/billing/vnext/credit | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_payment_method_get**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_payment_method_get) | **GET** /providers/{providerId}/billing/vnext/payment-method | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_payment_method_put**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_payment_method_put) | **PUT** /providers/{providerId}/billing/vnext/payment-method | -| _ProviderBillingVNextApi_ | [**providers_provider_id_billing_vnext_payment_method_verify_bank_account_post**](docs/ProviderBillingVNextApi.md#providers_provider_id_billing_vnext_payment_method_verify_bank_account_post) | **POST** /providers/{providerId}/billing/vnext/payment-method/verify-bank-account | -| _ProviderClientsApi_ | [**providers_provider_id_clients_addable_get**](docs/ProviderClientsApi.md#providers_provider_id_clients_addable_get) | **GET** /providers/{providerId}/clients/addable | -| _ProviderClientsApi_ | [**providers_provider_id_clients_existing_post**](docs/ProviderClientsApi.md#providers_provider_id_clients_existing_post) | **POST** /providers/{providerId}/clients/existing | -| _ProviderClientsApi_ | [**providers_provider_id_clients_post**](docs/ProviderClientsApi.md#providers_provider_id_clients_post) | **POST** /providers/{providerId}/clients | -| _ProviderClientsApi_ | [**providers_provider_id_clients_provider_organization_id_put**](docs/ProviderClientsApi.md#providers_provider_id_clients_provider_organization_id_put) | **PUT** /providers/{providerId}/clients/{providerOrganizationId} | -| _ProviderOrganizationsApi_ | [**providers_provider_id_organizations_add_post**](docs/ProviderOrganizationsApi.md#providers_provider_id_organizations_add_post) | **POST** /providers/{providerId}/organizations/add | -| _ProviderOrganizationsApi_ | [**providers_provider_id_organizations_get**](docs/ProviderOrganizationsApi.md#providers_provider_id_organizations_get) | **GET** /providers/{providerId}/organizations | -| _ProviderOrganizationsApi_ | [**providers_provider_id_organizations_id_delete**](docs/ProviderOrganizationsApi.md#providers_provider_id_organizations_id_delete) | **DELETE** /providers/{providerId}/organizations/{id} | -| _ProviderOrganizationsApi_ | [**providers_provider_id_organizations_id_delete_post**](docs/ProviderOrganizationsApi.md#providers_provider_id_organizations_id_delete_post) | **POST** /providers/{providerId}/organizations/{id}/delete | -| _ProviderOrganizationsApi_ | [**providers_provider_id_organizations_post**](docs/ProviderOrganizationsApi.md#providers_provider_id_organizations_post) | **POST** /providers/{providerId}/organizations | -| _ProviderUsersApi_ | [**providers_provider_id_users_confirm_post**](docs/ProviderUsersApi.md#providers_provider_id_users_confirm_post) | **POST** /providers/{providerId}/users/confirm | -| _ProviderUsersApi_ | [**providers_provider_id_users_delete**](docs/ProviderUsersApi.md#providers_provider_id_users_delete) | **DELETE** /providers/{providerId}/users | -| _ProviderUsersApi_ | [**providers_provider_id_users_delete_post**](docs/ProviderUsersApi.md#providers_provider_id_users_delete_post) | **POST** /providers/{providerId}/users/delete | -| _ProviderUsersApi_ | [**providers_provider_id_users_get**](docs/ProviderUsersApi.md#providers_provider_id_users_get) | **GET** /providers/{providerId}/users | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_accept_post**](docs/ProviderUsersApi.md#providers_provider_id_users_id_accept_post) | **POST** /providers/{providerId}/users/{id}/accept | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_confirm_post**](docs/ProviderUsersApi.md#providers_provider_id_users_id_confirm_post) | **POST** /providers/{providerId}/users/{id}/confirm | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_delete**](docs/ProviderUsersApi.md#providers_provider_id_users_id_delete) | **DELETE** /providers/{providerId}/users/{id} | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_delete_post**](docs/ProviderUsersApi.md#providers_provider_id_users_id_delete_post) | **POST** /providers/{providerId}/users/{id}/delete | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_get**](docs/ProviderUsersApi.md#providers_provider_id_users_id_get) | **GET** /providers/{providerId}/users/{id} | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_post**](docs/ProviderUsersApi.md#providers_provider_id_users_id_post) | **POST** /providers/{providerId}/users/{id} | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_put**](docs/ProviderUsersApi.md#providers_provider_id_users_id_put) | **PUT** /providers/{providerId}/users/{id} | -| _ProviderUsersApi_ | [**providers_provider_id_users_id_reinvite_post**](docs/ProviderUsersApi.md#providers_provider_id_users_id_reinvite_post) | **POST** /providers/{providerId}/users/{id}/reinvite | -| _ProviderUsersApi_ | [**providers_provider_id_users_invite_post**](docs/ProviderUsersApi.md#providers_provider_id_users_invite_post) | **POST** /providers/{providerId}/users/invite | -| _ProviderUsersApi_ | [**providers_provider_id_users_public_keys_post**](docs/ProviderUsersApi.md#providers_provider_id_users_public_keys_post) | **POST** /providers/{providerId}/users/public-keys | -| _ProviderUsersApi_ | [**providers_provider_id_users_reinvite_post**](docs/ProviderUsersApi.md#providers_provider_id_users_reinvite_post) | **POST** /providers/{providerId}/users/reinvite | -| _ProvidersApi_ | [**providers_id_delete**](docs/ProvidersApi.md#providers_id_delete) | **DELETE** /providers/{id} | -| _ProvidersApi_ | [**providers_id_delete_post**](docs/ProvidersApi.md#providers_id_delete_post) | **POST** /providers/{id}/delete | -| _ProvidersApi_ | [**providers_id_delete_recover_token_post**](docs/ProvidersApi.md#providers_id_delete_recover_token_post) | **POST** /providers/{id}/delete-recover-token | -| _ProvidersApi_ | [**providers_id_get**](docs/ProvidersApi.md#providers_id_get) | **GET** /providers/{id} | -| _ProvidersApi_ | [**providers_id_post**](docs/ProvidersApi.md#providers_id_post) | **POST** /providers/{id} | -| _ProvidersApi_ | [**providers_id_put**](docs/ProvidersApi.md#providers_id_put) | **PUT** /providers/{id} | -| _ProvidersApi_ | [**providers_id_setup_post**](docs/ProvidersApi.md#providers_id_setup_post) | **POST** /providers/{id}/setup | -| _PushApi_ | [**push_add_organization_put**](docs/PushApi.md#push_add_organization_put) | **PUT** /push/add-organization | -| _PushApi_ | [**push_delete_organization_put**](docs/PushApi.md#push_delete_organization_put) | **PUT** /push/delete-organization | -| _PushApi_ | [**push_delete_post**](docs/PushApi.md#push_delete_post) | **POST** /push/delete | -| _PushApi_ | [**push_register_post**](docs/PushApi.md#push_register_post) | **POST** /push/register | -| _PushApi_ | [**push_send_post**](docs/PushApi.md#push_send_post) | **POST** /push/send | -| _ReportsApi_ | [**reports_member_access_org_id_get**](docs/ReportsApi.md#reports_member_access_org_id_get) | **GET** /reports/member-access/{orgId} | Access details for an organization member. Includes the member information, group collection assignment, and item counts | -| _ReportsApi_ | [**reports_member_cipher_details_org_id_get**](docs/ReportsApi.md#reports_member_cipher_details_org_id_get) | **GET** /reports/member-cipher-details/{orgId} | Organization member information containing a list of cipher ids assigned | -| _ReportsApi_ | [**reports_organization_report_summary_org_id_get**](docs/ReportsApi.md#reports_organization_report_summary_org_id_get) | **GET** /reports/organization-report-summary/{orgId} | Gets the Organization Report Summary for an organization. This includes the latest report's encrypted data, encryption key, and date. This is a mock implementation and should be replaced with actual data retrieval logic. | -| _ReportsApi_ | [**reports_organization_report_summary_post**](docs/ReportsApi.md#reports_organization_report_summary_post) | **POST** /reports/organization-report-summary | Creates a new Organization Report Summary for an organization. This is a mock implementation and should be replaced with actual creation logic. | -| _ReportsApi_ | [**reports_organization_report_summary_put**](docs/ReportsApi.md#reports_organization_report_summary_put) | **PUT** /reports/organization-report-summary | -| _ReportsApi_ | [**reports_organization_reports_delete**](docs/ReportsApi.md#reports_organization_reports_delete) | **DELETE** /reports/organization-reports | Drops organization reports for an organization | -| _ReportsApi_ | [**reports_organization_reports_latest_org_id_get**](docs/ReportsApi.md#reports_organization_reports_latest_org_id_get) | **GET** /reports/organization-reports/latest/{orgId} | Gets the latest organization report for an organization | -| _ReportsApi_ | [**reports_organization_reports_org_id_get**](docs/ReportsApi.md#reports_organization_reports_org_id_get) | **GET** /reports/organization-reports/{orgId} | Gets organization reports for an organization | -| _ReportsApi_ | [**reports_organization_reports_post**](docs/ReportsApi.md#reports_organization_reports_post) | **POST** /reports/organization-reports | Adds a new organization report | -| _ReportsApi_ | [**reports_password_health_report_application_delete**](docs/ReportsApi.md#reports_password_health_report_application_delete) | **DELETE** /reports/password-health-report-application | Drops a record from PasswordHealthReportApplication | -| _ReportsApi_ | [**reports_password_health_report_application_post**](docs/ReportsApi.md#reports_password_health_report_application_post) | **POST** /reports/password-health-report-application | Adds a new record into PasswordHealthReportApplication | -| _ReportsApi_ | [**reports_password_health_report_applications_org_id_get**](docs/ReportsApi.md#reports_password_health_report_applications_org_id_get) | **GET** /reports/password-health-report-applications/{orgId} | Get the password health report applications for an organization | -| _ReportsApi_ | [**reports_password_health_report_applications_post**](docs/ReportsApi.md#reports_password_health_report_applications_post) | **POST** /reports/password-health-report-applications | Adds multiple records into PasswordHealthReportApplication | -| _RequestSmAccessApi_ | [**request_access_request_sm_access_post**](docs/RequestSmAccessApi.md#request_access_request_sm_access_post) | **POST** /request-access/request-sm-access | -| _SecretsApi_ | [**organizations_organization_id_secrets_get**](docs/SecretsApi.md#organizations_organization_id_secrets_get) | **GET** /organizations/{organizationId}/secrets | -| _SecretsApi_ | [**organizations_organization_id_secrets_post**](docs/SecretsApi.md#organizations_organization_id_secrets_post) | **POST** /organizations/{organizationId}/secrets | -| _SecretsApi_ | [**organizations_organization_id_secrets_sync_get**](docs/SecretsApi.md#organizations_organization_id_secrets_sync_get) | **GET** /organizations/{organizationId}/secrets/sync | -| _SecretsApi_ | [**projects_project_id_secrets_get**](docs/SecretsApi.md#projects_project_id_secrets_get) | **GET** /projects/{projectId}/secrets | -| _SecretsApi_ | [**secrets_delete_post**](docs/SecretsApi.md#secrets_delete_post) | **POST** /secrets/delete | -| _SecretsApi_ | [**secrets_get_by_ids_post**](docs/SecretsApi.md#secrets_get_by_ids_post) | **POST** /secrets/get-by-ids | -| _SecretsApi_ | [**secrets_id_get**](docs/SecretsApi.md#secrets_id_get) | **GET** /secrets/{id} | -| _SecretsApi_ | [**secrets_id_put**](docs/SecretsApi.md#secrets_id_put) | **PUT** /secrets/{id} | -| _SecretsManagerEventsApi_ | [**sm_events_service_accounts_service_account_id_get**](docs/SecretsManagerEventsApi.md#sm_events_service_accounts_service_account_id_get) | **GET** /sm/events/service-accounts/{serviceAccountId} | -| _SecretsManagerPortingApi_ | [**sm_organization_id_export_get**](docs/SecretsManagerPortingApi.md#sm_organization_id_export_get) | **GET** /sm/{organizationId}/export | -| _SecretsManagerPortingApi_ | [**sm_organization_id_import_post**](docs/SecretsManagerPortingApi.md#sm_organization_id_import_post) | **POST** /sm/{organizationId}/import | -| _SecurityTaskApi_ | [**tasks_get**](docs/SecurityTaskApi.md#tasks_get) | **GET** /tasks | Retrieves security tasks for the current user. | -| _SecurityTaskApi_ | [**tasks_org_id_bulk_create_post**](docs/SecurityTaskApi.md#tasks_org_id_bulk_create_post) | **POST** /tasks/{orgId}/bulk-create | Bulk create security tasks for an organization. | -| _SecurityTaskApi_ | [**tasks_organization_get**](docs/SecurityTaskApi.md#tasks_organization_get) | **GET** /tasks/organization | Retrieves security tasks for an organization. Restricted to organization administrators. | -| _SecurityTaskApi_ | [**tasks_task_id_complete_patch**](docs/SecurityTaskApi.md#tasks_task_id_complete_patch) | **PATCH** /tasks/{taskId}/complete | Marks a task as complete. The user must have edit permission on the cipher associated with the task. | -| _SelfHostedOrganizationLicensesApi_ | [**organizations_licenses_self_hosted_id_post**](docs/SelfHostedOrganizationLicensesApi.md#organizations_licenses_self_hosted_id_post) | **POST** /organizations/licenses/self-hosted/{id} | -| _SelfHostedOrganizationLicensesApi_ | [**organizations_licenses_self_hosted_id_sync_post**](docs/SelfHostedOrganizationLicensesApi.md#organizations_licenses_self_hosted_id_sync_post) | **POST** /organizations/licenses/self-hosted/{id}/sync | -| _SelfHostedOrganizationLicensesApi_ | [**organizations_licenses_self_hosted_post**](docs/SelfHostedOrganizationLicensesApi.md#organizations_licenses_self_hosted_post) | **POST** /organizations/licenses/self-hosted | -| _SelfHostedOrganizationSponsorshipsApi_ | [**organization_sponsorship_self_hosted_org_id_sponsored_get**](docs/SelfHostedOrganizationSponsorshipsApi.md#organization_sponsorship_self_hosted_org_id_sponsored_get) | **GET** /organization/sponsorship/self-hosted/{orgId}/sponsored | -| _SelfHostedOrganizationSponsorshipsApi_ | [**organization_sponsorship_self_hosted_sponsoring_org_id_delete**](docs/SelfHostedOrganizationSponsorshipsApi.md#organization_sponsorship_self_hosted_sponsoring_org_id_delete) | **DELETE** /organization/sponsorship/self-hosted/{sponsoringOrgId} | -| _SelfHostedOrganizationSponsorshipsApi_ | [**organization_sponsorship_self_hosted_sponsoring_org_id_delete_post**](docs/SelfHostedOrganizationSponsorshipsApi.md#organization_sponsorship_self_hosted_sponsoring_org_id_delete_post) | **POST** /organization/sponsorship/self-hosted/{sponsoringOrgId}/delete | -| _SelfHostedOrganizationSponsorshipsApi_ | [**organization_sponsorship_self_hosted_sponsoring_org_id_families_for_enterprise_post**](docs/SelfHostedOrganizationSponsorshipsApi.md#organization_sponsorship_self_hosted_sponsoring_org_id_families_for_enterprise_post) | **POST** /organization/sponsorship/self-hosted/{sponsoringOrgId}/families-for-enterprise | -| _SelfHostedOrganizationSponsorshipsApi_ | [**organization_sponsorship_self_hosted_sponsoring_org_id_sponsored_friendly_name_revoke_delete**](docs/SelfHostedOrganizationSponsorshipsApi.md#organization_sponsorship_self_hosted_sponsoring_org_id_sponsored_friendly_name_revoke_delete) | **DELETE** /organization/sponsorship/self-hosted/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke | -| _SendsApi_ | [**sends_access_id_post**](docs/SendsApi.md#sends_access_id_post) | **POST** /sends/access/{id} | -| _SendsApi_ | [**sends_encoded_send_id_access_file_file_id_post**](docs/SendsApi.md#sends_encoded_send_id_access_file_file_id_post) | **POST** /sends/{encodedSendId}/access/file/{fileId} | -| _SendsApi_ | [**sends_file_v2_post**](docs/SendsApi.md#sends_file_v2_post) | **POST** /sends/file/v2 | -| _SendsApi_ | [**sends_file_validate_azure_post**](docs/SendsApi.md#sends_file_validate_azure_post) | **POST** /sends/file/validate/azure | -| _SendsApi_ | [**sends_get**](docs/SendsApi.md#sends_get) | **GET** /sends | -| _SendsApi_ | [**sends_id_delete**](docs/SendsApi.md#sends_id_delete) | **DELETE** /sends/{id} | -| _SendsApi_ | [**sends_id_file_file_id_get**](docs/SendsApi.md#sends_id_file_file_id_get) | **GET** /sends/{id}/file/{fileId} | -| _SendsApi_ | [**sends_id_file_file_id_post**](docs/SendsApi.md#sends_id_file_file_id_post) | **POST** /sends/{id}/file/{fileId} | -| _SendsApi_ | [**sends_id_get**](docs/SendsApi.md#sends_id_get) | **GET** /sends/{id} | -| _SendsApi_ | [**sends_id_put**](docs/SendsApi.md#sends_id_put) | **PUT** /sends/{id} | -| _SendsApi_ | [**sends_id_remove_password_put**](docs/SendsApi.md#sends_id_remove_password_put) | **PUT** /sends/{id}/remove-password | -| _SendsApi_ | [**sends_post**](docs/SendsApi.md#sends_post) | **POST** /sends | -| _ServiceAccountsApi_ | [**organizations_organization_id_service_accounts_get**](docs/ServiceAccountsApi.md#organizations_organization_id_service_accounts_get) | **GET** /organizations/{organizationId}/service-accounts | -| _ServiceAccountsApi_ | [**organizations_organization_id_service_accounts_post**](docs/ServiceAccountsApi.md#organizations_organization_id_service_accounts_post) | **POST** /organizations/{organizationId}/service-accounts | -| _ServiceAccountsApi_ | [**service_accounts_delete_post**](docs/ServiceAccountsApi.md#service_accounts_delete_post) | **POST** /service-accounts/delete | -| _ServiceAccountsApi_ | [**service_accounts_id_access_tokens_get**](docs/ServiceAccountsApi.md#service_accounts_id_access_tokens_get) | **GET** /service-accounts/{id}/access-tokens | -| _ServiceAccountsApi_ | [**service_accounts_id_access_tokens_post**](docs/ServiceAccountsApi.md#service_accounts_id_access_tokens_post) | **POST** /service-accounts/{id}/access-tokens | -| _ServiceAccountsApi_ | [**service_accounts_id_access_tokens_revoke_post**](docs/ServiceAccountsApi.md#service_accounts_id_access_tokens_revoke_post) | **POST** /service-accounts/{id}/access-tokens/revoke | -| _ServiceAccountsApi_ | [**service_accounts_id_get**](docs/ServiceAccountsApi.md#service_accounts_id_get) | **GET** /service-accounts/{id} | -| _ServiceAccountsApi_ | [**service_accounts_id_put**](docs/ServiceAccountsApi.md#service_accounts_id_put) | **PUT** /service-accounts/{id} | -| _SettingsApi_ | [**settings_domains_get**](docs/SettingsApi.md#settings_domains_get) | **GET** /settings/domains | -| _SettingsApi_ | [**settings_domains_post**](docs/SettingsApi.md#settings_domains_post) | **POST** /settings/domains | -| _SettingsApi_ | [**settings_domains_put**](docs/SettingsApi.md#settings_domains_put) | **PUT** /settings/domains | -| _SlackIntegrationApi_ | [**create_async**](docs/SlackIntegrationApi.md#create_async) | **GET** /organizations/{organizationId}/integrations/slack/create | -| _SlackIntegrationApi_ | [**organizations_organization_id_integrations_slack_redirect_get**](docs/SlackIntegrationApi.md#organizations_organization_id_integrations_slack_redirect_get) | **GET** /organizations/{organizationId}/integrations/slack/redirect | -| _StripeApi_ | [**setup_intent_bank_account_post**](docs/StripeApi.md#setup_intent_bank_account_post) | **POST** /setup-intent/bank-account | -| _StripeApi_ | [**setup_intent_card_post**](docs/StripeApi.md#setup_intent_card_post) | **POST** /setup-intent/card | -| _StripeApi_ | [**tax_is_country_supported_get**](docs/StripeApi.md#tax_is_country_supported_get) | **GET** /tax/is-country-supported | -| _SyncApi_ | [**sync_get**](docs/SyncApi.md#sync_get) | **GET** /sync | -| _TaxApi_ | [**tax_preview_amount_organization_trial_post**](docs/TaxApi.md#tax_preview_amount_organization_trial_post) | **POST** /tax/preview-amount/organization-trial | -| _TrashApi_ | [**secrets_organization_id_trash_empty_post**](docs/TrashApi.md#secrets_organization_id_trash_empty_post) | **POST** /secrets/{organizationId}/trash/empty | -| _TrashApi_ | [**secrets_organization_id_trash_get**](docs/TrashApi.md#secrets_organization_id_trash_get) | **GET** /secrets/{organizationId}/trash | -| _TrashApi_ | [**secrets_organization_id_trash_restore_post**](docs/TrashApi.md#secrets_organization_id_trash_restore_post) | **POST** /secrets/{organizationId}/trash/restore | -| _TwoFactorApi_ | [**organizations_id_two_factor_disable_post**](docs/TwoFactorApi.md#organizations_id_two_factor_disable_post) | **POST** /organizations/{id}/two-factor/disable | -| _TwoFactorApi_ | [**organizations_id_two_factor_disable_put**](docs/TwoFactorApi.md#organizations_id_two_factor_disable_put) | **PUT** /organizations/{id}/two-factor/disable | -| _TwoFactorApi_ | [**organizations_id_two_factor_duo_post**](docs/TwoFactorApi.md#organizations_id_two_factor_duo_post) | **POST** /organizations/{id}/two-factor/duo | -| _TwoFactorApi_ | [**organizations_id_two_factor_duo_put**](docs/TwoFactorApi.md#organizations_id_two_factor_duo_put) | **PUT** /organizations/{id}/two-factor/duo | -| _TwoFactorApi_ | [**organizations_id_two_factor_get**](docs/TwoFactorApi.md#organizations_id_two_factor_get) | **GET** /organizations/{id}/two-factor | -| _TwoFactorApi_ | [**organizations_id_two_factor_get_duo_post**](docs/TwoFactorApi.md#organizations_id_two_factor_get_duo_post) | **POST** /organizations/{id}/two-factor/get-duo | -| _TwoFactorApi_ | [**two_factor_authenticator_delete**](docs/TwoFactorApi.md#two_factor_authenticator_delete) | **DELETE** /two-factor/authenticator | -| _TwoFactorApi_ | [**two_factor_authenticator_post**](docs/TwoFactorApi.md#two_factor_authenticator_post) | **POST** /two-factor/authenticator | -| _TwoFactorApi_ | [**two_factor_authenticator_put**](docs/TwoFactorApi.md#two_factor_authenticator_put) | **PUT** /two-factor/authenticator | -| _TwoFactorApi_ | [**two_factor_device_verification_settings_put**](docs/TwoFactorApi.md#two_factor_device_verification_settings_put) | **PUT** /two-factor/device-verification-settings | -| _TwoFactorApi_ | [**two_factor_disable_post**](docs/TwoFactorApi.md#two_factor_disable_post) | **POST** /two-factor/disable | -| _TwoFactorApi_ | [**two_factor_disable_put**](docs/TwoFactorApi.md#two_factor_disable_put) | **PUT** /two-factor/disable | -| _TwoFactorApi_ | [**two_factor_duo_post**](docs/TwoFactorApi.md#two_factor_duo_post) | **POST** /two-factor/duo | -| _TwoFactorApi_ | [**two_factor_duo_put**](docs/TwoFactorApi.md#two_factor_duo_put) | **PUT** /two-factor/duo | -| _TwoFactorApi_ | [**two_factor_email_post**](docs/TwoFactorApi.md#two_factor_email_post) | **POST** /two-factor/email | -| _TwoFactorApi_ | [**two_factor_email_put**](docs/TwoFactorApi.md#two_factor_email_put) | **PUT** /two-factor/email | -| _TwoFactorApi_ | [**two_factor_get**](docs/TwoFactorApi.md#two_factor_get) | **GET** /two-factor | -| _TwoFactorApi_ | [**two_factor_get_authenticator_post**](docs/TwoFactorApi.md#two_factor_get_authenticator_post) | **POST** /two-factor/get-authenticator | -| _TwoFactorApi_ | [**two_factor_get_device_verification_settings_get**](docs/TwoFactorApi.md#two_factor_get_device_verification_settings_get) | **GET** /two-factor/get-device-verification-settings | -| _TwoFactorApi_ | [**two_factor_get_duo_post**](docs/TwoFactorApi.md#two_factor_get_duo_post) | **POST** /two-factor/get-duo | -| _TwoFactorApi_ | [**two_factor_get_email_post**](docs/TwoFactorApi.md#two_factor_get_email_post) | **POST** /two-factor/get-email | -| _TwoFactorApi_ | [**two_factor_get_recover_post**](docs/TwoFactorApi.md#two_factor_get_recover_post) | **POST** /two-factor/get-recover | -| _TwoFactorApi_ | [**two_factor_get_webauthn_post**](docs/TwoFactorApi.md#two_factor_get_webauthn_post) | **POST** /two-factor/get-webauthn | -| _TwoFactorApi_ | [**two_factor_get_yubikey_post**](docs/TwoFactorApi.md#two_factor_get_yubikey_post) | **POST** /two-factor/get-yubikey | -| _TwoFactorApi_ | [**two_factor_recover_post**](docs/TwoFactorApi.md#two_factor_recover_post) | **POST** /two-factor/recover | To be removed when the feature flag pm-17128-recovery-code-login is removed PM-18175. | -| _TwoFactorApi_ | [**two_factor_send_email_login_post**](docs/TwoFactorApi.md#two_factor_send_email_login_post) | **POST** /two-factor/send-email-login | -| _TwoFactorApi_ | [**two_factor_send_email_post**](docs/TwoFactorApi.md#two_factor_send_email_post) | **POST** /two-factor/send-email | This endpoint is only used to set-up email two factor authentication. | -| _TwoFactorApi_ | [**two_factor_webauthn_delete**](docs/TwoFactorApi.md#two_factor_webauthn_delete) | **DELETE** /two-factor/webauthn | -| _TwoFactorApi_ | [**two_factor_webauthn_post**](docs/TwoFactorApi.md#two_factor_webauthn_post) | **POST** /two-factor/webauthn | -| _TwoFactorApi_ | [**two_factor_webauthn_put**](docs/TwoFactorApi.md#two_factor_webauthn_put) | **PUT** /two-factor/webauthn | -| _TwoFactorApi_ | [**two_factor_yubikey_post**](docs/TwoFactorApi.md#two_factor_yubikey_post) | **POST** /two-factor/yubikey | -| _TwoFactorApi_ | [**two_factor_yubikey_put**](docs/TwoFactorApi.md#two_factor_yubikey_put) | **PUT** /two-factor/yubikey | -| _UsersApi_ | [**users_id_public_key_get**](docs/UsersApi.md#users_id_public_key_get) | **GET** /users/{id}/public-key | -| _WebAuthnApi_ | [**webauthn_assertion_options_post**](docs/WebAuthnApi.md#webauthn_assertion_options_post) | **POST** /webauthn/assertion-options | -| _WebAuthnApi_ | [**webauthn_attestation_options_post**](docs/WebAuthnApi.md#webauthn_attestation_options_post) | **POST** /webauthn/attestation-options | -| _WebAuthnApi_ | [**webauthn_get**](docs/WebAuthnApi.md#webauthn_get) | **GET** /webauthn | -| _WebAuthnApi_ | [**webauthn_id_delete_post**](docs/WebAuthnApi.md#webauthn_id_delete_post) | **POST** /webauthn/{id}/delete | -| _WebAuthnApi_ | [**webauthn_post**](docs/WebAuthnApi.md#webauthn_post) | **POST** /webauthn | -| _WebAuthnApi_ | [**webauthn_put**](docs/WebAuthnApi.md#webauthn_put) | **PUT** /webauthn | +| Class | Method | HTTP request | Description | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| _AccessPoliciesApi_ | [**access_policies_get_people_potential_grantees**](docs/AccessPoliciesApi.md#access_policies_get_people_potential_grantees) | **GET** /organizations/{id}/access-policies/people/potential-grantees | +| _AccessPoliciesApi_ | [**access_policies_get_project_people_access_policies**](docs/AccessPoliciesApi.md#access_policies_get_project_people_access_policies) | **GET** /projects/{id}/access-policies/people | +| _AccessPoliciesApi_ | [**access_policies_get_project_potential_grantees**](docs/AccessPoliciesApi.md#access_policies_get_project_potential_grantees) | **GET** /organizations/{id}/access-policies/projects/potential-grantees | +| _AccessPoliciesApi_ | [**access_policies_get_project_service_accounts_access_policies**](docs/AccessPoliciesApi.md#access_policies_get_project_service_accounts_access_policies) | **GET** /projects/{id}/access-policies/service-accounts | +| _AccessPoliciesApi_ | [**access_policies_get_secret_access_policies**](docs/AccessPoliciesApi.md#access_policies_get_secret_access_policies) | **GET** /secrets/{secretId}/access-policies | +| _AccessPoliciesApi_ | [**access_policies_get_service_account_granted_policies**](docs/AccessPoliciesApi.md#access_policies_get_service_account_granted_policies) | **GET** /service-accounts/{id}/granted-policies | +| _AccessPoliciesApi_ | [**access_policies_get_service_account_people_access_policies**](docs/AccessPoliciesApi.md#access_policies_get_service_account_people_access_policies) | **GET** /service-accounts/{id}/access-policies/people | +| _AccessPoliciesApi_ | [**access_policies_get_service_accounts_potential_grantees**](docs/AccessPoliciesApi.md#access_policies_get_service_accounts_potential_grantees) | **GET** /organizations/{id}/access-policies/service-accounts/potential-grantees | +| _AccessPoliciesApi_ | [**access_policies_put_project_people_access_policies**](docs/AccessPoliciesApi.md#access_policies_put_project_people_access_policies) | **PUT** /projects/{id}/access-policies/people | +| _AccessPoliciesApi_ | [**access_policies_put_project_service_accounts_access_policies**](docs/AccessPoliciesApi.md#access_policies_put_project_service_accounts_access_policies) | **PUT** /projects/{id}/access-policies/service-accounts | +| _AccessPoliciesApi_ | [**access_policies_put_service_account_granted_policies**](docs/AccessPoliciesApi.md#access_policies_put_service_account_granted_policies) | **PUT** /service-accounts/{id}/granted-policies | +| _AccessPoliciesApi_ | [**access_policies_put_service_account_people_access_policies**](docs/AccessPoliciesApi.md#access_policies_put_service_account_people_access_policies) | **PUT** /service-accounts/{id}/access-policies/people | +| _AccountBillingVNextApi_ | [**account_billing_v_next_add_credit_via_bit_pay**](docs/AccountBillingVNextApi.md#account_billing_v_next_add_credit_via_bit_pay) | **POST** /account/billing/vnext/credit/bitpay | +| _AccountBillingVNextApi_ | [**account_billing_v_next_create_subscription**](docs/AccountBillingVNextApi.md#account_billing_v_next_create_subscription) | **POST** /account/billing/vnext/subscription | +| _AccountBillingVNextApi_ | [**account_billing_v_next_get_credit**](docs/AccountBillingVNextApi.md#account_billing_v_next_get_credit) | **GET** /account/billing/vnext/credit | +| _AccountBillingVNextApi_ | [**account_billing_v_next_get_payment_method**](docs/AccountBillingVNextApi.md#account_billing_v_next_get_payment_method) | **GET** /account/billing/vnext/payment-method | +| _AccountBillingVNextApi_ | [**account_billing_v_next_update_payment_method**](docs/AccountBillingVNextApi.md#account_billing_v_next_update_payment_method) | **PUT** /account/billing/vnext/payment-method | +| _AccountsApi_ | [**accounts_api_key**](docs/AccountsApi.md#accounts_api_key) | **POST** /accounts/api-key | +| _AccountsApi_ | [**accounts_delete**](docs/AccountsApi.md#accounts_delete) | **DELETE** /accounts | +| _AccountsApi_ | [**accounts_delete_sso_user**](docs/AccountsApi.md#accounts_delete_sso_user) | **DELETE** /accounts/sso/{organizationId} | +| _AccountsApi_ | [**accounts_get_account_revision_date**](docs/AccountsApi.md#accounts_get_account_revision_date) | **GET** /accounts/revision-date | +| _AccountsApi_ | [**accounts_get_keys**](docs/AccountsApi.md#accounts_get_keys) | **GET** /accounts/keys | +| _AccountsApi_ | [**accounts_get_organizations**](docs/AccountsApi.md#accounts_get_organizations) | **GET** /accounts/organizations | +| _AccountsApi_ | [**accounts_get_profile**](docs/AccountsApi.md#accounts_get_profile) | **GET** /accounts/profile | +| _AccountsApi_ | [**accounts_get_sso_user_identifier**](docs/AccountsApi.md#accounts_get_sso_user_identifier) | **GET** /accounts/sso/user-identifier | +| _AccountsApi_ | [**accounts_get_subscription**](docs/AccountsApi.md#accounts_get_subscription) | **GET** /accounts/subscription | +| _AccountsApi_ | [**accounts_get_tax_info**](docs/AccountsApi.md#accounts_get_tax_info) | **GET** /accounts/tax | +| _AccountsApi_ | [**accounts_post_avatar**](docs/AccountsApi.md#accounts_post_avatar) | **POST** /accounts/avatar | +| _AccountsApi_ | [**accounts_post_cancel**](docs/AccountsApi.md#accounts_post_cancel) | **POST** /accounts/cancel | +| _AccountsApi_ | [**accounts_post_delete**](docs/AccountsApi.md#accounts_post_delete) | **POST** /accounts/delete | +| _AccountsApi_ | [**accounts_post_delete_recover**](docs/AccountsApi.md#accounts_post_delete_recover) | **POST** /accounts/delete-recover | +| _AccountsApi_ | [**accounts_post_delete_recover_token**](docs/AccountsApi.md#accounts_post_delete_recover_token) | **POST** /accounts/delete-recover-token | +| _AccountsApi_ | [**accounts_post_email**](docs/AccountsApi.md#accounts_post_email) | **POST** /accounts/email | +| _AccountsApi_ | [**accounts_post_email_token**](docs/AccountsApi.md#accounts_post_email_token) | **POST** /accounts/email-token | +| _AccountsApi_ | [**accounts_post_kdf**](docs/AccountsApi.md#accounts_post_kdf) | **POST** /accounts/kdf | +| _AccountsApi_ | [**accounts_post_keys**](docs/AccountsApi.md#accounts_post_keys) | **POST** /accounts/keys | +| _AccountsApi_ | [**accounts_post_license**](docs/AccountsApi.md#accounts_post_license) | **POST** /accounts/license | +| _AccountsApi_ | [**accounts_post_password**](docs/AccountsApi.md#accounts_post_password) | **POST** /accounts/password | +| _AccountsApi_ | [**accounts_post_password_hint**](docs/AccountsApi.md#accounts_post_password_hint) | **POST** /accounts/password-hint | +| _AccountsApi_ | [**accounts_post_payment**](docs/AccountsApi.md#accounts_post_payment) | **POST** /accounts/payment | +| _AccountsApi_ | [**accounts_post_premium**](docs/AccountsApi.md#accounts_post_premium) | **POST** /accounts/premium | +| _AccountsApi_ | [**accounts_post_profile**](docs/AccountsApi.md#accounts_post_profile) | **POST** /accounts/profile | +| _AccountsApi_ | [**accounts_post_reinstate**](docs/AccountsApi.md#accounts_post_reinstate) | **POST** /accounts/reinstate-premium | +| _AccountsApi_ | [**accounts_post_request_otp**](docs/AccountsApi.md#accounts_post_request_otp) | **POST** /accounts/request-otp | +| _AccountsApi_ | [**accounts_post_security_stamp**](docs/AccountsApi.md#accounts_post_security_stamp) | **POST** /accounts/security-stamp | +| _AccountsApi_ | [**accounts_post_set_password**](docs/AccountsApi.md#accounts_post_set_password) | **POST** /accounts/set-password | +| _AccountsApi_ | [**accounts_post_set_user_verify_devices**](docs/AccountsApi.md#accounts_post_set_user_verify_devices) | **POST** /accounts/verify-devices | +| _AccountsApi_ | [**accounts_post_storage**](docs/AccountsApi.md#accounts_post_storage) | **POST** /accounts/storage | +| _AccountsApi_ | [**accounts_post_verify_email**](docs/AccountsApi.md#accounts_post_verify_email) | **POST** /accounts/verify-email | +| _AccountsApi_ | [**accounts_post_verify_email_token**](docs/AccountsApi.md#accounts_post_verify_email_token) | **POST** /accounts/verify-email-token | +| _AccountsApi_ | [**accounts_post_verify_password**](docs/AccountsApi.md#accounts_post_verify_password) | **POST** /accounts/verify-password | +| _AccountsApi_ | [**accounts_put_avatar**](docs/AccountsApi.md#accounts_put_avatar) | **PUT** /accounts/avatar | +| _AccountsApi_ | [**accounts_put_profile**](docs/AccountsApi.md#accounts_put_profile) | **PUT** /accounts/profile | +| _AccountsApi_ | [**accounts_put_tax_info**](docs/AccountsApi.md#accounts_put_tax_info) | **PUT** /accounts/tax | +| _AccountsApi_ | [**accounts_put_update_tde_password**](docs/AccountsApi.md#accounts_put_update_tde_password) | **PUT** /accounts/update-tde-offboarding-password | +| _AccountsApi_ | [**accounts_put_update_temp_password**](docs/AccountsApi.md#accounts_put_update_temp_password) | **PUT** /accounts/update-temp-password | +| _AccountsApi_ | [**accounts_resend_new_device_otp**](docs/AccountsApi.md#accounts_resend_new_device_otp) | **POST** /accounts/resend-new-device-otp | +| _AccountsApi_ | [**accounts_rotate_api_key**](docs/AccountsApi.md#accounts_rotate_api_key) | **POST** /accounts/rotate-api-key | +| _AccountsApi_ | [**accounts_set_user_verify_devices**](docs/AccountsApi.md#accounts_set_user_verify_devices) | **PUT** /accounts/verify-devices | +| _AccountsApi_ | [**accounts_verify_otp**](docs/AccountsApi.md#accounts_verify_otp) | **POST** /accounts/verify-otp | +| _AccountsBillingApi_ | [**accounts_billing_get_billing_history**](docs/AccountsBillingApi.md#accounts_billing_get_billing_history) | **GET** /accounts/billing/history | +| _AccountsBillingApi_ | [**accounts_billing_get_invoices**](docs/AccountsBillingApi.md#accounts_billing_get_invoices) | **GET** /accounts/billing/invoices | +| _AccountsBillingApi_ | [**accounts_billing_get_payment_method**](docs/AccountsBillingApi.md#accounts_billing_get_payment_method) | **GET** /accounts/billing/payment-method | +| _AccountsBillingApi_ | [**accounts_billing_get_transactions**](docs/AccountsBillingApi.md#accounts_billing_get_transactions) | **GET** /accounts/billing/transactions | +| _AccountsBillingApi_ | [**accounts_billing_preview_invoice**](docs/AccountsBillingApi.md#accounts_billing_preview_invoice) | **POST** /accounts/billing/preview-invoice | +| _AccountsKeyManagementApi_ | [**accounts_key_management_post_convert_to_key_connector**](docs/AccountsKeyManagementApi.md#accounts_key_management_post_convert_to_key_connector) | **POST** /accounts/convert-to-key-connector | +| _AccountsKeyManagementApi_ | [**accounts_key_management_post_set_key_connector_key**](docs/AccountsKeyManagementApi.md#accounts_key_management_post_set_key_connector_key) | **POST** /accounts/set-key-connector-key | +| _AccountsKeyManagementApi_ | [**accounts_key_management_regenerate_keys**](docs/AccountsKeyManagementApi.md#accounts_key_management_regenerate_keys) | **POST** /accounts/key-management/regenerate-keys | +| _AccountsKeyManagementApi_ | [**accounts_key_management_rotate_user_account_keys**](docs/AccountsKeyManagementApi.md#accounts_key_management_rotate_user_account_keys) | **POST** /accounts/key-management/rotate-user-account-keys | +| _AuthRequestsApi_ | [**auth_requests_get**](docs/AuthRequestsApi.md#auth_requests_get) | **GET** /auth-requests/{id} | +| _AuthRequestsApi_ | [**auth_requests_get_all**](docs/AuthRequestsApi.md#auth_requests_get_all) | **GET** /auth-requests | +| _AuthRequestsApi_ | [**auth_requests_get_pending_auth_requests**](docs/AuthRequestsApi.md#auth_requests_get_pending_auth_requests) | **GET** /auth-requests/pending | +| _AuthRequestsApi_ | [**auth_requests_get_response**](docs/AuthRequestsApi.md#auth_requests_get_response) | **GET** /auth-requests/{id}/response | +| _AuthRequestsApi_ | [**auth_requests_post**](docs/AuthRequestsApi.md#auth_requests_post) | **POST** /auth-requests | +| _AuthRequestsApi_ | [**auth_requests_post_admin_request**](docs/AuthRequestsApi.md#auth_requests_post_admin_request) | **POST** /auth-requests/admin-request | +| _AuthRequestsApi_ | [**auth_requests_put**](docs/AuthRequestsApi.md#auth_requests_put) | **PUT** /auth-requests/{id} | +| _CiphersApi_ | [**ciphers_azure_validate_file**](docs/CiphersApi.md#ciphers_azure_validate_file) | **POST** /ciphers/attachment/validate/azure | +| _CiphersApi_ | [**ciphers_delete**](docs/CiphersApi.md#ciphers_delete) | **DELETE** /ciphers/{id} | +| _CiphersApi_ | [**ciphers_delete_admin**](docs/CiphersApi.md#ciphers_delete_admin) | **DELETE** /ciphers/{id}/admin | +| _CiphersApi_ | [**ciphers_delete_attachment**](docs/CiphersApi.md#ciphers_delete_attachment) | **DELETE** /ciphers/{id}/attachment/{attachmentId} | +| _CiphersApi_ | [**ciphers_delete_attachment_admin**](docs/CiphersApi.md#ciphers_delete_attachment_admin) | **DELETE** /ciphers/{id}/attachment/{attachmentId}/admin | +| _CiphersApi_ | [**ciphers_delete_many**](docs/CiphersApi.md#ciphers_delete_many) | **DELETE** /ciphers | +| _CiphersApi_ | [**ciphers_delete_many_admin**](docs/CiphersApi.md#ciphers_delete_many_admin) | **DELETE** /ciphers/admin | +| _CiphersApi_ | [**ciphers_get**](docs/CiphersApi.md#ciphers_get) | **GET** /ciphers/{id} | +| _CiphersApi_ | [**ciphers_get_admin**](docs/CiphersApi.md#ciphers_get_admin) | **GET** /ciphers/{id}/admin | +| _CiphersApi_ | [**ciphers_get_all**](docs/CiphersApi.md#ciphers_get_all) | **GET** /ciphers | +| _CiphersApi_ | [**ciphers_get_assigned_organization_ciphers**](docs/CiphersApi.md#ciphers_get_assigned_organization_ciphers) | **GET** /ciphers/organization-details/assigned | +| _CiphersApi_ | [**ciphers_get_attachment_data**](docs/CiphersApi.md#ciphers_get_attachment_data) | **GET** /ciphers/{id}/attachment/{attachmentId} | +| _CiphersApi_ | [**ciphers_get_attachment_data_admin**](docs/CiphersApi.md#ciphers_get_attachment_data_admin) | **GET** /ciphers/{id}/attachment/{attachmentId}/admin | +| _CiphersApi_ | [**ciphers_get_details**](docs/CiphersApi.md#ciphers_get_details) | **GET** /ciphers/{id}/details | +| _CiphersApi_ | [**ciphers_get_full_details**](docs/CiphersApi.md#ciphers_get_full_details) | **GET** /ciphers/{id}/full-details | +| _CiphersApi_ | [**ciphers_get_organization_ciphers**](docs/CiphersApi.md#ciphers_get_organization_ciphers) | **GET** /ciphers/organization-details | +| _CiphersApi_ | [**ciphers_move_many**](docs/CiphersApi.md#ciphers_move_many) | **PUT** /ciphers/move | +| _CiphersApi_ | [**ciphers_post**](docs/CiphersApi.md#ciphers_post) | **POST** /ciphers | +| _CiphersApi_ | [**ciphers_post_admin**](docs/CiphersApi.md#ciphers_post_admin) | **POST** /ciphers/admin | +| _CiphersApi_ | [**ciphers_post_attachment**](docs/CiphersApi.md#ciphers_post_attachment) | **POST** /ciphers/{id}/attachment/v2 | +| _CiphersApi_ | [**ciphers_post_attachment_admin**](docs/CiphersApi.md#ciphers_post_attachment_admin) | **POST** /ciphers/{id}/attachment-admin | +| _CiphersApi_ | [**ciphers_post_attachment_share**](docs/CiphersApi.md#ciphers_post_attachment_share) | **POST** /ciphers/{id}/attachment/{attachmentId}/share | +| _CiphersApi_ | [**ciphers_post_attachment_v1**](docs/CiphersApi.md#ciphers_post_attachment_v1) | **POST** /ciphers/{id}/attachment | +| _CiphersApi_ | [**ciphers_post_bulk_collections**](docs/CiphersApi.md#ciphers_post_bulk_collections) | **POST** /ciphers/bulk-collections | +| _CiphersApi_ | [**ciphers_post_collections**](docs/CiphersApi.md#ciphers_post_collections) | **POST** /ciphers/{id}/collections | +| _CiphersApi_ | [**ciphers_post_collections_admin**](docs/CiphersApi.md#ciphers_post_collections_admin) | **POST** /ciphers/{id}/collections-admin | +| _CiphersApi_ | [**ciphers_post_collections_v_next**](docs/CiphersApi.md#ciphers_post_collections_v_next) | **POST** /ciphers/{id}/collections_v2 | +| _CiphersApi_ | [**ciphers_post_create**](docs/CiphersApi.md#ciphers_post_create) | **POST** /ciphers/create | +| _CiphersApi_ | [**ciphers_post_delete**](docs/CiphersApi.md#ciphers_post_delete) | **POST** /ciphers/{id}/delete | +| _CiphersApi_ | [**ciphers_post_delete_admin**](docs/CiphersApi.md#ciphers_post_delete_admin) | **POST** /ciphers/{id}/delete-admin | +| _CiphersApi_ | [**ciphers_post_delete_attachment**](docs/CiphersApi.md#ciphers_post_delete_attachment) | **POST** /ciphers/{id}/attachment/{attachmentId}/delete | +| _CiphersApi_ | [**ciphers_post_delete_attachment_admin**](docs/CiphersApi.md#ciphers_post_delete_attachment_admin) | **POST** /ciphers/{id}/attachment/{attachmentId}/delete-admin | +| _CiphersApi_ | [**ciphers_post_delete_many**](docs/CiphersApi.md#ciphers_post_delete_many) | **POST** /ciphers/delete | +| _CiphersApi_ | [**ciphers_post_delete_many_admin**](docs/CiphersApi.md#ciphers_post_delete_many_admin) | **POST** /ciphers/delete-admin | +| _CiphersApi_ | [**ciphers_post_file_for_existing_attachment**](docs/CiphersApi.md#ciphers_post_file_for_existing_attachment) | **POST** /ciphers/{id}/attachment/{attachmentId} | +| _CiphersApi_ | [**ciphers_post_move_many**](docs/CiphersApi.md#ciphers_post_move_many) | **POST** /ciphers/move | +| _CiphersApi_ | [**ciphers_post_partial**](docs/CiphersApi.md#ciphers_post_partial) | **POST** /ciphers/{id}/partial | +| _CiphersApi_ | [**ciphers_post_purge**](docs/CiphersApi.md#ciphers_post_purge) | **POST** /ciphers/purge | +| _CiphersApi_ | [**ciphers_post_put**](docs/CiphersApi.md#ciphers_post_put) | **POST** /ciphers/{id} | +| _CiphersApi_ | [**ciphers_post_put_admin**](docs/CiphersApi.md#ciphers_post_put_admin) | **POST** /ciphers/{id}/admin | +| _CiphersApi_ | [**ciphers_post_share**](docs/CiphersApi.md#ciphers_post_share) | **POST** /ciphers/{id}/share | +| _CiphersApi_ | [**ciphers_post_share_many**](docs/CiphersApi.md#ciphers_post_share_many) | **POST** /ciphers/share | +| _CiphersApi_ | [**ciphers_put**](docs/CiphersApi.md#ciphers_put) | **PUT** /ciphers/{id} | +| _CiphersApi_ | [**ciphers_put_admin**](docs/CiphersApi.md#ciphers_put_admin) | **PUT** /ciphers/{id}/admin | +| _CiphersApi_ | [**ciphers_put_archive**](docs/CiphersApi.md#ciphers_put_archive) | **PUT** /ciphers/{id}/archive | +| _CiphersApi_ | [**ciphers_put_archive_many**](docs/CiphersApi.md#ciphers_put_archive_many) | **PUT** /ciphers/archive | +| _CiphersApi_ | [**ciphers_put_collections**](docs/CiphersApi.md#ciphers_put_collections) | **PUT** /ciphers/{id}/collections | +| _CiphersApi_ | [**ciphers_put_collections_admin**](docs/CiphersApi.md#ciphers_put_collections_admin) | **PUT** /ciphers/{id}/collections-admin | +| _CiphersApi_ | [**ciphers_put_collections_v_next**](docs/CiphersApi.md#ciphers_put_collections_v_next) | **PUT** /ciphers/{id}/collections_v2 | +| _CiphersApi_ | [**ciphers_put_delete**](docs/CiphersApi.md#ciphers_put_delete) | **PUT** /ciphers/{id}/delete | +| _CiphersApi_ | [**ciphers_put_delete_admin**](docs/CiphersApi.md#ciphers_put_delete_admin) | **PUT** /ciphers/{id}/delete-admin | +| _CiphersApi_ | [**ciphers_put_delete_many**](docs/CiphersApi.md#ciphers_put_delete_many) | **PUT** /ciphers/delete | +| _CiphersApi_ | [**ciphers_put_delete_many_admin**](docs/CiphersApi.md#ciphers_put_delete_many_admin) | **PUT** /ciphers/delete-admin | +| _CiphersApi_ | [**ciphers_put_partial**](docs/CiphersApi.md#ciphers_put_partial) | **PUT** /ciphers/{id}/partial | +| _CiphersApi_ | [**ciphers_put_restore**](docs/CiphersApi.md#ciphers_put_restore) | **PUT** /ciphers/{id}/restore | +| _CiphersApi_ | [**ciphers_put_restore_admin**](docs/CiphersApi.md#ciphers_put_restore_admin) | **PUT** /ciphers/{id}/restore-admin | +| _CiphersApi_ | [**ciphers_put_restore_many**](docs/CiphersApi.md#ciphers_put_restore_many) | **PUT** /ciphers/restore | +| _CiphersApi_ | [**ciphers_put_restore_many_admin**](docs/CiphersApi.md#ciphers_put_restore_many_admin) | **PUT** /ciphers/restore-admin | +| _CiphersApi_ | [**ciphers_put_share**](docs/CiphersApi.md#ciphers_put_share) | **PUT** /ciphers/{id}/share | +| _CiphersApi_ | [**ciphers_put_share_many**](docs/CiphersApi.md#ciphers_put_share_many) | **PUT** /ciphers/share | +| _CiphersApi_ | [**ciphers_put_unarchive**](docs/CiphersApi.md#ciphers_put_unarchive) | **PUT** /ciphers/{id}/unarchive | +| _CiphersApi_ | [**ciphers_put_unarchive_many**](docs/CiphersApi.md#ciphers_put_unarchive_many) | **PUT** /ciphers/unarchive | +| _CiphersApi_ | [**ciphers_renew_file_upload_url**](docs/CiphersApi.md#ciphers_renew_file_upload_url) | **GET** /ciphers/{id}/attachment/{attachmentId}/renew | +| _CollectionsApi_ | [**collections_delete**](docs/CollectionsApi.md#collections_delete) | **DELETE** /organizations/{orgId}/collections/{id} | +| _CollectionsApi_ | [**collections_delete_many**](docs/CollectionsApi.md#collections_delete_many) | **DELETE** /organizations/{orgId}/collections | +| _CollectionsApi_ | [**collections_get**](docs/CollectionsApi.md#collections_get) | **GET** /organizations/{orgId}/collections/{id} | +| _CollectionsApi_ | [**collections_get_all**](docs/CollectionsApi.md#collections_get_all) | **GET** /organizations/{orgId}/collections | +| _CollectionsApi_ | [**collections_get_details**](docs/CollectionsApi.md#collections_get_details) | **GET** /organizations/{orgId}/collections/{id}/details | +| _CollectionsApi_ | [**collections_get_many_with_details**](docs/CollectionsApi.md#collections_get_many_with_details) | **GET** /organizations/{orgId}/collections/details | +| _CollectionsApi_ | [**collections_get_user**](docs/CollectionsApi.md#collections_get_user) | **GET** /collections | +| _CollectionsApi_ | [**collections_get_users**](docs/CollectionsApi.md#collections_get_users) | **GET** /organizations/{orgId}/collections/{id}/users | +| _CollectionsApi_ | [**collections_post**](docs/CollectionsApi.md#collections_post) | **POST** /organizations/{orgId}/collections | +| _CollectionsApi_ | [**collections_post_bulk_collection_access**](docs/CollectionsApi.md#collections_post_bulk_collection_access) | **POST** /organizations/{orgId}/collections/bulk-access | +| _CollectionsApi_ | [**collections_post_delete**](docs/CollectionsApi.md#collections_post_delete) | **POST** /organizations/{orgId}/collections/{id}/delete | +| _CollectionsApi_ | [**collections_post_delete_many**](docs/CollectionsApi.md#collections_post_delete_many) | **POST** /organizations/{orgId}/collections/delete | +| _CollectionsApi_ | [**collections_post_put**](docs/CollectionsApi.md#collections_post_put) | **POST** /organizations/{orgId}/collections/{id} | +| _CollectionsApi_ | [**collections_put**](docs/CollectionsApi.md#collections_put) | **PUT** /organizations/{orgId}/collections/{id} | +| _ConfigApi_ | [**config_get_configs**](docs/ConfigApi.md#config_get_configs) | **GET** /config | +| _CountsApi_ | [**counts_get_by_organization**](docs/CountsApi.md#counts_get_by_organization) | **GET** /organizations/{organizationId}/sm-counts | +| _CountsApi_ | [**counts_get_by_project**](docs/CountsApi.md#counts_get_by_project) | **GET** /projects/{projectId}/sm-counts | +| _CountsApi_ | [**counts_get_by_service_account**](docs/CountsApi.md#counts_get_by_service_account) | **GET** /service-accounts/{serviceAccountId}/sm-counts | +| _DevicesApi_ | [**devices_deactivate**](docs/DevicesApi.md#devices_deactivate) | **DELETE** /devices/{id} | +| _DevicesApi_ | [**devices_get**](docs/DevicesApi.md#devices_get) | **GET** /devices/{id} | +| _DevicesApi_ | [**devices_get_all**](docs/DevicesApi.md#devices_get_all) | **GET** /devices | +| _DevicesApi_ | [**devices_get_by_email_and_identifier**](docs/DevicesApi.md#devices_get_by_email_and_identifier) | **GET** /devices/knowndevice/{email}/{identifier} | +| _DevicesApi_ | [**devices_get_by_identifier**](docs/DevicesApi.md#devices_get_by_identifier) | **GET** /devices/identifier/{identifier} | +| _DevicesApi_ | [**devices_get_by_identifier_query**](docs/DevicesApi.md#devices_get_by_identifier_query) | **GET** /devices/knowndevice | +| _DevicesApi_ | [**devices_get_device_keys**](docs/DevicesApi.md#devices_get_device_keys) | **POST** /devices/{identifier}/retrieve-keys | +| _DevicesApi_ | [**devices_post**](docs/DevicesApi.md#devices_post) | **POST** /devices | +| _DevicesApi_ | [**devices_post_clear_token**](docs/DevicesApi.md#devices_post_clear_token) | **POST** /devices/identifier/{identifier}/clear-token | +| _DevicesApi_ | [**devices_post_deactivate**](docs/DevicesApi.md#devices_post_deactivate) | **POST** /devices/{id}/deactivate | +| _DevicesApi_ | [**devices_post_keys**](docs/DevicesApi.md#devices_post_keys) | **POST** /devices/{identifier}/keys | +| _DevicesApi_ | [**devices_post_lost_trust**](docs/DevicesApi.md#devices_post_lost_trust) | **POST** /devices/lost-trust | +| _DevicesApi_ | [**devices_post_put**](docs/DevicesApi.md#devices_post_put) | **POST** /devices/{id} | +| _DevicesApi_ | [**devices_post_token**](docs/DevicesApi.md#devices_post_token) | **POST** /devices/identifier/{identifier}/token | +| _DevicesApi_ | [**devices_post_untrust**](docs/DevicesApi.md#devices_post_untrust) | **POST** /devices/untrust | +| _DevicesApi_ | [**devices_post_update_trust**](docs/DevicesApi.md#devices_post_update_trust) | **POST** /devices/update-trust | +| _DevicesApi_ | [**devices_post_web_push_auth**](docs/DevicesApi.md#devices_post_web_push_auth) | **POST** /devices/identifier/{identifier}/web-push-auth | +| _DevicesApi_ | [**devices_put**](docs/DevicesApi.md#devices_put) | **PUT** /devices/{id} | +| _DevicesApi_ | [**devices_put_clear_token**](docs/DevicesApi.md#devices_put_clear_token) | **PUT** /devices/identifier/{identifier}/clear-token | +| _DevicesApi_ | [**devices_put_keys**](docs/DevicesApi.md#devices_put_keys) | **PUT** /devices/{identifier}/keys | +| _DevicesApi_ | [**devices_put_token**](docs/DevicesApi.md#devices_put_token) | **PUT** /devices/identifier/{identifier}/token | +| _DevicesApi_ | [**devices_put_web_push_auth**](docs/DevicesApi.md#devices_put_web_push_auth) | **PUT** /devices/identifier/{identifier}/web-push-auth | +| _EmergencyAccessApi_ | [**emergency_access_accept**](docs/EmergencyAccessApi.md#emergency_access_accept) | **POST** /emergency-access/{id}/accept | +| _EmergencyAccessApi_ | [**emergency_access_approve**](docs/EmergencyAccessApi.md#emergency_access_approve) | **POST** /emergency-access/{id}/approve | +| _EmergencyAccessApi_ | [**emergency_access_confirm**](docs/EmergencyAccessApi.md#emergency_access_confirm) | **POST** /emergency-access/{id}/confirm | +| _EmergencyAccessApi_ | [**emergency_access_delete**](docs/EmergencyAccessApi.md#emergency_access_delete) | **DELETE** /emergency-access/{id} | +| _EmergencyAccessApi_ | [**emergency_access_get**](docs/EmergencyAccessApi.md#emergency_access_get) | **GET** /emergency-access/{id} | +| _EmergencyAccessApi_ | [**emergency_access_get_attachment_data**](docs/EmergencyAccessApi.md#emergency_access_get_attachment_data) | **GET** /emergency-access/{id}/{cipherId}/attachment/{attachmentId} | +| _EmergencyAccessApi_ | [**emergency_access_get_contacts**](docs/EmergencyAccessApi.md#emergency_access_get_contacts) | **GET** /emergency-access/trusted | +| _EmergencyAccessApi_ | [**emergency_access_get_grantees**](docs/EmergencyAccessApi.md#emergency_access_get_grantees) | **GET** /emergency-access/granted | +| _EmergencyAccessApi_ | [**emergency_access_initiate**](docs/EmergencyAccessApi.md#emergency_access_initiate) | **POST** /emergency-access/{id}/initiate | +| _EmergencyAccessApi_ | [**emergency_access_invite**](docs/EmergencyAccessApi.md#emergency_access_invite) | **POST** /emergency-access/invite | +| _EmergencyAccessApi_ | [**emergency_access_password**](docs/EmergencyAccessApi.md#emergency_access_password) | **POST** /emergency-access/{id}/password | +| _EmergencyAccessApi_ | [**emergency_access_policies**](docs/EmergencyAccessApi.md#emergency_access_policies) | **GET** /emergency-access/{id}/policies | +| _EmergencyAccessApi_ | [**emergency_access_post**](docs/EmergencyAccessApi.md#emergency_access_post) | **POST** /emergency-access/{id} | +| _EmergencyAccessApi_ | [**emergency_access_post_delete**](docs/EmergencyAccessApi.md#emergency_access_post_delete) | **POST** /emergency-access/{id}/delete | +| _EmergencyAccessApi_ | [**emergency_access_put**](docs/EmergencyAccessApi.md#emergency_access_put) | **PUT** /emergency-access/{id} | +| _EmergencyAccessApi_ | [**emergency_access_reinvite**](docs/EmergencyAccessApi.md#emergency_access_reinvite) | **POST** /emergency-access/{id}/reinvite | +| _EmergencyAccessApi_ | [**emergency_access_reject**](docs/EmergencyAccessApi.md#emergency_access_reject) | **POST** /emergency-access/{id}/reject | +| _EmergencyAccessApi_ | [**emergency_access_takeover**](docs/EmergencyAccessApi.md#emergency_access_takeover) | **POST** /emergency-access/{id}/takeover | +| _EmergencyAccessApi_ | [**emergency_access_view_ciphers**](docs/EmergencyAccessApi.md#emergency_access_view_ciphers) | **POST** /emergency-access/{id}/view | +| _EventsApi_ | [**events_get_cipher**](docs/EventsApi.md#events_get_cipher) | **GET** /ciphers/{id}/events | +| _EventsApi_ | [**events_get_organization**](docs/EventsApi.md#events_get_organization) | **GET** /organizations/{id}/events | +| _EventsApi_ | [**events_get_organization_user**](docs/EventsApi.md#events_get_organization_user) | **GET** /organizations/{orgId}/users/{id}/events | +| _EventsApi_ | [**events_get_projects**](docs/EventsApi.md#events_get_projects) | **GET** /organization/{orgId}/projects/{id}/events | +| _EventsApi_ | [**events_get_provider**](docs/EventsApi.md#events_get_provider) | **GET** /providers/{providerId}/events | +| _EventsApi_ | [**events_get_provider_user**](docs/EventsApi.md#events_get_provider_user) | **GET** /providers/{providerId}/users/{id}/events | +| _EventsApi_ | [**events_get_secrets**](docs/EventsApi.md#events_get_secrets) | **GET** /organization/{orgId}/secrets/{id}/events | +| _EventsApi_ | [**events_get_user**](docs/EventsApi.md#events_get_user) | **GET** /events | +| _FoldersApi_ | [**folders_delete**](docs/FoldersApi.md#folders_delete) | **DELETE** /folders/{id} | +| _FoldersApi_ | [**folders_delete_all**](docs/FoldersApi.md#folders_delete_all) | **DELETE** /folders/all | +| _FoldersApi_ | [**folders_get**](docs/FoldersApi.md#folders_get) | **GET** /folders/{id} | +| _FoldersApi_ | [**folders_get_all**](docs/FoldersApi.md#folders_get_all) | **GET** /folders | +| _FoldersApi_ | [**folders_post**](docs/FoldersApi.md#folders_post) | **POST** /folders | +| _FoldersApi_ | [**folders_post_delete**](docs/FoldersApi.md#folders_post_delete) | **POST** /folders/{id}/delete | +| _FoldersApi_ | [**folders_post_put**](docs/FoldersApi.md#folders_post_put) | **POST** /folders/{id} | +| _FoldersApi_ | [**folders_put**](docs/FoldersApi.md#folders_put) | **PUT** /folders/{id} | +| _GroupsApi_ | [**groups_bulk_delete**](docs/GroupsApi.md#groups_bulk_delete) | **DELETE** /organizations/{orgId}/groups | +| _GroupsApi_ | [**groups_delete**](docs/GroupsApi.md#groups_delete) | **DELETE** /organizations/{orgId}/groups/{id} | +| _GroupsApi_ | [**groups_delete_user**](docs/GroupsApi.md#groups_delete_user) | **DELETE** /organizations/{orgId}/groups/{id}/user/{orgUserId} | +| _GroupsApi_ | [**groups_get**](docs/GroupsApi.md#groups_get) | **GET** /organizations/{orgId}/groups/{id} | +| _GroupsApi_ | [**groups_get_details**](docs/GroupsApi.md#groups_get_details) | **GET** /organizations/{orgId}/groups/{id}/details | +| _GroupsApi_ | [**groups_get_organization_group_details**](docs/GroupsApi.md#groups_get_organization_group_details) | **GET** /organizations/{orgId}/groups/details | +| _GroupsApi_ | [**groups_get_organization_groups**](docs/GroupsApi.md#groups_get_organization_groups) | **GET** /organizations/{orgId}/groups | +| _GroupsApi_ | [**groups_get_users**](docs/GroupsApi.md#groups_get_users) | **GET** /organizations/{orgId}/groups/{id}/users | +| _GroupsApi_ | [**groups_post**](docs/GroupsApi.md#groups_post) | **POST** /organizations/{orgId}/groups | +| _GroupsApi_ | [**groups_post_bulk_delete**](docs/GroupsApi.md#groups_post_bulk_delete) | **POST** /organizations/{orgId}/groups/delete | +| _GroupsApi_ | [**groups_post_delete**](docs/GroupsApi.md#groups_post_delete) | **POST** /organizations/{orgId}/groups/{id}/delete | +| _GroupsApi_ | [**groups_post_delete_user**](docs/GroupsApi.md#groups_post_delete_user) | **POST** /organizations/{orgId}/groups/{id}/delete-user/{orgUserId} | +| _GroupsApi_ | [**groups_post_put**](docs/GroupsApi.md#groups_post_put) | **POST** /organizations/{orgId}/groups/{id} | +| _GroupsApi_ | [**groups_put**](docs/GroupsApi.md#groups_put) | **PUT** /organizations/{orgId}/groups/{id} | +| _HibpApi_ | [**hibp_get**](docs/HibpApi.md#hibp_get) | **GET** /hibp/breach | +| _ImportCiphersApi_ | [**import_ciphers_post_import**](docs/ImportCiphersApi.md#import_ciphers_post_import) | **POST** /ciphers/import | +| _ImportCiphersApi_ | [**import_ciphers_post_import_organization**](docs/ImportCiphersApi.md#import_ciphers_post_import_organization) | **POST** /ciphers/import-organization | +| _InfoApi_ | [**info_get_alive**](docs/InfoApi.md#info_get_alive) | **GET** /alive | +| _InfoApi_ | [**info_get_now**](docs/InfoApi.md#info_get_now) | **GET** /now | +| _InfoApi_ | [**info_get_version**](docs/InfoApi.md#info_get_version) | **GET** /version | +| _InstallationsApi_ | [**installations_get**](docs/InstallationsApi.md#installations_get) | **GET** /installations/{id} | +| _InstallationsApi_ | [**installations_post**](docs/InstallationsApi.md#installations_post) | **POST** /installations | +| _InvoicesApi_ | [**invoices_preview_invoice**](docs/InvoicesApi.md#invoices_preview_invoice) | **POST** /invoices/preview-organization | +| _LicensesApi_ | [**licenses_get_user**](docs/LicensesApi.md#licenses_get_user) | **GET** /licenses/user/{id} | +| _LicensesApi_ | [**licenses_organization_sync**](docs/LicensesApi.md#licenses_organization_sync) | **GET** /licenses/organization/{id} | Used by self-hosted installations to get an updated license file | +| _MiscApi_ | [**misc_post_bit_pay_invoice**](docs/MiscApi.md#misc_post_bit_pay_invoice) | **POST** /bitpay-invoice | +| _MiscApi_ | [**misc_post_setup_payment**](docs/MiscApi.md#misc_post_setup_payment) | **POST** /setup-payment | +| _NotificationsApi_ | [**notifications_list**](docs/NotificationsApi.md#notifications_list) | **GET** /notifications | +| _NotificationsApi_ | [**notifications_mark_as_deleted**](docs/NotificationsApi.md#notifications_mark_as_deleted) | **PATCH** /notifications/{id}/delete | +| _NotificationsApi_ | [**notifications_mark_as_read**](docs/NotificationsApi.md#notifications_mark_as_read) | **PATCH** /notifications/{id}/read | +| _OrganizationAuthRequestsApi_ | [**organization_auth_requests_bulk_deny_requests**](docs/OrganizationAuthRequestsApi.md#organization_auth_requests_bulk_deny_requests) | **POST** /organizations/{orgId}/auth-requests/deny | +| _OrganizationAuthRequestsApi_ | [**organization_auth_requests_get_pending_requests**](docs/OrganizationAuthRequestsApi.md#organization_auth_requests_get_pending_requests) | **GET** /organizations/{orgId}/auth-requests | +| _OrganizationAuthRequestsApi_ | [**organization_auth_requests_update_auth_request**](docs/OrganizationAuthRequestsApi.md#organization_auth_requests_update_auth_request) | **POST** /organizations/{orgId}/auth-requests/{requestId} | +| _OrganizationAuthRequestsApi_ | [**organization_auth_requests_update_many_auth_requests**](docs/OrganizationAuthRequestsApi.md#organization_auth_requests_update_many_auth_requests) | **POST** /organizations/{orgId}/auth-requests | +| _OrganizationBillingApi_ | [**organization_billing_change_plan_subscription_frequency**](docs/OrganizationBillingApi.md#organization_billing_change_plan_subscription_frequency) | **POST** /organizations/{organizationId}/billing/change-frequency | +| _OrganizationBillingApi_ | [**organization_billing_get_billing**](docs/OrganizationBillingApi.md#organization_billing_get_billing) | **GET** /organizations/{organizationId}/billing | +| _OrganizationBillingApi_ | [**organization_billing_get_history**](docs/OrganizationBillingApi.md#organization_billing_get_history) | **GET** /organizations/{organizationId}/billing/history | +| _OrganizationBillingApi_ | [**organization_billing_get_invoices**](docs/OrganizationBillingApi.md#organization_billing_get_invoices) | **GET** /organizations/{organizationId}/billing/invoices | +| _OrganizationBillingApi_ | [**organization_billing_get_metadata**](docs/OrganizationBillingApi.md#organization_billing_get_metadata) | **GET** /organizations/{organizationId}/billing/metadata | +| _OrganizationBillingApi_ | [**organization_billing_get_payment_method**](docs/OrganizationBillingApi.md#organization_billing_get_payment_method) | **GET** /organizations/{organizationId}/billing/payment-method | +| _OrganizationBillingApi_ | [**organization_billing_get_tax_information**](docs/OrganizationBillingApi.md#organization_billing_get_tax_information) | **GET** /organizations/{organizationId}/billing/tax-information | +| _OrganizationBillingApi_ | [**organization_billing_get_transactions**](docs/OrganizationBillingApi.md#organization_billing_get_transactions) | **GET** /organizations/{organizationId}/billing/transactions | +| _OrganizationBillingApi_ | [**organization_billing_restart_subscription**](docs/OrganizationBillingApi.md#organization_billing_restart_subscription) | **POST** /organizations/{organizationId}/billing/restart-subscription | +| _OrganizationBillingApi_ | [**organization_billing_setup_business_unit**](docs/OrganizationBillingApi.md#organization_billing_setup_business_unit) | **POST** /organizations/{organizationId}/billing/setup-business-unit | +| _OrganizationBillingApi_ | [**organization_billing_update_payment_method**](docs/OrganizationBillingApi.md#organization_billing_update_payment_method) | **PUT** /organizations/{organizationId}/billing/payment-method | +| _OrganizationBillingApi_ | [**organization_billing_update_tax_information**](docs/OrganizationBillingApi.md#organization_billing_update_tax_information) | **PUT** /organizations/{organizationId}/billing/tax-information | +| _OrganizationBillingApi_ | [**organization_billing_verify_bank_account**](docs/OrganizationBillingApi.md#organization_billing_verify_bank_account) | **POST** /organizations/{organizationId}/billing/payment-method/verify-bank-account | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_add_credit_via_bit_pay**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_add_credit_via_bit_pay) | **POST** /organizations/{organizationId}/billing/vnext/credit/bitpay | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_get_billing_address**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_get_billing_address) | **GET** /organizations/{organizationId}/billing/vnext/address | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_get_credit**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_get_credit) | **GET** /organizations/{organizationId}/billing/vnext/credit | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_get_payment_method**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_get_payment_method) | **GET** /organizations/{organizationId}/billing/vnext/payment-method | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_get_warnings**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_get_warnings) | **GET** /organizations/{organizationId}/billing/vnext/warnings | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_update_billing_address**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_update_billing_address) | **PUT** /organizations/{organizationId}/billing/vnext/address | +| _OrganizationBillingVNextApi_ | [**organization_billing_v_next_update_payment_method**](docs/OrganizationBillingVNextApi.md#organization_billing_v_next_update_payment_method) | **PUT** /organizations/{organizationId}/billing/vnext/payment-method | +| _OrganizationConnectionsApi_ | [**organization_connections_connections_enabled**](docs/OrganizationConnectionsApi.md#organization_connections_connections_enabled) | **GET** /organizations/connections/enabled | +| _OrganizationConnectionsApi_ | [**organization_connections_create_connection**](docs/OrganizationConnectionsApi.md#organization_connections_create_connection) | **POST** /organizations/connections | +| _OrganizationConnectionsApi_ | [**organization_connections_delete_connection**](docs/OrganizationConnectionsApi.md#organization_connections_delete_connection) | **DELETE** /organizations/connections/{organizationConnectionId} | +| _OrganizationConnectionsApi_ | [**organization_connections_get_connection**](docs/OrganizationConnectionsApi.md#organization_connections_get_connection) | **GET** /organizations/connections/{organizationId}/{type} | +| _OrganizationConnectionsApi_ | [**organization_connections_post_delete_connection**](docs/OrganizationConnectionsApi.md#organization_connections_post_delete_connection) | **POST** /organizations/connections/{organizationConnectionId}/delete | +| _OrganizationConnectionsApi_ | [**organization_connections_update_connection**](docs/OrganizationConnectionsApi.md#organization_connections_update_connection) | **PUT** /organizations/connections/{organizationConnectionId} | +| _OrganizationDomainApi_ | [**organization_domain_get**](docs/OrganizationDomainApi.md#organization_domain_get) | **GET** /organizations/{orgId}/domain/{id} | +| _OrganizationDomainApi_ | [**organization_domain_get_all**](docs/OrganizationDomainApi.md#organization_domain_get_all) | **GET** /organizations/{orgId}/domain | +| _OrganizationDomainApi_ | [**organization_domain_get_org_domain_sso_details**](docs/OrganizationDomainApi.md#organization_domain_get_org_domain_sso_details) | **POST** /organizations/domain/sso/details | +| _OrganizationDomainApi_ | [**organization_domain_get_verified_org_domain_sso_details**](docs/OrganizationDomainApi.md#organization_domain_get_verified_org_domain_sso_details) | **POST** /organizations/domain/sso/verified | +| _OrganizationDomainApi_ | [**organization_domain_post**](docs/OrganizationDomainApi.md#organization_domain_post) | **POST** /organizations/{orgId}/domain | +| _OrganizationDomainApi_ | [**organization_domain_post_remove_domain**](docs/OrganizationDomainApi.md#organization_domain_post_remove_domain) | **POST** /organizations/{orgId}/domain/{id}/remove | +| _OrganizationDomainApi_ | [**organization_domain_remove_domain**](docs/OrganizationDomainApi.md#organization_domain_remove_domain) | **DELETE** /organizations/{orgId}/domain/{id} | +| _OrganizationDomainApi_ | [**organization_domain_verify**](docs/OrganizationDomainApi.md#organization_domain_verify) | **POST** /organizations/{orgId}/domain/{id}/verify | +| _OrganizationExportApi_ | [**organization_export_export**](docs/OrganizationExportApi.md#organization_export_export) | **GET** /organizations/{organizationId}/export | +| _OrganizationIntegrationApi_ | [**organization_integration_create**](docs/OrganizationIntegrationApi.md#organization_integration_create) | **POST** /organizations/{organizationId}/integrations | +| _OrganizationIntegrationApi_ | [**organization_integration_delete**](docs/OrganizationIntegrationApi.md#organization_integration_delete) | **DELETE** /organizations/{organizationId}/integrations/{integrationId} | +| _OrganizationIntegrationApi_ | [**organization_integration_get**](docs/OrganizationIntegrationApi.md#organization_integration_get) | **GET** /organizations/{organizationId}/integrations | +| _OrganizationIntegrationApi_ | [**organization_integration_post_delete**](docs/OrganizationIntegrationApi.md#organization_integration_post_delete) | **POST** /organizations/{organizationId}/integrations/{integrationId}/delete | +| _OrganizationIntegrationApi_ | [**organization_integration_update**](docs/OrganizationIntegrationApi.md#organization_integration_update) | **PUT** /organizations/{organizationId}/integrations/{integrationId} | +| _OrganizationIntegrationConfigurationApi_ | [**organization_integration_configuration_create**](docs/OrganizationIntegrationConfigurationApi.md#organization_integration_configuration_create) | **POST** /organizations/{organizationId}/integrations/{integrationId}/configurations | +| _OrganizationIntegrationConfigurationApi_ | [**organization_integration_configuration_delete**](docs/OrganizationIntegrationConfigurationApi.md#organization_integration_configuration_delete) | **DELETE** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId} | +| _OrganizationIntegrationConfigurationApi_ | [**organization_integration_configuration_get**](docs/OrganizationIntegrationConfigurationApi.md#organization_integration_configuration_get) | **GET** /organizations/{organizationId}/integrations/{integrationId}/configurations | +| _OrganizationIntegrationConfigurationApi_ | [**organization_integration_configuration_post_delete**](docs/OrganizationIntegrationConfigurationApi.md#organization_integration_configuration_post_delete) | **POST** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}/delete | +| _OrganizationIntegrationConfigurationApi_ | [**organization_integration_configuration_update**](docs/OrganizationIntegrationConfigurationApi.md#organization_integration_configuration_update) | **PUT** /organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId} | +| _OrganizationReportsApi_ | [**organization_reports_create_organization_report**](docs/OrganizationReportsApi.md#organization_reports_create_organization_report) | **POST** /reports/organizations/{organizationId} | +| _OrganizationReportsApi_ | [**organization_reports_get_latest_organization_report**](docs/OrganizationReportsApi.md#organization_reports_get_latest_organization_report) | **GET** /reports/organizations/{organizationId}/latest | +| _OrganizationReportsApi_ | [**organization_reports_get_organization_report**](docs/OrganizationReportsApi.md#organization_reports_get_organization_report) | **GET** /reports/organizations/{organizationId}/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_get_organization_report_application_data**](docs/OrganizationReportsApi.md#organization_reports_get_organization_report_application_data) | **GET** /reports/organizations/{organizationId}/data/application/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_get_organization_report_data**](docs/OrganizationReportsApi.md#organization_reports_get_organization_report_data) | **GET** /reports/organizations/{organizationId}/data/report/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_get_organization_report_summary**](docs/OrganizationReportsApi.md#organization_reports_get_organization_report_summary) | **GET** /reports/organizations/{organizationId}/data/summary/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_get_organization_report_summary_data_by_date_range**](docs/OrganizationReportsApi.md#organization_reports_get_organization_report_summary_data_by_date_range) | **GET** /reports/organizations/{organizationId}/data/summary | +| _OrganizationReportsApi_ | [**organization_reports_update_organization_report**](docs/OrganizationReportsApi.md#organization_reports_update_organization_report) | **PATCH** /reports/organizations/{organizationId}/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_update_organization_report_application_data**](docs/OrganizationReportsApi.md#organization_reports_update_organization_report_application_data) | **PATCH** /reports/organizations/{organizationId}/data/application/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_update_organization_report_data**](docs/OrganizationReportsApi.md#organization_reports_update_organization_report_data) | **PATCH** /reports/organizations/{organizationId}/data/report/{reportId} | +| _OrganizationReportsApi_ | [**organization_reports_update_organization_report_summary**](docs/OrganizationReportsApi.md#organization_reports_update_organization_report_summary) | **PATCH** /reports/organizations/{organizationId}/data/summary/{reportId} | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_admin_initiated_revoke_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_admin_initiated_revoke_sponsorship) | **DELETE** /organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_create_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_create_sponsorship) | **POST** /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_get_sponsored_organizations**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_get_sponsored_organizations) | **GET** /organization/sponsorship/{sponsoringOrgId}/sponsored | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_get_sync_status**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_get_sync_status) | **GET** /organization/sponsorship/{sponsoringOrgId}/sync-status | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_post_remove_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_post_remove_sponsorship) | **POST** /organization/sponsorship/sponsored/{sponsoredOrgId}/remove | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_post_revoke_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_post_revoke_sponsorship) | **POST** /organization/sponsorship/{sponsoringOrganizationId}/delete | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_pre_validate_sponsorship_token**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_pre_validate_sponsorship_token) | **POST** /organization/sponsorship/validate-token | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_redeem_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_redeem_sponsorship) | **POST** /organization/sponsorship/redeem | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_remove_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_remove_sponsorship) | **DELETE** /organization/sponsorship/sponsored/{sponsoredOrgId} | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_resend_sponsorship_offer**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_resend_sponsorship_offer) | **POST** /organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_revoke_sponsorship**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_revoke_sponsorship) | **DELETE** /organization/sponsorship/{sponsoringOrganizationId} | +| _OrganizationSponsorshipsApi_ | [**organization_sponsorships_sync**](docs/OrganizationSponsorshipsApi.md#organization_sponsorships_sync) | **POST** /organization/sponsorship/sync | +| _OrganizationUsersApi_ | [**organization_users_accept**](docs/OrganizationUsersApi.md#organization_users_accept) | **POST** /organizations/{orgId}/users/{organizationUserId}/accept | +| _OrganizationUsersApi_ | [**organization_users_accept_init**](docs/OrganizationUsersApi.md#organization_users_accept_init) | **POST** /organizations/{orgId}/users/{organizationUserId}/accept-init | +| _OrganizationUsersApi_ | [**organization_users_bulk_confirm**](docs/OrganizationUsersApi.md#organization_users_bulk_confirm) | **POST** /organizations/{orgId}/users/confirm | +| _OrganizationUsersApi_ | [**organization_users_bulk_delete_account**](docs/OrganizationUsersApi.md#organization_users_bulk_delete_account) | **DELETE** /organizations/{orgId}/users/delete-account | +| _OrganizationUsersApi_ | [**organization_users_bulk_enable_secrets_manager**](docs/OrganizationUsersApi.md#organization_users_bulk_enable_secrets_manager) | **PUT** /organizations/{orgId}/users/enable-secrets-manager | +| _OrganizationUsersApi_ | [**organization_users_bulk_reinvite**](docs/OrganizationUsersApi.md#organization_users_bulk_reinvite) | **POST** /organizations/{orgId}/users/reinvite | +| _OrganizationUsersApi_ | [**organization_users_bulk_remove**](docs/OrganizationUsersApi.md#organization_users_bulk_remove) | **DELETE** /organizations/{orgId}/users | +| _OrganizationUsersApi_ | [**organization_users_bulk_restore**](docs/OrganizationUsersApi.md#organization_users_bulk_restore) | **PUT** /organizations/{orgId}/users/restore | +| _OrganizationUsersApi_ | [**organization_users_bulk_revoke**](docs/OrganizationUsersApi.md#organization_users_bulk_revoke) | **PUT** /organizations/{orgId}/users/revoke | +| _OrganizationUsersApi_ | [**organization_users_confirm**](docs/OrganizationUsersApi.md#organization_users_confirm) | **POST** /organizations/{orgId}/users/{id}/confirm | +| _OrganizationUsersApi_ | [**organization_users_delete_account**](docs/OrganizationUsersApi.md#organization_users_delete_account) | **DELETE** /organizations/{orgId}/users/{id}/delete-account | +| _OrganizationUsersApi_ | [**organization_users_get**](docs/OrganizationUsersApi.md#organization_users_get) | **GET** /organizations/{orgId}/users/{id} | +| _OrganizationUsersApi_ | [**organization_users_get_account_recovery_details**](docs/OrganizationUsersApi.md#organization_users_get_account_recovery_details) | **POST** /organizations/{orgId}/users/account-recovery-details | +| _OrganizationUsersApi_ | [**organization_users_get_all**](docs/OrganizationUsersApi.md#organization_users_get_all) | **GET** /organizations/{orgId}/users | +| _OrganizationUsersApi_ | [**organization_users_get_mini_details**](docs/OrganizationUsersApi.md#organization_users_get_mini_details) | **GET** /organizations/{orgId}/users/mini-details | Returns a set of basic information about all members of the organization. This is available to all members of the organization to manage collections. For this reason, it contains as little information as possible and no cryptographic keys or other sensitive data. | +| _OrganizationUsersApi_ | [**organization_users_get_reset_password_details**](docs/OrganizationUsersApi.md#organization_users_get_reset_password_details) | **GET** /organizations/{orgId}/users/{id}/reset-password-details | +| _OrganizationUsersApi_ | [**organization_users_invite**](docs/OrganizationUsersApi.md#organization_users_invite) | **POST** /organizations/{orgId}/users/invite | +| _OrganizationUsersApi_ | [**organization_users_patch_bulk_enable_secrets_manager**](docs/OrganizationUsersApi.md#organization_users_patch_bulk_enable_secrets_manager) | **PATCH** /organizations/{orgId}/users/enable-secrets-manager | +| _OrganizationUsersApi_ | [**organization_users_patch_bulk_restore**](docs/OrganizationUsersApi.md#organization_users_patch_bulk_restore) | **PATCH** /organizations/{orgId}/users/restore | +| _OrganizationUsersApi_ | [**organization_users_patch_bulk_revoke**](docs/OrganizationUsersApi.md#organization_users_patch_bulk_revoke) | **PATCH** /organizations/{orgId}/users/revoke | +| _OrganizationUsersApi_ | [**organization_users_patch_restore**](docs/OrganizationUsersApi.md#organization_users_patch_restore) | **PATCH** /organizations/{orgId}/users/{id}/restore | +| _OrganizationUsersApi_ | [**organization_users_patch_revoke**](docs/OrganizationUsersApi.md#organization_users_patch_revoke) | **PATCH** /organizations/{orgId}/users/{id}/revoke | +| _OrganizationUsersApi_ | [**organization_users_post_bulk_delete_account**](docs/OrganizationUsersApi.md#organization_users_post_bulk_delete_account) | **POST** /organizations/{orgId}/users/delete-account | +| _OrganizationUsersApi_ | [**organization_users_post_bulk_remove**](docs/OrganizationUsersApi.md#organization_users_post_bulk_remove) | **POST** /organizations/{orgId}/users/remove | +| _OrganizationUsersApi_ | [**organization_users_post_delete_account**](docs/OrganizationUsersApi.md#organization_users_post_delete_account) | **POST** /organizations/{orgId}/users/{id}/delete-account | +| _OrganizationUsersApi_ | [**organization_users_post_put**](docs/OrganizationUsersApi.md#organization_users_post_put) | **POST** /organizations/{orgId}/users/{id} | +| _OrganizationUsersApi_ | [**organization_users_post_remove**](docs/OrganizationUsersApi.md#organization_users_post_remove) | **POST** /organizations/{orgId}/users/{id}/remove | +| _OrganizationUsersApi_ | [**organization_users_put**](docs/OrganizationUsersApi.md#organization_users_put) | **PUT** /organizations/{orgId}/users/{id} | +| _OrganizationUsersApi_ | [**organization_users_put_reset_password**](docs/OrganizationUsersApi.md#organization_users_put_reset_password) | **PUT** /organizations/{orgId}/users/{id}/reset-password | +| _OrganizationUsersApi_ | [**organization_users_put_reset_password_enrollment**](docs/OrganizationUsersApi.md#organization_users_put_reset_password_enrollment) | **PUT** /organizations/{orgId}/users/{userId}/reset-password-enrollment | +| _OrganizationUsersApi_ | [**organization_users_reinvite**](docs/OrganizationUsersApi.md#organization_users_reinvite) | **POST** /organizations/{orgId}/users/{id}/reinvite | +| _OrganizationUsersApi_ | [**organization_users_remove**](docs/OrganizationUsersApi.md#organization_users_remove) | **DELETE** /organizations/{orgId}/users/{id} | +| _OrganizationUsersApi_ | [**organization_users_restore**](docs/OrganizationUsersApi.md#organization_users_restore) | **PUT** /organizations/{orgId}/users/{id}/restore | +| _OrganizationUsersApi_ | [**organization_users_revoke**](docs/OrganizationUsersApi.md#organization_users_revoke) | **PUT** /organizations/{orgId}/users/{id}/revoke | +| _OrganizationUsersApi_ | [**organization_users_user_public_keys**](docs/OrganizationUsersApi.md#organization_users_user_public_keys) | **POST** /organizations/{orgId}/users/public-keys | +| _OrganizationsApi_ | [**organizations_api_key**](docs/OrganizationsApi.md#organizations_api_key) | **POST** /organizations/{id}/api-key | +| _OrganizationsApi_ | [**organizations_api_key_information**](docs/OrganizationsApi.md#organizations_api_key_information) | **GET** /organizations/{id}/api-key-information/{type} | +| _OrganizationsApi_ | [**organizations_create_without_payment**](docs/OrganizationsApi.md#organizations_create_without_payment) | **POST** /organizations/create-without-payment | +| _OrganizationsApi_ | [**organizations_delete**](docs/OrganizationsApi.md#organizations_delete) | **DELETE** /organizations/{id} | +| _OrganizationsApi_ | [**organizations_get**](docs/OrganizationsApi.md#organizations_get) | **GET** /organizations/{id} | +| _OrganizationsApi_ | [**organizations_get_auto_enroll_status**](docs/OrganizationsApi.md#organizations_get_auto_enroll_status) | **GET** /organizations/{identifier}/auto-enroll-status | +| _OrganizationsApi_ | [**organizations_get_keys**](docs/OrganizationsApi.md#organizations_get_keys) | **GET** /organizations/{id}/keys | +| _OrganizationsApi_ | [**organizations_get_license**](docs/OrganizationsApi.md#organizations_get_license) | **GET** /organizations/{id}/license | +| _OrganizationsApi_ | [**organizations_get_plan_type**](docs/OrganizationsApi.md#organizations_get_plan_type) | **GET** /organizations/{id}/plan-type | +| _OrganizationsApi_ | [**organizations_get_public_key**](docs/OrganizationsApi.md#organizations_get_public_key) | **GET** /organizations/{id}/public-key | +| _OrganizationsApi_ | [**organizations_get_sso**](docs/OrganizationsApi.md#organizations_get_sso) | **GET** /organizations/{id}/sso | +| _OrganizationsApi_ | [**organizations_get_subscription**](docs/OrganizationsApi.md#organizations_get_subscription) | **GET** /organizations/{id}/subscription | +| _OrganizationsApi_ | [**organizations_get_tax_info**](docs/OrganizationsApi.md#organizations_get_tax_info) | **GET** /organizations/{id}/tax | +| _OrganizationsApi_ | [**organizations_get_user**](docs/OrganizationsApi.md#organizations_get_user) | **GET** /organizations | +| _OrganizationsApi_ | [**organizations_leave**](docs/OrganizationsApi.md#organizations_leave) | **POST** /organizations/{id}/leave | +| _OrganizationsApi_ | [**organizations_post**](docs/OrganizationsApi.md#organizations_post) | **POST** /organizations | +| _OrganizationsApi_ | [**organizations_post_cancel**](docs/OrganizationsApi.md#organizations_post_cancel) | **POST** /organizations/{id}/cancel | +| _OrganizationsApi_ | [**organizations_post_delete**](docs/OrganizationsApi.md#organizations_post_delete) | **POST** /organizations/{id}/delete | +| _OrganizationsApi_ | [**organizations_post_delete_recover_token**](docs/OrganizationsApi.md#organizations_post_delete_recover_token) | **POST** /organizations/{id}/delete-recover-token | +| _OrganizationsApi_ | [**organizations_post_keys**](docs/OrganizationsApi.md#organizations_post_keys) | **POST** /organizations/{id}/keys | +| _OrganizationsApi_ | [**organizations_post_put**](docs/OrganizationsApi.md#organizations_post_put) | **POST** /organizations/{id} | +| _OrganizationsApi_ | [**organizations_post_reinstate**](docs/OrganizationsApi.md#organizations_post_reinstate) | **POST** /organizations/{id}/reinstate | +| _OrganizationsApi_ | [**organizations_post_seat**](docs/OrganizationsApi.md#organizations_post_seat) | **POST** /organizations/{id}/seat | +| _OrganizationsApi_ | [**organizations_post_sm_subscription**](docs/OrganizationsApi.md#organizations_post_sm_subscription) | **POST** /organizations/{id}/sm-subscription | +| _OrganizationsApi_ | [**organizations_post_sso**](docs/OrganizationsApi.md#organizations_post_sso) | **POST** /organizations/{id}/sso | +| _OrganizationsApi_ | [**organizations_post_storage**](docs/OrganizationsApi.md#organizations_post_storage) | **POST** /organizations/{id}/storage | +| _OrganizationsApi_ | [**organizations_post_subscribe_secrets_manager**](docs/OrganizationsApi.md#organizations_post_subscribe_secrets_manager) | **POST** /organizations/{id}/subscribe-secrets-manager | +| _OrganizationsApi_ | [**organizations_post_subscription**](docs/OrganizationsApi.md#organizations_post_subscription) | **POST** /organizations/{id}/subscription | +| _OrganizationsApi_ | [**organizations_post_upgrade**](docs/OrganizationsApi.md#organizations_post_upgrade) | **POST** /organizations/{id}/upgrade | +| _OrganizationsApi_ | [**organizations_post_verify_bank**](docs/OrganizationsApi.md#organizations_post_verify_bank) | **POST** /organizations/{id}/verify-bank | +| _OrganizationsApi_ | [**organizations_put**](docs/OrganizationsApi.md#organizations_put) | **PUT** /organizations/{id} | +| _OrganizationsApi_ | [**organizations_put_collection_management**](docs/OrganizationsApi.md#organizations_put_collection_management) | **PUT** /organizations/{id}/collection-management | +| _OrganizationsApi_ | [**organizations_put_tax_info**](docs/OrganizationsApi.md#organizations_put_tax_info) | **PUT** /organizations/{id}/tax | +| _OrganizationsApi_ | [**organizations_rotate_api_key**](docs/OrganizationsApi.md#organizations_rotate_api_key) | **POST** /organizations/{id}/rotate-api-key | +| _PhishingDomainsApi_ | [**phishing_domains_get_checksum**](docs/PhishingDomainsApi.md#phishing_domains_get_checksum) | **GET** /phishing-domains/checksum | +| _PhishingDomainsApi_ | [**phishing_domains_get_phishing_domains**](docs/PhishingDomainsApi.md#phishing_domains_get_phishing_domains) | **GET** /phishing-domains | +| _PlansApi_ | [**plans_get**](docs/PlansApi.md#plans_get) | **GET** /plans | +| _PoliciesApi_ | [**policies_get**](docs/PoliciesApi.md#policies_get) | **GET** /organizations/{orgId}/policies/{type} | +| _PoliciesApi_ | [**policies_get_all**](docs/PoliciesApi.md#policies_get_all) | **GET** /organizations/{orgId}/policies | +| _PoliciesApi_ | [**policies_get_by_invited_user**](docs/PoliciesApi.md#policies_get_by_invited_user) | **GET** /organizations/{orgId}/policies/invited-user | +| _PoliciesApi_ | [**policies_get_by_token**](docs/PoliciesApi.md#policies_get_by_token) | **GET** /organizations/{orgId}/policies/token | +| _PoliciesApi_ | [**policies_get_master_password_policy**](docs/PoliciesApi.md#policies_get_master_password_policy) | **GET** /organizations/{orgId}/policies/master-password | +| _PoliciesApi_ | [**policies_put**](docs/PoliciesApi.md#policies_put) | **PUT** /organizations/{orgId}/policies/{type} | +| _PoliciesApi_ | [**policies_put_v_next**](docs/PoliciesApi.md#policies_put_v_next) | **PUT** /organizations/{orgId}/policies/{type}/vnext | +| _ProjectsApi_ | [**projects_bulk_delete**](docs/ProjectsApi.md#projects_bulk_delete) | **POST** /projects/delete | +| _ProjectsApi_ | [**projects_create**](docs/ProjectsApi.md#projects_create) | **POST** /organizations/{organizationId}/projects | +| _ProjectsApi_ | [**projects_get**](docs/ProjectsApi.md#projects_get) | **GET** /projects/{id} | +| _ProjectsApi_ | [**projects_list_by_organization**](docs/ProjectsApi.md#projects_list_by_organization) | **GET** /organizations/{organizationId}/projects | +| _ProjectsApi_ | [**projects_update**](docs/ProjectsApi.md#projects_update) | **PUT** /projects/{id} | +| _ProviderBillingApi_ | [**provider_billing_generate_client_invoice_report**](docs/ProviderBillingApi.md#provider_billing_generate_client_invoice_report) | **GET** /providers/{providerId}/billing/invoices/{invoiceId} | +| _ProviderBillingApi_ | [**provider_billing_get_invoices**](docs/ProviderBillingApi.md#provider_billing_get_invoices) | **GET** /providers/{providerId}/billing/invoices | +| _ProviderBillingApi_ | [**provider_billing_get_subscription**](docs/ProviderBillingApi.md#provider_billing_get_subscription) | **GET** /providers/{providerId}/billing/subscription | +| _ProviderBillingApi_ | [**provider_billing_get_tax_information**](docs/ProviderBillingApi.md#provider_billing_get_tax_information) | **GET** /providers/{providerId}/billing/tax-information | +| _ProviderBillingApi_ | [**provider_billing_update_payment_method**](docs/ProviderBillingApi.md#provider_billing_update_payment_method) | **PUT** /providers/{providerId}/billing/payment-method | +| _ProviderBillingApi_ | [**provider_billing_update_tax_information**](docs/ProviderBillingApi.md#provider_billing_update_tax_information) | **PUT** /providers/{providerId}/billing/tax-information | +| _ProviderBillingApi_ | [**provider_billing_verify_bank_account**](docs/ProviderBillingApi.md#provider_billing_verify_bank_account) | **POST** /providers/{providerId}/billing/payment-method/verify-bank-account | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_add_credit_via_bit_pay**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_add_credit_via_bit_pay) | **POST** /providers/{providerId}/billing/vnext/credit/bitpay | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_get_billing_address**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_get_billing_address) | **GET** /providers/{providerId}/billing/vnext/address | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_get_credit**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_get_credit) | **GET** /providers/{providerId}/billing/vnext/credit | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_get_payment_method**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_get_payment_method) | **GET** /providers/{providerId}/billing/vnext/payment-method | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_get_warnings**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_get_warnings) | **GET** /providers/{providerId}/billing/vnext/warnings | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_update_billing_address**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_update_billing_address) | **PUT** /providers/{providerId}/billing/vnext/address | +| _ProviderBillingVNextApi_ | [**provider_billing_v_next_update_payment_method**](docs/ProviderBillingVNextApi.md#provider_billing_v_next_update_payment_method) | **PUT** /providers/{providerId}/billing/vnext/payment-method | +| _ProviderClientsApi_ | [**provider_clients_add_existing_organization**](docs/ProviderClientsApi.md#provider_clients_add_existing_organization) | **POST** /providers/{providerId}/clients/existing | +| _ProviderClientsApi_ | [**provider_clients_create**](docs/ProviderClientsApi.md#provider_clients_create) | **POST** /providers/{providerId}/clients | +| _ProviderClientsApi_ | [**provider_clients_get_addable_organizations**](docs/ProviderClientsApi.md#provider_clients_get_addable_organizations) | **GET** /providers/{providerId}/clients/addable | +| _ProviderClientsApi_ | [**provider_clients_update**](docs/ProviderClientsApi.md#provider_clients_update) | **PUT** /providers/{providerId}/clients/{providerOrganizationId} | +| _ProviderOrganizationsApi_ | [**provider_organizations_add**](docs/ProviderOrganizationsApi.md#provider_organizations_add) | **POST** /providers/{providerId}/organizations/add | +| _ProviderOrganizationsApi_ | [**provider_organizations_delete**](docs/ProviderOrganizationsApi.md#provider_organizations_delete) | **DELETE** /providers/{providerId}/organizations/{id} | +| _ProviderOrganizationsApi_ | [**provider_organizations_get**](docs/ProviderOrganizationsApi.md#provider_organizations_get) | **GET** /providers/{providerId}/organizations | +| _ProviderOrganizationsApi_ | [**provider_organizations_post**](docs/ProviderOrganizationsApi.md#provider_organizations_post) | **POST** /providers/{providerId}/organizations | +| _ProviderOrganizationsApi_ | [**provider_organizations_post_delete**](docs/ProviderOrganizationsApi.md#provider_organizations_post_delete) | **POST** /providers/{providerId}/organizations/{id}/delete | +| _ProviderUsersApi_ | [**provider_users_accept**](docs/ProviderUsersApi.md#provider_users_accept) | **POST** /providers/{providerId}/users/{id}/accept | +| _ProviderUsersApi_ | [**provider_users_bulk_confirm**](docs/ProviderUsersApi.md#provider_users_bulk_confirm) | **POST** /providers/{providerId}/users/confirm | +| _ProviderUsersApi_ | [**provider_users_bulk_delete**](docs/ProviderUsersApi.md#provider_users_bulk_delete) | **DELETE** /providers/{providerId}/users | +| _ProviderUsersApi_ | [**provider_users_bulk_reinvite**](docs/ProviderUsersApi.md#provider_users_bulk_reinvite) | **POST** /providers/{providerId}/users/reinvite | +| _ProviderUsersApi_ | [**provider_users_confirm**](docs/ProviderUsersApi.md#provider_users_confirm) | **POST** /providers/{providerId}/users/{id}/confirm | +| _ProviderUsersApi_ | [**provider_users_delete**](docs/ProviderUsersApi.md#provider_users_delete) | **DELETE** /providers/{providerId}/users/{id} | +| _ProviderUsersApi_ | [**provider_users_get**](docs/ProviderUsersApi.md#provider_users_get) | **GET** /providers/{providerId}/users/{id} | +| _ProviderUsersApi_ | [**provider_users_get_all**](docs/ProviderUsersApi.md#provider_users_get_all) | **GET** /providers/{providerId}/users | +| _ProviderUsersApi_ | [**provider_users_invite**](docs/ProviderUsersApi.md#provider_users_invite) | **POST** /providers/{providerId}/users/invite | +| _ProviderUsersApi_ | [**provider_users_post_bulk_delete**](docs/ProviderUsersApi.md#provider_users_post_bulk_delete) | **POST** /providers/{providerId}/users/delete | +| _ProviderUsersApi_ | [**provider_users_post_delete**](docs/ProviderUsersApi.md#provider_users_post_delete) | **POST** /providers/{providerId}/users/{id}/delete | +| _ProviderUsersApi_ | [**provider_users_post_put**](docs/ProviderUsersApi.md#provider_users_post_put) | **POST** /providers/{providerId}/users/{id} | +| _ProviderUsersApi_ | [**provider_users_put**](docs/ProviderUsersApi.md#provider_users_put) | **PUT** /providers/{providerId}/users/{id} | +| _ProviderUsersApi_ | [**provider_users_reinvite**](docs/ProviderUsersApi.md#provider_users_reinvite) | **POST** /providers/{providerId}/users/{id}/reinvite | +| _ProviderUsersApi_ | [**provider_users_user_public_keys**](docs/ProviderUsersApi.md#provider_users_user_public_keys) | **POST** /providers/{providerId}/users/public-keys | +| _ProvidersApi_ | [**providers_delete**](docs/ProvidersApi.md#providers_delete) | **DELETE** /providers/{id} | +| _ProvidersApi_ | [**providers_get**](docs/ProvidersApi.md#providers_get) | **GET** /providers/{id} | +| _ProvidersApi_ | [**providers_post_delete**](docs/ProvidersApi.md#providers_post_delete) | **POST** /providers/{id}/delete | +| _ProvidersApi_ | [**providers_post_delete_recover_token**](docs/ProvidersApi.md#providers_post_delete_recover_token) | **POST** /providers/{id}/delete-recover-token | +| _ProvidersApi_ | [**providers_post_put**](docs/ProvidersApi.md#providers_post_put) | **POST** /providers/{id} | +| _ProvidersApi_ | [**providers_put**](docs/ProvidersApi.md#providers_put) | **PUT** /providers/{id} | +| _ProvidersApi_ | [**providers_setup**](docs/ProvidersApi.md#providers_setup) | **POST** /providers/{id}/setup | +| _PushApi_ | [**push_add_organization**](docs/PushApi.md#push_add_organization) | **PUT** /push/add-organization | +| _PushApi_ | [**push_delete**](docs/PushApi.md#push_delete) | **POST** /push/delete | +| _PushApi_ | [**push_delete_organization**](docs/PushApi.md#push_delete_organization) | **PUT** /push/delete-organization | +| _PushApi_ | [**push_register**](docs/PushApi.md#push_register) | **POST** /push/register | +| _PushApi_ | [**push_send**](docs/PushApi.md#push_send) | **POST** /push/send | +| _ReportsApi_ | [**reports_add_password_health_report_application**](docs/ReportsApi.md#reports_add_password_health_report_application) | **POST** /reports/password-health-report-application | Adds a new record into PasswordHealthReportApplication | +| _ReportsApi_ | [**reports_add_password_health_report_applications**](docs/ReportsApi.md#reports_add_password_health_report_applications) | **POST** /reports/password-health-report-applications | Adds multiple records into PasswordHealthReportApplication | +| _ReportsApi_ | [**reports_drop_password_health_report_application**](docs/ReportsApi.md#reports_drop_password_health_report_application) | **DELETE** /reports/password-health-report-application | Drops a record from PasswordHealthReportApplication | +| _ReportsApi_ | [**reports_get_member_access_report**](docs/ReportsApi.md#reports_get_member_access_report) | **GET** /reports/member-access/{orgId} | Access details for an organization member. Includes the member information, group collection assignment, and item counts | +| _ReportsApi_ | [**reports_get_member_cipher_details**](docs/ReportsApi.md#reports_get_member_cipher_details) | **GET** /reports/member-cipher-details/{orgId} | Organization member information containing a list of cipher ids assigned | +| _ReportsApi_ | [**reports_get_password_health_report_applications**](docs/ReportsApi.md#reports_get_password_health_report_applications) | **GET** /reports/password-health-report-applications/{orgId} | Get the password health report applications for an organization | +| _RequestSmAccessApi_ | [**request_sm_access_request_sm_access_from_admins**](docs/RequestSmAccessApi.md#request_sm_access_request_sm_access_from_admins) | **POST** /request-access/request-sm-access | +| _SecretsApi_ | [**secrets_bulk_delete**](docs/SecretsApi.md#secrets_bulk_delete) | **POST** /secrets/delete | +| _SecretsApi_ | [**secrets_create**](docs/SecretsApi.md#secrets_create) | **POST** /organizations/{organizationId}/secrets | +| _SecretsApi_ | [**secrets_get**](docs/SecretsApi.md#secrets_get) | **GET** /secrets/{id} | +| _SecretsApi_ | [**secrets_get_secrets_by_ids**](docs/SecretsApi.md#secrets_get_secrets_by_ids) | **POST** /secrets/get-by-ids | +| _SecretsApi_ | [**secrets_get_secrets_by_project**](docs/SecretsApi.md#secrets_get_secrets_by_project) | **GET** /projects/{projectId}/secrets | +| _SecretsApi_ | [**secrets_get_secrets_sync**](docs/SecretsApi.md#secrets_get_secrets_sync) | **GET** /organizations/{organizationId}/secrets/sync | +| _SecretsApi_ | [**secrets_list_by_organization**](docs/SecretsApi.md#secrets_list_by_organization) | **GET** /organizations/{organizationId}/secrets | +| _SecretsApi_ | [**secrets_update_secret**](docs/SecretsApi.md#secrets_update_secret) | **PUT** /secrets/{id} | +| _SecretsManagerEventsApi_ | [**secrets_manager_events_get_service_account_events**](docs/SecretsManagerEventsApi.md#secrets_manager_events_get_service_account_events) | **GET** /sm/events/service-accounts/{serviceAccountId} | +| _SecretsManagerPortingApi_ | [**secrets_manager_porting_export**](docs/SecretsManagerPortingApi.md#secrets_manager_porting_export) | **GET** /sm/{organizationId}/export | +| _SecretsManagerPortingApi_ | [**secrets_manager_porting_import**](docs/SecretsManagerPortingApi.md#secrets_manager_porting_import) | **POST** /sm/{organizationId}/import | +| _SecurityTaskApi_ | [**security_task_bulk_create_tasks**](docs/SecurityTaskApi.md#security_task_bulk_create_tasks) | **POST** /tasks/{orgId}/bulk-create | Bulk create security tasks for an organization. | +| _SecurityTaskApi_ | [**security_task_complete**](docs/SecurityTaskApi.md#security_task_complete) | **PATCH** /tasks/{taskId}/complete | Marks a task as complete. The user must have edit permission on the cipher associated with the task. | +| _SecurityTaskApi_ | [**security_task_get**](docs/SecurityTaskApi.md#security_task_get) | **GET** /tasks | Retrieves security tasks for the current user. | +| _SecurityTaskApi_ | [**security_task_get_task_metrics_for_organization**](docs/SecurityTaskApi.md#security_task_get_task_metrics_for_organization) | **GET** /tasks/{organizationId}/metrics | Retrieves security task metrics for an organization. | +| _SecurityTaskApi_ | [**security_task_list_for_organization**](docs/SecurityTaskApi.md#security_task_list_for_organization) | **GET** /tasks/organization | Retrieves security tasks for an organization. Restricted to organization administrators. | +| _SelfHostedAccountBillingApi_ | [**self_hosted_account_billing_upload_license**](docs/SelfHostedAccountBillingApi.md#self_hosted_account_billing_upload_license) | **POST** /account/billing/vnext/self-host/license | +| _SelfHostedOrganizationLicensesApi_ | [**self_hosted_organization_licenses_create_license**](docs/SelfHostedOrganizationLicensesApi.md#self_hosted_organization_licenses_create_license) | **POST** /organizations/licenses/self-hosted | +| _SelfHostedOrganizationLicensesApi_ | [**self_hosted_organization_licenses_sync_license**](docs/SelfHostedOrganizationLicensesApi.md#self_hosted_organization_licenses_sync_license) | **POST** /organizations/licenses/self-hosted/{id}/sync | +| _SelfHostedOrganizationLicensesApi_ | [**self_hosted_organization_licenses_update_license**](docs/SelfHostedOrganizationLicensesApi.md#self_hosted_organization_licenses_update_license) | **POST** /organizations/licenses/self-hosted/{id} | +| _SelfHostedOrganizationSponsorshipsApi_ | [**self_hosted_organization_sponsorships_admin_initiated_revoke_sponsorship**](docs/SelfHostedOrganizationSponsorshipsApi.md#self_hosted_organization_sponsorships_admin_initiated_revoke_sponsorship) | **DELETE** /organization/sponsorship/self-hosted/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke | +| _SelfHostedOrganizationSponsorshipsApi_ | [**self_hosted_organization_sponsorships_create_sponsorship**](docs/SelfHostedOrganizationSponsorshipsApi.md#self_hosted_organization_sponsorships_create_sponsorship) | **POST** /organization/sponsorship/self-hosted/{sponsoringOrgId}/families-for-enterprise | +| _SelfHostedOrganizationSponsorshipsApi_ | [**self_hosted_organization_sponsorships_get_sponsored_organizations**](docs/SelfHostedOrganizationSponsorshipsApi.md#self_hosted_organization_sponsorships_get_sponsored_organizations) | **GET** /organization/sponsorship/self-hosted/{orgId}/sponsored | +| _SelfHostedOrganizationSponsorshipsApi_ | [**self_hosted_organization_sponsorships_post_revoke_sponsorship**](docs/SelfHostedOrganizationSponsorshipsApi.md#self_hosted_organization_sponsorships_post_revoke_sponsorship) | **POST** /organization/sponsorship/self-hosted/{sponsoringOrgId}/delete | +| _SelfHostedOrganizationSponsorshipsApi_ | [**self_hosted_organization_sponsorships_revoke_sponsorship**](docs/SelfHostedOrganizationSponsorshipsApi.md#self_hosted_organization_sponsorships_revoke_sponsorship) | **DELETE** /organization/sponsorship/self-hosted/{sponsoringOrgId} | +| _SendsApi_ | [**sends_access**](docs/SendsApi.md#sends_access) | **POST** /sends/access/{id} | +| _SendsApi_ | [**sends_azure_validate_file**](docs/SendsApi.md#sends_azure_validate_file) | **POST** /sends/file/validate/azure | +| _SendsApi_ | [**sends_delete**](docs/SendsApi.md#sends_delete) | **DELETE** /sends/{id} | +| _SendsApi_ | [**sends_get**](docs/SendsApi.md#sends_get) | **GET** /sends/{id} | +| _SendsApi_ | [**sends_get_all**](docs/SendsApi.md#sends_get_all) | **GET** /sends | +| _SendsApi_ | [**sends_get_send_file_download_data**](docs/SendsApi.md#sends_get_send_file_download_data) | **POST** /sends/{encodedSendId}/access/file/{fileId} | +| _SendsApi_ | [**sends_post**](docs/SendsApi.md#sends_post) | **POST** /sends | +| _SendsApi_ | [**sends_post_file**](docs/SendsApi.md#sends_post_file) | **POST** /sends/file/v2 | +| _SendsApi_ | [**sends_post_file_for_existing_send**](docs/SendsApi.md#sends_post_file_for_existing_send) | **POST** /sends/{id}/file/{fileId} | +| _SendsApi_ | [**sends_put**](docs/SendsApi.md#sends_put) | **PUT** /sends/{id} | +| _SendsApi_ | [**sends_put_remove_password**](docs/SendsApi.md#sends_put_remove_password) | **PUT** /sends/{id}/remove-password | +| _SendsApi_ | [**sends_renew_file_upload**](docs/SendsApi.md#sends_renew_file_upload) | **GET** /sends/{id}/file/{fileId} | +| _ServiceAccountsApi_ | [**service_accounts_bulk_delete**](docs/ServiceAccountsApi.md#service_accounts_bulk_delete) | **POST** /service-accounts/delete | +| _ServiceAccountsApi_ | [**service_accounts_create**](docs/ServiceAccountsApi.md#service_accounts_create) | **POST** /organizations/{organizationId}/service-accounts | +| _ServiceAccountsApi_ | [**service_accounts_create_access_token**](docs/ServiceAccountsApi.md#service_accounts_create_access_token) | **POST** /service-accounts/{id}/access-tokens | +| _ServiceAccountsApi_ | [**service_accounts_get_access_tokens**](docs/ServiceAccountsApi.md#service_accounts_get_access_tokens) | **GET** /service-accounts/{id}/access-tokens | +| _ServiceAccountsApi_ | [**service_accounts_get_by_service_account_id**](docs/ServiceAccountsApi.md#service_accounts_get_by_service_account_id) | **GET** /service-accounts/{id} | +| _ServiceAccountsApi_ | [**service_accounts_list_by_organization**](docs/ServiceAccountsApi.md#service_accounts_list_by_organization) | **GET** /organizations/{organizationId}/service-accounts | +| _ServiceAccountsApi_ | [**service_accounts_revoke_access_tokens**](docs/ServiceAccountsApi.md#service_accounts_revoke_access_tokens) | **POST** /service-accounts/{id}/access-tokens/revoke | +| _ServiceAccountsApi_ | [**service_accounts_update**](docs/ServiceAccountsApi.md#service_accounts_update) | **PUT** /service-accounts/{id} | +| _SettingsApi_ | [**settings_get_domains**](docs/SettingsApi.md#settings_get_domains) | **GET** /settings/domains | +| _SettingsApi_ | [**settings_post_domains**](docs/SettingsApi.md#settings_post_domains) | **POST** /settings/domains | +| _SettingsApi_ | [**settings_put_domains**](docs/SettingsApi.md#settings_put_domains) | **PUT** /settings/domains | +| _SlackIntegrationApi_ | [**slack_integration_create**](docs/SlackIntegrationApi.md#slack_integration_create) | **GET** /organizations/{organizationId}/integrations/slack/create | +| _SlackIntegrationApi_ | [**slack_integration_redirect**](docs/SlackIntegrationApi.md#slack_integration_redirect) | **GET** /organizations/{organizationId}/integrations/slack/redirect | +| _StripeApi_ | [**stripe_create_setup_intent_for_bank_account**](docs/StripeApi.md#stripe_create_setup_intent_for_bank_account) | **POST** /setup-intent/bank-account | +| _StripeApi_ | [**stripe_create_setup_intent_for_card**](docs/StripeApi.md#stripe_create_setup_intent_for_card) | **POST** /setup-intent/card | +| _StripeApi_ | [**stripe_is_country_supported**](docs/StripeApi.md#stripe_is_country_supported) | **GET** /tax/is-country-supported | +| _SyncApi_ | [**sync_get**](docs/SyncApi.md#sync_get) | **GET** /sync | +| _TaxApi_ | [**tax_preview_tax_amount_for_organization_trial**](docs/TaxApi.md#tax_preview_tax_amount_for_organization_trial) | **POST** /tax/preview-amount/organization-trial | +| _TrashApi_ | [**trash_empty_trash**](docs/TrashApi.md#trash_empty_trash) | **POST** /secrets/{organizationId}/trash/empty | +| _TrashApi_ | [**trash_list_by_organization**](docs/TrashApi.md#trash_list_by_organization) | **GET** /secrets/{organizationId}/trash | +| _TrashApi_ | [**trash_restore_trash**](docs/TrashApi.md#trash_restore_trash) | **POST** /secrets/{organizationId}/trash/restore | +| _TwoFactorApi_ | [**two_factor_delete_web_authn**](docs/TwoFactorApi.md#two_factor_delete_web_authn) | **DELETE** /two-factor/webauthn | +| _TwoFactorApi_ | [**two_factor_disable_authenticator**](docs/TwoFactorApi.md#two_factor_disable_authenticator) | **DELETE** /two-factor/authenticator | +| _TwoFactorApi_ | [**two_factor_get**](docs/TwoFactorApi.md#two_factor_get) | **GET** /two-factor | +| _TwoFactorApi_ | [**two_factor_get_authenticator**](docs/TwoFactorApi.md#two_factor_get_authenticator) | **POST** /two-factor/get-authenticator | +| _TwoFactorApi_ | [**two_factor_get_device_verification_settings**](docs/TwoFactorApi.md#two_factor_get_device_verification_settings) | **GET** /two-factor/get-device-verification-settings | +| _TwoFactorApi_ | [**two_factor_get_duo**](docs/TwoFactorApi.md#two_factor_get_duo) | **POST** /two-factor/get-duo | +| _TwoFactorApi_ | [**two_factor_get_email**](docs/TwoFactorApi.md#two_factor_get_email) | **POST** /two-factor/get-email | +| _TwoFactorApi_ | [**two_factor_get_organization**](docs/TwoFactorApi.md#two_factor_get_organization) | **GET** /organizations/{id}/two-factor | +| _TwoFactorApi_ | [**two_factor_get_organization_duo**](docs/TwoFactorApi.md#two_factor_get_organization_duo) | **POST** /organizations/{id}/two-factor/get-duo | +| _TwoFactorApi_ | [**two_factor_get_recover**](docs/TwoFactorApi.md#two_factor_get_recover) | **POST** /two-factor/get-recover | +| _TwoFactorApi_ | [**two_factor_get_web_authn**](docs/TwoFactorApi.md#two_factor_get_web_authn) | **POST** /two-factor/get-webauthn | +| _TwoFactorApi_ | [**two_factor_get_yubi_key**](docs/TwoFactorApi.md#two_factor_get_yubi_key) | **POST** /two-factor/get-yubikey | +| _TwoFactorApi_ | [**two_factor_post_authenticator**](docs/TwoFactorApi.md#two_factor_post_authenticator) | **POST** /two-factor/authenticator | +| _TwoFactorApi_ | [**two_factor_post_disable**](docs/TwoFactorApi.md#two_factor_post_disable) | **POST** /two-factor/disable | +| _TwoFactorApi_ | [**two_factor_post_duo**](docs/TwoFactorApi.md#two_factor_post_duo) | **POST** /two-factor/duo | +| _TwoFactorApi_ | [**two_factor_post_email**](docs/TwoFactorApi.md#two_factor_post_email) | **POST** /two-factor/email | +| _TwoFactorApi_ | [**two_factor_post_organization_disable**](docs/TwoFactorApi.md#two_factor_post_organization_disable) | **POST** /organizations/{id}/two-factor/disable | +| _TwoFactorApi_ | [**two_factor_post_organization_duo**](docs/TwoFactorApi.md#two_factor_post_organization_duo) | **POST** /organizations/{id}/two-factor/duo | +| _TwoFactorApi_ | [**two_factor_post_web_authn**](docs/TwoFactorApi.md#two_factor_post_web_authn) | **POST** /two-factor/webauthn | +| _TwoFactorApi_ | [**two_factor_post_yubi_key**](docs/TwoFactorApi.md#two_factor_post_yubi_key) | **POST** /two-factor/yubikey | +| _TwoFactorApi_ | [**two_factor_put_authenticator**](docs/TwoFactorApi.md#two_factor_put_authenticator) | **PUT** /two-factor/authenticator | +| _TwoFactorApi_ | [**two_factor_put_device_verification_settings**](docs/TwoFactorApi.md#two_factor_put_device_verification_settings) | **PUT** /two-factor/device-verification-settings | +| _TwoFactorApi_ | [**two_factor_put_disable**](docs/TwoFactorApi.md#two_factor_put_disable) | **PUT** /two-factor/disable | +| _TwoFactorApi_ | [**two_factor_put_duo**](docs/TwoFactorApi.md#two_factor_put_duo) | **PUT** /two-factor/duo | +| _TwoFactorApi_ | [**two_factor_put_email**](docs/TwoFactorApi.md#two_factor_put_email) | **PUT** /two-factor/email | +| _TwoFactorApi_ | [**two_factor_put_organization_disable**](docs/TwoFactorApi.md#two_factor_put_organization_disable) | **PUT** /organizations/{id}/two-factor/disable | +| _TwoFactorApi_ | [**two_factor_put_organization_duo**](docs/TwoFactorApi.md#two_factor_put_organization_duo) | **PUT** /organizations/{id}/two-factor/duo | +| _TwoFactorApi_ | [**two_factor_put_web_authn**](docs/TwoFactorApi.md#two_factor_put_web_authn) | **PUT** /two-factor/webauthn | +| _TwoFactorApi_ | [**two_factor_put_yubi_key**](docs/TwoFactorApi.md#two_factor_put_yubi_key) | **PUT** /two-factor/yubikey | +| _TwoFactorApi_ | [**two_factor_send_email**](docs/TwoFactorApi.md#two_factor_send_email) | **POST** /two-factor/send-email | This endpoint is only used to set-up email two factor authentication. | +| _TwoFactorApi_ | [**two_factor_send_email_login**](docs/TwoFactorApi.md#two_factor_send_email_login) | **POST** /two-factor/send-email-login | +| _UsersApi_ | [**users_get**](docs/UsersApi.md#users_get) | **GET** /users/{id}/public-key | +| _WebAuthnApi_ | [**web_authn_assertion_options**](docs/WebAuthnApi.md#web_authn_assertion_options) | **POST** /webauthn/assertion-options | +| _WebAuthnApi_ | [**web_authn_attestation_options**](docs/WebAuthnApi.md#web_authn_attestation_options) | **POST** /webauthn/attestation-options | +| _WebAuthnApi_ | [**web_authn_delete**](docs/WebAuthnApi.md#web_authn_delete) | **POST** /webauthn/{id}/delete | +| _WebAuthnApi_ | [**web_authn_get**](docs/WebAuthnApi.md#web_authn_get) | **GET** /webauthn | +| _WebAuthnApi_ | [**web_authn_post**](docs/WebAuthnApi.md#web_authn_post) | **POST** /webauthn | +| _WebAuthnApi_ | [**web_authn_update_credential**](docs/WebAuthnApi.md#web_authn_update_credential) | **PUT** /webauthn | ## Documentation For Models @@ -667,13 +675,13 @@ All URIs are relative to _http://localhost_ - [CollectionBulkDeleteRequestModel](docs/CollectionBulkDeleteRequestModel.md) - [CollectionDetailsResponseModel](docs/CollectionDetailsResponseModel.md) - [CollectionDetailsResponseModelListResponseModel](docs/CollectionDetailsResponseModelListResponseModel.md) -- [CollectionRequestModel](docs/CollectionRequestModel.md) - [CollectionResponseModel](docs/CollectionResponseModel.md) - [CollectionResponseModelListResponseModel](docs/CollectionResponseModelListResponseModel.md) - [CollectionType](docs/CollectionType.md) - [CollectionWithIdRequestModel](docs/CollectionWithIdRequestModel.md) - [ConfigResponseModel](docs/ConfigResponseModel.md) - [CreateClientOrganizationRequestBody](docs/CreateClientOrganizationRequestBody.md) +- [CreateCollectionRequestModel](docs/CreateCollectionRequestModel.md) - [CredentialCreateOptions](docs/CredentialCreateOptions.md) - [DeleteAttachmentResponseData](docs/DeleteAttachmentResponseData.md) - [DeleteRecoverRequestModel](docs/DeleteRecoverRequestModel.md) @@ -688,7 +696,6 @@ All URIs are relative to _http://localhost_ - [DeviceVerificationRequestModel](docs/DeviceVerificationRequestModel.md) - [DeviceVerificationResponseModel](docs/DeviceVerificationResponseModel.md) - [DomainsResponseModel](docs/DomainsResponseModel.md) -- [DropOrganizationReportRequest](docs/DropOrganizationReportRequest.md) - [DropPasswordHealthReportApplicationRequest](docs/DropPasswordHealthReportApplicationRequest.md) - [EmailRequestModel](docs/EmailRequestModel.md) - [EmailTokenRequestModel](docs/EmailTokenRequestModel.md) @@ -759,6 +766,7 @@ All URIs are relative to _http://localhost_ - [MemberCipherDetailsResponseModel](docs/MemberCipherDetailsResponseModel.md) - [MemberDecryptionType](docs/MemberDecryptionType.md) - [MinimalBillingAddressRequest](docs/MinimalBillingAddressRequest.md) +- [MinimalTokenizedPaymentMethodRequest](docs/MinimalTokenizedPaymentMethodRequest.md) - [NotificationResponseModel](docs/NotificationResponseModel.md) - [NotificationResponseModelListResponseModel](docs/NotificationResponseModelListResponseModel.md) - [OpenIdConnectRedirectBehavior](docs/OpenIdConnectRedirectBehavior.md) @@ -790,8 +798,6 @@ All URIs are relative to _http://localhost_ - [OrganizationNoPaymentCreateRequest](docs/OrganizationNoPaymentCreateRequest.md) - [OrganizationPasswordManagerRequestModel](docs/OrganizationPasswordManagerRequestModel.md) - [OrganizationPublicKeyResponseModel](docs/OrganizationPublicKeyResponseModel.md) -- [OrganizationReport](docs/OrganizationReport.md) -- [OrganizationReportSummaryModel](docs/OrganizationReportSummaryModel.md) - [OrganizationResponseModel](docs/OrganizationResponseModel.md) - [OrganizationSeatRequestModel](docs/OrganizationSeatRequestModel.md) - [OrganizationSponsorshipCreateRequestModel](docs/OrganizationSponsorshipCreateRequestModel.md) @@ -862,6 +868,7 @@ All URIs are relative to _http://localhost_ - [PotentialGranteeResponseModel](docs/PotentialGranteeResponseModel.md) - [PotentialGranteeResponseModelListResponseModel](docs/PotentialGranteeResponseModelListResponseModel.md) - [PreValidateSponsorshipResponseModel](docs/PreValidateSponsorshipResponseModel.md) +- [PremiumCloudHostedSubscriptionRequest](docs/PremiumCloudHostedSubscriptionRequest.md) - [PreviewIndividualInvoiceRequestBody](docs/PreviewIndividualInvoiceRequestBody.md) - [PreviewOrganizationInvoiceRequestBody](docs/PreviewOrganizationInvoiceRequestBody.md) - [PreviewTaxAmountForOrganizationTrialRequestBody](docs/PreviewTaxAmountForOrganizationTrialRequestBody.md) @@ -927,6 +934,7 @@ All URIs are relative to _http://localhost_ - [Saml2BindingType](docs/Saml2BindingType.md) - [Saml2NameIdFormat](docs/Saml2NameIdFormat.md) - [Saml2SigningBehavior](docs/Saml2SigningBehavior.md) +- [SavePolicyRequest](docs/SavePolicyRequest.md) - [SecretAccessPoliciesRequestsModel](docs/SecretAccessPoliciesRequestsModel.md) - [SecretAccessPoliciesResponseModel](docs/SecretAccessPoliciesResponseModel.md) - [SecretCreateRequestModel](docs/SecretCreateRequestModel.md) @@ -944,6 +952,7 @@ All URIs are relative to _http://localhost_ - [SecretsWithProjectsInnerSecret](docs/SecretsWithProjectsInnerSecret.md) - [SecureNoteType](docs/SecureNoteType.md) - [SecurityTaskCreateRequest](docs/SecurityTaskCreateRequest.md) +- [SecurityTaskMetricsResponseModel](docs/SecurityTaskMetricsResponseModel.md) - [SecurityTaskStatus](docs/SecurityTaskStatus.md) - [SecurityTaskType](docs/SecurityTaskType.md) - [SecurityTasksResponseModel](docs/SecurityTasksResponseModel.md) @@ -1005,7 +1014,6 @@ All URIs are relative to _http://localhost_ - [TwoFactorProviderResponseModelListResponseModel](docs/TwoFactorProviderResponseModelListResponseModel.md) - [TwoFactorProviderType](docs/TwoFactorProviderType.md) - [TwoFactorRecoverResponseModel](docs/TwoFactorRecoverResponseModel.md) -- [TwoFactorRecoveryRequestModel](docs/TwoFactorRecoveryRequestModel.md) - [TwoFactorWebAuthnDeleteRequestModel](docs/TwoFactorWebAuthnDeleteRequestModel.md) - [TwoFactorWebAuthnRequestModel](docs/TwoFactorWebAuthnRequestModel.md) - [TwoFactorWebAuthnResponseModel](docs/TwoFactorWebAuthnResponseModel.md) @@ -1015,8 +1023,13 @@ All URIs are relative to _http://localhost_ - [UntrustDevicesRequestModel](docs/UntrustDevicesRequestModel.md) - [UpdateAvatarRequestModel](docs/UpdateAvatarRequestModel.md) - [UpdateClientOrganizationRequestBody](docs/UpdateClientOrganizationRequestBody.md) +- [UpdateCollectionRequestModel](docs/UpdateCollectionRequestModel.md) - [UpdateDevicesTrustRequestModel](docs/UpdateDevicesTrustRequestModel.md) - [UpdateDomainsRequestModel](docs/UpdateDomainsRequestModel.md) +- [UpdateOrganizationReportApplicationDataRequest](docs/UpdateOrganizationReportApplicationDataRequest.md) +- [UpdateOrganizationReportDataRequest](docs/UpdateOrganizationReportDataRequest.md) +- [UpdateOrganizationReportRequest](docs/UpdateOrganizationReportRequest.md) +- [UpdateOrganizationReportSummaryRequest](docs/UpdateOrganizationReportSummaryRequest.md) - [UpdatePaymentMethodRequestBody](docs/UpdatePaymentMethodRequestBody.md) - [UpdateProfileRequestModel](docs/UpdateProfileRequestModel.md) - [UpdateTdeOffboardingPasswordRequestModel](docs/UpdateTdeOffboardingPasswordRequestModel.md) @@ -1033,7 +1046,6 @@ All URIs are relative to _http://localhost_ - [UserVerificationRequirement](docs/UserVerificationRequirement.md) - [VerifiedOrganizationDomainSsoDetailResponseModel](docs/VerifiedOrganizationDomainSsoDetailResponseModel.md) - [VerifiedOrganizationDomainSsoDetailsResponseModel](docs/VerifiedOrganizationDomainSsoDetailsResponseModel.md) -- [VerifyBankAccountRequest](docs/VerifyBankAccountRequest.md) - [VerifyBankAccountRequestBody](docs/VerifyBankAccountRequestBody.md) - [VerifyDeleteRecoverRequestModel](docs/VerifyDeleteRecoverRequestModel.md) - [VerifyEmailRequestModel](docs/VerifyEmailRequestModel.md) diff --git a/crates/bitwarden-api-api/src/apis/access_policies_api.rs b/crates/bitwarden-api-api/src/apis/access_policies_api.rs index 19a58c7e0..42e553890 100644 --- a/crates/bitwarden-api-api/src/apis/access_policies_api.rs +++ b/crates/bitwarden-api-api/src/apis/access_policies_api.rs @@ -14,99 +14,98 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method -/// [`organizations_id_access_policies_people_potential_grantees_get`] +/// struct for typed errors of method [`access_policies_get_people_potential_grantees`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdAccessPoliciesPeoplePotentialGranteesGetError { +pub enum AccessPoliciesGetPeoplePotentialGranteesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_id_access_policies_projects_potential_grantees_get`] +/// struct for typed errors of method [`access_policies_get_project_people_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdAccessPoliciesProjectsPotentialGranteesGetError { +pub enum AccessPoliciesGetProjectPeopleAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_id_access_policies_service_accounts_potential_grantees_get`] +/// struct for typed errors of method [`access_policies_get_project_potential_grantees`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdAccessPoliciesServiceAccountsPotentialGranteesGetError { +pub enum AccessPoliciesGetProjectPotentialGranteesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_people_get`] +/// struct for typed errors of method +/// [`access_policies_get_project_service_accounts_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesPeopleGetError { +pub enum AccessPoliciesGetProjectServiceAccountsAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_people_put`] +/// struct for typed errors of method [`access_policies_get_secret_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesPeoplePutError { +pub enum AccessPoliciesGetSecretAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_service_accounts_get`] +/// struct for typed errors of method [`access_policies_get_service_account_granted_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesServiceAccountsGetError { +pub enum AccessPoliciesGetServiceAccountGrantedPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_service_accounts_put`] +/// struct for typed errors of method [`access_policies_get_service_account_people_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesServiceAccountsPutError { +pub enum AccessPoliciesGetServiceAccountPeopleAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_secret_id_access_policies_get`] +/// struct for typed errors of method [`access_policies_get_service_accounts_potential_grantees`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsSecretIdAccessPoliciesGetError { +pub enum AccessPoliciesGetServiceAccountsPotentialGranteesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_access_policies_people_get`] +/// struct for typed errors of method [`access_policies_put_project_people_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdAccessPoliciesPeopleGetError { +pub enum AccessPoliciesPutProjectPeopleAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_access_policies_people_put`] +/// struct for typed errors of method +/// [`access_policies_put_project_service_accounts_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdAccessPoliciesPeoplePutError { +pub enum AccessPoliciesPutProjectServiceAccountsAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_granted_policies_get`] +/// struct for typed errors of method [`access_policies_put_service_account_granted_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdGrantedPoliciesGetError { +pub enum AccessPoliciesPutServiceAccountGrantedPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_granted_policies_put`] +/// struct for typed errors of method [`access_policies_put_service_account_people_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdGrantedPoliciesPutError { +pub enum AccessPoliciesPutServiceAccountPeopleAccessPoliciesError { UnknownValue(serde_json::Value), } -pub async fn organizations_id_access_policies_people_potential_grantees_get( +pub async fn access_policies_get_people_potential_grantees( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< models::PotentialGranteeResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -145,7 +144,7 @@ pub async fn organizations_id_access_policies_people_potential_grantees_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -155,18 +154,18 @@ pub async fn organizations_id_access_policies_people_potential_grantees_get( } } -pub async fn organizations_id_access_policies_projects_potential_grantees_get( +pub async fn access_policies_get_project_people_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< - models::PotentialGranteeResponseModelListResponseModel, - Error, + models::ProjectPeopleAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/organizations/{id}/access-policies/projects/potential-grantees", + "{}/projects/{id}/access-policies/people", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -194,12 +193,12 @@ pub async fn organizations_id_access_policies_projects_potential_grantees_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PotentialGranteeResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PotentialGranteeResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -209,18 +208,18 @@ pub async fn organizations_id_access_policies_projects_potential_grantees_get( } } -pub async fn organizations_id_access_policies_service_accounts_potential_grantees_get( +pub async fn access_policies_get_project_potential_grantees( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< models::PotentialGranteeResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/organizations/{id}/access-policies/service-accounts/potential-grantees", + "{}/organizations/{id}/access-policies/projects/potential-grantees", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -253,7 +252,7 @@ pub async fn organizations_id_access_policies_service_accounts_potential_grantee } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -263,18 +262,18 @@ pub async fn organizations_id_access_policies_service_accounts_potential_grantee } } -pub async fn projects_id_access_policies_people_get( +pub async fn access_policies_get_project_service_accounts_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< - models::ProjectPeopleAccessPoliciesResponseModel, - Error, + models::ProjectServiceAccountsAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/projects/{id}/access-policies/people", + "{}/projects/{id}/access-policies/service-accounts", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -302,12 +301,12 @@ pub async fn projects_id_access_policies_people_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -317,24 +316,22 @@ pub async fn projects_id_access_policies_people_get( } } -pub async fn projects_id_access_policies_people_put( +pub async fn access_policies_get_secret_access_policies( configuration: &configuration::Configuration, - id: uuid::Uuid, - people_access_policies_request_model: Option, + secret_id: uuid::Uuid, ) -> Result< - models::ProjectPeopleAccessPoliciesResponseModel, - Error, + models::SecretAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_people_access_policies_request_model = people_access_policies_request_model; + let p_secret_id = secret_id; let uri_str = format!( - "{}/projects/{id}/access-policies/people", + "{}/secrets/{secretId}/access-policies", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + secretId = crate::apis::urlencode(p_secret_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -342,7 +339,6 @@ pub async fn projects_id_access_policies_people_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_people_access_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -359,12 +355,12 @@ pub async fn projects_id_access_policies_people_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -374,18 +370,18 @@ pub async fn projects_id_access_policies_people_put( } } -pub async fn projects_id_access_policies_service_accounts_get( +pub async fn access_policies_get_service_account_granted_policies( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< - models::ProjectServiceAccountsAccessPoliciesResponseModel, - Error, + models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/projects/{id}/access-policies/service-accounts", + "{}/service-accounts/{id}/granted-policies", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -413,12 +409,12 @@ pub async fn projects_id_access_policies_service_accounts_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -428,27 +424,22 @@ pub async fn projects_id_access_policies_service_accounts_get( } } -pub async fn projects_id_access_policies_service_accounts_put( +pub async fn access_policies_get_service_account_people_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, - project_service_accounts_access_policies_request_model: Option< - models::ProjectServiceAccountsAccessPoliciesRequestModel, - >, ) -> Result< - models::ProjectServiceAccountsAccessPoliciesResponseModel, - Error, + models::ServiceAccountPeopleAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_project_service_accounts_access_policies_request_model = - project_service_accounts_access_policies_request_model; let uri_str = format!( - "{}/projects/{id}/access-policies/service-accounts", + "{}/service-accounts/{id}/access-policies/people", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -456,7 +447,6 @@ pub async fn projects_id_access_policies_service_accounts_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_project_service_accounts_access_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -473,12 +463,12 @@ pub async fn projects_id_access_policies_service_accounts_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -488,18 +478,20 @@ pub async fn projects_id_access_policies_service_accounts_put( } } -pub async fn secrets_secret_id_access_policies_get( +pub async fn access_policies_get_service_accounts_potential_grantees( configuration: &configuration::Configuration, - secret_id: uuid::Uuid, -) -> Result> -{ + id: uuid::Uuid, +) -> Result< + models::PotentialGranteeResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_id = secret_id; + let p_id = id; let uri_str = format!( - "{}/secrets/{secretId}/access-policies", + "{}/organizations/{id}/access-policies/service-accounts/potential-grantees", configuration.base_path, - secretId = crate::apis::urlencode(p_secret_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -525,12 +517,12 @@ pub async fn secrets_secret_id_access_policies_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PotentialGranteeResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PotentialGranteeResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -540,22 +532,24 @@ pub async fn secrets_secret_id_access_policies_get( } } -pub async fn service_accounts_id_access_policies_people_get( +pub async fn access_policies_put_project_people_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, + people_access_policies_request_model: Option, ) -> Result< - models::ServiceAccountPeopleAccessPoliciesResponseModel, - Error, + models::ProjectPeopleAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_people_access_policies_request_model = people_access_policies_request_model; let uri_str = format!( - "{}/service-accounts/{id}/access-policies/people", + "{}/projects/{id}/access-policies/people", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -563,6 +557,7 @@ pub async fn service_accounts_id_access_policies_people_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_people_access_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -579,12 +574,12 @@ pub async fn service_accounts_id_access_policies_people_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectPeopleAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -594,20 +589,23 @@ pub async fn service_accounts_id_access_policies_people_get( } } -pub async fn service_accounts_id_access_policies_people_put( +pub async fn access_policies_put_project_service_accounts_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, - people_access_policies_request_model: Option, + project_service_accounts_access_policies_request_model: Option< + models::ProjectServiceAccountsAccessPoliciesRequestModel, + >, ) -> Result< - models::ServiceAccountPeopleAccessPoliciesResponseModel, - Error, + models::ProjectServiceAccountsAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_people_access_policies_request_model = people_access_policies_request_model; + let p_project_service_accounts_access_policies_request_model = + project_service_accounts_access_policies_request_model; let uri_str = format!( - "{}/service-accounts/{id}/access-policies/people", + "{}/projects/{id}/access-policies/service-accounts", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -619,7 +617,7 @@ pub async fn service_accounts_id_access_policies_people_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_people_access_policies_request_model); + req_builder = req_builder.json(&p_project_service_accounts_access_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -636,12 +634,12 @@ pub async fn service_accounts_id_access_policies_people_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectServiceAccountsAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -651,22 +649,27 @@ pub async fn service_accounts_id_access_policies_people_put( } } -pub async fn service_accounts_id_granted_policies_get( +pub async fn access_policies_put_service_account_granted_policies( configuration: &configuration::Configuration, id: uuid::Uuid, + service_account_granted_policies_request_model: Option< + models::ServiceAccountGrantedPoliciesRequestModel, + >, ) -> Result< models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_service_account_granted_policies_request_model = + service_account_granted_policies_request_model; let uri_str = format!( "{}/service-accounts/{id}/granted-policies", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -674,6 +677,7 @@ pub async fn service_accounts_id_granted_policies_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_service_account_granted_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -695,7 +699,7 @@ pub async fn service_accounts_id_granted_policies_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -705,23 +709,20 @@ pub async fn service_accounts_id_granted_policies_get( } } -pub async fn service_accounts_id_granted_policies_put( +pub async fn access_policies_put_service_account_people_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, - service_account_granted_policies_request_model: Option< - models::ServiceAccountGrantedPoliciesRequestModel, - >, + people_access_policies_request_model: Option, ) -> Result< - models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel, - Error, + models::ServiceAccountPeopleAccessPoliciesResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_service_account_granted_policies_request_model = - service_account_granted_policies_request_model; + let p_people_access_policies_request_model = people_access_policies_request_model; let uri_str = format!( - "{}/service-accounts/{id}/granted-policies", + "{}/service-accounts/{id}/access-policies/people", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -733,7 +734,7 @@ pub async fn service_accounts_id_granted_policies_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_service_account_granted_policies_request_model); + req_builder = req_builder.json(&p_people_access_policies_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -750,12 +751,12 @@ pub async fn service_accounts_id_granted_policies_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountPeopleAccessPoliciesResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/account_billing_v_next_api.rs b/crates/bitwarden-api-api/src/apis/account_billing_v_next_api.rs index 6e6cdee82..0f03812f0 100644 --- a/crates/bitwarden-api-api/src/apis/account_billing_v_next_api.rs +++ b/crates/bitwarden-api-api/src/apis/account_billing_v_next_api.rs @@ -14,35 +14,42 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`account_billing_vnext_credit_bitpay_post`] +/// struct for typed errors of method [`account_billing_v_next_add_credit_via_bit_pay`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountBillingVnextCreditBitpayPostError { +pub enum AccountBillingVNextAddCreditViaBitPayError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`account_billing_vnext_credit_get`] +/// struct for typed errors of method [`account_billing_v_next_create_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountBillingVnextCreditGetError { +pub enum AccountBillingVNextCreateSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`account_billing_vnext_payment_method_get`] +/// struct for typed errors of method [`account_billing_v_next_get_credit`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountBillingVnextPaymentMethodGetError { +pub enum AccountBillingVNextGetCreditError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`account_billing_vnext_payment_method_put`] +/// struct for typed errors of method [`account_billing_v_next_get_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountBillingVnextPaymentMethodPutError { +pub enum AccountBillingVNextGetPaymentMethodError { UnknownValue(serde_json::Value), } -pub async fn account_billing_vnext_credit_bitpay_post( +/// struct for typed errors of method [`account_billing_v_next_update_payment_method`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AccountBillingVNextUpdatePaymentMethodError { + UnknownValue(serde_json::Value), +} + +pub async fn account_billing_v_next_add_credit_via_bit_pay( configuration: &configuration::Configuration, email: &str, security_stamp: &str, @@ -88,7 +95,7 @@ pub async fn account_billing_vnext_credit_bitpay_post( last_email_change_date: Option, verify_devices: Option, bit_pay_credit_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_email = email; let p_security_stamp = security_stamp; @@ -284,7 +291,261 @@ pub async fn account_billing_vnext_credit_bitpay_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn account_billing_v_next_create_subscription( + configuration: &configuration::Configuration, + email: &str, + security_stamp: &str, + api_key: &str, + id: Option, + name: Option<&str>, + email_verified: Option, + master_password: Option<&str>, + master_password_hint: Option<&str>, + culture: Option<&str>, + two_factor_providers: Option<&str>, + two_factor_recovery_code: Option<&str>, + equivalent_domains: Option<&str>, + excluded_global_equivalent_domains: Option<&str>, + account_revision_date: Option, + key: Option<&str>, + public_key: Option<&str>, + private_key: Option<&str>, + premium: Option, + premium_expiration_date: Option, + renewal_reminder_date: Option, + storage: Option, + max_storage_gb: Option, + gateway: Option, + gateway_customer_id: Option<&str>, + gateway_subscription_id: Option<&str>, + reference_data: Option<&str>, + license_key: Option<&str>, + kdf: Option, + kdf_iterations: Option, + kdf_memory: Option, + kdf_parallelism: Option, + creation_date: Option, + revision_date: Option, + force_password_reset: Option, + uses_key_connector: Option, + failed_login_count: Option, + last_failed_login_date: Option, + avatar_color: Option<&str>, + last_password_change_date: Option, + last_kdf_change_date: Option, + last_key_rotation_date: Option, + last_email_change_date: Option, + verify_devices: Option, + premium_cloud_hosted_subscription_request: Option< + models::PremiumCloudHostedSubscriptionRequest, + >, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_email = email; + let p_security_stamp = security_stamp; + let p_api_key = api_key; + let p_id = id; + let p_name = name; + let p_email_verified = email_verified; + let p_master_password = master_password; + let p_master_password_hint = master_password_hint; + let p_culture = culture; + let p_two_factor_providers = two_factor_providers; + let p_two_factor_recovery_code = two_factor_recovery_code; + let p_equivalent_domains = equivalent_domains; + let p_excluded_global_equivalent_domains = excluded_global_equivalent_domains; + let p_account_revision_date = account_revision_date; + let p_key = key; + let p_public_key = public_key; + let p_private_key = private_key; + let p_premium = premium; + let p_premium_expiration_date = premium_expiration_date; + let p_renewal_reminder_date = renewal_reminder_date; + let p_storage = storage; + let p_max_storage_gb = max_storage_gb; + let p_gateway = gateway; + let p_gateway_customer_id = gateway_customer_id; + let p_gateway_subscription_id = gateway_subscription_id; + let p_reference_data = reference_data; + let p_license_key = license_key; + let p_kdf = kdf; + let p_kdf_iterations = kdf_iterations; + let p_kdf_memory = kdf_memory; + let p_kdf_parallelism = kdf_parallelism; + let p_creation_date = creation_date; + let p_revision_date = revision_date; + let p_force_password_reset = force_password_reset; + let p_uses_key_connector = uses_key_connector; + let p_failed_login_count = failed_login_count; + let p_last_failed_login_date = last_failed_login_date; + let p_avatar_color = avatar_color; + let p_last_password_change_date = last_password_change_date; + let p_last_kdf_change_date = last_kdf_change_date; + let p_last_key_rotation_date = last_key_rotation_date; + let p_last_email_change_date = last_email_change_date; + let p_verify_devices = verify_devices; + let p_premium_cloud_hosted_subscription_request = premium_cloud_hosted_subscription_request; + + let uri_str = format!( + "{}/account/billing/vnext/subscription", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_id { + req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("email", &p_email.to_string())]); + if let Some(ref param_value) = p_email_verified { + req_builder = req_builder.query(&[("emailVerified", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_master_password { + req_builder = req_builder.query(&[("masterPassword", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_master_password_hint { + req_builder = req_builder.query(&[("masterPasswordHint", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_culture { + req_builder = req_builder.query(&[("culture", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("securityStamp", &p_security_stamp.to_string())]); + if let Some(ref param_value) = p_two_factor_providers { + req_builder = req_builder.query(&[("twoFactorProviders", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_two_factor_recovery_code { + req_builder = req_builder.query(&[("twoFactorRecoveryCode", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_equivalent_domains { + req_builder = req_builder.query(&[("equivalentDomains", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_excluded_global_equivalent_domains { + req_builder = + req_builder.query(&[("excludedGlobalEquivalentDomains", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_account_revision_date { + req_builder = req_builder.query(&[("accountRevisionDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_key { + req_builder = req_builder.query(&[("key", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_public_key { + req_builder = req_builder.query(&[("publicKey", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_private_key { + req_builder = req_builder.query(&[("privateKey", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_premium { + req_builder = req_builder.query(&[("premium", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_premium_expiration_date { + req_builder = req_builder.query(&[("premiumExpirationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_renewal_reminder_date { + req_builder = req_builder.query(&[("renewalReminderDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_storage { + req_builder = req_builder.query(&[("storage", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_max_storage_gb { + req_builder = req_builder.query(&[("maxStorageGb", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway { + req_builder = req_builder.query(&[("gateway", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway_customer_id { + req_builder = req_builder.query(&[("gatewayCustomerId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway_subscription_id { + req_builder = req_builder.query(&[("gatewaySubscriptionId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_reference_data { + req_builder = req_builder.query(&[("referenceData", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_license_key { + req_builder = req_builder.query(&[("licenseKey", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("apiKey", &p_api_key.to_string())]); + if let Some(ref param_value) = p_kdf { + req_builder = req_builder.query(&[("kdf", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_iterations { + req_builder = req_builder.query(&[("kdfIterations", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_memory { + req_builder = req_builder.query(&[("kdfMemory", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_parallelism { + req_builder = req_builder.query(&[("kdfParallelism", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_creation_date { + req_builder = req_builder.query(&[("creationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_revision_date { + req_builder = req_builder.query(&[("revisionDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_force_password_reset { + req_builder = req_builder.query(&[("forcePasswordReset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_uses_key_connector { + req_builder = req_builder.query(&[("usesKeyConnector", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_failed_login_count { + req_builder = req_builder.query(&[("failedLoginCount", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_failed_login_date { + req_builder = req_builder.query(&[("lastFailedLoginDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_avatar_color { + req_builder = req_builder.query(&[("avatarColor", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_password_change_date { + req_builder = req_builder.query(&[("lastPasswordChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_kdf_change_date { + req_builder = req_builder.query(&[("lastKdfChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_key_rotation_date { + req_builder = req_builder.query(&[("lastKeyRotationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_email_change_date { + req_builder = req_builder.query(&[("lastEmailChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_verify_devices { + req_builder = req_builder.query(&[("verifyDevices", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_premium_cloud_hosted_subscription_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -294,7 +555,7 @@ pub async fn account_billing_vnext_credit_bitpay_post( } } -pub async fn account_billing_vnext_credit_get( +pub async fn account_billing_v_next_get_credit( configuration: &configuration::Configuration, email: &str, security_stamp: &str, @@ -339,7 +600,7 @@ pub async fn account_billing_vnext_credit_get( last_key_rotation_date: Option, last_email_change_date: Option, verify_devices: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_email = email; let p_security_stamp = security_stamp; @@ -528,7 +789,7 @@ pub async fn account_billing_vnext_credit_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -537,7 +798,7 @@ pub async fn account_billing_vnext_credit_get( } } -pub async fn account_billing_vnext_payment_method_get( +pub async fn account_billing_v_next_get_payment_method( configuration: &configuration::Configuration, email: &str, security_stamp: &str, @@ -582,7 +843,7 @@ pub async fn account_billing_vnext_payment_method_get( last_key_rotation_date: Option, last_email_change_date: Option, verify_devices: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_email = email; let p_security_stamp = security_stamp; @@ -774,7 +1035,7 @@ pub async fn account_billing_vnext_payment_method_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -784,7 +1045,7 @@ pub async fn account_billing_vnext_payment_method_get( } } -pub async fn account_billing_vnext_payment_method_put( +pub async fn account_billing_v_next_update_payment_method( configuration: &configuration::Configuration, email: &str, security_stamp: &str, @@ -830,7 +1091,7 @@ pub async fn account_billing_vnext_payment_method_put( last_email_change_date: Option, verify_devices: Option, tokenized_payment_method_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_email = email; let p_security_stamp = security_stamp; @@ -1024,7 +1285,7 @@ pub async fn account_billing_vnext_payment_method_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/accounts_api.rs b/crates/bitwarden-api-api/src/apis/accounts_api.rs index a27033a2a..921cf2d03 100644 --- a/crates/bitwarden-api-api/src/apis/accounts_api.rs +++ b/crates/bitwarden-api-api/src/apis/accounts_api.rs @@ -14,311 +14,311 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`accounts_api_key_post`] +/// struct for typed errors of method [`accounts_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsApiKeyPostError { +pub enum AccountsApiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_avatar_post`] +/// struct for typed errors of method [`accounts_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsAvatarPostError { +pub enum AccountsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_avatar_put`] +/// struct for typed errors of method [`accounts_delete_sso_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsAvatarPutError { +pub enum AccountsDeleteSsoUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_cancel_post`] +/// struct for typed errors of method [`accounts_get_account_revision_date`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsCancelPostError { +pub enum AccountsGetAccountRevisionDateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_delete`] +/// struct for typed errors of method [`accounts_get_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsDeleteError { +pub enum AccountsGetKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_delete_post`] +/// struct for typed errors of method [`accounts_get_organizations`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsDeletePostError { +pub enum AccountsGetOrganizationsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_delete_recover_post`] +/// struct for typed errors of method [`accounts_get_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsDeleteRecoverPostError { +pub enum AccountsGetProfileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_delete_recover_token_post`] +/// struct for typed errors of method [`accounts_get_sso_user_identifier`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsDeleteRecoverTokenPostError { +pub enum AccountsGetSsoUserIdentifierError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_email_post`] +/// struct for typed errors of method [`accounts_get_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsEmailPostError { +pub enum AccountsGetSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_email_token_post`] +/// struct for typed errors of method [`accounts_get_tax_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsEmailTokenPostError { +pub enum AccountsGetTaxInfoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_kdf_post`] +/// struct for typed errors of method [`accounts_post_avatar`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsKdfPostError { +pub enum AccountsPostAvatarError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_keys_get`] +/// struct for typed errors of method [`accounts_post_cancel`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsKeysGetError { +pub enum AccountsPostCancelError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_keys_post`] +/// struct for typed errors of method [`accounts_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsKeysPostError { +pub enum AccountsPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_license_post`] +/// struct for typed errors of method [`accounts_post_delete_recover`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsLicensePostError { +pub enum AccountsPostDeleteRecoverError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_organizations_get`] +/// struct for typed errors of method [`accounts_post_delete_recover_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsOrganizationsGetError { +pub enum AccountsPostDeleteRecoverTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_password_hint_post`] +/// struct for typed errors of method [`accounts_post_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsPasswordHintPostError { +pub enum AccountsPostEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_password_post`] +/// struct for typed errors of method [`accounts_post_email_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsPasswordPostError { +pub enum AccountsPostEmailTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_payment_post`] +/// struct for typed errors of method [`accounts_post_kdf`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsPaymentPostError { +pub enum AccountsPostKdfError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_premium_post`] +/// struct for typed errors of method [`accounts_post_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsPremiumPostError { +pub enum AccountsPostKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_profile_get`] +/// struct for typed errors of method [`accounts_post_license`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsProfileGetError { +pub enum AccountsPostLicenseError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_profile_post`] +/// struct for typed errors of method [`accounts_post_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsProfilePostError { +pub enum AccountsPostPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_profile_put`] +/// struct for typed errors of method [`accounts_post_password_hint`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsProfilePutError { +pub enum AccountsPostPasswordHintError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_reinstate_premium_post`] +/// struct for typed errors of method [`accounts_post_payment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsReinstatePremiumPostError { +pub enum AccountsPostPaymentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_request_otp_post`] +/// struct for typed errors of method [`accounts_post_premium`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRequestOtpPostError { +pub enum AccountsPostPremiumError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_resend_new_device_otp_post`] +/// struct for typed errors of method [`accounts_post_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsResendNewDeviceOtpPostError { +pub enum AccountsPostProfileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_revision_date_get`] +/// struct for typed errors of method [`accounts_post_reinstate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRevisionDateGetError { +pub enum AccountsPostReinstateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_rotate_api_key_post`] +/// struct for typed errors of method [`accounts_post_request_otp`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRotateApiKeyPostError { +pub enum AccountsPostRequestOtpError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_security_stamp_post`] +/// struct for typed errors of method [`accounts_post_security_stamp`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSecurityStampPostError { +pub enum AccountsPostSecurityStampError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_set_password_post`] +/// struct for typed errors of method [`accounts_post_set_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSetPasswordPostError { +pub enum AccountsPostSetPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_sso_organization_id_delete`] +/// struct for typed errors of method [`accounts_post_set_user_verify_devices`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSsoOrganizationIdDeleteError { +pub enum AccountsPostSetUserVerifyDevicesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_sso_user_identifier_get`] +/// struct for typed errors of method [`accounts_post_storage`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSsoUserIdentifierGetError { +pub enum AccountsPostStorageError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_storage_post`] +/// struct for typed errors of method [`accounts_post_verify_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsStoragePostError { +pub enum AccountsPostVerifyEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_subscription_get`] +/// struct for typed errors of method [`accounts_post_verify_email_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSubscriptionGetError { +pub enum AccountsPostVerifyEmailTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_tax_get`] +/// struct for typed errors of method [`accounts_post_verify_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsTaxGetError { +pub enum AccountsPostVerifyPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_tax_put`] +/// struct for typed errors of method [`accounts_put_avatar`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsTaxPutError { +pub enum AccountsPutAvatarError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_update_tde_offboarding_password_put`] +/// struct for typed errors of method [`accounts_put_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsUpdateTdeOffboardingPasswordPutError { +pub enum AccountsPutProfileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_update_temp_password_put`] +/// struct for typed errors of method [`accounts_put_tax_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsUpdateTempPasswordPutError { +pub enum AccountsPutTaxInfoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_devices_post`] +/// struct for typed errors of method [`accounts_put_update_tde_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyDevicesPostError { +pub enum AccountsPutUpdateTdePasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_devices_put`] +/// struct for typed errors of method [`accounts_put_update_temp_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyDevicesPutError { +pub enum AccountsPutUpdateTempPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_email_post`] +/// struct for typed errors of method [`accounts_resend_new_device_otp`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyEmailPostError { +pub enum AccountsResendNewDeviceOtpError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_email_token_post`] +/// struct for typed errors of method [`accounts_rotate_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyEmailTokenPostError { +pub enum AccountsRotateApiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_otp_post`] +/// struct for typed errors of method [`accounts_set_user_verify_devices`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyOtpPostError { +pub enum AccountsSetUserVerifyDevicesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_verify_password_post`] +/// struct for typed errors of method [`accounts_verify_otp`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsVerifyPasswordPostError { +pub enum AccountsVerifyOtpError { UnknownValue(serde_json::Value), } -pub async fn accounts_api_key_post( +pub async fn accounts_api_key( configuration: &configuration::Configuration, secret_verification_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_secret_verification_request_model = secret_verification_request_model; @@ -355,7 +355,7 @@ pub async fn accounts_api_key_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -364,17 +364,17 @@ pub async fn accounts_api_key_post( } } -pub async fn accounts_avatar_post( +pub async fn accounts_delete( configuration: &configuration::Configuration, - update_avatar_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_avatar_request_model = update_avatar_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/accounts/avatar", configuration.base_path); + let uri_str = format!("{}/accounts", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -382,29 +382,18 @@ pub async fn accounts_avatar_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_avatar_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -413,15 +402,21 @@ pub async fn accounts_avatar_post( } } -pub async fn accounts_avatar_put( +pub async fn accounts_delete_sso_user( configuration: &configuration::Configuration, - update_avatar_request_model: Option, -) -> Result> { + organization_id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_avatar_request_model = update_avatar_request_model; + let p_organization_id = organization_id; - let uri_str = format!("{}/accounts/avatar", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!( + "{}/accounts/sso/{organizationId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -429,29 +424,17 @@ pub async fn accounts_avatar_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_avatar_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -460,17 +443,11 @@ pub async fn accounts_avatar_put( } } -pub async fn accounts_cancel_post( +pub async fn accounts_get_account_revision_date( configuration: &configuration::Configuration, - subscription_cancellation_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_subscription_cancellation_request_model = subscription_cancellation_request_model; - - let uri_str = format!("{}/accounts/cancel", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/revision-date", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -478,18 +455,29 @@ pub async fn accounts_cancel_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_subscription_cancellation_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `i64`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `i64`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -498,17 +486,11 @@ pub async fn accounts_cancel_post( } } -pub async fn accounts_delete( +pub async fn accounts_get_keys( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; - - let uri_str = format!("{}/accounts", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -516,18 +498,28 @@ pub async fn accounts_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KeysResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KeysResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -536,17 +528,14 @@ pub async fn accounts_delete( } } -pub async fn accounts_delete_post( +pub async fn accounts_get_organizations( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; - - let uri_str = format!("{}/accounts/delete", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result< + models::ProfileOrganizationResponseModelListResponseModel, + Error, +> { + let uri_str = format!("{}/accounts/organizations", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -554,18 +543,28 @@ pub async fn accounts_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -574,17 +573,11 @@ pub async fn accounts_delete_post( } } -pub async fn accounts_delete_recover_post( +pub async fn accounts_get_profile( configuration: &configuration::Configuration, - delete_recover_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_delete_recover_request_model = delete_recover_request_model; - - let uri_str = format!("{}/accounts/delete-recover", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/profile", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -592,18 +585,28 @@ pub async fn accounts_delete_recover_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -612,17 +615,11 @@ pub async fn accounts_delete_recover_post( } } -pub async fn accounts_delete_recover_token_post( +pub async fn accounts_get_sso_user_identifier( configuration: &configuration::Configuration, - verify_delete_recover_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_verify_delete_recover_request_model = verify_delete_recover_request_model; - - let uri_str = format!("{}/accounts/delete-recover-token", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/sso/user-identifier", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -630,19 +627,28 @@ pub async fn accounts_delete_recover_token_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Ok(content), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -651,17 +657,11 @@ pub async fn accounts_delete_recover_token_post( } } -pub async fn accounts_email_post( +pub async fn accounts_get_subscription( configuration: &configuration::Configuration, - email_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_email_request_model = email_request_model; - - let uri_str = format!("{}/accounts/email", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/subscription", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -669,18 +669,28 @@ pub async fn accounts_email_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SubscriptionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SubscriptionResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -689,17 +699,11 @@ pub async fn accounts_email_post( } } -pub async fn accounts_email_token_post( +pub async fn accounts_get_tax_info( configuration: &configuration::Configuration, - email_token_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_email_token_request_model = email_token_request_model; - - let uri_str = format!("{}/accounts/email-token", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/accounts/tax", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -707,18 +711,28 @@ pub async fn accounts_email_token_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_email_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaxInfoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaxInfoResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -727,14 +741,14 @@ pub async fn accounts_email_token_post( } } -pub async fn accounts_kdf_post( +pub async fn accounts_post_avatar( configuration: &configuration::Configuration, - kdf_request_model: Option, -) -> Result<(), Error> { + update_avatar_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_kdf_request_model = kdf_request_model; + let p_update_avatar_request_model = update_avatar_request_model; - let uri_str = format!("{}/accounts/kdf", configuration.base_path); + let uri_str = format!("{}/accounts/avatar", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -745,18 +759,29 @@ pub async fn accounts_kdf_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_kdf_request_model); + req_builder = req_builder.json(&p_update_avatar_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -765,11 +790,17 @@ pub async fn accounts_kdf_post( } } -pub async fn accounts_keys_get( +pub async fn accounts_post_cancel( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/keys", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + subscription_cancellation_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_subscription_cancellation_request_model = subscription_cancellation_request_model; + + let uri_str = format!("{}/accounts/cancel", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -777,28 +808,18 @@ pub async fn accounts_keys_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_subscription_cancellation_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KeysResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KeysResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -807,14 +828,14 @@ pub async fn accounts_keys_get( } } -pub async fn accounts_keys_post( +pub async fn accounts_post_delete( configuration: &configuration::Configuration, - keys_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_keys_request_model = keys_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/accounts/keys", configuration.base_path); + let uri_str = format!("{}/accounts/delete", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -825,29 +846,18 @@ pub async fn accounts_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_keys_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KeysResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KeysResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -856,14 +866,14 @@ pub async fn accounts_keys_post( } } -pub async fn accounts_license_post( +pub async fn accounts_post_delete_recover( configuration: &configuration::Configuration, - license: std::path::PathBuf, -) -> Result<(), Error> { + delete_recover_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_license = license; + let p_delete_recover_request_model = delete_recover_request_model; - let uri_str = format!("{}/accounts/license", configuration.base_path); + let uri_str = format!("{}/accounts/delete-recover", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -874,9 +884,7 @@ pub async fn accounts_license_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - let mut multipart_form = reqwest::multipart::Form::new(); - // TODO: support file upload for 'license' parameter - req_builder = req_builder.multipart(multipart_form); + req_builder = req_builder.json(&p_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -887,7 +895,7 @@ pub async fn accounts_license_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -896,14 +904,17 @@ pub async fn accounts_license_post( } } -pub async fn accounts_organizations_get( +pub async fn accounts_post_delete_recover_token( configuration: &configuration::Configuration, -) -> Result< - models::ProfileOrganizationResponseModelListResponseModel, - Error, -> { - let uri_str = format!("{}/accounts/organizations", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + verify_delete_recover_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_verify_delete_recover_request_model = verify_delete_recover_request_model; + + let uri_str = format!("{}/accounts/delete-recover-token", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -911,28 +922,19 @@ pub async fn accounts_organizations_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -941,14 +943,14 @@ pub async fn accounts_organizations_get( } } -pub async fn accounts_password_hint_post( +pub async fn accounts_post_email( configuration: &configuration::Configuration, - password_hint_request_model: Option, -) -> Result<(), Error> { + email_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_password_hint_request_model = password_hint_request_model; + let p_email_request_model = email_request_model; - let uri_str = format!("{}/accounts/password-hint", configuration.base_path); + let uri_str = format!("{}/accounts/email", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -959,7 +961,7 @@ pub async fn accounts_password_hint_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_password_hint_request_model); + req_builder = req_builder.json(&p_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -970,7 +972,7 @@ pub async fn accounts_password_hint_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -979,14 +981,14 @@ pub async fn accounts_password_hint_post( } } -pub async fn accounts_password_post( +pub async fn accounts_post_email_token( configuration: &configuration::Configuration, - password_request_model: Option, -) -> Result<(), Error> { + email_token_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_password_request_model = password_request_model; + let p_email_token_request_model = email_token_request_model; - let uri_str = format!("{}/accounts/password", configuration.base_path); + let uri_str = format!("{}/accounts/email-token", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -997,7 +999,7 @@ pub async fn accounts_password_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_password_request_model); + req_builder = req_builder.json(&p_email_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1008,7 +1010,7 @@ pub async fn accounts_password_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1017,14 +1019,14 @@ pub async fn accounts_password_post( } } -pub async fn accounts_payment_post( +pub async fn accounts_post_kdf( configuration: &configuration::Configuration, - payment_request_model: Option, -) -> Result<(), Error> { + kdf_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_payment_request_model = payment_request_model; + let p_kdf_request_model = kdf_request_model; - let uri_str = format!("{}/accounts/payment", configuration.base_path); + let uri_str = format!("{}/accounts/kdf", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1035,7 +1037,7 @@ pub async fn accounts_payment_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_payment_request_model); + req_builder = req_builder.json(&p_kdf_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1046,7 +1048,7 @@ pub async fn accounts_payment_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1055,50 +1057,25 @@ pub async fn accounts_payment_post( } } -pub async fn accounts_premium_post( +pub async fn accounts_post_keys( configuration: &configuration::Configuration, - payment_method_type: models::PaymentMethodType, - payment_token: Option<&str>, - additional_storage_gb: Option, - country: Option<&str>, - postal_code: Option<&str>, - license: Option, -) -> Result> { + keys_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_payment_method_type = payment_method_type; - let p_payment_token = payment_token; - let p_additional_storage_gb = additional_storage_gb; - let p_country = country; - let p_postal_code = postal_code; - let p_license = license; + let p_keys_request_model = keys_request_model; - let uri_str = format!("{}/accounts/premium", configuration.base_path); + let uri_str = format!("{}/accounts/keys", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - req_builder = req_builder.query(&[("paymentMethodType", &p_payment_method_type.to_string())]); - if let Some(ref param_value) = p_payment_token { - req_builder = req_builder.query(&[("paymentToken", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_additional_storage_gb { - req_builder = req_builder.query(&[("additionalStorageGb", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_country { - req_builder = req_builder.query(&[("country", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_postal_code { - req_builder = req_builder.query(&[("postalCode", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - let mut multipart_form = reqwest::multipart::Form::new(); - // TODO: support file upload for 'license' parameter - req_builder = req_builder.multipart(multipart_form); + req_builder = req_builder.json(&p_keys_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1115,12 +1092,12 @@ pub async fn accounts_premium_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KeysResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KeysResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1129,11 +1106,17 @@ pub async fn accounts_premium_post( } } -pub async fn accounts_profile_get( +pub async fn accounts_post_license( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/profile", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + license: std::path::PathBuf, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_license = license; + + let uri_str = format!("{}/accounts/license", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1141,28 +1124,20 @@ pub async fn accounts_profile_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + let mut multipart_form = reqwest::multipart::Form::new(); + // TODO: support file upload for 'license' parameter + req_builder = req_builder.multipart(multipart_form); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1171,14 +1146,14 @@ pub async fn accounts_profile_get( } } -pub async fn accounts_profile_post( +pub async fn accounts_post_password( configuration: &configuration::Configuration, - update_profile_request_model: Option, -) -> Result> { + password_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_profile_request_model = update_profile_request_model; + let p_password_request_model = password_request_model; - let uri_str = format!("{}/accounts/profile", configuration.base_path); + let uri_str = format!("{}/accounts/password", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1189,29 +1164,18 @@ pub async fn accounts_profile_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_profile_request_model); + req_builder = req_builder.json(&p_password_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1220,15 +1184,17 @@ pub async fn accounts_profile_post( } } -pub async fn accounts_profile_put( +pub async fn accounts_post_password_hint( configuration: &configuration::Configuration, - update_profile_request_model: Option, -) -> Result> { + password_hint_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_profile_request_model = update_profile_request_model; + let p_password_hint_request_model = password_hint_request_model; - let uri_str = format!("{}/accounts/profile", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/accounts/password-hint", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1236,29 +1202,18 @@ pub async fn accounts_profile_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_profile_request_model); + req_builder = req_builder.json(&p_password_hint_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1267,10 +1222,14 @@ pub async fn accounts_profile_put( } } -pub async fn accounts_reinstate_premium_post( +pub async fn accounts_post_payment( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/accounts/reinstate-premium", configuration.base_path); + payment_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_payment_request_model = payment_request_model; + + let uri_str = format!("{}/accounts/payment", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1281,6 +1240,7 @@ pub async fn accounts_reinstate_premium_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_payment_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1291,7 +1251,7 @@ pub async fn accounts_reinstate_premium_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1300,31 +1260,72 @@ pub async fn accounts_reinstate_premium_post( } } -pub async fn accounts_request_otp_post( +pub async fn accounts_post_premium( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/accounts/request-otp", configuration.base_path); + payment_method_type: models::PaymentMethodType, + payment_token: Option<&str>, + additional_storage_gb: Option, + country: Option<&str>, + postal_code: Option<&str>, + license: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_payment_method_type = payment_method_type; + let p_payment_token = payment_token; + let p_additional_storage_gb = additional_storage_gb; + let p_country = country; + let p_postal_code = postal_code; + let p_license = license; + + let uri_str = format!("{}/accounts/premium", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + req_builder = req_builder.query(&[("paymentMethodType", &p_payment_method_type.to_string())]); + if let Some(ref param_value) = p_payment_token { + req_builder = req_builder.query(&[("paymentToken", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_additional_storage_gb { + req_builder = req_builder.query(&[("additionalStorageGb", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_country { + req_builder = req_builder.query(&[("country", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_postal_code { + req_builder = req_builder.query(&[("postalCode", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + let mut multipart_form = reqwest::multipart::Form::new(); + // TODO: support file upload for 'license' parameter + req_builder = req_builder.multipart(multipart_form); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1333,17 +1334,14 @@ pub async fn accounts_request_otp_post( } } -pub async fn accounts_resend_new_device_otp_post( +pub async fn accounts_post_profile( configuration: &configuration::Configuration, - unauthenticated_secret_verification_request_model: Option< - models::UnauthenticatedSecretVerificationRequestModel, - >, -) -> Result<(), Error> { + update_profile_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_unauthenticated_secret_verification_request_model = - unauthenticated_secret_verification_request_model; + let p_update_profile_request_model = update_profile_request_model; - let uri_str = format!("{}/accounts/resend-new-device-otp", configuration.base_path); + let uri_str = format!("{}/accounts/profile", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1354,19 +1352,29 @@ pub async fn accounts_resend_new_device_otp_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_unauthenticated_secret_verification_request_model); + req_builder = req_builder.json(&p_update_profile_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1375,11 +1383,13 @@ pub async fn accounts_resend_new_device_otp_post( } } -pub async fn accounts_revision_date_get( +pub async fn accounts_post_reinstate( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/revision-date", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); +) -> Result<(), Error> { + let uri_str = format!("{}/accounts/reinstate-premium", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1392,23 +1402,12 @@ pub async fn accounts_revision_date_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `i64`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `i64`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1417,14 +1416,10 @@ pub async fn accounts_revision_date_get( } } -pub async fn accounts_rotate_api_key_post( +pub async fn accounts_post_request_otp( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; - - let uri_str = format!("{}/accounts/rotate-api-key", configuration.base_path); +) -> Result<(), Error> { + let uri_str = format!("{}/accounts/request-otp", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1435,29 +1430,17 @@ pub async fn accounts_rotate_api_key_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1466,10 +1449,10 @@ pub async fn accounts_rotate_api_key_post( } } -pub async fn accounts_security_stamp_post( +pub async fn accounts_post_security_stamp( configuration: &configuration::Configuration, secret_verification_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_secret_verification_request_model = secret_verification_request_model; @@ -1495,7 +1478,7 @@ pub async fn accounts_security_stamp_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1504,10 +1487,10 @@ pub async fn accounts_security_stamp_post( } } -pub async fn accounts_set_password_post( +pub async fn accounts_post_set_password( configuration: &configuration::Configuration, set_password_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_set_password_request_model = set_password_request_model; @@ -1533,7 +1516,7 @@ pub async fn accounts_set_password_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1542,21 +1525,17 @@ pub async fn accounts_set_password_post( } } -pub async fn accounts_sso_organization_id_delete( +pub async fn accounts_post_set_user_verify_devices( configuration: &configuration::Configuration, - organization_id: &str, -) -> Result<(), Error> { + set_verify_devices_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; + let p_set_verify_devices_request_model = set_verify_devices_request_model; - let uri_str = format!( - "{}/accounts/sso/{organizationId}", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id) - ); + let uri_str = format!("{}/accounts/verify-devices", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1564,6 +1543,7 @@ pub async fn accounts_sso_organization_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_set_verify_devices_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1574,7 +1554,7 @@ pub async fn accounts_sso_organization_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1584,11 +1564,17 @@ pub async fn accounts_sso_organization_id_delete( } } -pub async fn accounts_sso_user_identifier_get( +pub async fn accounts_post_storage( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/sso/user-identifier", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + storage_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_storage_request_model = storage_request_model; + + let uri_str = format!("{}/accounts/storage", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1596,6 +1582,7 @@ pub async fn accounts_sso_user_identifier_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_storage_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1612,12 +1599,12 @@ pub async fn accounts_sso_user_identifier_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Ok(content), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1626,14 +1613,10 @@ pub async fn accounts_sso_user_identifier_get( } } -pub async fn accounts_storage_post( +pub async fn accounts_post_verify_email( configuration: &configuration::Configuration, - storage_request_model: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_storage_request_model = storage_request_model; - - let uri_str = format!("{}/accounts/storage", configuration.base_path); +) -> Result<(), Error> { + let uri_str = format!("{}/accounts/verify-email", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1644,29 +1627,17 @@ pub async fn accounts_storage_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_storage_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1675,11 +1646,17 @@ pub async fn accounts_storage_post( } } -pub async fn accounts_subscription_get( +pub async fn accounts_post_verify_email_token( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/subscription", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + verify_email_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_verify_email_request_model = verify_email_request_model; + + let uri_str = format!("{}/accounts/verify-email-token", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1687,28 +1664,18 @@ pub async fn accounts_subscription_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_verify_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SubscriptionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SubscriptionResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1717,11 +1684,17 @@ pub async fn accounts_subscription_get( } } -pub async fn accounts_tax_get( +pub async fn accounts_post_verify_password( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/accounts/tax", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + secret_verification_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_secret_verification_request_model = secret_verification_request_model; + + let uri_str = format!("{}/accounts/verify-password", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1729,6 +1702,7 @@ pub async fn accounts_tax_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1745,12 +1719,12 @@ pub async fn accounts_tax_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaxInfoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaxInfoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MasterPasswordPolicyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MasterPasswordPolicyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1759,14 +1733,14 @@ pub async fn accounts_tax_get( } } -pub async fn accounts_tax_put( +pub async fn accounts_put_avatar( configuration: &configuration::Configuration, - tax_info_update_request_model: Option, -) -> Result<(), Error> { + update_avatar_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_tax_info_update_request_model = tax_info_update_request_model; + let p_update_avatar_request_model = update_avatar_request_model; - let uri_str = format!("{}/accounts/tax", configuration.base_path); + let uri_str = format!("{}/accounts/avatar", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1775,18 +1749,29 @@ pub async fn accounts_tax_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_tax_info_update_request_model); + req_builder = req_builder.json(&p_update_avatar_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1795,20 +1780,14 @@ pub async fn accounts_tax_put( } } -pub async fn accounts_update_tde_offboarding_password_put( +pub async fn accounts_put_profile( configuration: &configuration::Configuration, - update_tde_offboarding_password_request_model: Option< - models::UpdateTdeOffboardingPasswordRequestModel, - >, -) -> Result<(), Error> { + update_profile_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_tde_offboarding_password_request_model = - update_tde_offboarding_password_request_model; + let p_update_profile_request_model = update_profile_request_model; - let uri_str = format!( - "{}/accounts/update-tde-offboarding-password", - configuration.base_path - ); + let uri_str = format!("{}/accounts/profile", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1817,19 +1796,29 @@ pub async fn accounts_update_tde_offboarding_password_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_tde_offboarding_password_request_model); + req_builder = req_builder.json(&p_update_profile_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1838,14 +1827,14 @@ pub async fn accounts_update_tde_offboarding_password_put( } } -pub async fn accounts_update_temp_password_put( +pub async fn accounts_put_tax_info( configuration: &configuration::Configuration, - update_temp_password_request_model: Option, -) -> Result<(), Error> { + tax_info_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_temp_password_request_model = update_temp_password_request_model; + let p_tax_info_update_request_model = tax_info_update_request_model; - let uri_str = format!("{}/accounts/update-temp-password", configuration.base_path); + let uri_str = format!("{}/accounts/tax", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1854,7 +1843,7 @@ pub async fn accounts_update_temp_password_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_temp_password_request_model); + req_builder = req_builder.json(&p_tax_info_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1865,8 +1854,7 @@ pub async fn accounts_update_temp_password_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1875,17 +1863,21 @@ pub async fn accounts_update_temp_password_put( } } -pub async fn accounts_verify_devices_post( +pub async fn accounts_put_update_tde_password( configuration: &configuration::Configuration, - set_verify_devices_request_model: Option, -) -> Result<(), Error> { + update_tde_offboarding_password_request_model: Option< + models::UpdateTdeOffboardingPasswordRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_set_verify_devices_request_model = set_verify_devices_request_model; + let p_update_tde_offboarding_password_request_model = + update_tde_offboarding_password_request_model; - let uri_str = format!("{}/accounts/verify-devices", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/accounts/update-tde-offboarding-password", + configuration.base_path + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1893,7 +1885,7 @@ pub async fn accounts_verify_devices_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_set_verify_devices_request_model); + req_builder = req_builder.json(&p_update_tde_offboarding_password_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1904,7 +1896,7 @@ pub async fn accounts_verify_devices_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1913,14 +1905,14 @@ pub async fn accounts_verify_devices_post( } } -pub async fn accounts_verify_devices_put( +pub async fn accounts_put_update_temp_password( configuration: &configuration::Configuration, - set_verify_devices_request_model: Option, -) -> Result<(), Error> { + update_temp_password_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_set_verify_devices_request_model = set_verify_devices_request_model; + let p_update_temp_password_request_model = update_temp_password_request_model; - let uri_str = format!("{}/accounts/verify-devices", configuration.base_path); + let uri_str = format!("{}/accounts/update-temp-password", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1929,7 +1921,7 @@ pub async fn accounts_verify_devices_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_set_verify_devices_request_model); + req_builder = req_builder.json(&p_update_temp_password_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1940,7 +1932,8 @@ pub async fn accounts_verify_devices_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1949,10 +1942,17 @@ pub async fn accounts_verify_devices_put( } } -pub async fn accounts_verify_email_post( +pub async fn accounts_resend_new_device_otp( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/accounts/verify-email", configuration.base_path); + unauthenticated_secret_verification_request_model: Option< + models::UnauthenticatedSecretVerificationRequestModel, + >, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_unauthenticated_secret_verification_request_model = + unauthenticated_secret_verification_request_model; + + let uri_str = format!("{}/accounts/resend-new-device-otp", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1963,6 +1963,7 @@ pub async fn accounts_verify_email_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_unauthenticated_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1973,7 +1974,7 @@ pub async fn accounts_verify_email_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1982,14 +1983,14 @@ pub async fn accounts_verify_email_post( } } -pub async fn accounts_verify_email_token_post( +pub async fn accounts_rotate_api_key( configuration: &configuration::Configuration, - verify_email_request_model: Option, -) -> Result<(), Error> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_verify_email_request_model = verify_email_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/accounts/verify-email-token", configuration.base_path); + let uri_str = format!("{}/accounts/rotate-api-key", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -2000,18 +2001,29 @@ pub async fn accounts_verify_email_token_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_email_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2020,17 +2032,15 @@ pub async fn accounts_verify_email_token_post( } } -pub async fn accounts_verify_otp_post( +pub async fn accounts_set_user_verify_devices( configuration: &configuration::Configuration, - verify_otp_request_model: Option, -) -> Result<(), Error> { + set_verify_devices_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_verify_otp_request_model = verify_otp_request_model; + let p_set_verify_devices_request_model = set_verify_devices_request_model; - let uri_str = format!("{}/accounts/verify-otp", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/accounts/verify-devices", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2038,7 +2048,7 @@ pub async fn accounts_verify_otp_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_otp_request_model); + req_builder = req_builder.json(&p_set_verify_devices_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2049,7 +2059,7 @@ pub async fn accounts_verify_otp_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2058,14 +2068,14 @@ pub async fn accounts_verify_otp_post( } } -pub async fn accounts_verify_password_post( +pub async fn accounts_verify_otp( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + verify_otp_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_verify_otp_request_model = verify_otp_request_model; - let uri_str = format!("{}/accounts/verify-password", configuration.base_path); + let uri_str = format!("{}/accounts/verify-otp", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -2076,29 +2086,18 @@ pub async fn accounts_verify_password_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_verify_otp_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MasterPasswordPolicyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MasterPasswordPolicyResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/accounts_billing_api.rs b/crates/bitwarden-api-api/src/apis/accounts_billing_api.rs index 8e6eb0a73..6c589e0a2 100644 --- a/crates/bitwarden-api-api/src/apis/accounts_billing_api.rs +++ b/crates/bitwarden-api-api/src/apis/accounts_billing_api.rs @@ -14,44 +14,44 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`accounts_billing_history_get`] +/// struct for typed errors of method [`accounts_billing_get_billing_history`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsBillingHistoryGetError { +pub enum AccountsBillingGetBillingHistoryError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_billing_invoices_get`] +/// struct for typed errors of method [`accounts_billing_get_invoices`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsBillingInvoicesGetError { +pub enum AccountsBillingGetInvoicesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_billing_payment_method_get`] +/// struct for typed errors of method [`accounts_billing_get_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsBillingPaymentMethodGetError { +pub enum AccountsBillingGetPaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_billing_preview_invoice_post`] +/// struct for typed errors of method [`accounts_billing_get_transactions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsBillingPreviewInvoicePostError { +pub enum AccountsBillingGetTransactionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_billing_transactions_get`] +/// struct for typed errors of method [`accounts_billing_preview_invoice`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsBillingTransactionsGetError { +pub enum AccountsBillingPreviewInvoiceError { UnknownValue(serde_json::Value), } -pub async fn accounts_billing_history_get( +pub async fn accounts_billing_get_billing_history( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/accounts/billing/history", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -82,7 +82,8 @@ pub async fn accounts_billing_history_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -91,11 +92,11 @@ pub async fn accounts_billing_history_get( } } -pub async fn accounts_billing_invoices_get( +pub async fn accounts_billing_get_invoices( configuration: &configuration::Configuration, status: Option<&str>, start_after: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_status = status; let p_start_after = start_after; @@ -125,7 +126,7 @@ pub async fn accounts_billing_invoices_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -134,9 +135,9 @@ pub async fn accounts_billing_invoices_get( } } -pub async fn accounts_billing_payment_method_get( +pub async fn accounts_billing_get_payment_method( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!( "{}/accounts/billing/payment-method", configuration.base_path @@ -170,7 +171,7 @@ pub async fn accounts_billing_payment_method_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -180,28 +181,25 @@ pub async fn accounts_billing_payment_method_get( } } -pub async fn accounts_billing_preview_invoice_post( +pub async fn accounts_billing_get_transactions( configuration: &configuration::Configuration, - preview_individual_invoice_request_body: Option, -) -> Result<(), Error> { + start_after: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_preview_individual_invoice_request_body = preview_individual_invoice_request_body; + let p_start_after = start_after; - let uri_str = format!( - "{}/accounts/billing/preview-invoice", - configuration.base_path - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/accounts/billing/transactions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_start_after { + req_builder = req_builder.query(&[("startAfter", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_preview_individual_invoice_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -212,7 +210,7 @@ pub async fn accounts_billing_preview_invoice_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -222,25 +220,28 @@ pub async fn accounts_billing_preview_invoice_post( } } -pub async fn accounts_billing_transactions_get( +pub async fn accounts_billing_preview_invoice( configuration: &configuration::Configuration, - start_after: Option, -) -> Result<(), Error> { + preview_individual_invoice_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_start_after = start_after; + let p_preview_individual_invoice_request_body = preview_individual_invoice_request_body; - let uri_str = format!("{}/accounts/billing/transactions", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!( + "{}/accounts/billing/preview-invoice", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_start_after { - req_builder = req_builder.query(&[("startAfter", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_preview_individual_invoice_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -251,7 +252,7 @@ pub async fn accounts_billing_transactions_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs b/crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs index 6dc9f9ed8..7434dd3e8 100644 --- a/crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs +++ b/crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs @@ -14,37 +14,37 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`accounts_convert_to_key_connector_post`] +/// struct for typed errors of method [`accounts_key_management_post_convert_to_key_connector`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsConvertToKeyConnectorPostError { +pub enum AccountsKeyManagementPostConvertToKeyConnectorError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_key_management_regenerate_keys_post`] +/// struct for typed errors of method [`accounts_key_management_post_set_key_connector_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsKeyManagementRegenerateKeysPostError { +pub enum AccountsKeyManagementPostSetKeyConnectorKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_key_management_rotate_user_account_keys_post`] +/// struct for typed errors of method [`accounts_key_management_regenerate_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsKeyManagementRotateUserAccountKeysPostError { +pub enum AccountsKeyManagementRegenerateKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_set_key_connector_key_post`] +/// struct for typed errors of method [`accounts_key_management_rotate_user_account_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsSetKeyConnectorKeyPostError { +pub enum AccountsKeyManagementRotateUserAccountKeysError { UnknownValue(serde_json::Value), } -pub async fn accounts_convert_to_key_connector_post( +pub async fn accounts_key_management_post_convert_to_key_connector( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!( "{}/accounts/convert-to-key-connector", configuration.base_path @@ -69,7 +69,7 @@ pub async fn accounts_convert_to_key_connector_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -79,17 +79,14 @@ pub async fn accounts_convert_to_key_connector_post( } } -pub async fn accounts_key_management_regenerate_keys_post( +pub async fn accounts_key_management_post_set_key_connector_key( configuration: &configuration::Configuration, - key_regeneration_request_model: Option, -) -> Result<(), Error> { + set_key_connector_key_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_key_regeneration_request_model = key_regeneration_request_model; + let p_set_key_connector_key_request_model = set_key_connector_key_request_model; - let uri_str = format!( - "{}/accounts/key-management/regenerate-keys", - configuration.base_path - ); + let uri_str = format!("{}/accounts/set-key-connector-key", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -100,7 +97,7 @@ pub async fn accounts_key_management_regenerate_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_key_regeneration_request_model); + req_builder = req_builder.json(&p_set_key_connector_key_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -111,7 +108,7 @@ pub async fn accounts_key_management_regenerate_keys_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -121,18 +118,15 @@ pub async fn accounts_key_management_regenerate_keys_post( } } -pub async fn accounts_key_management_rotate_user_account_keys_post( +pub async fn accounts_key_management_regenerate_keys( configuration: &configuration::Configuration, - rotate_user_account_keys_and_data_request_model: Option< - models::RotateUserAccountKeysAndDataRequestModel, - >, -) -> Result<(), Error> { + key_regeneration_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_rotate_user_account_keys_and_data_request_model = - rotate_user_account_keys_and_data_request_model; + let p_key_regeneration_request_model = key_regeneration_request_model; let uri_str = format!( - "{}/accounts/key-management/rotate-user-account-keys", + "{}/accounts/key-management/regenerate-keys", configuration.base_path ); let mut req_builder = configuration @@ -145,7 +139,7 @@ pub async fn accounts_key_management_rotate_user_account_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_rotate_user_account_keys_and_data_request_model); + req_builder = req_builder.json(&p_key_regeneration_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -156,7 +150,7 @@ pub async fn accounts_key_management_rotate_user_account_keys_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -166,14 +160,20 @@ pub async fn accounts_key_management_rotate_user_account_keys_post( } } -pub async fn accounts_set_key_connector_key_post( +pub async fn accounts_key_management_rotate_user_account_keys( configuration: &configuration::Configuration, - set_key_connector_key_request_model: Option, -) -> Result<(), Error> { + rotate_user_account_keys_and_data_request_model: Option< + models::RotateUserAccountKeysAndDataRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_set_key_connector_key_request_model = set_key_connector_key_request_model; + let p_rotate_user_account_keys_and_data_request_model = + rotate_user_account_keys_and_data_request_model; - let uri_str = format!("{}/accounts/set-key-connector-key", configuration.base_path); + let uri_str = format!( + "{}/accounts/key-management/rotate-user-account-keys", + configuration.base_path + ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -184,7 +184,7 @@ pub async fn accounts_set_key_connector_key_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_set_key_connector_key_request_model); + req_builder = req_builder.json(&p_rotate_user_account_keys_and_data_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -195,7 +195,7 @@ pub async fn accounts_set_key_connector_key_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/auth_requests_api.rs b/crates/bitwarden-api-api/src/apis/auth_requests_api.rs index 7e74ea84c..3adec9e26 100644 --- a/crates/bitwarden-api-api/src/apis/auth_requests_api.rs +++ b/crates/bitwarden-api-api/src/apis/auth_requests_api.rs @@ -14,66 +14,68 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`auth_requests_admin_request_post`] +/// struct for typed errors of method [`auth_requests_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsAdminRequestPostError { +pub enum AuthRequestsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_get`] +/// struct for typed errors of method [`auth_requests_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsGetError { +pub enum AuthRequestsGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_id_get`] +/// struct for typed errors of method [`auth_requests_get_pending_auth_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsIdGetError { +pub enum AuthRequestsGetPendingAuthRequestsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_id_put`] +/// struct for typed errors of method [`auth_requests_get_response`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsIdPutError { +pub enum AuthRequestsGetResponseError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_id_response_get`] +/// struct for typed errors of method [`auth_requests_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsIdResponseGetError { +pub enum AuthRequestsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_pending_get`] +/// struct for typed errors of method [`auth_requests_post_admin_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsPendingGetError { +pub enum AuthRequestsPostAdminRequestError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`auth_requests_post`] +/// struct for typed errors of method [`auth_requests_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AuthRequestsPostError { +pub enum AuthRequestsPutError { UnknownValue(serde_json::Value), } -pub async fn auth_requests_admin_request_post( +pub async fn auth_requests_get( configuration: &configuration::Configuration, - auth_request_create_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_auth_request_create_request_model = auth_request_create_request_model; + let p_id = id; - let uri_str = format!("{}/auth-requests/admin-request", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/auth-requests/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -81,7 +83,6 @@ pub async fn auth_requests_admin_request_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_auth_request_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -103,7 +104,7 @@ pub async fn auth_requests_admin_request_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -112,9 +113,9 @@ pub async fn auth_requests_admin_request_post( } } -pub async fn auth_requests_get( +pub async fn auth_requests_get_all( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/auth-requests", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -145,7 +146,7 @@ pub async fn auth_requests_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -154,18 +155,13 @@ pub async fn auth_requests_get( } } -pub async fn auth_requests_id_get( +pub async fn auth_requests_get_pending_auth_requests( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/auth-requests/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); +) -> Result< + models::PendingAuthRequestResponseModelListResponseModel, + Error, +> { + let uri_str = format!("{}/auth-requests/pending", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -190,12 +186,13 @@ pub async fn auth_requests_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -204,29 +201,31 @@ pub async fn auth_requests_id_get( } } -pub async fn auth_requests_id_put( +pub async fn auth_requests_get_response( configuration: &configuration::Configuration, id: uuid::Uuid, - auth_request_update_request_model: Option, -) -> Result> { + code: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_auth_request_update_request_model = auth_request_update_request_model; + let p_code = code; let uri_str = format!( - "{}/auth-requests/{id}", + "{}/auth-requests/{id}/response", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_code { + req_builder = req_builder.query(&[("code", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_auth_request_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -248,7 +247,7 @@ pub async fn auth_requests_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -257,31 +256,25 @@ pub async fn auth_requests_id_put( } } -pub async fn auth_requests_id_response_get( +pub async fn auth_requests_post( configuration: &configuration::Configuration, - id: uuid::Uuid, - code: Option<&str>, -) -> Result> { + auth_request_create_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_code = code; + let p_auth_request_create_request_model = auth_request_create_request_model; - let uri_str = format!( - "{}/auth-requests/{id}/response", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/auth-requests", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_code { - req_builder = req_builder.query(&[("code", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_auth_request_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -303,7 +296,7 @@ pub async fn auth_requests_id_response_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -312,14 +305,17 @@ pub async fn auth_requests_id_response_get( } } -pub async fn auth_requests_pending_get( +pub async fn auth_requests_post_admin_request( configuration: &configuration::Configuration, -) -> Result< - models::PendingAuthRequestResponseModelListResponseModel, - Error, -> { - let uri_str = format!("{}/auth-requests/pending", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + auth_request_create_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_auth_request_create_request_model = auth_request_create_request_model; + + let uri_str = format!("{}/auth-requests/admin-request", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -327,6 +323,7 @@ pub async fn auth_requests_pending_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_auth_request_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -343,12 +340,12 @@ pub async fn auth_requests_pending_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PendingAuthRequestResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AuthRequestResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AuthRequestResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -357,17 +354,21 @@ pub async fn auth_requests_pending_get( } } -pub async fn auth_requests_post( +pub async fn auth_requests_put( configuration: &configuration::Configuration, - auth_request_create_request_model: Option, -) -> Result> { + id: uuid::Uuid, + auth_request_update_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_auth_request_create_request_model = auth_request_create_request_model; + let p_id = id; + let p_auth_request_update_request_model = auth_request_update_request_model; - let uri_str = format!("{}/auth-requests", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/auth-requests/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -375,7 +376,7 @@ pub async fn auth_requests_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_auth_request_create_request_model); + req_builder = req_builder.json(&p_auth_request_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -397,7 +398,7 @@ pub async fn auth_requests_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/ciphers_api.rs b/crates/bitwarden-api-api/src/apis/ciphers_api.rs index e1adfeea9..5b3ba071a 100644 --- a/crates/bitwarden-api-api/src/apis/ciphers_api.rs +++ b/crates/bitwarden-api-api/src/apis/ciphers_api.rs @@ -14,458 +14,457 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`ciphers_admin_delete`] +/// struct for typed errors of method [`ciphers_azure_validate_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersAdminDeleteError { +pub enum CiphersAzureValidateFileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_admin_post`] +/// struct for typed errors of method [`ciphers_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersAdminPostError { +pub enum CiphersDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_archive_put`] +/// struct for typed errors of method [`ciphers_delete_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersArchivePutError { +pub enum CiphersDeleteAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_attachment_validate_azure_post`] +/// struct for typed errors of method [`ciphers_delete_attachment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersAttachmentValidateAzurePostError { +pub enum CiphersDeleteAttachmentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_bulk_collections_post`] +/// struct for typed errors of method [`ciphers_delete_attachment_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersBulkCollectionsPostError { +pub enum CiphersDeleteAttachmentAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_create_post`] +/// struct for typed errors of method [`ciphers_delete_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersCreatePostError { +pub enum CiphersDeleteManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_delete`] +/// struct for typed errors of method [`ciphers_delete_many_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersDeleteError { +pub enum CiphersDeleteManyAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_delete_admin_post`] +/// struct for typed errors of method [`ciphers_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersDeleteAdminPostError { +pub enum CiphersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_delete_admin_put`] +/// struct for typed errors of method [`ciphers_get_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersDeleteAdminPutError { +pub enum CiphersGetAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_delete_post`] +/// struct for typed errors of method [`ciphers_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersDeletePostError { +pub enum CiphersGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_delete_put`] +/// struct for typed errors of method [`ciphers_get_assigned_organization_ciphers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersDeletePutError { +pub enum CiphersGetAssignedOrganizationCiphersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_get`] +/// struct for typed errors of method [`ciphers_get_attachment_data`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersGetError { +pub enum CiphersGetAttachmentDataError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_admin_delete`] +/// struct for typed errors of method [`ciphers_get_attachment_data_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAdminDeleteError { +pub enum CiphersGetAttachmentDataAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_admin_get`] +/// struct for typed errors of method [`ciphers_get_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAdminGetError { +pub enum CiphersGetDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_admin_post`] +/// struct for typed errors of method [`ciphers_get_full_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAdminPostError { +pub enum CiphersGetFullDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_admin_put`] +/// struct for typed errors of method [`ciphers_get_organization_ciphers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAdminPutError { +pub enum CiphersGetOrganizationCiphersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_archive_put`] +/// struct for typed errors of method [`ciphers_move_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdArchivePutError { +pub enum CiphersMoveManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_admin_post`] +/// struct for typed errors of method [`ciphers_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAdminPostError { +pub enum CiphersPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_admin_delete`] +/// struct for typed errors of method [`ciphers_post_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdAdminDeleteError { +pub enum CiphersPostAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_admin_get`] +/// struct for typed errors of method [`ciphers_post_attachment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdAdminGetError { +pub enum CiphersPostAttachmentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_delete`] +/// struct for typed errors of method [`ciphers_post_attachment_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdDeleteError { +pub enum CiphersPostAttachmentAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_delete_admin_post`] +/// struct for typed errors of method [`ciphers_post_attachment_share`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdDeleteAdminPostError { +pub enum CiphersPostAttachmentShareError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_delete_post`] +/// struct for typed errors of method [`ciphers_post_attachment_v1`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdDeletePostError { +pub enum CiphersPostAttachmentV1Error { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_get`] +/// struct for typed errors of method [`ciphers_post_bulk_collections`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdGetError { +pub enum CiphersPostBulkCollectionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_post`] +/// struct for typed errors of method [`ciphers_post_collections`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdPostError { +pub enum CiphersPostCollectionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_renew_get`] +/// struct for typed errors of method [`ciphers_post_collections_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdRenewGetError { +pub enum CiphersPostCollectionsAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_attachment_id_share_post`] +/// struct for typed errors of method [`ciphers_post_collections_v_next`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentAttachmentIdSharePostError { +pub enum CiphersPostCollectionsVNextError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_post`] +/// struct for typed errors of method [`ciphers_post_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentPostError { +pub enum CiphersPostCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_attachment_v2_post`] +/// struct for typed errors of method [`ciphers_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdAttachmentV2PostError { +pub enum CiphersPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_admin_post`] +/// struct for typed errors of method [`ciphers_post_delete_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsAdminPostError { +pub enum CiphersPostDeleteAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_admin_put`] +/// struct for typed errors of method [`ciphers_post_delete_attachment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsAdminPutError { +pub enum CiphersPostDeleteAttachmentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_post`] +/// struct for typed errors of method [`ciphers_post_delete_attachment_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsPostError { +pub enum CiphersPostDeleteAttachmentAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_put`] +/// struct for typed errors of method [`ciphers_post_delete_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsPutError { +pub enum CiphersPostDeleteManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_v2_post`] +/// struct for typed errors of method [`ciphers_post_delete_many_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsV2PostError { +pub enum CiphersPostDeleteManyAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_collections_v2_put`] +/// struct for typed errors of method [`ciphers_post_file_for_existing_attachment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdCollectionsV2PutError { +pub enum CiphersPostFileForExistingAttachmentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_delete`] +/// struct for typed errors of method [`ciphers_post_move_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDeleteError { +pub enum CiphersPostMoveManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_delete_admin_post`] +/// struct for typed errors of method [`ciphers_post_partial`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDeleteAdminPostError { +pub enum CiphersPostPartialError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_delete_admin_put`] +/// struct for typed errors of method [`ciphers_post_purge`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDeleteAdminPutError { +pub enum CiphersPostPurgeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_delete_post`] +/// struct for typed errors of method [`ciphers_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDeletePostError { +pub enum CiphersPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_delete_put`] +/// struct for typed errors of method [`ciphers_post_put_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDeletePutError { +pub enum CiphersPostPutAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_details_get`] +/// struct for typed errors of method [`ciphers_post_share`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdDetailsGetError { +pub enum CiphersPostShareError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_full_details_get`] +/// struct for typed errors of method [`ciphers_post_share_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdFullDetailsGetError { +pub enum CiphersPostShareManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_get`] +/// struct for typed errors of method [`ciphers_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdGetError { +pub enum CiphersPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_partial_post`] +/// struct for typed errors of method [`ciphers_put_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdPartialPostError { +pub enum CiphersPutAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_partial_put`] +/// struct for typed errors of method [`ciphers_put_archive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdPartialPutError { +pub enum CiphersPutArchiveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_post`] +/// struct for typed errors of method [`ciphers_put_archive_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdPostError { +pub enum CiphersPutArchiveManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_put`] +/// struct for typed errors of method [`ciphers_put_collections`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdPutError { +pub enum CiphersPutCollectionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_restore_admin_put`] +/// struct for typed errors of method [`ciphers_put_collections_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdRestoreAdminPutError { +pub enum CiphersPutCollectionsAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_restore_put`] +/// struct for typed errors of method [`ciphers_put_collections_v_next`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdRestorePutError { +pub enum CiphersPutCollectionsVNextError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_share_post`] +/// struct for typed errors of method [`ciphers_put_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdSharePostError { +pub enum CiphersPutDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_share_put`] +/// struct for typed errors of method [`ciphers_put_delete_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdSharePutError { +pub enum CiphersPutDeleteAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_id_unarchive_put`] +/// struct for typed errors of method [`ciphers_put_delete_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdUnarchivePutError { +pub enum CiphersPutDeleteManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_move_post`] +/// struct for typed errors of method [`ciphers_put_delete_many_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersMovePostError { +pub enum CiphersPutDeleteManyAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_move_put`] +/// struct for typed errors of method [`ciphers_put_partial`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersMovePutError { +pub enum CiphersPutPartialError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_organization_details_assigned_get`] +/// struct for typed errors of method [`ciphers_put_restore`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersOrganizationDetailsAssignedGetError { +pub enum CiphersPutRestoreError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_organization_details_get`] +/// struct for typed errors of method [`ciphers_put_restore_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersOrganizationDetailsGetError { +pub enum CiphersPutRestoreAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_post`] +/// struct for typed errors of method [`ciphers_put_restore_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersPostError { +pub enum CiphersPutRestoreManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_purge_post`] +/// struct for typed errors of method [`ciphers_put_restore_many_admin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersPurgePostError { +pub enum CiphersPutRestoreManyAdminError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_restore_admin_put`] +/// struct for typed errors of method [`ciphers_put_share`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersRestoreAdminPutError { +pub enum CiphersPutShareError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_restore_put`] +/// struct for typed errors of method [`ciphers_put_share_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersRestorePutError { +pub enum CiphersPutShareManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_share_post`] +/// struct for typed errors of method [`ciphers_put_unarchive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersSharePostError { +pub enum CiphersPutUnarchiveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_share_put`] +/// struct for typed errors of method [`ciphers_put_unarchive_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersSharePutError { +pub enum CiphersPutUnarchiveManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_unarchive_put`] +/// struct for typed errors of method [`ciphers_renew_file_upload_url`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersUnarchivePutError { +pub enum CiphersRenewFileUploadUrlError { UnknownValue(serde_json::Value), } -pub async fn ciphers_admin_delete( +pub async fn ciphers_azure_validate_file( configuration: &configuration::Configuration, - cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - - let uri_str = format!("{}/ciphers/admin", configuration.base_path); +) -> Result<(), Error> { + let uri_str = format!( + "{}/ciphers/attachment/validate/azure", + configuration.base_path + ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -473,7 +472,6 @@ pub async fn ciphers_admin_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -484,7 +482,7 @@ pub async fn ciphers_admin_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -493,17 +491,21 @@ pub async fn ciphers_admin_delete( } } -pub async fn ciphers_admin_post( +pub async fn ciphers_delete( configuration: &configuration::Configuration, - cipher_create_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_create_request_model = cipher_create_request_model; + let p_id = id; - let uri_str = format!("{}/ciphers/admin", configuration.base_path); + let uri_str = format!( + "{}/ciphers/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -511,29 +513,17 @@ pub async fn ciphers_admin_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -542,63 +532,21 @@ pub async fn ciphers_admin_post( } } -pub async fn ciphers_archive_put( +pub async fn ciphers_delete_admin( configuration: &configuration::Configuration, - cipher_bulk_archive_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_archive_request_model = cipher_bulk_archive_request_model; - - let uri_str = format!("{}/ciphers/archive", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_cipher_bulk_archive_request_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} + let p_id = id; -pub async fn ciphers_attachment_validate_azure_post( - configuration: &configuration::Configuration, -) -> Result<(), Error> { let uri_str = format!( - "{}/ciphers/attachment/validate/azure", - configuration.base_path + "{}/ciphers/{id}/admin", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -616,8 +564,7 @@ pub async fn ciphers_attachment_validate_azure_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -626,20 +573,24 @@ pub async fn ciphers_attachment_validate_azure_post( } } -pub async fn ciphers_bulk_collections_post( +pub async fn ciphers_delete_attachment( configuration: &configuration::Configuration, - cipher_bulk_update_collections_request_model: Option< - models::CipherBulkUpdateCollectionsRequestModel, - >, -) -> Result<(), Error> { + id: uuid::Uuid, + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_update_collections_request_model = - cipher_bulk_update_collections_request_model; + let p_id = id; + let p_attachment_id = attachment_id; - let uri_str = format!("{}/ciphers/bulk-collections", configuration.base_path); + let uri_str = format!( + "{}/ciphers/{id}/attachment/{attachmentId}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) + ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -647,18 +598,28 @@ pub async fn ciphers_bulk_collections_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_update_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -667,17 +628,24 @@ pub async fn ciphers_bulk_collections_post( } } -pub async fn ciphers_create_post( +pub async fn ciphers_delete_attachment_admin( configuration: &configuration::Configuration, - cipher_create_request_model: Option, -) -> Result> { + id: uuid::Uuid, + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_create_request_model = cipher_create_request_model; + let p_id = id; + let p_attachment_id = attachment_id; - let uri_str = format!("{}/ciphers/create", configuration.base_path); + let uri_str = format!( + "{}/ciphers/{id}/attachment/{attachmentId}/admin", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) + ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -685,7 +653,6 @@ pub async fn ciphers_create_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -702,12 +669,12 @@ pub async fn ciphers_create_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -716,10 +683,10 @@ pub async fn ciphers_create_post( } } -pub async fn ciphers_delete( +pub async fn ciphers_delete_many( configuration: &configuration::Configuration, cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; @@ -745,7 +712,7 @@ pub async fn ciphers_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -754,17 +721,17 @@ pub async fn ciphers_delete( } } -pub async fn ciphers_delete_admin_post( +pub async fn ciphers_delete_many_admin( configuration: &configuration::Configuration, cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - let uri_str = format!("{}/ciphers/delete-admin", configuration.base_path); + let uri_str = format!("{}/ciphers/admin", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -783,7 +750,7 @@ pub async fn ciphers_delete_admin_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -792,15 +759,19 @@ pub async fn ciphers_delete_admin_post( } } -pub async fn ciphers_delete_admin_put( +pub async fn ciphers_get( configuration: &configuration::Configuration, - cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; + let p_id = id; - let uri_str = format!("{}/ciphers/delete-admin", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!( + "{}/ciphers/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -808,56 +779,28 @@ pub async fn ciphers_delete_admin_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn ciphers_delete_post( - configuration: &configuration::Configuration, - cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - - let uri_str = format!("{}/ciphers/delete", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -866,15 +809,19 @@ pub async fn ciphers_delete_post( } } -pub async fn ciphers_delete_put( +pub async fn ciphers_get_admin( configuration: &configuration::Configuration, - cipher_bulk_delete_request_model: Option, -) -> Result<(), Error> { + id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; + let p_id = id; - let uri_str = format!("{}/ciphers/delete", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!( + "{}/ciphers/{id}/admin", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -882,18 +829,28 @@ pub async fn ciphers_delete_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -902,9 +859,9 @@ pub async fn ciphers_delete_put( } } -pub async fn ciphers_get( +pub async fn ciphers_get_all( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/ciphers", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -935,7 +892,7 @@ pub async fn ciphers_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -944,22 +901,25 @@ pub async fn ciphers_get( } } -pub async fn ciphers_id_admin_delete( +pub async fn ciphers_get_assigned_organization_ciphers( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + organization_id: Option, +) -> Result< + models::CipherDetailsResponseModelListResponseModel, + Error, +> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; let uri_str = format!( - "{}/ciphers/{id}/admin", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + "{}/ciphers/organization-details/assigned", + configuration.base_path ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -971,12 +931,24 @@ pub async fn ciphers_id_admin_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -985,17 +957,20 @@ pub async fn ciphers_id_admin_delete( } } -pub async fn ciphers_id_admin_get( +pub async fn ciphers_get_attachment_data( configuration: &configuration::Configuration, - id: &str, -) -> Result> { + id: uuid::Uuid, + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/admin", + "{}/ciphers/{id}/attachment/{attachmentId}", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -1021,12 +996,12 @@ pub async fn ciphers_id_admin_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1035,23 +1010,22 @@ pub async fn ciphers_id_admin_get( } } -pub async fn ciphers_id_admin_post( +pub async fn ciphers_get_attachment_data_admin( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_request_model: Option, -) -> Result> { + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_request_model = cipher_request_model; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/admin", + "{}/ciphers/{id}/attachment/{attachmentId}/admin", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1059,7 +1033,6 @@ pub async fn ciphers_id_admin_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1076,12 +1049,13 @@ pub async fn ciphers_id_admin_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1090,21 +1064,19 @@ pub async fn ciphers_id_admin_post( } } -pub async fn ciphers_id_admin_put( +pub async fn ciphers_get_details( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}/admin", + "{}/ciphers/{id}/details", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1112,7 +1084,6 @@ pub async fn ciphers_id_admin_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1129,12 +1100,12 @@ pub async fn ciphers_id_admin_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1143,19 +1114,19 @@ pub async fn ciphers_id_admin_put( } } -pub async fn ciphers_id_archive_put( +pub async fn ciphers_get_full_details( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/ciphers/{id}/archive", + "{}/ciphers/{id}/full-details", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1179,12 +1150,12 @@ pub async fn ciphers_id_archive_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1193,22 +1164,22 @@ pub async fn ciphers_id_archive_put( } } -pub async fn ciphers_id_attachment_admin_post( +pub async fn ciphers_get_organization_ciphers( configuration: &configuration::Configuration, - id: &str, -) -> Result> { + organization_id: Option, +) -> Result< + models::CipherMiniDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_organization_id = organization_id; - let uri_str = format!( - "{}/ciphers/{id}/attachment-admin", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/ciphers/organization-details", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -1231,12 +1202,13 @@ pub async fn ciphers_id_attachment_admin_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1245,27 +1217,53 @@ pub async fn ciphers_id_attachment_admin_post( } } -pub async fn ciphers_id_attachment_attachment_id_admin_delete( +pub async fn ciphers_move_many( configuration: &configuration::Configuration, - id: uuid::Uuid, - attachment_id: &str, -) -> Result< - models::DeleteAttachmentResponseData, - Error, -> { + cipher_bulk_move_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_attachment_id = attachment_id; + let p_cipher_bulk_move_request_model = cipher_bulk_move_request_model; - let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/admin", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) - ); + let uri_str = format!("{}/ciphers/move", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_cipher_bulk_move_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn ciphers_post( + configuration: &configuration::Configuration, + cipher_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_cipher_request_model = cipher_request_model; + + let uri_str = format!("{}/ciphers", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1273,6 +1271,7 @@ pub async fn ciphers_id_attachment_attachment_id_admin_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1289,13 +1288,12 @@ pub async fn ciphers_id_attachment_attachment_id_admin_delete( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1304,22 +1302,17 @@ pub async fn ciphers_id_attachment_attachment_id_admin_delete( } } -pub async fn ciphers_id_attachment_attachment_id_admin_get( +pub async fn ciphers_post_admin( configuration: &configuration::Configuration, - id: uuid::Uuid, - attachment_id: &str, -) -> Result> { + cipher_create_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_attachment_id = attachment_id; + let p_cipher_create_request_model = cipher_create_request_model; - let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/admin", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/ciphers/admin", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1327,6 +1320,7 @@ pub async fn ciphers_id_attachment_attachment_id_admin_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1343,13 +1337,12 @@ pub async fn ciphers_id_attachment_attachment_id_admin_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1358,25 +1351,23 @@ pub async fn ciphers_id_attachment_attachment_id_admin_get( } } -pub async fn ciphers_id_attachment_attachment_id_delete( +pub async fn ciphers_post_attachment( configuration: &configuration::Configuration, id: uuid::Uuid, - attachment_id: &str, -) -> Result> -{ + attachment_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_attachment_id = attachment_id; + let p_attachment_request_model = attachment_request_model; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}", + "{}/ciphers/{id}/attachment/v2", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1384,6 +1375,7 @@ pub async fn ciphers_id_attachment_attachment_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_attachment_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1400,13 +1392,12 @@ pub async fn ciphers_id_attachment_attachment_id_delete( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1415,23 +1406,17 @@ pub async fn ciphers_id_attachment_attachment_id_delete( } } -pub async fn ciphers_id_attachment_attachment_id_delete_admin_post( +pub async fn ciphers_post_attachment_admin( configuration: &configuration::Configuration, - id: uuid::Uuid, - attachment_id: &str, -) -> Result< - models::DeleteAttachmentResponseData, - Error, -> { + id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/delete-admin", + "{}/ciphers/{id}/attachment-admin", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client @@ -1459,13 +1444,12 @@ pub async fn ciphers_id_attachment_attachment_id_delete_admin_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1474,28 +1458,30 @@ pub async fn ciphers_id_attachment_attachment_id_delete_admin_post( } } -pub async fn ciphers_id_attachment_attachment_id_delete_post( +pub async fn ciphers_post_attachment_share( configuration: &configuration::Configuration, - id: uuid::Uuid, + id: &str, attachment_id: &str, -) -> Result< - models::DeleteAttachmentResponseData, - Error, -> { + organization_id: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_attachment_id = attachment_id; + let p_organization_id = organization_id; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/delete", + "{}/ciphers/{id}/attachment/{attachmentId}/share", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), + id = crate::apis::urlencode(p_id), attachmentId = crate::apis::urlencode(p_attachment_id) ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -1507,24 +1493,12 @@ pub async fn ciphers_id_attachment_attachment_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1533,22 +1507,21 @@ pub async fn ciphers_id_attachment_attachment_id_delete_post( } } -pub async fn ciphers_id_attachment_attachment_id_get( +pub async fn ciphers_post_attachment_v1( configuration: &configuration::Configuration, id: uuid::Uuid, - attachment_id: &str, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}", + "{}/ciphers/{id}/attachment", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1572,13 +1545,12 @@ pub async fn ciphers_id_attachment_attachment_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1587,21 +1559,17 @@ pub async fn ciphers_id_attachment_attachment_id_get( } } -pub async fn ciphers_id_attachment_attachment_id_post( +pub async fn ciphers_post_bulk_collections( configuration: &configuration::Configuration, - id: uuid::Uuid, - attachment_id: &str, -) -> Result<(), Error> { + cipher_bulk_update_collections_request_model: Option< + models::CipherBulkUpdateCollectionsRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_attachment_id = attachment_id; + let p_cipher_bulk_update_collections_request_model = + cipher_bulk_update_collections_request_model; - let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) - ); + let uri_str = format!("{}/ciphers/bulk-collections", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1612,6 +1580,7 @@ pub async fn ciphers_id_attachment_attachment_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_bulk_update_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1622,8 +1591,7 @@ pub async fn ciphers_id_attachment_attachment_id_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1632,25 +1600,23 @@ pub async fn ciphers_id_attachment_attachment_id_post( } } -pub async fn ciphers_id_attachment_attachment_id_renew_get( +pub async fn ciphers_post_collections( configuration: &configuration::Configuration, id: uuid::Uuid, - attachment_id: &str, -) -> Result< - models::AttachmentUploadDataResponseModel, - Error, -> { + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_attachment_id = attachment_id; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/renew", + "{}/ciphers/{id}/collections", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1658,6 +1624,7 @@ pub async fn ciphers_id_attachment_attachment_id_renew_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1674,13 +1641,12 @@ pub async fn ciphers_id_attachment_attachment_id_renew_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1689,48 +1655,53 @@ pub async fn ciphers_id_attachment_attachment_id_renew_get( } } -pub async fn ciphers_id_attachment_attachment_id_share_post( +pub async fn ciphers_post_collections_admin( configuration: &configuration::Configuration, id: &str, - attachment_id: &str, - organization_id: Option, -) -> Result<(), Error> { + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_attachment_id = attachment_id; - let p_organization_id = organization_id; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/attachment/{attachmentId}/share", + "{}/ciphers/{id}/collections-admin", configuration.base_path, - id = crate::apis::urlencode(p_id), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1739,15 +1710,17 @@ pub async fn ciphers_id_attachment_attachment_id_share_post( } } -pub async fn ciphers_id_attachment_post( +pub async fn ciphers_post_collections_v_next( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/attachment", + "{}/ciphers/{id}/collections_v2", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -1761,6 +1734,7 @@ pub async fn ciphers_id_attachment_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1777,12 +1751,12 @@ pub async fn ciphers_id_attachment_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1791,20 +1765,14 @@ pub async fn ciphers_id_attachment_post( } } -pub async fn ciphers_id_attachment_v2_post( +pub async fn ciphers_post_create( configuration: &configuration::Configuration, - id: uuid::Uuid, - attachment_request_model: Option, -) -> Result> { + cipher_create_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_attachment_request_model = attachment_request_model; + let p_cipher_create_request_model = cipher_create_request_model; - let uri_str = format!( - "{}/ciphers/{id}/attachment/v2", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); + let uri_str = format!("{}/ciphers/create", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1815,7 +1783,7 @@ pub async fn ciphers_id_attachment_v2_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_attachment_request_model); + req_builder = req_builder.json(&p_cipher_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1832,12 +1800,12 @@ pub async fn ciphers_id_attachment_v2_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1846,19 +1814,17 @@ pub async fn ciphers_id_attachment_v2_post( } } -pub async fn ciphers_id_collections_admin_post( +pub async fn ciphers_post_delete( configuration: &configuration::Configuration, - id: &str, - cipher_collections_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/collections-admin", + "{}/ciphers/{id}/delete", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1870,30 +1836,17 @@ pub async fn ciphers_id_collections_admin_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1902,21 +1855,21 @@ pub async fn ciphers_id_collections_admin_post( } } -pub async fn ciphers_id_collections_admin_put( +pub async fn ciphers_post_delete_admin( configuration: &configuration::Configuration, - id: &str, - cipher_collections_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/collections-admin", + "{}/ciphers/{id}/delete-admin", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1924,29 +1877,17 @@ pub async fn ciphers_id_collections_admin_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1955,19 +1896,20 @@ pub async fn ciphers_id_collections_admin_put( } } -pub async fn ciphers_id_collections_post( +pub async fn ciphers_post_delete_attachment( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_collections_request_model: Option, -) -> Result> { + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/collections", + "{}/ciphers/{id}/attachment/{attachmentId}/delete", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); let mut req_builder = configuration .client @@ -1979,7 +1921,6 @@ pub async fn ciphers_id_collections_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1996,12 +1937,12 @@ pub async fn ciphers_id_collections_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2010,21 +1951,24 @@ pub async fn ciphers_id_collections_post( } } -pub async fn ciphers_id_collections_put( +pub async fn ciphers_post_delete_attachment_admin( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_collections_request_model: Option, -) -> Result> { + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}/collections", + "{}/ciphers/{id}/attachment/{attachmentId}/delete-admin", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2032,7 +1976,6 @@ pub async fn ciphers_id_collections_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2049,12 +1992,13 @@ pub async fn ciphers_id_collections_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeleteAttachmentResponseData`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeleteAttachmentResponseData`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2063,20 +2007,14 @@ pub async fn ciphers_id_collections_put( } } -pub async fn ciphers_id_collections_v2_post( +pub async fn ciphers_post_delete_many( configuration: &configuration::Configuration, - id: uuid::Uuid, - cipher_collections_request_model: Option, -) -> Result> { + cipher_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; + let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - let uri_str = format!( - "{}/ciphers/{id}/collections_v2", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); + let uri_str = format!("{}/ciphers/delete", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -2087,29 +2025,18 @@ pub async fn ciphers_id_collections_v2_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); + req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2118,21 +2045,17 @@ pub async fn ciphers_id_collections_v2_post( } } -pub async fn ciphers_id_collections_v2_put( +pub async fn ciphers_post_delete_many_admin( configuration: &configuration::Configuration, - id: uuid::Uuid, - cipher_collections_request_model: Option, -) -> Result> { + cipher_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_cipher_collections_request_model = cipher_collections_request_model; + let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - let uri_str = format!( - "{}/ciphers/{id}/collections_v2", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/ciphers/delete-admin", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2140,29 +2063,18 @@ pub async fn ciphers_id_collections_v2_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_collections_request_model); + req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2171,21 +2083,24 @@ pub async fn ciphers_id_collections_v2_put( } } -pub async fn ciphers_id_delete( +pub async fn ciphers_post_file_for_existing_attachment( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + attachment_id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/ciphers/{id}", + "{}/ciphers/{id}/attachment/{attachmentId}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2203,7 +2118,8 @@ pub async fn ciphers_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2212,18 +2128,14 @@ pub async fn ciphers_id_delete( } } -pub async fn ciphers_id_delete_admin_post( +pub async fn ciphers_post_move_many( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result<(), Error> { + cipher_bulk_move_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_cipher_bulk_move_request_model = cipher_bulk_move_request_model; - let uri_str = format!( - "{}/ciphers/{id}/delete-admin", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); + let uri_str = format!("{}/ciphers/move", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -2234,6 +2146,7 @@ pub async fn ciphers_id_delete_admin_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_bulk_move_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2244,7 +2157,7 @@ pub async fn ciphers_id_delete_admin_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2253,19 +2166,23 @@ pub async fn ciphers_id_delete_admin_post( } } -pub async fn ciphers_id_delete_admin_put( +pub async fn ciphers_post_partial( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + cipher_partial_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_partial_request_model = cipher_partial_request_model; let uri_str = format!( - "{}/ciphers/{id}/delete-admin", + "{}/ciphers/{id}/partial", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2273,17 +2190,29 @@ pub async fn ciphers_id_delete_admin_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_partial_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2292,28 +2221,30 @@ pub async fn ciphers_id_delete_admin_put( } } -pub async fn ciphers_id_delete_post( +pub async fn ciphers_post_purge( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_id: Option, + secret_verification_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_organization_id = organization_id; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!( - "{}/ciphers/{id}/delete", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); + let uri_str = format!("{}/ciphers/purge", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2324,7 +2255,7 @@ pub async fn ciphers_id_delete_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2333,19 +2264,23 @@ pub async fn ciphers_id_delete_post( } } -pub async fn ciphers_id_delete_put( +pub async fn ciphers_post_put( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + cipher_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}/delete", + "{}/ciphers/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2353,17 +2288,29 @@ pub async fn ciphers_id_delete_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2372,19 +2319,23 @@ pub async fn ciphers_id_delete_put( } } -pub async fn ciphers_id_details_get( +pub async fn ciphers_post_put_admin( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + cipher_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}/details", + "{}/ciphers/{id}/admin", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2392,6 +2343,7 @@ pub async fn ciphers_id_details_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2408,12 +2360,12 @@ pub async fn ciphers_id_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2422,19 +2374,23 @@ pub async fn ciphers_id_details_get( } } -pub async fn ciphers_id_full_details_get( +pub async fn ciphers_post_share( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + cipher_share_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_share_request_model = cipher_share_request_model; let uri_str = format!( - "{}/ciphers/{id}/full-details", + "{}/ciphers/{id}/share", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2442,6 +2398,7 @@ pub async fn ciphers_id_full_details_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_share_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2458,12 +2415,12 @@ pub async fn ciphers_id_full_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2472,19 +2429,17 @@ pub async fn ciphers_id_full_details_get( } } -pub async fn ciphers_id_get( +pub async fn ciphers_post_share_many( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { + cipher_bulk_share_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_cipher_bulk_share_request_model = cipher_bulk_share_request_model; - let uri_str = format!( - "{}/ciphers/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/ciphers/share", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2492,6 +2447,7 @@ pub async fn ciphers_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_bulk_share_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2508,12 +2464,12 @@ pub async fn ciphers_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2522,23 +2478,21 @@ pub async fn ciphers_id_get( } } -pub async fn ciphers_id_partial_post( +pub async fn ciphers_put( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_partial_request_model: Option, -) -> Result> { + cipher_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_partial_request_model = cipher_partial_request_model; + let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}/partial", + "{}/ciphers/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2546,7 +2500,7 @@ pub async fn ciphers_id_partial_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_partial_request_model); + req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2568,7 +2522,7 @@ pub async fn ciphers_id_partial_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2577,17 +2531,17 @@ pub async fn ciphers_id_partial_post( } } -pub async fn ciphers_id_partial_put( +pub async fn ciphers_put_admin( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_partial_request_model: Option, -) -> Result> { + cipher_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_partial_request_model = cipher_partial_request_model; + let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}/partial", + "{}/ciphers/{id}/admin", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -2599,7 +2553,7 @@ pub async fn ciphers_id_partial_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_partial_request_model); + req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2616,12 +2570,12 @@ pub async fn ciphers_id_partial_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2630,23 +2584,19 @@ pub async fn ciphers_id_partial_put( } } -pub async fn ciphers_id_post( +pub async fn ciphers_put_archive( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_request_model = cipher_request_model; let uri_str = format!( - "{}/ciphers/{id}", + "{}/ciphers/{id}/archive", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2654,7 +2604,6 @@ pub async fn ciphers_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2671,12 +2620,12 @@ pub async fn ciphers_id_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2685,20 +2634,14 @@ pub async fn ciphers_id_post( } } -pub async fn ciphers_id_put( +pub async fn ciphers_put_archive_many( configuration: &configuration::Configuration, - id: uuid::Uuid, - cipher_request_model: Option, -) -> Result> { + cipher_bulk_archive_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_cipher_request_model = cipher_request_model; + let p_cipher_bulk_archive_request_model = cipher_bulk_archive_request_model; - let uri_str = format!( - "{}/ciphers/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); + let uri_str = format!("{}/ciphers/archive", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -2707,7 +2650,7 @@ pub async fn ciphers_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_request_model); + req_builder = req_builder.json(&p_cipher_bulk_archive_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2724,12 +2667,12 @@ pub async fn ciphers_id_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2738,15 +2681,17 @@ pub async fn ciphers_id_put( } } -pub async fn ciphers_id_restore_admin_put( +pub async fn ciphers_put_collections( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/restore-admin", + "{}/ciphers/{id}/collections", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -2758,6 +2703,7 @@ pub async fn ciphers_id_restore_admin_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2774,12 +2720,12 @@ pub async fn ciphers_id_restore_admin_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2788,17 +2734,19 @@ pub async fn ciphers_id_restore_admin_put( } } -pub async fn ciphers_id_restore_put( +pub async fn ciphers_put_collections_admin( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { + id: &str, + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/restore", + "{}/ciphers/{id}/collections-admin", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); @@ -2808,6 +2756,7 @@ pub async fn ciphers_id_restore_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2824,12 +2773,12 @@ pub async fn ciphers_id_restore_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2838,23 +2787,21 @@ pub async fn ciphers_id_restore_put( } } -pub async fn ciphers_id_share_post( +pub async fn ciphers_put_collections_v_next( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_share_request_model: Option, -) -> Result> { + cipher_collections_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_share_request_model = cipher_share_request_model; + let p_cipher_collections_request_model = cipher_collections_request_model; let uri_str = format!( - "{}/ciphers/{id}/share", + "{}/ciphers/{id}/collections_v2", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2862,7 +2809,7 @@ pub async fn ciphers_id_share_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_share_request_model); + req_builder = req_builder.json(&p_cipher_collections_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2879,12 +2826,12 @@ pub async fn ciphers_id_share_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OptionalCipherDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2893,17 +2840,15 @@ pub async fn ciphers_id_share_post( } } -pub async fn ciphers_id_share_put( +pub async fn ciphers_put_delete( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_share_request_model: Option, -) -> Result> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_share_request_model = cipher_share_request_model; let uri_str = format!( - "{}/ciphers/{id}/share", + "{}/ciphers/{id}/delete", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -2915,29 +2860,17 @@ pub async fn ciphers_id_share_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_share_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2946,15 +2879,15 @@ pub async fn ciphers_id_share_put( } } -pub async fn ciphers_id_unarchive_put( +pub async fn ciphers_put_delete_admin( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/ciphers/{id}/unarchive", + "{}/ciphers/{id}/delete-admin", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -2971,23 +2904,12 @@ pub async fn ciphers_id_unarchive_put( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -2996,17 +2918,15 @@ pub async fn ciphers_id_unarchive_put( } } -pub async fn ciphers_move_post( +pub async fn ciphers_put_delete_many( configuration: &configuration::Configuration, - cipher_bulk_move_request_model: Option, -) -> Result<(), Error> { + cipher_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_move_request_model = cipher_bulk_move_request_model; + let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - let uri_str = format!("{}/ciphers/move", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/ciphers/delete", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -3014,7 +2934,7 @@ pub async fn ciphers_move_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_move_request_model); + req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3025,7 +2945,7 @@ pub async fn ciphers_move_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3034,14 +2954,14 @@ pub async fn ciphers_move_post( } } -pub async fn ciphers_move_put( +pub async fn ciphers_put_delete_many_admin( configuration: &configuration::Configuration, - cipher_bulk_move_request_model: Option, -) -> Result<(), Error> { + cipher_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_move_request_model = cipher_bulk_move_request_model; + let p_cipher_bulk_delete_request_model = cipher_bulk_delete_request_model; - let uri_str = format!("{}/ciphers/move", configuration.base_path); + let uri_str = format!("{}/ciphers/delete-admin", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3050,7 +2970,7 @@ pub async fn ciphers_move_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_move_request_model); + req_builder = req_builder.json(&p_cipher_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3061,7 +2981,7 @@ pub async fn ciphers_move_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3070,31 +2990,29 @@ pub async fn ciphers_move_put( } } -pub async fn ciphers_organization_details_assigned_get( +pub async fn ciphers_put_partial( configuration: &configuration::Configuration, - organization_id: Option, -) -> Result< - models::CipherDetailsResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, + cipher_partial_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; + let p_id = id; + let p_cipher_partial_request_model = cipher_partial_request_model; let uri_str = format!( - "{}/ciphers/organization-details/assigned", - configuration.base_path + "{}/ciphers/{id}/partial", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_cipher_partial_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3111,13 +3029,12 @@ pub async fn ciphers_organization_details_assigned_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3126,22 +3043,20 @@ pub async fn ciphers_organization_details_assigned_get( } } -pub async fn ciphers_organization_details_get( +pub async fn ciphers_put_restore( configuration: &configuration::Configuration, - organization_id: Option, -) -> Result< - models::CipherMiniDetailsResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; + let p_id = id; - let uri_str = format!("{}/ciphers/organization-details", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!( + "{}/ciphers/{id}/restore", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -3164,13 +3079,12 @@ pub async fn ciphers_organization_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3179,17 +3093,19 @@ pub async fn ciphers_organization_details_get( } } -pub async fn ciphers_post( +pub async fn ciphers_put_restore_admin( configuration: &configuration::Configuration, - cipher_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_request_model = cipher_request_model; + let p_id = id; - let uri_str = format!("{}/ciphers", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/ciphers/{id}/restore-admin", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -3197,7 +3113,6 @@ pub async fn ciphers_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3214,12 +3129,12 @@ pub async fn ciphers_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3228,41 +3143,45 @@ pub async fn ciphers_post( } } -pub async fn ciphers_purge_post( +pub async fn ciphers_put_restore_many( configuration: &configuration::Configuration, - organization_id: Option, - secret_verification_request_model: Option, -) -> Result<(), Error> { + cipher_bulk_restore_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_secret_verification_request_model = secret_verification_request_model; + let p_cipher_bulk_restore_request_model = cipher_bulk_restore_request_model; - let uri_str = format!("{}/ciphers/purge", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/ciphers/restore", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_cipher_bulk_restore_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3271,10 +3190,11 @@ pub async fn ciphers_purge_post( } } -pub async fn ciphers_restore_admin_put( +pub async fn ciphers_put_restore_many_admin( configuration: &configuration::Configuration, cipher_bulk_restore_request_model: Option, -) -> Result> { +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions let p_cipher_bulk_restore_request_model = cipher_bulk_restore_request_model; @@ -3309,7 +3229,7 @@ pub async fn ciphers_restore_admin_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3318,14 +3238,20 @@ pub async fn ciphers_restore_admin_put( } } -pub async fn ciphers_restore_put( +pub async fn ciphers_put_share( configuration: &configuration::Configuration, - cipher_bulk_restore_request_model: Option, -) -> Result> { + id: uuid::Uuid, + cipher_share_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_restore_request_model = cipher_bulk_restore_request_model; + let p_id = id; + let p_cipher_share_request_model = cipher_share_request_model; - let uri_str = format!("{}/ciphers/restore", configuration.base_path); + let uri_str = format!( + "{}/ciphers/{id}/share", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3334,7 +3260,7 @@ pub async fn ciphers_restore_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_restore_request_model); + req_builder = req_builder.json(&p_cipher_share_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3351,12 +3277,12 @@ pub async fn ciphers_restore_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3365,17 +3291,15 @@ pub async fn ciphers_restore_put( } } -pub async fn ciphers_share_post( +pub async fn ciphers_put_share_many( configuration: &configuration::Configuration, cipher_bulk_share_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_cipher_bulk_share_request_model = cipher_bulk_share_request_model; let uri_str = format!("{}/ciphers/share", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -3405,7 +3329,7 @@ pub async fn ciphers_share_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3414,14 +3338,18 @@ pub async fn ciphers_share_post( } } -pub async fn ciphers_share_put( +pub async fn ciphers_put_unarchive( configuration: &configuration::Configuration, - cipher_bulk_share_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_cipher_bulk_share_request_model = cipher_bulk_share_request_model; + let p_id = id; - let uri_str = format!("{}/ciphers/share", configuration.base_path); + let uri_str = format!( + "{}/ciphers/{id}/unarchive", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -3430,7 +3358,6 @@ pub async fn ciphers_share_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_cipher_bulk_share_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -3447,12 +3374,12 @@ pub async fn ciphers_share_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CipherMiniResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CipherMiniResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -3461,10 +3388,10 @@ pub async fn ciphers_share_put( } } -pub async fn ciphers_unarchive_put( +pub async fn ciphers_put_unarchive_many( configuration: &configuration::Configuration, cipher_bulk_unarchive_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_cipher_bulk_unarchive_request_model = cipher_bulk_unarchive_request_model; @@ -3499,7 +3426,60 @@ pub async fn ciphers_unarchive_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn ciphers_renew_file_upload_url( + configuration: &configuration::Configuration, + id: uuid::Uuid, + attachment_id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + let p_attachment_id = attachment_id; + + let uri_str = format!( + "{}/ciphers/{id}/attachment/{attachmentId}/renew", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentUploadDataResponseModel`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/collections_api.rs b/crates/bitwarden-api-api/src/apis/collections_api.rs index ac7b1cad3..38f0e75b5 100644 --- a/crates/bitwarden-api-api/src/apis/collections_api.rs +++ b/crates/bitwarden-api-api/src/apis/collections_api.rs @@ -14,109 +14,122 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`collections_get`] +/// struct for typed errors of method [`collections_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CollectionsGetError { +pub enum CollectionsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_bulk_access_post`] +/// struct for typed errors of method [`collections_delete_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsBulkAccessPostError { +pub enum CollectionsDeleteManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_delete`] +/// struct for typed errors of method [`collections_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsDeleteError { +pub enum CollectionsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_delete_post`] +/// struct for typed errors of method [`collections_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsDeletePostError { +pub enum CollectionsGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_details_get`] +/// struct for typed errors of method [`collections_get_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsDetailsGetError { +pub enum CollectionsGetDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_get`] +/// struct for typed errors of method [`collections_get_many_with_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsGetError { +pub enum CollectionsGetManyWithDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_delete`] +/// struct for typed errors of method [`collections_get_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdDeleteError { +pub enum CollectionsGetUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_delete_post`] +/// struct for typed errors of method [`collections_get_users`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdDeletePostError { +pub enum CollectionsGetUsersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_details_get`] +/// struct for typed errors of method [`collections_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdDetailsGetError { +pub enum CollectionsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_get`] +/// struct for typed errors of method [`collections_post_bulk_collection_access`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdGetError { +pub enum CollectionsPostBulkCollectionAccessError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_post`] +/// struct for typed errors of method [`collections_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdPostError { +pub enum CollectionsPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_put`] +/// struct for typed errors of method [`collections_post_delete_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdPutError { +pub enum CollectionsPostDeleteManyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_id_users_get`] +/// struct for typed errors of method [`collections_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsIdUsersGetError { +pub enum CollectionsPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_collections_post`] +/// struct for typed errors of method [`collections_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdCollectionsPostError { +pub enum CollectionsPutError { UnknownValue(serde_json::Value), } -pub async fn collections_get( +pub async fn collections_delete( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/collections", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + org_id: uuid::Uuid, + id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_org_id = org_id; + let p_id = id; + + let uri_str = format!( + "{}/organizations/{orgId}/collections/{id}", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -129,23 +142,12 @@ pub async fn collections_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -154,23 +156,23 @@ pub async fn collections_get( } } -pub async fn organizations_org_id_collections_bulk_access_post( +pub async fn collections_delete_many( configuration: &configuration::Configuration, org_id: uuid::Uuid, - bulk_collection_access_request_model: Option, -) -> Result<(), Error> { + collection_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_bulk_collection_access_request_model = bulk_collection_access_request_model; + let p_collection_bulk_delete_request_model = collection_bulk_delete_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/bulk-access", + "{}/organizations/{orgId}/collections", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -178,7 +180,7 @@ pub async fn organizations_org_id_collections_bulk_access_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_bulk_collection_access_request_model); + req_builder = req_builder.json(&p_collection_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -189,8 +191,7 @@ pub async fn organizations_org_id_collections_bulk_access_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -199,23 +200,22 @@ pub async fn organizations_org_id_collections_bulk_access_post( } } -pub async fn organizations_org_id_collections_delete( +pub async fn collections_get( configuration: &configuration::Configuration, org_id: uuid::Uuid, - collection_bulk_delete_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_collection_bulk_delete_request_model = collection_bulk_delete_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/collections", + "{}/organizations/{orgId}/collections/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -223,19 +223,28 @@ pub async fn organizations_org_id_collections_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_collection_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -244,23 +253,19 @@ pub async fn organizations_org_id_collections_delete( } } -pub async fn organizations_org_id_collections_delete_post( +pub async fn collections_get_all( configuration: &configuration::Configuration, org_id: uuid::Uuid, - collection_bulk_delete_request_model: Option, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_collection_bulk_delete_request_model = collection_bulk_delete_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/delete", + "{}/organizations/{orgId}/collections", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -268,19 +273,28 @@ pub async fn organizations_org_id_collections_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_collection_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -289,20 +303,20 @@ pub async fn organizations_org_id_collections_delete_post( } } -pub async fn organizations_org_id_collections_details_get( +pub async fn collections_get_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, -) -> Result< - models::CollectionAccessDetailsResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/collections/details", + "{}/organizations/{orgId}/collections/{id}/details", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -328,13 +342,12 @@ pub async fn organizations_org_id_collections_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -343,18 +356,18 @@ pub async fn organizations_org_id_collections_details_get( } } -pub async fn organizations_org_id_collections_get( +pub async fn collections_get_many_with_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, ) -> Result< - models::CollectionResponseModelListResponseModel, - Error, + models::CollectionAccessDetailsResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let uri_str = format!( - "{}/organizations/{orgId}/collections", + "{}/organizations/{orgId}/collections/details", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); @@ -382,12 +395,12 @@ pub async fn organizations_org_id_collections_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -397,24 +410,12 @@ pub async fn organizations_org_id_collections_get( } } -pub async fn organizations_org_id_collections_id_delete( +pub async fn collections_get_user( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - let p_id = id; - - let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); +) -> Result> +{ + let uri_str = format!("{}/collections", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -427,13 +428,23 @@ pub async fn organizations_org_id_collections_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -442,24 +453,22 @@ pub async fn organizations_org_id_collections_id_delete( } } -pub async fn organizations_org_id_collections_id_delete_post( +pub async fn collections_get_users( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}/delete", + "{}/organizations/{orgId}/collections/{id}/users", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -472,13 +481,23 @@ pub async fn organizations_org_id_collections_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -487,25 +506,23 @@ pub async fn organizations_org_id_collections_id_delete_post( } } -pub async fn organizations_org_id_collections_id_details_get( +pub async fn collections_post( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result< - models::CollectionAccessDetailsResponseModel, - Error, -> { + create_collection_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_create_collection_request_model = create_collection_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}/details", + "{}/organizations/{orgId}/collections", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -513,6 +530,7 @@ pub async fn organizations_org_id_collections_id_details_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_create_collection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -529,13 +547,12 @@ pub async fn organizations_org_id_collections_id_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -544,22 +561,23 @@ pub async fn organizations_org_id_collections_id_details_get( } } -pub async fn organizations_org_id_collections_id_get( +pub async fn collections_post_bulk_collection_access( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result> { + bulk_collection_access_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_bulk_collection_access_request_model = bulk_collection_access_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}", + "{}/organizations/{orgId}/collections/bulk-access", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -567,28 +585,18 @@ pub async fn organizations_org_id_collections_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_bulk_collection_access_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -598,19 +606,17 @@ pub async fn organizations_org_id_collections_id_get( } } -pub async fn organizations_org_id_collections_id_post( +pub async fn collections_post_delete( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, - collection_request_model: Option, -) -> Result> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; - let p_collection_request_model = collection_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}", + "{}/organizations/{orgId}/collections/{id}/delete", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) @@ -625,30 +631,17 @@ pub async fn organizations_org_id_collections_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_collection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -657,24 +650,23 @@ pub async fn organizations_org_id_collections_id_post( } } -pub async fn organizations_org_id_collections_id_put( +pub async fn collections_post_delete_many( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, - collection_request_model: Option, -) -> Result> { + collection_bulk_delete_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; - let p_collection_request_model = collection_request_model; + let p_collection_bulk_delete_request_model = collection_bulk_delete_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}", + "{}/organizations/{orgId}/collections/delete", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -682,30 +674,18 @@ pub async fn organizations_org_id_collections_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_collection_request_model); + req_builder = req_builder.json(&p_collection_bulk_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -714,25 +694,26 @@ pub async fn organizations_org_id_collections_id_put( } } -pub async fn organizations_org_id_collections_id_users_get( +pub async fn collections_post_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { + update_collection_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; + let p_update_collection_request_model = update_collection_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections/{id}/users", + "{}/organizations/{orgId}/collections/{id}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -740,6 +721,7 @@ pub async fn organizations_org_id_collections_id_users_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_update_collection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -756,13 +738,12 @@ pub async fn organizations_org_id_collections_id_users_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -771,23 +752,24 @@ pub async fn organizations_org_id_collections_id_users_get( } } -pub async fn organizations_org_id_collections_post( +pub async fn collections_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, - collection_request_model: Option, -) -> Result> { + id: uuid::Uuid, + update_collection_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_collection_request_model = collection_request_model; + let p_id = id; + let p_update_collection_request_model = update_collection_request_model; let uri_str = format!( - "{}/organizations/{orgId}/collections", + "{}/organizations/{orgId}/collections/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -795,7 +777,7 @@ pub async fn organizations_org_id_collections_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_collection_request_model); + req_builder = req_builder.json(&p_update_collection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -817,8 +799,7 @@ pub async fn organizations_org_id_collections_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/config_api.rs b/crates/bitwarden-api-api/src/apis/config_api.rs index 2e87e555e..6e1544693 100644 --- a/crates/bitwarden-api-api/src/apis/config_api.rs +++ b/crates/bitwarden-api-api/src/apis/config_api.rs @@ -14,16 +14,16 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`config_get`] +/// struct for typed errors of method [`config_get_configs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ConfigGetError { +pub enum ConfigGetConfigsError { UnknownValue(serde_json::Value), } -pub async fn config_get( +pub async fn config_get_configs( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/config", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -54,7 +54,7 @@ pub async fn config_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/configuration.rs b/crates/bitwarden-api-api/src/apis/configuration.rs index faa9e6f6d..c184fc18f 100644 --- a/crates/bitwarden-api-api/src/apis/configuration.rs +++ b/crates/bitwarden-api-api/src/apis/configuration.rs @@ -36,7 +36,7 @@ impl Configuration { impl Default for Configuration { fn default() -> Self { Configuration { - base_path: "http://localhost".to_owned(), + base_path: "https://api.bitwarden.com".to_owned(), user_agent: Some("OpenAPI-Generator/latest/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, diff --git a/crates/bitwarden-api-api/src/apis/counts_api.rs b/crates/bitwarden-api-api/src/apis/counts_api.rs index 0604e46e8..f237d0bc8 100644 --- a/crates/bitwarden-api-api/src/apis/counts_api.rs +++ b/crates/bitwarden-api-api/src/apis/counts_api.rs @@ -14,34 +14,31 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_sm_counts_get`] +/// struct for typed errors of method [`counts_get_by_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdSmCountsGetError { +pub enum CountsGetByOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_project_id_sm_counts_get`] +/// struct for typed errors of method [`counts_get_by_project`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsProjectIdSmCountsGetError { +pub enum CountsGetByProjectError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_service_account_id_sm_counts_get`] +/// struct for typed errors of method [`counts_get_by_service_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsServiceAccountIdSmCountsGetError { +pub enum CountsGetByServiceAccountError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_sm_counts_get( +pub async fn counts_get_by_organization( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result< - models::OrganizationCountsResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -79,8 +76,7 @@ pub async fn organizations_organization_id_sm_counts_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -89,10 +85,10 @@ pub async fn organizations_organization_id_sm_counts_get( } } -pub async fn projects_project_id_sm_counts_get( +pub async fn counts_get_by_project( configuration: &configuration::Configuration, project_id: uuid::Uuid, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_project_id = project_id; @@ -130,7 +126,7 @@ pub async fn projects_project_id_sm_counts_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -139,13 +135,10 @@ pub async fn projects_project_id_sm_counts_get( } } -pub async fn service_accounts_service_account_id_sm_counts_get( +pub async fn counts_get_by_service_account( configuration: &configuration::Configuration, service_account_id: uuid::Uuid, -) -> Result< - models::ServiceAccountCountsResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_service_account_id = service_account_id; @@ -183,8 +176,7 @@ pub async fn service_accounts_service_account_id_sm_counts_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/devices_api.rs b/crates/bitwarden-api-api/src/apis/devices_api.rs index 7a4025256..81962e61e 100644 --- a/crates/bitwarden-api-api/src/apis/devices_api.rs +++ b/crates/bitwarden-api-api/src/apis/devices_api.rs @@ -14,217 +14,175 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`devices_get`] +/// struct for typed errors of method [`devices_deactivate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesGetError { +pub enum DevicesDeactivateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_id_deactivate_post`] +/// struct for typed errors of method [`devices_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdDeactivatePostError { +pub enum DevicesGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_id_delete`] +/// struct for typed errors of method [`devices_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdDeleteError { +pub enum DevicesGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_id_get`] +/// struct for typed errors of method [`devices_get_by_email_and_identifier`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdGetError { +pub enum DevicesGetByEmailAndIdentifierError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_id_post`] +/// struct for typed errors of method [`devices_get_by_identifier`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdPostError { +pub enum DevicesGetByIdentifierError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_id_put`] +/// struct for typed errors of method [`devices_get_by_identifier_query`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdPutError { +pub enum DevicesGetByIdentifierQueryError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_clear_token_post`] +/// struct for typed errors of method [`devices_get_device_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierClearTokenPostError { +pub enum DevicesGetDeviceKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_clear_token_put`] +/// struct for typed errors of method [`devices_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierClearTokenPutError { +pub enum DevicesPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_get`] +/// struct for typed errors of method [`devices_post_clear_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierGetError { +pub enum DevicesPostClearTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_token_post`] +/// struct for typed errors of method [`devices_post_deactivate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierTokenPostError { +pub enum DevicesPostDeactivateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_token_put`] +/// struct for typed errors of method [`devices_post_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierTokenPutError { +pub enum DevicesPostKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_web_push_auth_post`] +/// struct for typed errors of method [`devices_post_lost_trust`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierWebPushAuthPostError { +pub enum DevicesPostLostTrustError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_identifier_web_push_auth_put`] +/// struct for typed errors of method [`devices_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierIdentifierWebPushAuthPutError { +pub enum DevicesPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_keys_post`] +/// struct for typed errors of method [`devices_post_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierKeysPostError { +pub enum DevicesPostTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_keys_put`] +/// struct for typed errors of method [`devices_post_untrust`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierKeysPutError { +pub enum DevicesPostUntrustError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_identifier_retrieve_keys_post`] +/// struct for typed errors of method [`devices_post_update_trust`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesIdentifierRetrieveKeysPostError { +pub enum DevicesPostUpdateTrustError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_knowndevice_email_identifier_get`] +/// struct for typed errors of method [`devices_post_web_push_auth`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesKnowndeviceEmailIdentifierGetError { +pub enum DevicesPostWebPushAuthError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_knowndevice_get`] +/// struct for typed errors of method [`devices_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesKnowndeviceGetError { +pub enum DevicesPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_lost_trust_post`] +/// struct for typed errors of method [`devices_put_clear_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesLostTrustPostError { +pub enum DevicesPutClearTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_post`] +/// struct for typed errors of method [`devices_put_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesPostError { +pub enum DevicesPutKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_untrust_post`] +/// struct for typed errors of method [`devices_put_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesUntrustPostError { +pub enum DevicesPutTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`devices_update_trust_post`] +/// struct for typed errors of method [`devices_put_web_push_auth`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum DevicesUpdateTrustPostError { +pub enum DevicesPutWebPushAuthError { UnknownValue(serde_json::Value), } -pub async fn devices_get( - configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/devices", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceAuthRequestResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceAuthRequestResponseModelListResponseModel`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn devices_id_deactivate_post( +pub async fn devices_deactivate( configuration: &configuration::Configuration, id: &str, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/devices/{id}/deactivate", + "{}/devices/{id}", configuration.base_path, id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -242,7 +200,7 @@ pub async fn devices_id_deactivate_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -251,10 +209,10 @@ pub async fn devices_id_deactivate_post( } } -pub async fn devices_id_delete( +pub async fn devices_get( configuration: &configuration::Configuration, id: &str, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -263,9 +221,7 @@ pub async fn devices_id_delete( configuration.base_path, id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -278,12 +234,23 @@ pub async fn devices_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -292,18 +259,10 @@ pub async fn devices_id_delete( } } -pub async fn devices_id_get( +pub async fn devices_get_all( configuration: &configuration::Configuration, - id: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/devices/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); +) -> Result> { + let uri_str = format!("{}/devices", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -328,12 +287,12 @@ pub async fn devices_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceAuthRequestResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceAuthRequestResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -342,23 +301,22 @@ pub async fn devices_id_get( } } -pub async fn devices_id_post( +pub async fn devices_get_by_email_and_identifier( configuration: &configuration::Configuration, - id: &str, - device_request_model: Option, -) -> Result> { + email: &str, + identifier: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_device_request_model = device_request_model; + let p_email = email; + let p_identifier = identifier; let uri_str = format!( - "{}/devices/{id}", + "{}/devices/knowndevice/{email}/{identifier}", configuration.base_path, - id = crate::apis::urlencode(p_id) + email = crate::apis::urlencode(p_email), + identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -366,7 +324,6 @@ pub async fn devices_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -383,12 +340,13 @@ pub async fn devices_id_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -397,21 +355,19 @@ pub async fn devices_id_post( } } -pub async fn devices_id_put( +pub async fn devices_get_by_identifier( configuration: &configuration::Configuration, - id: &str, - device_request_model: Option, -) -> Result> { + identifier: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_device_request_model = device_request_model; + let p_identifier = identifier; let uri_str = format!( - "{}/devices/{id}", + "{}/devices/identifier/{identifier}", configuration.base_path, - id = crate::apis::urlencode(p_id) + identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -419,7 +375,6 @@ pub async fn devices_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -441,7 +396,7 @@ pub async fn devices_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -450,25 +405,23 @@ pub async fn devices_id_put( } } -pub async fn devices_identifier_identifier_clear_token_post( +pub async fn devices_get_by_identifier_query( configuration: &configuration::Configuration, - identifier: &str, -) -> Result<(), Error> { + x_request_email: &str, + x_device_identifier: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; + let p_x_request_email = x_request_email; + let p_x_device_identifier = x_device_identifier; - let uri_str = format!( - "{}/devices/identifier/{identifier}/clear-token", - configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/devices/knowndevice", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } + req_builder = req_builder.header("x-Request-Email", p_x_request_email.to_string()); + req_builder = req_builder.header("x-Device-Identifier", p_x_device_identifier.to_string()); if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; @@ -477,13 +430,23 @@ pub async fn devices_identifier_identifier_clear_token_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -492,19 +455,21 @@ pub async fn devices_identifier_identifier_clear_token_post( } } -pub async fn devices_identifier_identifier_clear_token_put( +pub async fn devices_get_device_keys( configuration: &configuration::Configuration, identifier: &str, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_identifier = identifier; let uri_str = format!( - "{}/devices/identifier/{identifier}/clear-token", + "{}/devices/{identifier}/retrieve-keys", configuration.base_path, identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -517,13 +482,23 @@ pub async fn devices_identifier_identifier_clear_token_put( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProtectedDeviceResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProtectedDeviceResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -532,19 +507,17 @@ pub async fn devices_identifier_identifier_clear_token_put( } } -pub async fn devices_identifier_identifier_get( +pub async fn devices_post( configuration: &configuration::Configuration, - identifier: &str, -) -> Result> { + device_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; + let p_device_request_model = device_request_model; - let uri_str = format!( - "{}/devices/identifier/{identifier}", - configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/devices", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -552,6 +525,7 @@ pub async fn devices_identifier_identifier_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -573,8 +547,7 @@ pub async fn devices_identifier_identifier_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -583,17 +556,15 @@ pub async fn devices_identifier_identifier_get( } } -pub async fn devices_identifier_identifier_token_post( +pub async fn devices_post_clear_token( configuration: &configuration::Configuration, identifier: &str, - device_token_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_identifier = identifier; - let p_device_token_request_model = device_token_request_model; let uri_str = format!( - "{}/devices/identifier/{identifier}/token", + "{}/devices/identifier/{identifier}/clear-token", configuration.base_path, identifier = crate::apis::urlencode(p_identifier) ); @@ -607,7 +578,6 @@ pub async fn devices_identifier_identifier_token_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -618,8 +588,7 @@ pub async fn devices_identifier_identifier_token_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -628,21 +597,21 @@ pub async fn devices_identifier_identifier_token_post( } } -pub async fn devices_identifier_identifier_token_put( +pub async fn devices_post_deactivate( configuration: &configuration::Configuration, - identifier: &str, - device_token_request_model: Option, -) -> Result<(), Error> { + id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; - let p_device_token_request_model = device_token_request_model; + let p_id = id; let uri_str = format!( - "{}/devices/identifier/{identifier}/token", + "{}/devices/{id}/deactivate", configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) + id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -650,7 +619,6 @@ pub async fn devices_identifier_identifier_token_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -661,8 +629,7 @@ pub async fn devices_identifier_identifier_token_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -671,17 +638,17 @@ pub async fn devices_identifier_identifier_token_put( } } -pub async fn devices_identifier_identifier_web_push_auth_post( +pub async fn devices_post_keys( configuration: &configuration::Configuration, identifier: &str, - web_push_auth_request_model: Option, -) -> Result<(), Error> { + device_keys_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_identifier = identifier; - let p_web_push_auth_request_model = web_push_auth_request_model; + let p_device_keys_request_model = device_keys_request_model; let uri_str = format!( - "{}/devices/identifier/{identifier}/web-push-auth", + "{}/devices/{identifier}/keys", configuration.base_path, identifier = crate::apis::urlencode(p_identifier) ); @@ -695,19 +662,29 @@ pub async fn devices_identifier_identifier_web_push_auth_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_web_push_auth_request_model); + req_builder = req_builder.json(&p_device_keys_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -716,21 +693,13 @@ pub async fn devices_identifier_identifier_web_push_auth_post( } } -pub async fn devices_identifier_identifier_web_push_auth_put( +pub async fn devices_post_lost_trust( configuration: &configuration::Configuration, - identifier: &str, - web_push_auth_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; - let p_web_push_auth_request_model = web_push_auth_request_model; - - let uri_str = format!( - "{}/devices/identifier/{identifier}/web-push-auth", - configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); +) -> Result<(), Error> { + let uri_str = format!("{}/devices/lost-trust", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -738,7 +707,6 @@ pub async fn devices_identifier_identifier_web_push_auth_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_web_push_auth_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -749,8 +717,7 @@ pub async fn devices_identifier_identifier_web_push_auth_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -759,19 +726,19 @@ pub async fn devices_identifier_identifier_web_push_auth_put( } } -pub async fn devices_identifier_keys_post( +pub async fn devices_post_put( configuration: &configuration::Configuration, - identifier: &str, - device_keys_request_model: Option, -) -> Result> { + id: &str, + device_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; - let p_device_keys_request_model = device_keys_request_model; + let p_id = id; + let p_device_request_model = device_request_model; let uri_str = format!( - "{}/devices/{identifier}/keys", + "{}/devices/{id}", configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client @@ -783,7 +750,7 @@ pub async fn devices_identifier_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_keys_request_model); + req_builder = req_builder.json(&p_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -805,7 +772,7 @@ pub async fn devices_identifier_keys_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -814,21 +781,23 @@ pub async fn devices_identifier_keys_post( } } -pub async fn devices_identifier_keys_put( +pub async fn devices_post_token( configuration: &configuration::Configuration, identifier: &str, - device_keys_request_model: Option, -) -> Result> { + device_token_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_identifier = identifier; - let p_device_keys_request_model = device_keys_request_model; + let p_device_token_request_model = device_token_request_model; let uri_str = format!( - "{}/devices/{identifier}/keys", + "{}/devices/identifier/{identifier}/token", configuration.base_path, identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -836,29 +805,18 @@ pub async fn devices_identifier_keys_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_keys_request_model); + req_builder = req_builder.json(&p_device_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -867,18 +825,14 @@ pub async fn devices_identifier_keys_put( } } -pub async fn devices_identifier_retrieve_keys_post( +pub async fn devices_post_untrust( configuration: &configuration::Configuration, - identifier: &str, -) -> Result> { + untrust_devices_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; + let p_untrust_devices_request_model = untrust_devices_request_model; - let uri_str = format!( - "{}/devices/{identifier}/retrieve-keys", - configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) - ); + let uri_str = format!("{}/devices/untrust", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -889,29 +843,56 @@ pub async fn devices_identifier_retrieve_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_untrust_devices_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProtectedDeviceResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProtectedDeviceResponseModel`")))), - } + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn devices_post_update_trust( + configuration: &configuration::Configuration, + update_devices_trust_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_update_devices_trust_request_model = update_devices_trust_request_model; + + let uri_str = format!("{}/devices/update-trust", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_devices_trust_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -920,22 +901,23 @@ pub async fn devices_identifier_retrieve_keys_post( } } -pub async fn devices_knowndevice_email_identifier_get( +pub async fn devices_post_web_push_auth( configuration: &configuration::Configuration, - email: &str, identifier: &str, -) -> Result> { + web_push_auth_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_email = email; let p_identifier = identifier; + let p_web_push_auth_request_model = web_push_auth_request_model; let uri_str = format!( - "{}/devices/knowndevice/{email}/{identifier}", + "{}/devices/identifier/{identifier}/web-push-auth", configuration.base_path, - email = crate::apis::urlencode(p_email), identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -943,29 +925,18 @@ pub async fn devices_knowndevice_email_identifier_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_web_push_auth_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -974,26 +945,29 @@ pub async fn devices_knowndevice_email_identifier_get( } } -pub async fn devices_knowndevice_get( +pub async fn devices_put( configuration: &configuration::Configuration, - x_request_email: &str, - x_device_identifier: &str, -) -> Result> { + id: &str, + device_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_x_request_email = x_request_email; - let p_x_device_identifier = x_device_identifier; + let p_id = id; + let p_device_request_model = device_request_model; - let uri_str = format!("{}/devices/knowndevice", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!( + "{}/devices/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - req_builder = req_builder.header("x-Request-Email", p_x_request_email.to_string()); - req_builder = req_builder.header("x-Device-Identifier", p_x_device_identifier.to_string()); if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1010,12 +984,12 @@ pub async fn devices_knowndevice_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `bool`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `bool`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1024,13 +998,19 @@ pub async fn devices_knowndevice_get( } } -pub async fn devices_lost_trust_post( +pub async fn devices_put_clear_token( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/devices/lost-trust", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + identifier: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_identifier = identifier; + + let uri_str = format!( + "{}/devices/identifier/{identifier}/clear-token", + configuration.base_path, + identifier = crate::apis::urlencode(p_identifier) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1048,7 +1028,7 @@ pub async fn devices_lost_trust_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1057,17 +1037,21 @@ pub async fn devices_lost_trust_post( } } -pub async fn devices_post( +pub async fn devices_put_keys( configuration: &configuration::Configuration, - device_request_model: Option, -) -> Result> { + identifier: &str, + device_keys_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_device_request_model = device_request_model; + let p_identifier = identifier; + let p_device_keys_request_model = device_keys_request_model; - let uri_str = format!("{}/devices", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/devices/{identifier}/keys", + configuration.base_path, + identifier = crate::apis::urlencode(p_identifier) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1075,7 +1059,7 @@ pub async fn devices_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_request_model); + req_builder = req_builder.json(&p_device_keys_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1097,7 +1081,7 @@ pub async fn devices_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1106,17 +1090,21 @@ pub async fn devices_post( } } -pub async fn devices_untrust_post( +pub async fn devices_put_token( configuration: &configuration::Configuration, - untrust_devices_request_model: Option, -) -> Result<(), Error> { + identifier: &str, + device_token_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_untrust_devices_request_model = untrust_devices_request_model; + let p_identifier = identifier; + let p_device_token_request_model = device_token_request_model; - let uri_str = format!("{}/devices/untrust", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/devices/identifier/{identifier}/token", + configuration.base_path, + identifier = crate::apis::urlencode(p_identifier) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1124,7 +1112,7 @@ pub async fn devices_untrust_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_untrust_devices_request_model); + req_builder = req_builder.json(&p_device_token_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1135,7 +1123,7 @@ pub async fn devices_untrust_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1144,17 +1132,21 @@ pub async fn devices_untrust_post( } } -pub async fn devices_update_trust_post( +pub async fn devices_put_web_push_auth( configuration: &configuration::Configuration, - update_devices_trust_request_model: Option, -) -> Result<(), Error> { + identifier: &str, + web_push_auth_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_devices_trust_request_model = update_devices_trust_request_model; + let p_identifier = identifier; + let p_web_push_auth_request_model = web_push_auth_request_model; - let uri_str = format!("{}/devices/update-trust", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/devices/identifier/{identifier}/web-push-auth", + configuration.base_path, + identifier = crate::apis::urlencode(p_identifier) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1162,7 +1154,7 @@ pub async fn devices_update_trust_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_devices_trust_request_model); + req_builder = req_builder.json(&p_web_push_auth_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1173,7 +1165,7 @@ pub async fn devices_update_trust_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/emergency_access_api.rs b/crates/bitwarden-api-api/src/apis/emergency_access_api.rs index 748f436b1..5c6d683c1 100644 --- a/crates/bitwarden-api-api/src/apis/emergency_access_api.rs +++ b/crates/bitwarden-api-api/src/apis/emergency_access_api.rs @@ -14,147 +14,156 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`emergency_access_granted_get`] +/// struct for typed errors of method [`emergency_access_accept`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessGrantedGetError { +pub enum EmergencyAccessAcceptError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_accept_post`] +/// struct for typed errors of method [`emergency_access_approve`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdAcceptPostError { +pub enum EmergencyAccessApproveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_approve_post`] +/// struct for typed errors of method [`emergency_access_confirm`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdApprovePostError { +pub enum EmergencyAccessConfirmError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_cipher_id_attachment_attachment_id_get`] +/// struct for typed errors of method [`emergency_access_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdCipherIdAttachmentAttachmentIdGetError { +pub enum EmergencyAccessDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_confirm_post`] +/// struct for typed errors of method [`emergency_access_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdConfirmPostError { +pub enum EmergencyAccessGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_delete`] +/// struct for typed errors of method [`emergency_access_get_attachment_data`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdDeleteError { +pub enum EmergencyAccessGetAttachmentDataError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_delete_post`] +/// struct for typed errors of method [`emergency_access_get_contacts`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdDeletePostError { +pub enum EmergencyAccessGetContactsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_get`] +/// struct for typed errors of method [`emergency_access_get_grantees`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdGetError { +pub enum EmergencyAccessGetGranteesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_initiate_post`] +/// struct for typed errors of method [`emergency_access_initiate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdInitiatePostError { +pub enum EmergencyAccessInitiateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_password_post`] +/// struct for typed errors of method [`emergency_access_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdPasswordPostError { +pub enum EmergencyAccessInviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_policies_get`] +/// struct for typed errors of method [`emergency_access_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdPoliciesGetError { +pub enum EmergencyAccessPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_post`] +/// struct for typed errors of method [`emergency_access_policies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdPostError { +pub enum EmergencyAccessPoliciesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_put`] +/// struct for typed errors of method [`emergency_access_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdPutError { +pub enum EmergencyAccessPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_reinvite_post`] +/// struct for typed errors of method [`emergency_access_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdReinvitePostError { +pub enum EmergencyAccessPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_reject_post`] +/// struct for typed errors of method [`emergency_access_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdRejectPostError { +pub enum EmergencyAccessPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_takeover_post`] +/// struct for typed errors of method [`emergency_access_reinvite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdTakeoverPostError { +pub enum EmergencyAccessReinviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_id_view_post`] +/// struct for typed errors of method [`emergency_access_reject`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessIdViewPostError { +pub enum EmergencyAccessRejectError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_invite_post`] +/// struct for typed errors of method [`emergency_access_takeover`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessInvitePostError { +pub enum EmergencyAccessTakeoverError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`emergency_access_trusted_get`] +/// struct for typed errors of method [`emergency_access_view_ciphers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EmergencyAccessTrustedGetError { +pub enum EmergencyAccessViewCiphersError { UnknownValue(serde_json::Value), } -pub async fn emergency_access_granted_get( +pub async fn emergency_access_accept( configuration: &configuration::Configuration, -) -> Result< - models::EmergencyAccessGrantorDetailsResponseModelListResponseModel, - Error, -> { - let uri_str = format!("{}/emergency-access/granted", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + id: uuid::Uuid, + organization_user_accept_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + let p_organization_user_accept_request_model = organization_user_accept_request_model; + + let uri_str = format!( + "{}/emergency-access/{id}/accept", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -162,28 +171,18 @@ pub async fn emergency_access_granted_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_accept_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGrantorDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGrantorDetailsResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -192,17 +191,15 @@ pub async fn emergency_access_granted_get( } } -pub async fn emergency_access_id_accept_post( +pub async fn emergency_access_approve( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_user_accept_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_user_accept_request_model = organization_user_accept_request_model; let uri_str = format!( - "{}/emergency-access/{id}/accept", + "{}/emergency-access/{id}/approve", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -216,7 +213,6 @@ pub async fn emergency_access_id_accept_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_accept_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -227,7 +223,7 @@ pub async fn emergency_access_id_accept_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -236,15 +232,17 @@ pub async fn emergency_access_id_accept_post( } } -pub async fn emergency_access_id_approve_post( +pub async fn emergency_access_confirm( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_confirm_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_organization_user_confirm_request_model = organization_user_confirm_request_model; let uri_str = format!( - "{}/emergency-access/{id}/approve", + "{}/emergency-access/{id}/confirm", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -258,6 +256,7 @@ pub async fn emergency_access_id_approve_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_confirm_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -268,7 +267,7 @@ pub async fn emergency_access_id_approve_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -277,28 +276,21 @@ pub async fn emergency_access_id_approve_post( } } -pub async fn emergency_access_id_cipher_id_attachment_attachment_id_get( +pub async fn emergency_access_delete( configuration: &configuration::Configuration, id: uuid::Uuid, - cipher_id: uuid::Uuid, - attachment_id: &str, -) -> Result< - models::AttachmentResponseModel, - Error, -> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_cipher_id = cipher_id; - let p_attachment_id = attachment_id; let uri_str = format!( - "{}/emergency-access/{id}/{cipherId}/attachment/{attachmentId}", + "{}/emergency-access/{id}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()), - cipherId = crate::apis::urlencode(p_cipher_id.to_string()), - attachmentId = crate::apis::urlencode(p_attachment_id) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -311,24 +303,12 @@ pub async fn emergency_access_id_cipher_id_attachment_attachment_id_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -337,23 +317,19 @@ pub async fn emergency_access_id_cipher_id_attachment_attachment_id_get( } } -pub async fn emergency_access_id_confirm_post( +pub async fn emergency_access_get( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_user_confirm_request_model: Option, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_user_confirm_request_model = organization_user_confirm_request_model; let uri_str = format!( - "{}/emergency-access/{id}/confirm", + "{}/emergency-access/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -361,18 +337,28 @@ pub async fn emergency_access_id_confirm_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_confirm_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -381,21 +367,25 @@ pub async fn emergency_access_id_confirm_post( } } -pub async fn emergency_access_id_delete( +pub async fn emergency_access_get_attachment_data( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + cipher_id: uuid::Uuid, + attachment_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_cipher_id = cipher_id; + let p_attachment_id = attachment_id; let uri_str = format!( - "{}/emergency-access/{id}", + "{}/emergency-access/{id}/{cipherId}/attachment/{attachmentId}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()), + cipherId = crate::apis::urlencode(p_cipher_id.to_string()), + attachmentId = crate::apis::urlencode(p_attachment_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -408,12 +398,24 @@ pub async fn emergency_access_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AttachmentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AttachmentResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -422,21 +424,14 @@ pub async fn emergency_access_id_delete( } } -pub async fn emergency_access_id_delete_post( +pub async fn emergency_access_get_contacts( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/emergency-access/{id}/delete", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result< + models::EmergencyAccessGranteeDetailsResponseModelListResponseModel, + Error, +> { + let uri_str = format!("{}/emergency-access/trusted", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -449,12 +444,23 @@ pub async fn emergency_access_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -463,18 +469,13 @@ pub async fn emergency_access_id_delete_post( } } -pub async fn emergency_access_id_get( +pub async fn emergency_access_get_grantees( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/emergency-access/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); +) -> Result< + models::EmergencyAccessGrantorDetailsResponseModelListResponseModel, + Error, +> { + let uri_str = format!("{}/emergency-access/granted", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -499,12 +500,12 @@ pub async fn emergency_access_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGrantorDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGrantorDetailsResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -513,10 +514,10 @@ pub async fn emergency_access_id_get( } } -pub async fn emergency_access_id_initiate_post( +pub async fn emergency_access_initiate( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -545,8 +546,45 @@ pub async fn emergency_access_id_initiate_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn emergency_access_invite( + configuration: &configuration::Configuration, + emergency_access_invite_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_emergency_access_invite_request_model = emergency_access_invite_request_model; + + let uri_str = format!("{}/emergency-access/invite", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_emergency_access_invite_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -555,11 +593,11 @@ pub async fn emergency_access_id_initiate_post( } } -pub async fn emergency_access_id_password_post( +pub async fn emergency_access_password( configuration: &configuration::Configuration, id: uuid::Uuid, emergency_access_password_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_emergency_access_password_request_model = emergency_access_password_request_model; @@ -590,8 +628,7 @@ pub async fn emergency_access_id_password_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -600,11 +637,10 @@ pub async fn emergency_access_id_password_post( } } -pub async fn emergency_access_id_policies_get( +pub async fn emergency_access_policies( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> -{ +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -642,7 +678,7 @@ pub async fn emergency_access_id_policies_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -651,11 +687,11 @@ pub async fn emergency_access_id_policies_get( } } -pub async fn emergency_access_id_post( +pub async fn emergency_access_post( configuration: &configuration::Configuration, id: uuid::Uuid, emergency_access_update_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_emergency_access_update_request_model = emergency_access_update_request_model; @@ -686,7 +722,7 @@ pub async fn emergency_access_id_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -695,21 +731,21 @@ pub async fn emergency_access_id_post( } } -pub async fn emergency_access_id_put( +pub async fn emergency_access_post_delete( configuration: &configuration::Configuration, id: uuid::Uuid, - emergency_access_update_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_emergency_access_update_request_model = emergency_access_update_request_model; let uri_str = format!( - "{}/emergency-access/{id}", + "{}/emergency-access/{id}/delete", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -717,7 +753,6 @@ pub async fn emergency_access_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_emergency_access_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -728,7 +763,7 @@ pub async fn emergency_access_id_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -737,21 +772,21 @@ pub async fn emergency_access_id_put( } } -pub async fn emergency_access_id_reinvite_post( +pub async fn emergency_access_put( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + emergency_access_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_emergency_access_update_request_model = emergency_access_update_request_model; let uri_str = format!( - "{}/emergency-access/{id}/reinvite", + "{}/emergency-access/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -759,6 +794,7 @@ pub async fn emergency_access_id_reinvite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_emergency_access_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -769,8 +805,7 @@ pub async fn emergency_access_id_reinvite_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -779,15 +814,15 @@ pub async fn emergency_access_id_reinvite_post( } } -pub async fn emergency_access_id_reject_post( +pub async fn emergency_access_reinvite( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/emergency-access/{id}/reject", + "{}/emergency-access/{id}/reinvite", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -811,7 +846,7 @@ pub async fn emergency_access_id_reject_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -820,16 +855,15 @@ pub async fn emergency_access_id_reject_post( } } -pub async fn emergency_access_id_takeover_post( +pub async fn emergency_access_reject( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> -{ +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/emergency-access/{id}/takeover", + "{}/emergency-access/{id}/reject", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -848,24 +882,12 @@ pub async fn emergency_access_id_takeover_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessTakeoverResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessTakeoverResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -874,15 +896,15 @@ pub async fn emergency_access_id_takeover_post( } } -pub async fn emergency_access_id_view_post( +pub async fn emergency_access_takeover( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/emergency-access/{id}/view", + "{}/emergency-access/{id}/takeover", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -912,12 +934,12 @@ pub async fn emergency_access_id_view_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessViewResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessViewResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessTakeoverResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessTakeoverResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -926,53 +948,22 @@ pub async fn emergency_access_id_view_post( } } -pub async fn emergency_access_invite_post( +pub async fn emergency_access_view_ciphers( configuration: &configuration::Configuration, - emergency_access_invite_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_emergency_access_invite_request_model = emergency_access_invite_request_model; + let p_id = id; - let uri_str = format!("{}/emergency-access/invite", configuration.base_path); + let uri_str = format!( + "{}/emergency-access/{id}/view", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_emergency_access_invite_request_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn emergency_access_trusted_get( - configuration: &configuration::Configuration, -) -> Result< - models::EmergencyAccessGranteeDetailsResponseModelListResponseModel, - Error, -> { - let uri_str = format!("{}/emergency-access/trusted", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -995,12 +986,12 @@ pub async fn emergency_access_trusted_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessGranteeDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EmergencyAccessViewResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EmergencyAccessViewResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/events_api.rs b/crates/bitwarden-api-api/src/apis/events_api.rs index 8cd8fcc4b..325ae208a 100644 --- a/crates/bitwarden-api-api/src/apis/events_api.rs +++ b/crates/bitwarden-api-api/src/apis/events_api.rs @@ -14,55 +14,69 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`ciphers_id_events_get`] +/// struct for typed errors of method [`events_get_cipher`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersIdEventsGetError { +pub enum EventsGetCipherError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`events_get`] +/// struct for typed errors of method [`events_get_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum EventsGetError { +pub enum EventsGetOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_events_get`] +/// struct for typed errors of method [`events_get_organization_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdEventsGetError { +pub enum EventsGetOrganizationUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_events_get`] +/// struct for typed errors of method [`events_get_projects`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdEventsGetError { +pub enum EventsGetProjectsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_events_get`] +/// struct for typed errors of method [`events_get_provider`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdEventsGetError { +pub enum EventsGetProviderError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_events_get`] +/// struct for typed errors of method [`events_get_provider_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdEventsGetError { +pub enum EventsGetProviderUserError { UnknownValue(serde_json::Value), } -pub async fn ciphers_id_events_get( +/// struct for typed errors of method [`events_get_secrets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EventsGetSecretsError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`events_get_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EventsGetUserError { + UnknownValue(serde_json::Value), +} + +pub async fn events_get_cipher( configuration: &configuration::Configuration, id: &str, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_start = start; @@ -112,7 +126,7 @@ pub async fn ciphers_id_events_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -121,18 +135,24 @@ pub async fn ciphers_id_events_get( } } -pub async fn events_get( +pub async fn events_get_organization( configuration: &configuration::Configuration, + id: &str, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; let p_start = start; let p_end = end; let p_continuation_token = continuation_token; - let uri_str = format!("{}/events", configuration.base_path); + let uri_str = format!( + "{}/organizations/{id}/events", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_start { @@ -171,7 +191,7 @@ pub async fn events_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -180,22 +200,25 @@ pub async fn events_get( } } -pub async fn organizations_id_events_get( +pub async fn events_get_organization_user( configuration: &configuration::Configuration, + org_id: &str, id: &str, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions + let p_org_id = org_id; let p_id = id; let p_start = start; let p_end = end; let p_continuation_token = continuation_token; let uri_str = format!( - "{}/organizations/{id}/events", + "{}/organizations/{orgId}/users/{id}/events", configuration.base_path, + orgId = crate::apis::urlencode(p_org_id), id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -236,7 +259,7 @@ pub async fn organizations_id_events_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -245,29 +268,26 @@ pub async fn organizations_id_events_get( } } -pub async fn organizations_org_id_users_id_events_get( +pub async fn events_get_projects( configuration: &configuration::Configuration, - org_id: &str, - id: &str, + id: uuid::Uuid, + org_id: uuid::Uuid, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result< - models::EventResponseModelListResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; let p_id = id; + let p_org_id = org_id; let p_start = start; let p_end = end; let p_continuation_token = continuation_token; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/events", + "{}/organization/{orgId}/projects/{id}/events", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id), - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()), + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -307,8 +327,7 @@ pub async fn organizations_org_id_users_id_events_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -317,13 +336,13 @@ pub async fn organizations_org_id_users_id_events_get( } } -pub async fn providers_provider_id_events_get( +pub async fn events_get_provider( configuration: &configuration::Configuration, provider_id: uuid::Uuid, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_start = start; @@ -373,7 +392,7 @@ pub async fn providers_provider_id_events_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -382,17 +401,14 @@ pub async fn providers_provider_id_events_get( } } -pub async fn providers_provider_id_users_id_events_get( +pub async fn events_get_provider_user( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, start: Option, end: Option, continuation_token: Option<&str>, -) -> Result< - models::EventResponseModelListResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -444,8 +460,134 @@ pub async fn providers_provider_id_users_id_events_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn events_get_secrets( + configuration: &configuration::Configuration, + id: uuid::Uuid, + org_id: uuid::Uuid, + start: Option, + end: Option, + continuation_token: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + let p_org_id = org_id; + let p_start = start; + let p_end = end; + let p_continuation_token = continuation_token; + + let uri_str = format!( + "{}/organization/{orgId}/secrets/{id}/events", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()), + orgId = crate::apis::urlencode(p_org_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_start { + req_builder = req_builder.query(&[("start", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_end { + req_builder = req_builder.query(&[("end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_continuation_token { + req_builder = req_builder.query(&[("continuationToken", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EventResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EventResponseModelListResponseModel`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn events_get_user( + configuration: &configuration::Configuration, + start: Option, + end: Option, + continuation_token: Option<&str>, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_start = start; + let p_end = end; + let p_continuation_token = continuation_token; + + let uri_str = format!("{}/events", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_start { + req_builder = req_builder.query(&[("start", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_end { + req_builder = req_builder.query(&[("end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_continuation_token { + req_builder = req_builder.query(&[("continuationToken", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EventResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::EventResponseModelListResponseModel`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/folders_api.rs b/crates/bitwarden-api-api/src/apis/folders_api.rs index e48e0f34c..93a7cb460 100644 --- a/crates/bitwarden-api-api/src/apis/folders_api.rs +++ b/crates/bitwarden-api-api/src/apis/folders_api.rs @@ -14,66 +14,74 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`folders_all_delete`] +/// struct for typed errors of method [`folders_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersAllDeleteError { +pub enum FoldersDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_get`] +/// struct for typed errors of method [`folders_delete_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersGetError { +pub enum FoldersDeleteAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_id_delete`] +/// struct for typed errors of method [`folders_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersIdDeleteError { +pub enum FoldersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_id_delete_post`] +/// struct for typed errors of method [`folders_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersIdDeletePostError { +pub enum FoldersGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_id_get`] +/// struct for typed errors of method [`folders_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersIdGetError { +pub enum FoldersPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_id_post`] +/// struct for typed errors of method [`folders_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersIdPostError { +pub enum FoldersPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_id_put`] +/// struct for typed errors of method [`folders_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersIdPutError { +pub enum FoldersPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`folders_post`] +/// struct for typed errors of method [`folders_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum FoldersPostError { +pub enum FoldersPutError { UnknownValue(serde_json::Value), } -pub async fn folders_all_delete( +pub async fn folders_delete( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/folders/all", configuration.base_path); + id: &str, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + + let uri_str = format!( + "{}/folders/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration .client .request(reqwest::Method::DELETE, &uri_str); @@ -94,7 +102,7 @@ pub async fn folders_all_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -103,11 +111,13 @@ pub async fn folders_all_delete( } } -pub async fn folders_get( +pub async fn folders_delete_all( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/folders", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); +) -> Result<(), Error> { + let uri_str = format!("{}/folders/all", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -120,23 +130,12 @@ pub async fn folders_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FolderResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FolderResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -145,10 +144,10 @@ pub async fn folders_get( } } -pub async fn folders_id_delete( +pub async fn folders_get( configuration: &configuration::Configuration, id: &str, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -157,9 +156,7 @@ pub async fn folders_id_delete( configuration.base_path, id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -172,12 +169,23 @@ pub async fn folders_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FolderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FolderResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -186,21 +194,11 @@ pub async fn folders_id_delete( } } -pub async fn folders_id_delete_post( +pub async fn folders_get_all( configuration: &configuration::Configuration, - id: &str, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/folders/{id}/delete", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/folders", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -213,12 +211,23 @@ pub async fn folders_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FolderResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FolderResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -227,19 +236,17 @@ pub async fn folders_id_delete_post( } } -pub async fn folders_id_get( +pub async fn folders_post( configuration: &configuration::Configuration, - id: &str, -) -> Result> { + folder_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_folder_request_model = folder_request_model; - let uri_str = format!( - "{}/folders/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/folders", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -247,6 +254,7 @@ pub async fn folders_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_folder_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -268,7 +276,7 @@ pub async fn folders_id_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -277,17 +285,15 @@ pub async fn folders_id_get( } } -pub async fn folders_id_post( +pub async fn folders_post_delete( configuration: &configuration::Configuration, id: &str, - folder_request_model: Option, -) -> Result> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_folder_request_model = folder_request_model; let uri_str = format!( - "{}/folders/{id}", + "{}/folders/{id}/delete", configuration.base_path, id = crate::apis::urlencode(p_id) ); @@ -301,29 +307,17 @@ pub async fn folders_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_folder_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FolderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FolderResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -332,11 +326,11 @@ pub async fn folders_id_post( } } -pub async fn folders_id_put( +pub async fn folders_post_put( configuration: &configuration::Configuration, id: &str, folder_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_folder_request_model = folder_request_model; @@ -346,7 +340,9 @@ pub async fn folders_id_put( configuration.base_path, id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -376,7 +372,7 @@ pub async fn folders_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -385,17 +381,21 @@ pub async fn folders_id_put( } } -pub async fn folders_post( +pub async fn folders_put( configuration: &configuration::Configuration, + id: &str, folder_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; let p_folder_request_model = folder_request_model; - let uri_str = format!("{}/folders", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/folders/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -425,7 +425,7 @@ pub async fn folders_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/groups_api.rs b/crates/bitwarden-api-api/src/apis/groups_api.rs index 2adc32ce6..5e20384ac 100644 --- a/crates/bitwarden-api-api/src/apis/groups_api.rs +++ b/crates/bitwarden-api-api/src/apis/groups_api.rs @@ -14,110 +14,109 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_org_id_groups_delete`] +/// struct for typed errors of method [`groups_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsDeleteError { +pub enum GroupsBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_delete_post`] +/// struct for typed errors of method [`groups_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsDeletePostError { +pub enum GroupsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_details_get`] +/// struct for typed errors of method [`groups_delete_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsDetailsGetError { +pub enum GroupsDeleteUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_get`] +/// struct for typed errors of method [`groups_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsGetError { +pub enum GroupsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_delete`] +/// struct for typed errors of method [`groups_get_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdDeleteError { +pub enum GroupsGetDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_delete_post`] +/// struct for typed errors of method [`groups_get_organization_group_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdDeletePostError { +pub enum GroupsGetOrganizationGroupDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_org_id_groups_id_delete_user_org_user_id_post`] +/// struct for typed errors of method [`groups_get_organization_groups`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdDeleteUserOrgUserIdPostError { +pub enum GroupsGetOrganizationGroupsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_details_get`] +/// struct for typed errors of method [`groups_get_users`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdDetailsGetError { +pub enum GroupsGetUsersError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_get`] +/// struct for typed errors of method [`groups_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdGetError { +pub enum GroupsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_post`] +/// struct for typed errors of method [`groups_post_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdPostError { +pub enum GroupsPostBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_put`] +/// struct for typed errors of method [`groups_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdPutError { +pub enum GroupsPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_user_org_user_id_delete`] +/// struct for typed errors of method [`groups_post_delete_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdUserOrgUserIdDeleteError { +pub enum GroupsPostDeleteUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_users_get`] +/// struct for typed errors of method [`groups_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdUsersGetError { +pub enum GroupsPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_post`] +/// struct for typed errors of method [`groups_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdGroupsPostError { +pub enum GroupsPutError { UnknownValue(serde_json::Value), } -pub async fn organizations_org_id_groups_delete( +pub async fn groups_bulk_delete( configuration: &configuration::Configuration, org_id: &str, group_bulk_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_group_bulk_request_model = group_bulk_request_model; @@ -148,8 +147,7 @@ pub async fn organizations_org_id_groups_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -158,23 +156,24 @@ pub async fn organizations_org_id_groups_delete( } } -pub async fn organizations_org_id_groups_delete_post( +pub async fn groups_delete( configuration: &configuration::Configuration, org_id: &str, - group_bulk_request_model: Option, -) -> Result<(), Error> { + id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_group_bulk_request_model = group_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/groups/delete", + "{}/organizations/{orgId}/groups/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id) + orgId = crate::apis::urlencode(p_org_id), + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -182,7 +181,6 @@ pub async fn organizations_org_id_groups_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_group_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -193,8 +191,7 @@ pub async fn organizations_org_id_groups_delete_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -203,22 +200,27 @@ pub async fn organizations_org_id_groups_delete_post( } } -pub async fn organizations_org_id_groups_details_get( +pub async fn groups_delete_user( configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result< - models::GroupDetailsResponseModelListResponseModel, - Error, -> { + org_id: &str, + id: &str, + org_user_id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_id = id; + let p_org_user_id = org_user_id; let uri_str = format!( - "{}/organizations/{orgId}/groups/details", + "{}/organizations/{orgId}/groups/{id}/user/{orgUserId}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id), + id = crate::apis::urlencode(p_id), + orgUserId = crate::apis::urlencode(p_org_user_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -231,24 +233,12 @@ pub async fn organizations_org_id_groups_details_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupDetailsResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -257,17 +247,20 @@ pub async fn organizations_org_id_groups_details_get( } } -pub async fn organizations_org_id_groups_get( +pub async fn groups_get( configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result> { + org_id: &str, + id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/groups", + "{}/organizations/{orgId}/groups/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id), + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -293,12 +286,12 @@ pub async fn organizations_org_id_groups_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -307,24 +300,22 @@ pub async fn organizations_org_id_groups_get( } } -pub async fn organizations_org_id_groups_id_delete( +pub async fn groups_get_details( configuration: &configuration::Configuration, org_id: &str, id: &str, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}", + "{}/organizations/{orgId}/groups/{id}/details", configuration.base_path, orgId = crate::apis::urlencode(p_org_id), id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -337,13 +328,23 @@ pub async fn organizations_org_id_groups_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -352,24 +353,22 @@ pub async fn organizations_org_id_groups_id_delete( } } -pub async fn organizations_org_id_groups_id_delete_post( +pub async fn groups_get_organization_group_details( configuration: &configuration::Configuration, - org_id: &str, - id: &str, -) -> Result<(), Error> { + org_id: uuid::Uuid, +) -> Result< + models::GroupDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/delete", + "{}/organizations/{orgId}/groups/details", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id), - id = crate::apis::urlencode(p_id) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -382,12 +381,23 @@ pub async fn organizations_org_id_groups_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -397,27 +407,19 @@ pub async fn organizations_org_id_groups_id_delete_post( } } -pub async fn organizations_org_id_groups_id_delete_user_org_user_id_post( +pub async fn groups_get_organization_groups( configuration: &configuration::Configuration, - org_id: &str, - id: &str, - org_user_id: &str, -) -> Result<(), Error> { + org_id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; - let p_org_user_id = org_user_id; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/delete-user/{orgUserId}", + "{}/organizations/{orgId}/groups", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id), - id = crate::apis::urlencode(p_id), - orgUserId = crate::apis::urlencode(p_org_user_id) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -430,13 +432,23 @@ pub async fn organizations_org_id_groups_id_delete_user_org_user_id_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -445,17 +457,17 @@ pub async fn organizations_org_id_groups_id_delete_user_org_user_id_post( } } -pub async fn organizations_org_id_groups_id_details_get( +pub async fn groups_get_users( configuration: &configuration::Configuration, org_id: &str, id: &str, -) -> Result> { +) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/details", + "{}/organizations/{orgId}/groups/{id}/users", configuration.base_path, orgId = crate::apis::urlencode(p_org_id), id = crate::apis::urlencode(p_id) @@ -484,13 +496,12 @@ pub async fn organizations_org_id_groups_id_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<uuid::Uuid>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<uuid::Uuid>`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -499,22 +510,23 @@ pub async fn organizations_org_id_groups_id_details_get( } } -pub async fn organizations_org_id_groups_id_get( +pub async fn groups_post( configuration: &configuration::Configuration, - org_id: &str, - id: &str, -) -> Result> { + org_id: uuid::Uuid, + group_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_group_request_model = group_request_model; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}", + "{}/organizations/{orgId}/groups", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id), - id = crate::apis::urlencode(p_id) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -522,6 +534,7 @@ pub async fn organizations_org_id_groups_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_group_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -543,8 +556,7 @@ pub async fn organizations_org_id_groups_id_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -553,22 +565,19 @@ pub async fn organizations_org_id_groups_id_get( } } -pub async fn organizations_org_id_groups_id_post( +pub async fn groups_post_bulk_delete( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - id: uuid::Uuid, - group_request_model: Option, -) -> Result> { + org_id: &str, + group_bulk_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; - let p_group_request_model = group_request_model; + let p_group_bulk_request_model = group_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}", + "{}/organizations/{orgId}/groups/delete", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id) ); let mut req_builder = configuration .client @@ -580,30 +589,18 @@ pub async fn organizations_org_id_groups_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_group_request_model); + req_builder = req_builder.json(&p_group_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -612,24 +609,24 @@ pub async fn organizations_org_id_groups_id_post( } } -pub async fn organizations_org_id_groups_id_put( +pub async fn groups_post_delete( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - id: uuid::Uuid, - group_request_model: Option, -) -> Result> { + org_id: &str, + id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; - let p_group_request_model = group_request_model; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}", + "{}/organizations/{orgId}/groups/{id}/delete", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id), + id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -637,30 +634,17 @@ pub async fn organizations_org_id_groups_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_group_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -669,19 +653,19 @@ pub async fn organizations_org_id_groups_id_put( } } -pub async fn organizations_org_id_groups_id_user_org_user_id_delete( +pub async fn groups_post_delete_user( configuration: &configuration::Configuration, org_id: &str, id: &str, org_user_id: &str, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let p_org_user_id = org_user_id; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/user/{orgUserId}", + "{}/organizations/{orgId}/groups/{id}/delete-user/{orgUserId}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id), id = crate::apis::urlencode(p_id), @@ -689,7 +673,7 @@ pub async fn organizations_org_id_groups_id_user_org_user_id_delete( ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -707,8 +691,7 @@ pub async fn organizations_org_id_groups_id_user_org_user_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -717,22 +700,26 @@ pub async fn organizations_org_id_groups_id_user_org_user_id_delete( } } -pub async fn organizations_org_id_groups_id_users_get( +pub async fn groups_post_put( configuration: &configuration::Configuration, - org_id: &str, - id: &str, -) -> Result, Error> { + org_id: uuid::Uuid, + id: uuid::Uuid, + group_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; + let p_group_request_model = group_request_model; let uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/users", + "{}/organizations/{orgId}/groups/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id), - id = crate::apis::urlencode(p_id) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -740,6 +727,7 @@ pub async fn organizations_org_id_groups_id_users_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_group_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -756,13 +744,12 @@ pub async fn organizations_org_id_groups_id_users_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<uuid::Uuid>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<uuid::Uuid>`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GroupResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GroupResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -771,23 +758,24 @@ pub async fn organizations_org_id_groups_id_users_get( } } -pub async fn organizations_org_id_groups_post( +pub async fn groups_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, + id: uuid::Uuid, group_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_id = id; let p_group_request_model = group_request_model; let uri_str = format!( - "{}/organizations/{orgId}/groups", + "{}/organizations/{orgId}/groups/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -817,7 +805,7 @@ pub async fn organizations_org_id_groups_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/hibp_api.rs b/crates/bitwarden-api-api/src/apis/hibp_api.rs index 75a0a1fcc..5cbb0a57a 100644 --- a/crates/bitwarden-api-api/src/apis/hibp_api.rs +++ b/crates/bitwarden-api-api/src/apis/hibp_api.rs @@ -14,17 +14,17 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`hibp_breach_get`] +/// struct for typed errors of method [`hibp_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum HibpBreachGetError { +pub enum HibpGetError { UnknownValue(serde_json::Value), } -pub async fn hibp_breach_get( +pub async fn hibp_get( configuration: &configuration::Configuration, username: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_username = username; @@ -50,7 +50,7 @@ pub async fn hibp_breach_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/import_ciphers_api.rs b/crates/bitwarden-api-api/src/apis/import_ciphers_api.rs index e6f767748..d0ac3d38f 100644 --- a/crates/bitwarden-api-api/src/apis/import_ciphers_api.rs +++ b/crates/bitwarden-api-api/src/apis/import_ciphers_api.rs @@ -14,46 +14,39 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`ciphers_import_organization_post`] +/// struct for typed errors of method [`import_ciphers_post_import`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersImportOrganizationPostError { +pub enum ImportCiphersPostImportError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`ciphers_import_post`] +/// struct for typed errors of method [`import_ciphers_post_import_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CiphersImportPostError { +pub enum ImportCiphersPostImportOrganizationError { UnknownValue(serde_json::Value), } -pub async fn ciphers_import_organization_post( +pub async fn import_ciphers_post_import( configuration: &configuration::Configuration, - organization_id: Option<&str>, - import_organization_ciphers_request_model: Option< - models::ImportOrganizationCiphersRequestModel, - >, -) -> Result<(), Error> { + import_ciphers_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_import_organization_ciphers_request_model = import_organization_ciphers_request_model; + let p_import_ciphers_request_model = import_ciphers_request_model; - let uri_str = format!("{}/ciphers/import-organization", configuration.base_path); + let uri_str = format!("{}/ciphers/import", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_import_organization_ciphers_request_model); + req_builder = req_builder.json(&p_import_ciphers_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -64,8 +57,7 @@ pub async fn ciphers_import_organization_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -74,25 +66,32 @@ pub async fn ciphers_import_organization_post( } } -pub async fn ciphers_import_post( +pub async fn import_ciphers_post_import_organization( configuration: &configuration::Configuration, - import_ciphers_request_model: Option, -) -> Result<(), Error> { + organization_id: Option<&str>, + import_organization_ciphers_request_model: Option< + models::ImportOrganizationCiphersRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_import_ciphers_request_model = import_ciphers_request_model; + let p_organization_id = organization_id; + let p_import_organization_ciphers_request_model = import_organization_ciphers_request_model; - let uri_str = format!("{}/ciphers/import", configuration.base_path); + let uri_str = format!("{}/ciphers/import-organization", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_import_ciphers_request_model); + req_builder = req_builder.json(&p_import_organization_ciphers_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -103,7 +102,8 @@ pub async fn ciphers_import_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/info_api.rs b/crates/bitwarden-api-api/src/apis/info_api.rs index c3511a58e..6abd9007a 100644 --- a/crates/bitwarden-api-api/src/apis/info_api.rs +++ b/crates/bitwarden-api-api/src/apis/info_api.rs @@ -14,30 +14,30 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`alive_get`] +/// struct for typed errors of method [`info_get_alive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AliveGetError { +pub enum InfoGetAliveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`now_get`] +/// struct for typed errors of method [`info_get_now`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum NowGetError { +pub enum InfoGetNowError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`version_get`] +/// struct for typed errors of method [`info_get_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum VersionGetError { +pub enum InfoGetVersionError { UnknownValue(serde_json::Value), } -pub async fn alive_get( +pub async fn info_get_alive( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/alive", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -68,7 +68,7 @@ pub async fn alive_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -77,9 +77,9 @@ pub async fn alive_get( } } -pub async fn now_get( +pub async fn info_get_now( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/now", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -110,7 +110,7 @@ pub async fn now_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -119,9 +119,9 @@ pub async fn now_get( } } -pub async fn version_get( +pub async fn info_get_version( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!("{}/version", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -141,7 +141,7 @@ pub async fn version_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/installations_api.rs b/crates/bitwarden-api-api/src/apis/installations_api.rs index 38d362f42..b440fcc0b 100644 --- a/crates/bitwarden-api-api/src/apis/installations_api.rs +++ b/crates/bitwarden-api-api/src/apis/installations_api.rs @@ -14,10 +14,10 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`installations_id_get`] +/// struct for typed errors of method [`installations_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum InstallationsIdGetError { +pub enum InstallationsGetError { UnknownValue(serde_json::Value), } @@ -28,10 +28,10 @@ pub enum InstallationsPostError { UnknownValue(serde_json::Value), } -pub async fn installations_id_get( +pub async fn installations_get( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -69,7 +69,7 @@ pub async fn installations_id_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/invoices_api.rs b/crates/bitwarden-api-api/src/apis/invoices_api.rs index 30742faf8..fbc36e1ff 100644 --- a/crates/bitwarden-api-api/src/apis/invoices_api.rs +++ b/crates/bitwarden-api-api/src/apis/invoices_api.rs @@ -14,19 +14,19 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`invoices_preview_organization_post`] +/// struct for typed errors of method [`invoices_preview_invoice`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum InvoicesPreviewOrganizationPostError { +pub enum InvoicesPreviewInvoiceError { UnknownValue(serde_json::Value), } -pub async fn invoices_preview_organization_post( +pub async fn invoices_preview_invoice( configuration: &configuration::Configuration, preview_organization_invoice_request_body: Option< models::PreviewOrganizationInvoiceRequestBody, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_preview_organization_invoice_request_body = preview_organization_invoice_request_body; @@ -52,8 +52,7 @@ pub async fn invoices_preview_organization_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/licenses_api.rs b/crates/bitwarden-api-api/src/apis/licenses_api.rs index c6018738d..f0dac6473 100644 --- a/crates/bitwarden-api-api/src/apis/licenses_api.rs +++ b/crates/bitwarden-api-api/src/apis/licenses_api.rs @@ -14,46 +14,45 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`licenses_organization_id_get`] +/// struct for typed errors of method [`licenses_get_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum LicensesOrganizationIdGetError { +pub enum LicensesGetUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`licenses_user_id_get`] +/// struct for typed errors of method [`licenses_organization_sync`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum LicensesUserIdGetError { +pub enum LicensesOrganizationSyncError { UnknownValue(serde_json::Value), } -pub async fn licenses_organization_id_get( +pub async fn licenses_get_user( configuration: &configuration::Configuration, id: &str, - self_hosted_organization_license_request_model: Option< - models::SelfHostedOrganizationLicenseRequestModel, - >, -) -> Result> { + key: Option<&str>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_self_hosted_organization_license_request_model = - self_hosted_organization_license_request_model; + let p_key = key; let uri_str = format!( - "{}/licenses/organization/{id}", + "{}/licenses/user/{id}", configuration.base_path, id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_key { + req_builder = req_builder.query(&[("key", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_self_hosted_organization_license_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -70,12 +69,12 @@ pub async fn licenses_organization_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationLicense`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationLicense`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserLicense`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserLicense`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -84,31 +83,32 @@ pub async fn licenses_organization_id_get( } } -pub async fn licenses_user_id_get( +pub async fn licenses_organization_sync( configuration: &configuration::Configuration, id: &str, - key: Option<&str>, -) -> Result> { + self_hosted_organization_license_request_model: Option< + models::SelfHostedOrganizationLicenseRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_key = key; + let p_self_hosted_organization_license_request_model = + self_hosted_organization_license_request_model; let uri_str = format!( - "{}/licenses/user/{id}", + "{}/licenses/organization/{id}", configuration.base_path, id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = p_key { - req_builder = req_builder.query(&[("key", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_self_hosted_organization_license_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -125,12 +125,12 @@ pub async fn licenses_user_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserLicense`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserLicense`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationLicense`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationLicense`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/misc_api.rs b/crates/bitwarden-api-api/src/apis/misc_api.rs index cfa45a822..310c0bbce 100644 --- a/crates/bitwarden-api-api/src/apis/misc_api.rs +++ b/crates/bitwarden-api-api/src/apis/misc_api.rs @@ -14,24 +14,24 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`bitpay_invoice_post`] +/// struct for typed errors of method [`misc_post_bit_pay_invoice`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum BitpayInvoicePostError { +pub enum MiscPostBitPayInvoiceError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`setup_payment_post`] +/// struct for typed errors of method [`misc_post_setup_payment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SetupPaymentPostError { +pub enum MiscPostSetupPaymentError { UnknownValue(serde_json::Value), } -pub async fn bitpay_invoice_post( +pub async fn misc_post_bit_pay_invoice( configuration: &configuration::Configuration, bit_pay_invoice_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_bit_pay_invoice_request_model = bit_pay_invoice_request_model; @@ -68,7 +68,7 @@ pub async fn bitpay_invoice_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -77,9 +77,9 @@ pub async fn bitpay_invoice_post( } } -pub async fn setup_payment_post( +pub async fn misc_post_setup_payment( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/setup-payment", configuration.base_path); let mut req_builder = configuration .client @@ -112,7 +112,7 @@ pub async fn setup_payment_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/mod.rs b/crates/bitwarden-api-api/src/apis/mod.rs index 66d0f0cdb..bbe62e986 100644 --- a/crates/bitwarden-api-api/src/apis/mod.rs +++ b/crates/bitwarden-api-api/src/apis/mod.rs @@ -143,6 +143,7 @@ pub mod organization_domain_api; pub mod organization_export_api; pub mod organization_integration_api; pub mod organization_integration_configuration_api; +pub mod organization_reports_api; pub mod organization_sponsorships_api; pub mod organization_users_api; pub mod organizations_api; @@ -163,6 +164,7 @@ pub mod secrets_api; pub mod secrets_manager_events_api; pub mod secrets_manager_porting_api; pub mod security_task_api; +pub mod self_hosted_account_billing_api; pub mod self_hosted_organization_licenses_api; pub mod self_hosted_organization_sponsorships_api; pub mod sends_api; diff --git a/crates/bitwarden-api-api/src/apis/notifications_api.rs b/crates/bitwarden-api-api/src/apis/notifications_api.rs index 23524dc14..4af5fc248 100644 --- a/crates/bitwarden-api-api/src/apis/notifications_api.rs +++ b/crates/bitwarden-api-api/src/apis/notifications_api.rs @@ -14,34 +14,34 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`notifications_get`] +/// struct for typed errors of method [`notifications_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum NotificationsGetError { +pub enum NotificationsListError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`notifications_id_delete_patch`] +/// struct for typed errors of method [`notifications_mark_as_deleted`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum NotificationsIdDeletePatchError { +pub enum NotificationsMarkAsDeletedError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`notifications_id_read_patch`] +/// struct for typed errors of method [`notifications_mark_as_read`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum NotificationsIdReadPatchError { +pub enum NotificationsMarkAsReadError { UnknownValue(serde_json::Value), } -pub async fn notifications_get( +pub async fn notifications_list( configuration: &configuration::Configuration, read_status_filter: Option, deleted_status_filter: Option, continuation_token: Option<&str>, page_size: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_read_status_filter = read_status_filter; let p_deleted_status_filter = deleted_status_filter; @@ -90,7 +90,7 @@ pub async fn notifications_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -99,10 +99,10 @@ pub async fn notifications_get( } } -pub async fn notifications_id_delete_patch( +pub async fn notifications_mark_as_deleted( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -131,7 +131,7 @@ pub async fn notifications_id_delete_patch( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -140,10 +140,10 @@ pub async fn notifications_id_delete_patch( } } -pub async fn notifications_id_read_patch( +pub async fn notifications_mark_as_read( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -172,7 +172,7 @@ pub async fn notifications_id_read_patch( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_auth_requests_api.rs b/crates/bitwarden-api-api/src/apis/organization_auth_requests_api.rs index 50138e8b3..ab309b761 100644 --- a/crates/bitwarden-api-api/src/apis/organization_auth_requests_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_auth_requests_api.rs @@ -14,41 +14,41 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_org_id_auth_requests_deny_post`] +/// struct for typed errors of method [`organization_auth_requests_bulk_deny_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdAuthRequestsDenyPostError { +pub enum OrganizationAuthRequestsBulkDenyRequestsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_auth_requests_get`] +/// struct for typed errors of method [`organization_auth_requests_get_pending_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdAuthRequestsGetError { +pub enum OrganizationAuthRequestsGetPendingRequestsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_auth_requests_post`] +/// struct for typed errors of method [`organization_auth_requests_update_auth_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdAuthRequestsPostError { +pub enum OrganizationAuthRequestsUpdateAuthRequestError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_auth_requests_request_id_post`] +/// struct for typed errors of method [`organization_auth_requests_update_many_auth_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdAuthRequestsRequestIdPostError { +pub enum OrganizationAuthRequestsUpdateManyAuthRequestsError { UnknownValue(serde_json::Value), } -pub async fn organizations_org_id_auth_requests_deny_post( +pub async fn organization_auth_requests_bulk_deny_requests( configuration: &configuration::Configuration, org_id: uuid::Uuid, bulk_deny_admin_auth_request_request_model: Option< models::BulkDenyAdminAuthRequestRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_bulk_deny_admin_auth_request_request_model = bulk_deny_admin_auth_request_request_model; @@ -79,7 +79,7 @@ pub async fn organizations_org_id_auth_requests_deny_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -89,12 +89,12 @@ pub async fn organizations_org_id_auth_requests_deny_post( } } -pub async fn organizations_org_id_auth_requests_get( +pub async fn organization_auth_requests_get_pending_requests( configuration: &configuration::Configuration, org_id: uuid::Uuid, ) -> Result< models::PendingOrganizationAuthRequestResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; @@ -133,7 +133,7 @@ pub async fn organizations_org_id_auth_requests_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -143,22 +143,22 @@ pub async fn organizations_org_id_auth_requests_get( } } -pub async fn organizations_org_id_auth_requests_post( +pub async fn organization_auth_requests_update_auth_request( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_auth_request_update_many_request_model: Option< - Vec, - >, -) -> Result<(), Error> { + request_id: uuid::Uuid, + admin_auth_request_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_auth_request_update_many_request_model = - organization_auth_request_update_many_request_model; + let p_request_id = request_id; + let p_admin_auth_request_update_request_model = admin_auth_request_update_request_model; let uri_str = format!( - "{}/organizations/{orgId}/auth-requests", + "{}/organizations/{orgId}/auth-requests/{requestId}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + requestId = crate::apis::urlencode(p_request_id.to_string()) ); let mut req_builder = configuration .client @@ -170,7 +170,7 @@ pub async fn organizations_org_id_auth_requests_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_auth_request_update_many_request_model); + req_builder = req_builder.json(&p_admin_auth_request_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -181,7 +181,7 @@ pub async fn organizations_org_id_auth_requests_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -191,22 +191,22 @@ pub async fn organizations_org_id_auth_requests_post( } } -pub async fn organizations_org_id_auth_requests_request_id_post( +pub async fn organization_auth_requests_update_many_auth_requests( configuration: &configuration::Configuration, org_id: uuid::Uuid, - request_id: uuid::Uuid, - admin_auth_request_update_request_model: Option, -) -> Result<(), Error> { + organization_auth_request_update_many_request_model: Option< + Vec, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_request_id = request_id; - let p_admin_auth_request_update_request_model = admin_auth_request_update_request_model; + let p_organization_auth_request_update_many_request_model = + organization_auth_request_update_many_request_model; let uri_str = format!( - "{}/organizations/{orgId}/auth-requests/{requestId}", + "{}/organizations/{orgId}/auth-requests", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - requestId = crate::apis::urlencode(p_request_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client @@ -218,7 +218,7 @@ pub async fn organizations_org_id_auth_requests_request_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_admin_auth_request_update_request_model); + req_builder = req_builder.json(&p_organization_auth_request_update_many_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -229,7 +229,7 @@ pub async fn organizations_org_id_auth_requests_request_id_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/organization_billing_api.rs b/crates/bitwarden-api-api/src/apis/organization_billing_api.rs index 0599efcb3..4c66107b5 100644 --- a/crates/bitwarden-api-api/src/apis/organization_billing_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_billing_api.rs @@ -14,113 +14,102 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method -/// [`organizations_organization_id_billing_change_frequency_post`] +/// struct for typed errors of method [`organization_billing_change_plan_subscription_frequency`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingChangeFrequencyPostError { +pub enum OrganizationBillingChangePlanSubscriptionFrequencyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_get`] +/// struct for typed errors of method [`organization_billing_get_billing`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingGetError { +pub enum OrganizationBillingGetBillingError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_history_get`] +/// struct for typed errors of method [`organization_billing_get_history`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingHistoryGetError { +pub enum OrganizationBillingGetHistoryError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_invoices_get`] +/// struct for typed errors of method [`organization_billing_get_invoices`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingInvoicesGetError { +pub enum OrganizationBillingGetInvoicesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_metadata_get`] +/// struct for typed errors of method [`organization_billing_get_metadata`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingMetadataGetError { +pub enum OrganizationBillingGetMetadataError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_payment_method_get`] +/// struct for typed errors of method [`organization_billing_get_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingPaymentMethodGetError { +pub enum OrganizationBillingGetPaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_payment_method_put`] +/// struct for typed errors of method [`organization_billing_get_tax_information`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingPaymentMethodPutError { +pub enum OrganizationBillingGetTaxInformationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_payment_method_verify_bank_account_post`] +/// struct for typed errors of method [`organization_billing_get_transactions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingPaymentMethodVerifyBankAccountPostError { +pub enum OrganizationBillingGetTransactionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_restart_subscription_post`] +/// struct for typed errors of method [`organization_billing_restart_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingRestartSubscriptionPostError { +pub enum OrganizationBillingRestartSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_setup_business_unit_post`] +/// struct for typed errors of method [`organization_billing_setup_business_unit`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingSetupBusinessUnitPostError { +pub enum OrganizationBillingSetupBusinessUnitError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_tax_information_get`] +/// struct for typed errors of method [`organization_billing_update_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingTaxInformationGetError { +pub enum OrganizationBillingUpdatePaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_tax_information_put`] +/// struct for typed errors of method [`organization_billing_update_tax_information`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingTaxInformationPutError { +pub enum OrganizationBillingUpdateTaxInformationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_transactions_get`] +/// struct for typed errors of method [`organization_billing_verify_bank_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingTransactionsGetError { +pub enum OrganizationBillingVerifyBankAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_warnings_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingWarningsGetError { - UnknownValue(serde_json::Value), -} - -pub async fn organizations_organization_id_billing_change_frequency_post( +pub async fn organization_billing_change_plan_subscription_frequency( configuration: &configuration::Configuration, organization_id: uuid::Uuid, change_plan_frequency_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_change_plan_frequency_request = change_plan_frequency_request; @@ -151,7 +140,7 @@ pub async fn organizations_organization_id_billing_change_frequency_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -161,10 +150,10 @@ pub async fn organizations_organization_id_billing_change_frequency_post( } } -pub async fn organizations_organization_id_billing_get( +pub async fn organization_billing_get_billing( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -191,7 +180,7 @@ pub async fn organizations_organization_id_billing_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -201,10 +190,10 @@ pub async fn organizations_organization_id_billing_get( } } -pub async fn organizations_organization_id_billing_history_get( +pub async fn organization_billing_get_history( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -231,7 +220,7 @@ pub async fn organizations_organization_id_billing_history_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -241,12 +230,12 @@ pub async fn organizations_organization_id_billing_history_get( } } -pub async fn organizations_organization_id_billing_invoices_get( +pub async fn organization_billing_get_invoices( configuration: &configuration::Configuration, organization_id: uuid::Uuid, status: Option<&str>, start_after: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_status = status; @@ -281,7 +270,7 @@ pub async fn organizations_organization_id_billing_invoices_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -291,10 +280,10 @@ pub async fn organizations_organization_id_billing_invoices_get( } } -pub async fn organizations_organization_id_billing_metadata_get( +pub async fn organization_billing_get_metadata( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -321,7 +310,7 @@ pub async fn organizations_organization_id_billing_metadata_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -331,10 +320,10 @@ pub async fn organizations_organization_id_billing_metadata_get( } } -pub async fn organizations_organization_id_billing_payment_method_get( +pub async fn organization_billing_get_payment_method( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -361,7 +350,7 @@ pub async fn organizations_organization_id_billing_payment_method_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -371,21 +360,19 @@ pub async fn organizations_organization_id_billing_payment_method_get( } } -pub async fn organizations_organization_id_billing_payment_method_put( +pub async fn organization_billing_get_tax_information( configuration: &configuration::Configuration, organization_id: uuid::Uuid, - update_payment_method_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; - let p_update_payment_method_request_body = update_payment_method_request_body; let uri_str = format!( - "{}/organizations/{organizationId}/billing/payment-method", + "{}/organizations/{organizationId}/billing/tax-information", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -393,7 +380,6 @@ pub async fn organizations_organization_id_billing_payment_method_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_payment_method_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -404,7 +390,7 @@ pub async fn organizations_organization_id_billing_payment_method_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -414,31 +400,31 @@ pub async fn organizations_organization_id_billing_payment_method_put( } } -pub async fn organizations_organization_id_billing_payment_method_verify_bank_account_post( +pub async fn organization_billing_get_transactions( configuration: &configuration::Configuration, organization_id: uuid::Uuid, - verify_bank_account_request_body: Option, -) -> Result<(), Error> { + start_after: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; - let p_verify_bank_account_request_body = verify_bank_account_request_body; + let p_start_after = start_after; let uri_str = format!( - "{}/organizations/{organizationId}/billing/payment-method/verify-bank-account", + "{}/organizations/{organizationId}/billing/transactions", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_start_after { + req_builder = req_builder.query(&[("startAfter", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_bank_account_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -449,9 +435,8 @@ pub async fn organizations_organization_id_billing_payment_method_verify_bank_ac Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationsOrganizationIdBillingPaymentMethodVerifyBankAccountPostError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -460,11 +445,11 @@ pub async fn organizations_organization_id_billing_payment_method_verify_bank_ac } } -pub async fn organizations_organization_id_billing_restart_subscription_post( +pub async fn organization_billing_restart_subscription( configuration: &configuration::Configuration, organization_id: uuid::Uuid, organization_create_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_organization_create_request_model = organization_create_request_model; @@ -495,7 +480,7 @@ pub async fn organizations_organization_id_billing_restart_subscription_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -505,11 +490,11 @@ pub async fn organizations_organization_id_billing_restart_subscription_post( } } -pub async fn organizations_organization_id_billing_setup_business_unit_post( +pub async fn organization_billing_setup_business_unit( configuration: &configuration::Configuration, organization_id: uuid::Uuid, setup_business_unit_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_setup_business_unit_request_body = setup_business_unit_request_body; @@ -540,7 +525,7 @@ pub async fn organizations_organization_id_billing_setup_business_unit_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -550,19 +535,21 @@ pub async fn organizations_organization_id_billing_setup_business_unit_post( } } -pub async fn organizations_organization_id_billing_tax_information_get( +pub async fn organization_billing_update_payment_method( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { + update_payment_method_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; + let p_update_payment_method_request_body = update_payment_method_request_body; let uri_str = format!( - "{}/organizations/{organizationId}/billing/tax-information", + "{}/organizations/{organizationId}/billing/payment-method", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -570,6 +557,7 @@ pub async fn organizations_organization_id_billing_tax_information_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_update_payment_method_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -580,7 +568,7 @@ pub async fn organizations_organization_id_billing_tax_information_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -590,11 +578,11 @@ pub async fn organizations_organization_id_billing_tax_information_get( } } -pub async fn organizations_organization_id_billing_tax_information_put( +pub async fn organization_billing_update_tax_information( configuration: &configuration::Configuration, organization_id: uuid::Uuid, tax_information_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_tax_information_request_body = tax_information_request_body; @@ -623,52 +611,7 @@ pub async fn organizations_organization_id_billing_tax_information_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn organizations_organization_id_billing_transactions_get( - configuration: &configuration::Configuration, - organization_id: uuid::Uuid, - start_after: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_start_after = start_after; - - let uri_str = format!( - "{}/organizations/{organizationId}/billing/transactions", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_start_after { - req_builder = req_builder.query(&[("startAfter", ¶m_value.to_string())]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -678,19 +621,23 @@ pub async fn organizations_organization_id_billing_transactions_get( } } -pub async fn organizations_organization_id_billing_warnings_get( +pub async fn organization_billing_verify_bank_account( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { + verify_bank_account_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; + let p_verify_bank_account_request_body = verify_bank_account_request_body; let uri_str = format!( - "{}/organizations/{organizationId}/billing/warnings", + "{}/organizations/{organizationId}/billing/payment-method/verify-bank-account", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -698,6 +645,7 @@ pub async fn organizations_organization_id_billing_warnings_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_verify_bank_account_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -708,7 +656,7 @@ pub async fn organizations_organization_id_billing_warnings_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/organization_billing_v_next_api.rs b/crates/bitwarden-api-api/src/apis/organization_billing_v_next_api.rs index 99573dcba..e395c8540 100644 --- a/crates/bitwarden-api-api/src/apis/organization_billing_v_next_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_billing_v_next_api.rs @@ -14,60 +14,56 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_billing_vnext_address_get`] +/// struct for typed errors of method [`organization_billing_v_next_add_credit_via_bit_pay`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextAddressGetError { +pub enum OrganizationBillingVNextAddCreditViaBitPayError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_vnext_address_put`] +/// struct for typed errors of method [`organization_billing_v_next_get_billing_address`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextAddressPutError { +pub enum OrganizationBillingVNextGetBillingAddressError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_vnext_credit_bitpay_post`] +/// struct for typed errors of method [`organization_billing_v_next_get_credit`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextCreditBitpayPostError { +pub enum OrganizationBillingVNextGetCreditError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_billing_vnext_credit_get`] +/// struct for typed errors of method [`organization_billing_v_next_get_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextCreditGetError { +pub enum OrganizationBillingVNextGetPaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_vnext_payment_method_get`] +/// struct for typed errors of method [`organization_billing_v_next_get_warnings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextPaymentMethodGetError { +pub enum OrganizationBillingVNextGetWarningsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_vnext_payment_method_put`] +/// struct for typed errors of method [`organization_billing_v_next_update_billing_address`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextPaymentMethodPutError { +pub enum OrganizationBillingVNextUpdateBillingAddressError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_billing_vnext_payment_method_verify_bank_account_post`] +/// struct for typed errors of method [`organization_billing_v_next_update_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdBillingVnextPaymentMethodVerifyBankAccountPostError { +pub enum OrganizationBillingVNextUpdatePaymentMethodError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_billing_vnext_address_get( +pub async fn organization_billing_v_next_add_credit_via_bit_pay( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -129,7 +125,8 @@ pub async fn organizations_organization_id_billing_vnext_address_get( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, -) -> Result<(), Error> { + bit_pay_credit_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -191,13 +188,16 @@ pub async fn organizations_organization_id_billing_vnext_address_get( let p_use_organization_domains = use_organization_domains; let p_use_admin_sponsored_families = use_admin_sponsored_families; let p_sync_seats = sync_seats; + let p_bit_pay_credit_request = bit_pay_credit_request; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/address", + "{}/organizations/{organizationId}/billing/vnext/credit/bitpay", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -387,6 +387,7 @@ pub async fn organizations_organization_id_billing_vnext_address_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_bit_pay_credit_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -397,7 +398,7 @@ pub async fn organizations_organization_id_billing_vnext_address_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -407,7 +408,7 @@ pub async fn organizations_organization_id_billing_vnext_address_get( } } -pub async fn organizations_organization_id_billing_vnext_address_put( +pub async fn organization_billing_v_next_get_billing_address( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -469,8 +470,7 @@ pub async fn organizations_organization_id_billing_vnext_address_put( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, - billing_address_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -532,14 +532,13 @@ pub async fn organizations_organization_id_billing_vnext_address_put( let p_use_organization_domains = use_organization_domains; let p_use_admin_sponsored_families = use_admin_sponsored_families; let p_sync_seats = sync_seats; - let p_billing_address_request = billing_address_request; let uri_str = format!( "{}/organizations/{organizationId}/billing/vnext/address", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -729,7 +728,6 @@ pub async fn organizations_organization_id_billing_vnext_address_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_billing_address_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -740,7 +738,7 @@ pub async fn organizations_organization_id_billing_vnext_address_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -750,7 +748,7 @@ pub async fn organizations_organization_id_billing_vnext_address_put( } } -pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( +pub async fn organization_billing_v_next_get_credit( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -812,8 +810,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, - bit_pay_credit_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -875,16 +872,13 @@ pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( let p_use_organization_domains = use_organization_domains; let p_use_admin_sponsored_families = use_admin_sponsored_families; let p_sync_seats = sync_seats; - let p_bit_pay_credit_request = bit_pay_credit_request; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/credit/bitpay", + "{}/organizations/{organizationId}/billing/vnext/credit", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -1074,7 +1068,6 @@ pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_bit_pay_credit_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1085,7 +1078,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1095,7 +1088,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_bitpay_post( } } -pub async fn organizations_organization_id_billing_vnext_credit_get( +pub async fn organization_billing_v_next_get_payment_method( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -1157,7 +1150,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_get( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -1221,7 +1214,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_get( let p_sync_seats = sync_seats; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/credit", + "{}/organizations/{organizationId}/billing/vnext/payment-method", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); @@ -1425,7 +1418,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1435,7 +1428,7 @@ pub async fn organizations_organization_id_billing_vnext_credit_get( } } -pub async fn organizations_organization_id_billing_vnext_payment_method_get( +pub async fn organization_billing_v_next_get_warnings( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -1497,7 +1490,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_get( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -1561,7 +1554,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_get( let p_sync_seats = sync_seats; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/payment-method", + "{}/organizations/{organizationId}/billing/vnext/warnings", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); @@ -1765,7 +1758,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1775,7 +1768,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_get( } } -pub async fn organizations_organization_id_billing_vnext_payment_method_put( +pub async fn organization_billing_v_next_update_billing_address( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -1837,8 +1830,8 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_put( use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, - tokenized_payment_method_request: Option, -) -> Result<(), Error> { + billing_address_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -1900,10 +1893,10 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_put( let p_use_organization_domains = use_organization_domains; let p_use_admin_sponsored_families = use_admin_sponsored_families; let p_sync_seats = sync_seats; - let p_tokenized_payment_method_request = tokenized_payment_method_request; + let p_billing_address_request = billing_address_request; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/payment-method", + "{}/organizations/{organizationId}/billing/vnext/address", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); @@ -2097,7 +2090,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_tokenized_payment_method_request); + req_builder = req_builder.json(&p_billing_address_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2108,7 +2101,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -2118,7 +2111,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_put( } } -pub async fn organizations_organization_id_billing_vnext_payment_method_verify_bank_account_post( +pub async fn organization_billing_v_next_update_payment_method( configuration: &configuration::Configuration, organization_id: &str, id: Option, @@ -2180,9 +2173,8 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_verify_b use_organization_domains: Option, use_admin_sponsored_families: Option, sync_seats: Option, - verify_bank_account_request: Option, -) -> Result<(), Error> -{ + tokenized_payment_method_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_id = id; @@ -2244,16 +2236,14 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_verify_b let p_use_organization_domains = use_organization_domains; let p_use_admin_sponsored_families = use_admin_sponsored_families; let p_sync_seats = sync_seats; - let p_verify_bank_account_request = verify_bank_account_request; + let p_tokenized_payment_method_request = tokenized_payment_method_request; let uri_str = format!( - "{}/organizations/{organizationId}/billing/vnext/payment-method/verify-bank-account", + "{}/organizations/{organizationId}/billing/vnext/payment-method", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -2443,7 +2433,7 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_verify_b if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_bank_account_request); + req_builder = req_builder.json(&p_tokenized_payment_method_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -2454,9 +2444,8 @@ pub async fn organizations_organization_id_billing_vnext_payment_method_verify_b Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationsOrganizationIdBillingVnextPaymentMethodVerifyBankAccountPostError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_connections_api.rs b/crates/bitwarden-api-api/src/apis/organization_connections_api.rs index a67bca081..b58f4d93b 100644 --- a/crates/bitwarden-api-api/src/apis/organization_connections_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_connections_api.rs @@ -14,53 +14,51 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_connections_enabled_get`] +/// struct for typed errors of method [`organization_connections_connections_enabled`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsEnabledGetError { +pub enum OrganizationConnectionsConnectionsEnabledError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_connections_organization_connection_id_delete`] +/// struct for typed errors of method [`organization_connections_create_connection`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsOrganizationConnectionIdDeleteError { +pub enum OrganizationConnectionsCreateConnectionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_connections_organization_connection_id_delete_post`] +/// struct for typed errors of method [`organization_connections_delete_connection`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsOrganizationConnectionIdDeletePostError { +pub enum OrganizationConnectionsDeleteConnectionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_connections_organization_connection_id_put`] +/// struct for typed errors of method [`organization_connections_get_connection`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsOrganizationConnectionIdPutError { +pub enum OrganizationConnectionsGetConnectionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_connections_organization_id_type_get`] +/// struct for typed errors of method [`organization_connections_post_delete_connection`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsOrganizationIdTypeGetError { +pub enum OrganizationConnectionsPostDeleteConnectionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_connections_post`] +/// struct for typed errors of method [`organization_connections_update_connection`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsConnectionsPostError { +pub enum OrganizationConnectionsUpdateConnectionError { UnknownValue(serde_json::Value), } -pub async fn organizations_connections_enabled_get( +pub async fn organization_connections_connections_enabled( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!( "{}/organizations/connections/enabled", configuration.base_path @@ -94,7 +92,7 @@ pub async fn organizations_connections_enabled_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -104,21 +102,20 @@ pub async fn organizations_connections_enabled_get( } } -pub async fn organizations_connections_organization_connection_id_delete( +pub async fn organization_connections_create_connection( configuration: &configuration::Configuration, - organization_connection_id: uuid::Uuid, -) -> Result<(), Error> { + organization_connection_request_model: Option, +) -> Result< + models::OrganizationConnectionResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_connection_id = organization_connection_id; + let p_organization_connection_request_model = organization_connection_request_model; - let uri_str = format!( - "{}/organizations/connections/{organizationConnectionId}", - configuration.base_path, - organizationConnectionId = crate::apis::urlencode(p_organization_connection_id.to_string()) - ); + let uri_str = format!("{}/organizations/connections", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -126,17 +123,29 @@ pub async fn organizations_connections_organization_connection_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_connection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationConnectionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationConnectionResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -146,21 +155,21 @@ pub async fn organizations_connections_organization_connection_id_delete( } } -pub async fn organizations_connections_organization_connection_id_delete_post( +pub async fn organization_connections_delete_connection( configuration: &configuration::Configuration, organization_connection_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_connection_id = organization_connection_id; let uri_str = format!( - "{}/organizations/connections/{organizationConnectionId}/delete", + "{}/organizations/connections/{organizationConnectionId}", configuration.base_path, organizationConnectionId = crate::apis::urlencode(p_organization_connection_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -178,7 +187,7 @@ pub async fn organizations_connections_organization_connection_id_delete_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -188,24 +197,20 @@ pub async fn organizations_connections_organization_connection_id_delete_post( } } -pub async fn organizations_connections_organization_connection_id_put( +pub async fn organization_connections_get_connection( configuration: &configuration::Configuration, - organization_connection_id: uuid::Uuid, - organization_connection_request_model: Option, + organization_id: uuid::Uuid, + r#type: models::OrganizationConnectionType, ) -> Result< models::OrganizationConnectionResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_connection_id = organization_connection_id; - let p_organization_connection_request_model = organization_connection_request_model; + let p_organization_id = organization_id; + let p_type = r#type; - let uri_str = format!( - "{}/organizations/connections/{organizationConnectionId}", - configuration.base_path, - organizationConnectionId = crate::apis::urlencode(p_organization_connection_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/organizations/connections/{organizationId}/{type}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), type=p_type.to_string()); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -213,7 +218,6 @@ pub async fn organizations_connections_organization_connection_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_connection_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -235,7 +239,7 @@ pub async fn organizations_connections_organization_connection_id_put( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -245,20 +249,21 @@ pub async fn organizations_connections_organization_connection_id_put( } } -pub async fn organizations_connections_organization_id_type_get( +pub async fn organization_connections_post_delete_connection( configuration: &configuration::Configuration, - organization_id: uuid::Uuid, - r#type: models::OrganizationConnectionType, -) -> Result< - models::OrganizationConnectionResponseModel, - Error, -> { + organization_connection_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_type = r#type; + let p_organization_connection_id = organization_connection_id; - let uri_str = format!("{}/organizations/connections/{organizationId}/{type}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), type=p_type.to_string()); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!( + "{}/organizations/connections/{organizationConnectionId}/delete", + configuration.base_path, + organizationConnectionId = crate::apis::urlencode(p_organization_connection_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -271,23 +276,12 @@ pub async fn organizations_connections_organization_id_type_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationConnectionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationConnectionResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -297,17 +291,24 @@ pub async fn organizations_connections_organization_id_type_get( } } -pub async fn organizations_connections_post( +pub async fn organization_connections_update_connection( configuration: &configuration::Configuration, + organization_connection_id: uuid::Uuid, organization_connection_request_model: Option, -) -> Result> { +) -> Result< + models::OrganizationConnectionResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions + let p_organization_connection_id = organization_connection_id; let p_organization_connection_request_model = organization_connection_request_model; - let uri_str = format!("{}/organizations/connections", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/organizations/connections/{organizationConnectionId}", + configuration.base_path, + organizationConnectionId = crate::apis::urlencode(p_organization_connection_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -337,7 +338,8 @@ pub async fn organizations_connections_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_domain_api.rs b/crates/bitwarden-api-api/src/apis/organization_domain_api.rs index b5f8c6ea3..c7e7b23ae 100644 --- a/crates/bitwarden-api-api/src/apis/organization_domain_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_domain_api.rs @@ -14,82 +14,78 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_domain_sso_details_post`] +/// struct for typed errors of method [`organization_domain_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsDomainSsoDetailsPostError { +pub enum OrganizationDomainGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_domain_sso_verified_post`] +/// struct for typed errors of method [`organization_domain_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsDomainSsoVerifiedPostError { +pub enum OrganizationDomainGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_get`] +/// struct for typed errors of method [`organization_domain_get_org_domain_sso_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainGetError { +pub enum OrganizationDomainGetOrgDomainSsoDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_id_delete`] +/// struct for typed errors of method [`organization_domain_get_verified_org_domain_sso_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainIdDeleteError { +pub enum OrganizationDomainGetVerifiedOrgDomainSsoDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_id_get`] +/// struct for typed errors of method [`organization_domain_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainIdGetError { +pub enum OrganizationDomainPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_id_remove_post`] +/// struct for typed errors of method [`organization_domain_post_remove_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainIdRemovePostError { +pub enum OrganizationDomainPostRemoveDomainError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_id_verify_post`] +/// struct for typed errors of method [`organization_domain_remove_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainIdVerifyPostError { +pub enum OrganizationDomainRemoveDomainError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_domain_post`] +/// struct for typed errors of method [`organization_domain_verify`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdDomainPostError { +pub enum OrganizationDomainVerifyError { UnknownValue(serde_json::Value), } -pub async fn organizations_domain_sso_details_post( +pub async fn organization_domain_get( configuration: &configuration::Configuration, - organization_domain_sso_details_request_model: Option< - models::OrganizationDomainSsoDetailsRequestModel, - >, -) -> Result< - models::OrganizationDomainSsoDetailsResponseModel, - Error, -> { + org_id: uuid::Uuid, + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_domain_sso_details_request_model = - organization_domain_sso_details_request_model; + let p_org_id = org_id; + let p_id = id; let uri_str = format!( - "{}/organizations/domain/sso/details", - configuration.base_path + "{}/organizations/{orgId}/domain/{id}", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -97,7 +93,6 @@ pub async fn organizations_domain_sso_details_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_domain_sso_details_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -114,13 +109,12 @@ pub async fn organizations_domain_sso_details_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainSsoDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainSsoDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -129,26 +123,22 @@ pub async fn organizations_domain_sso_details_post( } } -pub async fn organizations_domain_sso_verified_post( +pub async fn organization_domain_get_all( configuration: &configuration::Configuration, - organization_domain_sso_details_request_model: Option< - models::OrganizationDomainSsoDetailsRequestModel, - >, + org_id: uuid::Uuid, ) -> Result< - models::VerifiedOrganizationDomainSsoDetailsResponseModel, - Error, + models::OrganizationDomainResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_domain_sso_details_request_model = - organization_domain_sso_details_request_model; + let p_org_id = org_id; let uri_str = format!( - "{}/organizations/domain/sso/verified", - configuration.base_path + "{}/organizations/{orgId}/domain", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -156,7 +146,6 @@ pub async fn organizations_domain_sso_verified_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_domain_sso_details_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -173,13 +162,12 @@ pub async fn organizations_domain_sso_verified_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VerifiedOrganizationDomainSsoDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::VerifiedOrganizationDomainSsoDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -188,22 +176,26 @@ pub async fn organizations_domain_sso_verified_post( } } -pub async fn organizations_org_id_domain_get( +pub async fn organization_domain_get_org_domain_sso_details( configuration: &configuration::Configuration, - org_id: uuid::Uuid, + organization_domain_sso_details_request_model: Option< + models::OrganizationDomainSsoDetailsRequestModel, + >, ) -> Result< - models::OrganizationDomainResponseModelListResponseModel, - Error, + models::OrganizationDomainSsoDetailsResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; + let p_organization_domain_sso_details_request_model = + organization_domain_sso_details_request_model; let uri_str = format!( - "{}/organizations/{orgId}/domain", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + "{}/organizations/domain/sso/details", + configuration.base_path ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -211,6 +203,7 @@ pub async fn organizations_org_id_domain_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_domain_sso_details_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -227,12 +220,13 @@ pub async fn organizations_org_id_domain_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainSsoDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainSsoDetailsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -241,24 +235,26 @@ pub async fn organizations_org_id_domain_get( } } -pub async fn organizations_org_id_domain_id_delete( +pub async fn organization_domain_get_verified_org_domain_sso_details( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_domain_sso_details_request_model: Option< + models::OrganizationDomainSsoDetailsRequestModel, + >, +) -> Result< + models::VerifiedOrganizationDomainSsoDetailsResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - let p_id = id; + let p_organization_domain_sso_details_request_model = + organization_domain_sso_details_request_model; let uri_str = format!( - "{}/organizations/{orgId}/domain/{id}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + "{}/organizations/domain/sso/verified", + configuration.base_path ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -266,17 +262,29 @@ pub async fn organizations_org_id_domain_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_domain_sso_details_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VerifiedOrganizationDomainSsoDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::VerifiedOrganizationDomainSsoDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -286,22 +294,23 @@ pub async fn organizations_org_id_domain_id_delete( } } -pub async fn organizations_org_id_domain_id_get( +pub async fn organization_domain_post( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result> { + organization_domain_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_domain_request_model = organization_domain_request_model; let uri_str = format!( - "{}/organizations/{orgId}/domain/{id}", + "{}/organizations/{orgId}/domain", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -309,6 +318,7 @@ pub async fn organizations_org_id_domain_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_domain_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -330,8 +340,7 @@ pub async fn organizations_org_id_domain_id_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -340,11 +349,11 @@ pub async fn organizations_org_id_domain_id_get( } } -pub async fn organizations_org_id_domain_id_remove_post( +pub async fn organization_domain_post_remove_domain( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; @@ -375,7 +384,7 @@ pub async fn organizations_org_id_domain_id_remove_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -385,25 +394,24 @@ pub async fn organizations_org_id_domain_id_remove_post( } } -pub async fn organizations_org_id_domain_id_verify_post( +pub async fn organization_domain_remove_domain( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result> -{ +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/domain/{id}/verify", + "{}/organizations/{orgId}/domain/{id}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -416,23 +424,12 @@ pub async fn organizations_org_id_domain_id_verify_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationDomainResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationDomainResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -442,19 +439,20 @@ pub async fn organizations_org_id_domain_id_verify_post( } } -pub async fn organizations_org_id_domain_post( +pub async fn organization_domain_verify( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_domain_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_domain_request_model = organization_domain_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/domain", + "{}/organizations/{orgId}/domain/{id}/verify", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -466,7 +464,6 @@ pub async fn organizations_org_id_domain_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_domain_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -488,7 +485,7 @@ pub async fn organizations_org_id_domain_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_export_api.rs b/crates/bitwarden-api-api/src/apis/organization_export_api.rs index fa0e79e2f..af4df9b77 100644 --- a/crates/bitwarden-api-api/src/apis/organization_export_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_export_api.rs @@ -14,17 +14,17 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_export_get`] +/// struct for typed errors of method [`organization_export_export`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdExportGetError { +pub enum OrganizationExportExportError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_export_get( +pub async fn organization_export_export( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -51,8 +51,7 @@ pub async fn organizations_organization_id_export_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_integration_api.rs b/crates/bitwarden-api-api/src/apis/organization_integration_api.rs index 206a411ce..b3524b314 100644 --- a/crates/bitwarden-api-api/src/apis/organization_integration_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_integration_api.rs @@ -14,60 +14,59 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_integrations_get`] +/// struct for typed errors of method [`organization_integration_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsGetError { +pub enum OrganizationIntegrationCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_delete`] +/// struct for typed errors of method [`organization_integration_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdDeleteError { +pub enum OrganizationIntegrationDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_delete_post`] +/// struct for typed errors of method [`organization_integration_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdDeletePostError { +pub enum OrganizationIntegrationGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_put`] +/// struct for typed errors of method [`organization_integration_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdPutError { +pub enum OrganizationIntegrationPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_integrations_post`] +/// struct for typed errors of method [`organization_integration_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsPostError { +pub enum OrganizationIntegrationUpdateError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_integrations_get( +pub async fn organization_integration_create( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { + organization_integration_request_model: Option, +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; + let p_organization_integration_request_model = organization_integration_request_model; let uri_str = format!( "{}/organizations/{organizationId}/integrations", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -75,6 +74,7 @@ pub async fn organizations_organization_id_integrations_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_integration_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -91,12 +91,12 @@ pub async fn organizations_organization_id_integrations_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationIntegrationResponseModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationIntegrationResponseModel>`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationIntegrationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationIntegrationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -106,11 +106,11 @@ pub async fn organizations_organization_id_integrations_get( } } -pub async fn organizations_organization_id_integrations_integration_id_delete( +pub async fn organization_integration_delete( configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; @@ -141,7 +141,7 @@ pub async fn organizations_organization_id_integrations_integration_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -151,24 +151,20 @@ pub async fn organizations_organization_id_integrations_integration_id_delete( } } -pub async fn organizations_organization_id_integrations_integration_id_delete_post( +pub async fn organization_integration_get( configuration: &configuration::Configuration, organization_id: uuid::Uuid, - integration_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result, Error> +{ // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; - let p_integration_id = integration_id; let uri_str = format!( - "{}/organizations/{organizationId}/integrations/{integrationId}/delete", + "{}/organizations/{organizationId}/integrations", configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()), - integrationId = crate::apis::urlencode(p_integration_id.to_string()) + organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -181,13 +177,23 @@ pub async fn organizations_organization_id_integrations_integration_id_delete_po let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationIntegrationResponseModel>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationIntegrationResponseModel>`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -196,27 +202,24 @@ pub async fn organizations_organization_id_integrations_integration_id_delete_po } } -pub async fn organizations_organization_id_integrations_integration_id_put( +pub async fn organization_integration_post_delete( configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, - organization_integration_request_model: Option, -) -> Result< - models::OrganizationIntegrationResponseModel, - Error, -> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; - let p_organization_integration_request_model = organization_integration_request_model; let uri_str = format!( - "{}/organizations/{organizationId}/integrations/{integrationId}", + "{}/organizations/{organizationId}/integrations/{integrationId}/delete", configuration.base_path, organizationId = crate::apis::urlencode(p_organization_id.to_string()), integrationId = crate::apis::urlencode(p_integration_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -224,29 +227,17 @@ pub async fn organizations_organization_id_integrations_integration_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_integration_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationIntegrationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationIntegrationResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -256,26 +247,25 @@ pub async fn organizations_organization_id_integrations_integration_id_put( } } -pub async fn organizations_organization_id_integrations_post( +pub async fn organization_integration_update( configuration: &configuration::Configuration, organization_id: uuid::Uuid, + integration_id: uuid::Uuid, organization_integration_request_model: Option, -) -> Result< - models::OrganizationIntegrationResponseModel, - Error, -> { +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; + let p_integration_id = integration_id; let p_organization_integration_request_model = organization_integration_request_model; let uri_str = format!( - "{}/organizations/{organizationId}/integrations", + "{}/organizations/{organizationId}/integrations/{integrationId}", configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + integrationId = crate::apis::urlencode(p_integration_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -305,7 +295,7 @@ pub async fn organizations_organization_id_integrations_post( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/organization_integration_configuration_api.rs b/crates/bitwarden-api-api/src/apis/organization_integration_configuration_api.rs index 529990514..8fa90d1f9 100644 --- a/crates/bitwarden-api-api/src/apis/organization_integration_configuration_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_integration_configuration_api.rs @@ -14,59 +14,67 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete`] +/// struct for typed errors of method [`organization_integration_configuration_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsConfigurationIdDeleteError -{ +pub enum OrganizationIntegrationConfigurationCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete_post`] +/// struct for typed errors of method [`organization_integration_configuration_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsConfigurationIdDeletePostError -{ +pub enum OrganizationIntegrationConfigurationDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_configurations_configuration_id_put`] +/// struct for typed errors of method [`organization_integration_configuration_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsConfigurationIdPutError { +pub enum OrganizationIntegrationConfigurationGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_configurations_get`] +/// struct for typed errors of method [`organization_integration_configuration_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsGetError { +pub enum OrganizationIntegrationConfigurationPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_integration_id_configurations_post`] +/// struct for typed errors of method [`organization_integration_configuration_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsPostError { +pub enum OrganizationIntegrationConfigurationUpdateError { UnknownValue(serde_json::Value), } - -pub async fn organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete(configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, configuration_id: uuid::Uuid) -> Result<(), Error>{ +pub async fn organization_integration_configuration_create( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + integration_id: uuid::Uuid, + organization_integration_configuration_request_model: Option< + models::OrganizationIntegrationConfigurationRequestModel, + >, +) -> Result< + models::OrganizationIntegrationConfigurationResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; - let p_configuration_id = configuration_id; + let p_organization_integration_configuration_request_model = + organization_integration_configuration_request_model; - let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); + let uri_str = format!( + "{}/organizations/{organizationId}/integrations/{integrationId}/configurations", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + integrationId = crate::apis::urlencode(p_integration_id.to_string()) + ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -74,17 +82,30 @@ pub async fn organizations_organization_id_integrations_integration_id_configura if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_integration_configuration_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationIntegrationConfigurationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationIntegrationConfigurationResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -93,16 +114,21 @@ pub async fn organizations_organization_id_integrations_integration_id_configura } } -pub async fn organizations_organization_id_integrations_integration_id_configurations_configuration_id_delete_post(configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, configuration_id: uuid::Uuid) -> Result<(), Error>{ +pub async fn organization_integration_configuration_delete( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + integration_id: uuid::Uuid, + configuration_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; let p_configuration_id = configuration_id; - let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}/delete", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); + let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -120,7 +146,8 @@ pub async fn organizations_organization_id_integrations_integration_id_configura Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -129,29 +156,25 @@ pub async fn organizations_organization_id_integrations_integration_id_configura } } -pub async fn organizations_organization_id_integrations_integration_id_configurations_configuration_id_put( +pub async fn organization_integration_configuration_get( configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, - configuration_id: uuid::Uuid, - organization_integration_configuration_request_model: Option< - models::OrganizationIntegrationConfigurationRequestModel, - >, ) -> Result< - models::OrganizationIntegrationConfigurationResponseModel, - Error< - OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsConfigurationIdPutError, - >, + Vec, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; - let p_configuration_id = configuration_id; - let p_organization_integration_configuration_request_model = - organization_integration_configuration_request_model; - let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!( + "{}/organizations/{organizationId}/integrations/{integrationId}/configurations", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + integrationId = crate::apis::urlencode(p_integration_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -159,7 +182,6 @@ pub async fn organizations_organization_id_integrations_integration_id_configura if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_integration_configuration_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -176,12 +198,13 @@ pub async fn organizations_organization_id_integrations_integration_id_configura let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationIntegrationConfigurationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationIntegrationConfigurationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationIntegrationConfigurationResponseModel>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationIntegrationConfigurationResponseModel>`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -190,25 +213,21 @@ pub async fn organizations_organization_id_integrations_integration_id_configura } } -pub async fn organizations_organization_id_integrations_integration_id_configurations_get( +pub async fn organization_integration_configuration_post_delete( configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { + configuration_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; + let p_configuration_id = configuration_id; - let uri_str = format!( - "{}/organizations/{organizationId}/integrations/{integrationId}/configurations", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()), - integrationId = crate::apis::urlencode(p_integration_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}/delete", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -221,25 +240,13 @@ pub async fn organizations_organization_id_integrations_integration_id_configura let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationIntegrationConfigurationResponseModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationIntegrationConfigurationResponseModel>`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsGetError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -248,32 +255,27 @@ pub async fn organizations_organization_id_integrations_integration_id_configura } } -pub async fn organizations_organization_id_integrations_integration_id_configurations_post( +pub async fn organization_integration_configuration_update( configuration: &configuration::Configuration, organization_id: uuid::Uuid, integration_id: uuid::Uuid, + configuration_id: uuid::Uuid, organization_integration_configuration_request_model: Option< models::OrganizationIntegrationConfigurationRequestModel, >, ) -> Result< models::OrganizationIntegrationConfigurationResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_integration_id = integration_id; + let p_configuration_id = configuration_id; let p_organization_integration_configuration_request_model = organization_integration_configuration_request_model; - let uri_str = format!( - "{}/organizations/{organizationId}/integrations/{integrationId}/configurations", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()), - integrationId = crate::apis::urlencode(p_integration_id.to_string()) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/organizations/{organizationId}/integrations/{integrationId}/configurations/{configurationId}", configuration.base_path, organizationId=crate::apis::urlencode(p_organization_id.to_string()), integrationId=crate::apis::urlencode(p_integration_id.to_string()), configurationId=crate::apis::urlencode(p_configuration_id.to_string())); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -303,9 +305,8 @@ pub async fn organizations_organization_id_integrations_integration_id_configura } } else { let content = resp.text().await?; - let entity: Option< - OrganizationsOrganizationIdIntegrationsIntegrationIdConfigurationsPostError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_reports_api.rs b/crates/bitwarden-api-api/src/apis/organization_reports_api.rs new file mode 100644 index 000000000..9fa8f6261 --- /dev/null +++ b/crates/bitwarden-api-api/src/apis/organization_reports_api.rs @@ -0,0 +1,599 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; + +/// struct for typed errors of method [`organization_reports_create_organization_report`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsCreateOrganizationReportError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_get_latest_organization_report`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetLatestOrganizationReportError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_get_organization_report`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetOrganizationReportError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method +/// [`organization_reports_get_organization_report_application_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetOrganizationReportApplicationDataError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_get_organization_report_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetOrganizationReportDataError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_get_organization_report_summary`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetOrganizationReportSummaryError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method +/// [`organization_reports_get_organization_report_summary_data_by_date_range`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsGetOrganizationReportSummaryDataByDateRangeError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_update_organization_report`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsUpdateOrganizationReportError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method +/// [`organization_reports_update_organization_report_application_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsUpdateOrganizationReportApplicationDataError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_update_organization_report_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsUpdateOrganizationReportDataError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`organization_reports_update_organization_report_summary`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationReportsUpdateOrganizationReportSummaryError { + UnknownValue(serde_json::Value), +} + +pub async fn organization_reports_create_organization_report( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + add_organization_report_request: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_add_organization_report_request = add_organization_report_request; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_add_organization_report_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_latest_organization_report( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/latest", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_organization_report( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_organization_report_application_data( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/application/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_organization_report_data( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/report/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_organization_report_summary( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/summary/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_get_organization_report_summary_data_by_date_range( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + start_date: Option, + end_date: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_start_date = start_date; + let p_end_date = end_date; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/summary", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_start_date { + req_builder = req_builder.query(&[("startDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_end_date { + req_builder = req_builder.query(&[("endDate", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_update_organization_report( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: &str, + update_organization_report_request: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + let p_update_organization_report_request = update_organization_report_request; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_organization_report_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_update_organization_report_application_data( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, + update_organization_report_application_data_request: Option< + models::UpdateOrganizationReportApplicationDataRequest, + >, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + let p_update_organization_report_application_data_request = + update_organization_report_application_data_request; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/application/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_organization_report_application_data_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_update_organization_report_data( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, + update_organization_report_data_request: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + let p_update_organization_report_data_request = update_organization_report_data_request; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/report/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_organization_report_data_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_reports_update_organization_report_summary( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, + report_id: uuid::Uuid, + update_organization_report_summary_request: Option< + models::UpdateOrganizationReportSummaryRequest, + >, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_id = organization_id; + let p_report_id = report_id; + let p_update_organization_report_summary_request = update_organization_report_summary_request; + + let uri_str = format!( + "{}/reports/organizations/{organizationId}/data/summary/{reportId}", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()), + reportId = crate::apis::urlencode(p_report_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_organization_report_summary_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/crates/bitwarden-api-api/src/apis/organization_sponsorships_api.rs b/crates/bitwarden-api-api/src/apis/organization_sponsorships_api.rs index 2bf464a76..9bfc5f44b 100644 --- a/crates/bitwarden-api-api/src/apis/organization_sponsorships_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_sponsorships_api.rs @@ -14,125 +14,116 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organization_sponsorship_redeem_post`] +/// struct for typed errors of method +/// [`organization_sponsorships_admin_initiated_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipRedeemPostError { +pub enum OrganizationSponsorshipsAdminInitiatedRevokeSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_sponsored_sponsored_org_id_delete`] +/// struct for typed errors of method [`organization_sponsorships_create_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoredSponsoredOrgIdDeleteError { +pub enum OrganizationSponsorshipsCreateSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_sponsored_sponsored_org_id_remove_post`] +/// struct for typed errors of method [`organization_sponsorships_get_sponsored_organizations`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoredSponsoredOrgIdRemovePostError { +pub enum OrganizationSponsorshipsGetSponsoredOrganizationsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_post`] +/// struct for typed errors of method [`organization_sponsorships_get_sync_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrgIdFamiliesForEnterprisePostError { +pub enum OrganizationSponsorshipsGetSyncStatusError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post`] +/// struct for typed errors of method [`organization_sponsorships_post_remove_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrgIdFamiliesForEnterpriseResendPostError { +pub enum OrganizationSponsorshipsPostRemoveSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_revoke_delete`] +/// struct for typed errors of method [`organization_sponsorships_post_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrgIdSponsoredFriendlyNameRevokeDeleteError { +pub enum OrganizationSponsorshipsPostRevokeSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_sponsoring_org_id_sponsored_get`] +/// struct for typed errors of method [`organization_sponsorships_pre_validate_sponsorship_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrgIdSponsoredGetError { +pub enum OrganizationSponsorshipsPreValidateSponsorshipTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_sponsoring_org_id_sync_status_get`] +/// struct for typed errors of method [`organization_sponsorships_redeem_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrgIdSyncStatusGetError { +pub enum OrganizationSponsorshipsRedeemSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_sponsoring_organization_id_delete`] +/// struct for typed errors of method [`organization_sponsorships_remove_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrganizationIdDeleteError { +pub enum OrganizationSponsorshipsRemoveSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_sponsoring_organization_id_delete_post`] +/// struct for typed errors of method [`organization_sponsorships_resend_sponsorship_offer`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSponsoringOrganizationIdDeletePostError { +pub enum OrganizationSponsorshipsResendSponsorshipOfferError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_sync_post`] +/// struct for typed errors of method [`organization_sponsorships_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSyncPostError { +pub enum OrganizationSponsorshipsRevokeSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organization_sponsorship_validate_token_post`] +/// struct for typed errors of method [`organization_sponsorships_sync`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipValidateTokenPostError { +pub enum OrganizationSponsorshipsSyncError { UnknownValue(serde_json::Value), } -pub async fn organization_sponsorship_redeem_post( +pub async fn organization_sponsorships_admin_initiated_revoke_sponsorship( configuration: &configuration::Configuration, - sponsorship_token: Option<&str>, - organization_sponsorship_redeem_request_model: Option< - models::OrganizationSponsorshipRedeemRequestModel, - >, -) -> Result<(), Error> { + sponsoring_org_id: uuid::Uuid, + sponsored_friendly_name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsorship_token = sponsorship_token; - let p_organization_sponsorship_redeem_request_model = - organization_sponsorship_redeem_request_model; + let p_sponsoring_org_id = sponsoring_org_id; + let p_sponsored_friendly_name = sponsored_friendly_name; let uri_str = format!( - "{}/organization/sponsorship/redeem", - configuration.base_path + "{}/organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke", + configuration.base_path, + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()), + sponsoredFriendlyName = crate::apis::urlencode(p_sponsored_friendly_name) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); - if let Some(ref param_value) = p_sponsorship_token { - req_builder = req_builder.query(&[("sponsorshipToken", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_sponsorship_redeem_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -143,7 +134,7 @@ pub async fn organization_sponsorship_redeem_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -153,21 +144,26 @@ pub async fn organization_sponsorship_redeem_post( } } -pub async fn organization_sponsorship_sponsored_sponsored_org_id_delete( +pub async fn organization_sponsorships_create_sponsorship( configuration: &configuration::Configuration, - sponsored_org_id: uuid::Uuid, -) -> Result<(), Error> { + sponsoring_org_id: uuid::Uuid, + organization_sponsorship_create_request_model: Option< + models::OrganizationSponsorshipCreateRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsored_org_id = sponsored_org_id; + let p_sponsoring_org_id = sponsoring_org_id; + let p_organization_sponsorship_create_request_model = + organization_sponsorship_create_request_model; let uri_str = format!( - "{}/organization/sponsorship/sponsored/{sponsoredOrgId}", + "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise", configuration.base_path, - sponsoredOrgId = crate::apis::urlencode(p_sponsored_org_id.to_string()) + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -175,6 +171,7 @@ pub async fn organization_sponsorship_sponsored_sponsored_org_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_sponsorship_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -185,7 +182,7 @@ pub async fn organization_sponsorship_sponsored_sponsored_org_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -195,21 +192,22 @@ pub async fn organization_sponsorship_sponsored_sponsored_org_id_delete( } } -pub async fn organization_sponsorship_sponsored_sponsored_org_id_remove_post( +pub async fn organization_sponsorships_get_sponsored_organizations( configuration: &configuration::Configuration, - sponsored_org_id: uuid::Uuid, -) -> Result<(), Error> { + sponsoring_org_id: uuid::Uuid, +) -> Result< + models::OrganizationSponsorshipInvitesResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsored_org_id = sponsored_org_id; + let p_sponsoring_org_id = sponsoring_org_id; let uri_str = format!( - "{}/organization/sponsorship/sponsored/{sponsoredOrgId}/remove", + "{}/organization/sponsorship/{sponsoringOrgId}/sponsored", configuration.base_path, - sponsoredOrgId = crate::apis::urlencode(p_sponsored_org_id.to_string()) + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -222,12 +220,23 @@ pub async fn organization_sponsorship_sponsored_sponsored_org_id_remove_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -237,26 +246,19 @@ pub async fn organization_sponsorship_sponsored_sponsored_org_id_remove_post( } } -pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_post( +pub async fn organization_sponsorships_get_sync_status( configuration: &configuration::Configuration, sponsoring_org_id: uuid::Uuid, - organization_sponsorship_create_request_model: Option< - models::OrganizationSponsorshipCreateRequestModel, - >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_sponsoring_org_id = sponsoring_org_id; - let p_organization_sponsorship_create_request_model = - organization_sponsorship_create_request_model; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise", + "{}/organization/sponsorship/{sponsoringOrgId}/sync-status", configuration.base_path, sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -264,7 +266,6 @@ pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_ if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_sponsorship_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -275,7 +276,7 @@ pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_ Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -285,27 +286,22 @@ pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_ } } -pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_resend_post( +pub async fn organization_sponsorships_post_remove_sponsorship( configuration: &configuration::Configuration, - sponsoring_org_id: uuid::Uuid, - sponsored_friendly_name: Option<&str>, -) -> Result<(), Error> { + sponsored_org_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_org_id = sponsoring_org_id; - let p_sponsored_friendly_name = sponsored_friendly_name; + let p_sponsored_org_id = sponsored_org_id; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend", + "{}/organization/sponsorship/sponsored/{sponsoredOrgId}/remove", configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) + sponsoredOrgId = crate::apis::urlencode(p_sponsored_org_id.to_string()) ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_sponsored_friendly_name { - req_builder = req_builder.query(&[("sponsoredFriendlyName", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -322,9 +318,8 @@ pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_ Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationSponsorshipSponsoringOrgIdFamiliesForEnterpriseResendPostError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -333,25 +328,21 @@ pub async fn organization_sponsorship_sponsoring_org_id_families_for_enterprise_ } } -pub async fn organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_revoke_delete( +pub async fn organization_sponsorships_post_revoke_sponsorship( configuration: &configuration::Configuration, - sponsoring_org_id: uuid::Uuid, - sponsored_friendly_name: &str, -) -> Result<(), Error> -{ + sponsoring_organization_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_org_id = sponsoring_org_id; - let p_sponsored_friendly_name = sponsored_friendly_name; + let p_sponsoring_organization_id = sponsoring_organization_id; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke", + "{}/organization/sponsorship/{sponsoringOrganizationId}/delete", configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()), - sponsoredFriendlyName = crate::apis::urlencode(p_sponsored_friendly_name) + sponsoringOrganizationId = crate::apis::urlencode(p_sponsoring_organization_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -369,9 +360,8 @@ pub async fn organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_ Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationSponsorshipSponsoringOrgIdSponsoredFriendlyNameRevokeDeleteError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -380,23 +370,27 @@ pub async fn organization_sponsorship_sponsoring_org_id_sponsored_friendly_name_ } } -pub async fn organization_sponsorship_sponsoring_org_id_sponsored_get( +pub async fn organization_sponsorships_pre_validate_sponsorship_token( configuration: &configuration::Configuration, - sponsoring_org_id: uuid::Uuid, + sponsorship_token: Option<&str>, ) -> Result< - models::OrganizationSponsorshipInvitesResponseModelListResponseModel, - Error, + models::PreValidateSponsorshipResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_org_id = sponsoring_org_id; + let p_sponsorship_token = sponsorship_token; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrgId}/sponsored", - configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) + "{}/organization/sponsorship/validate-token", + configuration.base_path ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_sponsorship_token { + req_builder = req_builder.query(&[("sponsorshipToken", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -419,12 +413,12 @@ pub async fn organization_sponsorship_sponsoring_org_id_sponsored_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -434,26 +428,36 @@ pub async fn organization_sponsorship_sponsoring_org_id_sponsored_get( } } -pub async fn organization_sponsorship_sponsoring_org_id_sync_status_get( +pub async fn organization_sponsorships_redeem_sponsorship( configuration: &configuration::Configuration, - sponsoring_org_id: uuid::Uuid, -) -> Result<(), Error> { + sponsorship_token: Option<&str>, + organization_sponsorship_redeem_request_model: Option< + models::OrganizationSponsorshipRedeemRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_org_id = sponsoring_org_id; + let p_sponsorship_token = sponsorship_token; + let p_organization_sponsorship_redeem_request_model = + organization_sponsorship_redeem_request_model; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrgId}/sync-status", - configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) + "{}/organization/sponsorship/redeem", + configuration.base_path ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_sponsorship_token { + req_builder = req_builder.query(&[("sponsorshipToken", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_sponsorship_redeem_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -464,7 +468,7 @@ pub async fn organization_sponsorship_sponsoring_org_id_sync_status_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -474,17 +478,17 @@ pub async fn organization_sponsorship_sponsoring_org_id_sync_status_get( } } -pub async fn organization_sponsorship_sponsoring_organization_id_delete( +pub async fn organization_sponsorships_remove_sponsorship( configuration: &configuration::Configuration, - sponsoring_organization_id: uuid::Uuid, -) -> Result<(), Error> { + sponsored_org_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_organization_id = sponsoring_organization_id; + let p_sponsored_org_id = sponsored_org_id; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrganizationId}", + "{}/organization/sponsorship/sponsored/{sponsoredOrgId}", configuration.base_path, - sponsoringOrganizationId = crate::apis::urlencode(p_sponsoring_organization_id.to_string()) + sponsoredOrgId = crate::apis::urlencode(p_sponsored_org_id.to_string()) ); let mut req_builder = configuration .client @@ -506,7 +510,7 @@ pub async fn organization_sponsorship_sponsoring_organization_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -516,22 +520,27 @@ pub async fn organization_sponsorship_sponsoring_organization_id_delete( } } -pub async fn organization_sponsorship_sponsoring_organization_id_delete_post( +pub async fn organization_sponsorships_resend_sponsorship_offer( configuration: &configuration::Configuration, - sponsoring_organization_id: uuid::Uuid, -) -> Result<(), Error> { + sponsoring_org_id: uuid::Uuid, + sponsored_friendly_name: Option<&str>, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_organization_id = sponsoring_organization_id; + let p_sponsoring_org_id = sponsoring_org_id; + let p_sponsored_friendly_name = sponsored_friendly_name; let uri_str = format!( - "{}/organization/sponsorship/{sponsoringOrganizationId}/delete", + "{}/organization/sponsorship/{sponsoringOrgId}/families-for-enterprise/resend", configuration.base_path, - sponsoringOrganizationId = crate::apis::urlencode(p_sponsoring_organization_id.to_string()) + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + if let Some(ref param_value) = p_sponsored_friendly_name { + req_builder = req_builder.query(&[("sponsoredFriendlyName", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -548,7 +557,7 @@ pub async fn organization_sponsorship_sponsoring_organization_id_delete_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -558,22 +567,21 @@ pub async fn organization_sponsorship_sponsoring_organization_id_delete_post( } } -pub async fn organization_sponsorship_sync_post( +pub async fn organization_sponsorships_revoke_sponsorship( configuration: &configuration::Configuration, - organization_sponsorship_sync_request_model: Option< - models::OrganizationSponsorshipSyncRequestModel, - >, -) -> Result< - models::OrganizationSponsorshipSyncResponseModel, - Error, -> { + sponsoring_organization_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_sponsorship_sync_request_model = organization_sponsorship_sync_request_model; + let p_sponsoring_organization_id = sponsoring_organization_id; - let uri_str = format!("{}/organization/sponsorship/sync", configuration.base_path); + let uri_str = format!( + "{}/organization/sponsorship/{sponsoringOrganizationId}", + configuration.base_path, + sponsoringOrganizationId = crate::apis::urlencode(p_sponsoring_organization_id.to_string()) + ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -581,29 +589,17 @@ pub async fn organization_sponsorship_sync_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_sponsorship_sync_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -613,33 +609,30 @@ pub async fn organization_sponsorship_sync_post( } } -pub async fn organization_sponsorship_validate_token_post( +pub async fn organization_sponsorships_sync( configuration: &configuration::Configuration, - sponsorship_token: Option<&str>, + organization_sponsorship_sync_request_model: Option< + models::OrganizationSponsorshipSyncRequestModel, + >, ) -> Result< - models::PreValidateSponsorshipResponseModel, - Error, + models::OrganizationSponsorshipSyncResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsorship_token = sponsorship_token; + let p_organization_sponsorship_sync_request_model = organization_sponsorship_sync_request_model; - let uri_str = format!( - "{}/organization/sponsorship/validate-token", - configuration.base_path - ); + let uri_str = format!("{}/organization/sponsorship/sync", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_sponsorship_token { - req_builder = req_builder.query(&[("sponsorshipToken", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_sponsorship_sync_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -656,13 +649,12 @@ pub async fn organization_sponsorship_validate_token_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PreValidateSponsorshipResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipSyncResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/organization_users_api.rs b/crates/bitwarden-api-api/src/apis/organization_users_api.rs index 2936f5316..842426ce1 100644 --- a/crates/bitwarden-api-api/src/apis/organization_users_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_users_api.rs @@ -14,270 +14,267 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_org_id_users_account_recovery_details_post`] +/// struct for typed errors of method [`organization_users_accept`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersAccountRecoveryDetailsPostError { +pub enum OrganizationUsersAcceptError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_confirm_post`] +/// struct for typed errors of method [`organization_users_accept_init`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersConfirmPostError { +pub enum OrganizationUsersAcceptInitError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_delete`] +/// struct for typed errors of method [`organization_users_bulk_confirm`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersDeleteError { +pub enum OrganizationUsersBulkConfirmError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_delete_account_delete`] +/// struct for typed errors of method [`organization_users_bulk_delete_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersDeleteAccountDeleteError { +pub enum OrganizationUsersBulkDeleteAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_delete_account_post`] +/// struct for typed errors of method [`organization_users_bulk_enable_secrets_manager`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersDeleteAccountPostError { +pub enum OrganizationUsersBulkEnableSecretsManagerError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_enable_secrets_manager_patch`] +/// struct for typed errors of method [`organization_users_bulk_reinvite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersEnableSecretsManagerPatchError { +pub enum OrganizationUsersBulkReinviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_enable_secrets_manager_put`] +/// struct for typed errors of method [`organization_users_bulk_remove`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersEnableSecretsManagerPutError { +pub enum OrganizationUsersBulkRemoveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_get`] +/// struct for typed errors of method [`organization_users_bulk_restore`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersGetError { +pub enum OrganizationUsersBulkRestoreError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_confirm_post`] +/// struct for typed errors of method [`organization_users_bulk_revoke`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdConfirmPostError { +pub enum OrganizationUsersBulkRevokeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_delete`] +/// struct for typed errors of method [`organization_users_confirm`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdDeleteError { +pub enum OrganizationUsersConfirmError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_delete_account_delete`] +/// struct for typed errors of method [`organization_users_delete_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdDeleteAccountDeleteError { +pub enum OrganizationUsersDeleteAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_delete_account_post`] +/// struct for typed errors of method [`organization_users_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdDeleteAccountPostError { +pub enum OrganizationUsersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_get`] +/// struct for typed errors of method [`organization_users_get_account_recovery_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdGetError { +pub enum OrganizationUsersGetAccountRecoveryDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_post`] +/// struct for typed errors of method [`organization_users_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdPostError { +pub enum OrganizationUsersGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_put`] +/// struct for typed errors of method [`organization_users_get_mini_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdPutError { +pub enum OrganizationUsersGetMiniDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_reinvite_post`] +/// struct for typed errors of method [`organization_users_get_reset_password_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdReinvitePostError { +pub enum OrganizationUsersGetResetPasswordDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_remove_post`] +/// struct for typed errors of method [`organization_users_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdRemovePostError { +pub enum OrganizationUsersInviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_reset_password_details_get`] +/// struct for typed errors of method [`organization_users_patch_bulk_enable_secrets_manager`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdResetPasswordDetailsGetError { +pub enum OrganizationUsersPatchBulkEnableSecretsManagerError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_reset_password_put`] +/// struct for typed errors of method [`organization_users_patch_bulk_restore`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdResetPasswordPutError { +pub enum OrganizationUsersPatchBulkRestoreError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_restore_patch`] +/// struct for typed errors of method [`organization_users_patch_bulk_revoke`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdRestorePatchError { +pub enum OrganizationUsersPatchBulkRevokeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_restore_put`] +/// struct for typed errors of method [`organization_users_patch_restore`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdRestorePutError { +pub enum OrganizationUsersPatchRestoreError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_revoke_patch`] +/// struct for typed errors of method [`organization_users_patch_revoke`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdRevokePatchError { +pub enum OrganizationUsersPatchRevokeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_revoke_put`] +/// struct for typed errors of method [`organization_users_post_bulk_delete_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdRevokePutError { +pub enum OrganizationUsersPostBulkDeleteAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_invite_post`] +/// struct for typed errors of method [`organization_users_post_bulk_remove`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersInvitePostError { +pub enum OrganizationUsersPostBulkRemoveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_mini_details_get`] +/// struct for typed errors of method [`organization_users_post_delete_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersMiniDetailsGetError { +pub enum OrganizationUsersPostDeleteAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_org_id_users_organization_user_id_accept_init_post`] +/// struct for typed errors of method [`organization_users_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersOrganizationUserIdAcceptInitPostError { +pub enum OrganizationUsersPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_org_id_users_organization_user_id_accept_post`] +/// struct for typed errors of method [`organization_users_post_remove`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersOrganizationUserIdAcceptPostError { +pub enum OrganizationUsersPostRemoveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_public_keys_post`] +/// struct for typed errors of method [`organization_users_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersPublicKeysPostError { +pub enum OrganizationUsersPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_reinvite_post`] +/// struct for typed errors of method [`organization_users_put_reset_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersReinvitePostError { +pub enum OrganizationUsersPutResetPasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_remove_post`] +/// struct for typed errors of method [`organization_users_put_reset_password_enrollment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersRemovePostError { +pub enum OrganizationUsersPutResetPasswordEnrollmentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_restore_patch`] +/// struct for typed errors of method [`organization_users_reinvite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersRestorePatchError { +pub enum OrganizationUsersReinviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_restore_put`] +/// struct for typed errors of method [`organization_users_remove`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersRestorePutError { +pub enum OrganizationUsersRemoveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_revoke_patch`] +/// struct for typed errors of method [`organization_users_restore`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersRevokePatchError { +pub enum OrganizationUsersRestoreError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_revoke_put`] +/// struct for typed errors of method [`organization_users_revoke`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersRevokePutError { +pub enum OrganizationUsersRevokeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_org_id_users_user_id_reset_password_enrollment_put`] +/// struct for typed errors of method [`organization_users_user_public_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdUsersUserIdResetPasswordEnrollmentPutError { +pub enum OrganizationUsersUserPublicKeysError { UnknownValue(serde_json::Value), } -pub async fn organizations_org_id_users_account_recovery_details_post( +pub async fn organization_users_accept( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel, - Error, -> { + organization_user_id: uuid::Uuid, + organization_user_accept_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_organization_user_id = organization_user_id; + let p_organization_user_accept_request_model = organization_user_accept_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/account-recovery-details", + "{}/organizations/{orgId}/users/{organizationUserId}/accept", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + organizationUserId = crate::apis::urlencode(p_organization_user_id.to_string()) ); let mut req_builder = configuration .client @@ -289,30 +286,67 @@ pub async fn organizations_org_id_users_account_recovery_details_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); + req_builder = req_builder.json(&p_organization_user_accept_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`")))), - } + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organization_users_accept_init( + configuration: &configuration::Configuration, + org_id: uuid::Uuid, + organization_user_id: uuid::Uuid, + organization_user_accept_init_request_model: Option< + models::OrganizationUserAcceptInitRequestModel, + >, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_org_id = org_id; + let p_organization_user_id = organization_user_id; + let p_organization_user_accept_init_request_model = organization_user_accept_init_request_model; + + let uri_str = format!( + "{}/organizations/{orgId}/users/{organizationUserId}/accept-init", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()), + organizationUserId = crate::apis::urlencode(p_organization_user_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_organization_user_accept_init_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -321,7 +355,7 @@ pub async fn organizations_org_id_users_account_recovery_details_post( } } -pub async fn organizations_org_id_users_confirm_post( +pub async fn organization_users_bulk_confirm( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_confirm_request_model: Option< @@ -329,7 +363,7 @@ pub async fn organizations_org_id_users_confirm_post( >, ) -> Result< models::OrganizationUserBulkResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; @@ -373,8 +407,7 @@ pub async fn organizations_org_id_users_confirm_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -383,20 +416,20 @@ pub async fn organizations_org_id_users_confirm_post( } } -pub async fn organizations_org_id_users_delete( +pub async fn organization_users_bulk_delete_account( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, ) -> Result< models::OrganizationUserBulkResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users", + "{}/organizations/{orgId}/users/delete-account", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); @@ -432,7 +465,7 @@ pub async fn organizations_org_id_users_delete( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -442,26 +475,21 @@ pub async fn organizations_org_id_users_delete( } } -pub async fn organizations_org_id_users_delete_account_delete( +pub async fn organization_users_bulk_enable_secrets_manager( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/delete-account", + "{}/organizations/{orgId}/users/enable-secrets-manager", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -475,23 +503,12 @@ pub async fn organizations_org_id_users_delete_account_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -501,20 +518,20 @@ pub async fn organizations_org_id_users_delete_account_delete( } } -pub async fn organizations_org_id_users_delete_account_post( +pub async fn organization_users_bulk_reinvite( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, ) -> Result< models::OrganizationUserBulkResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/delete-account", + "{}/organizations/{orgId}/users/reinvite", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); @@ -550,7 +567,7 @@ pub async fn organizations_org_id_users_delete_account_post( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -560,23 +577,26 @@ pub async fn organizations_org_id_users_delete_account_post( } } -pub async fn organizations_org_id_users_enable_secrets_manager_patch( +pub async fn organization_users_bulk_remove( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, -) -> Result<(), Error> { +) -> Result< + models::OrganizationUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/enable-secrets-manager", + "{}/organizations/{orgId}/users", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::PATCH, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -590,13 +610,23 @@ pub async fn organizations_org_id_users_enable_secrets_manager_patch( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -605,17 +635,20 @@ pub async fn organizations_org_id_users_enable_secrets_manager_patch( } } -pub async fn organizations_org_id_users_enable_secrets_manager_put( +pub async fn organization_users_bulk_restore( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, -) -> Result<(), Error> { +) -> Result< + models::OrganizationUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/enable-secrets-manager", + "{}/organizations/{orgId}/users/restore", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); @@ -633,13 +666,23 @@ pub async fn organizations_org_id_users_enable_secrets_manager_put( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -648,39 +691,32 @@ pub async fn organizations_org_id_users_enable_secrets_manager_put( } } -pub async fn organizations_org_id_users_get( +pub async fn organization_users_bulk_revoke( configuration: &configuration::Configuration, org_id: uuid::Uuid, - include_groups: Option, - include_collections: Option, + organization_user_bulk_request_model: Option, ) -> Result< - models::OrganizationUserUserDetailsResponseModelListResponseModel, - Error, + models::OrganizationUserBulkResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_include_groups = include_groups; - let p_include_collections = include_collections; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users", + "{}/organizations/{orgId}/users/revoke", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - if let Some(ref param_value) = p_include_groups { - req_builder = req_builder.query(&[("includeGroups", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_include_collections { - req_builder = req_builder.query(&[("includeCollections", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -697,12 +733,12 @@ pub async fn organizations_org_id_users_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -711,12 +747,12 @@ pub async fn organizations_org_id_users_get( } } -pub async fn organizations_org_id_users_id_confirm_post( +pub async fn organization_users_confirm( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, organization_user_confirm_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; @@ -749,8 +785,7 @@ pub async fn organizations_org_id_users_id_confirm_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -759,17 +794,17 @@ pub async fn organizations_org_id_users_id_confirm_post( } } -pub async fn organizations_org_id_users_id_delete( +pub async fn organization_users_delete_account( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}", + "{}/organizations/{orgId}/users/{id}/delete-account", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) @@ -794,7 +829,7 @@ pub async fn organizations_org_id_users_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -804,25 +839,28 @@ pub async fn organizations_org_id_users_id_delete( } } -pub async fn organizations_org_id_users_id_delete_account_delete( +pub async fn organization_users_get( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { + include_groups: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; + let p_include_groups = include_groups; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/delete-account", + "{}/organizations/{orgId}/users/{id}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_include_groups { + req_builder = req_builder.query(&[("includeGroups", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -834,13 +872,23 @@ pub async fn organizations_org_id_users_id_delete_account_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -849,20 +897,22 @@ pub async fn organizations_org_id_users_id_delete_account_delete( } } -pub async fn organizations_org_id_users_id_delete_account_post( +pub async fn organization_users_get_account_recovery_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_bulk_request_model: Option, +) -> Result< + models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/delete-account", + "{}/organizations/{orgId}/users/account-recovery-details", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client @@ -874,17 +924,29 @@ pub async fn organizations_org_id_users_id_delete_account_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -894,29 +956,33 @@ pub async fn organizations_org_id_users_id_delete_account_post( } } -pub async fn organizations_org_id_users_id_get( +pub async fn organization_users_get_all( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, include_groups: Option, -) -> Result> -{ + include_collections: Option, +) -> Result< + models::OrganizationUserUserDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; let p_include_groups = include_groups; + let p_include_collections = include_collections; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}", + "{}/organizations/{orgId}/users", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_include_groups { req_builder = req_builder.query(&[("includeGroups", ¶m_value.to_string())]); } + if let Some(ref param_value) = p_include_collections { + req_builder = req_builder.query(&[("includeCollections", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -939,12 +1005,12 @@ pub async fn organizations_org_id_users_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -953,26 +1019,22 @@ pub async fn organizations_org_id_users_id_get( } } -pub async fn organizations_org_id_users_id_post( +pub async fn organization_users_get_mini_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, - organization_user_update_request_model: Option, -) -> Result<(), Error> { +) -> Result< + models::OrganizationUserUserMiniDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; - let p_organization_user_update_request_model = organization_user_update_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}", + "{}/organizations/{orgId}/users/mini-details", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -980,18 +1042,28 @@ pub async fn organizations_org_id_users_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1001,24 +1073,25 @@ pub async fn organizations_org_id_users_id_post( } } -pub async fn organizations_org_id_users_id_put( +pub async fn organization_users_get_reset_password_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, - organization_user_update_request_model: Option, -) -> Result<(), Error> { +) -> Result< + models::OrganizationUserResetPasswordDetailsResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; - let p_organization_user_update_request_model = organization_user_update_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}", + "{}/organizations/{orgId}/users/{id}/reset-password-details", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1026,18 +1099,29 @@ pub async fn organizations_org_id_users_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1046,20 +1130,19 @@ pub async fn organizations_org_id_users_id_put( } } -pub async fn organizations_org_id_users_id_reinvite_post( +pub async fn organization_users_invite( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_invite_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_invite_request_model = organization_user_invite_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/reinvite", + "{}/organizations/{orgId}/users/invite", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client @@ -1071,6 +1154,7 @@ pub async fn organizations_org_id_users_id_reinvite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_invite_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1081,8 +1165,7 @@ pub async fn organizations_org_id_users_id_reinvite_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1091,24 +1174,23 @@ pub async fn organizations_org_id_users_id_reinvite_post( } } -pub async fn organizations_org_id_users_id_remove_post( +pub async fn organization_users_patch_bulk_enable_secrets_manager( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_bulk_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/remove", + "{}/organizations/{orgId}/users/enable-secrets-manager", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1116,6 +1198,7 @@ pub async fn organizations_org_id_users_id_remove_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1126,7 +1209,7 @@ pub async fn organizations_org_id_users_id_remove_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1136,25 +1219,26 @@ pub async fn organizations_org_id_users_id_remove_post( } } -pub async fn organizations_org_id_users_id_reset_password_details_get( +pub async fn organization_users_patch_bulk_restore( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, + organization_user_bulk_request_model: Option, ) -> Result< - models::OrganizationUserResetPasswordDetailsResponseModel, - Error, + models::OrganizationUserBulkResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/reset-password-details", + "{}/organizations/{orgId}/users/restore", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1162,6 +1246,7 @@ pub async fn organizations_org_id_users_id_reset_password_details_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1178,12 +1263,12 @@ pub async fn organizations_org_id_users_id_reset_password_details_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1193,27 +1278,26 @@ pub async fn organizations_org_id_users_id_reset_password_details_get( } } -pub async fn organizations_org_id_users_id_reset_password_put( +pub async fn organization_users_patch_bulk_revoke( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, - organization_user_reset_password_request_model: Option< - models::OrganizationUserResetPasswordRequestModel, - >, -) -> Result<(), Error> { + organization_user_bulk_request_model: Option, +) -> Result< + models::OrganizationUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; - let p_organization_user_reset_password_request_model = - organization_user_reset_password_request_model; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/reset-password", + "{}/organizations/{orgId}/users/revoke", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1221,18 +1305,29 @@ pub async fn organizations_org_id_users_id_reset_password_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_reset_password_request_model); + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1242,11 +1337,11 @@ pub async fn organizations_org_id_users_id_reset_password_put( } } -pub async fn organizations_org_id_users_id_restore_patch( +pub async fn organization_users_patch_restore( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; @@ -1277,7 +1372,7 @@ pub async fn organizations_org_id_users_id_restore_patch( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1287,22 +1382,24 @@ pub async fn organizations_org_id_users_id_restore_patch( } } -pub async fn organizations_org_id_users_id_restore_put( +pub async fn organization_users_patch_revoke( configuration: &configuration::Configuration, org_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/restore", + "{}/organizations/{orgId}/users/{id}/revoke", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1320,8 +1417,7 @@ pub async fn organizations_org_id_users_id_restore_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1330,24 +1426,26 @@ pub async fn organizations_org_id_users_id_restore_put( } } -pub async fn organizations_org_id_users_id_revoke_patch( +pub async fn organization_users_post_bulk_delete_account( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_bulk_request_model: Option, +) -> Result< + models::OrganizationUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/revoke", + "{}/organizations/{orgId}/users/delete-account", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::PATCH, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1355,17 +1453,29 @@ pub async fn organizations_org_id_users_id_revoke_patch( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1375,22 +1485,26 @@ pub async fn organizations_org_id_users_id_revoke_patch( } } -pub async fn organizations_org_id_users_id_revoke_put( +pub async fn organization_users_post_bulk_remove( configuration: &configuration::Configuration, org_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + organization_user_bulk_request_model: Option, +) -> Result< + models::OrganizationUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_id = id; + let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{id}/revoke", + "{}/organizations/{orgId}/users/remove", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1398,17 +1512,29 @@ pub async fn organizations_org_id_users_id_revoke_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1418,19 +1544,20 @@ pub async fn organizations_org_id_users_id_revoke_put( } } -pub async fn organizations_org_id_users_invite_post( +pub async fn organization_users_post_delete_account( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_invite_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_invite_request_model = organization_user_invite_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/invite", + "{}/organizations/{orgId}/users/{id}/delete-account", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1442,7 +1569,6 @@ pub async fn organizations_org_id_users_invite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_invite_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1453,7 +1579,7 @@ pub async fn organizations_org_id_users_invite_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1463,22 +1589,26 @@ pub async fn organizations_org_id_users_invite_post( } } -pub async fn organizations_org_id_users_mini_details_get( +pub async fn organization_users_post_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, -) -> Result< - models::OrganizationUserUserMiniDetailsResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, + organization_user_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_id = id; + let p_organization_user_update_request_model = organization_user_update_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/mini-details", + "{}/organizations/{orgId}/users/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1486,29 +1616,18 @@ pub async fn organizations_org_id_users_mini_details_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1517,24 +1636,20 @@ pub async fn organizations_org_id_users_mini_details_get( } } -pub async fn organizations_org_id_users_organization_user_id_accept_init_post( +pub async fn organization_users_post_remove( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_id: uuid::Uuid, - organization_user_accept_init_request_model: Option< - models::OrganizationUserAcceptInitRequestModel, - >, -) -> Result<(), Error> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_id = organization_user_id; - let p_organization_user_accept_init_request_model = organization_user_accept_init_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/{organizationUserId}/accept-init", + "{}/organizations/{orgId}/users/{id}/remove", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), - organizationUserId = crate::apis::urlencode(p_organization_user_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1546,7 +1661,6 @@ pub async fn organizations_org_id_users_organization_user_id_accept_init_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_accept_init_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1557,8 +1671,7 @@ pub async fn organizations_org_id_users_organization_user_id_accept_init_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1567,26 +1680,24 @@ pub async fn organizations_org_id_users_organization_user_id_accept_init_post( } } -pub async fn organizations_org_id_users_organization_user_id_accept_post( +pub async fn organization_users_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_id: uuid::Uuid, - organization_user_accept_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, + organization_user_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_id = organization_user_id; - let p_organization_user_accept_request_model = organization_user_accept_request_model; + let p_id = id; + let p_organization_user_update_request_model = organization_user_update_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/{organizationUserId}/accept", + "{}/organizations/{orgId}/users/{id}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()), - organizationUserId = crate::apis::urlencode(p_organization_user_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1594,7 +1705,7 @@ pub async fn organizations_org_id_users_organization_user_id_accept_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_accept_request_model); + req_builder = req_builder.json(&p_organization_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1605,8 +1716,7 @@ pub async fn organizations_org_id_users_organization_user_id_accept_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1615,26 +1725,27 @@ pub async fn organizations_org_id_users_organization_user_id_accept_post( } } -pub async fn organizations_org_id_users_public_keys_post( +pub async fn organization_users_put_reset_password( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserPublicKeyResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, + organization_user_reset_password_request_model: Option< + models::OrganizationUserResetPasswordRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_id = id; + let p_organization_user_reset_password_request_model = + organization_user_reset_password_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/public-keys", + "{}/organizations/{orgId}/users/{id}/reset-password", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1642,29 +1753,18 @@ pub async fn organizations_org_id_users_public_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); + req_builder = req_builder.json(&p_organization_user_reset_password_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1674,26 +1774,27 @@ pub async fn organizations_org_id_users_public_keys_post( } } -pub async fn organizations_org_id_users_reinvite_post( +pub async fn organization_users_put_reset_password_enrollment( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { + user_id: uuid::Uuid, + organization_user_reset_password_enrollment_request_model: Option< + models::OrganizationUserResetPasswordEnrollmentRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_user_id = user_id; + let p_organization_user_reset_password_enrollment_request_model = + organization_user_reset_password_enrollment_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/reinvite", + "{}/organizations/{orgId}/users/{userId}/reset-password-enrollment", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + userId = crate::apis::urlencode(p_user_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1701,29 +1802,18 @@ pub async fn organizations_org_id_users_reinvite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); + req_builder = req_builder.json(&p_organization_user_reset_password_enrollment_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1733,22 +1823,20 @@ pub async fn organizations_org_id_users_reinvite_post( } } -pub async fn organizations_org_id_users_remove_post( +pub async fn organization_users_reinvite( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/remove", + "{}/organizations/{orgId}/users/{id}/reinvite", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1760,30 +1848,17 @@ pub async fn organizations_org_id_users_remove_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1792,26 +1867,24 @@ pub async fn organizations_org_id_users_remove_post( } } -pub async fn organizations_org_id_users_restore_patch( +pub async fn organization_users_remove( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/restore", + "{}/organizations/{orgId}/users/{id}", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::PATCH, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1819,30 +1892,17 @@ pub async fn organizations_org_id_users_restore_patch( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1851,22 +1911,20 @@ pub async fn organizations_org_id_users_restore_patch( } } -pub async fn organizations_org_id_users_restore_put( +pub async fn organization_users_restore( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/restore", + "{}/organizations/{orgId}/users/{id}/restore", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); @@ -1876,30 +1934,17 @@ pub async fn organizations_org_id_users_restore_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1908,26 +1953,22 @@ pub async fn organizations_org_id_users_restore_put( } } -pub async fn organizations_org_id_users_revoke_patch( +pub async fn organization_users_revoke( configuration: &configuration::Configuration, org_id: uuid::Uuid, - organization_user_bulk_request_model: Option, -) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_organization_user_bulk_request_model = organization_user_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/organizations/{orgId}/users/revoke", + "{}/organizations/{orgId}/users/{id}/revoke", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1935,30 +1976,17 @@ pub async fn organizations_org_id_users_revoke_patch( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1967,24 +1995,26 @@ pub async fn organizations_org_id_users_revoke_patch( } } -pub async fn organizations_org_id_users_revoke_put( +pub async fn organization_users_user_public_keys( configuration: &configuration::Configuration, org_id: uuid::Uuid, organization_user_bulk_request_model: Option, ) -> Result< - models::OrganizationUserBulkResponseModelListResponseModel, - Error, + models::OrganizationUserPublicKeyResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_organization_user_bulk_request_model = organization_user_bulk_request_model; let uri_str = format!( - "{}/organizations/{orgId}/users/revoke", + "{}/organizations/{orgId}/users/public-keys", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -2009,61 +2039,12 @@ pub async fn organizations_org_id_users_revoke_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn organizations_org_id_users_user_id_reset_password_enrollment_put( - configuration: &configuration::Configuration, - org_id: uuid::Uuid, - user_id: uuid::Uuid, - organization_user_reset_password_enrollment_request_model: Option< - models::OrganizationUserResetPasswordEnrollmentRequestModel, - >, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - let p_user_id = user_id; - let p_organization_user_reset_password_enrollment_request_model = - organization_user_reset_password_enrollment_request_model; - - let uri_str = format!( - "{}/organizations/{orgId}/users/{userId}/reset-password-enrollment", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()), - userId = crate::apis::urlencode(p_user_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_organization_user_reset_password_enrollment_request_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/organizations_api.rs b/crates/bitwarden-api-api/src/apis/organizations_api.rs index 653cf455b..e54b53351 100644 --- a/crates/bitwarden-api-api/src/apis/organizations_api.rs +++ b/crates/bitwarden-api-api/src/apis/organizations_api.rs @@ -14,254 +14,257 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_create_without_payment_post`] +/// struct for typed errors of method [`organizations_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsCreateWithoutPaymentPostError { +pub enum OrganizationsApiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_get`] +/// struct for typed errors of method [`organizations_api_key_information`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsGetError { +pub enum OrganizationsApiKeyInformationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_api_key_information_type_get`] +/// struct for typed errors of method [`organizations_create_without_payment`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdApiKeyInformationTypeGetError { +pub enum OrganizationsCreateWithoutPaymentError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_api_key_post`] +/// struct for typed errors of method [`organizations_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdApiKeyPostError { +pub enum OrganizationsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_cancel_post`] +/// struct for typed errors of method [`organizations_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdCancelPostError { +pub enum OrganizationsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_collection_management_put`] +/// struct for typed errors of method [`organizations_get_auto_enroll_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdCollectionManagementPutError { +pub enum OrganizationsGetAutoEnrollStatusError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_delete`] +/// struct for typed errors of method [`organizations_get_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdDeleteError { +pub enum OrganizationsGetKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_delete_post`] +/// struct for typed errors of method [`organizations_get_license`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdDeletePostError { +pub enum OrganizationsGetLicenseError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_delete_recover_token_post`] +/// struct for typed errors of method [`organizations_get_plan_type`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdDeleteRecoverTokenPostError { +pub enum OrganizationsGetPlanTypeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_get`] +/// struct for typed errors of method [`organizations_get_public_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdGetError { +pub enum OrganizationsGetPublicKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_keys_get`] +/// struct for typed errors of method [`organizations_get_sso`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdKeysGetError { +pub enum OrganizationsGetSsoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_keys_post`] +/// struct for typed errors of method [`organizations_get_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdKeysPostError { +pub enum OrganizationsGetSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_leave_post`] +/// struct for typed errors of method [`organizations_get_tax_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdLeavePostError { +pub enum OrganizationsGetTaxInfoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_license_get`] +/// struct for typed errors of method [`organizations_get_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdLicenseGetError { +pub enum OrganizationsGetUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_plan_type_get`] +/// struct for typed errors of method [`organizations_leave`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdPlanTypeGetError { +pub enum OrganizationsLeaveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_post`] +/// struct for typed errors of method [`organizations_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdPostError { +pub enum OrganizationsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_public_key_get`] +/// struct for typed errors of method [`organizations_post_cancel`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdPublicKeyGetError { +pub enum OrganizationsPostCancelError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_put`] +/// struct for typed errors of method [`organizations_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdPutError { +pub enum OrganizationsPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_reinstate_post`] +/// struct for typed errors of method [`organizations_post_delete_recover_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdReinstatePostError { +pub enum OrganizationsPostDeleteRecoverTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_rotate_api_key_post`] +/// struct for typed errors of method [`organizations_post_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdRotateApiKeyPostError { +pub enum OrganizationsPostKeysError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_seat_post`] +/// struct for typed errors of method [`organizations_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSeatPostError { +pub enum OrganizationsPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_sm_subscription_post`] +/// struct for typed errors of method [`organizations_post_reinstate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSmSubscriptionPostError { +pub enum OrganizationsPostReinstateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_sso_get`] +/// struct for typed errors of method [`organizations_post_seat`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSsoGetError { +pub enum OrganizationsPostSeatError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_sso_post`] +/// struct for typed errors of method [`organizations_post_sm_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSsoPostError { +pub enum OrganizationsPostSmSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_storage_post`] +/// struct for typed errors of method [`organizations_post_sso`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdStoragePostError { +pub enum OrganizationsPostSsoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_subscribe_secrets_manager_post`] +/// struct for typed errors of method [`organizations_post_storage`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSubscribeSecretsManagerPostError { +pub enum OrganizationsPostStorageError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_subscription_get`] +/// struct for typed errors of method [`organizations_post_subscribe_secrets_manager`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSubscriptionGetError { +pub enum OrganizationsPostSubscribeSecretsManagerError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_subscription_post`] +/// struct for typed errors of method [`organizations_post_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdSubscriptionPostError { +pub enum OrganizationsPostSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_tax_get`] +/// struct for typed errors of method [`organizations_post_upgrade`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTaxGetError { +pub enum OrganizationsPostUpgradeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_tax_put`] +/// struct for typed errors of method [`organizations_post_verify_bank`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTaxPutError { +pub enum OrganizationsPostVerifyBankError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_upgrade_post`] +/// struct for typed errors of method [`organizations_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdUpgradePostError { +pub enum OrganizationsPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_verify_bank_post`] +/// struct for typed errors of method [`organizations_put_collection_management`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdVerifyBankPostError { +pub enum OrganizationsPutCollectionManagementError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_identifier_auto_enroll_status_get`] +/// struct for typed errors of method [`organizations_put_tax_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdentifierAutoEnrollStatusGetError { +pub enum OrganizationsPutTaxInfoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_post`] +/// struct for typed errors of method [`organizations_rotate_api_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsPostError { +pub enum OrganizationsRotateApiKeyError { UnknownValue(serde_json::Value), } -pub async fn organizations_create_without_payment_post( +pub async fn organizations_api_key( configuration: &configuration::Configuration, - organization_no_payment_create_request: Option, -) -> Result> { + id: &str, + organization_api_key_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_no_payment_create_request = organization_no_payment_create_request; + let p_id = id; + let p_organization_api_key_request_model = organization_api_key_request_model; let uri_str = format!( - "{}/organizations/create-without-payment", - configuration.base_path + "{}/organizations/{id}/api-key", + configuration.base_path, + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client @@ -273,51 +276,7 @@ pub async fn organizations_create_without_payment_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_no_payment_create_request); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn organizations_get( - configuration: &configuration::Configuration, -) -> Result> -{ - let uri_str = format!("{}/organizations", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; + req_builder = req_builder.json(&p_organization_api_key_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -334,12 +293,12 @@ pub async fn organizations_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -348,13 +307,13 @@ pub async fn organizations_get( } } -pub async fn organizations_id_api_key_information_type_get( +pub async fn organizations_api_key_information( configuration: &configuration::Configuration, id: uuid::Uuid, r#type: models::OrganizationApiKeyType, ) -> Result< models::OrganizationApiKeyInformationListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -390,7 +349,7 @@ pub async fn organizations_id_api_key_information_type_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -400,19 +359,16 @@ pub async fn organizations_id_api_key_information_type_get( } } -pub async fn organizations_id_api_key_post( +pub async fn organizations_create_without_payment( configuration: &configuration::Configuration, - id: &str, - organization_api_key_request_model: Option, -) -> Result> { + organization_no_payment_create_request: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_organization_api_key_request_model = organization_api_key_request_model; + let p_organization_no_payment_create_request = organization_no_payment_create_request; let uri_str = format!( - "{}/organizations/{id}/api-key", - configuration.base_path, - id = crate::apis::urlencode(p_id) + "{}/organizations/create-without-payment", + configuration.base_path ); let mut req_builder = configuration .client @@ -424,7 +380,7 @@ pub async fn organizations_id_api_key_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_api_key_request_model); + req_builder = req_builder.json(&p_organization_no_payment_create_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -441,12 +397,13 @@ pub async fn organizations_id_api_key_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -455,23 +412,23 @@ pub async fn organizations_id_api_key_post( } } -pub async fn organizations_id_cancel_post( +pub async fn organizations_delete( configuration: &configuration::Configuration, - id: uuid::Uuid, - subscription_cancellation_request_model: Option, -) -> Result<(), Error> { + id: &str, + secret_verification_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_subscription_cancellation_request_model = subscription_cancellation_request_model; + let p_secret_verification_request_model = secret_verification_request_model; let uri_str = format!( - "{}/organizations/{id}/cancel", + "{}/organizations/{id}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -479,7 +436,7 @@ pub async fn organizations_id_cancel_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_subscription_cancellation_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -490,7 +447,7 @@ pub async fn organizations_id_cancel_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -499,24 +456,19 @@ pub async fn organizations_id_cancel_post( } } -pub async fn organizations_id_collection_management_put( +pub async fn organizations_get( configuration: &configuration::Configuration, - id: uuid::Uuid, - organization_collection_management_update_request_model: Option< - models::OrganizationCollectionManagementUpdateRequestModel, - >, -) -> Result> { + id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_collection_management_update_request_model = - organization_collection_management_update_request_model; let uri_str = format!( - "{}/organizations/{id}/collection-management", + "{}/organizations/{id}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -524,7 +476,6 @@ pub async fn organizations_id_collection_management_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_collection_management_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -546,8 +497,7 @@ pub async fn organizations_id_collection_management_put( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -556,23 +506,22 @@ pub async fn organizations_id_collection_management_put( } } -pub async fn organizations_id_delete( +pub async fn organizations_get_auto_enroll_status( configuration: &configuration::Configuration, - id: &str, - secret_verification_request_model: Option, -) -> Result<(), Error> { + identifier: &str, +) -> Result< + models::OrganizationAutoEnrollStatusResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_secret_verification_request_model = secret_verification_request_model; + let p_identifier = identifier; let uri_str = format!( - "{}/organizations/{id}", + "{}/organizations/{identifier}/auto-enroll-status", configuration.base_path, - id = crate::apis::urlencode(p_id) + identifier = crate::apis::urlencode(p_identifier) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -580,18 +529,29 @@ pub async fn organizations_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationAutoEnrollStatusResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationAutoEnrollStatusResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -600,23 +560,19 @@ pub async fn organizations_id_delete( } } -pub async fn organizations_id_delete_post( +pub async fn organizations_get_keys( configuration: &configuration::Configuration, id: &str, - secret_verification_request_model: Option, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_secret_verification_request_model = secret_verification_request_model; let uri_str = format!( - "{}/organizations/{id}/delete", + "{}/organizations/{id}/keys", configuration.base_path, id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -624,18 +580,28 @@ pub async fn organizations_id_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationPublicKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationPublicKeyResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -644,46 +610,53 @@ pub async fn organizations_id_delete_post( } } -pub async fn organizations_id_delete_recover_token_post( +pub async fn organizations_get_license( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_verify_delete_recover_request_model: Option< - models::OrganizationVerifyDeleteRecoverRequestModel, - >, -) -> Result<(), Error> { + installation_id: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_verify_delete_recover_request_model = - organization_verify_delete_recover_request_model; + let p_installation_id = installation_id; let uri_str = format!( - "{}/organizations/{id}/delete-recover-token", + "{}/organizations/{id}/license", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_installation_id { + req_builder = req_builder.query(&[("installationId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationLicense`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationLicense`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -692,15 +665,15 @@ pub async fn organizations_id_delete_recover_token_post( } } -pub async fn organizations_id_get( +pub async fn organizations_get_plan_type( configuration: &configuration::Configuration, id: &str, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/organizations/{id}", + "{}/organizations/{id}/plan-type", configuration.base_path, id = crate::apis::urlencode(p_id) ); @@ -728,12 +701,12 @@ pub async fn organizations_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlanType`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlanType`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -742,15 +715,15 @@ pub async fn organizations_id_get( } } -pub async fn organizations_id_keys_get( +pub async fn organizations_get_public_key( configuration: &configuration::Configuration, id: &str, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/organizations/{id}/keys", + "{}/organizations/{id}/public-key", configuration.base_path, id = crate::apis::urlencode(p_id) ); @@ -783,7 +756,7 @@ pub async fn organizations_id_keys_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -792,23 +765,19 @@ pub async fn organizations_id_keys_get( } } -pub async fn organizations_id_keys_post( +pub async fn organizations_get_sso( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_keys_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_keys_request_model = organization_keys_request_model; let uri_str = format!( - "{}/organizations/{id}/keys", + "{}/organizations/{id}/sso", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -816,7 +785,6 @@ pub async fn organizations_id_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_keys_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -833,12 +801,12 @@ pub async fn organizations_id_keys_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationKeysResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationKeysResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSsoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSsoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -847,21 +815,20 @@ pub async fn organizations_id_keys_post( } } -pub async fn organizations_id_leave_post( +pub async fn organizations_get_subscription( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/organizations/{id}/leave", + "{}/organizations/{id}/subscription", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -874,12 +841,23 @@ pub async fn organizations_id_leave_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSubscriptionResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSubscriptionResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -888,25 +866,20 @@ pub async fn organizations_id_leave_post( } } -pub async fn organizations_id_license_get( +pub async fn organizations_get_tax_info( configuration: &configuration::Configuration, id: uuid::Uuid, - installation_id: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_installation_id = installation_id; let uri_str = format!( - "{}/organizations/{id}/license", + "{}/organizations/{id}/tax", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = p_installation_id { - req_builder = req_builder.query(&[("installationId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -929,12 +902,12 @@ pub async fn organizations_id_license_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationLicense`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationLicense`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaxInfoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaxInfoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -943,18 +916,13 @@ pub async fn organizations_id_license_get( } } -pub async fn organizations_id_plan_type_get( +pub async fn organizations_get_user( configuration: &configuration::Configuration, - id: &str, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - - let uri_str = format!( - "{}/organizations/{id}/plan-type", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); +) -> Result< + models::ProfileOrganizationResponseModelListResponseModel, + Error, +> { + let uri_str = format!("{}/organizations", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -979,12 +947,12 @@ pub async fn organizations_id_plan_type_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlanType`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlanType`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -993,19 +961,17 @@ pub async fn organizations_id_plan_type_get( } } -pub async fn organizations_id_post( +pub async fn organizations_leave( configuration: &configuration::Configuration, - id: &str, - organization_update_request_model: Option, -) -> Result> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_update_request_model = organization_update_request_model; let uri_str = format!( - "{}/organizations/{id}", + "{}/organizations/{id}/leave", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1017,7 +983,44 @@ pub async fn organizations_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_update_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn organizations_post( + configuration: &configuration::Configuration, + organization_create_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_organization_create_request_model = organization_create_request_model; + + let uri_str = format!("{}/organizations", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_organization_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1039,7 +1042,7 @@ pub async fn organizations_id_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1048,19 +1051,23 @@ pub async fn organizations_id_post( } } -pub async fn organizations_id_public_key_get( +pub async fn organizations_post_cancel( configuration: &configuration::Configuration, - id: &str, -) -> Result> { + id: uuid::Uuid, + subscription_cancellation_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_subscription_cancellation_request_model = subscription_cancellation_request_model; let uri_str = format!( - "{}/organizations/{id}/public-key", + "{}/organizations/{id}/cancel", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1068,28 +1075,18 @@ pub async fn organizations_id_public_key_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_subscription_cancellation_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationPublicKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationPublicKeyResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1098,21 +1095,23 @@ pub async fn organizations_id_public_key_get( } } -pub async fn organizations_id_put( +pub async fn organizations_post_delete( configuration: &configuration::Configuration, id: &str, - organization_update_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_update_request_model = organization_update_request_model; + let p_secret_verification_request_model = secret_verification_request_model; let uri_str = format!( - "{}/organizations/{id}", + "{}/organizations/{id}/delete", configuration.base_path, id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1120,29 +1119,18 @@ pub async fn organizations_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_update_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1151,15 +1139,20 @@ pub async fn organizations_id_put( } } -pub async fn organizations_id_reinstate_post( +pub async fn organizations_post_delete_recover_token( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { + organization_verify_delete_recover_request_model: Option< + models::OrganizationVerifyDeleteRecoverRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_organization_verify_delete_recover_request_model = + organization_verify_delete_recover_request_model; let uri_str = format!( - "{}/organizations/{id}/reinstate", + "{}/organizations/{id}/delete-recover-token", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -1173,6 +1166,7 @@ pub async fn organizations_id_reinstate_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1183,7 +1177,8 @@ pub async fn organizations_id_reinstate_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1192,19 +1187,19 @@ pub async fn organizations_id_reinstate_post( } } -pub async fn organizations_id_rotate_api_key_post( +pub async fn organizations_post_keys( configuration: &configuration::Configuration, - id: &str, - organization_api_key_request_model: Option, -) -> Result> { + id: uuid::Uuid, + organization_keys_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_api_key_request_model = organization_api_key_request_model; + let p_organization_keys_request_model = organization_keys_request_model; let uri_str = format!( - "{}/organizations/{id}/rotate-api-key", + "{}/organizations/{id}/keys", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1216,7 +1211,7 @@ pub async fn organizations_id_rotate_api_key_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_api_key_request_model); + req_builder = req_builder.json(&p_organization_keys_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1233,13 +1228,12 @@ pub async fn organizations_id_rotate_api_key_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationKeysResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationKeysResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1248,19 +1242,19 @@ pub async fn organizations_id_rotate_api_key_post( } } -pub async fn organizations_id_seat_post( +pub async fn organizations_post_put( configuration: &configuration::Configuration, - id: uuid::Uuid, - organization_seat_request_model: Option, -) -> Result> { + id: &str, + organization_update_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_seat_request_model = organization_seat_request_model; + let p_organization_update_request_model = organization_update_request_model; let uri_str = format!( - "{}/organizations/{id}/seat", + "{}/organizations/{id}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client @@ -1272,7 +1266,7 @@ pub async fn organizations_id_seat_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_seat_request_model); + req_builder = req_builder.json(&p_organization_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1289,12 +1283,12 @@ pub async fn organizations_id_seat_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1303,21 +1297,15 @@ pub async fn organizations_id_seat_post( } } -pub async fn organizations_id_sm_subscription_post( +pub async fn organizations_post_reinstate( configuration: &configuration::Configuration, id: uuid::Uuid, - secrets_manager_subscription_update_request_model: Option< - models::SecretsManagerSubscriptionUpdateRequestModel, - >, -) -> Result> -{ +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_secrets_manager_subscription_update_request_model = - secrets_manager_subscription_update_request_model; let uri_str = format!( - "{}/organizations/{id}/sm-subscription", + "{}/organizations/{id}/reinstate", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -1331,30 +1319,17 @@ pub async fn organizations_id_sm_subscription_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secrets_manager_subscription_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1363,19 +1338,23 @@ pub async fn organizations_id_sm_subscription_post( } } -pub async fn organizations_id_sso_get( +pub async fn organizations_post_seat( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + organization_seat_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_organization_seat_request_model = organization_seat_request_model; let uri_str = format!( - "{}/organizations/{id}/sso", + "{}/organizations/{id}/seat", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1383,6 +1362,7 @@ pub async fn organizations_id_sso_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_seat_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1399,12 +1379,12 @@ pub async fn organizations_id_sso_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSsoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSsoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1413,17 +1393,20 @@ pub async fn organizations_id_sso_get( } } -pub async fn organizations_id_sso_post( +pub async fn organizations_post_sm_subscription( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_sso_request_model: Option, -) -> Result> { + secrets_manager_subscription_update_request_model: Option< + models::SecretsManagerSubscriptionUpdateRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_sso_request_model = organization_sso_request_model; + let p_secrets_manager_subscription_update_request_model = + secrets_manager_subscription_update_request_model; let uri_str = format!( - "{}/organizations/{id}/sso", + "{}/organizations/{id}/sm-subscription", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -1437,7 +1420,7 @@ pub async fn organizations_id_sso_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_sso_request_model); + req_builder = req_builder.json(&p_secrets_manager_subscription_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1454,12 +1437,13 @@ pub async fn organizations_id_sso_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSsoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSsoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1468,19 +1452,19 @@ pub async fn organizations_id_sso_post( } } -pub async fn organizations_id_storage_post( +pub async fn organizations_post_sso( configuration: &configuration::Configuration, - id: &str, - storage_request_model: Option, -) -> Result> { + id: uuid::Uuid, + organization_sso_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_storage_request_model = storage_request_model; + let p_organization_sso_request_model = organization_sso_request_model; let uri_str = format!( - "{}/organizations/{id}/storage", + "{}/organizations/{id}/sso", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -1492,7 +1476,7 @@ pub async fn organizations_id_storage_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_storage_request_model); + req_builder = req_builder.json(&p_organization_sso_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1509,12 +1493,12 @@ pub async fn organizations_id_storage_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSsoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSsoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1523,22 +1507,19 @@ pub async fn organizations_id_storage_post( } } -pub async fn organizations_id_subscribe_secrets_manager_post( +pub async fn organizations_post_storage( configuration: &configuration::Configuration, - id: uuid::Uuid, - secrets_manager_subscribe_request_model: Option, -) -> Result< - models::ProfileOrganizationResponseModel, - Error, -> { + id: &str, + storage_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_secrets_manager_subscribe_request_model = secrets_manager_subscribe_request_model; + let p_storage_request_model = storage_request_model; let uri_str = format!( - "{}/organizations/{id}/subscribe-secrets-manager", + "{}/organizations/{id}/storage", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client @@ -1550,7 +1531,7 @@ pub async fn organizations_id_subscribe_secrets_manager_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secrets_manager_subscribe_request_model); + req_builder = req_builder.json(&p_storage_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1567,13 +1548,12 @@ pub async fn organizations_id_subscribe_secrets_manager_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1582,20 +1562,26 @@ pub async fn organizations_id_subscribe_secrets_manager_post( } } -pub async fn organizations_id_subscription_get( +pub async fn organizations_post_subscribe_secrets_manager( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> -{ + secrets_manager_subscribe_request_model: Option, +) -> Result< + models::ProfileOrganizationResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_secrets_manager_subscribe_request_model = secrets_manager_subscribe_request_model; let uri_str = format!( - "{}/organizations/{id}/subscription", + "{}/organizations/{id}/subscribe-secrets-manager", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1603,6 +1589,7 @@ pub async fn organizations_id_subscription_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_secrets_manager_subscribe_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1619,12 +1606,12 @@ pub async fn organizations_id_subscription_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSubscriptionResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSubscriptionResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProfileOrganizationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1634,13 +1621,13 @@ pub async fn organizations_id_subscription_get( } } -pub async fn organizations_id_subscription_post( +pub async fn organizations_post_subscription( configuration: &configuration::Configuration, id: uuid::Uuid, organization_subscription_update_request_model: Option< models::OrganizationSubscriptionUpdateRequestModel, >, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_organization_subscription_update_request_model = @@ -1683,7 +1670,7 @@ pub async fn organizations_id_subscription_post( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1693,19 +1680,23 @@ pub async fn organizations_id_subscription_post( } } -pub async fn organizations_id_tax_get( +pub async fn organizations_post_upgrade( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + organization_upgrade_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_organization_upgrade_request_model = organization_upgrade_request_model; let uri_str = format!( - "{}/organizations/{id}/tax", + "{}/organizations/{id}/upgrade", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1713,6 +1704,7 @@ pub async fn organizations_id_tax_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_upgrade_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1729,12 +1721,12 @@ pub async fn organizations_id_tax_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaxInfoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaxInfoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1743,21 +1735,23 @@ pub async fn organizations_id_tax_get( } } -pub async fn organizations_id_tax_put( +pub async fn organizations_post_verify_bank( configuration: &configuration::Configuration, id: uuid::Uuid, - expanded_tax_info_update_request_model: Option, -) -> Result<(), Error> { + organization_verify_bank_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_expanded_tax_info_update_request_model = expanded_tax_info_update_request_model; + let p_organization_verify_bank_request_model = organization_verify_bank_request_model; let uri_str = format!( - "{}/organizations/{id}/tax", + "{}/organizations/{id}/verify-bank", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1765,7 +1759,7 @@ pub async fn organizations_id_tax_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_expanded_tax_info_update_request_model); + req_builder = req_builder.json(&p_organization_verify_bank_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1776,7 +1770,7 @@ pub async fn organizations_id_tax_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1785,23 +1779,21 @@ pub async fn organizations_id_tax_put( } } -pub async fn organizations_id_upgrade_post( +pub async fn organizations_put( configuration: &configuration::Configuration, - id: uuid::Uuid, - organization_upgrade_request_model: Option, -) -> Result> { + id: &str, + organization_update_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_upgrade_request_model = organization_upgrade_request_model; + let p_organization_update_request_model = organization_update_request_model; let uri_str = format!( - "{}/organizations/{id}/upgrade", + "{}/organizations/{id}", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + id = crate::apis::urlencode(p_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1809,7 +1801,7 @@ pub async fn organizations_id_upgrade_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_upgrade_request_model); + req_builder = req_builder.json(&p_organization_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1826,12 +1818,12 @@ pub async fn organizations_id_upgrade_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1840,23 +1832,24 @@ pub async fn organizations_id_upgrade_post( } } -pub async fn organizations_id_verify_bank_post( +pub async fn organizations_put_collection_management( configuration: &configuration::Configuration, id: uuid::Uuid, - organization_verify_bank_request_model: Option, -) -> Result<(), Error> { + organization_collection_management_update_request_model: Option< + models::OrganizationCollectionManagementUpdateRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_organization_verify_bank_request_model = organization_verify_bank_request_model; + let p_organization_collection_management_update_request_model = + organization_collection_management_update_request_model; let uri_str = format!( - "{}/organizations/{id}/verify-bank", + "{}/organizations/{id}/collection-management", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1864,18 +1857,29 @@ pub async fn organizations_id_verify_bank_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_verify_bank_request_model); + req_builder = req_builder.json(&p_organization_collection_management_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -1885,22 +1889,21 @@ pub async fn organizations_id_verify_bank_post( } } -pub async fn organizations_identifier_auto_enroll_status_get( +pub async fn organizations_put_tax_info( configuration: &configuration::Configuration, - identifier: &str, -) -> Result< - models::OrganizationAutoEnrollStatusResponseModel, - Error, -> { + id: uuid::Uuid, + expanded_tax_info_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_identifier = identifier; + let p_id = id; + let p_expanded_tax_info_update_request_model = expanded_tax_info_update_request_model; let uri_str = format!( - "{}/organizations/{identifier}/auto-enroll-status", + "{}/organizations/{id}/tax", configuration.base_path, - identifier = crate::apis::urlencode(p_identifier) + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1908,29 +1911,18 @@ pub async fn organizations_identifier_auto_enroll_status_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_expanded_tax_info_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationAutoEnrollStatusResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationAutoEnrollStatusResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1939,14 +1931,20 @@ pub async fn organizations_identifier_auto_enroll_status_get( } } -pub async fn organizations_post( +pub async fn organizations_rotate_api_key( configuration: &configuration::Configuration, - organization_create_request_model: Option, -) -> Result> { + id: &str, + organization_api_key_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_create_request_model = organization_create_request_model; + let p_id = id; + let p_organization_api_key_request_model = organization_api_key_request_model; - let uri_str = format!("{}/organizations", configuration.base_path); + let uri_str = format!( + "{}/organizations/{id}/rotate-api-key", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1957,7 +1955,7 @@ pub async fn organizations_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_create_request_model); + req_builder = req_builder.json(&p_organization_api_key_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1974,12 +1972,12 @@ pub async fn organizations_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ApiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ApiKeyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs b/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs index 4e963327a..8340a4db3 100644 --- a/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs +++ b/crates/bitwarden-api-api/src/apis/phishing_domains_api.rs @@ -14,23 +14,23 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`phishing_domains_checksum_get`] +/// struct for typed errors of method [`phishing_domains_get_checksum`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PhishingDomainsChecksumGetError { +pub enum PhishingDomainsGetChecksumError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`phishing_domains_get`] +/// struct for typed errors of method [`phishing_domains_get_phishing_domains`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PhishingDomainsGetError { +pub enum PhishingDomainsGetPhishingDomainsError { UnknownValue(serde_json::Value), } -pub async fn phishing_domains_checksum_get( +pub async fn phishing_domains_get_checksum( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/phishing-domains/checksum", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -61,7 +61,7 @@ pub async fn phishing_domains_checksum_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -70,9 +70,9 @@ pub async fn phishing_domains_checksum_get( } } -pub async fn phishing_domains_get( +pub async fn phishing_domains_get_phishing_domains( configuration: &configuration::Configuration, -) -> Result, Error> { +) -> Result, Error> { let uri_str = format!("{}/phishing-domains", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -103,7 +103,8 @@ pub async fn phishing_domains_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/policies_api.rs b/crates/bitwarden-api-api/src/apis/policies_api.rs index 0418f6fa9..7423107f6 100644 --- a/crates/bitwarden-api-api/src/apis/policies_api.rs +++ b/crates/bitwarden-api-api/src/apis/policies_api.rs @@ -14,61 +14,65 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_org_id_policies_get`] +/// struct for typed errors of method [`policies_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesGetError { +pub enum PoliciesGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_policies_invited_user_get`] +/// struct for typed errors of method [`policies_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesInvitedUserGetError { +pub enum PoliciesGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_policies_master_password_get`] +/// struct for typed errors of method [`policies_get_by_invited_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesMasterPasswordGetError { +pub enum PoliciesGetByInvitedUserError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_policies_token_get`] +/// struct for typed errors of method [`policies_get_by_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesTokenGetError { +pub enum PoliciesGetByTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_policies_type_get`] +/// struct for typed errors of method [`policies_get_master_password_policy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesTypeGetError { +pub enum PoliciesGetMasterPasswordPolicyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_policies_type_put`] +/// struct for typed errors of method [`policies_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrgIdPoliciesTypePutError { +pub enum PoliciesPutError { UnknownValue(serde_json::Value), } -pub async fn organizations_org_id_policies_get( +/// struct for typed errors of method [`policies_put_v_next`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PoliciesPutVNextError { + UnknownValue(serde_json::Value), +} + +pub async fn policies_get( configuration: &configuration::Configuration, - org_id: &str, -) -> Result> -{ + org_id: uuid::Uuid, + r#type: i32, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_type = r#type; - let uri_str = format!( - "{}/organizations/{orgId}/policies", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id) - ); + let uri_str = format!("{}/organizations/{orgId}/policies/{type}", configuration.base_path, orgId=crate::apis::urlencode(p_org_id.to_string()), type=p_type); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -93,13 +97,12 @@ pub async fn organizations_org_id_policies_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyDetailResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyDetailResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -108,28 +111,20 @@ pub async fn organizations_org_id_policies_get( } } -pub async fn organizations_org_id_policies_invited_user_get( +pub async fn policies_get_all( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - user_id: Option, -) -> Result< - models::PolicyResponseModelListResponseModel, - Error, -> { + org_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_user_id = user_id; let uri_str = format!( - "{}/organizations/{orgId}/policies/invited-user", + "{}/organizations/{orgId}/policies", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = p_user_id { - req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -157,8 +152,7 @@ pub async fn organizations_org_id_policies_invited_user_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -167,20 +161,25 @@ pub async fn organizations_org_id_policies_invited_user_get( } } -pub async fn organizations_org_id_policies_master_password_get( +pub async fn policies_get_by_invited_user( configuration: &configuration::Configuration, org_id: uuid::Uuid, -) -> Result> { + user_id: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; + let p_user_id = user_id; let uri_str = format!( - "{}/organizations/{orgId}/policies/master-password", + "{}/organizations/{orgId}/policies/invited-user", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_user_id { + req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -203,13 +202,12 @@ pub async fn organizations_org_id_policies_master_password_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -218,16 +216,13 @@ pub async fn organizations_org_id_policies_master_password_get( } } -pub async fn organizations_org_id_policies_token_get( +pub async fn policies_get_by_token( configuration: &configuration::Configuration, org_id: uuid::Uuid, email: Option<&str>, token: Option<&str>, organization_user_id: Option, -) -> Result< - models::PolicyResponseModelListResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_email = email; @@ -277,8 +272,7 @@ pub async fn organizations_org_id_policies_token_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -287,16 +281,18 @@ pub async fn organizations_org_id_policies_token_get( } } -pub async fn organizations_org_id_policies_type_get( +pub async fn policies_get_master_password_policy( configuration: &configuration::Configuration, org_id: uuid::Uuid, - r#type: i32, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; - let p_type = r#type; - let uri_str = format!("{}/organizations/{orgId}/policies/{type}", configuration.base_path, orgId=crate::apis::urlencode(p_org_id.to_string()), type=p_type); + let uri_str = format!( + "{}/organizations/{orgId}/policies/master-password", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -321,12 +317,12 @@ pub async fn organizations_org_id_policies_type_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyDetailResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyDetailResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -336,12 +332,12 @@ pub async fn organizations_org_id_policies_type_get( } } -pub async fn organizations_org_id_policies_type_put( +pub async fn policies_put( configuration: &configuration::Configuration, org_id: uuid::Uuid, r#type: models::PolicyType, policy_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let p_type = r#type; @@ -378,8 +374,58 @@ pub async fn organizations_org_id_policies_type_put( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn policies_put_v_next( + configuration: &configuration::Configuration, + org_id: uuid::Uuid, + r#type: &str, + save_policy_request: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_org_id = org_id; + let p_type = r#type; + let p_save_policy_request = save_policy_request; + + let uri_str = format!("{}/organizations/{orgId}/policies/{type}/vnext", configuration.base_path, orgId=crate::apis::urlencode(p_org_id.to_string()), type=crate::apis::urlencode(p_type)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_save_policy_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PolicyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PolicyResponseModel`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/projects_api.rs b/crates/bitwarden-api-api/src/apis/projects_api.rs index 685b8ade9..8d3a88f3b 100644 --- a/crates/bitwarden-api-api/src/apis/projects_api.rs +++ b/crates/bitwarden-api-api/src/apis/projects_api.rs @@ -14,57 +14,52 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_projects_get`] +/// struct for typed errors of method [`projects_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdProjectsGetError { +pub enum ProjectsBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_projects_post`] +/// struct for typed errors of method [`projects_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdProjectsPostError { +pub enum ProjectsCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_delete_post`] +/// struct for typed errors of method [`projects_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsDeletePostError { +pub enum ProjectsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_get`] +/// struct for typed errors of method [`projects_list_by_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdGetError { +pub enum ProjectsListByOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_put`] +/// struct for typed errors of method [`projects_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdPutError { +pub enum ProjectsUpdateError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_projects_get( +pub async fn projects_bulk_delete( configuration: &configuration::Configuration, - organization_id: uuid::Uuid, -) -> Result< - models::ProjectResponseModelListResponseModel, - Error, -> { + uuid_colon_colon_uuid: Option>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; + let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; - let uri_str = format!( - "{}/organizations/{organizationId}/projects", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/projects/delete", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -72,6 +67,7 @@ pub async fn organizations_organization_id_projects_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_uuid_colon_colon_uuid); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -88,13 +84,12 @@ pub async fn organizations_organization_id_projects_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -103,11 +98,11 @@ pub async fn organizations_organization_id_projects_get( } } -pub async fn organizations_organization_id_projects_post( +pub async fn projects_create( configuration: &configuration::Configuration, organization_id: uuid::Uuid, project_create_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_project_create_request_model = project_create_request_model; @@ -149,8 +144,7 @@ pub async fn organizations_organization_id_projects_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -159,17 +153,19 @@ pub async fn organizations_organization_id_projects_post( } } -pub async fn projects_delete_post( +pub async fn projects_get( configuration: &configuration::Configuration, - uuid_colon_colon_uuid: Option>, -) -> Result> { + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; + let p_id = id; - let uri_str = format!("{}/projects/delete", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/projects/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -177,7 +173,6 @@ pub async fn projects_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_uuid_colon_colon_uuid); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -194,12 +189,12 @@ pub async fn projects_delete_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -208,17 +203,17 @@ pub async fn projects_delete_post( } } -pub async fn projects_id_get( +pub async fn projects_list_by_organization( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { + organization_id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_organization_id = organization_id; let uri_str = format!( - "{}/projects/{id}", + "{}/organizations/{organizationId}/projects", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -244,12 +239,12 @@ pub async fn projects_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProjectResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProjectResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -258,11 +253,11 @@ pub async fn projects_id_get( } } -pub async fn projects_id_put( +pub async fn projects_update( configuration: &configuration::Configuration, id: uuid::Uuid, project_update_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_project_update_request_model = project_update_request_model; @@ -302,7 +297,7 @@ pub async fn projects_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/provider_billing_api.rs b/crates/bitwarden-api-api/src/apis/provider_billing_api.rs index f70d9ca9f..6df64fe3b 100644 --- a/crates/bitwarden-api-api/src/apis/provider_billing_api.rs +++ b/crates/bitwarden-api-api/src/apis/provider_billing_api.rs @@ -14,67 +14,69 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_provider_id_billing_invoices_get`] +/// struct for typed errors of method [`provider_billing_generate_client_invoice_report`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingInvoicesGetError { +pub enum ProviderBillingGenerateClientInvoiceReportError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_invoices_invoice_id_get`] +/// struct for typed errors of method [`provider_billing_get_invoices`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingInvoicesInvoiceIdGetError { +pub enum ProviderBillingGetInvoicesError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_payment_method_put`] +/// struct for typed errors of method [`provider_billing_get_subscription`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingPaymentMethodPutError { +pub enum ProviderBillingGetSubscriptionError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`providers_provider_id_billing_payment_method_verify_bank_account_post`] +/// struct for typed errors of method [`provider_billing_get_tax_information`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingPaymentMethodVerifyBankAccountPostError { +pub enum ProviderBillingGetTaxInformationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_subscription_get`] +/// struct for typed errors of method [`provider_billing_update_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingSubscriptionGetError { +pub enum ProviderBillingUpdatePaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_tax_information_get`] +/// struct for typed errors of method [`provider_billing_update_tax_information`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingTaxInformationGetError { +pub enum ProviderBillingUpdateTaxInformationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_tax_information_put`] +/// struct for typed errors of method [`provider_billing_verify_bank_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingTaxInformationPutError { +pub enum ProviderBillingVerifyBankAccountError { UnknownValue(serde_json::Value), } -pub async fn providers_provider_id_billing_invoices_get( +pub async fn provider_billing_generate_client_invoice_report( configuration: &configuration::Configuration, provider_id: uuid::Uuid, -) -> Result<(), Error> { + invoice_id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_invoice_id = invoice_id; let uri_str = format!( - "{}/providers/{providerId}/billing/invoices", + "{}/providers/{providerId}/billing/invoices/{invoiceId}", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + invoiceId = crate::apis::urlencode(p_invoice_id) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -94,7 +96,7 @@ pub async fn providers_provider_id_billing_invoices_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -104,20 +106,17 @@ pub async fn providers_provider_id_billing_invoices_get( } } -pub async fn providers_provider_id_billing_invoices_invoice_id_get( +pub async fn provider_billing_get_invoices( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - invoice_id: &str, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_invoice_id = invoice_id; let uri_str = format!( - "{}/providers/{providerId}/billing/invoices/{invoiceId}", + "{}/providers/{providerId}/billing/invoices", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - invoiceId = crate::apis::urlencode(p_invoice_id) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -137,8 +136,7 @@ pub async fn providers_provider_id_billing_invoices_invoice_id_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -147,21 +145,19 @@ pub async fn providers_provider_id_billing_invoices_invoice_id_get( } } -pub async fn providers_provider_id_billing_payment_method_put( +pub async fn provider_billing_get_subscription( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - update_payment_method_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_update_payment_method_request_body = update_payment_method_request_body; let uri_str = format!( - "{}/providers/{providerId}/billing/payment-method", + "{}/providers/{providerId}/billing/subscription", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -169,7 +165,6 @@ pub async fn providers_provider_id_billing_payment_method_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_payment_method_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -180,7 +175,7 @@ pub async fn providers_provider_id_billing_payment_method_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -190,23 +185,19 @@ pub async fn providers_provider_id_billing_payment_method_put( } } -pub async fn providers_provider_id_billing_payment_method_verify_bank_account_post( +pub async fn provider_billing_get_tax_information( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - verify_bank_account_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_verify_bank_account_request_body = verify_bank_account_request_body; let uri_str = format!( - "{}/providers/{providerId}/billing/payment-method/verify-bank-account", + "{}/providers/{providerId}/billing/tax-information", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -214,7 +205,6 @@ pub async fn providers_provider_id_billing_payment_method_verify_bank_account_po if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_bank_account_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -225,7 +215,7 @@ pub async fn providers_provider_id_billing_payment_method_verify_bank_account_po Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -235,19 +225,21 @@ pub async fn providers_provider_id_billing_payment_method_verify_bank_account_po } } -pub async fn providers_provider_id_billing_subscription_get( +pub async fn provider_billing_update_payment_method( configuration: &configuration::Configuration, provider_id: uuid::Uuid, -) -> Result<(), Error> { + update_payment_method_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_update_payment_method_request_body = update_payment_method_request_body; let uri_str = format!( - "{}/providers/{providerId}/billing/subscription", + "{}/providers/{providerId}/billing/payment-method", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -255,6 +247,7 @@ pub async fn providers_provider_id_billing_subscription_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_update_payment_method_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -265,7 +258,7 @@ pub async fn providers_provider_id_billing_subscription_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -275,19 +268,21 @@ pub async fn providers_provider_id_billing_subscription_get( } } -pub async fn providers_provider_id_billing_tax_information_get( +pub async fn provider_billing_update_tax_information( configuration: &configuration::Configuration, provider_id: uuid::Uuid, -) -> Result<(), Error> { + tax_information_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_tax_information_request_body = tax_information_request_body; let uri_str = format!( "{}/providers/{providerId}/billing/tax-information", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -295,6 +290,7 @@ pub async fn providers_provider_id_billing_tax_information_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_tax_information_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -305,7 +301,7 @@ pub async fn providers_provider_id_billing_tax_information_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -315,21 +311,23 @@ pub async fn providers_provider_id_billing_tax_information_get( } } -pub async fn providers_provider_id_billing_tax_information_put( +pub async fn provider_billing_verify_bank_account( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - tax_information_request_body: Option, -) -> Result<(), Error> { + verify_bank_account_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_tax_information_request_body = tax_information_request_body; + let p_verify_bank_account_request_body = verify_bank_account_request_body; let uri_str = format!( - "{}/providers/{providerId}/billing/tax-information", + "{}/providers/{providerId}/billing/payment-method/verify-bank-account", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -337,7 +335,7 @@ pub async fn providers_provider_id_billing_tax_information_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_tax_information_request_body); + req_builder = req_builder.json(&p_verify_bank_account_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -348,7 +346,7 @@ pub async fn providers_provider_id_billing_tax_information_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/provider_billing_v_next_api.rs b/crates/bitwarden-api-api/src/apis/provider_billing_v_next_api.rs index 7a762e33e..354ce7966 100644 --- a/crates/bitwarden-api-api/src/apis/provider_billing_v_next_api.rs +++ b/crates/bitwarden-api-api/src/apis/provider_billing_v_next_api.rs @@ -14,57 +14,56 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_provider_id_billing_vnext_address_get`] +/// struct for typed errors of method [`provider_billing_v_next_add_credit_via_bit_pay`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextAddressGetError { +pub enum ProviderBillingVNextAddCreditViaBitPayError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_vnext_address_put`] +/// struct for typed errors of method [`provider_billing_v_next_get_billing_address`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextAddressPutError { +pub enum ProviderBillingVNextGetBillingAddressError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_vnext_credit_bitpay_post`] +/// struct for typed errors of method [`provider_billing_v_next_get_credit`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextCreditBitpayPostError { +pub enum ProviderBillingVNextGetCreditError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_vnext_credit_get`] +/// struct for typed errors of method [`provider_billing_v_next_get_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextCreditGetError { +pub enum ProviderBillingVNextGetPaymentMethodError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_vnext_payment_method_get`] +/// struct for typed errors of method [`provider_billing_v_next_get_warnings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextPaymentMethodGetError { +pub enum ProviderBillingVNextGetWarningsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_billing_vnext_payment_method_put`] +/// struct for typed errors of method [`provider_billing_v_next_update_billing_address`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextPaymentMethodPutError { +pub enum ProviderBillingVNextUpdateBillingAddressError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`providers_provider_id_billing_vnext_payment_method_verify_bank_account_post`] +/// struct for typed errors of method [`provider_billing_v_next_update_payment_method`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdBillingVnextPaymentMethodVerifyBankAccountPostError { +pub enum ProviderBillingVNextUpdatePaymentMethodError { UnknownValue(serde_json::Value), } -pub async fn providers_provider_id_billing_vnext_address_get( +pub async fn provider_billing_v_next_add_credit_via_bit_pay( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -87,7 +86,8 @@ pub async fn providers_provider_id_billing_vnext_address_get( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, -) -> Result<(), Error> { + bit_pay_credit_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -110,13 +110,16 @@ pub async fn providers_provider_id_billing_vnext_address_get( let p_gateway_customer_id = gateway_customer_id; let p_gateway_subscription_id = gateway_subscription_id; let p_discount_id = discount_id; + let p_bit_pay_credit_request = bit_pay_credit_request; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/address", + "{}/providers/{providerId}/billing/vnext/credit/bitpay", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -184,6 +187,7 @@ pub async fn providers_provider_id_billing_vnext_address_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_bit_pay_credit_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -194,7 +198,7 @@ pub async fn providers_provider_id_billing_vnext_address_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -204,7 +208,7 @@ pub async fn providers_provider_id_billing_vnext_address_get( } } -pub async fn providers_provider_id_billing_vnext_address_put( +pub async fn provider_billing_v_next_get_billing_address( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -227,8 +231,7 @@ pub async fn providers_provider_id_billing_vnext_address_put( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, - billing_address_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -251,14 +254,13 @@ pub async fn providers_provider_id_billing_vnext_address_put( let p_gateway_customer_id = gateway_customer_id; let p_gateway_subscription_id = gateway_subscription_id; let p_discount_id = discount_id; - let p_billing_address_request = billing_address_request; let uri_str = format!( "{}/providers/{providerId}/billing/vnext/address", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -326,7 +328,6 @@ pub async fn providers_provider_id_billing_vnext_address_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_billing_address_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -337,7 +338,7 @@ pub async fn providers_provider_id_billing_vnext_address_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -347,7 +348,7 @@ pub async fn providers_provider_id_billing_vnext_address_put( } } -pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( +pub async fn provider_billing_v_next_get_credit( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -370,8 +371,7 @@ pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, - bit_pay_credit_request: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -394,16 +394,13 @@ pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( let p_gateway_customer_id = gateway_customer_id; let p_gateway_subscription_id = gateway_subscription_id; let p_discount_id = discount_id; - let p_bit_pay_credit_request = bit_pay_credit_request; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/credit/bitpay", + "{}/providers/{providerId}/billing/vnext/credit", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -471,7 +468,6 @@ pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_bit_pay_credit_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -482,7 +478,7 @@ pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -492,7 +488,7 @@ pub async fn providers_provider_id_billing_vnext_credit_bitpay_post( } } -pub async fn providers_provider_id_billing_vnext_credit_get( +pub async fn provider_billing_v_next_get_payment_method( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -515,7 +511,7 @@ pub async fn providers_provider_id_billing_vnext_credit_get( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -540,7 +536,7 @@ pub async fn providers_provider_id_billing_vnext_credit_get( let p_discount_id = discount_id; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/credit", + "{}/providers/{providerId}/billing/vnext/payment-method", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); @@ -622,7 +618,7 @@ pub async fn providers_provider_id_billing_vnext_credit_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -632,7 +628,7 @@ pub async fn providers_provider_id_billing_vnext_credit_get( } } -pub async fn providers_provider_id_billing_vnext_payment_method_get( +pub async fn provider_billing_v_next_get_warnings( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -655,7 +651,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_get( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -680,7 +676,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_get( let p_discount_id = discount_id; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/payment-method", + "{}/providers/{providerId}/billing/vnext/warnings", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); @@ -762,7 +758,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -772,7 +768,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_get( } } -pub async fn providers_provider_id_billing_vnext_payment_method_put( +pub async fn provider_billing_v_next_update_billing_address( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -795,8 +791,8 @@ pub async fn providers_provider_id_billing_vnext_payment_method_put( gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, - tokenized_payment_method_request: Option, -) -> Result<(), Error> { + billing_address_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -819,10 +815,10 @@ pub async fn providers_provider_id_billing_vnext_payment_method_put( let p_gateway_customer_id = gateway_customer_id; let p_gateway_subscription_id = gateway_subscription_id; let p_discount_id = discount_id; - let p_tokenized_payment_method_request = tokenized_payment_method_request; + let p_billing_address_request = billing_address_request; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/payment-method", + "{}/providers/{providerId}/billing/vnext/address", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); @@ -894,7 +890,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_tokenized_payment_method_request); + req_builder = req_builder.json(&p_billing_address_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -905,7 +901,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -915,7 +911,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_put( } } -pub async fn providers_provider_id_billing_vnext_payment_method_verify_bank_account_post( +pub async fn provider_billing_v_next_update_payment_method( configuration: &configuration::Configuration, provider_id: &str, id: Option, @@ -938,8 +934,8 @@ pub async fn providers_provider_id_billing_vnext_payment_method_verify_bank_acco gateway_customer_id: Option<&str>, gateway_subscription_id: Option<&str>, discount_id: Option<&str>, - verify_bank_account_request: Option, -) -> Result<(), Error> { + tokenized_payment_method_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -962,16 +958,14 @@ pub async fn providers_provider_id_billing_vnext_payment_method_verify_bank_acco let p_gateway_customer_id = gateway_customer_id; let p_gateway_subscription_id = gateway_subscription_id; let p_discount_id = discount_id; - let p_verify_bank_account_request = verify_bank_account_request; + let p_tokenized_payment_method_request = tokenized_payment_method_request; let uri_str = format!( - "{}/providers/{providerId}/billing/vnext/payment-method/verify-bank-account", + "{}/providers/{providerId}/billing/vnext/payment-method", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref param_value) = p_id { req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); @@ -1039,7 +1033,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_verify_bank_acco if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_verify_bank_account_request); + req_builder = req_builder.json(&p_tokenized_payment_method_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1050,7 +1044,7 @@ pub async fn providers_provider_id_billing_vnext_payment_method_verify_bank_acco Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/provider_clients_api.rs b/crates/bitwarden-api-api/src/apis/provider_clients_api.rs index 4548086b6..1143a6042 100644 --- a/crates/bitwarden-api-api/src/apis/provider_clients_api.rs +++ b/crates/bitwarden-api-api/src/apis/provider_clients_api.rs @@ -14,47 +14,51 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_provider_id_clients_addable_get`] +/// struct for typed errors of method [`provider_clients_add_existing_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdClientsAddableGetError { +pub enum ProviderClientsAddExistingOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_clients_existing_post`] +/// struct for typed errors of method [`provider_clients_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdClientsExistingPostError { +pub enum ProviderClientsCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_clients_post`] +/// struct for typed errors of method [`provider_clients_get_addable_organizations`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdClientsPostError { +pub enum ProviderClientsGetAddableOrganizationsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_clients_provider_organization_id_put`] +/// struct for typed errors of method [`provider_clients_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdClientsProviderOrganizationIdPutError { +pub enum ProviderClientsUpdateError { UnknownValue(serde_json::Value), } -pub async fn providers_provider_id_clients_addable_get( +pub async fn provider_clients_add_existing_organization( configuration: &configuration::Configuration, provider_id: uuid::Uuid, -) -> Result<(), Error> { + add_existing_organization_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_add_existing_organization_request_body = add_existing_organization_request_body; let uri_str = format!( - "{}/providers/{providerId}/clients/addable", + "{}/providers/{providerId}/clients/existing", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -62,6 +66,7 @@ pub async fn providers_provider_id_clients_addable_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_add_existing_organization_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -72,7 +77,7 @@ pub async fn providers_provider_id_clients_addable_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -82,17 +87,17 @@ pub async fn providers_provider_id_clients_addable_get( } } -pub async fn providers_provider_id_clients_existing_post( +pub async fn provider_clients_create( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - add_existing_organization_request_body: Option, -) -> Result<(), Error> { + create_client_organization_request_body: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_add_existing_organization_request_body = add_existing_organization_request_body; + let p_create_client_organization_request_body = create_client_organization_request_body; let uri_str = format!( - "{}/providers/{providerId}/clients/existing", + "{}/providers/{providerId}/clients", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); @@ -106,7 +111,7 @@ pub async fn providers_provider_id_clients_existing_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_add_existing_organization_request_body); + req_builder = req_builder.json(&p_create_client_organization_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -117,8 +122,7 @@ pub async fn providers_provider_id_clients_existing_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -127,23 +131,19 @@ pub async fn providers_provider_id_clients_existing_post( } } -pub async fn providers_provider_id_clients_post( +pub async fn provider_clients_get_addable_organizations( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - create_client_organization_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_create_client_organization_request_body = create_client_organization_request_body; let uri_str = format!( - "{}/providers/{providerId}/clients", + "{}/providers/{providerId}/clients/addable", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -151,7 +151,6 @@ pub async fn providers_provider_id_clients_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_create_client_organization_request_body); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -162,7 +161,7 @@ pub async fn providers_provider_id_clients_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -172,12 +171,12 @@ pub async fn providers_provider_id_clients_post( } } -pub async fn providers_provider_id_clients_provider_organization_id_put( +pub async fn provider_clients_update( configuration: &configuration::Configuration, provider_id: uuid::Uuid, provider_organization_id: uuid::Uuid, update_client_organization_request_body: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_provider_organization_id = provider_organization_id; @@ -208,8 +207,7 @@ pub async fn providers_provider_id_clients_provider_organization_id_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/provider_organizations_api.rs b/crates/bitwarden-api-api/src/apis/provider_organizations_api.rs index 6b7306ed7..71ec6d26d 100644 --- a/crates/bitwarden-api-api/src/apis/provider_organizations_api.rs +++ b/crates/bitwarden-api-api/src/apis/provider_organizations_api.rs @@ -14,46 +14,46 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_provider_id_organizations_add_post`] +/// struct for typed errors of method [`provider_organizations_add`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdOrganizationsAddPostError { +pub enum ProviderOrganizationsAddError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_organizations_get`] +/// struct for typed errors of method [`provider_organizations_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdOrganizationsGetError { +pub enum ProviderOrganizationsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_organizations_id_delete`] +/// struct for typed errors of method [`provider_organizations_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdOrganizationsIdDeleteError { +pub enum ProviderOrganizationsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_organizations_id_delete_post`] +/// struct for typed errors of method [`provider_organizations_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdOrganizationsIdDeletePostError { +pub enum ProviderOrganizationsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_organizations_post`] +/// struct for typed errors of method [`provider_organizations_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdOrganizationsPostError { +pub enum ProviderOrganizationsPostDeleteError { UnknownValue(serde_json::Value), } -pub async fn providers_provider_id_organizations_add_post( +pub async fn provider_organizations_add( configuration: &configuration::Configuration, provider_id: uuid::Uuid, provider_organization_add_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_provider_organization_add_request_model = provider_organization_add_request_model; @@ -84,8 +84,7 @@ pub async fn providers_provider_id_organizations_add_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -94,22 +93,24 @@ pub async fn providers_provider_id_organizations_add_post( } } -pub async fn providers_provider_id_organizations_get( +pub async fn provider_organizations_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, -) -> Result< - models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_id = id; let uri_str = format!( - "{}/providers/{providerId}/organizations", + "{}/providers/{providerId}/organizations/{id}", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -122,24 +123,12 @@ pub async fn providers_provider_id_organizations_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -148,24 +137,22 @@ pub async fn providers_provider_id_organizations_get( } } -pub async fn providers_provider_id_organizations_id_delete( +pub async fn provider_organizations_get( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result< + models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_id = id; let uri_str = format!( - "{}/providers/{providerId}/organizations/{id}", + "{}/providers/{providerId}/organizations", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -178,13 +165,23 @@ pub async fn providers_provider_id_organizations_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderOrganizationOrganizationDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -193,20 +190,21 @@ pub async fn providers_provider_id_organizations_id_delete( } } -pub async fn providers_provider_id_organizations_id_delete_post( +pub async fn provider_organizations_post( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { + provider_organization_create_request_model: Option< + models::ProviderOrganizationCreateRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_id = id; + let p_provider_organization_create_request_model = provider_organization_create_request_model; let uri_str = format!( - "{}/providers/{providerId}/organizations/{id}/delete", + "{}/providers/{providerId}/organizations", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); let mut req_builder = configuration .client @@ -218,18 +216,29 @@ pub async fn providers_provider_id_organizations_id_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_provider_organization_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderOrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderOrganizationResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -238,24 +247,20 @@ pub async fn providers_provider_id_organizations_id_delete_post( } } -pub async fn providers_provider_id_organizations_post( +pub async fn provider_organizations_post_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - provider_organization_create_request_model: Option< - models::ProviderOrganizationCreateRequestModel, - >, -) -> Result< - models::ProviderOrganizationResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_provider_organization_create_request_model = provider_organization_create_request_model; + let p_id = id; let uri_str = format!( - "{}/providers/{providerId}/organizations", + "{}/providers/{providerId}/organizations/{id}/delete", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -267,29 +272,17 @@ pub async fn providers_provider_id_organizations_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_organization_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderOrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderOrganizationResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/provider_users_api.rs b/crates/bitwarden-api-api/src/apis/provider_users_api.rs index 63a30f89e..5568b5ea7 100644 --- a/crates/bitwarden-api-api/src/apis/provider_users_api.rs +++ b/crates/bitwarden-api-api/src/apis/provider_users_api.rs @@ -14,127 +14,127 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_provider_id_users_confirm_post`] +/// struct for typed errors of method [`provider_users_accept`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersConfirmPostError { +pub enum ProviderUsersAcceptError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_delete`] +/// struct for typed errors of method [`provider_users_bulk_confirm`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersDeleteError { +pub enum ProviderUsersBulkConfirmError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_delete_post`] +/// struct for typed errors of method [`provider_users_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersDeletePostError { +pub enum ProviderUsersBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_get`] +/// struct for typed errors of method [`provider_users_bulk_reinvite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersGetError { +pub enum ProviderUsersBulkReinviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_accept_post`] +/// struct for typed errors of method [`provider_users_confirm`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdAcceptPostError { +pub enum ProviderUsersConfirmError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_confirm_post`] +/// struct for typed errors of method [`provider_users_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdConfirmPostError { +pub enum ProviderUsersDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_delete`] +/// struct for typed errors of method [`provider_users_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdDeleteError { +pub enum ProviderUsersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_delete_post`] +/// struct for typed errors of method [`provider_users_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdDeletePostError { +pub enum ProviderUsersGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_get`] +/// struct for typed errors of method [`provider_users_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdGetError { +pub enum ProviderUsersInviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_post`] +/// struct for typed errors of method [`provider_users_post_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdPostError { +pub enum ProviderUsersPostBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_put`] +/// struct for typed errors of method [`provider_users_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdPutError { +pub enum ProviderUsersPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_id_reinvite_post`] +/// struct for typed errors of method [`provider_users_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersIdReinvitePostError { +pub enum ProviderUsersPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_invite_post`] +/// struct for typed errors of method [`provider_users_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersInvitePostError { +pub enum ProviderUsersPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_public_keys_post`] +/// struct for typed errors of method [`provider_users_reinvite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersPublicKeysPostError { +pub enum ProviderUsersReinviteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_provider_id_users_reinvite_post`] +/// struct for typed errors of method [`provider_users_user_public_keys`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersProviderIdUsersReinvitePostError { +pub enum ProviderUsersUserPublicKeysError { UnknownValue(serde_json::Value), } -pub async fn providers_provider_id_users_confirm_post( +pub async fn provider_users_accept( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - provider_user_bulk_confirm_request_model: Option, -) -> Result< - models::ProviderUserBulkResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, + provider_user_accept_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_provider_user_bulk_confirm_request_model = provider_user_bulk_confirm_request_model; + let p_id = id; + let p_provider_user_accept_request_model = provider_user_accept_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/confirm", + "{}/providers/{providerId}/users/{id}/accept", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -146,30 +146,18 @@ pub async fn providers_provider_id_users_confirm_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_bulk_confirm_request_model); + req_builder = req_builder.json(&p_provider_user_accept_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -178,26 +166,26 @@ pub async fn providers_provider_id_users_confirm_post( } } -pub async fn providers_provider_id_users_delete( +pub async fn provider_users_bulk_confirm( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - provider_user_bulk_request_model: Option, + provider_user_bulk_confirm_request_model: Option, ) -> Result< models::ProviderUserBulkResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_provider_user_bulk_request_model = provider_user_bulk_request_model; + let p_provider_user_bulk_confirm_request_model = provider_user_bulk_confirm_request_model; let uri_str = format!( - "{}/providers/{providerId}/users", + "{}/providers/{providerId}/users/confirm", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -205,7 +193,7 @@ pub async fn providers_provider_id_users_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_bulk_request_model); + req_builder = req_builder.json(&p_provider_user_bulk_confirm_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -227,8 +215,7 @@ pub async fn providers_provider_id_users_delete( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -237,26 +224,26 @@ pub async fn providers_provider_id_users_delete( } } -pub async fn providers_provider_id_users_delete_post( +pub async fn provider_users_bulk_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, provider_user_bulk_request_model: Option, ) -> Result< models::ProviderUserBulkResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_provider_user_bulk_request_model = provider_user_bulk_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/delete", + "{}/providers/{providerId}/users", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -286,8 +273,7 @@ pub async fn providers_provider_id_users_delete_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -296,22 +282,26 @@ pub async fn providers_provider_id_users_delete_post( } } -pub async fn providers_provider_id_users_get( +pub async fn provider_users_bulk_reinvite( configuration: &configuration::Configuration, provider_id: uuid::Uuid, + provider_user_bulk_request_model: Option, ) -> Result< - models::ProviderUserUserDetailsResponseModelListResponseModel, - Error, + models::ProviderUserBulkResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; + let p_provider_user_bulk_request_model = provider_user_bulk_request_model; let uri_str = format!( - "{}/providers/{providerId}/users", + "{}/providers/{providerId}/users/reinvite", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -319,6 +309,7 @@ pub async fn providers_provider_id_users_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_provider_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -335,12 +326,12 @@ pub async fn providers_provider_id_users_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserUserDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserUserDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -349,19 +340,19 @@ pub async fn providers_provider_id_users_get( } } -pub async fn providers_provider_id_users_id_accept_post( +pub async fn provider_users_confirm( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, - provider_user_accept_request_model: Option, -) -> Result<(), Error> { + provider_user_confirm_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; - let p_provider_user_accept_request_model = provider_user_accept_request_model; + let p_provider_user_confirm_request_model = provider_user_confirm_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}/accept", + "{}/providers/{providerId}/users/{id}/confirm", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) @@ -376,7 +367,7 @@ pub async fn providers_provider_id_users_id_accept_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_accept_request_model); + req_builder = req_builder.json(&p_provider_user_confirm_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -387,8 +378,7 @@ pub async fn providers_provider_id_users_id_accept_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -397,26 +387,24 @@ pub async fn providers_provider_id_users_id_accept_post( } } -pub async fn providers_provider_id_users_id_confirm_post( +pub async fn provider_users_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, - provider_user_confirm_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; - let p_provider_user_confirm_request_model = provider_user_confirm_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}/confirm", + "{}/providers/{providerId}/users/{id}", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -424,7 +412,6 @@ pub async fn providers_provider_id_users_id_confirm_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_confirm_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -435,8 +422,7 @@ pub async fn providers_provider_id_users_id_confirm_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -445,11 +431,11 @@ pub async fn providers_provider_id_users_id_confirm_post( } } -pub async fn providers_provider_id_users_id_delete( +pub async fn provider_users_get( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; @@ -460,9 +446,7 @@ pub async fn providers_provider_id_users_id_delete( providerId = crate::apis::urlencode(p_provider_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -475,13 +459,23 @@ pub async fn providers_provider_id_users_id_delete( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -490,24 +484,22 @@ pub async fn providers_provider_id_users_id_delete( } } -pub async fn providers_provider_id_users_id_delete_post( +pub async fn provider_users_get_all( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result< + models::ProviderUserUserDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_id = id; let uri_str = format!( - "{}/providers/{providerId}/users/{id}/delete", + "{}/providers/{providerId}/users", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -520,13 +512,23 @@ pub async fn providers_provider_id_users_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserUserDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserUserDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -535,22 +537,23 @@ pub async fn providers_provider_id_users_id_delete_post( } } -pub async fn providers_provider_id_users_id_get( +pub async fn provider_users_invite( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - id: uuid::Uuid, -) -> Result> { + provider_user_invite_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_id = id; + let p_provider_user_invite_request_model = provider_user_invite_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}", + "{}/providers/{providerId}/users/invite", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -558,29 +561,18 @@ pub async fn providers_provider_id_users_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_provider_user_invite_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -589,22 +581,22 @@ pub async fn providers_provider_id_users_id_get( } } -pub async fn providers_provider_id_users_id_post( +pub async fn provider_users_post_bulk_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - id: uuid::Uuid, - provider_user_update_request_model: Option, -) -> Result<(), Error> { + provider_user_bulk_request_model: Option, +) -> Result< + models::ProviderUserBulkResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_id = id; - let p_provider_user_update_request_model = provider_user_update_request_model; + let p_provider_user_bulk_request_model = provider_user_bulk_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}", + "{}/providers/{providerId}/users/delete", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()), - id = crate::apis::urlencode(p_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()) ); let mut req_builder = configuration .client @@ -616,19 +608,29 @@ pub async fn providers_provider_id_users_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_update_request_model); + req_builder = req_builder.json(&p_provider_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -637,24 +639,24 @@ pub async fn providers_provider_id_users_id_post( } } -pub async fn providers_provider_id_users_id_put( +pub async fn provider_users_post_delete( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, - provider_user_update_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; - let p_provider_user_update_request_model = provider_user_update_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}", + "{}/providers/{providerId}/users/{id}/delete", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -662,7 +664,6 @@ pub async fn providers_provider_id_users_id_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -673,8 +674,7 @@ pub async fn providers_provider_id_users_id_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -683,17 +683,19 @@ pub async fn providers_provider_id_users_id_put( } } -pub async fn providers_provider_id_users_id_reinvite_post( +pub async fn provider_users_post_put( configuration: &configuration::Configuration, provider_id: uuid::Uuid, id: uuid::Uuid, -) -> Result<(), Error> { + provider_user_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_id = id; + let p_provider_user_update_request_model = provider_user_update_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/{id}/reinvite", + "{}/providers/{providerId}/users/{id}", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()), id = crate::apis::urlencode(p_id.to_string()) @@ -708,6 +710,7 @@ pub async fn providers_provider_id_users_id_reinvite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_provider_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -718,8 +721,7 @@ pub async fn providers_provider_id_users_id_reinvite_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -728,23 +730,24 @@ pub async fn providers_provider_id_users_id_reinvite_post( } } -pub async fn providers_provider_id_users_invite_post( +pub async fn provider_users_put( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - provider_user_invite_request_model: Option, -) -> Result<(), Error> { + id: uuid::Uuid, + provider_user_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_provider_user_invite_request_model = provider_user_invite_request_model; + let p_id = id; + let p_provider_user_update_request_model = provider_user_update_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/invite", + "{}/providers/{providerId}/users/{id}", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -752,7 +755,7 @@ pub async fn providers_provider_id_users_invite_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_invite_request_model); + req_builder = req_builder.json(&p_provider_user_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -763,8 +766,7 @@ pub async fn providers_provider_id_users_invite_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -773,22 +775,20 @@ pub async fn providers_provider_id_users_invite_post( } } -pub async fn providers_provider_id_users_public_keys_post( +pub async fn provider_users_reinvite( configuration: &configuration::Configuration, provider_id: uuid::Uuid, - provider_user_bulk_request_model: Option, -) -> Result< - models::ProviderUserPublicKeyResponseModelListResponseModel, - Error, -> { + id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; - let p_provider_user_bulk_request_model = provider_user_bulk_request_model; + let p_id = id; let uri_str = format!( - "{}/providers/{providerId}/users/public-keys", + "{}/providers/{providerId}/users/{id}/reinvite", configuration.base_path, - providerId = crate::apis::urlencode(p_provider_id.to_string()) + providerId = crate::apis::urlencode(p_provider_id.to_string()), + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration .client @@ -800,30 +800,17 @@ pub async fn providers_provider_id_users_public_keys_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_user_bulk_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserPublicKeyResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserPublicKeyResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -832,20 +819,20 @@ pub async fn providers_provider_id_users_public_keys_post( } } -pub async fn providers_provider_id_users_reinvite_post( +pub async fn provider_users_user_public_keys( configuration: &configuration::Configuration, provider_id: uuid::Uuid, provider_user_bulk_request_model: Option, ) -> Result< - models::ProviderUserBulkResponseModelListResponseModel, - Error, + models::ProviderUserPublicKeyResponseModelListResponseModel, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_provider_id = provider_id; let p_provider_user_bulk_request_model = provider_user_bulk_request_model; let uri_str = format!( - "{}/providers/{providerId}/users/reinvite", + "{}/providers/{providerId}/users/public-keys", configuration.base_path, providerId = crate::apis::urlencode(p_provider_id.to_string()) ); @@ -876,13 +863,12 @@ pub async fn providers_provider_id_users_reinvite_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserBulkResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderUserPublicKeyResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderUserPublicKeyResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/providers_api.rs b/crates/bitwarden-api-api/src/apis/providers_api.rs index 0c68114f6..e8875e7ec 100644 --- a/crates/bitwarden-api-api/src/apis/providers_api.rs +++ b/crates/bitwarden-api-api/src/apis/providers_api.rs @@ -14,59 +14,59 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`providers_id_delete`] +/// struct for typed errors of method [`providers_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdDeleteError { +pub enum ProvidersDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_delete_post`] +/// struct for typed errors of method [`providers_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdDeletePostError { +pub enum ProvidersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_delete_recover_token_post`] +/// struct for typed errors of method [`providers_post_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdDeleteRecoverTokenPostError { +pub enum ProvidersPostDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_get`] +/// struct for typed errors of method [`providers_post_delete_recover_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdGetError { +pub enum ProvidersPostDeleteRecoverTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_post`] +/// struct for typed errors of method [`providers_post_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdPostError { +pub enum ProvidersPostPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_put`] +/// struct for typed errors of method [`providers_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdPutError { +pub enum ProvidersPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`providers_id_setup_post`] +/// struct for typed errors of method [`providers_setup`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProvidersIdSetupPostError { +pub enum ProvidersSetupError { UnknownValue(serde_json::Value), } -pub async fn providers_id_delete( +pub async fn providers_delete( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -95,7 +95,7 @@ pub async fn providers_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -104,21 +104,19 @@ pub async fn providers_id_delete( } } -pub async fn providers_id_delete_post( +pub async fn providers_get( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let uri_str = format!( - "{}/providers/{id}/delete", + "{}/providers/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -131,12 +129,23 @@ pub async fn providers_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -145,20 +154,15 @@ pub async fn providers_id_delete_post( } } -pub async fn providers_id_delete_recover_token_post( +pub async fn providers_post_delete( configuration: &configuration::Configuration, id: uuid::Uuid, - provider_verify_delete_recover_request_model: Option< - models::ProviderVerifyDeleteRecoverRequestModel, - >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_provider_verify_delete_recover_request_model = - provider_verify_delete_recover_request_model; let uri_str = format!( - "{}/providers/{id}/delete-recover-token", + "{}/providers/{id}/delete", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); @@ -172,7 +176,6 @@ pub async fn providers_id_delete_recover_token_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_provider_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -183,8 +186,7 @@ pub async fn providers_id_delete_recover_token_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -193,19 +195,26 @@ pub async fn providers_id_delete_recover_token_post( } } -pub async fn providers_id_get( +pub async fn providers_post_delete_recover_token( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + provider_verify_delete_recover_request_model: Option< + models::ProviderVerifyDeleteRecoverRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_provider_verify_delete_recover_request_model = + provider_verify_delete_recover_request_model; let uri_str = format!( - "{}/providers/{id}", + "{}/providers/{id}/delete-recover-token", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -213,28 +222,19 @@ pub async fn providers_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_provider_verify_delete_recover_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProviderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProviderResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -243,11 +243,11 @@ pub async fn providers_id_get( } } -pub async fn providers_id_post( +pub async fn providers_post_put( configuration: &configuration::Configuration, id: uuid::Uuid, provider_update_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_provider_update_request_model = provider_update_request_model; @@ -289,7 +289,7 @@ pub async fn providers_id_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -298,11 +298,11 @@ pub async fn providers_id_post( } } -pub async fn providers_id_put( +pub async fn providers_put( configuration: &configuration::Configuration, id: uuid::Uuid, provider_update_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_provider_update_request_model = provider_update_request_model; @@ -342,7 +342,7 @@ pub async fn providers_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -351,11 +351,11 @@ pub async fn providers_id_put( } } -pub async fn providers_id_setup_post( +pub async fn providers_setup( configuration: &configuration::Configuration, id: uuid::Uuid, provider_setup_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_provider_setup_request_model = provider_setup_request_model; @@ -397,7 +397,7 @@ pub async fn providers_id_setup_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/push_api.rs b/crates/bitwarden-api-api/src/apis/push_api.rs index 51c4665b3..05137c32d 100644 --- a/crates/bitwarden-api-api/src/apis/push_api.rs +++ b/crates/bitwarden-api-api/src/apis/push_api.rs @@ -14,45 +14,45 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`push_add_organization_put`] +/// struct for typed errors of method [`push_add_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushAddOrganizationPutError { +pub enum PushAddOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`push_delete_organization_put`] +/// struct for typed errors of method [`push_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushDeleteOrganizationPutError { +pub enum PushDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`push_delete_post`] +/// struct for typed errors of method [`push_delete_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushDeletePostError { +pub enum PushDeleteOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`push_register_post`] +/// struct for typed errors of method [`push_register`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushRegisterPostError { +pub enum PushRegisterError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`push_send_post`] +/// struct for typed errors of method [`push_send`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushSendPostError { +pub enum PushSendError { UnknownValue(serde_json::Value), } -pub async fn push_add_organization_put( +pub async fn push_add_organization( configuration: &configuration::Configuration, push_update_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_push_update_request_model = push_update_request_model; @@ -76,7 +76,7 @@ pub async fn push_add_organization_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -85,15 +85,17 @@ pub async fn push_add_organization_put( } } -pub async fn push_delete_organization_put( +pub async fn push_delete( configuration: &configuration::Configuration, - push_update_request_model: Option, -) -> Result<(), Error> { + push_device_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_push_update_request_model = push_update_request_model; + let p_push_device_request_model = push_device_request_model; - let uri_str = format!("{}/push/delete-organization", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/push/delete", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -101,7 +103,7 @@ pub async fn push_delete_organization_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_push_update_request_model); + req_builder = req_builder.json(&p_push_device_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -112,7 +114,7 @@ pub async fn push_delete_organization_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -121,17 +123,15 @@ pub async fn push_delete_organization_put( } } -pub async fn push_delete_post( +pub async fn push_delete_organization( configuration: &configuration::Configuration, - push_device_request_model: Option, -) -> Result<(), Error> { + push_update_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_push_device_request_model = push_device_request_model; + let p_push_update_request_model = push_update_request_model; - let uri_str = format!("{}/push/delete", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/push/delete-organization", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -139,7 +139,7 @@ pub async fn push_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_push_device_request_model); + req_builder = req_builder.json(&p_push_update_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -150,7 +150,7 @@ pub async fn push_delete_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -159,10 +159,10 @@ pub async fn push_delete_post( } } -pub async fn push_register_post( +pub async fn push_register( configuration: &configuration::Configuration, push_registration_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_push_registration_request_model = push_registration_request_model; @@ -188,7 +188,7 @@ pub async fn push_register_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -197,10 +197,10 @@ pub async fn push_register_post( } } -pub async fn push_send_post( +pub async fn push_send( configuration: &configuration::Configuration, json_element_push_send_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_json_element_push_send_request_model = json_element_push_send_request_model; @@ -226,7 +226,7 @@ pub async fn push_send_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/reports_api.rs b/crates/bitwarden-api-api/src/apis/reports_api.rs index 0daec6ffb..b50878a9e 100644 --- a/crates/bitwarden-api-api/src/apis/reports_api.rs +++ b/crates/bitwarden-api-api/src/apis/reports_api.rs @@ -14,277 +14,60 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`reports_member_access_org_id_get`] +/// struct for typed errors of method [`reports_add_password_health_report_application`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsMemberAccessOrgIdGetError { +pub enum ReportsAddPasswordHealthReportApplicationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_member_cipher_details_org_id_get`] +/// struct for typed errors of method [`reports_add_password_health_report_applications`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsMemberCipherDetailsOrgIdGetError { +pub enum ReportsAddPasswordHealthReportApplicationsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_organization_report_summary_org_id_get`] +/// struct for typed errors of method [`reports_drop_password_health_report_application`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsOrganizationReportSummaryOrgIdGetError { +pub enum ReportsDropPasswordHealthReportApplicationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_organization_report_summary_post`] +/// struct for typed errors of method [`reports_get_member_access_report`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsOrganizationReportSummaryPostError { +pub enum ReportsGetMemberAccessReportError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_organization_report_summary_put`] +/// struct for typed errors of method [`reports_get_member_cipher_details`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsOrganizationReportSummaryPutError { +pub enum ReportsGetMemberCipherDetailsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_organization_reports_delete`] +/// struct for typed errors of method [`reports_get_password_health_report_applications`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ReportsOrganizationReportsDeleteError { +pub enum ReportsGetPasswordHealthReportApplicationsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`reports_organization_reports_latest_org_id_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsOrganizationReportsLatestOrgIdGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_organization_reports_org_id_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsOrganizationReportsOrgIdGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_organization_reports_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsOrganizationReportsPostError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_password_health_report_application_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsPasswordHealthReportApplicationDeleteError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_password_health_report_application_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsPasswordHealthReportApplicationPostError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_password_health_report_applications_org_id_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsPasswordHealthReportApplicationsOrgIdGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`reports_password_health_report_applications_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ReportsPasswordHealthReportApplicationsPostError { - UnknownValue(serde_json::Value), -} - -pub async fn reports_member_access_org_id_get( - configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { - // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - - let uri_str = format!( - "{}/reports/member-access/{orgId}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::MemberAccessDetailReportResponseModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::MemberAccessDetailReportResponseModel>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_member_cipher_details_org_id_get( +pub async fn reports_add_password_health_report_application( configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { - // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - - let uri_str = format!( - "{}/reports/member-cipher-details/{orgId}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::MemberCipherDetailsResponseModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::MemberCipherDetailsResponseModel>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_report_summary_org_id_get( - configuration: &configuration::Configuration, - org_id: uuid::Uuid, - from: Option, - to: Option, + password_health_report_application_model: Option, ) -> Result< - Vec, - Error, + models::PasswordHealthReportApplication, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - let p_from = from; - let p_to = to; - - let uri_str = format!( - "{}/reports/organization-report-summary/{orgId}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref param_value) = p_from { - req_builder = req_builder.query(&[("from", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_to { - req_builder = req_builder.query(&[("to", ¶m_value.to_string())]); - } - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationReportSummaryModel>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationReportSummaryModel>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_report_summary_post( - configuration: &configuration::Configuration, - organization_report_summary_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_organization_report_summary_model = organization_report_summary_model; + let p_password_health_report_application_model = password_health_report_application_model; let uri_str = format!( - "{}/reports/organization-report-summary", + "{}/reports/password-health-report-application", configuration.base_path ); let mut req_builder = configuration @@ -297,126 +80,7 @@ pub async fn reports_organization_report_summary_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_report_summary_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_report_summary_put( - configuration: &configuration::Configuration, - organization_report_summary_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_organization_report_summary_model = organization_report_summary_model; - - let uri_str = format!( - "{}/reports/organization-report-summary", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_organization_report_summary_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_reports_delete( - configuration: &configuration::Configuration, - drop_organization_report_request: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_drop_organization_report_request = drop_organization_report_request; - - let uri_str = format!("{}/reports/organization-reports", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_drop_organization_report_request); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_reports_latest_org_id_get( - configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - - let uri_str = format!( - "{}/reports/organization-reports/latest/{orgId}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; + req_builder = req_builder.json(&p_password_health_report_application_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -433,12 +97,12 @@ pub async fn reports_organization_reports_latest_org_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationReport`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationReport`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PasswordHealthReportApplication`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PasswordHealthReportApplication`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -448,65 +112,22 @@ pub async fn reports_organization_reports_latest_org_id_get( } } -pub async fn reports_organization_reports_org_id_get( +pub async fn reports_add_password_health_report_applications( configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result, Error> { + password_health_report_application_model: Option< + Vec, + >, +) -> Result< + Vec, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; + let p_password_health_report_application_model = password_health_report_application_model; let uri_str = format!( - "{}/reports/organization-reports/{orgId}", - configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + "{}/reports/password-health-report-applications", + configuration.base_path ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::OrganizationReport>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::OrganizationReport>`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn reports_organization_reports_post( - configuration: &configuration::Configuration, - add_organization_report_request: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_add_organization_report_request = add_organization_report_request; - - let uri_str = format!("{}/reports/organization-reports", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -517,7 +138,7 @@ pub async fn reports_organization_reports_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_add_organization_report_request); + req_builder = req_builder.json(&p_password_health_report_application_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -534,12 +155,12 @@ pub async fn reports_organization_reports_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationReport`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationReport`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PasswordHealthReportApplication>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PasswordHealthReportApplication>`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -549,12 +170,12 @@ pub async fn reports_organization_reports_post( } } -pub async fn reports_password_health_report_application_delete( +pub async fn reports_drop_password_health_report_application( configuration: &configuration::Configuration, drop_password_health_report_application_request: Option< models::DropPasswordHealthReportApplicationRequest, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_drop_password_health_report_application_request = drop_password_health_report_application_request; @@ -584,7 +205,7 @@ pub async fn reports_password_health_report_application_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -594,23 +215,22 @@ pub async fn reports_password_health_report_application_delete( } } -pub async fn reports_password_health_report_application_post( +pub async fn reports_get_member_access_report( configuration: &configuration::Configuration, - password_health_report_application_model: Option, + org_id: uuid::Uuid, ) -> Result< - models::PasswordHealthReportApplication, - Error, + Vec, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_password_health_report_application_model = password_health_report_application_model; + let p_org_id = org_id; let uri_str = format!( - "{}/reports/password-health-report-application", - configuration.base_path + "{}/reports/member-access/{orgId}", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -618,7 +238,6 @@ pub async fn reports_password_health_report_application_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_password_health_report_application_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -635,13 +254,12 @@ pub async fn reports_password_health_report_application_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PasswordHealthReportApplication`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PasswordHealthReportApplication`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::MemberAccessDetailReportResponseModel>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::MemberAccessDetailReportResponseModel>`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -650,18 +268,16 @@ pub async fn reports_password_health_report_application_post( } } -pub async fn reports_password_health_report_applications_org_id_get( +pub async fn reports_get_member_cipher_details( configuration: &configuration::Configuration, org_id: uuid::Uuid, -) -> Result< - Vec, - Error, -> { +) -> Result, Error> +{ // add a prefix to parameters to efficiently prevent name collisions let p_org_id = org_id; let uri_str = format!( - "{}/reports/password-health-report-applications/{orgId}", + "{}/reports/member-cipher-details/{orgId}", configuration.base_path, orgId = crate::apis::urlencode(p_org_id.to_string()) ); @@ -689,12 +305,12 @@ pub async fn reports_password_health_report_applications_org_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PasswordHealthReportApplication>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::PasswordHealthReportApplication>`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::MemberCipherDetailsResponseModel>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::MemberCipherDetailsResponseModel>`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -704,25 +320,22 @@ pub async fn reports_password_health_report_applications_org_id_get( } } -pub async fn reports_password_health_report_applications_post( +pub async fn reports_get_password_health_report_applications( configuration: &configuration::Configuration, - password_health_report_application_model: Option< - Vec, - >, + org_id: uuid::Uuid, ) -> Result< Vec, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions - let p_password_health_report_application_model = password_health_report_application_model; + let p_org_id = org_id; let uri_str = format!( - "{}/reports/password-health-report-applications", - configuration.base_path + "{}/reports/password-health-report-applications/{orgId}", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -730,7 +343,6 @@ pub async fn reports_password_health_report_applications_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_password_health_report_application_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -752,7 +364,7 @@ pub async fn reports_password_health_report_applications_post( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/request_sm_access_api.rs b/crates/bitwarden-api-api/src/apis/request_sm_access_api.rs index 0c3ec8aef..97cb21682 100644 --- a/crates/bitwarden-api-api/src/apis/request_sm_access_api.rs +++ b/crates/bitwarden-api-api/src/apis/request_sm_access_api.rs @@ -14,17 +14,17 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`request_access_request_sm_access_post`] +/// struct for typed errors of method [`request_sm_access_request_sm_access_from_admins`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum RequestAccessRequestSmAccessPostError { +pub enum RequestSmAccessRequestSmAccessFromAdminsError { UnknownValue(serde_json::Value), } -pub async fn request_access_request_sm_access_post( +pub async fn request_sm_access_request_sm_access_from_admins( configuration: &configuration::Configuration, request_sm_access_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_request_sm_access_request_model = request_sm_access_request_model; @@ -53,7 +53,7 @@ pub async fn request_access_request_sm_access_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/secrets_api.rs b/crates/bitwarden-api-api/src/apis/secrets_api.rs index a75c7d8c4..23eac3a9f 100644 --- a/crates/bitwarden-api-api/src/apis/secrets_api.rs +++ b/crates/bitwarden-api-api/src/apis/secrets_api.rs @@ -14,78 +14,73 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_secrets_get`] +/// struct for typed errors of method [`secrets_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdSecretsGetError { +pub enum SecretsBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_secrets_post`] +/// struct for typed errors of method [`secrets_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdSecretsPostError { +pub enum SecretsCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_secrets_sync_get`] +/// struct for typed errors of method [`secrets_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdSecretsSyncGetError { +pub enum SecretsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_project_id_secrets_get`] +/// struct for typed errors of method [`secrets_get_secrets_by_ids`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsProjectIdSecretsGetError { +pub enum SecretsGetSecretsByIdsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_delete_post`] +/// struct for typed errors of method [`secrets_get_secrets_by_project`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsDeletePostError { +pub enum SecretsGetSecretsByProjectError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_get_by_ids_post`] +/// struct for typed errors of method [`secrets_get_secrets_sync`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsGetByIdsPostError { +pub enum SecretsGetSecretsSyncError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_id_get`] +/// struct for typed errors of method [`secrets_list_by_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsIdGetError { +pub enum SecretsListByOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_id_put`] +/// struct for typed errors of method [`secrets_update_secret`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsIdPutError { +pub enum SecretsUpdateSecretError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_secrets_get( +pub async fn secrets_bulk_delete( configuration: &configuration::Configuration, - organization_id: uuid::Uuid, -) -> Result< - models::SecretWithProjectsListResponseModel, - Error, -> { + uuid_colon_colon_uuid: Option>, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; + let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; - let uri_str = format!( - "{}/organizations/{organizationId}/secrets", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/secrets/delete", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -93,6 +88,7 @@ pub async fn organizations_organization_id_secrets_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_uuid_colon_colon_uuid); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -109,13 +105,12 @@ pub async fn organizations_organization_id_secrets_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -124,11 +119,11 @@ pub async fn organizations_organization_id_secrets_get( } } -pub async fn organizations_organization_id_secrets_post( +pub async fn secrets_create( configuration: &configuration::Configuration, organization_id: uuid::Uuid, secret_create_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_secret_create_request_model = secret_create_request_model; @@ -170,8 +165,7 @@ pub async fn organizations_organization_id_secrets_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -180,26 +174,20 @@ pub async fn organizations_organization_id_secrets_post( } } -pub async fn organizations_organization_id_secrets_sync_get( +pub async fn secrets_get( configuration: &configuration::Configuration, - organization_id: uuid::Uuid, - last_synced_date: Option, -) -> Result> -{ + id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_last_synced_date = last_synced_date; + let p_id = id; let uri_str = format!( - "{}/organizations/{organizationId}/secrets/sync", + "{}/secrets/{id}", configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) + id = crate::apis::urlencode(p_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = p_last_synced_date { - req_builder = req_builder.query(&[("lastSyncedDate", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -222,13 +210,12 @@ pub async fn organizations_organization_id_secrets_sync_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretsSyncResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretsSyncResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -237,19 +224,17 @@ pub async fn organizations_organization_id_secrets_sync_get( } } -pub async fn projects_project_id_secrets_get( +pub async fn secrets_get_secrets_by_ids( configuration: &configuration::Configuration, - project_id: uuid::Uuid, -) -> Result> { + get_secrets_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_project_id = project_id; + let p_get_secrets_request_model = get_secrets_request_model; - let uri_str = format!( - "{}/projects/{projectId}/secrets", - configuration.base_path, - projectId = crate::apis::urlencode(p_project_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/secrets/get-by-ids", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -257,6 +242,7 @@ pub async fn projects_project_id_secrets_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_get_secrets_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -273,12 +259,12 @@ pub async fn projects_project_id_secrets_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -287,17 +273,19 @@ pub async fn projects_project_id_secrets_get( } } -pub async fn secrets_delete_post( +pub async fn secrets_get_secrets_by_project( configuration: &configuration::Configuration, - uuid_colon_colon_uuid: Option>, -) -> Result> { + project_id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; + let p_project_id = project_id; - let uri_str = format!("{}/secrets/delete", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/projects/{projectId}/secrets", + configuration.base_path, + projectId = crate::apis::urlencode(p_project_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -305,7 +293,6 @@ pub async fn secrets_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_uuid_colon_colon_uuid); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -322,12 +309,12 @@ pub async fn secrets_delete_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -336,25 +323,31 @@ pub async fn secrets_delete_post( } } -pub async fn secrets_get_by_ids_post( +pub async fn secrets_get_secrets_sync( configuration: &configuration::Configuration, - get_secrets_request_model: Option, -) -> Result> { + organization_id: uuid::Uuid, + last_synced_date: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_get_secrets_request_model = get_secrets_request_model; + let p_organization_id = organization_id; + let p_last_synced_date = last_synced_date; - let uri_str = format!("{}/secrets/get-by-ids", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/organizations/{organizationId}/secrets/sync", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_last_synced_date { + req_builder = req_builder.query(&[("lastSyncedDate", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_get_secrets_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -371,12 +364,12 @@ pub async fn secrets_get_by_ids_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BaseSecretResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretsSyncResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretsSyncResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -385,17 +378,17 @@ pub async fn secrets_get_by_ids_post( } } -pub async fn secrets_id_get( +pub async fn secrets_list_by_organization( configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result> { + organization_id: uuid::Uuid, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_organization_id = organization_id; let uri_str = format!( - "{}/secrets/{id}", + "{}/organizations/{organizationId}/secrets", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -421,12 +414,12 @@ pub async fn secrets_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecretWithProjectsListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -435,11 +428,11 @@ pub async fn secrets_id_get( } } -pub async fn secrets_id_put( +pub async fn secrets_update_secret( configuration: &configuration::Configuration, id: uuid::Uuid, secret_update_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_secret_update_request_model = secret_update_request_model; @@ -479,7 +472,7 @@ pub async fn secrets_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/secrets_manager_events_api.rs b/crates/bitwarden-api-api/src/apis/secrets_manager_events_api.rs index f83b19ec5..f54af5241 100644 --- a/crates/bitwarden-api-api/src/apis/secrets_manager_events_api.rs +++ b/crates/bitwarden-api-api/src/apis/secrets_manager_events_api.rs @@ -14,14 +14,14 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`sm_events_service_accounts_service_account_id_get`] +/// struct for typed errors of method [`secrets_manager_events_get_service_account_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SmEventsServiceAccountsServiceAccountIdGetError { +pub enum SecretsManagerEventsGetServiceAccountEventsError { UnknownValue(serde_json::Value), } -pub async fn sm_events_service_accounts_service_account_id_get( +pub async fn secrets_manager_events_get_service_account_events( configuration: &configuration::Configuration, service_account_id: uuid::Uuid, start: Option, @@ -29,7 +29,7 @@ pub async fn sm_events_service_accounts_service_account_id_get( continuation_token: Option<&str>, ) -> Result< models::EventResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_service_account_id = service_account_id; @@ -80,7 +80,7 @@ pub async fn sm_events_service_accounts_service_account_id_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/secrets_manager_porting_api.rs b/crates/bitwarden-api-api/src/apis/secrets_manager_porting_api.rs index 077432717..ae7fef9b6 100644 --- a/crates/bitwarden-api-api/src/apis/secrets_manager_porting_api.rs +++ b/crates/bitwarden-api-api/src/apis/secrets_manager_porting_api.rs @@ -14,24 +14,24 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`sm_organization_id_export_get`] +/// struct for typed errors of method [`secrets_manager_porting_export`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SmOrganizationIdExportGetError { +pub enum SecretsManagerPortingExportError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sm_organization_id_import_post`] +/// struct for typed errors of method [`secrets_manager_porting_import`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SmOrganizationIdImportPostError { +pub enum SecretsManagerPortingImportError { UnknownValue(serde_json::Value), } -pub async fn sm_organization_id_export_get( +pub async fn secrets_manager_porting_export( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -69,7 +69,7 @@ pub async fn sm_organization_id_export_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -78,11 +78,11 @@ pub async fn sm_organization_id_export_get( } } -pub async fn sm_organization_id_import_post( +pub async fn secrets_manager_porting_import( configuration: &configuration::Configuration, organization_id: uuid::Uuid, sm_import_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_sm_import_request_model = sm_import_request_model; @@ -113,7 +113,7 @@ pub async fn sm_organization_id_import_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/security_task_api.rs b/crates/bitwarden-api-api/src/apis/security_task_api.rs index 9dd3d1743..c1b123181 100644 --- a/crates/bitwarden-api-api/src/apis/security_task_api.rs +++ b/crates/bitwarden-api-api/src/apis/security_task_api.rs @@ -14,53 +14,69 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`tasks_get`] +/// struct for typed errors of method [`security_task_bulk_create_tasks`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TasksGetError { +pub enum SecurityTaskBulkCreateTasksError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`tasks_org_id_bulk_create_post`] +/// struct for typed errors of method [`security_task_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TasksOrgIdBulkCreatePostError { +pub enum SecurityTaskCompleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`tasks_organization_get`] +/// struct for typed errors of method [`security_task_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TasksOrganizationGetError { +pub enum SecurityTaskGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`tasks_task_id_complete_patch`] +/// struct for typed errors of method [`security_task_get_task_metrics_for_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TasksTaskIdCompletePatchError { +pub enum SecurityTaskGetTaskMetricsForOrganizationError { UnknownValue(serde_json::Value), } -pub async fn tasks_get( +/// struct for typed errors of method [`security_task_list_for_organization`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SecurityTaskListForOrganizationError { + UnknownValue(serde_json::Value), +} + +pub async fn security_task_bulk_create_tasks( configuration: &configuration::Configuration, - status: Option, -) -> Result> { + org_id: uuid::Uuid, + bulk_create_security_tasks_request_model: Option, +) -> Result< + models::SecurityTasksResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_status = status; + let p_org_id = org_id; + let p_bulk_create_security_tasks_request_model = bulk_create_security_tasks_request_model; - let uri_str = format!("{}/tasks", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!( + "{}/tasks/{orgId}/bulk-create", + configuration.base_path, + orgId = crate::apis::urlencode(p_org_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_status { - req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_bulk_create_security_tasks_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -82,7 +98,7 @@ pub async fn tasks_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -91,24 +107,21 @@ pub async fn tasks_get( } } -pub async fn tasks_org_id_bulk_create_post( +pub async fn security_task_complete( configuration: &configuration::Configuration, - org_id: uuid::Uuid, - bulk_create_security_tasks_request_model: Option, -) -> Result> -{ + task_id: uuid::Uuid, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; - let p_bulk_create_security_tasks_request_model = bulk_create_security_tasks_request_model; + let p_task_id = task_id; let uri_str = format!( - "{}/tasks/{orgId}/bulk-create", + "{}/tasks/{taskId}/complete", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + taskId = crate::apis::urlencode(p_task_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::PATCH, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -116,7 +129,44 @@ pub async fn tasks_org_id_bulk_create_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_bulk_create_security_tasks_request_model); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn security_task_get( + configuration: &configuration::Configuration, + status: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_status = status; + + let uri_str = format!("{}/tasks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -138,7 +188,7 @@ pub async fn tasks_org_id_bulk_create_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -147,24 +197,23 @@ pub async fn tasks_org_id_bulk_create_post( } } -pub async fn tasks_organization_get( +pub async fn security_task_get_task_metrics_for_organization( configuration: &configuration::Configuration, - organization_id: Option, - status: Option, -) -> Result> { + organization_id: uuid::Uuid, +) -> Result< + models::SecurityTaskMetricsResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; - let p_status = status; - let uri_str = format!("{}/tasks/organization", configuration.base_path); + let uri_str = format!( + "{}/tasks/{organizationId}/metrics", + configuration.base_path, + organizationId = crate::apis::urlencode(p_organization_id.to_string()) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = p_organization_id { - req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); - } - if let Some(ref param_value) = p_status { - req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -187,12 +236,13 @@ pub async fn tasks_organization_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecurityTasksResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecurityTasksResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecurityTaskMetricsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecurityTaskMetricsResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -201,22 +251,27 @@ pub async fn tasks_organization_get( } } -pub async fn tasks_task_id_complete_patch( +pub async fn security_task_list_for_organization( configuration: &configuration::Configuration, - task_id: uuid::Uuid, -) -> Result<(), Error> { + organization_id: Option, + status: Option, +) -> Result< + models::SecurityTasksResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_task_id = task_id; + let p_organization_id = organization_id; + let p_status = status; - let uri_str = format!( - "{}/tasks/{taskId}/complete", - configuration.base_path, - taskId = crate::apis::urlencode(p_task_id.to_string()) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::PATCH, &uri_str); + let uri_str = format!("{}/tasks/organization", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_organization_id { + req_builder = req_builder.query(&[("organizationId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_status { + req_builder = req_builder.query(&[("status", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -228,12 +283,24 @@ pub async fn tasks_task_id_complete_patch( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SecurityTasksResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SecurityTasksResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/self_hosted_account_billing_api.rs b/crates/bitwarden-api-api/src/apis/self_hosted_account_billing_api.rs new file mode 100644 index 000000000..f8666c955 --- /dev/null +++ b/crates/bitwarden-api-api/src/apis/self_hosted_account_billing_api.rs @@ -0,0 +1,276 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use reqwest; +use serde::{de::Error as _, Deserialize, Serialize}; + +use super::{configuration, ContentType, Error}; +use crate::{apis::ResponseContent, models}; + +/// struct for typed errors of method [`self_hosted_account_billing_upload_license`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SelfHostedAccountBillingUploadLicenseError { + UnknownValue(serde_json::Value), +} + +pub async fn self_hosted_account_billing_upload_license( + configuration: &configuration::Configuration, + email: &str, + security_stamp: &str, + api_key: &str, + license: std::path::PathBuf, + id: Option, + name: Option<&str>, + email_verified: Option, + master_password: Option<&str>, + master_password_hint: Option<&str>, + culture: Option<&str>, + two_factor_providers: Option<&str>, + two_factor_recovery_code: Option<&str>, + equivalent_domains: Option<&str>, + excluded_global_equivalent_domains: Option<&str>, + account_revision_date: Option, + key: Option<&str>, + public_key: Option<&str>, + private_key: Option<&str>, + premium: Option, + premium_expiration_date: Option, + renewal_reminder_date: Option, + storage: Option, + max_storage_gb: Option, + gateway: Option, + gateway_customer_id: Option<&str>, + gateway_subscription_id: Option<&str>, + reference_data: Option<&str>, + license_key: Option<&str>, + kdf: Option, + kdf_iterations: Option, + kdf_memory: Option, + kdf_parallelism: Option, + creation_date: Option, + revision_date: Option, + force_password_reset: Option, + uses_key_connector: Option, + failed_login_count: Option, + last_failed_login_date: Option, + avatar_color: Option<&str>, + last_password_change_date: Option, + last_kdf_change_date: Option, + last_key_rotation_date: Option, + last_email_change_date: Option, + verify_devices: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_email = email; + let p_security_stamp = security_stamp; + let p_api_key = api_key; + let p_license = license; + let p_id = id; + let p_name = name; + let p_email_verified = email_verified; + let p_master_password = master_password; + let p_master_password_hint = master_password_hint; + let p_culture = culture; + let p_two_factor_providers = two_factor_providers; + let p_two_factor_recovery_code = two_factor_recovery_code; + let p_equivalent_domains = equivalent_domains; + let p_excluded_global_equivalent_domains = excluded_global_equivalent_domains; + let p_account_revision_date = account_revision_date; + let p_key = key; + let p_public_key = public_key; + let p_private_key = private_key; + let p_premium = premium; + let p_premium_expiration_date = premium_expiration_date; + let p_renewal_reminder_date = renewal_reminder_date; + let p_storage = storage; + let p_max_storage_gb = max_storage_gb; + let p_gateway = gateway; + let p_gateway_customer_id = gateway_customer_id; + let p_gateway_subscription_id = gateway_subscription_id; + let p_reference_data = reference_data; + let p_license_key = license_key; + let p_kdf = kdf; + let p_kdf_iterations = kdf_iterations; + let p_kdf_memory = kdf_memory; + let p_kdf_parallelism = kdf_parallelism; + let p_creation_date = creation_date; + let p_revision_date = revision_date; + let p_force_password_reset = force_password_reset; + let p_uses_key_connector = uses_key_connector; + let p_failed_login_count = failed_login_count; + let p_last_failed_login_date = last_failed_login_date; + let p_avatar_color = avatar_color; + let p_last_password_change_date = last_password_change_date; + let p_last_kdf_change_date = last_kdf_change_date; + let p_last_key_rotation_date = last_key_rotation_date; + let p_last_email_change_date = last_email_change_date; + let p_verify_devices = verify_devices; + + let uri_str = format!( + "{}/account/billing/vnext/self-host/license", + configuration.base_path + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_id { + req_builder = req_builder.query(&[("id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("email", &p_email.to_string())]); + if let Some(ref param_value) = p_email_verified { + req_builder = req_builder.query(&[("emailVerified", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_master_password { + req_builder = req_builder.query(&[("masterPassword", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_master_password_hint { + req_builder = req_builder.query(&[("masterPasswordHint", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_culture { + req_builder = req_builder.query(&[("culture", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("securityStamp", &p_security_stamp.to_string())]); + if let Some(ref param_value) = p_two_factor_providers { + req_builder = req_builder.query(&[("twoFactorProviders", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_two_factor_recovery_code { + req_builder = req_builder.query(&[("twoFactorRecoveryCode", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_equivalent_domains { + req_builder = req_builder.query(&[("equivalentDomains", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_excluded_global_equivalent_domains { + req_builder = + req_builder.query(&[("excludedGlobalEquivalentDomains", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_account_revision_date { + req_builder = req_builder.query(&[("accountRevisionDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_key { + req_builder = req_builder.query(&[("key", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_public_key { + req_builder = req_builder.query(&[("publicKey", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_private_key { + req_builder = req_builder.query(&[("privateKey", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_premium { + req_builder = req_builder.query(&[("premium", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_premium_expiration_date { + req_builder = req_builder.query(&[("premiumExpirationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_renewal_reminder_date { + req_builder = req_builder.query(&[("renewalReminderDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_storage { + req_builder = req_builder.query(&[("storage", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_max_storage_gb { + req_builder = req_builder.query(&[("maxStorageGb", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway { + req_builder = req_builder.query(&[("gateway", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway_customer_id { + req_builder = req_builder.query(&[("gatewayCustomerId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_gateway_subscription_id { + req_builder = req_builder.query(&[("gatewaySubscriptionId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_reference_data { + req_builder = req_builder.query(&[("referenceData", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_license_key { + req_builder = req_builder.query(&[("licenseKey", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("apiKey", &p_api_key.to_string())]); + if let Some(ref param_value) = p_kdf { + req_builder = req_builder.query(&[("kdf", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_iterations { + req_builder = req_builder.query(&[("kdfIterations", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_memory { + req_builder = req_builder.query(&[("kdfMemory", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_kdf_parallelism { + req_builder = req_builder.query(&[("kdfParallelism", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_creation_date { + req_builder = req_builder.query(&[("creationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_revision_date { + req_builder = req_builder.query(&[("revisionDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_force_password_reset { + req_builder = req_builder.query(&[("forcePasswordReset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_uses_key_connector { + req_builder = req_builder.query(&[("usesKeyConnector", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_failed_login_count { + req_builder = req_builder.query(&[("failedLoginCount", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_failed_login_date { + req_builder = req_builder.query(&[("lastFailedLoginDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_avatar_color { + req_builder = req_builder.query(&[("avatarColor", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_password_change_date { + req_builder = req_builder.query(&[("lastPasswordChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_kdf_change_date { + req_builder = req_builder.query(&[("lastKdfChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_key_rotation_date { + req_builder = req_builder.query(&[("lastKeyRotationDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_last_email_change_date { + req_builder = req_builder.query(&[("lastEmailChangeDate", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_verify_devices { + req_builder = req_builder.query(&[("verifyDevices", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + // TODO: support file upload for 'license' parameter + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} diff --git a/crates/bitwarden-api-api/src/apis/self_hosted_organization_licenses_api.rs b/crates/bitwarden-api-api/src/apis/self_hosted_organization_licenses_api.rs index 52b1dd702..733e75ef6 100644 --- a/crates/bitwarden-api-api/src/apis/self_hosted_organization_licenses_api.rs +++ b/crates/bitwarden-api-api/src/apis/self_hosted_organization_licenses_api.rs @@ -14,45 +14,62 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_licenses_self_hosted_id_post`] +/// struct for typed errors of method [`self_hosted_organization_licenses_create_license`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsLicensesSelfHostedIdPostError { +pub enum SelfHostedOrganizationLicensesCreateLicenseError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_licenses_self_hosted_id_sync_post`] +/// struct for typed errors of method [`self_hosted_organization_licenses_sync_license`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsLicensesSelfHostedIdSyncPostError { +pub enum SelfHostedOrganizationLicensesSyncLicenseError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_licenses_self_hosted_post`] +/// struct for typed errors of method [`self_hosted_organization_licenses_update_license`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsLicensesSelfHostedPostError { +pub enum SelfHostedOrganizationLicensesUpdateLicenseError { UnknownValue(serde_json::Value), } -pub async fn organizations_licenses_self_hosted_id_post( +pub async fn self_hosted_organization_licenses_create_license( configuration: &configuration::Configuration, - id: &str, + key: &str, + keys_period_public_key: &str, + keys_period_encrypted_private_key: &str, license: std::path::PathBuf, -) -> Result<(), Error> { + collection_name: Option<&str>, +) -> Result< + models::OrganizationResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_key = key; + let p_keys_period_public_key = keys_period_public_key; + let p_keys_period_encrypted_private_key = keys_period_encrypted_private_key; let p_license = license; + let p_collection_name = collection_name; let uri_str = format!( - "{}/organizations/licenses/self-hosted/{id}", - configuration.base_path, - id = crate::apis::urlencode(p_id) + "{}/organizations/licenses/self-hosted", + configuration.base_path ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); + req_builder = req_builder.query(&[("key", &p_key.to_string())]); + if let Some(ref param_value) = p_collection_name { + req_builder = req_builder.query(&[("collectionName", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("keys.publicKey", &p_keys_period_public_key.to_string())]); + req_builder = req_builder.query(&[( + "keys.encryptedPrivateKey", + &p_keys_period_encrypted_private_key.to_string(), + )]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -67,12 +84,23 @@ pub async fn organizations_licenses_self_hosted_id_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -82,10 +110,10 @@ pub async fn organizations_licenses_self_hosted_id_post( } } -pub async fn organizations_licenses_self_hosted_id_sync_post( +pub async fn self_hosted_organization_licenses_sync_license( configuration: &configuration::Configuration, id: &str, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -114,7 +142,7 @@ pub async fn organizations_licenses_self_hosted_id_sync_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -124,38 +152,24 @@ pub async fn organizations_licenses_self_hosted_id_sync_post( } } -pub async fn organizations_licenses_self_hosted_post( +pub async fn self_hosted_organization_licenses_update_license( configuration: &configuration::Configuration, - key: &str, - keys_period_public_key: &str, - keys_period_encrypted_private_key: &str, + id: &str, license: std::path::PathBuf, - collection_name: Option<&str>, -) -> Result> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_key = key; - let p_keys_period_public_key = keys_period_public_key; - let p_keys_period_encrypted_private_key = keys_period_encrypted_private_key; + let p_id = id; let p_license = license; - let p_collection_name = collection_name; let uri_str = format!( - "{}/organizations/licenses/self-hosted", - configuration.base_path + "{}/organizations/licenses/self-hosted/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); - req_builder = req_builder.query(&[("key", &p_key.to_string())]); - if let Some(ref param_value) = p_collection_name { - req_builder = req_builder.query(&[("collectionName", ¶m_value.to_string())]); - } - req_builder = req_builder.query(&[("keys.publicKey", &p_keys_period_public_key.to_string())]); - req_builder = req_builder.query(&[( - "keys.encryptedPrivateKey", - &p_keys_period_encrypted_private_key.to_string(), - )]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -170,23 +184,12 @@ pub async fn organizations_licenses_self_hosted_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/self_hosted_organization_sponsorships_api.rs b/crates/bitwarden-api-api/src/apis/self_hosted_organization_sponsorships_api.rs index cc46f990f..9869bbdf4 100644 --- a/crates/bitwarden-api-api/src/apis/self_hosted_organization_sponsorships_api.rs +++ b/crates/bitwarden-api-api/src/apis/self_hosted_organization_sponsorships_api.rs @@ -14,61 +14,62 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organization_sponsorship_self_hosted_org_id_sponsored_get`] +/// struct for typed errors of method +/// [`self_hosted_organization_sponsorships_admin_initiated_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSelfHostedOrgIdSponsoredGetError { +pub enum SelfHostedOrganizationSponsorshipsAdminInitiatedRevokeSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_self_hosted_sponsoring_org_id_delete`] +/// struct for typed errors of method [`self_hosted_organization_sponsorships_create_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSelfHostedSponsoringOrgIdDeleteError { +pub enum SelfHostedOrganizationSponsorshipsCreateSponsorshipError { UnknownValue(serde_json::Value), } /// struct for typed errors of method -/// [`organization_sponsorship_self_hosted_sponsoring_org_id_delete_post`] +/// [`self_hosted_organization_sponsorships_get_sponsored_organizations`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSelfHostedSponsoringOrgIdDeletePostError { +pub enum SelfHostedOrganizationSponsorshipsGetSponsoredOrganizationsError { UnknownValue(serde_json::Value), } /// struct for typed errors of method -/// [`organization_sponsorship_self_hosted_sponsoring_org_id_families_for_enterprise_post`] +/// [`self_hosted_organization_sponsorships_post_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSelfHostedSponsoringOrgIdFamiliesForEnterprisePostError { +pub enum SelfHostedOrganizationSponsorshipsPostRevokeSponsorshipError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organization_sponsorship_self_hosted_sponsoring_org_id_sponsored_friendly_name_revoke_delete`] +/// struct for typed errors of method [`self_hosted_organization_sponsorships_revoke_sponsorship`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationSponsorshipSelfHostedSponsoringOrgIdSponsoredFriendlyNameRevokeDeleteError { +pub enum SelfHostedOrganizationSponsorshipsRevokeSponsorshipError { UnknownValue(serde_json::Value), } -pub async fn organization_sponsorship_self_hosted_org_id_sponsored_get( +pub async fn self_hosted_organization_sponsorships_admin_initiated_revoke_sponsorship( configuration: &configuration::Configuration, - org_id: uuid::Uuid, -) -> Result< - models::OrganizationSponsorshipInvitesResponseModelListResponseModel, - Error, -> { + sponsoring_org_id: uuid::Uuid, + sponsored_friendly_name: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_org_id = org_id; + let p_sponsoring_org_id = sponsoring_org_id; + let p_sponsored_friendly_name = sponsored_friendly_name; let uri_str = format!( - "{}/organization/sponsorship/self-hosted/{orgId}/sponsored", + "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke", configuration.base_path, - orgId = crate::apis::urlencode(p_org_id.to_string()) + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()), + sponsoredFriendlyName = crate::apis::urlencode(p_sponsored_friendly_name) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -81,23 +82,12 @@ pub async fn organization_sponsorship_self_hosted_org_id_sponsored_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -107,21 +97,26 @@ pub async fn organization_sponsorship_self_hosted_org_id_sponsored_get( } } -pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete( +pub async fn self_hosted_organization_sponsorships_create_sponsorship( configuration: &configuration::Configuration, sponsoring_org_id: uuid::Uuid, -) -> Result<(), Error> { + organization_sponsorship_create_request_model: Option< + models::OrganizationSponsorshipCreateRequestModel, + >, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_sponsoring_org_id = sponsoring_org_id; + let p_organization_sponsorship_create_request_model = + organization_sponsorship_create_request_model; let uri_str = format!( - "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}", + "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/families-for-enterprise", configuration.base_path, sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -129,6 +124,7 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_organization_sponsorship_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -139,7 +135,7 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -149,21 +145,22 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete( } } -pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete_post( +pub async fn self_hosted_organization_sponsorships_get_sponsored_organizations( configuration: &configuration::Configuration, - sponsoring_org_id: uuid::Uuid, -) -> Result<(), Error> { + org_id: uuid::Uuid, +) -> Result< + models::OrganizationSponsorshipInvitesResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_sponsoring_org_id = sponsoring_org_id; + let p_org_id = org_id; let uri_str = format!( - "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/delete", + "{}/organization/sponsorship/self-hosted/{orgId}/sponsored", configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) + orgId = crate::apis::urlencode(p_org_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -176,12 +173,23 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OrganizationSponsorshipInvitesResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -191,21 +199,15 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_delete_post( } } -pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_families_for_enterprise_post( +pub async fn self_hosted_organization_sponsorships_post_revoke_sponsorship( configuration: &configuration::Configuration, sponsoring_org_id: uuid::Uuid, - organization_sponsorship_create_request_model: Option< - models::OrganizationSponsorshipCreateRequestModel, - >, -) -> Result<(), Error> -{ +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_sponsoring_org_id = sponsoring_org_id; - let p_organization_sponsorship_create_request_model = - organization_sponsorship_create_request_model; let uri_str = format!( - "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/families-for-enterprise", + "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/delete", configuration.base_path, sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); @@ -219,7 +221,6 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_families_for if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_organization_sponsorship_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -230,9 +231,8 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_families_for Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationSponsorshipSelfHostedSponsoringOrgIdFamiliesForEnterprisePostError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -241,23 +241,17 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_families_for } } -pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_sponsored_friendly_name_revoke_delete( +pub async fn self_hosted_organization_sponsorships_revoke_sponsorship( configuration: &configuration::Configuration, sponsoring_org_id: uuid::Uuid, - sponsored_friendly_name: &str, -) -> Result< - (), - Error, -> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_sponsoring_org_id = sponsoring_org_id; - let p_sponsored_friendly_name = sponsored_friendly_name; let uri_str = format!( - "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}/{sponsoredFriendlyName}/revoke", + "{}/organization/sponsorship/self-hosted/{sponsoringOrgId}", configuration.base_path, - sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()), - sponsoredFriendlyName = crate::apis::urlencode(p_sponsored_friendly_name) + sponsoringOrgId = crate::apis::urlencode(p_sponsoring_org_id.to_string()) ); let mut req_builder = configuration .client @@ -279,9 +273,8 @@ pub async fn organization_sponsorship_self_hosted_sponsoring_org_id_sponsored_fr Ok(()) } else { let content = resp.text().await?; - let entity: Option< - OrganizationSponsorshipSelfHostedSponsoringOrgIdSponsoredFriendlyNameRevokeDeleteError, - > = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/sends_api.rs b/crates/bitwarden-api-api/src/apis/sends_api.rs index dadbcecd2..d7e69da9a 100644 --- a/crates/bitwarden-api-api/src/apis/sends_api.rs +++ b/crates/bitwarden-api-api/src/apis/sends_api.rs @@ -14,95 +14,95 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`sends_access_id_post`] +/// struct for typed errors of method [`sends_access`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsAccessIdPostError { +pub enum SendsAccessError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_encoded_send_id_access_file_file_id_post`] +/// struct for typed errors of method [`sends_azure_validate_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsEncodedSendIdAccessFileFileIdPostError { +pub enum SendsAzureValidateFileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_file_v2_post`] +/// struct for typed errors of method [`sends_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsFileV2PostError { +pub enum SendsDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_file_validate_azure_post`] +/// struct for typed errors of method [`sends_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsFileValidateAzurePostError { +pub enum SendsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_get`] +/// struct for typed errors of method [`sends_get_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsGetError { +pub enum SendsGetAllError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_delete`] +/// struct for typed errors of method [`sends_get_send_file_download_data`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdDeleteError { +pub enum SendsGetSendFileDownloadDataError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_file_file_id_get`] +/// struct for typed errors of method [`sends_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdFileFileIdGetError { +pub enum SendsPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_file_file_id_post`] +/// struct for typed errors of method [`sends_post_file`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdFileFileIdPostError { +pub enum SendsPostFileError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_get`] +/// struct for typed errors of method [`sends_post_file_for_existing_send`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdGetError { +pub enum SendsPostFileForExistingSendError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_put`] +/// struct for typed errors of method [`sends_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdPutError { +pub enum SendsPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_id_remove_password_put`] +/// struct for typed errors of method [`sends_put_remove_password`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsIdRemovePasswordPutError { +pub enum SendsPutRemovePasswordError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sends_post`] +/// struct for typed errors of method [`sends_renew_file_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SendsPostError { +pub enum SendsRenewFileUploadError { UnknownValue(serde_json::Value), } -pub async fn sends_access_id_post( +pub async fn sends_access( configuration: &configuration::Configuration, id: &str, send_access_request_model: Option, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_send_access_request_model = send_access_request_model; @@ -133,7 +133,7 @@ pub async fn sends_access_id_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -142,23 +142,10 @@ pub async fn sends_access_id_post( } } -pub async fn sends_encoded_send_id_access_file_file_id_post( +pub async fn sends_azure_validate_file( configuration: &configuration::Configuration, - encoded_send_id: &str, - file_id: &str, - send_access_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_encoded_send_id = encoded_send_id; - let p_file_id = file_id; - let p_send_access_request_model = send_access_request_model; - - let uri_str = format!( - "{}/sends/{encodedSendId}/access/file/{fileId}", - configuration.base_path, - encodedSendId = crate::apis::urlencode(p_encoded_send_id), - fileId = crate::apis::urlencode(p_file_id) - ); +) -> Result<(), Error> { + let uri_str = format!("{}/sends/file/validate/azure", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -169,7 +156,6 @@ pub async fn sends_encoded_send_id_access_file_file_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_send_access_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -180,8 +166,7 @@ pub async fn sends_encoded_send_id_access_file_file_id_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -190,17 +175,21 @@ pub async fn sends_encoded_send_id_access_file_file_id_post( } } -pub async fn sends_file_v2_post( +pub async fn sends_delete( configuration: &configuration::Configuration, - send_request_model: Option, -) -> Result> { + id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_send_request_model = send_request_model; + let p_id = id; - let uri_str = format!("{}/sends/file/v2", configuration.base_path); + let uri_str = format!( + "{}/sends/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -208,29 +197,17 @@ pub async fn sends_file_v2_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_send_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -239,13 +216,19 @@ pub async fn sends_file_v2_post( } } -pub async fn sends_file_validate_azure_post( +pub async fn sends_get( configuration: &configuration::Configuration, -) -> Result<(), Error> { - let uri_str = format!("{}/sends/file/validate/azure", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + id: &str, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + + let uri_str = format!( + "{}/sends/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -258,12 +241,23 @@ pub async fn sends_file_validate_azure_post( let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -272,9 +266,9 @@ pub async fn sends_file_validate_azure_post( } } -pub async fn sends_get( +pub async fn sends_get_all( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/sends", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -305,7 +299,7 @@ pub async fn sends_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -314,21 +308,26 @@ pub async fn sends_get( } } -pub async fn sends_id_delete( +pub async fn sends_get_send_file_download_data( configuration: &configuration::Configuration, - id: &str, -) -> Result<(), Error> { + encoded_send_id: &str, + file_id: &str, + send_access_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; + let p_encoded_send_id = encoded_send_id; + let p_file_id = file_id; + let p_send_access_request_model = send_access_request_model; let uri_str = format!( - "{}/sends/{id}", + "{}/sends/{encodedSendId}/access/file/{fileId}", configuration.base_path, - id = crate::apis::urlencode(p_id) + encodedSendId = crate::apis::urlencode(p_encoded_send_id), + fileId = crate::apis::urlencode(p_file_id) ); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -336,6 +335,7 @@ pub async fn sends_id_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_send_access_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -346,7 +346,7 @@ pub async fn sends_id_delete( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -355,22 +355,17 @@ pub async fn sends_id_delete( } } -pub async fn sends_id_file_file_id_get( +pub async fn sends_post( configuration: &configuration::Configuration, - id: &str, - file_id: &str, -) -> Result> { + send_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_file_id = file_id; + let p_send_request_model = send_request_model; - let uri_str = format!( - "{}/sends/{id}/file/{fileId}", - configuration.base_path, - id = crate::apis::urlencode(p_id), - fileId = crate::apis::urlencode(p_file_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/sends", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -378,6 +373,7 @@ pub async fn sends_id_file_file_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_send_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -394,12 +390,12 @@ pub async fn sends_id_file_file_id_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -408,21 +404,14 @@ pub async fn sends_id_file_file_id_get( } } -pub async fn sends_id_file_file_id_post( +pub async fn sends_post_file( configuration: &configuration::Configuration, - id: &str, - file_id: &str, -) -> Result<(), Error> { + send_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_file_id = file_id; + let p_send_request_model = send_request_model; - let uri_str = format!( - "{}/sends/{id}/file/{fileId}", - configuration.base_path, - id = crate::apis::urlencode(p_id), - fileId = crate::apis::urlencode(p_file_id) - ); + let uri_str = format!("{}/sends/file/v2", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -433,17 +422,29 @@ pub async fn sends_id_file_file_id_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_send_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -452,19 +453,24 @@ pub async fn sends_id_file_file_id_post( } } -pub async fn sends_id_get( +pub async fn sends_post_file_for_existing_send( configuration: &configuration::Configuration, id: &str, -) -> Result> { + file_id: &str, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_file_id = file_id; let uri_str = format!( - "{}/sends/{id}", + "{}/sends/{id}/file/{fileId}", configuration.base_path, - id = crate::apis::urlencode(p_id) + id = crate::apis::urlencode(p_id), + fileId = crate::apis::urlencode(p_file_id) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -477,23 +483,12 @@ pub async fn sends_id_get( let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -502,11 +497,11 @@ pub async fn sends_id_get( } } -pub async fn sends_id_put( +pub async fn sends_put( configuration: &configuration::Configuration, id: &str, send_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_send_request_model = send_request_model; @@ -546,7 +541,7 @@ pub async fn sends_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -555,10 +550,10 @@ pub async fn sends_id_put( } } -pub async fn sends_id_remove_password_put( +pub async fn sends_put_remove_password( configuration: &configuration::Configuration, id: &str, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -596,7 +591,7 @@ pub async fn sends_id_remove_password_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -605,17 +600,22 @@ pub async fn sends_id_remove_password_put( } } -pub async fn sends_post( +pub async fn sends_renew_file_upload( configuration: &configuration::Configuration, - send_request_model: Option, -) -> Result> { + id: &str, + file_id: &str, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_send_request_model = send_request_model; + let p_id = id; + let p_file_id = file_id; - let uri_str = format!("{}/sends", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/sends/{id}/file/{fileId}", + configuration.base_path, + id = crate::apis::urlencode(p_id), + fileId = crate::apis::urlencode(p_file_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -623,7 +623,6 @@ pub async fn sends_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_send_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -640,12 +639,12 @@ pub async fn sends_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SendFileUploadDataResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/service_accounts_api.rs b/crates/bitwarden-api-api/src/apis/service_accounts_api.rs index 90c612460..5b002c541 100644 --- a/crates/bitwarden-api-api/src/apis/service_accounts_api.rs +++ b/crates/bitwarden-api-api/src/apis/service_accounts_api.rs @@ -14,90 +14,82 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_organization_id_service_accounts_get`] +/// struct for typed errors of method [`service_accounts_bulk_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdServiceAccountsGetError { +pub enum ServiceAccountsBulkDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_organization_id_service_accounts_post`] +/// struct for typed errors of method [`service_accounts_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdServiceAccountsPostError { +pub enum ServiceAccountsCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_delete_post`] +/// struct for typed errors of method [`service_accounts_create_access_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsDeletePostError { +pub enum ServiceAccountsCreateAccessTokenError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_access_tokens_get`] +/// struct for typed errors of method [`service_accounts_get_access_tokens`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdAccessTokensGetError { +pub enum ServiceAccountsGetAccessTokensError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_access_tokens_post`] +/// struct for typed errors of method [`service_accounts_get_by_service_account_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdAccessTokensPostError { +pub enum ServiceAccountsGetByServiceAccountIdError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_access_tokens_revoke_post`] +/// struct for typed errors of method [`service_accounts_list_by_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdAccessTokensRevokePostError { +pub enum ServiceAccountsListByOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_get`] +/// struct for typed errors of method [`service_accounts_revoke_access_tokens`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdGetError { +pub enum ServiceAccountsRevokeAccessTokensError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_put`] +/// struct for typed errors of method [`service_accounts_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdPutError { +pub enum ServiceAccountsUpdateError { UnknownValue(serde_json::Value), } -pub async fn organizations_organization_id_service_accounts_get( +pub async fn service_accounts_bulk_delete( configuration: &configuration::Configuration, - organization_id: uuid::Uuid, - include_access_to_secrets: Option, -) -> Result< - models::ServiceAccountSecretsDetailsResponseModelListResponseModel, - Error, -> { + uuid_colon_colon_uuid: Option>, +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions - let p_organization_id = organization_id; - let p_include_access_to_secrets = include_access_to_secrets; + let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; - let uri_str = format!( - "{}/organizations/{organizationId}/service-accounts", - configuration.base_path, - organizationId = crate::apis::urlencode(p_organization_id.to_string()) - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let uri_str = format!("{}/service-accounts/delete", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); - if let Some(ref param_value) = p_include_access_to_secrets { - req_builder = req_builder.query(&[("includeAccessToSecrets", ¶m_value.to_string())]); - } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_uuid_colon_colon_uuid); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -114,13 +106,12 @@ pub async fn organizations_organization_id_service_accounts_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountSecretsDetailsResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountSecretsDetailsResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -129,14 +120,11 @@ pub async fn organizations_organization_id_service_accounts_get( } } -pub async fn organizations_organization_id_service_accounts_post( +pub async fn service_accounts_create( configuration: &configuration::Configuration, organization_id: uuid::Uuid, service_account_create_request_model: Option, -) -> Result< - models::ServiceAccountResponseModel, - Error, -> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_service_account_create_request_model = service_account_create_request_model; @@ -178,8 +166,7 @@ pub async fn organizations_organization_id_service_accounts_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -188,15 +175,21 @@ pub async fn organizations_organization_id_service_accounts_post( } } -pub async fn service_accounts_delete_post( +pub async fn service_accounts_create_access_token( configuration: &configuration::Configuration, - uuid_colon_colon_uuid: Option>, -) -> Result> + id: uuid::Uuid, + access_token_create_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; + let p_id = id; + let p_access_token_create_request_model = access_token_create_request_model; - let uri_str = format!("{}/service-accounts/delete", configuration.base_path); + let uri_str = format!( + "{}/service-accounts/{id}/access-tokens", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -207,7 +200,7 @@ pub async fn service_accounts_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_uuid_colon_colon_uuid); + req_builder = req_builder.json(&p_access_token_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -224,12 +217,13 @@ pub async fn service_accounts_delete_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::BulkDeleteResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AccessTokenCreationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AccessTokenCreationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -238,12 +232,12 @@ pub async fn service_accounts_delete_post( } } -pub async fn service_accounts_id_access_tokens_get( +pub async fn service_accounts_get_access_tokens( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< models::AccessTokenResponseModelListResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -282,7 +276,7 @@ pub async fn service_accounts_id_access_tokens_get( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -292,24 +286,19 @@ pub async fn service_accounts_id_access_tokens_get( } } -pub async fn service_accounts_id_access_tokens_post( +pub async fn service_accounts_get_by_service_account_id( configuration: &configuration::Configuration, id: uuid::Uuid, - access_token_create_request_model: Option, -) -> Result> -{ +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let p_access_token_create_request_model = access_token_create_request_model; let uri_str = format!( - "{}/service-accounts/{id}/access-tokens", + "{}/service-accounts/{id}", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -317,7 +306,6 @@ pub async fn service_accounts_id_access_tokens_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_access_token_create_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -334,12 +322,12 @@ pub async fn service_accounts_id_access_tokens_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AccessTokenCreationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AccessTokenCreationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -349,42 +337,56 @@ pub async fn service_accounts_id_access_tokens_post( } } -pub async fn service_accounts_id_access_tokens_revoke_post( +pub async fn service_accounts_list_by_organization( configuration: &configuration::Configuration, - id: uuid::Uuid, - revoke_access_tokens_request: Option, -) -> Result<(), Error> { + organization_id: uuid::Uuid, + include_access_to_secrets: Option, +) -> Result< + models::ServiceAccountSecretsDetailsResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_revoke_access_tokens_request = revoke_access_tokens_request; + let p_organization_id = organization_id; + let p_include_access_to_secrets = include_access_to_secrets; let uri_str = format!( - "{}/service-accounts/{id}/access-tokens/revoke", + "{}/organizations/{organizationId}/service-accounts", configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) + organizationId = crate::apis::urlencode(p_organization_id.to_string()) ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + if let Some(ref param_value) = p_include_access_to_secrets { + req_builder = req_builder.query(&[("includeAccessToSecrets", ¶m_value.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_revoke_access_tokens_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountSecretsDetailsResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountSecretsDetailsResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -394,19 +396,23 @@ pub async fn service_accounts_id_access_tokens_revoke_post( } } -pub async fn service_accounts_id_get( +pub async fn service_accounts_revoke_access_tokens( configuration: &configuration::Configuration, id: uuid::Uuid, -) -> Result> { + revoke_access_tokens_request: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; + let p_revoke_access_tokens_request = revoke_access_tokens_request; let uri_str = format!( - "{}/service-accounts/{id}", + "{}/service-accounts/{id}/access-tokens/revoke", configuration.base_path, id = crate::apis::urlencode(p_id.to_string()) ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -414,28 +420,19 @@ pub async fn service_accounts_id_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_revoke_access_tokens_request); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServiceAccountResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServiceAccountResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -444,11 +441,11 @@ pub async fn service_accounts_id_get( } } -pub async fn service_accounts_id_put( +pub async fn service_accounts_update( configuration: &configuration::Configuration, id: uuid::Uuid, service_account_update_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_service_account_update_request_model = service_account_update_request_model; @@ -488,7 +485,7 @@ pub async fn service_accounts_id_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/settings_api.rs b/crates/bitwarden-api-api/src/apis/settings_api.rs index 0217d0d61..63cb08311 100644 --- a/crates/bitwarden-api-api/src/apis/settings_api.rs +++ b/crates/bitwarden-api-api/src/apis/settings_api.rs @@ -14,31 +14,31 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`settings_domains_get`] +/// struct for typed errors of method [`settings_get_domains`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SettingsDomainsGetError { +pub enum SettingsGetDomainsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`settings_domains_post`] +/// struct for typed errors of method [`settings_post_domains`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SettingsDomainsPostError { +pub enum SettingsPostDomainsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`settings_domains_put`] +/// struct for typed errors of method [`settings_put_domains`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SettingsDomainsPutError { +pub enum SettingsPutDomainsError { UnknownValue(serde_json::Value), } -pub async fn settings_domains_get( +pub async fn settings_get_domains( configuration: &configuration::Configuration, excluded: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_excluded = excluded; @@ -75,7 +75,7 @@ pub async fn settings_domains_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -84,10 +84,10 @@ pub async fn settings_domains_get( } } -pub async fn settings_domains_post( +pub async fn settings_post_domains( configuration: &configuration::Configuration, update_domains_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_update_domains_request_model = update_domains_request_model; @@ -124,7 +124,7 @@ pub async fn settings_domains_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -133,10 +133,10 @@ pub async fn settings_domains_post( } } -pub async fn settings_domains_put( +pub async fn settings_put_domains( configuration: &configuration::Configuration, update_domains_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_update_domains_request_model = update_domains_request_model; @@ -171,7 +171,7 @@ pub async fn settings_domains_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/slack_integration_api.rs b/crates/bitwarden-api-api/src/apis/slack_integration_api.rs index 095cc239e..d904cbb47 100644 --- a/crates/bitwarden-api-api/src/apis/slack_integration_api.rs +++ b/crates/bitwarden-api-api/src/apis/slack_integration_api.rs @@ -14,26 +14,25 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`create_async`] +/// struct for typed errors of method [`slack_integration_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum CreateAsyncError { +pub enum SlackIntegrationCreateError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method -/// [`organizations_organization_id_integrations_slack_redirect_get`] +/// struct for typed errors of method [`slack_integration_redirect`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsOrganizationIdIntegrationsSlackRedirectGetError { +pub enum SlackIntegrationRedirectError { UnknownValue(serde_json::Value), } -pub async fn create_async( +pub async fn slack_integration_create( configuration: &configuration::Configuration, organization_id: uuid::Uuid, code: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_code = code; @@ -64,7 +63,7 @@ pub async fn create_async( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -73,10 +72,10 @@ pub async fn create_async( } } -pub async fn organizations_organization_id_integrations_slack_redirect_get( +pub async fn slack_integration_redirect( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -103,8 +102,7 @@ pub async fn organizations_organization_id_integrations_slack_redirect_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/stripe_api.rs b/crates/bitwarden-api-api/src/apis/stripe_api.rs index 7585964ea..c2cf9765a 100644 --- a/crates/bitwarden-api-api/src/apis/stripe_api.rs +++ b/crates/bitwarden-api-api/src/apis/stripe_api.rs @@ -14,30 +14,30 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`setup_intent_bank_account_post`] +/// struct for typed errors of method [`stripe_create_setup_intent_for_bank_account`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SetupIntentBankAccountPostError { +pub enum StripeCreateSetupIntentForBankAccountError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`setup_intent_card_post`] +/// struct for typed errors of method [`stripe_create_setup_intent_for_card`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SetupIntentCardPostError { +pub enum StripeCreateSetupIntentForCardError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`tax_is_country_supported_get`] +/// struct for typed errors of method [`stripe_is_country_supported`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TaxIsCountrySupportedGetError { +pub enum StripeIsCountrySupportedError { UnknownValue(serde_json::Value), } -pub async fn setup_intent_bank_account_post( +pub async fn stripe_create_setup_intent_for_bank_account( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!("{}/setup-intent/bank-account", configuration.base_path); let mut req_builder = configuration .client @@ -59,7 +59,8 @@ pub async fn setup_intent_bank_account_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -68,9 +69,9 @@ pub async fn setup_intent_bank_account_post( } } -pub async fn setup_intent_card_post( +pub async fn stripe_create_setup_intent_for_card( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!("{}/setup-intent/card", configuration.base_path); let mut req_builder = configuration .client @@ -92,7 +93,8 @@ pub async fn setup_intent_card_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -101,10 +103,10 @@ pub async fn setup_intent_card_post( } } -pub async fn tax_is_country_supported_get( +pub async fn stripe_is_country_supported( configuration: &configuration::Configuration, country: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_country = country; @@ -130,7 +132,7 @@ pub async fn tax_is_country_supported_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/tax_api.rs b/crates/bitwarden-api-api/src/apis/tax_api.rs index 92b33ea4e..7d7975c82 100644 --- a/crates/bitwarden-api-api/src/apis/tax_api.rs +++ b/crates/bitwarden-api-api/src/apis/tax_api.rs @@ -14,19 +14,19 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`tax_preview_amount_organization_trial_post`] +/// struct for typed errors of method [`tax_preview_tax_amount_for_organization_trial`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TaxPreviewAmountOrganizationTrialPostError { +pub enum TaxPreviewTaxAmountForOrganizationTrialError { UnknownValue(serde_json::Value), } -pub async fn tax_preview_amount_organization_trial_post( +pub async fn tax_preview_tax_amount_for_organization_trial( configuration: &configuration::Configuration, preview_tax_amount_for_organization_trial_request_body: Option< models::PreviewTaxAmountForOrganizationTrialRequestBody, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_preview_tax_amount_for_organization_trial_request_body = preview_tax_amount_for_organization_trial_request_body; @@ -56,7 +56,7 @@ pub async fn tax_preview_amount_organization_trial_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-api/src/apis/trash_api.rs b/crates/bitwarden-api-api/src/apis/trash_api.rs index 88f1b8950..c31a45831 100644 --- a/crates/bitwarden-api-api/src/apis/trash_api.rs +++ b/crates/bitwarden-api-api/src/apis/trash_api.rs @@ -14,32 +14,32 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`secrets_organization_id_trash_empty_post`] +/// struct for typed errors of method [`trash_empty_trash`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsOrganizationIdTrashEmptyPostError { +pub enum TrashEmptyTrashError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_organization_id_trash_get`] +/// struct for typed errors of method [`trash_list_by_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsOrganizationIdTrashGetError { +pub enum TrashListByOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`secrets_organization_id_trash_restore_post`] +/// struct for typed errors of method [`trash_restore_trash`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SecretsOrganizationIdTrashRestorePostError { +pub enum TrashRestoreTrashError { UnknownValue(serde_json::Value), } -pub async fn secrets_organization_id_trash_empty_post( +pub async fn trash_empty_trash( configuration: &configuration::Configuration, organization_id: uuid::Uuid, uuid_colon_colon_uuid: Option>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; @@ -70,8 +70,7 @@ pub async fn secrets_organization_id_trash_empty_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -80,11 +79,10 @@ pub async fn secrets_organization_id_trash_empty_post( } } -pub async fn secrets_organization_id_trash_get( +pub async fn trash_list_by_organization( configuration: &configuration::Configuration, organization_id: uuid::Uuid, -) -> Result> -{ +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; @@ -122,8 +120,7 @@ pub async fn secrets_organization_id_trash_get( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -132,11 +129,11 @@ pub async fn secrets_organization_id_trash_get( } } -pub async fn secrets_organization_id_trash_restore_post( +pub async fn trash_restore_trash( configuration: &configuration::Configuration, organization_id: uuid::Uuid, uuid_colon_colon_uuid: Option>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_organization_id = organization_id; let p_uuid_colon_colon_uuid = uuid_colon_colon_uuid; @@ -167,8 +164,7 @@ pub async fn secrets_organization_id_trash_restore_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/two_factor_api.rs b/crates/bitwarden-api-api/src/apis/two_factor_api.rs index 3ef1e16fc..bb00f26bb 100644 --- a/crates/bitwarden-api-api/src/apis/two_factor_api.rs +++ b/crates/bitwarden-api-api/src/apis/two_factor_api.rs @@ -14,248 +14,234 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`organizations_id_two_factor_disable_post`] +/// struct for typed errors of method [`two_factor_delete_web_authn`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTwoFactorDisablePostError { +pub enum TwoFactorDeleteWebAuthnError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_two_factor_disable_put`] +/// struct for typed errors of method [`two_factor_disable_authenticator`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTwoFactorDisablePutError { +pub enum TwoFactorDisableAuthenticatorError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_two_factor_duo_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsIdTwoFactorDuoPostError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`organizations_id_two_factor_duo_put`] +/// struct for typed errors of method [`two_factor_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTwoFactorDuoPutError { +pub enum TwoFactorGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_two_factor_get`] +/// struct for typed errors of method [`two_factor_get_authenticator`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTwoFactorGetError { +pub enum TwoFactorGetAuthenticatorError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_two_factor_get_duo_post`] +/// struct for typed errors of method [`two_factor_get_device_verification_settings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum OrganizationsIdTwoFactorGetDuoPostError { +pub enum TwoFactorGetDeviceVerificationSettingsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_authenticator_delete`] +/// struct for typed errors of method [`two_factor_get_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorAuthenticatorDeleteError { +pub enum TwoFactorGetDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_authenticator_post`] +/// struct for typed errors of method [`two_factor_get_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorAuthenticatorPostError { +pub enum TwoFactorGetEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_authenticator_put`] +/// struct for typed errors of method [`two_factor_get_organization`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorAuthenticatorPutError { +pub enum TwoFactorGetOrganizationError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_device_verification_settings_put`] +/// struct for typed errors of method [`two_factor_get_organization_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorDeviceVerificationSettingsPutError { +pub enum TwoFactorGetOrganizationDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_disable_post`] +/// struct for typed errors of method [`two_factor_get_recover`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorDisablePostError { +pub enum TwoFactorGetRecoverError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_disable_put`] +/// struct for typed errors of method [`two_factor_get_web_authn`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorDisablePutError { +pub enum TwoFactorGetWebAuthnError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_duo_post`] +/// struct for typed errors of method [`two_factor_get_yubi_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorDuoPostError { +pub enum TwoFactorGetYubiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_duo_put`] +/// struct for typed errors of method [`two_factor_post_authenticator`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorDuoPutError { +pub enum TwoFactorPostAuthenticatorError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_email_post`] +/// struct for typed errors of method [`two_factor_post_disable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorEmailPostError { +pub enum TwoFactorPostDisableError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_email_put`] +/// struct for typed errors of method [`two_factor_post_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorEmailPutError { +pub enum TwoFactorPostDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get`] +/// struct for typed errors of method [`two_factor_post_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetError { +pub enum TwoFactorPostEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_authenticator_post`] +/// struct for typed errors of method [`two_factor_post_organization_disable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetAuthenticatorPostError { +pub enum TwoFactorPostOrganizationDisableError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_device_verification_settings_get`] +/// struct for typed errors of method [`two_factor_post_organization_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetDeviceVerificationSettingsGetError { +pub enum TwoFactorPostOrganizationDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_duo_post`] +/// struct for typed errors of method [`two_factor_post_web_authn`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetDuoPostError { +pub enum TwoFactorPostWebAuthnError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_email_post`] +/// struct for typed errors of method [`two_factor_post_yubi_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetEmailPostError { +pub enum TwoFactorPostYubiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_recover_post`] +/// struct for typed errors of method [`two_factor_put_authenticator`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetRecoverPostError { +pub enum TwoFactorPutAuthenticatorError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_webauthn_post`] +/// struct for typed errors of method [`two_factor_put_device_verification_settings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetWebauthnPostError { +pub enum TwoFactorPutDeviceVerificationSettingsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_get_yubikey_post`] +/// struct for typed errors of method [`two_factor_put_disable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorGetYubikeyPostError { +pub enum TwoFactorPutDisableError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_recover_post`] +/// struct for typed errors of method [`two_factor_put_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorRecoverPostError { +pub enum TwoFactorPutDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_send_email_login_post`] +/// struct for typed errors of method [`two_factor_put_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorSendEmailLoginPostError { +pub enum TwoFactorPutEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_send_email_post`] +/// struct for typed errors of method [`two_factor_put_organization_disable`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorSendEmailPostError { +pub enum TwoFactorPutOrganizationDisableError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_webauthn_delete`] +/// struct for typed errors of method [`two_factor_put_organization_duo`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorWebauthnDeleteError { +pub enum TwoFactorPutOrganizationDuoError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_webauthn_post`] +/// struct for typed errors of method [`two_factor_put_web_authn`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorWebauthnPostError { +pub enum TwoFactorPutWebAuthnError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_webauthn_put`] +/// struct for typed errors of method [`two_factor_put_yubi_key`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorWebauthnPutError { +pub enum TwoFactorPutYubiKeyError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_yubikey_post`] +/// struct for typed errors of method [`two_factor_send_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorYubikeyPostError { +pub enum TwoFactorSendEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`two_factor_yubikey_put`] +/// struct for typed errors of method [`two_factor_send_email_login`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum TwoFactorYubikeyPutError { +pub enum TwoFactorSendEmailLoginError { UnknownValue(serde_json::Value), } -pub async fn organizations_id_two_factor_disable_post( +pub async fn two_factor_delete_web_authn( configuration: &configuration::Configuration, - id: &str, - two_factor_provider_request_model: Option, -) -> Result> -{ + two_factor_web_authn_delete_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_two_factor_provider_request_model = two_factor_provider_request_model; + let p_two_factor_web_authn_delete_request_model = two_factor_web_authn_delete_request_model; - let uri_str = format!( - "{}/organizations/{id}/two-factor/disable", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); + let uri_str = format!("{}/two-factor/webauthn", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::POST, &uri_str); + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -263,7 +249,7 @@ pub async fn organizations_id_two_factor_disable_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_provider_request_model); + req_builder = req_builder.json(&p_two_factor_web_authn_delete_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -280,13 +266,12 @@ pub async fn organizations_id_two_factor_disable_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -295,22 +280,20 @@ pub async fn organizations_id_two_factor_disable_post( } } -pub async fn organizations_id_two_factor_disable_put( +pub async fn two_factor_disable_authenticator( configuration: &configuration::Configuration, - id: &str, - two_factor_provider_request_model: Option, -) -> Result> -{ + two_factor_authenticator_disable_request_model: Option< + models::TwoFactorAuthenticatorDisableRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_two_factor_provider_request_model = two_factor_provider_request_model; + let p_two_factor_authenticator_disable_request_model = + two_factor_authenticator_disable_request_model; - let uri_str = format!( - "{}/organizations/{id}/two-factor/disable", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::DELETE, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -318,7 +301,7 @@ pub async fn organizations_id_two_factor_disable_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_provider_request_model); + req_builder = req_builder.json(&p_two_factor_authenticator_disable_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -340,7 +323,7 @@ pub async fn organizations_id_two_factor_disable_put( } } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -350,23 +333,11 @@ pub async fn organizations_id_two_factor_disable_put( } } -pub async fn organizations_id_two_factor_duo_post( +pub async fn two_factor_get( configuration: &configuration::Configuration, - id: &str, - update_two_factor_duo_request_model: Option, -) -> Result> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; - - let uri_str = format!( - "{}/organizations/{id}/two-factor/duo", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/two-factor", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -374,7 +345,6 @@ pub async fn organizations_id_two_factor_duo_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_duo_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -391,13 +361,12 @@ pub async fn organizations_id_two_factor_duo_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -406,21 +375,17 @@ pub async fn organizations_id_two_factor_duo_post( } } -pub async fn organizations_id_two_factor_duo_put( +pub async fn two_factor_get_authenticator( configuration: &configuration::Configuration, - id: &str, - update_two_factor_duo_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!( - "{}/organizations/{id}/two-factor/duo", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/get-authenticator", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -428,7 +393,7 @@ pub async fn organizations_id_two_factor_duo_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_duo_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -445,13 +410,12 @@ pub async fn organizations_id_two_factor_duo_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -460,20 +424,15 @@ pub async fn organizations_id_two_factor_duo_put( } } -pub async fn organizations_id_two_factor_get( +pub async fn two_factor_get_device_verification_settings( configuration: &configuration::Configuration, - id: &str, ) -> Result< - models::TwoFactorProviderResponseModelListResponseModel, - Error, + models::DeviceVerificationResponseModel, + Error, > { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let uri_str = format!( - "{}/organizations/{id}/two-factor", - configuration.base_path, - id = crate::apis::urlencode(p_id) + "{}/two-factor/get-device-verification-settings", + configuration.base_path ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -499,12 +458,13 @@ pub async fn organizations_id_two_factor_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceVerificationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceVerificationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -513,20 +473,14 @@ pub async fn organizations_id_two_factor_get( } } -pub async fn organizations_id_two_factor_get_duo_post( +pub async fn two_factor_get_duo( configuration: &configuration::Configuration, - id: &str, secret_verification_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!( - "{}/organizations/{id}/two-factor/get-duo", - configuration.base_path, - id = crate::apis::urlencode(p_id) - ); + let uri_str = format!("{}/two-factor/get-duo", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -559,8 +513,7 @@ pub async fn organizations_id_two_factor_get_duo_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -569,20 +522,17 @@ pub async fn organizations_id_two_factor_get_duo_post( } } -pub async fn two_factor_authenticator_delete( +pub async fn two_factor_get_email( configuration: &configuration::Configuration, - two_factor_authenticator_disable_request_model: Option< - models::TwoFactorAuthenticatorDisableRequestModel, - >, -) -> Result> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_authenticator_disable_request_model = - two_factor_authenticator_disable_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); + let uri_str = format!("{}/two-factor/get-email", configuration.base_path); let mut req_builder = configuration .client - .request(reqwest::Method::DELETE, &uri_str); + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -590,7 +540,7 @@ pub async fn two_factor_authenticator_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_authenticator_disable_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -607,12 +557,12 @@ pub async fn two_factor_authenticator_delete( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -621,20 +571,22 @@ pub async fn two_factor_authenticator_delete( } } -pub async fn two_factor_authenticator_post( +pub async fn two_factor_get_organization( configuration: &configuration::Configuration, - update_two_factor_authenticator_request_model: Option< - models::UpdateTwoFactorAuthenticatorRequestModel, - >, -) -> Result> { + id: &str, +) -> Result< + models::TwoFactorProviderResponseModelListResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_authenticator_request_model = - update_two_factor_authenticator_request_model; + let p_id = id; - let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/organizations/{id}/two-factor", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -642,7 +594,6 @@ pub async fn two_factor_authenticator_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_authenticator_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -659,12 +610,12 @@ pub async fn two_factor_authenticator_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -673,18 +624,23 @@ pub async fn two_factor_authenticator_post( } } -pub async fn two_factor_authenticator_put( +pub async fn two_factor_get_organization_duo( configuration: &configuration::Configuration, - update_two_factor_authenticator_request_model: Option< - models::UpdateTwoFactorAuthenticatorRequestModel, - >, -) -> Result> { + id: &str, + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_authenticator_request_model = - update_two_factor_authenticator_request_model; + let p_id = id; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!( + "{}/organizations/{id}/two-factor/get-duo", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -692,7 +648,7 @@ pub async fn two_factor_authenticator_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_authenticator_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -709,12 +665,12 @@ pub async fn two_factor_authenticator_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -723,21 +679,17 @@ pub async fn two_factor_authenticator_put( } } -pub async fn two_factor_device_verification_settings_put( +pub async fn two_factor_get_recover( configuration: &configuration::Configuration, - device_verification_request_model: Option, -) -> Result< - models::DeviceVerificationResponseModel, - Error, -> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_device_verification_request_model = device_verification_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!( - "{}/two-factor/device-verification-settings", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/get-recover", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -745,7 +697,7 @@ pub async fn two_factor_device_verification_settings_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_device_verification_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -762,13 +714,12 @@ pub async fn two_factor_device_verification_settings_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceVerificationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceVerificationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorRecoverResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorRecoverResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -777,14 +728,14 @@ pub async fn two_factor_device_verification_settings_put( } } -pub async fn two_factor_disable_post( +pub async fn two_factor_get_web_authn( configuration: &configuration::Configuration, - two_factor_provider_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_provider_request_model = two_factor_provider_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/two-factor/disable", configuration.base_path); + let uri_str = format!("{}/two-factor/get-webauthn", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -795,7 +746,7 @@ pub async fn two_factor_disable_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_provider_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -812,12 +763,12 @@ pub async fn two_factor_disable_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -826,15 +777,17 @@ pub async fn two_factor_disable_post( } } -pub async fn two_factor_disable_put( +pub async fn two_factor_get_yubi_key( configuration: &configuration::Configuration, - two_factor_provider_request_model: Option, -) -> Result> { + secret_verification_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_provider_request_model = two_factor_provider_request_model; + let p_secret_verification_request_model = secret_verification_request_model; - let uri_str = format!("{}/two-factor/disable", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/get-yubikey", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -842,7 +795,7 @@ pub async fn two_factor_disable_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_provider_request_model); + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -859,12 +812,12 @@ pub async fn two_factor_disable_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -873,14 +826,17 @@ pub async fn two_factor_disable_put( } } -pub async fn two_factor_duo_post( +pub async fn two_factor_post_authenticator( configuration: &configuration::Configuration, - update_two_factor_duo_request_model: Option, -) -> Result> { + update_two_factor_authenticator_request_model: Option< + models::UpdateTwoFactorAuthenticatorRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; + let p_update_two_factor_authenticator_request_model = + update_two_factor_authenticator_request_model; - let uri_str = format!("{}/two-factor/duo", configuration.base_path); + let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -891,7 +847,7 @@ pub async fn two_factor_duo_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_duo_request_model); + req_builder = req_builder.json(&p_update_two_factor_authenticator_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -908,12 +864,12 @@ pub async fn two_factor_duo_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), - } + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -922,15 +878,17 @@ pub async fn two_factor_duo_post( } } -pub async fn two_factor_duo_put( +pub async fn two_factor_post_disable( configuration: &configuration::Configuration, - update_two_factor_duo_request_model: Option, -) -> Result> { + two_factor_provider_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; + let p_two_factor_provider_request_model = two_factor_provider_request_model; - let uri_str = format!("{}/two-factor/duo", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/disable", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -938,7 +896,7 @@ pub async fn two_factor_duo_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_duo_request_model); + req_builder = req_builder.json(&p_two_factor_provider_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -955,12 +913,12 @@ pub async fn two_factor_duo_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -969,14 +927,14 @@ pub async fn two_factor_duo_put( } } -pub async fn two_factor_email_post( +pub async fn two_factor_post_duo( configuration: &configuration::Configuration, - update_two_factor_email_request_model: Option, -) -> Result> { + update_two_factor_duo_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_email_request_model = update_two_factor_email_request_model; + let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; - let uri_str = format!("{}/two-factor/email", configuration.base_path); + let uri_str = format!("{}/two-factor/duo", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -987,7 +945,7 @@ pub async fn two_factor_email_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_email_request_model); + req_builder = req_builder.json(&p_update_two_factor_duo_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1004,12 +962,12 @@ pub async fn two_factor_email_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1018,15 +976,17 @@ pub async fn two_factor_email_post( } } -pub async fn two_factor_email_put( +pub async fn two_factor_post_email( configuration: &configuration::Configuration, update_two_factor_email_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_update_two_factor_email_request_model = update_two_factor_email_request_model; let uri_str = format!("{}/two-factor/email", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1056,7 +1016,7 @@ pub async fn two_factor_email_put( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1065,11 +1025,23 @@ pub async fn two_factor_email_put( } } -pub async fn two_factor_get( +pub async fn two_factor_post_organization_disable( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/two-factor", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + id: &str, + two_factor_provider_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + let p_two_factor_provider_request_model = two_factor_provider_request_model; + + let uri_str = format!( + "{}/organizations/{id}/two-factor/disable", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1077,6 +1049,7 @@ pub async fn two_factor_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_two_factor_provider_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1093,12 +1066,13 @@ pub async fn two_factor_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModelListResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1107,15 +1081,20 @@ pub async fn two_factor_get( } } -pub async fn two_factor_get_authenticator_post( +pub async fn two_factor_post_organization_duo( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> -{ + id: &str, + update_two_factor_duo_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_id = id; + let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; - let uri_str = format!("{}/two-factor/get-authenticator", configuration.base_path); + let uri_str = format!( + "{}/organizations/{id}/two-factor/duo", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1126,7 +1105,7 @@ pub async fn two_factor_get_authenticator_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_update_two_factor_duo_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1143,13 +1122,12 @@ pub async fn two_factor_get_authenticator_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1158,17 +1136,17 @@ pub async fn two_factor_get_authenticator_post( } } -pub async fn two_factor_get_device_verification_settings_get( +pub async fn two_factor_post_web_authn( configuration: &configuration::Configuration, -) -> Result< - models::DeviceVerificationResponseModel, - Error, -> { - let uri_str = format!( - "{}/two-factor/get-device-verification-settings", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + two_factor_web_authn_request_model: Option, +) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_two_factor_web_authn_request_model = two_factor_web_authn_request_model; + + let uri_str = format!("{}/two-factor/webauthn", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1176,6 +1154,7 @@ pub async fn two_factor_get_device_verification_settings_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_two_factor_web_authn_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1192,13 +1171,12 @@ pub async fn two_factor_get_device_verification_settings_get( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceVerificationResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceVerificationResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1207,14 +1185,16 @@ pub async fn two_factor_get_device_verification_settings_get( } } -pub async fn two_factor_get_duo_post( +pub async fn two_factor_post_yubi_key( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + update_two_factor_yubico_otp_request_model: Option< + models::UpdateTwoFactorYubicoOtpRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_update_two_factor_yubico_otp_request_model = update_two_factor_yubico_otp_request_model; - let uri_str = format!("{}/two-factor/get-duo", configuration.base_path); + let uri_str = format!("{}/two-factor/yubikey", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1225,7 +1205,7 @@ pub async fn two_factor_get_duo_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_update_two_factor_yubico_otp_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1242,12 +1222,12 @@ pub async fn two_factor_get_duo_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1256,17 +1236,18 @@ pub async fn two_factor_get_duo_post( } } -pub async fn two_factor_get_email_post( +pub async fn two_factor_put_authenticator( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + update_two_factor_authenticator_request_model: Option< + models::UpdateTwoFactorAuthenticatorRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_update_two_factor_authenticator_request_model = + update_two_factor_authenticator_request_model; - let uri_str = format!("{}/two-factor/get-email", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/two-factor/authenticator", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1274,7 +1255,7 @@ pub async fn two_factor_get_email_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_update_two_factor_authenticator_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1291,12 +1272,12 @@ pub async fn two_factor_get_email_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorAuthenticatorResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1305,17 +1286,21 @@ pub async fn two_factor_get_email_post( } } -pub async fn two_factor_get_recover_post( +pub async fn two_factor_put_device_verification_settings( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + device_verification_request_model: Option, +) -> Result< + models::DeviceVerificationResponseModel, + Error, +> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_device_verification_request_model = device_verification_request_model; - let uri_str = format!("{}/two-factor/get-recover", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/two-factor/device-verification-settings", + configuration.base_path + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1323,7 +1308,7 @@ pub async fn two_factor_get_recover_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_device_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1340,12 +1325,13 @@ pub async fn two_factor_get_recover_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorRecoverResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorRecoverResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeviceVerificationResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::DeviceVerificationResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1354,17 +1340,15 @@ pub async fn two_factor_get_recover_post( } } -pub async fn two_factor_get_webauthn_post( +pub async fn two_factor_put_disable( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + two_factor_provider_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_two_factor_provider_request_model = two_factor_provider_request_model; - let uri_str = format!("{}/two-factor/get-webauthn", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/two-factor/disable", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1372,7 +1356,7 @@ pub async fn two_factor_get_webauthn_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_two_factor_provider_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1389,12 +1373,12 @@ pub async fn two_factor_get_webauthn_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1403,17 +1387,15 @@ pub async fn two_factor_get_webauthn_post( } } -pub async fn two_factor_get_yubikey_post( +pub async fn two_factor_put_duo( configuration: &configuration::Configuration, - secret_verification_request_model: Option, -) -> Result> { + update_two_factor_duo_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_secret_verification_request_model = secret_verification_request_model; + let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; - let uri_str = format!("{}/two-factor/get-yubikey", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/two-factor/duo", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1421,7 +1403,7 @@ pub async fn two_factor_get_yubikey_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); + req_builder = req_builder.json(&p_update_two_factor_duo_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1438,12 +1420,12 @@ pub async fn two_factor_get_yubikey_post( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1452,17 +1434,15 @@ pub async fn two_factor_get_yubikey_post( } } -pub async fn two_factor_recover_post( +pub async fn two_factor_put_email( configuration: &configuration::Configuration, - two_factor_recovery_request_model: Option, -) -> Result<(), Error> { + update_two_factor_email_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_recovery_request_model = two_factor_recovery_request_model; + let p_update_two_factor_email_request_model = update_two_factor_email_request_model; - let uri_str = format!("{}/two-factor/recover", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!("{}/two-factor/email", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1470,56 +1450,29 @@ pub async fn two_factor_recover_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_recovery_request_model); + req_builder = req_builder.json(&p_update_two_factor_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) - } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn two_factor_send_email_login_post( - configuration: &configuration::Configuration, - two_factor_email_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_email_request_model = two_factor_email_request_model; - - let uri_str = format!("{}/two-factor/send-email-login", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref token) = configuration.oauth_access_token { - req_builder = req_builder.bearer_auth(token.to_owned()); - }; - req_builder = req_builder.json(&p_two_factor_email_request_model); - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - - if !status.is_client_error() && !status.is_server_error() { - Ok(()) + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorEmailResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1528,17 +1481,21 @@ pub async fn two_factor_send_email_login_post( } } -pub async fn two_factor_send_email_post( +pub async fn two_factor_put_organization_disable( configuration: &configuration::Configuration, - two_factor_email_request_model: Option, -) -> Result<(), Error> { + id: &str, + two_factor_provider_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_email_request_model = two_factor_email_request_model; + let p_id = id; + let p_two_factor_provider_request_model = two_factor_provider_request_model; - let uri_str = format!("{}/two-factor/send-email", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/organizations/{id}/two-factor/disable", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1546,18 +1503,30 @@ pub async fn two_factor_send_email_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_email_request_model); + req_builder = req_builder.json(&p_two_factor_provider_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorProviderResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = + serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1566,17 +1535,21 @@ pub async fn two_factor_send_email_post( } } -pub async fn two_factor_webauthn_delete( +pub async fn two_factor_put_organization_duo( configuration: &configuration::Configuration, - two_factor_web_authn_delete_request_model: Option, -) -> Result> { + id: &str, + update_two_factor_duo_request_model: Option, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_web_authn_delete_request_model = two_factor_web_authn_delete_request_model; + let p_id = id; + let p_update_two_factor_duo_request_model = update_two_factor_duo_request_model; - let uri_str = format!("{}/two-factor/webauthn", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::DELETE, &uri_str); + let uri_str = format!( + "{}/organizations/{id}/two-factor/duo", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1584,7 +1557,7 @@ pub async fn two_factor_webauthn_delete( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_web_authn_delete_request_model); + req_builder = req_builder.json(&p_update_two_factor_duo_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1601,12 +1574,12 @@ pub async fn two_factor_webauthn_delete( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorDuoResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1615,17 +1588,15 @@ pub async fn two_factor_webauthn_delete( } } -pub async fn two_factor_webauthn_post( +pub async fn two_factor_put_web_authn( configuration: &configuration::Configuration, two_factor_web_authn_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_two_factor_web_authn_request_model = two_factor_web_authn_request_model; let uri_str = format!("{}/two-factor/webauthn", configuration.base_path); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1655,7 +1626,7 @@ pub async fn two_factor_webauthn_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1664,14 +1635,16 @@ pub async fn two_factor_webauthn_post( } } -pub async fn two_factor_webauthn_put( +pub async fn two_factor_put_yubi_key( configuration: &configuration::Configuration, - two_factor_web_authn_request_model: Option, -) -> Result> { + update_two_factor_yubico_otp_request_model: Option< + models::UpdateTwoFactorYubicoOtpRequestModel, + >, +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions - let p_two_factor_web_authn_request_model = two_factor_web_authn_request_model; + let p_update_two_factor_yubico_otp_request_model = update_two_factor_yubico_otp_request_model; - let uri_str = format!("{}/two-factor/webauthn", configuration.base_path); + let uri_str = format!("{}/two-factor/yubikey", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -1680,7 +1653,7 @@ pub async fn two_factor_webauthn_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_two_factor_web_authn_request_model); + req_builder = req_builder.json(&p_update_two_factor_yubico_otp_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; @@ -1697,12 +1670,12 @@ pub async fn two_factor_webauthn_put( let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorWebAuthnResponseModel`")))), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1711,16 +1684,14 @@ pub async fn two_factor_webauthn_put( } } -pub async fn two_factor_yubikey_post( +pub async fn two_factor_send_email( configuration: &configuration::Configuration, - update_two_factor_yubico_otp_request_model: Option< - models::UpdateTwoFactorYubicoOtpRequestModel, - >, -) -> Result> { + two_factor_email_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_yubico_otp_request_model = update_two_factor_yubico_otp_request_model; + let p_two_factor_email_request_model = two_factor_email_request_model; - let uri_str = format!("{}/two-factor/yubikey", configuration.base_path); + let uri_str = format!("{}/two-factor/send-email", configuration.base_path); let mut req_builder = configuration .client .request(reqwest::Method::POST, &uri_str); @@ -1731,29 +1702,18 @@ pub async fn two_factor_yubikey_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_yubico_otp_request_model); + req_builder = req_builder.json(&p_two_factor_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -1762,17 +1722,17 @@ pub async fn two_factor_yubikey_post( } } -pub async fn two_factor_yubikey_put( +pub async fn two_factor_send_email_login( configuration: &configuration::Configuration, - update_two_factor_yubico_otp_request_model: Option< - models::UpdateTwoFactorYubicoOtpRequestModel, - >, -) -> Result> { + two_factor_email_request_model: Option, +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions - let p_update_two_factor_yubico_otp_request_model = update_two_factor_yubico_otp_request_model; + let p_two_factor_email_request_model = two_factor_email_request_model; - let uri_str = format!("{}/two-factor/yubikey", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + let uri_str = format!("{}/two-factor/send-email-login", configuration.base_path); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -1780,29 +1740,18 @@ pub async fn two_factor_yubikey_put( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_update_two_factor_yubico_otp_request_model); + req_builder = req_builder.json(&p_two_factor_email_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TwoFactorYubiKeyResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/users_api.rs b/crates/bitwarden-api-api/src/apis/users_api.rs index 75893cfbd..97a7ab7d7 100644 --- a/crates/bitwarden-api-api/src/apis/users_api.rs +++ b/crates/bitwarden-api-api/src/apis/users_api.rs @@ -14,17 +14,17 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`users_id_public_key_get`] +/// struct for typed errors of method [`users_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum UsersIdPublicKeyGetError { +pub enum UsersGetError { UnknownValue(serde_json::Value), } -pub async fn users_id_public_key_get( +pub async fn users_get( configuration: &configuration::Configuration, id: &str, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; @@ -62,7 +62,7 @@ pub async fn users_id_public_key_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/apis/web_authn_api.rs b/crates/bitwarden-api-api/src/apis/web_authn_api.rs index fc1d73054..3f03b5d74 100644 --- a/crates/bitwarden-api-api/src/apis/web_authn_api.rs +++ b/crates/bitwarden-api-api/src/apis/web_authn_api.rs @@ -14,55 +14,53 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`webauthn_assertion_options_post`] +/// struct for typed errors of method [`web_authn_assertion_options`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnAssertionOptionsPostError { +pub enum WebAuthnAssertionOptionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`webauthn_attestation_options_post`] +/// struct for typed errors of method [`web_authn_attestation_options`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnAttestationOptionsPostError { +pub enum WebAuthnAttestationOptionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`webauthn_get`] +/// struct for typed errors of method [`web_authn_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnGetError { +pub enum WebAuthnDeleteError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`webauthn_id_delete_post`] +/// struct for typed errors of method [`web_authn_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnIdDeletePostError { +pub enum WebAuthnGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`webauthn_post`] +/// struct for typed errors of method [`web_authn_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnPostError { +pub enum WebAuthnPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`webauthn_put`] +/// struct for typed errors of method [`web_authn_update_credential`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum WebauthnPutError { +pub enum WebAuthnUpdateCredentialError { UnknownValue(serde_json::Value), } -pub async fn webauthn_assertion_options_post( +pub async fn web_authn_assertion_options( configuration: &configuration::Configuration, secret_verification_request_model: Option, -) -> Result< - models::WebAuthnLoginAssertionOptionsResponseModel, - Error, -> { +) -> Result> +{ // add a prefix to parameters to efficiently prevent name collisions let p_secret_verification_request_model = secret_verification_request_model; @@ -99,7 +97,7 @@ pub async fn webauthn_assertion_options_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -108,12 +106,12 @@ pub async fn webauthn_assertion_options_post( } } -pub async fn webauthn_attestation_options_post( +pub async fn web_authn_attestation_options( configuration: &configuration::Configuration, secret_verification_request_model: Option, ) -> Result< models::WebAuthnCredentialCreateOptionsResponseModel, - Error, + Error, > { // add a prefix to parameters to efficiently prevent name collisions let p_secret_verification_request_model = secret_verification_request_model; @@ -151,8 +149,7 @@ pub async fn webauthn_attestation_options_post( } } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -161,11 +158,23 @@ pub async fn webauthn_attestation_options_post( } } -pub async fn webauthn_get( +pub async fn web_authn_delete( configuration: &configuration::Configuration, -) -> Result> { - let uri_str = format!("{}/webauthn", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + id: uuid::Uuid, + secret_verification_request_model: Option, +) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_id = id; + let p_secret_verification_request_model = secret_verification_request_model; + + let uri_str = format!( + "{}/webauthn/{id}/delete", + configuration.base_path, + id = crate::apis::urlencode(p_id.to_string()) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -173,28 +182,18 @@ pub async fn webauthn_get( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; + req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WebAuthnCredentialResponseModelListResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WebAuthnCredentialResponseModelListResponseModel`")))), - } + Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -203,23 +202,11 @@ pub async fn webauthn_get( } } -pub async fn webauthn_id_delete_post( +pub async fn web_authn_get( configuration: &configuration::Configuration, - id: uuid::Uuid, - secret_verification_request_model: Option, -) -> Result<(), Error> { - // add a prefix to parameters to efficiently prevent name collisions - let p_id = id; - let p_secret_verification_request_model = secret_verification_request_model; - - let uri_str = format!( - "{}/webauthn/{id}/delete", - configuration.base_path, - id = crate::apis::urlencode(p_id.to_string()) - ); - let mut req_builder = configuration - .client - .request(reqwest::Method::POST, &uri_str); +) -> Result> { + let uri_str = format!("{}/webauthn", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -227,18 +214,28 @@ pub async fn webauthn_id_delete_post( if let Some(ref token) = configuration.oauth_access_token { req_builder = req_builder.bearer_auth(token.to_owned()); }; - req_builder = req_builder.json(&p_secret_verification_request_model); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { - Ok(()) + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WebAuthnCredentialResponseModelListResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WebAuthnCredentialResponseModelListResponseModel`")))), + } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -247,12 +244,12 @@ pub async fn webauthn_id_delete_post( } } -pub async fn webauthn_post( +pub async fn web_authn_post( configuration: &configuration::Configuration, web_authn_login_credential_create_request_model: Option< models::WebAuthnLoginCredentialCreateRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_web_authn_login_credential_create_request_model = web_authn_login_credential_create_request_model; @@ -279,7 +276,7 @@ pub async fn webauthn_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -288,12 +285,12 @@ pub async fn webauthn_post( } } -pub async fn webauthn_put( +pub async fn web_authn_update_credential( configuration: &configuration::Configuration, web_authn_login_credential_update_request_model: Option< models::WebAuthnLoginCredentialUpdateRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_web_authn_login_credential_update_request_model = web_authn_login_credential_update_request_model; @@ -318,7 +315,7 @@ pub async fn webauthn_put( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-api/src/models/add_organization_report_request.rs b/crates/bitwarden-api-api/src/models/add_organization_report_request.rs index aa7988055..a1e7ae6bf 100644 --- a/crates/bitwarden-api-api/src/models/add_organization_report_request.rs +++ b/crates/bitwarden-api-api/src/models/add_organization_report_request.rs @@ -18,8 +18,15 @@ pub struct AddOrganizationReportRequest { pub organization_id: Option, #[serde(rename = "reportData", skip_serializing_if = "Option::is_none")] pub report_data: Option, - #[serde(rename = "date", skip_serializing_if = "Option::is_none")] - pub date: Option, + #[serde( + rename = "contentEncryptionKey", + skip_serializing_if = "Option::is_none" + )] + pub content_encryption_key: Option, + #[serde(rename = "summaryData", skip_serializing_if = "Option::is_none")] + pub summary_data: Option, + #[serde(rename = "applicationData", skip_serializing_if = "Option::is_none")] + pub application_data: Option, } impl AddOrganizationReportRequest { @@ -27,7 +34,9 @@ impl AddOrganizationReportRequest { AddOrganizationReportRequest { organization_id: None, report_data: None, - date: None, + content_encryption_key: None, + summary_data: None, + application_data: None, } } } diff --git a/crates/bitwarden-api-api/src/models/collection_request_model.rs b/crates/bitwarden-api-api/src/models/create_collection_request_model.rs similarity index 83% rename from crates/bitwarden-api-api/src/models/collection_request_model.rs rename to crates/bitwarden-api-api/src/models/create_collection_request_model.rs index 7217fd160..68cb7c4eb 100644 --- a/crates/bitwarden-api-api/src/models/collection_request_model.rs +++ b/crates/bitwarden-api-api/src/models/create_collection_request_model.rs @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize}; use crate::models; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CollectionRequestModel { +pub struct CreateCollectionRequestModel { #[serde(rename = "name")] pub name: String, #[serde(rename = "externalId", skip_serializing_if = "Option::is_none")] @@ -24,9 +24,9 @@ pub struct CollectionRequestModel { pub users: Option>, } -impl CollectionRequestModel { - pub fn new(name: String) -> CollectionRequestModel { - CollectionRequestModel { +impl CreateCollectionRequestModel { + pub fn new(name: String) -> CreateCollectionRequestModel { + CreateCollectionRequestModel { name, external_id: None, groups: None, diff --git a/crates/bitwarden-api-api/src/models/event_response_model.rs b/crates/bitwarden-api-api/src/models/event_response_model.rs index 487e0f30f..a8f1e7903 100644 --- a/crates/bitwarden-api-api/src/models/event_response_model.rs +++ b/crates/bitwarden-api-api/src/models/event_response_model.rs @@ -57,6 +57,8 @@ pub struct EventResponseModel { pub domain_name: Option, #[serde(rename = "secretId", skip_serializing_if = "Option::is_none")] pub secret_id: Option, + #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] + pub project_id: Option, #[serde(rename = "serviceAccountId", skip_serializing_if = "Option::is_none")] pub service_account_id: Option, } @@ -84,6 +86,7 @@ impl EventResponseModel { system_user: None, domain_name: None, secret_id: None, + project_id: None, service_account_id: None, } } diff --git a/crates/bitwarden-api-api/src/models/event_type.rs b/crates/bitwarden-api-api/src/models/event_type.rs index 40cb4efc4..c3cc0df66 100644 --- a/crates/bitwarden-api-api/src/models/event_type.rs +++ b/crates/bitwarden-api-api/src/models/event_type.rs @@ -48,8 +48,6 @@ pub enum EventType { Cipher_SoftDeleted = 1115, Cipher_Restored = 1116, Cipher_ClientToggledCardNumberVisible = 1117, - Cipher_Archived = 1118, - Cipher_Unarchived = 1119, Collection_Created = 1300, Collection_Updated = 1301, Collection_Deleted = 1302, @@ -83,6 +81,14 @@ pub enum EventType { Organization_DisabledKeyConnector = 1607, Organization_SponsorshipsSynced = 1608, Organization_CollectionManagement_Updated = 1609, + Organization_CollectionManagement_LimitCollectionCreationEnabled = 1610, + Organization_CollectionManagement_LimitCollectionCreationDisabled = 1611, + Organization_CollectionManagement_LimitCollectionDeletionEnabled = 1612, + Organization_CollectionManagement_LimitCollectionDeletionDisabled = 1613, + Organization_CollectionManagement_LimitItemDeletionEnabled = 1614, + Organization_CollectionManagement_LimitItemDeletionDisabled = 1615, + Organization_CollectionManagement_AllowAdminAccessToAllCollectionItemsEnabled = 1616, + Organization_CollectionManagement_AllowAdminAccessToAllCollectionItemsDisabled = 1617, Policy_Updated = 1700, ProviderUser_Invited = 1800, ProviderUser_Confirmed = 1801, @@ -100,98 +106,112 @@ pub enum EventType { Secret_Created = 2101, Secret_Edited = 2102, Secret_Deleted = 2103, + Secret_Permanently_Deleted = 2104, + Secret_Restored = 2105, + Project_Retrieved = 2200, + Project_Created = 2201, + Project_Edited = 2202, + Project_Deleted = 2203, } impl std::fmt::Display for EventType { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "{}", - match self { - Self::User_LoggedIn => "1000", - Self::User_ChangedPassword => "1001", - Self::User_Updated2fa => "1002", - Self::User_Disabled2fa => "1003", - Self::User_Recovered2fa => "1004", - Self::User_FailedLogIn => "1005", - Self::User_FailedLogIn2fa => "1006", - Self::User_ClientExportedVault => "1007", - Self::User_UpdatedTempPassword => "1008", - Self::User_MigratedKeyToKeyConnector => "1009", - Self::User_RequestedDeviceApproval => "1010", - Self::User_TdeOffboardingPasswordSet => "1011", - Self::Cipher_Created => "1100", - Self::Cipher_Updated => "1101", - Self::Cipher_Deleted => "1102", - Self::Cipher_AttachmentCreated => "1103", - Self::Cipher_AttachmentDeleted => "1104", - Self::Cipher_Shared => "1105", - Self::Cipher_UpdatedCollections => "1106", - Self::Cipher_ClientViewed => "1107", - Self::Cipher_ClientToggledPasswordVisible => "1108", - Self::Cipher_ClientToggledHiddenFieldVisible => "1109", - Self::Cipher_ClientToggledCardCodeVisible => "1110", - Self::Cipher_ClientCopiedPassword => "1111", - Self::Cipher_ClientCopiedHiddenField => "1112", - Self::Cipher_ClientCopiedCardCode => "1113", - Self::Cipher_ClientAutofilled => "1114", - Self::Cipher_SoftDeleted => "1115", - Self::Cipher_Restored => "1116", - Self::Cipher_ClientToggledCardNumberVisible => "1117", - Self::Cipher_Archived => "1118", - Self::Cipher_Unarchived => "1119", - Self::Collection_Created => "1300", - Self::Collection_Updated => "1301", - Self::Collection_Deleted => "1302", - Self::Group_Created => "1400", - Self::Group_Updated => "1401", - Self::Group_Deleted => "1402", - Self::OrganizationUser_Invited => "1500", - Self::OrganizationUser_Confirmed => "1501", - Self::OrganizationUser_Updated => "1502", - Self::OrganizationUser_Removed => "1503", - Self::OrganizationUser_UpdatedGroups => "1504", - Self::OrganizationUser_UnlinkedSso => "1505", - Self::OrganizationUser_ResetPassword_Enroll => "1506", - Self::OrganizationUser_ResetPassword_Withdraw => "1507", - Self::OrganizationUser_AdminResetPassword => "1508", - Self::OrganizationUser_ResetSsoLink => "1509", - Self::OrganizationUser_FirstSsoLogin => "1510", - Self::OrganizationUser_Revoked => "1511", - Self::OrganizationUser_Restored => "1512", - Self::OrganizationUser_ApprovedAuthRequest => "1513", - Self::OrganizationUser_RejectedAuthRequest => "1514", - Self::OrganizationUser_Deleted => "1515", - Self::OrganizationUser_Left => "1516", - Self::Organization_Updated => "1600", - Self::Organization_PurgedVault => "1601", - Self::Organization_ClientExportedVault => "1602", - Self::Organization_VaultAccessed => "1603", - Self::Organization_EnabledSso => "1604", - Self::Organization_DisabledSso => "1605", - Self::Organization_EnabledKeyConnector => "1606", - Self::Organization_DisabledKeyConnector => "1607", - Self::Organization_SponsorshipsSynced => "1608", - Self::Organization_CollectionManagement_Updated => "1609", - Self::Policy_Updated => "1700", - Self::ProviderUser_Invited => "1800", - Self::ProviderUser_Confirmed => "1801", - Self::ProviderUser_Updated => "1802", - Self::ProviderUser_Removed => "1803", - Self::ProviderOrganization_Created => "1900", - Self::ProviderOrganization_Added => "1901", - Self::ProviderOrganization_Removed => "1902", - Self::ProviderOrganization_VaultAccessed => "1903", - Self::OrganizationDomain_Added => "2000", - Self::OrganizationDomain_Removed => "2001", - Self::OrganizationDomain_Verified => "2002", - Self::OrganizationDomain_NotVerified => "2003", - Self::Secret_Retrieved => "2100", - Self::Secret_Created => "2101", - Self::Secret_Edited => "2102", - Self::Secret_Deleted => "2103", - } - ) + write!(f, "{}", match self { + Self::User_LoggedIn => "1000", + Self::User_ChangedPassword => "1001", + Self::User_Updated2fa => "1002", + Self::User_Disabled2fa => "1003", + Self::User_Recovered2fa => "1004", + Self::User_FailedLogIn => "1005", + Self::User_FailedLogIn2fa => "1006", + Self::User_ClientExportedVault => "1007", + Self::User_UpdatedTempPassword => "1008", + Self::User_MigratedKeyToKeyConnector => "1009", + Self::User_RequestedDeviceApproval => "1010", + Self::User_TdeOffboardingPasswordSet => "1011", + Self::Cipher_Created => "1100", + Self::Cipher_Updated => "1101", + Self::Cipher_Deleted => "1102", + Self::Cipher_AttachmentCreated => "1103", + Self::Cipher_AttachmentDeleted => "1104", + Self::Cipher_Shared => "1105", + Self::Cipher_UpdatedCollections => "1106", + Self::Cipher_ClientViewed => "1107", + Self::Cipher_ClientToggledPasswordVisible => "1108", + Self::Cipher_ClientToggledHiddenFieldVisible => "1109", + Self::Cipher_ClientToggledCardCodeVisible => "1110", + Self::Cipher_ClientCopiedPassword => "1111", + Self::Cipher_ClientCopiedHiddenField => "1112", + Self::Cipher_ClientCopiedCardCode => "1113", + Self::Cipher_ClientAutofilled => "1114", + Self::Cipher_SoftDeleted => "1115", + Self::Cipher_Restored => "1116", + Self::Cipher_ClientToggledCardNumberVisible => "1117", + Self::Collection_Created => "1300", + Self::Collection_Updated => "1301", + Self::Collection_Deleted => "1302", + Self::Group_Created => "1400", + Self::Group_Updated => "1401", + Self::Group_Deleted => "1402", + Self::OrganizationUser_Invited => "1500", + Self::OrganizationUser_Confirmed => "1501", + Self::OrganizationUser_Updated => "1502", + Self::OrganizationUser_Removed => "1503", + Self::OrganizationUser_UpdatedGroups => "1504", + Self::OrganizationUser_UnlinkedSso => "1505", + Self::OrganizationUser_ResetPassword_Enroll => "1506", + Self::OrganizationUser_ResetPassword_Withdraw => "1507", + Self::OrganizationUser_AdminResetPassword => "1508", + Self::OrganizationUser_ResetSsoLink => "1509", + Self::OrganizationUser_FirstSsoLogin => "1510", + Self::OrganizationUser_Revoked => "1511", + Self::OrganizationUser_Restored => "1512", + Self::OrganizationUser_ApprovedAuthRequest => "1513", + Self::OrganizationUser_RejectedAuthRequest => "1514", + Self::OrganizationUser_Deleted => "1515", + Self::OrganizationUser_Left => "1516", + Self::Organization_Updated => "1600", + Self::Organization_PurgedVault => "1601", + Self::Organization_ClientExportedVault => "1602", + Self::Organization_VaultAccessed => "1603", + Self::Organization_EnabledSso => "1604", + Self::Organization_DisabledSso => "1605", + Self::Organization_EnabledKeyConnector => "1606", + Self::Organization_DisabledKeyConnector => "1607", + Self::Organization_SponsorshipsSynced => "1608", + Self::Organization_CollectionManagement_Updated => "1609", + Self::Organization_CollectionManagement_LimitCollectionCreationEnabled => "1610", + Self::Organization_CollectionManagement_LimitCollectionCreationDisabled => "1611", + Self::Organization_CollectionManagement_LimitCollectionDeletionEnabled => "1612", + Self::Organization_CollectionManagement_LimitCollectionDeletionDisabled => "1613", + Self::Organization_CollectionManagement_LimitItemDeletionEnabled => "1614", + Self::Organization_CollectionManagement_LimitItemDeletionDisabled => "1615", + Self::Organization_CollectionManagement_AllowAdminAccessToAllCollectionItemsEnabled => "1616", + Self::Organization_CollectionManagement_AllowAdminAccessToAllCollectionItemsDisabled => "1617", + Self::Policy_Updated => "1700", + Self::ProviderUser_Invited => "1800", + Self::ProviderUser_Confirmed => "1801", + Self::ProviderUser_Updated => "1802", + Self::ProviderUser_Removed => "1803", + Self::ProviderOrganization_Created => "1900", + Self::ProviderOrganization_Added => "1901", + Self::ProviderOrganization_Removed => "1902", + Self::ProviderOrganization_VaultAccessed => "1903", + Self::OrganizationDomain_Added => "2000", + Self::OrganizationDomain_Removed => "2001", + Self::OrganizationDomain_Verified => "2002", + Self::OrganizationDomain_NotVerified => "2003", + Self::Secret_Retrieved => "2100", + Self::Secret_Created => "2101", + Self::Secret_Edited => "2102", + Self::Secret_Deleted => "2103", + Self::Secret_Permanently_Deleted => "2104", + Self::Secret_Restored => "2105", + Self::Project_Retrieved => "2200", + Self::Project_Created => "2201", + Self::Project_Edited => "2202", + Self::Project_Deleted => "2203", + }) } } impl Default for EventType { diff --git a/crates/bitwarden-api-api/src/models/integration_type.rs b/crates/bitwarden-api-api/src/models/integration_type.rs index 10cf0a22b..ae07676f8 100644 --- a/crates/bitwarden-api-api/src/models/integration_type.rs +++ b/crates/bitwarden-api-api/src/models/integration_type.rs @@ -23,6 +23,7 @@ pub enum IntegrationType { Slack = 3, Webhook = 4, Hec = 5, + Datadog = 6, } impl std::fmt::Display for IntegrationType { @@ -36,6 +37,7 @@ impl std::fmt::Display for IntegrationType { Self::Slack => "3", Self::Webhook => "4", Self::Hec => "5", + Self::Datadog => "6", } ) } diff --git a/crates/bitwarden-api-api/src/models/verify_bank_account_request.rs b/crates/bitwarden-api-api/src/models/minimal_tokenized_payment_method_request.rs similarity index 52% rename from crates/bitwarden-api-api/src/models/verify_bank_account_request.rs rename to crates/bitwarden-api-api/src/models/minimal_tokenized_payment_method_request.rs index f7736c18e..589539476 100644 --- a/crates/bitwarden-api-api/src/models/verify_bank_account_request.rs +++ b/crates/bitwarden-api-api/src/models/minimal_tokenized_payment_method_request.rs @@ -13,13 +13,15 @@ use serde::{Deserialize, Serialize}; use crate::models; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct VerifyBankAccountRequest { - #[serde(rename = "descriptorCode")] - pub descriptor_code: String, +pub struct MinimalTokenizedPaymentMethodRequest { + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "token")] + pub token: String, } -impl VerifyBankAccountRequest { - pub fn new(descriptor_code: String) -> VerifyBankAccountRequest { - VerifyBankAccountRequest { descriptor_code } +impl MinimalTokenizedPaymentMethodRequest { + pub fn new(r#type: String, token: String) -> MinimalTokenizedPaymentMethodRequest { + MinimalTokenizedPaymentMethodRequest { r#type, token } } } diff --git a/crates/bitwarden-api-api/src/models/mod.rs b/crates/bitwarden-api-api/src/models/mod.rs index 78a50cff6..c1286f8c7 100644 --- a/crates/bitwarden-api-api/src/models/mod.rs +++ b/crates/bitwarden-api-api/src/models/mod.rs @@ -178,8 +178,6 @@ pub mod collection_details_response_model; pub use self::collection_details_response_model::CollectionDetailsResponseModel; pub mod collection_details_response_model_list_response_model; pub use self::collection_details_response_model_list_response_model::CollectionDetailsResponseModelListResponseModel; -pub mod collection_request_model; -pub use self::collection_request_model::CollectionRequestModel; pub mod collection_response_model; pub use self::collection_response_model::CollectionResponseModel; pub mod collection_response_model_list_response_model; @@ -192,6 +190,8 @@ pub mod config_response_model; pub use self::config_response_model::ConfigResponseModel; pub mod create_client_organization_request_body; pub use self::create_client_organization_request_body::CreateClientOrganizationRequestBody; +pub mod create_collection_request_model; +pub use self::create_collection_request_model::CreateCollectionRequestModel; pub mod credential_create_options; pub use self::credential_create_options::CredentialCreateOptions; pub mod delete_attachment_response_data; @@ -220,8 +220,6 @@ pub mod device_verification_response_model; pub use self::device_verification_response_model::DeviceVerificationResponseModel; pub mod domains_response_model; pub use self::domains_response_model::DomainsResponseModel; -pub mod drop_organization_report_request; -pub use self::drop_organization_report_request::DropOrganizationReportRequest; pub mod drop_password_health_report_application_request; pub use self::drop_password_health_report_application_request::DropPasswordHealthReportApplicationRequest; pub mod email_request_model; @@ -362,6 +360,8 @@ pub mod member_decryption_type; pub use self::member_decryption_type::MemberDecryptionType; pub mod minimal_billing_address_request; pub use self::minimal_billing_address_request::MinimalBillingAddressRequest; +pub mod minimal_tokenized_payment_method_request; +pub use self::minimal_tokenized_payment_method_request::MinimalTokenizedPaymentMethodRequest; pub mod notification_response_model; pub use self::notification_response_model::NotificationResponseModel; pub mod notification_response_model_list_response_model; @@ -424,10 +424,6 @@ pub mod organization_password_manager_request_model; pub use self::organization_password_manager_request_model::OrganizationPasswordManagerRequestModel; pub mod organization_public_key_response_model; pub use self::organization_public_key_response_model::OrganizationPublicKeyResponseModel; -pub mod organization_report; -pub use self::organization_report::OrganizationReport; -pub mod organization_report_summary_model; -pub use self::organization_report_summary_model::OrganizationReportSummaryModel; pub mod organization_response_model; pub use self::organization_response_model::OrganizationResponseModel; pub mod organization_seat_request_model; @@ -568,6 +564,8 @@ pub mod potential_grantee_response_model_list_response_model; pub use self::potential_grantee_response_model_list_response_model::PotentialGranteeResponseModelListResponseModel; pub mod pre_validate_sponsorship_response_model; pub use self::pre_validate_sponsorship_response_model::PreValidateSponsorshipResponseModel; +pub mod premium_cloud_hosted_subscription_request; +pub use self::premium_cloud_hosted_subscription_request::PremiumCloudHostedSubscriptionRequest; pub mod preview_individual_invoice_request_body; pub use self::preview_individual_invoice_request_body::PreviewIndividualInvoiceRequestBody; pub mod preview_organization_invoice_request_body; @@ -698,6 +696,8 @@ pub mod saml2_name_id_format; pub use self::saml2_name_id_format::Saml2NameIdFormat; pub mod saml2_signing_behavior; pub use self::saml2_signing_behavior::Saml2SigningBehavior; +pub mod save_policy_request; +pub use self::save_policy_request::SavePolicyRequest; pub mod secret_access_policies_requests_model; pub use self::secret_access_policies_requests_model::SecretAccessPoliciesRequestsModel; pub mod secret_access_policies_response_model; @@ -732,6 +732,8 @@ pub mod secure_note_type; pub use self::secure_note_type::SecureNoteType; pub mod security_task_create_request; pub use self::security_task_create_request::SecurityTaskCreateRequest; +pub mod security_task_metrics_response_model; +pub use self::security_task_metrics_response_model::SecurityTaskMetricsResponseModel; pub mod security_task_status; pub use self::security_task_status::SecurityTaskStatus; pub mod security_task_type; @@ -854,8 +856,6 @@ pub mod two_factor_provider_type; pub use self::two_factor_provider_type::TwoFactorProviderType; pub mod two_factor_recover_response_model; pub use self::two_factor_recover_response_model::TwoFactorRecoverResponseModel; -pub mod two_factor_recovery_request_model; -pub use self::two_factor_recovery_request_model::TwoFactorRecoveryRequestModel; pub mod two_factor_web_authn_delete_request_model; pub use self::two_factor_web_authn_delete_request_model::TwoFactorWebAuthnDeleteRequestModel; pub mod two_factor_web_authn_request_model; @@ -874,10 +874,20 @@ pub mod update_avatar_request_model; pub use self::update_avatar_request_model::UpdateAvatarRequestModel; pub mod update_client_organization_request_body; pub use self::update_client_organization_request_body::UpdateClientOrganizationRequestBody; +pub mod update_collection_request_model; +pub use self::update_collection_request_model::UpdateCollectionRequestModel; pub mod update_devices_trust_request_model; pub use self::update_devices_trust_request_model::UpdateDevicesTrustRequestModel; pub mod update_domains_request_model; pub use self::update_domains_request_model::UpdateDomainsRequestModel; +pub mod update_organization_report_application_data_request; +pub use self::update_organization_report_application_data_request::UpdateOrganizationReportApplicationDataRequest; +pub mod update_organization_report_data_request; +pub use self::update_organization_report_data_request::UpdateOrganizationReportDataRequest; +pub mod update_organization_report_request; +pub use self::update_organization_report_request::UpdateOrganizationReportRequest; +pub mod update_organization_report_summary_request; +pub use self::update_organization_report_summary_request::UpdateOrganizationReportSummaryRequest; pub mod update_payment_method_request_body; pub use self::update_payment_method_request_body::UpdatePaymentMethodRequestBody; pub mod update_profile_request_model; @@ -910,8 +920,6 @@ pub mod verified_organization_domain_sso_detail_response_model; pub use self::verified_organization_domain_sso_detail_response_model::VerifiedOrganizationDomainSsoDetailResponseModel; pub mod verified_organization_domain_sso_details_response_model; pub use self::verified_organization_domain_sso_details_response_model::VerifiedOrganizationDomainSsoDetailsResponseModel; -pub mod verify_bank_account_request; -pub use self::verify_bank_account_request::VerifyBankAccountRequest; pub mod verify_bank_account_request_body; pub use self::verify_bank_account_request_body::VerifyBankAccountRequestBody; pub mod verify_delete_recover_request_model; diff --git a/crates/bitwarden-api-api/src/models/organization_report_summary_model.rs b/crates/bitwarden-api-api/src/models/organization_report_summary_model.rs deleted file mode 100644 index d1ba4c707..000000000 --- a/crates/bitwarden-api-api/src/models/organization_report_summary_model.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Bitwarden Internal API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: latest - * - * Generated by: https://openapi-generator.tech - */ - -use serde::{Deserialize, Serialize}; - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OrganizationReportSummaryModel { - #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] - pub organization_id: Option, - #[serde(rename = "encryptedData")] - pub encrypted_data: Option, - #[serde(rename = "encryptionKey")] - pub encryption_key: Option, - #[serde(rename = "date", skip_serializing_if = "Option::is_none")] - pub date: Option, -} - -impl OrganizationReportSummaryModel { - pub fn new( - encrypted_data: Option, - encryption_key: Option, - ) -> OrganizationReportSummaryModel { - OrganizationReportSummaryModel { - organization_id: None, - encrypted_data, - encryption_key, - date: None, - } - } -} diff --git a/crates/bitwarden-api-api/src/models/policy_type.rs b/crates/bitwarden-api-api/src/models/policy_type.rs index 8439402a2..8b8b548f9 100644 --- a/crates/bitwarden-api-api/src/models/policy_type.rs +++ b/crates/bitwarden-api-api/src/models/policy_type.rs @@ -34,6 +34,7 @@ pub enum PolicyType { FreeFamiliesSponsorshipPolicy = 13, RemoveUnlockWithPin = 14, RestrictedItemTypesPolicy = 15, + UriMatchDefaults = 16, } impl std::fmt::Display for PolicyType { @@ -58,6 +59,7 @@ impl std::fmt::Display for PolicyType { Self::FreeFamiliesSponsorshipPolicy => "13", Self::RemoveUnlockWithPin => "14", Self::RestrictedItemTypesPolicy => "15", + Self::UriMatchDefaults => "16", } ) } diff --git a/crates/bitwarden-api-api/src/models/premium_cloud_hosted_subscription_request.rs b/crates/bitwarden-api-api/src/models/premium_cloud_hosted_subscription_request.rs new file mode 100644 index 000000000..0d2b64e5d --- /dev/null +++ b/crates/bitwarden-api-api/src/models/premium_cloud_hosted_subscription_request.rs @@ -0,0 +1,39 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PremiumCloudHostedSubscriptionRequest { + #[serde(rename = "tokenizedPaymentMethod")] + pub tokenized_payment_method: Box, + #[serde(rename = "billingAddress")] + pub billing_address: Box, + #[serde( + rename = "additionalStorageGb", + skip_serializing_if = "Option::is_none" + )] + pub additional_storage_gb: Option, +} + +impl PremiumCloudHostedSubscriptionRequest { + pub fn new( + tokenized_payment_method: models::MinimalTokenizedPaymentMethodRequest, + billing_address: models::MinimalBillingAddressRequest, + ) -> PremiumCloudHostedSubscriptionRequest { + PremiumCloudHostedSubscriptionRequest { + tokenized_payment_method: Box::new(tokenized_payment_method), + billing_address: Box::new(billing_address), + additional_storage_gb: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/profile_organization_response_model.rs b/crates/bitwarden-api-api/src/models/profile_organization_response_model.rs index a67a9acd8..fbc4bf089 100644 --- a/crates/bitwarden-api-api/src/models/profile_organization_response_model.rs +++ b/crates/bitwarden-api-api/src/models/profile_organization_response_model.rs @@ -184,6 +184,13 @@ pub struct ProfileOrganizationResponseModel { pub use_admin_sponsored_families: Option, #[serde(rename = "isAdminInitiated", skip_serializing_if = "Option::is_none")] pub is_admin_initiated: Option, + #[serde(rename = "ssoEnabled", skip_serializing_if = "Option::is_none")] + pub sso_enabled: Option, + #[serde( + rename = "ssoMemberDecryptionType", + skip_serializing_if = "Option::is_none" + )] + pub sso_member_decryption_type: Option, } impl ProfileOrganizationResponseModel { @@ -245,6 +252,8 @@ impl ProfileOrganizationResponseModel { use_organization_domains: None, use_admin_sponsored_families: None, is_admin_initiated: None, + sso_enabled: None, + sso_member_decryption_type: None, } } } diff --git a/crates/bitwarden-api-api/src/models/profile_provider_organization_response_model.rs b/crates/bitwarden-api-api/src/models/profile_provider_organization_response_model.rs index 29e8ef8b6..9ea8f0fc1 100644 --- a/crates/bitwarden-api-api/src/models/profile_provider_organization_response_model.rs +++ b/crates/bitwarden-api-api/src/models/profile_provider_organization_response_model.rs @@ -184,6 +184,13 @@ pub struct ProfileProviderOrganizationResponseModel { pub use_admin_sponsored_families: Option, #[serde(rename = "isAdminInitiated", skip_serializing_if = "Option::is_none")] pub is_admin_initiated: Option, + #[serde(rename = "ssoEnabled", skip_serializing_if = "Option::is_none")] + pub sso_enabled: Option, + #[serde( + rename = "ssoMemberDecryptionType", + skip_serializing_if = "Option::is_none" + )] + pub sso_member_decryption_type: Option, } impl ProfileProviderOrganizationResponseModel { @@ -245,6 +252,8 @@ impl ProfileProviderOrganizationResponseModel { use_organization_domains: None, use_admin_sponsored_families: None, is_admin_initiated: None, + sso_enabled: None, + sso_member_decryption_type: None, } } } diff --git a/crates/bitwarden-api-api/src/models/push_type.rs b/crates/bitwarden-api-api/src/models/push_type.rs index f5366319b..4ab407590 100644 --- a/crates/bitwarden-api-api/src/models/push_type.rs +++ b/crates/bitwarden-api-api/src/models/push_type.rs @@ -12,7 +12,7 @@ use serde::{Deserialize, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; use crate::models; -/// +/// PushType : #[repr(i64)] #[derive( Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, @@ -41,6 +41,8 @@ pub enum PushType { Notification = 20, NotificationStatus = 21, RefreshSecurityTasks = 22, + OrganizationBankAccountVerified = 23, + ProviderBankAccountVerified = 24, } impl std::fmt::Display for PushType { @@ -72,6 +74,8 @@ impl std::fmt::Display for PushType { Self::Notification => "20", Self::NotificationStatus => "21", Self::RefreshSecurityTasks => "22", + Self::OrganizationBankAccountVerified => "23", + Self::ProviderBankAccountVerified => "24", } ) } diff --git a/crates/bitwarden-api-api/src/models/save_policy_request.rs b/crates/bitwarden-api-api/src/models/save_policy_request.rs new file mode 100644 index 000000000..32975c0db --- /dev/null +++ b/crates/bitwarden-api-api/src/models/save_policy_request.rs @@ -0,0 +1,30 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SavePolicyRequest { + #[serde(rename = "policy")] + pub policy: Box, + #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, +} + +impl SavePolicyRequest { + pub fn new(policy: models::PolicyRequestModel) -> SavePolicyRequest { + SavePolicyRequest { + policy: Box::new(policy), + metadata: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/security_task_metrics_response_model.rs b/crates/bitwarden-api-api/src/models/security_task_metrics_response_model.rs new file mode 100644 index 000000000..1081cc485 --- /dev/null +++ b/crates/bitwarden-api-api/src/models/security_task_metrics_response_model.rs @@ -0,0 +1,32 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityTaskMetricsResponseModel { + /// Number of tasks that have been completed in the organization. + #[serde(rename = "completedTasks", skip_serializing_if = "Option::is_none")] + pub completed_tasks: Option, + /// Total number of tasks in the organization, regardless of their status. + #[serde(rename = "totalTasks", skip_serializing_if = "Option::is_none")] + pub total_tasks: Option, +} + +impl SecurityTaskMetricsResponseModel { + pub fn new() -> SecurityTaskMetricsResponseModel { + SecurityTaskMetricsResponseModel { + completed_tasks: None, + total_tasks: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/two_factor_recovery_request_model.rs b/crates/bitwarden-api-api/src/models/two_factor_recovery_request_model.rs deleted file mode 100644 index f8c13fe1f..000000000 --- a/crates/bitwarden-api-api/src/models/two_factor_recovery_request_model.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Bitwarden Internal API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: latest - * - * Generated by: https://openapi-generator.tech - */ - -use serde::{Deserialize, Serialize}; - -use crate::models; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct TwoFactorRecoveryRequestModel { - #[serde(rename = "masterPasswordHash", skip_serializing_if = "Option::is_none")] - pub master_password_hash: Option, - #[serde(rename = "otp", skip_serializing_if = "Option::is_none")] - pub otp: Option, - #[serde( - rename = "authRequestAccessCode", - skip_serializing_if = "Option::is_none" - )] - pub auth_request_access_code: Option, - #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] - pub secret: Option, - #[serde(rename = "email")] - pub email: String, - #[serde(rename = "authRequestId", skip_serializing_if = "Option::is_none")] - pub auth_request_id: Option, - #[serde( - rename = "ssoEmail2FaSessionToken", - skip_serializing_if = "Option::is_none" - )] - pub sso_email2_fa_session_token: Option, - #[serde(rename = "recoveryCode")] - pub recovery_code: String, -} - -impl TwoFactorRecoveryRequestModel { - pub fn new(email: String, recovery_code: String) -> TwoFactorRecoveryRequestModel { - TwoFactorRecoveryRequestModel { - master_password_hash: None, - otp: None, - auth_request_access_code: None, - secret: None, - email, - auth_request_id: None, - sso_email2_fa_session_token: None, - recovery_code, - } - } -} diff --git a/crates/bitwarden-api-api/src/models/update_collection_request_model.rs b/crates/bitwarden-api-api/src/models/update_collection_request_model.rs new file mode 100644 index 000000000..06bb2bafa --- /dev/null +++ b/crates/bitwarden-api-api/src/models/update_collection_request_model.rs @@ -0,0 +1,36 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateCollectionRequestModel { + #[serde(rename = "externalId", skip_serializing_if = "Option::is_none")] + pub external_id: Option, + #[serde(rename = "groups", skip_serializing_if = "Option::is_none")] + pub groups: Option>, + #[serde(rename = "users", skip_serializing_if = "Option::is_none")] + pub users: Option>, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl UpdateCollectionRequestModel { + pub fn new() -> UpdateCollectionRequestModel { + UpdateCollectionRequestModel { + external_id: None, + groups: None, + users: None, + name: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/update_organization_report_application_data_request.rs b/crates/bitwarden-api-api/src/models/update_organization_report_application_data_request.rs new file mode 100644 index 000000000..5c2a3a8d8 --- /dev/null +++ b/crates/bitwarden-api-api/src/models/update_organization_report_application_data_request.rs @@ -0,0 +1,33 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateOrganizationReportApplicationDataRequest { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] + pub organization_id: Option, + #[serde(rename = "applicationData", skip_serializing_if = "Option::is_none")] + pub application_data: Option, +} + +impl UpdateOrganizationReportApplicationDataRequest { + pub fn new() -> UpdateOrganizationReportApplicationDataRequest { + UpdateOrganizationReportApplicationDataRequest { + id: None, + organization_id: None, + application_data: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/drop_organization_report_request.rs b/crates/bitwarden-api-api/src/models/update_organization_report_data_request.rs similarity index 53% rename from crates/bitwarden-api-api/src/models/drop_organization_report_request.rs rename to crates/bitwarden-api-api/src/models/update_organization_report_data_request.rs index 4b02a897d..7421eb66a 100644 --- a/crates/bitwarden-api-api/src/models/drop_organization_report_request.rs +++ b/crates/bitwarden-api-api/src/models/update_organization_report_data_request.rs @@ -13,21 +13,21 @@ use serde::{Deserialize, Serialize}; use crate::models; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct DropOrganizationReportRequest { +pub struct UpdateOrganizationReportDataRequest { #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] pub organization_id: Option, - #[serde( - rename = "organizationReportIds", - skip_serializing_if = "Option::is_none" - )] - pub organization_report_ids: Option>, + #[serde(rename = "reportId", skip_serializing_if = "Option::is_none")] + pub report_id: Option, + #[serde(rename = "reportData", skip_serializing_if = "Option::is_none")] + pub report_data: Option, } -impl DropOrganizationReportRequest { - pub fn new() -> DropOrganizationReportRequest { - DropOrganizationReportRequest { +impl UpdateOrganizationReportDataRequest { + pub fn new() -> UpdateOrganizationReportDataRequest { + UpdateOrganizationReportDataRequest { organization_id: None, - organization_report_ids: None, + report_id: None, + report_data: None, } } } diff --git a/crates/bitwarden-api-api/src/models/organization_report.rs b/crates/bitwarden-api-api/src/models/update_organization_report_request.rs similarity index 58% rename from crates/bitwarden-api-api/src/models/organization_report.rs rename to crates/bitwarden-api-api/src/models/update_organization_report_request.rs index 0eecea5a3..122e48bb9 100644 --- a/crates/bitwarden-api-api/src/models/organization_report.rs +++ b/crates/bitwarden-api-api/src/models/update_organization_report_request.rs @@ -13,33 +13,33 @@ use serde::{Deserialize, Serialize}; use crate::models; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OrganizationReport { - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, +pub struct UpdateOrganizationReportRequest { + #[serde(rename = "reportId", skip_serializing_if = "Option::is_none")] + pub report_id: Option, #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] pub organization_id: Option, - #[serde(rename = "date", skip_serializing_if = "Option::is_none")] - pub date: Option, #[serde(rename = "reportData", skip_serializing_if = "Option::is_none")] pub report_data: Option, - #[serde(rename = "creationDate", skip_serializing_if = "Option::is_none")] - pub creation_date: Option, #[serde( rename = "contentEncryptionKey", skip_serializing_if = "Option::is_none" )] pub content_encryption_key: Option, + #[serde(rename = "summaryData", skip_serializing_if = "Option::is_none")] + pub summary_data: Option, + #[serde(rename = "applicationData", skip_serializing_if = "Option::is_none")] + pub application_data: Option, } -impl OrganizationReport { - pub fn new() -> OrganizationReport { - OrganizationReport { - id: None, +impl UpdateOrganizationReportRequest { + pub fn new() -> UpdateOrganizationReportRequest { + UpdateOrganizationReportRequest { + report_id: None, organization_id: None, - date: None, report_data: None, - creation_date: None, content_encryption_key: None, + summary_data: None, + application_data: None, } } } diff --git a/crates/bitwarden-api-api/src/models/update_organization_report_summary_request.rs b/crates/bitwarden-api-api/src/models/update_organization_report_summary_request.rs new file mode 100644 index 000000000..ab621c5bd --- /dev/null +++ b/crates/bitwarden-api-api/src/models/update_organization_report_summary_request.rs @@ -0,0 +1,33 @@ +/* + * Bitwarden Internal API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: latest + * + * Generated by: https://openapi-generator.tech + */ + +use serde::{Deserialize, Serialize}; + +use crate::models; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateOrganizationReportSummaryRequest { + #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] + pub organization_id: Option, + #[serde(rename = "reportId", skip_serializing_if = "Option::is_none")] + pub report_id: Option, + #[serde(rename = "summaryData", skip_serializing_if = "Option::is_none")] + pub summary_data: Option, +} + +impl UpdateOrganizationReportSummaryRequest { + pub fn new() -> UpdateOrganizationReportSummaryRequest { + UpdateOrganizationReportSummaryRequest { + organization_id: None, + report_id: None, + summary_data: None, + } + } +} diff --git a/crates/bitwarden-api-identity/.openapi-generator/FILES b/crates/bitwarden-api-identity/.openapi-generator/FILES index 75bb5f304..ec6263894 100644 --- a/crates/bitwarden-api-identity/.openapi-generator/FILES +++ b/crates/bitwarden-api-identity/.openapi-generator/FILES @@ -1,5 +1,3 @@ -.gitignore -Cargo.toml README.md src/apis/accounts_api.rs src/apis/configuration.rs diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index 838deefae..a4ed0ff5a 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -25,23 +25,23 @@ bitwarden-api-identity = { path = "./bitwarden-api-identity" } ## Documentation for API Endpoints -All URIs are relative to _http://localhost_ +All URIs are relative to *https://identity.bitwarden.com* -| Class | Method | HTTP request | Description | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | ----------- | -| _AccountsApi_ | [**accounts_prelogin_post**](docs/AccountsApi.md#accounts_prelogin_post) | **POST** /accounts/prelogin | -| _AccountsApi_ | [**accounts_register_finish_post**](docs/AccountsApi.md#accounts_register_finish_post) | **POST** /accounts/register/finish | -| _AccountsApi_ | [**accounts_register_send_verification_email_post**](docs/AccountsApi.md#accounts_register_send_verification_email_post) | **POST** /accounts/register/send-verification-email | -| _AccountsApi_ | [**accounts_register_verification_email_clicked_post**](docs/AccountsApi.md#accounts_register_verification_email_clicked_post) | **POST** /accounts/register/verification-email-clicked | -| _AccountsApi_ | [**accounts_trial_send_verification_email_post**](docs/AccountsApi.md#accounts_trial_send_verification_email_post) | **POST** /accounts/trial/send-verification-email | -| _AccountsApi_ | [**accounts_webauthn_assertion_options_get**](docs/AccountsApi.md#accounts_webauthn_assertion_options_get) | **GET** /accounts/webauthn/assertion-options | -| _InfoApi_ | [**alive_get**](docs/InfoApi.md#alive_get) | **GET** /alive | -| _InfoApi_ | [**now_get**](docs/InfoApi.md#now_get) | **GET** /now | -| _InfoApi_ | [**version_get**](docs/InfoApi.md#version_get) | **GET** /version | -| _SsoApi_ | [**sso_external_callback_get**](docs/SsoApi.md#sso_external_callback_get) | **GET** /sso/ExternalCallback | -| _SsoApi_ | [**sso_external_challenge_get**](docs/SsoApi.md#sso_external_challenge_get) | **GET** /sso/ExternalChallenge | -| _SsoApi_ | [**sso_login_get**](docs/SsoApi.md#sso_login_get) | **GET** /sso/Login | -| _SsoApi_ | [**sso_pre_validate_get**](docs/SsoApi.md#sso_pre_validate_get) | **GET** /sso/PreValidate | +| Class | Method | HTTP request | Description | +| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ----------- | +| _AccountsApi_ | [**accounts_get_web_authn_login_assertion_options**](docs/AccountsApi.md#accounts_get_web_authn_login_assertion_options) | **GET** /accounts/webauthn/assertion-options | +| _AccountsApi_ | [**accounts_post_prelogin**](docs/AccountsApi.md#accounts_post_prelogin) | **POST** /accounts/prelogin | +| _AccountsApi_ | [**accounts_post_register_finish**](docs/AccountsApi.md#accounts_post_register_finish) | **POST** /accounts/register/finish | +| _AccountsApi_ | [**accounts_post_register_send_verification_email**](docs/AccountsApi.md#accounts_post_register_send_verification_email) | **POST** /accounts/register/send-verification-email | +| _AccountsApi_ | [**accounts_post_register_verification_email_clicked**](docs/AccountsApi.md#accounts_post_register_verification_email_clicked) | **POST** /accounts/register/verification-email-clicked | +| _AccountsApi_ | [**accounts_post_trial_initiation_send_verification_email**](docs/AccountsApi.md#accounts_post_trial_initiation_send_verification_email) | **POST** /accounts/trial/send-verification-email | +| _InfoApi_ | [**info_get_alive**](docs/InfoApi.md#info_get_alive) | **GET** /alive | +| _InfoApi_ | [**info_get_now**](docs/InfoApi.md#info_get_now) | **GET** /now | +| _InfoApi_ | [**info_get_version**](docs/InfoApi.md#info_get_version) | **GET** /version | +| _SsoApi_ | [**sso_external_callback**](docs/SsoApi.md#sso_external_callback) | **GET** /sso/ExternalCallback | +| _SsoApi_ | [**sso_external_challenge**](docs/SsoApi.md#sso_external_challenge) | **GET** /sso/ExternalChallenge | +| _SsoApi_ | [**sso_login**](docs/SsoApi.md#sso_login) | **GET** /sso/Login | +| _SsoApi_ | [**sso_pre_validate**](docs/SsoApi.md#sso_pre_validate) | **GET** /sso/PreValidate | ## Documentation For Models diff --git a/crates/bitwarden-api-identity/src/apis/accounts_api.rs b/crates/bitwarden-api-identity/src/apis/accounts_api.rs index 3618c3d58..eee3e1434 100644 --- a/crates/bitwarden-api-identity/src/apis/accounts_api.rs +++ b/crates/bitwarden-api-identity/src/apis/accounts_api.rs @@ -14,52 +14,98 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`accounts_prelogin_post`] +/// struct for typed errors of method [`accounts_get_web_authn_login_assertion_options`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsPreloginPostError { +pub enum AccountsGetWebAuthnLoginAssertionOptionsError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_register_finish_post`] +/// struct for typed errors of method [`accounts_post_prelogin`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRegisterFinishPostError { +pub enum AccountsPostPreloginError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_register_send_verification_email_post`] +/// struct for typed errors of method [`accounts_post_register_finish`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRegisterSendVerificationEmailPostError { +pub enum AccountsPostRegisterFinishError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_register_verification_email_clicked_post`] +/// struct for typed errors of method [`accounts_post_register_send_verification_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsRegisterVerificationEmailClickedPostError { +pub enum AccountsPostRegisterSendVerificationEmailError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_trial_send_verification_email_post`] +/// struct for typed errors of method [`accounts_post_register_verification_email_clicked`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsTrialSendVerificationEmailPostError { +pub enum AccountsPostRegisterVerificationEmailClickedError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_webauthn_assertion_options_get`] +/// struct for typed errors of method [`accounts_post_trial_initiation_send_verification_email`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsWebauthnAssertionOptionsGetError { +pub enum AccountsPostTrialInitiationSendVerificationEmailError { UnknownValue(serde_json::Value), } -pub async fn accounts_prelogin_post( +pub async fn accounts_get_web_authn_login_assertion_options( + configuration: &configuration::Configuration, +) -> Result< + models::WebAuthnLoginAssertionOptionsResponseModel, + Error, +> { + let uri_str = format!( + "{}/accounts/webauthn/assertion-options", + configuration.base_path + ); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WebAuthnLoginAssertionOptionsResponseModel`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WebAuthnLoginAssertionOptionsResponseModel`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) + } +} + +pub async fn accounts_post_prelogin( configuration: &configuration::Configuration, prelogin_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_prelogin_request_model = prelogin_request_model; @@ -93,7 +139,7 @@ pub async fn accounts_prelogin_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -102,10 +148,10 @@ pub async fn accounts_prelogin_post( } } -pub async fn accounts_register_finish_post( +pub async fn accounts_post_register_finish( configuration: &configuration::Configuration, register_finish_request_model: Option, -) -> Result> { +) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_register_finish_request_model = register_finish_request_model; @@ -139,7 +185,7 @@ pub async fn accounts_register_finish_post( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -148,12 +194,12 @@ pub async fn accounts_register_finish_post( } } -pub async fn accounts_register_send_verification_email_post( +pub async fn accounts_post_register_send_verification_email( configuration: &configuration::Configuration, register_send_verification_email_request_model: Option< models::RegisterSendVerificationEmailRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_register_send_verification_email_request_model = register_send_verification_email_request_model; @@ -180,7 +226,7 @@ pub async fn accounts_register_send_verification_email_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -190,12 +236,12 @@ pub async fn accounts_register_send_verification_email_post( } } -pub async fn accounts_register_verification_email_clicked_post( +pub async fn accounts_post_register_verification_email_clicked( configuration: &configuration::Configuration, register_verification_email_clicked_request_model: Option< models::RegisterVerificationEmailClickedRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_register_verification_email_clicked_request_model = register_verification_email_clicked_request_model; @@ -222,7 +268,7 @@ pub async fn accounts_register_verification_email_clicked_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, @@ -232,12 +278,12 @@ pub async fn accounts_register_verification_email_clicked_post( } } -pub async fn accounts_trial_send_verification_email_post( +pub async fn accounts_post_trial_initiation_send_verification_email( configuration: &configuration::Configuration, trial_send_verification_email_request_model: Option< models::TrialSendVerificationEmailRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_trial_send_verification_email_request_model = trial_send_verification_email_request_model; @@ -263,53 +309,7 @@ pub async fn accounts_trial_send_verification_email_post( Ok(()) } else { let content = resp.text().await?; - let entity: Option = - serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { - status, - content, - entity, - })) - } -} - -pub async fn accounts_webauthn_assertion_options_get( - configuration: &configuration::Configuration, -) -> Result< - models::WebAuthnLoginAssertionOptionsResponseModel, - Error, -> { - let uri_str = format!( - "{}/accounts/webauthn/assertion-options", - configuration.base_path - ); - let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - - let req = req_builder.build()?; - let resp = configuration.client.execute(req).await?; - - let status = resp.status(); - let content_type = resp - .headers() - .get("content-type") - .and_then(|v| v.to_str().ok()) - .unwrap_or("application/octet-stream"); - let content_type = super::ContentType::from(content_type); - - if !status.is_client_error() && !status.is_server_error() { - let content = resp.text().await?; - match content_type { - ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::WebAuthnLoginAssertionOptionsResponseModel`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::WebAuthnLoginAssertionOptionsResponseModel`")))), - } - } else { - let content = resp.text().await?; - let entity: Option = + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, diff --git a/crates/bitwarden-api-identity/src/apis/configuration.rs b/crates/bitwarden-api-identity/src/apis/configuration.rs index 96c5cca2a..e8270e9fc 100644 --- a/crates/bitwarden-api-identity/src/apis/configuration.rs +++ b/crates/bitwarden-api-identity/src/apis/configuration.rs @@ -36,7 +36,7 @@ impl Configuration { impl Default for Configuration { fn default() -> Self { Configuration { - base_path: "http://localhost".to_owned(), + base_path: "https://identity.bitwarden.com".to_owned(), user_agent: Some("OpenAPI-Generator/v1/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, diff --git a/crates/bitwarden-api-identity/src/apis/info_api.rs b/crates/bitwarden-api-identity/src/apis/info_api.rs index 503c7145a..d33a5bd9a 100644 --- a/crates/bitwarden-api-identity/src/apis/info_api.rs +++ b/crates/bitwarden-api-identity/src/apis/info_api.rs @@ -14,30 +14,30 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`alive_get`] +/// struct for typed errors of method [`info_get_alive`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AliveGetError { +pub enum InfoGetAliveError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`now_get`] +/// struct for typed errors of method [`info_get_now`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum NowGetError { +pub enum InfoGetNowError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`version_get`] +/// struct for typed errors of method [`info_get_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum VersionGetError { +pub enum InfoGetVersionError { UnknownValue(serde_json::Value), } -pub async fn alive_get( +pub async fn info_get_alive( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/alive", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -65,7 +65,7 @@ pub async fn alive_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -74,9 +74,9 @@ pub async fn alive_get( } } -pub async fn now_get( +pub async fn info_get_now( configuration: &configuration::Configuration, -) -> Result> { +) -> Result> { let uri_str = format!("{}/now", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -104,7 +104,7 @@ pub async fn now_get( } } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -113,9 +113,9 @@ pub async fn now_get( } } -pub async fn version_get( +pub async fn info_get_version( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!("{}/version", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -132,7 +132,7 @@ pub async fn version_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-api-identity/src/apis/sso_api.rs b/crates/bitwarden-api-identity/src/apis/sso_api.rs index 31030869b..232f1c91e 100644 --- a/crates/bitwarden-api-identity/src/apis/sso_api.rs +++ b/crates/bitwarden-api-identity/src/apis/sso_api.rs @@ -14,37 +14,37 @@ use serde::{de::Error as _, Deserialize, Serialize}; use super::{configuration, ContentType, Error}; use crate::{apis::ResponseContent, models}; -/// struct for typed errors of method [`sso_external_callback_get`] +/// struct for typed errors of method [`sso_external_callback`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SsoExternalCallbackGetError { +pub enum SsoExternalCallbackError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sso_external_challenge_get`] +/// struct for typed errors of method [`sso_external_challenge`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SsoExternalChallengeGetError { +pub enum SsoExternalChallengeError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sso_login_get`] +/// struct for typed errors of method [`sso_login`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SsoLoginGetError { +pub enum SsoLoginError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`sso_pre_validate_get`] +/// struct for typed errors of method [`sso_pre_validate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum SsoPreValidateGetError { +pub enum SsoPreValidateError { UnknownValue(serde_json::Value), } -pub async fn sso_external_callback_get( +pub async fn sso_external_callback( configuration: &configuration::Configuration, -) -> Result<(), Error> { +) -> Result<(), Error> { let uri_str = format!("{}/sso/ExternalCallback", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -61,7 +61,7 @@ pub async fn sso_external_callback_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -70,13 +70,13 @@ pub async fn sso_external_callback_get( } } -pub async fn sso_external_challenge_get( +pub async fn sso_external_challenge( configuration: &configuration::Configuration, domain_hint: Option<&str>, return_url: Option<&str>, user_identifier: Option<&str>, sso_token: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_domain_hint = domain_hint; let p_return_url = return_url; @@ -111,7 +111,7 @@ pub async fn sso_external_challenge_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -120,10 +120,10 @@ pub async fn sso_external_challenge_get( } } -pub async fn sso_login_get( +pub async fn sso_login( configuration: &configuration::Configuration, return_url: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_return_url = return_url; @@ -146,7 +146,7 @@ pub async fn sso_login_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, @@ -155,10 +155,10 @@ pub async fn sso_login_get( } } -pub async fn sso_pre_validate_get( +pub async fn sso_pre_validate( configuration: &configuration::Configuration, domain_hint: Option<&str>, -) -> Result<(), Error> { +) -> Result<(), Error> { // add a prefix to parameters to efficiently prevent name collisions let p_domain_hint = domain_hint; @@ -181,7 +181,7 @@ pub async fn sso_pre_validate_get( Ok(()) } else { let content = resp.text().await?; - let entity: Option = serde_json::from_str(&content).ok(); + let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, diff --git a/crates/bitwarden-core/src/admin_console/policy.rs b/crates/bitwarden-core/src/admin_console/policy.rs index 0b2ad4169..718ed14af 100644 --- a/crates/bitwarden-core/src/admin_console/policy.rs +++ b/crates/bitwarden-core/src/admin_console/policy.rs @@ -48,6 +48,7 @@ pub enum PolicyType { FreeFamiliesSponsorshipPolicy = 13, RemoveUnlockWithPin = 14, RestrictedItemTypesPolicy = 15, + UriMatchDefaults = 16, } impl TryFrom for Policy { @@ -101,6 +102,7 @@ impl From for PolicyType { bitwarden_api_api::models::PolicyType::RestrictedItemTypesPolicy => { PolicyType::RestrictedItemTypesPolicy } + bitwarden_api_api::models::PolicyType::UriMatchDefaults => PolicyType::UriMatchDefaults, } } } diff --git a/crates/bitwarden-core/src/auth/login/auth_request.rs b/crates/bitwarden-core/src/auth/login/auth_request.rs index 076d09193..2a73cd663 100644 --- a/crates/bitwarden-core/src/auth/login/auth_request.rs +++ b/crates/bitwarden-core/src/auth/login/auth_request.rs @@ -1,5 +1,5 @@ use bitwarden_api_api::{ - apis::auth_requests_api::{auth_requests_id_response_get, auth_requests_post}, + apis::auth_requests_api::{auth_requests_get_response, auth_requests_post}, models::{AuthRequestCreateRequestModel, AuthRequestType}, }; use bitwarden_crypto::Kdf; @@ -64,7 +64,7 @@ pub(crate) async fn complete_auth_request( ) -> Result<(), LoginError> { let config = client.internal.get_api_configurations().await; - let res = auth_requests_id_response_get( + let res = auth_requests_get_response( &config.api, auth_req.auth_request_id, Some(&auth_req.access_code), diff --git a/crates/bitwarden-core/src/auth/login/prelogin.rs b/crates/bitwarden-core/src/auth/login/prelogin.rs index 5d5d58e6b..333fb3a70 100644 --- a/crates/bitwarden-core/src/auth/login/prelogin.rs +++ b/crates/bitwarden-core/src/auth/login/prelogin.rs @@ -1,5 +1,5 @@ use bitwarden_api_identity::{ - apis::accounts_api::accounts_prelogin_post, + apis::accounts_api::accounts_post_prelogin, models::{PreloginRequestModel, PreloginResponseModel}, }; use bitwarden_crypto::Kdf; @@ -19,7 +19,7 @@ pub enum PreloginError { pub(crate) async fn prelogin(client: &Client, email: String) -> Result { let request_model = PreloginRequestModel::new(email); let config = client.internal.get_api_configurations().await; - let result = accounts_prelogin_post(&config.identity, Some(request_model)) + let result = accounts_post_prelogin(&config.identity, Some(request_model)) .await .map_err(ApiError::from)?; diff --git a/crates/bitwarden-core/src/auth/login/two_factor.rs b/crates/bitwarden-core/src/auth/login/two_factor.rs index bed034388..4e650df44 100644 --- a/crates/bitwarden-core/src/auth/login/two_factor.rs +++ b/crates/bitwarden-core/src/auth/login/two_factor.rs @@ -46,7 +46,7 @@ pub(crate) async fn send_two_factor_email( )?; let config = client.internal.get_api_configurations().await; - bitwarden_api_api::apis::two_factor_api::two_factor_send_email_login_post( + bitwarden_api_api::apis::two_factor_api::two_factor_send_email_login( &config.api, Some(TwoFactorEmailRequestModel { master_password_hash: Some(password_hash.to_string()), diff --git a/crates/bitwarden-core/src/platform/get_user_api_key.rs b/crates/bitwarden-core/src/platform/get_user_api_key.rs index 962e9847f..ca05f5efe 100644 --- a/crates/bitwarden-core/src/platform/get_user_api_key.rs +++ b/crates/bitwarden-core/src/platform/get_user_api_key.rs @@ -15,7 +15,7 @@ use std::sync::Arc; use bitwarden_api_api::{ - apis::accounts_api::accounts_api_key_post, + apis::accounts_api::accounts_api_key, models::{ApiKeyResponseModel, SecretVerificationRequestModel}, }; use bitwarden_crypto::{CryptoError, HashPurpose, MasterKey}; @@ -56,7 +56,7 @@ pub(crate) async fn get_user_api_key( let config = client.internal.get_api_configurations().await; let request = build_secret_verification_request(&auth_settings, input)?; - let response = accounts_api_key_post(&config.api, Some(request)) + let response = accounts_api_key(&config.api, Some(request)) .await .map_err(ApiError::from)?; UserApiKeyResponse::process_response(response) diff --git a/crates/bitwarden-vault/src/folder/edit.rs b/crates/bitwarden-vault/src/folder/edit.rs index 361b273fb..65727a741 100644 --- a/crates/bitwarden-vault/src/folder/edit.rs +++ b/crates/bitwarden-vault/src/folder/edit.rs @@ -44,7 +44,7 @@ pub(super) async fn edit_folder + ?Sized>( let folder_request = key_store.encrypt(request)?; - let resp = folders_api::folders_id_put(api_config, folder_id, Some(folder_request)) + let resp = folders_api::folders_put(api_config, folder_id, Some(folder_request)) .await .map_err(ApiError::from)?;