From 032363c35554cdfcba6eca80036ed60c3fba11fd Mon Sep 17 00:00:00 2001 From: Thomas Avery Date: Wed, 15 May 2024 09:44:45 -0500 Subject: [PATCH] generate api bindings off of main --- .../.openapi-generator/FILES | 23 +- crates/bitwarden-api-api/README.md | 46 ++-- .../src/apis/access_policies_api.rs | 196 +++++------------ .../src/apis/accounts_api.rs | 64 +----- .../bitwarden-api-api/src/apis/ciphers_api.rs | 111 +++++++++- .../bitwarden-api-api/src/apis/groups_api.rs | 65 +----- crates/bitwarden-api-api/src/apis/mod.rs | 3 + .../src/apis/organization_billing_api.rs | 65 ++++++ .../src/apis/organization_users_api.rs | 126 +---------- .../src/apis/organizations_api.rs | 63 +----- .../src/apis/provider_billing_api.rs | 65 ++++++ .../src/apis/provider_clients_api.rs | 126 +++++++++++ .../src/apis/providers_api.rs | 158 +++++++++++++ crates/bitwarden-api-api/src/apis/push_api.rs | 21 +- .../models/access_policies_create_request.rs | 38 ---- .../base_access_policy_response_model.rs | 38 ---- .../src/models/billing_subscription.rs | 15 ++ ...r_bulk_update_collections_request_model.rs | 33 +++ ...ollection_access_details_response_model.rs | 9 + .../collection_details_response_model.rs | 5 + ...create_client_organization_request_body.rs | 47 ++++ ...expanded_tax_info_update_request_model.rs} | 8 +- .../src/models/key_pair_request_body.rs | 26 +++ crates/bitwarden-api-api/src/models/mod.rs | 40 ++-- .../organization_domain_request_model.rs | 6 +- ...zation_user_update_groups_request_model.rs | 21 -- .../bitwarden-api-api/src/models/plan_type.rs | 30 ++- .../models/profile_provider_response_model.rs | 3 + ..._accounts_access_policies_request_model.rs | 26 +++ ...ccounts_access_policies_response_model.rs} | 17 +- .../src/models/provider_response_model.rs | 3 + .../models/provider_setup_request_model.rs | 3 + .../src/models/provider_status_type.rs | 36 +++ ...er_verify_delete_recover_request_model.rs} | 14 +- .../src/models/push_device_request_model.rs | 23 ++ .../src/models/push_update_request_model.rs | 11 +- ...icies_permission_details_response_model.rs | 30 +++ ..._account_granted_policies_request_model.rs | 26 +++ ...olicy_permission_details_response_model.rs | 29 +++ ...licy_response_model_list_response_model.rs | 29 --- ...update_client_organization_request_body.rs | 26 +++ crates/bitwarden-api-identity/README.md | 4 - .../src/apis/sso_api.rs | 208 ------------------ 43 files changed, 1056 insertions(+), 880 deletions(-) create mode 100644 crates/bitwarden-api-api/src/apis/organization_billing_api.rs create mode 100644 crates/bitwarden-api-api/src/apis/provider_billing_api.rs create mode 100644 crates/bitwarden-api-api/src/apis/provider_clients_api.rs delete mode 100644 crates/bitwarden-api-api/src/models/access_policies_create_request.rs delete mode 100644 crates/bitwarden-api-api/src/models/base_access_policy_response_model.rs create mode 100644 crates/bitwarden-api-api/src/models/cipher_bulk_update_collections_request_model.rs create mode 100644 crates/bitwarden-api-api/src/models/create_client_organization_request_body.rs rename crates/bitwarden-api-api/src/models/{organization_tax_info_update_request_model.rs => expanded_tax_info_update_request_model.rs} (84%) create mode 100644 crates/bitwarden-api-api/src/models/key_pair_request_body.rs delete mode 100644 crates/bitwarden-api-api/src/models/organization_user_update_groups_request_model.rs create mode 100644 crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_request_model.rs rename crates/bitwarden-api-api/src/models/{project_access_policies_response_model.rs => project_service_accounts_access_policies_response_model.rs} (53%) create mode 100644 crates/bitwarden-api-api/src/models/provider_status_type.rs rename crates/bitwarden-api-api/src/models/{access_policy_update_request.rs => provider_verify_delete_recover_request_model.rs} (51%) create mode 100644 crates/bitwarden-api-api/src/models/push_device_request_model.rs create mode 100644 crates/bitwarden-api-api/src/models/service_account_granted_policies_permission_details_response_model.rs create mode 100644 crates/bitwarden-api-api/src/models/service_account_granted_policies_request_model.rs create mode 100644 crates/bitwarden-api-api/src/models/service_account_project_access_policy_permission_details_response_model.rs delete mode 100644 crates/bitwarden-api-api/src/models/service_account_project_access_policy_response_model_list_response_model.rs create mode 100644 crates/bitwarden-api-api/src/models/update_client_organization_request_body.rs diff --git a/crates/bitwarden-api-api/.openapi-generator/FILES b/crates/bitwarden-api-api/.openapi-generator/FILES index 27b7f5e8b..7f975643a 100644 --- a/crates/bitwarden-api-api/.openapi-generator/FILES +++ b/crates/bitwarden-api-api/.openapi-generator/FILES @@ -22,6 +22,7 @@ src/apis/licenses_api.rs src/apis/misc_api.rs src/apis/mod.rs src/apis/organization_auth_requests_api.rs +src/apis/organization_billing_api.rs src/apis/organization_connections_api.rs src/apis/organization_domain_api.rs src/apis/organization_export_api.rs @@ -31,6 +32,8 @@ src/apis/organizations_api.rs src/apis/plans_api.rs src/apis/policies_api.rs src/apis/projects_api.rs +src/apis/provider_billing_api.rs +src/apis/provider_clients_api.rs src/apis/provider_organizations_api.rs src/apis/provider_users_api.rs src/apis/providers_api.rs @@ -49,9 +52,7 @@ src/apis/two_factor_api.rs src/apis/users_api.rs src/apis/web_authn_api.rs src/lib.rs -src/models/access_policies_create_request.rs src/models/access_policy_request.rs -src/models/access_policy_update_request.rs src/models/access_token_create_request_model.rs src/models/access_token_creation_response_model.rs src/models/access_token_response_model.rs @@ -77,7 +78,6 @@ src/models/authenticator_attachment.rs src/models/authenticator_attestation_raw_response.rs src/models/authenticator_selection.rs src/models/authenticator_transport.rs -src/models/base_access_policy_response_model.rs src/models/base_secret_response_model.rs src/models/base_secret_response_model_list_response_model.rs src/models/billing_customer_discount.rs @@ -100,6 +100,7 @@ src/models/cipher_bulk_delete_request_model.rs src/models/cipher_bulk_move_request_model.rs src/models/cipher_bulk_restore_request_model.rs src/models/cipher_bulk_share_request_model.rs +src/models/cipher_bulk_update_collections_request_model.rs src/models/cipher_card_model.rs src/models/cipher_collections_request_model.rs src/models/cipher_create_request_model.rs @@ -133,6 +134,7 @@ src/models/collection_response_model.rs src/models/collection_response_model_list_response_model.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/credential_create_options.rs src/models/delete_recover_request_model.rs src/models/device_keys_request_model.rs @@ -164,6 +166,7 @@ src/models/event_response_model.rs src/models/event_response_model_list_response_model.rs src/models/event_system_user.rs src/models/event_type.rs +src/models/expanded_tax_info_update_request_model.rs src/models/fido2_user.rs src/models/field_type.rs src/models/file_upload_type.rs @@ -196,6 +199,7 @@ src/models/int32_int32_key_value_pair.rs src/models/kdf_request_model.rs src/models/kdf_type.rs src/models/key_model.rs +src/models/key_pair_request_body.rs src/models/keys_request_model.rs src/models/keys_response_model.rs src/models/license_type.rs @@ -235,7 +239,6 @@ src/models/organization_sso_request_model.rs src/models/organization_sso_response_model.rs src/models/organization_subscription_response_model.rs src/models/organization_subscription_update_request_model.rs -src/models/organization_tax_info_update_request_model.rs src/models/organization_update_request_model.rs src/models/organization_upgrade_request_model.rs src/models/organization_user_accept_init_request_model.rs @@ -255,7 +258,6 @@ src/models/organization_user_reset_password_enrollment_request_model.rs src/models/organization_user_reset_password_request_model.rs src/models/organization_user_status_type.rs src/models/organization_user_type.rs -src/models/organization_user_update_groups_request_model.rs src/models/organization_user_update_request_model.rs src/models/organization_user_user_details_response_model.rs src/models/organization_user_user_details_response_model_list_response_model.rs @@ -289,11 +291,12 @@ src/models/profile_organization_response_model_list_response_model.rs src/models/profile_provider_organization_response_model.rs src/models/profile_provider_response_model.rs src/models/profile_response_model.rs -src/models/project_access_policies_response_model.rs src/models/project_create_request_model.rs src/models/project_people_access_policies_response_model.rs src/models/project_response_model.rs src/models/project_response_model_list_response_model.rs +src/models/project_service_accounts_access_policies_request_model.rs +src/models/project_service_accounts_access_policies_response_model.rs src/models/project_update_request_model.rs src/models/protected_device_response_model.rs src/models/provider_organization_add_request_model.rs @@ -303,6 +306,7 @@ src/models/provider_organization_organization_details_response_model_list_respon src/models/provider_organization_response_model.rs src/models/provider_response_model.rs src/models/provider_setup_request_model.rs +src/models/provider_status_type.rs src/models/provider_type.rs src/models/provider_update_request_model.rs src/models/provider_user_accept_request_model.rs @@ -321,10 +325,12 @@ src/models/provider_user_type.rs src/models/provider_user_update_request_model.rs src/models/provider_user_user_details_response_model.rs src/models/provider_user_user_details_response_model_list_response_model.rs +src/models/provider_verify_delete_recover_request_model.rs src/models/pub_key_cred_param.rs src/models/public_key_credential_descriptor.rs src/models/public_key_credential_rp_entity.rs src/models/public_key_credential_type.rs +src/models/push_device_request_model.rs src/models/push_registration_request_model.rs src/models/push_send_request_model.rs src/models/push_type.rs @@ -364,9 +370,11 @@ src/models/send_type.rs src/models/send_with_id_request_model.rs src/models/server_config_response_model.rs src/models/service_account_create_request_model.rs +src/models/service_account_granted_policies_permission_details_response_model.rs +src/models/service_account_granted_policies_request_model.rs src/models/service_account_people_access_policies_response_model.rs +src/models/service_account_project_access_policy_permission_details_response_model.rs src/models/service_account_project_access_policy_response_model.rs -src/models/service_account_project_access_policy_response_model_list_response_model.rs src/models/service_account_response_model.rs src/models/service_account_secrets_details_response_model.rs src/models/service_account_secrets_details_response_model_list_response_model.rs @@ -403,6 +411,7 @@ src/models/two_factor_web_authn_request_model.rs src/models/two_factor_web_authn_response_model.rs src/models/two_factor_yubi_key_response_model.rs src/models/update_avatar_request_model.rs +src/models/update_client_organization_request_body.rs src/models/update_devices_trust_request_model.rs src/models/update_domains_request_model.rs src/models/update_key_request_model.rs diff --git a/crates/bitwarden-api-api/README.md b/crates/bitwarden-api-api/README.md index 2ff350900..a330de62e 100644 --- a/crates/bitwarden-api-api/README.md +++ b/crates/bitwarden-api-api/README.md @@ -28,24 +28,21 @@ All URIs are relative to _http://localhost_ | Class | Method | HTTP request | Description | | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| _AccessPoliciesApi_ | [**access_policies_id_delete**](docs/AccessPoliciesApi.md#access_policies_id_delete) | **DELETE** /access-policies/{id} | -| _AccessPoliciesApi_ | [**access_policies_id_put**](docs/AccessPoliciesApi.md#access_policies_id_put) | **PUT** /access-policies/{id} | | _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_get**](docs/AccessPoliciesApi.md#projects_id_access_policies_get) | **GET** /projects/{id}/access-policies | | _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_post**](docs/AccessPoliciesApi.md#projects_id_access_policies_post) | **POST** /projects/{id}/access-policies | +| _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_ | [**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_post**](docs/AccessPoliciesApi.md#service_accounts_id_granted_policies_post) | **POST** /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 | | _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_premium_post**](docs/AccountsApi.md#accounts_cancel_premium_post) | **POST** /accounts/cancel-premium | -| _AccountsApi_ | [**accounts_churn_premium_post**](docs/AccountsApi.md#accounts_churn_premium_post) | **POST** /accounts/churn-premium | +| _AccountsApi_ | [**accounts_cancel_post**](docs/AccountsApi.md#accounts_cancel_post) | **POST** /accounts/cancel | | _AccountsApi_ | [**accounts_convert_to_key_connector_post**](docs/AccountsApi.md#accounts_convert_to_key_connector_post) | **POST** /accounts/convert-to-key-connector | | _AccountsApi_ | [**accounts_delete**](docs/AccountsApi.md#accounts_delete) | **DELETE** /accounts | | _AccountsApi_ | [**accounts_delete_post**](docs/AccountsApi.md#accounts_delete_post) | **POST** /accounts/delete | @@ -97,6 +94,7 @@ All URIs are relative to _http://localhost_ | _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_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 | @@ -104,6 +102,7 @@ All URIs are relative to _http://localhost_ | _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_has_unassigned_ciphers_get**](docs/CiphersApi.md#ciphers_has_unassigned_ciphers_get) | **GET** /ciphers/has-unassigned-ciphers | Returns true if the user is an admin or owner of an organization with unassigned ciphers (i.e. ciphers that are not assigned to a collection). | | _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 | @@ -229,7 +228,6 @@ All URIs are relative to _http://localhost_ | _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_id_users_put**](docs/GroupsApi.md#organizations_org_id_groups_id_users_put) | **PUT** /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 | @@ -247,6 +245,7 @@ All URIs are relative to _http://localhost_ | _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_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_metadata_get**](docs/OrganizationBillingApi.md#organizations_organization_id_billing_metadata_get) | **GET** /organizations/{organizationId}/billing/metadata | | _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 | @@ -282,8 +281,6 @@ All URIs are relative to _http://localhost_ | _OrganizationUsersApi_ | [**organizations_org_id_users_id_delete_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_delete_post) | **POST** /organizations/{orgId}/users/{id}/delete | | _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_groups_get**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_groups_get) | **GET** /organizations/{orgId}/users/{id}/groups | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_groups_post**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_groups_post) | **POST** /organizations/{orgId}/users/{id}/groups | -| _OrganizationUsersApi_ | [**organizations_org_id_users_id_groups_put**](docs/OrganizationUsersApi.md#organizations_org_id_users_id_groups_put) | **PUT** /organizations/{orgId}/users/{id}/groups | | _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 | @@ -309,7 +306,6 @@ All URIs are relative to _http://localhost_ | _OrganizationsApi_ | [**organizations_id_billing_get**](docs/OrganizationsApi.md#organizations_id_billing_get) | **GET** /organizations/{id}/billing | | _OrganizationsApi_ | [**organizations_id_billing_status_get**](docs/OrganizationsApi.md#organizations_id_billing_status_get) | **GET** /organizations/{id}/billing-status | | _OrganizationsApi_ | [**organizations_id_cancel_post**](docs/OrganizationsApi.md#organizations_id_cancel_post) | **POST** /organizations/{id}/cancel | -| _OrganizationsApi_ | [**organizations_id_churn_post**](docs/OrganizationsApi.md#organizations_id_churn_post) | **POST** /organizations/{id}/churn | | _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 | @@ -353,6 +349,9 @@ All URIs are relative to _http://localhost_ | _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_subscription_get**](docs/ProviderBillingApi.md#providers_provider_id_billing_subscription_get) | **GET** /providers/{providerId}/billing/subscription | +| _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} | @@ -373,13 +372,16 @@ All URIs are relative to _http://localhost_ | _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_id_delete**](docs/PushApi.md#push_id_delete) | **DELETE** /push/{id} | +| _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 | | _SecretsApi_ | [**organizations_organization_id_secrets_get**](docs/SecretsApi.md#organizations_organization_id_secrets_get) | **GET** /organizations/{organizationId}/secrets | @@ -468,9 +470,7 @@ All URIs are relative to _http://localhost_ ## Documentation For Models -- [AccessPoliciesCreateRequest](docs/AccessPoliciesCreateRequest.md) - [AccessPolicyRequest](docs/AccessPolicyRequest.md) -- [AccessPolicyUpdateRequest](docs/AccessPolicyUpdateRequest.md) - [AccessTokenCreateRequestModel](docs/AccessTokenCreateRequestModel.md) - [AccessTokenCreationResponseModel](docs/AccessTokenCreationResponseModel.md) - [AccessTokenResponseModel](docs/AccessTokenResponseModel.md) @@ -496,7 +496,6 @@ All URIs are relative to _http://localhost_ - [AuthenticatorAttestationRawResponse](docs/AuthenticatorAttestationRawResponse.md) - [AuthenticatorSelection](docs/AuthenticatorSelection.md) - [AuthenticatorTransport](docs/AuthenticatorTransport.md) -- [BaseAccessPolicyResponseModel](docs/BaseAccessPolicyResponseModel.md) - [BaseSecretResponseModel](docs/BaseSecretResponseModel.md) - [BaseSecretResponseModelListResponseModel](docs/BaseSecretResponseModelListResponseModel.md) - [BillingCustomerDiscount](docs/BillingCustomerDiscount.md) @@ -519,6 +518,7 @@ All URIs are relative to _http://localhost_ - [CipherBulkMoveRequestModel](docs/CipherBulkMoveRequestModel.md) - [CipherBulkRestoreRequestModel](docs/CipherBulkRestoreRequestModel.md) - [CipherBulkShareRequestModel](docs/CipherBulkShareRequestModel.md) +- [CipherBulkUpdateCollectionsRequestModel](docs/CipherBulkUpdateCollectionsRequestModel.md) - [CipherCardModel](docs/CipherCardModel.md) - [CipherCollectionsRequestModel](docs/CipherCollectionsRequestModel.md) - [CipherCreateRequestModel](docs/CipherCreateRequestModel.md) @@ -552,6 +552,7 @@ All URIs are relative to _http://localhost_ - [CollectionResponseModelListResponseModel](docs/CollectionResponseModelListResponseModel.md) - [CollectionWithIdRequestModel](docs/CollectionWithIdRequestModel.md) - [ConfigResponseModel](docs/ConfigResponseModel.md) +- [CreateClientOrganizationRequestBody](docs/CreateClientOrganizationRequestBody.md) - [CredentialCreateOptions](docs/CredentialCreateOptions.md) - [DeleteRecoverRequestModel](docs/DeleteRecoverRequestModel.md) - [DeviceKeysRequestModel](docs/DeviceKeysRequestModel.md) @@ -583,6 +584,7 @@ All URIs are relative to _http://localhost_ - [EventResponseModelListResponseModel](docs/EventResponseModelListResponseModel.md) - [EventSystemUser](docs/EventSystemUser.md) - [EventType](docs/EventType.md) +- [ExpandedTaxInfoUpdateRequestModel](docs/ExpandedTaxInfoUpdateRequestModel.md) - [Fido2User](docs/Fido2User.md) - [FieldType](docs/FieldType.md) - [FileUploadType](docs/FileUploadType.md) @@ -615,6 +617,7 @@ All URIs are relative to _http://localhost_ - [KdfRequestModel](docs/KdfRequestModel.md) - [KdfType](docs/KdfType.md) - [KeyModel](docs/KeyModel.md) +- [KeyPairRequestBody](docs/KeyPairRequestBody.md) - [KeysRequestModel](docs/KeysRequestModel.md) - [KeysResponseModel](docs/KeysResponseModel.md) - [LicenseType](docs/LicenseType.md) @@ -653,7 +656,6 @@ All URIs are relative to _http://localhost_ - [OrganizationSsoResponseModel](docs/OrganizationSsoResponseModel.md) - [OrganizationSubscriptionResponseModel](docs/OrganizationSubscriptionResponseModel.md) - [OrganizationSubscriptionUpdateRequestModel](docs/OrganizationSubscriptionUpdateRequestModel.md) -- [OrganizationTaxInfoUpdateRequestModel](docs/OrganizationTaxInfoUpdateRequestModel.md) - [OrganizationUpdateRequestModel](docs/OrganizationUpdateRequestModel.md) - [OrganizationUpgradeRequestModel](docs/OrganizationUpgradeRequestModel.md) - [OrganizationUserAcceptInitRequestModel](docs/OrganizationUserAcceptInitRequestModel.md) @@ -673,7 +675,6 @@ All URIs are relative to _http://localhost_ - [OrganizationUserResetPasswordRequestModel](docs/OrganizationUserResetPasswordRequestModel.md) - [OrganizationUserStatusType](docs/OrganizationUserStatusType.md) - [OrganizationUserType](docs/OrganizationUserType.md) -- [OrganizationUserUpdateGroupsRequestModel](docs/OrganizationUserUpdateGroupsRequestModel.md) - [OrganizationUserUpdateRequestModel](docs/OrganizationUserUpdateRequestModel.md) - [OrganizationUserUserDetailsResponseModel](docs/OrganizationUserUserDetailsResponseModel.md) - [OrganizationUserUserDetailsResponseModelListResponseModel](docs/OrganizationUserUserDetailsResponseModelListResponseModel.md) @@ -707,11 +708,12 @@ All URIs are relative to _http://localhost_ - [ProfileProviderOrganizationResponseModel](docs/ProfileProviderOrganizationResponseModel.md) - [ProfileProviderResponseModel](docs/ProfileProviderResponseModel.md) - [ProfileResponseModel](docs/ProfileResponseModel.md) -- [ProjectAccessPoliciesResponseModel](docs/ProjectAccessPoliciesResponseModel.md) - [ProjectCreateRequestModel](docs/ProjectCreateRequestModel.md) - [ProjectPeopleAccessPoliciesResponseModel](docs/ProjectPeopleAccessPoliciesResponseModel.md) - [ProjectResponseModel](docs/ProjectResponseModel.md) - [ProjectResponseModelListResponseModel](docs/ProjectResponseModelListResponseModel.md) +- [ProjectServiceAccountsAccessPoliciesRequestModel](docs/ProjectServiceAccountsAccessPoliciesRequestModel.md) +- [ProjectServiceAccountsAccessPoliciesResponseModel](docs/ProjectServiceAccountsAccessPoliciesResponseModel.md) - [ProjectUpdateRequestModel](docs/ProjectUpdateRequestModel.md) - [ProtectedDeviceResponseModel](docs/ProtectedDeviceResponseModel.md) - [ProviderOrganizationAddRequestModel](docs/ProviderOrganizationAddRequestModel.md) @@ -721,6 +723,7 @@ All URIs are relative to _http://localhost_ - [ProviderOrganizationResponseModel](docs/ProviderOrganizationResponseModel.md) - [ProviderResponseModel](docs/ProviderResponseModel.md) - [ProviderSetupRequestModel](docs/ProviderSetupRequestModel.md) +- [ProviderStatusType](docs/ProviderStatusType.md) - [ProviderType](docs/ProviderType.md) - [ProviderUpdateRequestModel](docs/ProviderUpdateRequestModel.md) - [ProviderUserAcceptRequestModel](docs/ProviderUserAcceptRequestModel.md) @@ -739,10 +742,12 @@ All URIs are relative to _http://localhost_ - [ProviderUserUpdateRequestModel](docs/ProviderUserUpdateRequestModel.md) - [ProviderUserUserDetailsResponseModel](docs/ProviderUserUserDetailsResponseModel.md) - [ProviderUserUserDetailsResponseModelListResponseModel](docs/ProviderUserUserDetailsResponseModelListResponseModel.md) +- [ProviderVerifyDeleteRecoverRequestModel](docs/ProviderVerifyDeleteRecoverRequestModel.md) - [PubKeyCredParam](docs/PubKeyCredParam.md) - [PublicKeyCredentialDescriptor](docs/PublicKeyCredentialDescriptor.md) - [PublicKeyCredentialRpEntity](docs/PublicKeyCredentialRpEntity.md) - [PublicKeyCredentialType](docs/PublicKeyCredentialType.md) +- [PushDeviceRequestModel](docs/PushDeviceRequestModel.md) - [PushRegistrationRequestModel](docs/PushRegistrationRequestModel.md) - [PushSendRequestModel](docs/PushSendRequestModel.md) - [PushType](docs/PushType.md) @@ -782,9 +787,11 @@ All URIs are relative to _http://localhost_ - [SendWithIdRequestModel](docs/SendWithIdRequestModel.md) - [ServerConfigResponseModel](docs/ServerConfigResponseModel.md) - [ServiceAccountCreateRequestModel](docs/ServiceAccountCreateRequestModel.md) +- [ServiceAccountGrantedPoliciesPermissionDetailsResponseModel](docs/ServiceAccountGrantedPoliciesPermissionDetailsResponseModel.md) +- [ServiceAccountGrantedPoliciesRequestModel](docs/ServiceAccountGrantedPoliciesRequestModel.md) - [ServiceAccountPeopleAccessPoliciesResponseModel](docs/ServiceAccountPeopleAccessPoliciesResponseModel.md) +- [ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel](docs/ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel.md) - [ServiceAccountProjectAccessPolicyResponseModel](docs/ServiceAccountProjectAccessPolicyResponseModel.md) -- [ServiceAccountProjectAccessPolicyResponseModelListResponseModel](docs/ServiceAccountProjectAccessPolicyResponseModelListResponseModel.md) - [ServiceAccountResponseModel](docs/ServiceAccountResponseModel.md) - [ServiceAccountSecretsDetailsResponseModel](docs/ServiceAccountSecretsDetailsResponseModel.md) - [ServiceAccountSecretsDetailsResponseModelListResponseModel](docs/ServiceAccountSecretsDetailsResponseModelListResponseModel.md) @@ -821,6 +828,7 @@ All URIs are relative to _http://localhost_ - [TwoFactorWebAuthnResponseModel](docs/TwoFactorWebAuthnResponseModel.md) - [TwoFactorYubiKeyResponseModel](docs/TwoFactorYubiKeyResponseModel.md) - [UpdateAvatarRequestModel](docs/UpdateAvatarRequestModel.md) +- [UpdateClientOrganizationRequestBody](docs/UpdateClientOrganizationRequestBody.md) - [UpdateDevicesTrustRequestModel](docs/UpdateDevicesTrustRequestModel.md) - [UpdateDomainsRequestModel](docs/UpdateDomainsRequestModel.md) - [UpdateKeyRequestModel](docs/UpdateKeyRequestModel.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 9f1135beb..bea3fd86d 100644 --- a/crates/bitwarden-api-api/src/apis/access_policies_api.rs +++ b/crates/bitwarden-api-api/src/apis/access_policies_api.rs @@ -13,20 +13,6 @@ use reqwest; use super::{configuration, Error}; use crate::apis::ResponseContent; -/// struct for typed errors of method [`access_policies_id_delete`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccessPoliciesIdDeleteError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`access_policies_id_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccessPoliciesIdPutError { - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method /// [`organizations_id_access_policies_people_potential_grantees_get`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -51,31 +37,31 @@ pub enum OrganizationsIdAccessPoliciesServiceAccountsPotentialGranteesGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_get`] +/// struct for typed errors of method [`projects_id_access_policies_people_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesGetError { +pub enum ProjectsIdAccessPoliciesPeopleGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_people_get`] +/// struct for typed errors of method [`projects_id_access_policies_people_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesPeopleGetError { +pub enum ProjectsIdAccessPoliciesPeoplePutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_people_put`] +/// struct for typed errors of method [`projects_id_access_policies_service_accounts_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesPeoplePutError { +pub enum ProjectsIdAccessPoliciesServiceAccountsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`projects_id_access_policies_post`] +/// struct for typed errors of method [`projects_id_access_policies_service_accounts_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ProjectsIdAccessPoliciesPostError { +pub enum ProjectsIdAccessPoliciesServiceAccountsPutError { UnknownValue(serde_json::Value), } @@ -100,103 +86,13 @@ pub enum ServiceAccountsIdGrantedPoliciesGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`service_accounts_id_granted_policies_post`] +/// struct for typed errors of method [`service_accounts_id_granted_policies_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum ServiceAccountsIdGrantedPoliciesPostError { +pub enum ServiceAccountsIdGrantedPoliciesPutError { UnknownValue(serde_json::Value), } -pub async fn access_policies_id_delete( - configuration: &configuration::Configuration, - id: uuid::Uuid, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/access-policies/{id}", - local_var_configuration.base_path, - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn access_policies_id_put( - configuration: &configuration::Configuration, - id: uuid::Uuid, - access_policy_update_request: Option, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/access-policies/{id}", - local_var_configuration.base_path, - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&access_policy_update_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn organizations_id_access_policies_people_potential_grantees_get( configuration: &configuration::Configuration, id: uuid::Uuid, @@ -340,19 +236,19 @@ pub async fn organizations_id_access_policies_service_accounts_potential_grantee } } -pub async fn projects_id_access_policies_get( +pub async fn projects_id_access_policies_people_get( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< - crate::models::ProjectAccessPoliciesResponseModel, - Error, + crate::models::ProjectPeopleAccessPoliciesResponseModel, + Error, > { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!( - "{}/projects/{id}/access-policies", + "{}/projects/{id}/access-policies/people", local_var_configuration.base_path, id = crate::apis::urlencode(id.to_string()) ); @@ -376,7 +272,7 @@ pub async fn projects_id_access_policies_get( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, @@ -387,12 +283,13 @@ pub async fn projects_id_access_policies_get( } } -pub async fn projects_id_access_policies_people_get( +pub async fn projects_id_access_policies_people_put( configuration: &configuration::Configuration, id: uuid::Uuid, + people_access_policies_request_model: Option, ) -> Result< crate::models::ProjectPeopleAccessPoliciesResponseModel, - Error, + Error, > { let local_var_configuration = configuration; @@ -404,7 +301,7 @@ pub async fn projects_id_access_policies_people_get( id = crate::apis::urlencode(id.to_string()) ); let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = @@ -413,6 +310,7 @@ pub async fn projects_id_access_policies_people_get( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; + local_var_req_builder = local_var_req_builder.json(&people_access_policies_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -423,7 +321,7 @@ pub async fn projects_id_access_policies_people_get( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, @@ -434,25 +332,24 @@ pub async fn projects_id_access_policies_people_get( } } -pub async fn projects_id_access_policies_people_put( +pub async fn projects_id_access_policies_service_accounts_get( configuration: &configuration::Configuration, id: uuid::Uuid, - people_access_policies_request_model: Option, ) -> Result< - crate::models::ProjectPeopleAccessPoliciesResponseModel, - Error, + crate::models::ProjectServiceAccountsAccessPoliciesResponseModel, + Error, > { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!( - "{}/projects/{id}/access-policies/people", + "{}/projects/{id}/access-policies/service-accounts", local_var_configuration.base_path, id = crate::apis::urlencode(id.to_string()) ); let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = @@ -461,7 +358,6 @@ pub async fn projects_id_access_policies_people_put( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - local_var_req_builder = local_var_req_builder.json(&people_access_policies_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -472,7 +368,7 @@ pub async fn projects_id_access_policies_people_put( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, @@ -483,25 +379,27 @@ pub async fn projects_id_access_policies_people_put( } } -pub async fn projects_id_access_policies_post( +pub async fn projects_id_access_policies_service_accounts_put( configuration: &configuration::Configuration, id: uuid::Uuid, - access_policies_create_request: Option, + project_service_accounts_access_policies_request_model: Option< + crate::models::ProjectServiceAccountsAccessPoliciesRequestModel, + >, ) -> Result< - crate::models::ProjectAccessPoliciesResponseModel, - Error, + crate::models::ProjectServiceAccountsAccessPoliciesResponseModel, + Error, > { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!( - "{}/projects/{id}/access-policies", + "{}/projects/{id}/access-policies/service-accounts", local_var_configuration.base_path, id = crate::apis::urlencode(id.to_string()) ); let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = @@ -510,7 +408,8 @@ pub async fn projects_id_access_policies_post( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - local_var_req_builder = local_var_req_builder.json(&access_policies_create_request); + local_var_req_builder = + local_var_req_builder.json(&project_service_accounts_access_policies_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -521,7 +420,7 @@ pub async fn projects_id_access_policies_post( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, @@ -632,7 +531,7 @@ pub async fn service_accounts_id_granted_policies_get( configuration: &configuration::Configuration, id: uuid::Uuid, ) -> Result< - crate::models::ServiceAccountProjectAccessPolicyResponseModelListResponseModel, + crate::models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel, Error, > { let local_var_configuration = configuration; @@ -675,13 +574,15 @@ pub async fn service_accounts_id_granted_policies_get( } } -pub async fn service_accounts_id_granted_policies_post( +pub async fn service_accounts_id_granted_policies_put( configuration: &configuration::Configuration, id: uuid::Uuid, - granted_access_policy_request: Option>, + service_account_granted_policies_request_model: Option< + crate::models::ServiceAccountGrantedPoliciesRequestModel, + >, ) -> Result< - crate::models::ServiceAccountProjectAccessPolicyResponseModelListResponseModel, - Error, + crate::models::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel, + Error, > { let local_var_configuration = configuration; @@ -693,7 +594,7 @@ pub async fn service_accounts_id_granted_policies_post( id = crate::apis::urlencode(id.to_string()) ); let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = @@ -702,7 +603,8 @@ pub async fn service_accounts_id_granted_policies_post( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - local_var_req_builder = local_var_req_builder.json(&granted_access_policy_request); + local_var_req_builder = + local_var_req_builder.json(&service_account_granted_policies_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -713,7 +615,7 @@ pub async fn service_accounts_id_granted_policies_post( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, diff --git a/crates/bitwarden-api-api/src/apis/accounts_api.rs b/crates/bitwarden-api-api/src/apis/accounts_api.rs index 142631c05..40db5d15f 100644 --- a/crates/bitwarden-api-api/src/apis/accounts_api.rs +++ b/crates/bitwarden-api-api/src/apis/accounts_api.rs @@ -34,17 +34,10 @@ pub enum AccountsAvatarPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_cancel_premium_post`] +/// struct for typed errors of method [`accounts_cancel_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum AccountsCancelPremiumPostError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`accounts_churn_premium_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountsChurnPremiumPostError { +pub enum AccountsCancelPostError { UnknownValue(serde_json::Value), } @@ -451,62 +444,17 @@ pub async fn accounts_avatar_put( } } -pub async fn accounts_cancel_premium_post( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/accounts/cancel-premium", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn accounts_churn_premium_post( +pub async fn accounts_cancel_post( configuration: &configuration::Configuration, subscription_cancellation_request_model: Option< crate::models::SubscriptionCancellationRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!( - "{}/accounts/churn-premium", - local_var_configuration.base_path - ); + let local_var_uri_str = format!("{}/accounts/cancel", local_var_configuration.base_path); let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); @@ -528,7 +476,7 @@ pub async fn accounts_churn_premium_post( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, diff --git a/crates/bitwarden-api-api/src/apis/ciphers_api.rs b/crates/bitwarden-api-api/src/apis/ciphers_api.rs index 0d9ecf391..662a928b6 100644 --- a/crates/bitwarden-api-api/src/apis/ciphers_api.rs +++ b/crates/bitwarden-api-api/src/apis/ciphers_api.rs @@ -34,6 +34,13 @@ pub enum CiphersAttachmentValidateAzurePostError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`ciphers_bulk_collections_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CiphersBulkCollectionsPostError { + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`ciphers_create_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -83,6 +90,13 @@ pub enum CiphersGetError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`ciphers_has_unassigned_ciphers_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CiphersHasUnassignedCiphersGetError { + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`ciphers_id_admin_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -522,6 +536,53 @@ pub async fn ciphers_attachment_validate_azure_post( } } +pub async fn ciphers_bulk_collections_post( + configuration: &configuration::Configuration, + cipher_bulk_update_collections_request_model: Option< + crate::models::CipherBulkUpdateCollectionsRequestModel, + >, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/ciphers/bulk-collections", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cipher_bulk_update_collections_request_model); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + pub async fn ciphers_create_post( configuration: &configuration::Configuration, cipher_create_request_model: Option, @@ -807,6 +868,48 @@ pub async fn ciphers_get( } } +pub async fn ciphers_has_unassigned_ciphers_get( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/ciphers/has-unassigned-ciphers", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + pub async fn ciphers_id_admin_delete( configuration: &configuration::Configuration, id: &str, @@ -1595,7 +1698,7 @@ pub async fn ciphers_id_collections_post( configuration: &configuration::Configuration, id: uuid::Uuid, cipher_collections_request_model: Option, -) -> Result<(), Error> { +) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -1624,7 +1727,7 @@ pub async fn ciphers_id_collections_post( let local_var_content = local_var_resp.text().await?; if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) + serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); @@ -1641,7 +1744,7 @@ pub async fn ciphers_id_collections_put( configuration: &configuration::Configuration, id: uuid::Uuid, cipher_collections_request_model: Option, -) -> Result<(), Error> { +) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -1670,7 +1773,7 @@ pub async fn ciphers_id_collections_put( let local_var_content = local_var_resp.text().await?; if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) + serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); diff --git a/crates/bitwarden-api-api/src/apis/groups_api.rs b/crates/bitwarden-api-api/src/apis/groups_api.rs index 5918989f4..7087ff767 100644 --- a/crates/bitwarden-api-api/src/apis/groups_api.rs +++ b/crates/bitwarden-api-api/src/apis/groups_api.rs @@ -98,13 +98,6 @@ pub enum OrganizationsOrgIdGroupsIdUsersGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_groups_id_users_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsOrgIdGroupsIdUsersPutError { - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`organizations_org_id_groups_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -488,8 +481,8 @@ pub async fn organizations_org_id_groups_id_get( pub async fn organizations_org_id_groups_id_post( configuration: &configuration::Configuration, - org_id: &str, - id: &str, + org_id: uuid::Uuid, + id: uuid::Uuid, group_request_model: Option, ) -> Result> { let local_var_configuration = configuration; @@ -536,8 +529,8 @@ pub async fn organizations_org_id_groups_id_post( pub async fn organizations_org_id_groups_id_put( configuration: &configuration::Configuration, - org_id: &str, - id: &str, + org_id: uuid::Uuid, + id: uuid::Uuid, group_request_model: Option, ) -> Result> { let local_var_configuration = configuration; @@ -676,57 +669,9 @@ pub async fn organizations_org_id_groups_id_users_get( } } -pub async fn organizations_org_id_groups_id_users_put( - configuration: &configuration::Configuration, - org_id: &str, - id: &str, - uuid_colon_colon_uuid: Option>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/organizations/{orgId}/groups/{id}/users", - local_var_configuration.base_path, - orgId = crate::apis::urlencode(org_id.to_string()), - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn organizations_org_id_groups_post( configuration: &configuration::Configuration, - org_id: &str, + org_id: uuid::Uuid, group_request_model: Option, ) -> Result> { let local_var_configuration = configuration; diff --git a/crates/bitwarden-api-api/src/apis/mod.rs b/crates/bitwarden-api-api/src/apis/mod.rs index b99dc592d..a7c22cd4e 100644 --- a/crates/bitwarden-api-api/src/apis/mod.rs +++ b/crates/bitwarden-api-api/src/apis/mod.rs @@ -110,6 +110,7 @@ pub mod installations_api; pub mod licenses_api; pub mod misc_api; pub mod organization_auth_requests_api; +pub mod organization_billing_api; pub mod organization_connections_api; pub mod organization_domain_api; pub mod organization_export_api; @@ -119,6 +120,8 @@ pub mod organizations_api; pub mod plans_api; pub mod policies_api; pub mod projects_api; +pub mod provider_billing_api; +pub mod provider_clients_api; pub mod provider_organizations_api; pub mod provider_users_api; pub mod providers_api; diff --git a/crates/bitwarden-api-api/src/apis/organization_billing_api.rs b/crates/bitwarden-api-api/src/apis/organization_billing_api.rs new file mode 100644 index 000000000..0b8eeacd3 --- /dev/null +++ b/crates/bitwarden-api-api/src/apis/organization_billing_api.rs @@ -0,0 +1,65 @@ +/* + * 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 super::{configuration, Error}; +use crate::apis::ResponseContent; + +/// struct for typed errors of method [`organizations_organization_id_billing_metadata_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OrganizationsOrganizationIdBillingMetadataGetError { + UnknownValue(serde_json::Value), +} + +pub async fn organizations_organization_id_billing_metadata_get( + configuration: &configuration::Configuration, + organization_id: uuid::Uuid, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/organizations/{organizationId}/billing/metadata", + local_var_configuration.base_path, + organizationId = crate::apis::urlencode(organization_id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} 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 ef9fd864f..4ba27f2b1 100644 --- a/crates/bitwarden-api-api/src/apis/organization_users_api.rs +++ b/crates/bitwarden-api-api/src/apis/organization_users_api.rs @@ -90,20 +90,6 @@ pub enum OrganizationsOrgIdUsersIdGroupsGetError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_org_id_users_id_groups_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdGroupsPostError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`organizations_org_id_users_id_groups_put`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsOrgIdUsersIdGroupsPutError { - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`organizations_org_id_users_id_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -781,112 +767,10 @@ pub async fn organizations_org_id_users_id_groups_get( } } -pub async fn organizations_org_id_users_id_groups_post( - configuration: &configuration::Configuration, - org_id: &str, - id: &str, - organization_user_update_groups_request_model: Option< - crate::models::OrganizationUserUpdateGroupsRequestModel, - >, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/organizations/{orgId}/users/{id}/groups", - local_var_configuration.base_path, - orgId = crate::apis::urlencode(org_id.to_string()), - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&organization_user_update_groups_request_model); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn organizations_org_id_users_id_groups_put( - configuration: &configuration::Configuration, - org_id: &str, - id: &str, - organization_user_update_groups_request_model: Option< - crate::models::OrganizationUserUpdateGroupsRequestModel, - >, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/organizations/{orgId}/users/{id}/groups", - local_var_configuration.base_path, - orgId = crate::apis::urlencode(org_id.to_string()), - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&organization_user_update_groups_request_model); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn organizations_org_id_users_id_post( configuration: &configuration::Configuration, - org_id: &str, - id: &str, + org_id: uuid::Uuid, + id: uuid::Uuid, organization_user_update_request_model: Option< crate::models::OrganizationUserUpdateRequestModel, >, @@ -935,8 +819,8 @@ pub async fn organizations_org_id_users_id_post( pub async fn organizations_org_id_users_id_put( configuration: &configuration::Configuration, - org_id: &str, - id: &str, + org_id: uuid::Uuid, + id: uuid::Uuid, organization_user_update_request_model: Option< crate::models::OrganizationUserUpdateRequestModel, >, @@ -1315,7 +1199,7 @@ pub async fn organizations_org_id_users_id_revoke_put( pub async fn organizations_org_id_users_invite_post( configuration: &configuration::Configuration, - org_id: &str, + org_id: uuid::Uuid, organization_user_invite_request_model: Option< crate::models::OrganizationUserInviteRequestModel, >, diff --git a/crates/bitwarden-api-api/src/apis/organizations_api.rs b/crates/bitwarden-api-api/src/apis/organizations_api.rs index c89c34a61..0cddda72b 100644 --- a/crates/bitwarden-api-api/src/apis/organizations_api.rs +++ b/crates/bitwarden-api-api/src/apis/organizations_api.rs @@ -55,13 +55,6 @@ pub enum OrganizationsIdCancelPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`organizations_id_churn_post`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OrganizationsIdChurnPostError { - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`organizations_id_collection_management_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -496,62 +489,18 @@ pub async fn organizations_id_billing_status_get( } pub async fn organizations_id_cancel_post( - configuration: &configuration::Configuration, - id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/organizations/{id}/cancel", - local_var_configuration.base_path, - id = crate::apis::urlencode(id.to_string()) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn organizations_id_churn_post( configuration: &configuration::Configuration, id: uuid::Uuid, subscription_cancellation_request_model: Option< crate::models::SubscriptionCancellationRequestModel, >, -) -> Result<(), Error> { +) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!( - "{}/organizations/{id}/churn", + "{}/organizations/{id}/cancel", local_var_configuration.base_path, id = crate::apis::urlencode(id.to_string()) ); @@ -576,7 +525,7 @@ pub async fn organizations_id_churn_post( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, @@ -1750,8 +1699,8 @@ pub async fn organizations_id_tax_get( pub async fn organizations_id_tax_put( configuration: &configuration::Configuration, id: &str, - organization_tax_info_update_request_model: Option< - crate::models::OrganizationTaxInfoUpdateRequestModel, + expanded_tax_info_update_request_model: Option< + crate::models::ExpandedTaxInfoUpdateRequestModel, >, ) -> Result<(), Error> { let local_var_configuration = configuration; @@ -1773,7 +1722,7 @@ pub async fn organizations_id_tax_put( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - local_var_req_builder = local_var_req_builder.json(&organization_tax_info_update_request_model); + local_var_req_builder = local_var_req_builder.json(&expanded_tax_info_update_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; diff --git a/crates/bitwarden-api-api/src/apis/provider_billing_api.rs b/crates/bitwarden-api-api/src/apis/provider_billing_api.rs new file mode 100644 index 000000000..13cb7ddb1 --- /dev/null +++ b/crates/bitwarden-api-api/src/apis/provider_billing_api.rs @@ -0,0 +1,65 @@ +/* + * 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 super::{configuration, Error}; +use crate::apis::ResponseContent; + +/// struct for typed errors of method [`providers_provider_id_billing_subscription_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersProviderIdBillingSubscriptionGetError { + UnknownValue(serde_json::Value), +} + +pub async fn providers_provider_id_billing_subscription_get( + configuration: &configuration::Configuration, + provider_id: uuid::Uuid, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{providerId}/billing/subscription", + local_var_configuration.base_path, + providerId = crate::apis::urlencode(provider_id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/crates/bitwarden-api-api/src/apis/provider_clients_api.rs b/crates/bitwarden-api-api/src/apis/provider_clients_api.rs new file mode 100644 index 000000000..be3959c91 --- /dev/null +++ b/crates/bitwarden-api-api/src/apis/provider_clients_api.rs @@ -0,0 +1,126 @@ +/* + * 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 super::{configuration, Error}; +use crate::apis::ResponseContent; + +/// struct for typed errors of method [`providers_provider_id_clients_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersProviderIdClientsPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`providers_provider_id_clients_provider_organization_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersProviderIdClientsProviderOrganizationIdPutError { + UnknownValue(serde_json::Value), +} + +pub async fn providers_provider_id_clients_post( + configuration: &configuration::Configuration, + provider_id: uuid::Uuid, + create_client_organization_request_body: Option< + crate::models::CreateClientOrganizationRequestBody, + >, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{providerId}/clients", + local_var_configuration.base_path, + providerId = crate::apis::urlencode(provider_id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&create_client_organization_request_body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn providers_provider_id_clients_provider_organization_id_put( + configuration: &configuration::Configuration, + provider_id: uuid::Uuid, + provider_organization_id: uuid::Uuid, + update_client_organization_request_body: Option< + crate::models::UpdateClientOrganizationRequestBody, + >, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{providerId}/clients/{providerOrganizationId}", + local_var_configuration.base_path, + providerId = crate::apis::urlencode(provider_id.to_string()), + providerOrganizationId = crate::apis::urlencode(provider_organization_id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&update_client_organization_request_body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/crates/bitwarden-api-api/src/apis/providers_api.rs b/crates/bitwarden-api-api/src/apis/providers_api.rs index 93bf259d8..579ec0f93 100644 --- a/crates/bitwarden-api-api/src/apis/providers_api.rs +++ b/crates/bitwarden-api-api/src/apis/providers_api.rs @@ -13,6 +13,27 @@ use reqwest; use super::{configuration, Error}; use crate::apis::ResponseContent; +/// struct for typed errors of method [`providers_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersIdDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`providers_id_delete_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersIdDeletePostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`providers_id_delete_recover_token_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ProvidersIdDeleteRecoverTokenPostError { + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`providers_id_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -41,6 +62,143 @@ pub enum ProvidersIdSetupPostError { UnknownValue(serde_json::Value), } +pub async fn providers_id_delete( + configuration: &configuration::Configuration, + id: uuid::Uuid, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{id}", + local_var_configuration.base_path, + id = crate::apis::urlencode(id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn providers_id_delete_post( + configuration: &configuration::Configuration, + id: uuid::Uuid, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{id}/delete", + local_var_configuration.base_path, + id = crate::apis::urlencode(id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn providers_id_delete_recover_token_post( + configuration: &configuration::Configuration, + id: uuid::Uuid, + provider_verify_delete_recover_request_model: Option< + crate::models::ProviderVerifyDeleteRecoverRequestModel, + >, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/providers/{id}/delete-recover-token", + local_var_configuration.base_path, + id = crate::apis::urlencode(id.to_string()) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&provider_verify_delete_recover_request_model); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + pub async fn providers_id_get( configuration: &configuration::Configuration, id: uuid::Uuid, diff --git a/crates/bitwarden-api-api/src/apis/push_api.rs b/crates/bitwarden-api-api/src/apis/push_api.rs index 207e29106..570275bdc 100644 --- a/crates/bitwarden-api-api/src/apis/push_api.rs +++ b/crates/bitwarden-api-api/src/apis/push_api.rs @@ -27,10 +27,10 @@ pub enum PushDeleteOrganizationPutError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`push_id_delete`] +/// struct for typed errors of method [`push_delete_post`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PushIdDeleteError { +pub enum PushDeletePostError { UnknownValue(serde_json::Value), } @@ -136,21 +136,17 @@ pub async fn push_delete_organization_put( } } -pub async fn push_id_delete( +pub async fn push_delete_post( configuration: &configuration::Configuration, - id: &str, -) -> Result<(), Error> { + push_device_request_model: Option, +) -> Result<(), Error> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!( - "{}/push/{id}", - local_var_configuration.base_path, - id = crate::apis::urlencode(id.to_string()) - ); + let local_var_uri_str = format!("{}/push/delete", local_var_configuration.base_path); let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { local_var_req_builder = @@ -159,6 +155,7 @@ pub async fn push_id_delete( if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; + local_var_req_builder = local_var_req_builder.json(&push_device_request_model); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -169,7 +166,7 @@ pub async fn push_id_delete( if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, diff --git a/crates/bitwarden-api-api/src/models/access_policies_create_request.rs b/crates/bitwarden-api-api/src/models/access_policies_create_request.rs deleted file mode 100644 index 59a11774e..000000000 --- a/crates/bitwarden-api-api/src/models/access_policies_create_request.rs +++ /dev/null @@ -1,38 +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 - */ - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccessPoliciesCreateRequest { - #[serde( - rename = "userAccessPolicyRequests", - skip_serializing_if = "Option::is_none" - )] - pub user_access_policy_requests: Option>, - #[serde( - rename = "groupAccessPolicyRequests", - skip_serializing_if = "Option::is_none" - )] - pub group_access_policy_requests: Option>, - #[serde( - rename = "serviceAccountAccessPolicyRequests", - skip_serializing_if = "Option::is_none" - )] - pub service_account_access_policy_requests: Option>, -} - -impl AccessPoliciesCreateRequest { - pub fn new() -> AccessPoliciesCreateRequest { - AccessPoliciesCreateRequest { - user_access_policy_requests: None, - group_access_policy_requests: None, - service_account_access_policy_requests: None, - } - } -} diff --git a/crates/bitwarden-api-api/src/models/base_access_policy_response_model.rs b/crates/bitwarden-api-api/src/models/base_access_policy_response_model.rs deleted file mode 100644 index cb15dde0b..000000000 --- a/crates/bitwarden-api-api/src/models/base_access_policy_response_model.rs +++ /dev/null @@ -1,38 +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 - */ - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct BaseAccessPolicyResponseModel { - #[serde(rename = "object", skip_serializing_if = "Option::is_none")] - pub object: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "read", skip_serializing_if = "Option::is_none")] - pub read: Option, - #[serde(rename = "write", skip_serializing_if = "Option::is_none")] - pub write: Option, - #[serde(rename = "creationDate", skip_serializing_if = "Option::is_none")] - pub creation_date: Option, - #[serde(rename = "revisionDate", skip_serializing_if = "Option::is_none")] - pub revision_date: Option, -} - -impl BaseAccessPolicyResponseModel { - pub fn new() -> BaseAccessPolicyResponseModel { - BaseAccessPolicyResponseModel { - object: None, - id: None, - read: None, - write: None, - creation_date: None, - revision_date: None, - } - } -} diff --git a/crates/bitwarden-api-api/src/models/billing_subscription.rs b/crates/bitwarden-api-api/src/models/billing_subscription.rs index 8a0c3aec0..0135b1798 100644 --- a/crates/bitwarden-api-api/src/models/billing_subscription.rs +++ b/crates/bitwarden-api-api/src/models/billing_subscription.rs @@ -28,6 +28,17 @@ pub struct BillingSubscription { pub cancelled: Option, #[serde(rename = "items", skip_serializing_if = "Option::is_none")] pub items: Option>, + #[serde(rename = "collectionMethod", skip_serializing_if = "Option::is_none")] + pub collection_method: Option, + #[serde(rename = "suspensionDate", skip_serializing_if = "Option::is_none")] + pub suspension_date: Option, + #[serde( + rename = "unpaidPeriodEndDate", + skip_serializing_if = "Option::is_none" + )] + pub unpaid_period_end_date: Option, + #[serde(rename = "gracePeriod", skip_serializing_if = "Option::is_none")] + pub grace_period: Option, } impl BillingSubscription { @@ -42,6 +53,10 @@ impl BillingSubscription { status: None, cancelled: None, items: None, + collection_method: None, + suspension_date: None, + unpaid_period_end_date: None, + grace_period: None, } } } diff --git a/crates/bitwarden-api-api/src/models/cipher_bulk_update_collections_request_model.rs b/crates/bitwarden-api-api/src/models/cipher_bulk_update_collections_request_model.rs new file mode 100644 index 000000000..76ab55cea --- /dev/null +++ b/crates/bitwarden-api-api/src/models/cipher_bulk_update_collections_request_model.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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CipherBulkUpdateCollectionsRequestModel { + #[serde(rename = "organizationId", skip_serializing_if = "Option::is_none")] + pub organization_id: Option, + #[serde(rename = "cipherIds", skip_serializing_if = "Option::is_none")] + pub cipher_ids: Option>, + #[serde(rename = "collectionIds", skip_serializing_if = "Option::is_none")] + pub collection_ids: Option>, + /// If true, the collections will be removed from the ciphers. Otherwise, they will be added. + #[serde(rename = "removeCollections", skip_serializing_if = "Option::is_none")] + pub remove_collections: Option, +} + +impl CipherBulkUpdateCollectionsRequestModel { + pub fn new() -> CipherBulkUpdateCollectionsRequestModel { + CipherBulkUpdateCollectionsRequestModel { + organization_id: None, + cipher_ids: None, + collection_ids: None, + remove_collections: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/collection_access_details_response_model.rs b/crates/bitwarden-api-api/src/models/collection_access_details_response_model.rs index 99ba1ed9b..bca30da3f 100644 --- a/crates/bitwarden-api-api/src/models/collection_access_details_response_model.rs +++ b/crates/bitwarden-api-api/src/models/collection_access_details_response_model.rs @@ -27,6 +27,12 @@ pub struct CollectionAccessDetailsResponseModel { /// True if the acting user is explicitly assigned to the collection #[serde(rename = "assigned", skip_serializing_if = "Option::is_none")] pub assigned: Option, + #[serde(rename = "readOnly", skip_serializing_if = "Option::is_none")] + pub read_only: Option, + #[serde(rename = "hidePasswords", skip_serializing_if = "Option::is_none")] + pub hide_passwords: Option, + #[serde(rename = "manage", skip_serializing_if = "Option::is_none")] + pub manage: Option, } impl CollectionAccessDetailsResponseModel { @@ -40,6 +46,9 @@ impl CollectionAccessDetailsResponseModel { groups: None, users: None, assigned: None, + read_only: None, + hide_passwords: None, + manage: None, } } } diff --git a/crates/bitwarden-api-api/src/models/collection_details_response_model.rs b/crates/bitwarden-api-api/src/models/collection_details_response_model.rs index 3275bb104..10a653665 100644 --- a/crates/bitwarden-api-api/src/models/collection_details_response_model.rs +++ b/crates/bitwarden-api-api/src/models/collection_details_response_model.rs @@ -8,6 +8,9 @@ * Generated by: https://openapi-generator.tech */ +/// CollectionDetailsResponseModel : Response model for a collection that is always assigned to the +/// requesting user, including permissions. + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CollectionDetailsResponseModel { #[serde(rename = "object", skip_serializing_if = "Option::is_none")] @@ -29,6 +32,8 @@ pub struct CollectionDetailsResponseModel { } impl CollectionDetailsResponseModel { + /// Response model for a collection that is always assigned to the requesting user, including + /// permissions. pub fn new() -> CollectionDetailsResponseModel { CollectionDetailsResponseModel { object: None, diff --git a/crates/bitwarden-api-api/src/models/create_client_organization_request_body.rs b/crates/bitwarden-api-api/src/models/create_client_organization_request_body.rs new file mode 100644 index 000000000..3a8189840 --- /dev/null +++ b/crates/bitwarden-api-api/src/models/create_client_organization_request_body.rs @@ -0,0 +1,47 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateClientOrganizationRequestBody { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "ownerEmail")] + pub owner_email: String, + #[serde(rename = "planType", skip_serializing_if = "Option::is_none")] + pub plan_type: Option, + #[serde(rename = "seats", skip_serializing_if = "Option::is_none")] + pub seats: Option, + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "keyPair")] + pub key_pair: Box, + #[serde(rename = "collectionName")] + pub collection_name: String, +} + +impl CreateClientOrganizationRequestBody { + pub fn new( + name: String, + owner_email: String, + key: String, + key_pair: crate::models::KeyPairRequestBody, + collection_name: String, + ) -> CreateClientOrganizationRequestBody { + CreateClientOrganizationRequestBody { + name, + owner_email, + plan_type: None, + seats: None, + key, + key_pair: Box::new(key_pair), + collection_name, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/organization_tax_info_update_request_model.rs b/crates/bitwarden-api-api/src/models/expanded_tax_info_update_request_model.rs similarity index 84% rename from crates/bitwarden-api-api/src/models/organization_tax_info_update_request_model.rs rename to crates/bitwarden-api-api/src/models/expanded_tax_info_update_request_model.rs index 76a106b16..a8b676402 100644 --- a/crates/bitwarden-api-api/src/models/organization_tax_info_update_request_model.rs +++ b/crates/bitwarden-api-api/src/models/expanded_tax_info_update_request_model.rs @@ -9,7 +9,7 @@ */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct OrganizationTaxInfoUpdateRequestModel { +pub struct ExpandedTaxInfoUpdateRequestModel { #[serde(rename = "country")] pub country: String, #[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")] @@ -26,9 +26,9 @@ pub struct OrganizationTaxInfoUpdateRequestModel { pub state: Option, } -impl OrganizationTaxInfoUpdateRequestModel { - pub fn new(country: String) -> OrganizationTaxInfoUpdateRequestModel { - OrganizationTaxInfoUpdateRequestModel { +impl ExpandedTaxInfoUpdateRequestModel { + pub fn new(country: String) -> ExpandedTaxInfoUpdateRequestModel { + ExpandedTaxInfoUpdateRequestModel { country, postal_code: None, tax_id: None, diff --git a/crates/bitwarden-api-api/src/models/key_pair_request_body.rs b/crates/bitwarden-api-api/src/models/key_pair_request_body.rs new file mode 100644 index 000000000..da934b08a --- /dev/null +++ b/crates/bitwarden-api-api/src/models/key_pair_request_body.rs @@ -0,0 +1,26 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct KeyPairRequestBody { + #[serde(rename = "publicKey")] + pub public_key: String, + #[serde(rename = "encryptedPrivateKey")] + pub encrypted_private_key: String, +} + +impl KeyPairRequestBody { + pub fn new(public_key: String, encrypted_private_key: String) -> KeyPairRequestBody { + KeyPairRequestBody { + public_key, + encrypted_private_key, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/mod.rs b/crates/bitwarden-api-api/src/models/mod.rs index 062b67d6b..cfc6e1665 100644 --- a/crates/bitwarden-api-api/src/models/mod.rs +++ b/crates/bitwarden-api-api/src/models/mod.rs @@ -1,9 +1,5 @@ -pub mod access_policies_create_request; -pub use self::access_policies_create_request::AccessPoliciesCreateRequest; pub mod access_policy_request; pub use self::access_policy_request::AccessPolicyRequest; -pub mod access_policy_update_request; -pub use self::access_policy_update_request::AccessPolicyUpdateRequest; pub mod access_token_create_request_model; pub use self::access_token_create_request_model::AccessTokenCreateRequestModel; pub mod access_token_creation_response_model; @@ -54,8 +50,6 @@ pub mod authenticator_selection; pub use self::authenticator_selection::AuthenticatorSelection; pub mod authenticator_transport; pub use self::authenticator_transport::AuthenticatorTransport; -pub mod base_access_policy_response_model; -pub use self::base_access_policy_response_model::BaseAccessPolicyResponseModel; pub mod base_secret_response_model; pub use self::base_secret_response_model::BaseSecretResponseModel; pub mod base_secret_response_model_list_response_model; @@ -100,6 +94,8 @@ pub mod cipher_bulk_restore_request_model; pub use self::cipher_bulk_restore_request_model::CipherBulkRestoreRequestModel; pub mod cipher_bulk_share_request_model; pub use self::cipher_bulk_share_request_model::CipherBulkShareRequestModel; +pub mod cipher_bulk_update_collections_request_model; +pub use self::cipher_bulk_update_collections_request_model::CipherBulkUpdateCollectionsRequestModel; pub mod cipher_card_model; pub use self::cipher_card_model::CipherCardModel; pub mod cipher_collections_request_model; @@ -166,6 +162,8 @@ pub mod collection_with_id_request_model; pub use self::collection_with_id_request_model::CollectionWithIdRequestModel; 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 credential_create_options; pub use self::credential_create_options::CredentialCreateOptions; pub mod delete_recover_request_model; @@ -228,6 +226,8 @@ pub mod event_system_user; pub use self::event_system_user::EventSystemUser; pub mod event_type; pub use self::event_type::EventType; +pub mod expanded_tax_info_update_request_model; +pub use self::expanded_tax_info_update_request_model::ExpandedTaxInfoUpdateRequestModel; pub mod fido2_user; pub use self::fido2_user::Fido2User; pub mod field_type; @@ -292,6 +292,8 @@ pub mod kdf_type; pub use self::kdf_type::KdfType; pub mod key_model; pub use self::key_model::KeyModel; +pub mod key_pair_request_body; +pub use self::key_pair_request_body::KeyPairRequestBody; pub mod keys_request_model; pub use self::keys_request_model::KeysRequestModel; pub mod keys_response_model; @@ -368,8 +370,6 @@ pub mod organization_subscription_response_model; pub use self::organization_subscription_response_model::OrganizationSubscriptionResponseModel; pub mod organization_subscription_update_request_model; pub use self::organization_subscription_update_request_model::OrganizationSubscriptionUpdateRequestModel; -pub mod organization_tax_info_update_request_model; -pub use self::organization_tax_info_update_request_model::OrganizationTaxInfoUpdateRequestModel; pub mod organization_update_request_model; pub use self::organization_update_request_model::OrganizationUpdateRequestModel; pub mod organization_upgrade_request_model; @@ -408,8 +408,6 @@ pub mod organization_user_status_type; pub use self::organization_user_status_type::OrganizationUserStatusType; pub mod organization_user_type; pub use self::organization_user_type::OrganizationUserType; -pub mod organization_user_update_groups_request_model; -pub use self::organization_user_update_groups_request_model::OrganizationUserUpdateGroupsRequestModel; pub mod organization_user_update_request_model; pub use self::organization_user_update_request_model::OrganizationUserUpdateRequestModel; pub mod organization_user_user_details_response_model; @@ -476,8 +474,6 @@ pub mod profile_provider_response_model; pub use self::profile_provider_response_model::ProfileProviderResponseModel; pub mod profile_response_model; pub use self::profile_response_model::ProfileResponseModel; -pub mod project_access_policies_response_model; -pub use self::project_access_policies_response_model::ProjectAccessPoliciesResponseModel; pub mod project_create_request_model; pub use self::project_create_request_model::ProjectCreateRequestModel; pub mod project_people_access_policies_response_model; @@ -486,6 +482,10 @@ pub mod project_response_model; pub use self::project_response_model::ProjectResponseModel; pub mod project_response_model_list_response_model; pub use self::project_response_model_list_response_model::ProjectResponseModelListResponseModel; +pub mod project_service_accounts_access_policies_request_model; +pub use self::project_service_accounts_access_policies_request_model::ProjectServiceAccountsAccessPoliciesRequestModel; +pub mod project_service_accounts_access_policies_response_model; +pub use self::project_service_accounts_access_policies_response_model::ProjectServiceAccountsAccessPoliciesResponseModel; pub mod project_update_request_model; pub use self::project_update_request_model::ProjectUpdateRequestModel; pub mod protected_device_response_model; @@ -504,6 +504,8 @@ pub mod provider_response_model; pub use self::provider_response_model::ProviderResponseModel; pub mod provider_setup_request_model; pub use self::provider_setup_request_model::ProviderSetupRequestModel; +pub mod provider_status_type; +pub use self::provider_status_type::ProviderStatusType; pub mod provider_type; pub use self::provider_type::ProviderType; pub mod provider_update_request_model; @@ -540,6 +542,8 @@ pub mod provider_user_user_details_response_model; pub use self::provider_user_user_details_response_model::ProviderUserUserDetailsResponseModel; pub mod provider_user_user_details_response_model_list_response_model; pub use self::provider_user_user_details_response_model_list_response_model::ProviderUserUserDetailsResponseModelListResponseModel; +pub mod provider_verify_delete_recover_request_model; +pub use self::provider_verify_delete_recover_request_model::ProviderVerifyDeleteRecoverRequestModel; pub mod pub_key_cred_param; pub use self::pub_key_cred_param::PubKeyCredParam; pub mod public_key_credential_descriptor; @@ -548,6 +552,8 @@ pub mod public_key_credential_rp_entity; pub use self::public_key_credential_rp_entity::PublicKeyCredentialRpEntity; pub mod public_key_credential_type; pub use self::public_key_credential_type::PublicKeyCredentialType; +pub mod push_device_request_model; +pub use self::push_device_request_model::PushDeviceRequestModel; pub mod push_registration_request_model; pub use self::push_registration_request_model::PushRegistrationRequestModel; pub mod push_send_request_model; @@ -626,12 +632,16 @@ pub mod server_config_response_model; pub use self::server_config_response_model::ServerConfigResponseModel; pub mod service_account_create_request_model; pub use self::service_account_create_request_model::ServiceAccountCreateRequestModel; +pub mod service_account_granted_policies_permission_details_response_model; +pub use self::service_account_granted_policies_permission_details_response_model::ServiceAccountGrantedPoliciesPermissionDetailsResponseModel; +pub mod service_account_granted_policies_request_model; +pub use self::service_account_granted_policies_request_model::ServiceAccountGrantedPoliciesRequestModel; pub mod service_account_people_access_policies_response_model; pub use self::service_account_people_access_policies_response_model::ServiceAccountPeopleAccessPoliciesResponseModel; +pub mod service_account_project_access_policy_permission_details_response_model; +pub use self::service_account_project_access_policy_permission_details_response_model::ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel; pub mod service_account_project_access_policy_response_model; pub use self::service_account_project_access_policy_response_model::ServiceAccountProjectAccessPolicyResponseModel; -pub mod service_account_project_access_policy_response_model_list_response_model; -pub use self::service_account_project_access_policy_response_model_list_response_model::ServiceAccountProjectAccessPolicyResponseModelListResponseModel; pub mod service_account_response_model; pub use self::service_account_response_model::ServiceAccountResponseModel; pub mod service_account_secrets_details_response_model; @@ -704,6 +714,8 @@ pub mod two_factor_yubi_key_response_model; pub use self::two_factor_yubi_key_response_model::TwoFactorYubiKeyResponseModel; 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_devices_trust_request_model; pub use self::update_devices_trust_request_model::UpdateDevicesTrustRequestModel; pub mod update_domains_request_model; diff --git a/crates/bitwarden-api-api/src/models/organization_domain_request_model.rs b/crates/bitwarden-api-api/src/models/organization_domain_request_model.rs index b1dbe8395..bb9f39b60 100644 --- a/crates/bitwarden-api-api/src/models/organization_domain_request_model.rs +++ b/crates/bitwarden-api-api/src/models/organization_domain_request_model.rs @@ -10,14 +10,12 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationDomainRequestModel { - #[serde(rename = "txt")] - pub txt: String, #[serde(rename = "domainName")] pub domain_name: String, } impl OrganizationDomainRequestModel { - pub fn new(txt: String, domain_name: String) -> OrganizationDomainRequestModel { - OrganizationDomainRequestModel { txt, domain_name } + pub fn new(domain_name: String) -> OrganizationDomainRequestModel { + OrganizationDomainRequestModel { domain_name } } } diff --git a/crates/bitwarden-api-api/src/models/organization_user_update_groups_request_model.rs b/crates/bitwarden-api-api/src/models/organization_user_update_groups_request_model.rs deleted file mode 100644 index c9b636fc9..000000000 --- a/crates/bitwarden-api-api/src/models/organization_user_update_groups_request_model.rs +++ /dev/null @@ -1,21 +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 - */ - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct OrganizationUserUpdateGroupsRequestModel { - #[serde(rename = "groupIds")] - pub group_ids: Vec, -} - -impl OrganizationUserUpdateGroupsRequestModel { - pub fn new(group_ids: Vec) -> OrganizationUserUpdateGroupsRequestModel { - OrganizationUserUpdateGroupsRequestModel { group_ids } - } -} diff --git a/crates/bitwarden-api-api/src/models/plan_type.rs b/crates/bitwarden-api-api/src/models/plan_type.rs index 109e9250e..8aa55fba1 100644 --- a/crates/bitwarden-api-api/src/models/plan_type.rs +++ b/crates/bitwarden-api-api/src/models/plan_type.rs @@ -26,11 +26,16 @@ pub enum PlanType { TeamsAnnually2020 = 9, EnterpriseMonthly2020 = 10, EnterpriseAnnually2020 = 11, - TeamsMonthly = 12, - TeamsAnnually = 13, - EnterpriseMonthly = 14, - EnterpriseAnnually = 15, - TeamsStarter = 16, + TeamsMonthly2023 = 12, + TeamsAnnually2023 = 13, + EnterpriseMonthly2023 = 14, + EnterpriseAnnually2023 = 15, + TeamsStarter2023 = 16, + TeamsMonthly = 17, + TeamsAnnually = 18, + EnterpriseMonthly = 19, + EnterpriseAnnually = 20, + TeamsStarter = 21, } impl ToString for PlanType { @@ -48,11 +53,16 @@ impl ToString for PlanType { Self::TeamsAnnually2020 => String::from("9"), Self::EnterpriseMonthly2020 => String::from("10"), Self::EnterpriseAnnually2020 => String::from("11"), - Self::TeamsMonthly => String::from("12"), - Self::TeamsAnnually => String::from("13"), - Self::EnterpriseMonthly => String::from("14"), - Self::EnterpriseAnnually => String::from("15"), - Self::TeamsStarter => String::from("16"), + Self::TeamsMonthly2023 => String::from("12"), + Self::TeamsAnnually2023 => String::from("13"), + Self::EnterpriseMonthly2023 => String::from("14"), + Self::EnterpriseAnnually2023 => String::from("15"), + Self::TeamsStarter2023 => String::from("16"), + Self::TeamsMonthly => String::from("17"), + Self::TeamsAnnually => String::from("18"), + Self::EnterpriseMonthly => String::from("19"), + Self::EnterpriseAnnually => String::from("20"), + Self::TeamsStarter => String::from("21"), } } } diff --git a/crates/bitwarden-api-api/src/models/profile_provider_response_model.rs b/crates/bitwarden-api-api/src/models/profile_provider_response_model.rs index f9a5cd392..aac654e96 100644 --- a/crates/bitwarden-api-api/src/models/profile_provider_response_model.rs +++ b/crates/bitwarden-api-api/src/models/profile_provider_response_model.rs @@ -30,6 +30,8 @@ pub struct ProfileProviderResponseModel { pub user_id: Option, #[serde(rename = "useEvents", skip_serializing_if = "Option::is_none")] pub use_events: Option, + #[serde(rename = "providerStatus", skip_serializing_if = "Option::is_none")] + pub provider_status: Option, } impl ProfileProviderResponseModel { @@ -45,6 +47,7 @@ impl ProfileProviderResponseModel { permissions: None, user_id: None, use_events: None, + provider_status: None, } } } diff --git a/crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_request_model.rs b/crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_request_model.rs new file mode 100644 index 000000000..030e36b4a --- /dev/null +++ b/crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_request_model.rs @@ -0,0 +1,26 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectServiceAccountsAccessPoliciesRequestModel { + #[serde( + rename = "serviceAccountAccessPolicyRequests", + skip_serializing_if = "Option::is_none" + )] + pub service_account_access_policy_requests: Option>, +} + +impl ProjectServiceAccountsAccessPoliciesRequestModel { + pub fn new() -> ProjectServiceAccountsAccessPoliciesRequestModel { + ProjectServiceAccountsAccessPoliciesRequestModel { + service_account_access_policy_requests: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/project_access_policies_response_model.rs b/crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_response_model.rs similarity index 53% rename from crates/bitwarden-api-api/src/models/project_access_policies_response_model.rs rename to crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_response_model.rs index 17daba3d9..7e4b892de 100644 --- a/crates/bitwarden-api-api/src/models/project_access_policies_response_model.rs +++ b/crates/bitwarden-api-api/src/models/project_service_accounts_access_policies_response_model.rs @@ -9,16 +9,9 @@ */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct ProjectAccessPoliciesResponseModel { +pub struct ProjectServiceAccountsAccessPoliciesResponseModel { #[serde(rename = "object", skip_serializing_if = "Option::is_none")] pub object: Option, - #[serde(rename = "userAccessPolicies", skip_serializing_if = "Option::is_none")] - pub user_access_policies: Option>, - #[serde( - rename = "groupAccessPolicies", - skip_serializing_if = "Option::is_none" - )] - pub group_access_policies: Option>, #[serde( rename = "serviceAccountAccessPolicies", skip_serializing_if = "Option::is_none" @@ -27,12 +20,10 @@ pub struct ProjectAccessPoliciesResponseModel { Option>, } -impl ProjectAccessPoliciesResponseModel { - pub fn new() -> ProjectAccessPoliciesResponseModel { - ProjectAccessPoliciesResponseModel { +impl ProjectServiceAccountsAccessPoliciesResponseModel { + pub fn new() -> ProjectServiceAccountsAccessPoliciesResponseModel { + ProjectServiceAccountsAccessPoliciesResponseModel { object: None, - user_access_policies: None, - group_access_policies: None, service_account_access_policies: None, } } diff --git a/crates/bitwarden-api-api/src/models/provider_response_model.rs b/crates/bitwarden-api-api/src/models/provider_response_model.rs index 83cfe0b69..41404bd15 100644 --- a/crates/bitwarden-api-api/src/models/provider_response_model.rs +++ b/crates/bitwarden-api-api/src/models/provider_response_model.rs @@ -32,6 +32,8 @@ pub struct ProviderResponseModel { pub billing_email: Option, #[serde(rename = "creationDate", skip_serializing_if = "Option::is_none")] pub creation_date: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, } impl ProviderResponseModel { @@ -48,6 +50,7 @@ impl ProviderResponseModel { business_tax_number: None, billing_email: None, creation_date: None, + r#type: None, } } } diff --git a/crates/bitwarden-api-api/src/models/provider_setup_request_model.rs b/crates/bitwarden-api-api/src/models/provider_setup_request_model.rs index dacc39a8d..09c6e2a94 100644 --- a/crates/bitwarden-api-api/src/models/provider_setup_request_model.rs +++ b/crates/bitwarden-api-api/src/models/provider_setup_request_model.rs @@ -20,6 +20,8 @@ pub struct ProviderSetupRequestModel { pub token: String, #[serde(rename = "key")] pub key: String, + #[serde(rename = "taxInfo", skip_serializing_if = "Option::is_none")] + pub tax_info: Option>, } impl ProviderSetupRequestModel { @@ -35,6 +37,7 @@ impl ProviderSetupRequestModel { billing_email, token, key, + tax_info: None, } } } diff --git a/crates/bitwarden-api-api/src/models/provider_status_type.rs b/crates/bitwarden-api-api/src/models/provider_status_type.rs new file mode 100644 index 000000000..ba8d93a66 --- /dev/null +++ b/crates/bitwarden-api-api/src/models/provider_status_type.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 + */ + +/// +#[repr(i64)] +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +pub enum ProviderStatusType { + Pending = 0, + Created = 1, + Billable = 2, +} + +impl ToString for ProviderStatusType { + fn to_string(&self) -> String { + match self { + Self::Pending => String::from("0"), + Self::Created => String::from("1"), + Self::Billable => String::from("2"), + } + } +} + +impl Default for ProviderStatusType { + fn default() -> ProviderStatusType { + Self::Pending + } +} diff --git a/crates/bitwarden-api-api/src/models/access_policy_update_request.rs b/crates/bitwarden-api-api/src/models/provider_verify_delete_recover_request_model.rs similarity index 51% rename from crates/bitwarden-api-api/src/models/access_policy_update_request.rs rename to crates/bitwarden-api-api/src/models/provider_verify_delete_recover_request_model.rs index 38d7852b0..52d6d6b2b 100644 --- a/crates/bitwarden-api-api/src/models/access_policy_update_request.rs +++ b/crates/bitwarden-api-api/src/models/provider_verify_delete_recover_request_model.rs @@ -9,15 +9,13 @@ */ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct AccessPolicyUpdateRequest { - #[serde(rename = "read")] - pub read: bool, - #[serde(rename = "write")] - pub write: bool, +pub struct ProviderVerifyDeleteRecoverRequestModel { + #[serde(rename = "token")] + pub token: String, } -impl AccessPolicyUpdateRequest { - pub fn new(read: bool, write: bool) -> AccessPolicyUpdateRequest { - AccessPolicyUpdateRequest { read, write } +impl ProviderVerifyDeleteRecoverRequestModel { + pub fn new(token: String) -> ProviderVerifyDeleteRecoverRequestModel { + ProviderVerifyDeleteRecoverRequestModel { token } } } diff --git a/crates/bitwarden-api-api/src/models/push_device_request_model.rs b/crates/bitwarden-api-api/src/models/push_device_request_model.rs new file mode 100644 index 000000000..8b65ff3bc --- /dev/null +++ b/crates/bitwarden-api-api/src/models/push_device_request_model.rs @@ -0,0 +1,23 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PushDeviceRequestModel { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "type")] + pub r#type: crate::models::DeviceType, +} + +impl PushDeviceRequestModel { + pub fn new(id: String, r#type: crate::models::DeviceType) -> PushDeviceRequestModel { + PushDeviceRequestModel { id, r#type } + } +} diff --git a/crates/bitwarden-api-api/src/models/push_update_request_model.rs b/crates/bitwarden-api-api/src/models/push_update_request_model.rs index 2fda855bb..d13ddccd3 100644 --- a/crates/bitwarden-api-api/src/models/push_update_request_model.rs +++ b/crates/bitwarden-api-api/src/models/push_update_request_model.rs @@ -10,16 +10,19 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PushUpdateRequestModel { - #[serde(rename = "deviceIds")] - pub device_ids: Vec, + #[serde(rename = "devices")] + pub devices: Vec, #[serde(rename = "organizationId")] pub organization_id: String, } impl PushUpdateRequestModel { - pub fn new(device_ids: Vec, organization_id: String) -> PushUpdateRequestModel { + pub fn new( + devices: Vec, + organization_id: String, + ) -> PushUpdateRequestModel { PushUpdateRequestModel { - device_ids, + devices, organization_id, } } diff --git a/crates/bitwarden-api-api/src/models/service_account_granted_policies_permission_details_response_model.rs b/crates/bitwarden-api-api/src/models/service_account_granted_policies_permission_details_response_model.rs new file mode 100644 index 000000000..b781008e7 --- /dev/null +++ b/crates/bitwarden-api-api/src/models/service_account_granted_policies_permission_details_response_model.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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountGrantedPoliciesPermissionDetailsResponseModel { + #[serde(rename = "object", skip_serializing_if = "Option::is_none")] + pub object: Option, + #[serde( + rename = "grantedProjectPolicies", + skip_serializing_if = "Option::is_none" + )] + pub granted_project_policies: + Option>, +} + +impl ServiceAccountGrantedPoliciesPermissionDetailsResponseModel { + pub fn new() -> ServiceAccountGrantedPoliciesPermissionDetailsResponseModel { + ServiceAccountGrantedPoliciesPermissionDetailsResponseModel { + object: None, + granted_project_policies: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/service_account_granted_policies_request_model.rs b/crates/bitwarden-api-api/src/models/service_account_granted_policies_request_model.rs new file mode 100644 index 000000000..5873167ac --- /dev/null +++ b/crates/bitwarden-api-api/src/models/service_account_granted_policies_request_model.rs @@ -0,0 +1,26 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountGrantedPoliciesRequestModel { + #[serde( + rename = "projectGrantedPolicyRequests", + skip_serializing_if = "Option::is_none" + )] + pub project_granted_policy_requests: Option>, +} + +impl ServiceAccountGrantedPoliciesRequestModel { + pub fn new() -> ServiceAccountGrantedPoliciesRequestModel { + ServiceAccountGrantedPoliciesRequestModel { + project_granted_policy_requests: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/service_account_project_access_policy_permission_details_response_model.rs b/crates/bitwarden-api-api/src/models/service_account_project_access_policy_permission_details_response_model.rs new file mode 100644 index 000000000..fa4d2540d --- /dev/null +++ b/crates/bitwarden-api-api/src/models/service_account_project_access_policy_permission_details_response_model.rs @@ -0,0 +1,29 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel { + #[serde(rename = "object", skip_serializing_if = "Option::is_none")] + pub object: Option, + #[serde(rename = "accessPolicy", skip_serializing_if = "Option::is_none")] + pub access_policy: Option>, + #[serde(rename = "hasPermission", skip_serializing_if = "Option::is_none")] + pub has_permission: Option, +} + +impl ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel { + pub fn new() -> ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel { + ServiceAccountProjectAccessPolicyPermissionDetailsResponseModel { + object: None, + access_policy: None, + has_permission: None, + } + } +} diff --git a/crates/bitwarden-api-api/src/models/service_account_project_access_policy_response_model_list_response_model.rs b/crates/bitwarden-api-api/src/models/service_account_project_access_policy_response_model_list_response_model.rs deleted file mode 100644 index 531970536..000000000 --- a/crates/bitwarden-api-api/src/models/service_account_project_access_policy_response_model_list_response_model.rs +++ /dev/null @@ -1,29 +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 - */ - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct ServiceAccountProjectAccessPolicyResponseModelListResponseModel { - #[serde(rename = "object", skip_serializing_if = "Option::is_none")] - pub object: Option, - #[serde(rename = "data", skip_serializing_if = "Option::is_none")] - pub data: Option>, - #[serde(rename = "continuationToken", skip_serializing_if = "Option::is_none")] - pub continuation_token: Option, -} - -impl ServiceAccountProjectAccessPolicyResponseModelListResponseModel { - pub fn new() -> ServiceAccountProjectAccessPolicyResponseModelListResponseModel { - ServiceAccountProjectAccessPolicyResponseModelListResponseModel { - object: None, - data: None, - continuation_token: None, - } - } -} diff --git a/crates/bitwarden-api-api/src/models/update_client_organization_request_body.rs b/crates/bitwarden-api-api/src/models/update_client_organization_request_body.rs new file mode 100644 index 000000000..5cf5d29dc --- /dev/null +++ b/crates/bitwarden-api-api/src/models/update_client_organization_request_body.rs @@ -0,0 +1,26 @@ +/* + * 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 + */ + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateClientOrganizationRequestBody { + #[serde(rename = "assignedSeats")] + pub assigned_seats: i32, + #[serde(rename = "name")] + pub name: String, +} + +impl UpdateClientOrganizationRequestBody { + pub fn new(assigned_seats: i32, name: String) -> UpdateClientOrganizationRequestBody { + UpdateClientOrganizationRequestBody { + assigned_seats, + name, + } + } +} diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index bb190aaad..e35d031c0 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -34,10 +34,6 @@ All URIs are relative to _http://localhost_ | _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_ | [**account_external_callback_get**](docs/SsoApi.md#account_external_callback_get) | **GET** /account/ExternalCallback | -| _SsoApi_ | [**account_external_challenge_get**](docs/SsoApi.md#account_external_challenge_get) | **GET** /account/ExternalChallenge | -| _SsoApi_ | [**account_login_get**](docs/SsoApi.md#account_login_get) | **GET** /account/Login | -| _SsoApi_ | [**account_pre_validate_get**](docs/SsoApi.md#account_pre_validate_get) | **GET** /account/PreValidate | | _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 | diff --git a/crates/bitwarden-api-identity/src/apis/sso_api.rs b/crates/bitwarden-api-identity/src/apis/sso_api.rs index 3d13ea704..e0f73008c 100644 --- a/crates/bitwarden-api-identity/src/apis/sso_api.rs +++ b/crates/bitwarden-api-identity/src/apis/sso_api.rs @@ -13,34 +13,6 @@ use reqwest; use super::{configuration, Error}; use crate::apis::ResponseContent; -/// struct for typed errors of method [`account_external_callback_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountExternalCallbackGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`account_external_challenge_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountExternalChallengeGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`account_login_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountLoginGetError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method [`account_pre_validate_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountPreValidateGetError { - UnknownValue(serde_json::Value), -} - /// struct for typed errors of method [`sso_external_callback_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -69,186 +41,6 @@ pub enum SsoPreValidateGetError { UnknownValue(serde_json::Value), } -pub async fn account_external_callback_get( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/account/ExternalCallback", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn account_external_challenge_get( - configuration: &configuration::Configuration, - domain_hint: Option<&str>, - return_url: Option<&str>, - user_identifier: Option<&str>, - sso_token: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/account/ExternalChallenge", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = domain_hint { - local_var_req_builder = - local_var_req_builder.query(&[("domainHint", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = return_url { - local_var_req_builder = - local_var_req_builder.query(&[("returnUrl", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = user_identifier { - local_var_req_builder = - local_var_req_builder.query(&[("userIdentifier", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = sso_token { - local_var_req_builder = - local_var_req_builder.query(&[("ssoToken", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn account_login_get( - configuration: &configuration::Configuration, - return_url: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/account/Login", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = return_url { - local_var_req_builder = - local_var_req_builder.query(&[("returnUrl", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn account_pre_validate_get( - configuration: &configuration::Configuration, - domain_hint: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/account/PreValidate", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = domain_hint { - local_var_req_builder = - local_var_req_builder.query(&[("domainHint", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } -} - pub async fn sso_external_callback_get( configuration: &configuration::Configuration, ) -> Result<(), Error> {